Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Documentation/RelNotes/2.53.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Performance, Internal Implementation, Development Support etc.
* "git diff-files -R --find-copies-harder" has been taught to use
the potential copy sources from the index correctly.

* Require C99 style flexible array member support from all platforms.

* The code path that enumerates promisor objects have been optimized
to skip pointlessly parsing blob objects.


Fixes since v2.52
-----------------
Expand Down Expand Up @@ -214,3 +219,5 @@ Fixes since v2.52
(merge bab391761d kj/pull-options-decl-cleanup later to maint).
(merge 007b8994d4 rs/t4014-git-version-string-fix later to maint).
(merge 4ce170c522 ds/doc-scalar-config later to maint).
(merge a0c813951a jc/doc-commit-signoff-config later to maint).
(merge 8ee262985a ja/doc-misc-fixes later to maint).
2 changes: 1 addition & 1 deletion Documentation/git-checkout.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ ARGUMENT DISAMBIGUATION
-----------------------

When you run `git checkout <something>`, Git tries to guess whether
`<something>` is intended to be a branch, a commit, or a set of file(s),
_<something>_ is intended to be a branch, a commit, or a set of file(s),
and then either switches to that branch or commit, or restores the
specified files.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-rebase.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ of the to-be-rebased branch. However, `ORIG_HEAD` is not guaranteed to still
point to that commit at the end of the rebase if other commands that change
`ORIG_HEAD` (like `git reset`) are used during the rebase. The previous branch
tip, however, is accessible using the reflog of the current branch (i.e. `@{1}`,
see linkgit:gitrevisions[7].
see linkgit:gitrevisions[7]).

TRANSPLANTING A TOPIC BRANCH WITH --ONTO
----------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions Documentation/git-repack.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ to the new separate pack will be written.
Only useful with `--cruft -d`.

--max-cruft-size=<n>::
Overrides `--max-pack-size` for cruft packs. Inherits the value of
Override `--max-pack-size` for cruft packs. Inherits the value of
`--max-pack-size` (if any) by default. See the documentation for
`--max-pack-size` for more details.

--combine-cruft-below-size=<n>::
When generating cruft packs without pruning, only repack
existing cruft packs whose size is strictly less than `<n>`,
where `<n>` represents a number of bytes, which can optionally
existing cruft packs whose size is strictly less than `<n>`
bytes, which can optionally
be suffixed with "k", "m", or "g". Cruft packs whose size is
greater than or equal to `<n>` are left as-is and not repacked.
Useful when you want to avoid repacking large cruft pack(s) in
Expand Down
26 changes: 13 additions & 13 deletions Documentation/git-send-email.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Sending
for your own case. Default is the value of `sendemail.smtpEncryption`.

--smtp-domain=<FQDN>::
Specifies the Fully Qualified Domain Name (FQDN) used in the
Specify the Fully Qualified Domain Name (FQDN) used in the
HELO/EHLO command to the SMTP server. Some servers require the
FQDN to match your IP address. If not set, `git send-email` attempts
to determine your FQDN automatically. Default is the value of
Expand Down Expand Up @@ -245,7 +245,7 @@ a password is obtained using linkgit:git-credential[1].
Disable SMTP authentication. Short hand for `--smtp-auth=none`.

--smtp-server=<host>::
If set, specifies the outgoing SMTP server to use (e.g.
Specify the outgoing SMTP server to use (e.g.
`smtp.example.com` or a raw IP address). If unspecified, and if
`--sendmail-cmd` is also unspecified, the default is to search
for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH` if such a
Expand All @@ -258,15 +258,15 @@ command names. For those use cases, consider using `--sendmail-cmd`
instead.

--smtp-server-port=<port>::
Specifies a port different from the default port (SMTP
Specify a port different from the default port (SMTP
servers typically listen to smtp port 25, but may also listen to
submission port 587, or the common SSL smtp port 465);
symbolic port names (e.g. `submission` instead of 587)
are also accepted. The port can also be set with the
`sendemail.smtpServerPort` configuration variable.

--smtp-server-option=<option>::
If set, specifies the outgoing SMTP server option to use.
Specify the outgoing SMTP server option to use.
Default value can be specified by the `sendemail.smtpServerOption`
configuration option.
+
Expand All @@ -277,7 +277,7 @@ must be used for each option.
--smtp-ssl::
Legacy alias for `--smtp-encryption ssl`.

--smtp-ssl-cert-path::
--smtp-ssl-cert-path <path>::
Path to a store of trusted CA certificates for SMTP SSL/TLS
certificate validation (either a directory that has been processed
by `c_rehash`, or a single file containing one or more PEM format
Expand Down Expand Up @@ -346,11 +346,11 @@ Automating
--no-to::
--no-cc::
--no-bcc::
Clears any list of `To:`, `Cc:`, `Bcc:` addresses previously
Clear any list of `To:`, `Cc:`, `Bcc:` addresses previously
set via config.

--no-identity::
Clears the previously read value of `sendemail.identity` set
Clear the previously read value of `sendemail.identity` set
via config, if any.

--to-cmd=<command>::
Expand Down Expand Up @@ -509,12 +509,12 @@ have been specified, in which case default to `compose`.
Currently, validation means the following:
+
--
* Invoke the sendemail-validate hook if present (see linkgit:githooks[5]).
* Warn of patches that contain lines longer than
998 characters unless a suitable transfer encoding
(`auto`, `base64`, or `quoted-printable`) is used;
this is due to SMTP limits as described by
https://www.ietf.org/rfc/rfc5322.txt.
* Invoke the sendemail-validate hook if present (see linkgit:githooks[5]).
* Warn of patches that contain lines longer than
998 characters unless a suitable transfer encoding
(`auto`, `base64`, or `quoted-printable`) is used;
this is due to SMTP limits as described by
https://www.ietf.org/rfc/rfc5322.txt.
--
+
Default is the value of `sendemail.validate`; if this is not set,
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-worktree.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ associated with a new unborn branch named _<branch>_ (after
passed to the command. In the event the repository has a remote and
`--guess-remote` is used, but no remote or local branches exist, then the
command fails with a warning reminding the user to fetch from their remote
first (or override by using `-f/--force`).
first (or override by using `-f`/`--force`).

`list`::

Expand Down
19 changes: 19 additions & 0 deletions Documentation/gitfaq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,25 @@ Windows would be the configuration `"C:\Program Files\Vim\gvim.exe" --nofork`,
which quotes the filename with spaces and specifies the `--nofork` option to
avoid backgrounding the process.

[[sign-off]]
Why not have `commit.signoff` and other configuration variables?::
Git intentionally does not (and will not) provide a
configuration variable, such as `commit.signoff`, to
automatically add `--signoff` by default. The reason is to
protect the legal and intentional significance of a sign-off.
If there were more automated and widely publicized ways for
sign-offs to be appended, it would become easier for someone
to argue later that a "Signed-off-by" trailer was just added
out of habit or by automation, without the committer's full
awareness or intent to certify their agreement with the
Developer Certificate of Origin (DCO) or a similar statement.
This could undermine the sign-off’s credibility in legal or
contractual situations.
+
There exists `format.signoff`, but that is a historical mistake, and
it is not an excuse to add more mistakes of the same kind on top.


Credentials
-----------

Expand Down
4 changes: 4 additions & 0 deletions Documentation/signoff-option.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ endif::git-commit[]
+
The `--no-signoff` option can be used to countermand an earlier `--signoff`
option on the command line.
+
Git does not (and will not) have a configuration variable to enable
the `--signoff` command line option by default; see the
`commit.signoff` entry in linkgit:gitfaq[7] for more details.
33 changes: 2 additions & 31 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,8 @@ struct strbuf;
DISABLE_WARNING(-Wsign-compare)
#endif

#ifndef FLEX_ARRAY
/*
* See if our compiler is known to support flexible array members.
*/

/*
* Check vendor specific quirks first, before checking the
* __STDC_VERSION__, as vendor compilers can lie and we need to be
* able to work them around. Note that by not defining FLEX_ARRAY
* here, we can fall back to use the "safer but a bit wasteful" one
* later.
*/
#if defined(__SUNPRO_C) && (__SUNPRO_C <= 0x580)
#elif defined(__GNUC__)
# if (__GNUC__ >= 3)
# define FLEX_ARRAY /* empty */
# else
# define FLEX_ARRAY 0 /* older GNU extension */
# endif
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define FLEX_ARRAY /* empty */
#endif

/*
* Otherwise, default to safer but a bit wasteful traditional style
*/
#ifndef FLEX_ARRAY
# define FLEX_ARRAY 1
#endif
#endif

#undef FLEX_ARRAY
#define FLEX_ARRAY /* empty - weather balloon to require C99 FAM */

/*
* BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
Expand Down
4 changes: 2 additions & 2 deletions object.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ struct object *parse_object_with_flags(struct repository *r,
return &commit->object;
}

if ((!obj || obj->type == OBJ_BLOB) &&
if ((!obj || obj->type == OBJ_NONE || obj->type == OBJ_BLOB) &&
odb_read_object_info(r->objects, oid, NULL) == OBJ_BLOB) {
if (!skip_hash && stream_object_signature(r, repl) < 0) {
error(_("hash mismatch %s"), oid_to_hex(oid));
Expand All @@ -344,7 +344,7 @@ struct object *parse_object_with_flags(struct repository *r,
* have the on-disk object with the correct type.
*/
if (skip_hash && discard_tree &&
(!obj || obj->type == OBJ_TREE) &&
(!obj || obj->type == OBJ_NONE || obj->type == OBJ_TREE) &&
odb_read_object_info(r->objects, oid, NULL) == OBJ_TREE) {
return &lookup_tree(r, oid)->object;
}
Expand Down
3 changes: 2 additions & 1 deletion packfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,8 @@ static int add_promisor_object(const struct object_id *oid,
we_parsed_object = 0;
} else {
we_parsed_object = 1;
obj = parse_object(pack->repo, oid);
obj = parse_object_with_flags(pack->repo, oid,
PARSE_OBJECT_SKIP_HASH_CHECK);
}

if (!obj)
Expand Down