]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
4 years agostrbuf_addftime(): handle "%s" manually
Jeff King [Tue, 2 Nov 2021 11:35:34 +0000 (07:35 -0400)] 
strbuf_addftime(): handle "%s" manually

The strftime() function has a non-standard "%s" extension, which prints
the number of seconds since the epoch. But the "struct tm" we get has
already been adjusted for a particular time zone; going back to an epoch
time requires knowing that zone offset. Since strftime() doesn't take
such an argument, round-tripping to a "struct tm" and back to the "%s"
format may produce the wrong value (off by tz_offset seconds).

Since we're already passing in the zone offset courtesy of c3fbf81a85
(strbuf: let strbuf_addftime handle %z and %Z itself, 2017-06-15), we
can use that same value to adjust our epoch seconds accordingly.

Note that the description above makes it sound like strftime()'s "%s" is
useless (and really, the issue is shared by mktime(), which is what
strftime() would use under the hood). But it gets the two cases for
which it's designed correct:

  - the result of gmtime() will have a zero offset, so no adjustment is
    necessary

  - the result of localtime() will be offset by the local zone offset,
    and mktime() and strftime() are defined to assume this offset when
    converting back (there's actually some magic here; some
    implementations record this in the "struct tm", but we can't
    portably access or manipulate it. But they somehow "know" whether a
    "struct tm" is from gmtime() or localtime()).

This latter point means that "format-local:%s" actually works correctly
already, because in that case we rely on the system routines due to
6eced3ec5e (date: use localtime() for "-local" time formats,
2017-06-15). Our problem comes when trying to show times in the author's
zone, as the system routines provide no mechanism for converting in
non-local zones. So in those cases we have a "struct tm" that came from
gmtime(), but has been manipulated according to our offset.

The tests cover the broken round-trip by formatting "%s" for a time in a
non-system timezone. We use the made-up "+1234" here, which has two
advantages. One, we know it won't ever be the real system zone (and so
we're actually testing a case that would break). And two, since it has a
minute component, we're testing the full decoding of the +HHMM zone into
a number of seconds. Likewise, we test the "-1234" variant to make sure
there aren't any sign mistakes.

There's one final test, which covers "format-local:%s". As noted, this
already passes, but it's important to check that we didn't regress this
case. In particular, the caller in show_date() is relying on localtime()
to have done the zone adjustment, independent of any tz_offset we
compute ourselves. These should match up, since our local_tzoffset() is
likewise built around localtime(). But it would be easy for a caller to
forget to pass in a correct tz_offset to strbuf_addftime(). Fortunately
show_date() does this correctly (it has to because of the existing
handling of %z), and the test continues to pass. So this one is just
future-proofing against a change in our assumptions.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoA few fixes before -rc2
Junio C Hamano [Thu, 4 Nov 2021 19:24:46 +0000 (12:24 -0700)] 
A few fixes before -rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoSync with maint
Junio C Hamano [Thu, 4 Nov 2021 19:24:40 +0000 (12:24 -0700)] 
Sync with maint

4 years agoMerge branch 'vd/pthread-setspecific-g11-fix' into maint
Junio C Hamano [Thu, 4 Nov 2021 19:24:20 +0000 (12:24 -0700)] 
Merge branch 'vd/pthread-setspecific-g11-fix' into maint

One CI task based on Fedora image noticed a not-quite-kosher
consturct recently, which has been corrected.

* vd/pthread-setspecific-g11-fix:
  async_die_is_recursing: work around GCC v11.x issue on Fedora

4 years agoMerge branch 'ma/doc-git-version' into maint
Junio C Hamano [Thu, 4 Nov 2021 19:22:10 +0000 (12:22 -0700)] 
Merge branch 'ma/doc-git-version' into maint

Typofix.

* ma/doc-git-version:
  git.txt: fix typo

4 years agoMerge branch 'pw/rebase-r-fixes' into maint
Junio C Hamano [Thu, 4 Nov 2021 19:20:14 +0000 (12:20 -0700)] 
Merge branch 'pw/rebase-r-fixes' into maint

Regression fix.

* pw/rebase-r-fixes:
  rebase -i: fix rewording with --committer-date-is-author-date

4 years agoMerge branch 'jk/log-warn-on-bogus-encoding' into maint
Junio C Hamano [Thu, 4 Nov 2021 19:20:13 +0000 (12:20 -0700)] 
Merge branch 'jk/log-warn-on-bogus-encoding' into maint

Squelch over-eager warning message added during this cycle.

* jk/log-warn-on-bogus-encoding:
  log: document --encoding behavior on iconv() failure
  Revert "logmsg_reencode(): warn when iconv() fails"

4 years agoMerge branch 'vd/pthread-setspecific-g11-fix'
Junio C Hamano [Thu, 4 Nov 2021 19:07:47 +0000 (12:07 -0700)] 
Merge branch 'vd/pthread-setspecific-g11-fix'

One CI task based on Fedora image noticed a not-quite-kosher
consturct recently, which has been corrected.

* vd/pthread-setspecific-g11-fix:
  async_die_is_recursing: work around GCC v11.x issue on Fedora

4 years agoMerge branch 'rd/http-backend-code-simplification'
Junio C Hamano [Thu, 4 Nov 2021 19:07:46 +0000 (12:07 -0700)] 
Merge branch 'rd/http-backend-code-simplification'

Code simplification.

* rd/http-backend-code-simplification:
  http-backend: remove a duplicated code branch

4 years agoMerge branch 'ar/no-verify-doc'
Junio C Hamano [Thu, 4 Nov 2021 19:07:46 +0000 (12:07 -0700)] 
Merge branch 'ar/no-verify-doc'

Doc update.

* ar/no-verify-doc:
  Document positive variant of commit and merge option "--no-verify"

4 years agoMerge branch 'ar/fix-git-pull-no-verify'
Junio C Hamano [Thu, 4 Nov 2021 19:07:46 +0000 (12:07 -0700)] 
Merge branch 'ar/fix-git-pull-no-verify'

"git pull --no-verify" did not affect the underlying "git merge".

* ar/fix-git-pull-no-verify:
  pull: honor --no-verify and do not call the commit-msg hook

4 years agoci: disallow directional formatting
Johannes Schindelin [Thu, 4 Nov 2021 13:13:29 +0000 (13:13 +0000)] 
ci: disallow directional formatting

As described in https://trojansource.codes/trojan-source.pdf, it is
possible to abuse directional formatting (a feature of Unicode) to
deceive human readers into interpreting code differently from compilers.

For example, an "if ()" expression could be enclosed in a comment, but
rendered as if it was outside of that comment. In effect, this could
fool a reviewer into misinterpreting the code flow as benign when it is
not.

It is highly unlikely that Git's source code wants to contain such
directional formatting in the first place, so let's just disallow it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: zh_CN: 2.34.0 Round 2
Fangyi Zhou [Thu, 4 Nov 2021 11:02:05 +0000 (11:02 +0000)] 
l10n: zh_CN: 2.34.0 Round 2

Signed-off-by: Fangyi Zhou <me@fangyi.io>
4 years agol10n: tr: v2.34.0 round 2
Emir Sarı [Thu, 4 Nov 2021 10:19:12 +0000 (13:19 +0300)] 
l10n: tr: v2.34.0 round 2

Signed-off-by: Emir Sarı <bitigchi@me.com>
4 years agoasync_die_is_recursing: work around GCC v11.x issue on Fedora
Victoria Dye [Thu, 4 Nov 2021 04:01:03 +0000 (04:01 +0000)] 
async_die_is_recursing: work around GCC v11.x issue on Fedora

This fix corrects an issue found in the `dockerized(pedantic, fedora)` CI
build, first appearing after the introduction of a new version of the Fedora
docker image version. This image includes a version of `glibc` with the
attribute `__attr_access_none` added to `pthread_setspecific` [1], the
implementation of which only exists for GCC 11.X - the version included in
the Fedora image. The attribute requires that the pointer provided in the
second argument of `pthread_getspecific` must, if not NULL, be a pointer to
a valid object. In the usage in `async_die_is_recursing`, `(void *)1` is not
valid, causing the error.

This fix imitates a workaround added in SELinux [2] by using the pointer to
the static `async_die_counter` itself as the second argument to
`pthread_setspecific`. This guaranteed non-NULL, valid pointer matches the
intent of the current usage while not triggering the build error.

[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=a1561c3bbe8
[2] https://lore.kernel.org/all/20211021140519.6593-1-cgzones@googlemail.com/

Co-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Victoria Dye <vdye@github.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: git.pot: v2.34.0 round 2 (3 new, 3 removed)
Jiang Xin [Thu, 4 Nov 2021 00:35:51 +0000 (08:35 +0800)] 
l10n: git.pot: v2.34.0 round 2 (3 new, 3 removed)

Generate po/git.pot from v2.34.0-rc1 for git v2.34.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agoMerge branch 'master' of github.com:git/git
Jiang Xin [Thu, 4 Nov 2021 00:34:15 +0000 (08:34 +0800)] 
Merge branch 'master' of github.com:git/git

* 'master' of github.com:git/git:
  Git 2.34-rc1
  rebase -i: fix rewording with --committer-date-is-author-date
  dir: fix directory-matching bug
  gpg-interface: avoid buffer overrun in parse_ssh_output()
  gpg-interface: handle missing " with " gracefully in parse_ssh_output()
  A few more topics before -rc1
  i18n: fix typos found during l10n for git 2.34.0
  t5310: drop lib-bundle.sh include
  format-patch (doc): clarify --base=auto
  gc: perform incremental repack when implictly enabled
  fsck: verify multi-pack-index when implictly enabled
  fsck: verify commit graph when implicitly enabled
  grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data
  commit-graph: don't consider "replace" objects with "verify"
  commit-graph tests: fix another graph_git_two_modes() helper
  commit-graph tests: fix error-hiding graph_git_two_modes() helper
  pretty: colorize pattern matches in commit messages
  grep: refactor next_match() and match_one_pattern() for external use

4 years agoMerge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po
Jiang Xin [Thu, 4 Nov 2021 00:23:26 +0000 (08:23 +0800)] 
Merge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po

* 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po:
  l10n: zh-CN: v2.34.0 round 1

4 years agoGit 2.34-rc1 v2.34.0-rc1
Junio C Hamano [Wed, 3 Nov 2021 20:32:40 +0000 (13:32 -0700)] 
Git 2.34-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'pw/rebase-r-fixes'
Junio C Hamano [Wed, 3 Nov 2021 20:32:28 +0000 (13:32 -0700)] 
Merge branch 'pw/rebase-r-fixes'

Regression fix.

* pw/rebase-r-fixes:
  rebase -i: fix rewording with --committer-date-is-author-date

4 years agoMerge branch 'ds/add-rm-with-sparse-index'
Junio C Hamano [Wed, 3 Nov 2021 20:32:28 +0000 (13:32 -0700)] 
Merge branch 'ds/add-rm-with-sparse-index'

Regression fix.

* ds/add-rm-with-sparse-index:
  dir: fix directory-matching bug

4 years agoMerge branch 'jx/message-fixes'
Junio C Hamano [Wed, 3 Nov 2021 20:32:28 +0000 (13:32 -0700)] 
Merge branch 'jx/message-fixes'

Fixes to recently added messages.

* jx/message-fixes:
  i18n: fix typos found during l10n for git 2.34.0

4 years agoMerge branch 'rs/ssh-signing-fix'
Junio C Hamano [Wed, 3 Nov 2021 20:32:28 +0000 (13:32 -0700)] 
Merge branch 'rs/ssh-signing-fix'

Fixes to recently merged topic.

* rs/ssh-signing-fix:
  gpg-interface: avoid buffer overrun in parse_ssh_output()
  gpg-interface: handle missing " with " gracefully in parse_ssh_output()

4 years agovar: add GIT_DEFAULT_BRANCH variable
Thomas Weißschuh [Wed, 3 Nov 2021 20:17:02 +0000 (21:17 +0100)] 
var: add GIT_DEFAULT_BRANCH variable

Introduce the logical variable GIT_DEFAULT_BRANCH which represents the
the default branch name that will be used by "git init".

Currently this variable is equivalent to
    git config init.defaultbranch || 'master'

This however will break if at one point the default branch is changed as
indicated by `default_branch_name_advice` in `refs.c`.

By providing this command ahead of time users of git can make their
code forward-compatible.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoclean/smudge: allow clean filters to process extremely large files
Matt Cooper [Tue, 2 Nov 2021 15:46:11 +0000 (15:46 +0000)] 
clean/smudge: allow clean filters to process extremely large files

The filter system allows for alterations to file contents when they're
moved between the database and the worktree. We already made sure that
it is possible for smudge filters to produce contents that are larger
than `unsigned long` can represent (which matters on systems where
`unsigned long` is narrower than `size_t`, most notably 64-bit Windows).
Now we make sure that clean filters can _consume_ contents that are
larger than that.

Note that this commit only allows clean filters' _input_ to be larger
than can be represented by `unsigned long`.

This change makes only a very minute dent into the much larger project
to teach Git to use `size_t` instead of `unsigned long` wherever
appropriate.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Matt Cooper <vtbassmatt@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoodb: guard against data loss checking out a huge file
Matt Cooper [Tue, 2 Nov 2021 15:46:10 +0000 (15:46 +0000)] 
odb: guard against data loss checking out a huge file

This introduces an additional guard for platforms where `unsigned long`
and `size_t` are not of the same size. If the size of an object in the
database would overflow `unsigned long`, instead we now exit with an
error.

A complete fix will have to update _many_ other functions throughout the
codebase to use `size_t` instead of `unsigned long`. It will have to be
implemented at some stage.

This commit puts in a stop-gap for the time being.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Matt Cooper <vtbassmatt@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agogit-compat-util: introduce more size_t helpers
Johannes Schindelin [Tue, 2 Nov 2021 15:46:09 +0000 (15:46 +0000)] 
git-compat-util: introduce more size_t helpers

We will use them in the next commit.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoodb: teach read_blob_entry to use size_t
Matt Cooper [Tue, 2 Nov 2021 15:46:08 +0000 (15:46 +0000)] 
odb: teach read_blob_entry to use size_t

There is mixed use of size_t and unsigned long to deal with sizes in the
codebase. Recall that Windows defines unsigned long as 32 bits even on
64-bit platforms, meaning that converting size_t to unsigned long narrows
the range. This mostly doesn't cause a problem since Git rarely deals
with files larger than 2^32 bytes.

But adjunct systems such as Git LFS, which use smudge/clean filters to
keep huge files out of the repository, may have huge file contents passed
through some of the functions in entry.c and convert.c. On Windows, this
results in a truncated file being written to the workdir. I traced this to
one specific use of unsigned long in write_entry (and a similar instance
in write_pc_item_to_fd for parallel checkout). That appeared to be for
the call to read_blob_entry, which expects a pointer to unsigned long.

By altering the signature of read_blob_entry to expect a size_t,
write_entry can be switched to use size_t internally (which all of its
callers and most of its callees already used). To avoid touching dozens of
additional files, read_blob_entry uses a local unsigned long to call a
chain of functions which aren't prepared to accept size_t.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Matt Cooper <vtbassmatt@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot1051: introduce a smudge filter test for extremely large files
Matt Cooper [Tue, 2 Nov 2021 15:46:07 +0000 (15:46 +0000)] 
t1051: introduce a smudge filter test for extremely large files

The filter system allows for alterations to file contents when they're
added to the database or working tree. ("Smudge" when moving to the
working tree; "clean" when moving to the database.) This is used
natively to handle CRLF to LF conversions. It's also employed by Git-LFS
to replace large files from the working tree with small tracking files
in the repo and vice versa.

Git reads the entire smudged file into memory to convert it into a
"clean" form to be used in-core. While this is inefficient, there's a
more insidious problem on some platforms due to inconsistency between
using unsigned long and size_t for the same type of data (size of a file
in bytes). On most 64-bit platforms, unsigned long is 64 bits, and
size_t is typedef'd to unsigned long. On Windows, however, unsigned long
is only 32 bits (and therefore on 64-bit Windows, size_t is typedef'd to
unsigned long long in order to be 64 bits).

Practically speaking, this means 64-bit Windows users of Git-LFS can't
handle files larger than 2^32 bytes. Other 64-bit platforms don't suffer
this limitation.

This commit introduces a test exposing the issue; future commits make it
pass. The test simulates the way Git-LFS works by having a tiny file
checked into the repository and expanding it to a huge file on checkout.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Matt Cooper <vtbassmatt@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest-lib: add prerequisite for 64-bit platforms
Carlo Marcelo Arenas Belón [Tue, 2 Nov 2021 15:46:06 +0000 (15:46 +0000)] 
test-lib: add prerequisite for 64-bit platforms

Allow tests that assume a 64-bit `size_t` to be skipped in 32-bit
platforms and regardless of the size of `long`.

This imitates the `LONG_IS_64BIT` prerequisite.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest-tool genzeros: generate large amounts of data more efficiently
Johannes Schindelin [Tue, 2 Nov 2021 15:46:05 +0000 (15:46 +0000)] 
test-tool genzeros: generate large amounts of data more efficiently

In this developer's tests, producing one gigabyte worth of NULs in a
busy loop that writes out individual bytes, unbuffered, took ~27sec.
Writing chunked 256kB buffers instead only took ~0.6sec

This matters because we are about to introduce a pair of test cases that
want to be able to produce 5GB of NULs, and we cannot use `/dev/zero`
because of the HP NonStop platform's lack of support for that device.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest-genzeros: allow more than 2G zeros in Windows
Carlo Marcelo Arenas Belón [Tue, 2 Nov 2021 15:46:04 +0000 (15:46 +0000)] 
test-genzeros: allow more than 2G zeros in Windows

d5cfd142ec (tests: teach the test-tool to generate NUL bytes and
use it, 2019-02-14), add a way to generate zeroes in a portable
way without using /dev/zero (needed by HP NonStop), but uses a
long variable that is limited to 2^31 in Windows.

Use instead a (POSIX/C99) intmax_t that is at least 64bit wide
in 64-bit Windows to use in a future test.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorebase -i: fix rewording with --committer-date-is-author-date
Phillip Wood [Tue, 2 Nov 2021 21:30:51 +0000 (21:30 +0000)] 
rebase -i: fix rewording with --committer-date-is-author-date

baf8ec8d3a (rebase -r: don't write .git/MERGE_MSG when
fast-forwarding, 2021-08-20) stopped reading the author script in
run_git_commit() when rewording a commit. This is normally safe
because "git commit --amend" preserves the authorship. However if the
user passes "--committer-date-is-author-date" then we need to read the
author date from the author script when rewording. Fix this regression
by tightening the check for when it is safe to skip reading the author
script.

Reported-by: Jonas Kittner <jonas.kittner@ruhr-uni-bochum.de>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodir: fix directory-matching bug
Derrick Stolee [Tue, 2 Nov 2021 14:40:06 +0000 (10:40 -0400)] 
dir: fix directory-matching bug

This reverts the change from ed49584 (dir: fix pattern matching on dirs,
2021-09-24), which claimed to fix a directory-matching problem without a
test case. It turns out to _create_ a bug, but it is a bit subtle.

The bug would have been revealed by the first of two tests being added to
t0008-ignores.sh. The first uses a pattern "/git/" inside the a/.gitignores
file, which matches against 'a/git/foo' but not 'a/git-foo/bar'. This test
would fail before the revert.

The second test shows what happens if the test instead uses a pattern "git/"
and this test passes both before and after the revert.

The difference in these two cases are due to how
last_matching_pattern_from_list() checks patterns both if they have the
PATTERN_FLAG_MUSTBEDIR and PATTERN_FLAG_NODIR flags. In the case of "git/",
the PATTERN_FLAG_NODIR is also provided, making the change in behavior in
match_pathname() not affect the end result of
last_matching_pattern_from_list().

Reported-by: Glen Choo <chooglen@google.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: pl: Update translation
Arusekk [Wed, 29 Sep 2021 17:34:21 +0000 (19:34 +0200)] 
l10n: pl: Update translation

Signed-off-by: Arusekk <arek_koz@o2.pl>
4 years agol10n: zh-CN: v2.34.0 round 1
Fangyi Zhou [Tue, 2 Nov 2021 18:04:10 +0000 (18:04 +0000)] 
l10n: zh-CN: v2.34.0 round 1

Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Fangyi Zhou <me@fangyi.io>
4 years agogpg-interface: avoid buffer overrun in parse_ssh_output()
René Scharfe [Sat, 30 Oct 2021 17:07:38 +0000 (19:07 +0200)] 
gpg-interface: avoid buffer overrun in parse_ssh_output()

If the string "key" we found in the output of ssh-keygen happens to be
located at the very end of the line, then going four characters further
leaves us beyond the end of the string.  Explicitly search for the
space after "key" to handle a missing one gracefully.

Signed-off-by: René Scharfe <l.s.r@web.de>
Acked-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agogpg-interface: handle missing " with " gracefully in parse_ssh_output()
René Scharfe [Sat, 30 Oct 2021 17:04:56 +0000 (19:04 +0200)] 
gpg-interface: handle missing " with " gracefully in parse_ssh_output()

If the output of ssh-keygen starts with "Good \"git\" signature for ",
but is not followed by " with " for some reason, then parse_ssh_output()
uses -1 as the len parameter of xmemdupz(), which in turn will end the
program.  Reject the signature and carry on instead in that case.

Signed-off-by: René Scharfe <l.s.r@web.de>
Acked-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoA few more topics before -rc1
Junio C Hamano [Mon, 1 Nov 2021 20:33:18 +0000 (13:33 -0700)] 
A few more topics before -rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'ab/test-lib'
Junio C Hamano [Mon, 1 Nov 2021 20:48:08 +0000 (13:48 -0700)] 
Merge branch 'ab/test-lib'

Test (cosmetic) fix.

* ab/test-lib:
  t5310: drop lib-bundle.sh include

4 years agoMerge branch 'jc/doc-format-patch-clarify-auto-base'
Junio C Hamano [Mon, 1 Nov 2021 20:48:08 +0000 (13:48 -0700)] 
Merge branch 'jc/doc-format-patch-clarify-auto-base'

Rephrase the description of "format-patch --base=auto".

* jc/doc-format-patch-clarify-auto-base:
  format-patch (doc): clarify --base=auto

4 years agoMerge branch 'gc/use-repo-settings'
Junio C Hamano [Mon, 1 Nov 2021 20:48:08 +0000 (13:48 -0700)] 
Merge branch 'gc/use-repo-settings'

It is wrong to read some settings directly from the config
subsystem, as things like feature.experimental can affect their
default values.

* gc/use-repo-settings:
  gc: perform incremental repack when implictly enabled
  fsck: verify multi-pack-index when implictly enabled
  fsck: verify commit graph when implicitly enabled

4 years agoMerge branch 'ab/ignore-replace-while-working-on-commit-graph'
Junio C Hamano [Mon, 1 Nov 2021 20:48:08 +0000 (13:48 -0700)] 
Merge branch 'ab/ignore-replace-while-working-on-commit-graph'

Teach "git commit-graph" command not to allow using replace objects
at all, as we do not use the commit-graph at runtime when we see
object replacement.

* ab/ignore-replace-while-working-on-commit-graph:
  commit-graph: don't consider "replace" objects with "verify"
  commit-graph tests: fix another graph_git_two_modes() helper
  commit-graph tests: fix error-hiding graph_git_two_modes() helper

4 years agoMerge branch 'hm/paint-hits-in-log-grep'
Junio C Hamano [Mon, 1 Nov 2021 20:48:08 +0000 (13:48 -0700)] 
Merge branch 'hm/paint-hits-in-log-grep'

"git log --grep=string --author=name" learns to highlight hits just
like "git grep string" does.

* hm/paint-hits-in-log-grep:
  grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data
  pretty: colorize pattern matches in commit messages
  grep: refactor next_match() and match_one_pattern() for external use

4 years agoleak tests: mark some fast-import tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:24 +0000 (00:24 +0200)] 
leak tests: mark some fast-import tests as passing with SANITIZE=leak

Mark some tests that match "*fast-import*" as passing when git is
compiled with SANITIZE=leak. They'll now be listed as running under
the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks"
CI target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some config tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:23 +0000 (00:24 +0200)] 
leak tests: mark some config tests as passing with SANITIZE=leak

Mark some tests that match "*config*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some status tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:22 +0000 (00:24 +0200)] 
leak tests: mark some status tests as passing with SANITIZE=leak

Mark some tests that match "*status*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some clone tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:21 +0000 (00:24 +0200)] 
leak tests: mark some clone tests as passing with SANITIZE=leak

Mark some tests that match "*clone*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some add tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:20 +0000 (00:24 +0200)] 
leak tests: mark some add tests as passing with SANITIZE=leak

Mark some tests that match "*add*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some diff tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:19 +0000 (00:24 +0200)] 
leak tests: mark some diff tests as passing with SANITIZE=leak

Mark some tests that match "*diff*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some apply tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:18 +0000 (00:24 +0200)] 
leak tests: mark some apply tests as passing with SANITIZE=leak

Mark some tests that match "*apply*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some notes tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:17 +0000 (00:24 +0200)] 
leak tests: mark some notes tests as passing with SANITIZE=leak

Mark some tests that match "*notes*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some update-index tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:16 +0000 (00:24 +0200)] 
leak tests: mark some update-index tests as passing with SANITIZE=leak

Mark some tests that match "*update-index*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some rev-parse tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:15 +0000 (00:24 +0200)] 
leak tests: mark some rev-parse tests as passing with SANITIZE=leak

Mark some tests that match "*rev-parse*" as passing when git is
compiled with SANITIZE=leak. They'll now be listed as running under
the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks"
CI target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some rev-list tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:14 +0000 (00:24 +0200)] 
leak tests: mark some rev-list tests as passing with SANITIZE=leak

Mark some tests that match "*rev-list*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark some misc tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:13 +0000 (00:24 +0200)] 
leak tests: mark some misc tests as passing with SANITIZE=leak

As in 7ff24785cb7 (leak tests: mark some misc tests as passing with
SANITIZE=leak, 2021-10-12) continue marking various miscellaneous
tests as passing when git is compiled with SANITIZE=leak. They'll now
be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true"
test mode (the "linux-leaks" CI target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark most gettext tests as passing with SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:12 +0000 (00:24 +0200)] 
leak tests: mark most gettext tests as passing with SANITIZE=leak

Mark all but one tests that match "*gettext*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

In the case of "t0202-gettext-perl.sh" this isn't very meaningful as
most of the work is on the Perl side, but let's mark it anyway.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark "sort" test as passing SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:11 +0000 (00:24 +0200)] 
leak tests: mark "sort" test as passing SANITIZE=leak

Mark a test that was recently added in e031e9719d2 (test-mergesort:
add test subcommand, 2021-10-01) as passing with SANITIZE=leak. It
will now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoleak tests: mark a read-tree test as passing SANITIZE=leak
Ævar Arnfjörð Bjarmason [Sat, 30 Oct 2021 22:24:10 +0000 (00:24 +0200)] 
leak tests: mark a read-tree test as passing SANITIZE=leak

The "t1002-read-tree-m-u-2way.sh" test has passed under SANITIZE=leak
since 04988c8d182 (unpack-trees: introduce preserve_ignored to
unpack_trees_options, 2021-09-27) was combined with
e5a917fcf42 (unpack-trees: don't leak memory in
verify_clean_subdirectory(), 2021-10-07), but as both were in-flight
at the time neither could mark it as passing.

It will now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopretty: add abbrev option to %(describe)
Eli Schwartz [Sun, 31 Oct 2021 17:15:10 +0000 (13:15 -0400)] 
pretty: add abbrev option to %(describe)

The %(describe) placeholder by default, like `git describe`, uses a
seven-character abbreviated commit object name. This may not be
sufficient to fully describe all commits in a given repository,
resulting in a placeholder replacement changing its length because the
repository grew in size.  This could cause the output of git-archive to
change.

Add the --abbrev option to `git describe` to the placeholder interface
in order to provide tools to the user for fine-tuning project defaults
and ensure reproducible archives.

One alternative would be to just always specify --abbrev=40 but this may
be a bit too biased...

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopretty: add tag option to %(describe)
Eli Schwartz [Sun, 31 Oct 2021 17:15:09 +0000 (13:15 -0400)] 
pretty: add tag option to %(describe)

The %(describe) placeholder by default, like `git describe`, only
supports annotated tags. However, some people do use lightweight tags
for releases, and would like to describe those anyway. The command line
tool has an option to support this.

Teach the placeholder to support this as well.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopretty.c: rework describe options parsing for better extensibility
Eli Schwartz [Sun, 31 Oct 2021 17:15:08 +0000 (13:15 -0400)] 
pretty.c: rework describe options parsing for better extensibility

It contains option arguments only, not options. We would like to add
option support here too, but to do that we need to distinguish between
different types of options.

Lay out the groundwork for distinguishing between bools, strings, etc.
and move the central logic (validating values and pushing new arguments
to *args) into the successful match, because that will be fairly
conditional on what type of argument is being parsed.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: pt_PT: cleaning duplicate translations (#2)
Daniel Santos [Wed, 11 Aug 2021 18:29:16 +0000 (19:29 +0100)] 
l10n: pt_PT: cleaning duplicate translations (#2)

 * cleaning duplicate incorrect translations part 2
 * update translation table
 * unfuzzy all entries
 * typos check in git commands and git flags
 * random line translations
 * updating all phrases #1

Signed-off-by: Daniel Santos <daniel@brilhante.top>
4 years agol10n: po-id for 2.34 (round 1)
Bagas Sanjaya [Mon, 1 Nov 2021 10:25:42 +0000 (17:25 +0700)] 
l10n: po-id for 2.34 (round 1)

Update following components:
  * add-interactive.c
  * add-patch.c
  * diff.c
  * gc.c
  * builtin/bisect--helper.c
  * builtin/commit.c
  * builtin/fetch.c
  * builtin/merge.c
  * builtin/rebase.c
  * builtin/pull.c
  * builtin/push.c
  * builtin/submodule--helper.c

Translate following new components:
  * apply.c
  * bundle.c
  * git.c
  * git-send-email.perl
  * rerere.c
  * builtin/am.c
  * builtin/apply.c
  * builtin/archive.c
  * builtin/bundle.c
  * builtin/cat-file.c
  * builtin/commit-tree.c
  * builtin/count-objects.c
  * builtin/difftool.c
  * builtin/fast-export.c
  * builtin/fast-import.c
  * builtin/fetch-pack.c
  * builtin/fsck.c
  * builtin/gc.c
  * builtin/hash-object.c
  * builtin/ls-files.c
  * builtin/ls-remote.c
  * builtin/ls-tree.c
  * builtin/read-tree.c
  * builtin/receive-pack.c
  * builtin/reflog.c
  * builtin/repack.c
  * builtin/rev-list.c
  * builtin/rev-parse.c
  * builtin/send-pack.c
  * builtin/symbolic-ref.c
  * builtin/update-index.c
  * builtin/update-ref.c
  * builtin/upload-pack.c
  * builtin/verify-pack.c
  * builtin/verify-commit.c
  * builtin/verify-tag.c
  * builtin/write-tree.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
4 years agoi18n: fix typos found during l10n for git 2.34.0
Jiang Xin [Mon, 1 Nov 2021 02:14:17 +0000 (10:14 +0800)] 
i18n: fix typos found during l10n for git 2.34.0

Emir and Jean-Noël reported typos in some i18n messages when preparing
l10n for git 2.34.0.

* Fix unstable spelling of config variable "gpg.ssh.defaultKeyCommand"
  which was introduced in commit fd9e226776 (ssh signing: retrieve a
  default key from ssh-agent, 2021-09-10).

* Add missing space between "with" and "--python" which was introduced
  in commit bd0708c7eb (ref-filter: add %(raw) atom, 2021-07-26).

* Fix unmatched single quote in 'builtin/index-pack.c' which was
  introduced in commit 8737dab346 (index-pack: refactor renaming in
  final(), 2021-09-09)

[1] https://github.com/git-l10n/git-po/pull/567

Reported-by: Emir Sarı <bitigchi@me.com>
Reported-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'fr_2.34.0_rnd1' of github.com:jnavila/git
Jiang Xin [Mon, 1 Nov 2021 01:49:18 +0000 (09:49 +0800)] 
Merge branch 'fr_2.34.0_rnd1' of github.com:jnavila/git

* 'fr_2.34.0_rnd1' of github.com:jnavila/git:
  l10n: fr v2.34.0 rnd1

4 years agol10n: fr v2.34.0 rnd1
Jean-Noël Avila [Sun, 31 Oct 2021 16:42:35 +0000 (17:42 +0100)] 
l10n: fr v2.34.0 rnd1

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
4 years agol10n: tr: v2.34.0 round 1
Emir Sarı [Sat, 30 Oct 2021 18:07:51 +0000 (21:07 +0300)] 
l10n: tr: v2.34.0 round 1

Signed-off-by: Emir Sarı <bitigchi@me.com>
4 years agol10n: Update Catalan translation
Jordi Mas [Sat, 30 Oct 2021 07:54:25 +0000 (09:54 +0200)] 
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
4 years agol10n: git.pot: v2.34.0 round 1 (134 new, 154 removed)
Jiang Xin [Sat, 30 Oct 2021 01:37:04 +0000 (09:37 +0800)] 
l10n: git.pot: v2.34.0 round 1 (134 new, 154 removed)

Generate po/git.pot from v2.34.0-rc0 for git v2.34.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agoMerge branch 'master' of github.com:git/git
Jiang Xin [Sat, 30 Oct 2021 01:34:30 +0000 (09:34 +0800)] 
Merge branch 'master' of github.com:git/git

* 'master' of github.com:git/git: (762 commits)
  Git 2.34-rc0
  wrapper: remove xunsetenv()
  log: document --encoding behavior on iconv() failure
  Revert "logmsg_reencode(): warn when iconv() fails"
  completion: fix incorrect bash/zsh string equality check
  add, rm, mv: fix bug that prevents the update of non-sparse dirs
  git-bundle.txt: add missing words and punctuation
  Documentation/Makefile: fix lint-docs mkdir dependency
  submodule: drop unused sm_name parameter from append_fetch_remotes()
  The fifteenth batch
  gitweb.txt: change "folder" to "directory"
  gitignore.txt: change "folder" to "directory"
  git-multi-pack-index.txt: change "folder" to "directory"
  git.txt: fix typo
  archive: describe compression level option
  config.txt: fix typo
  command-list.txt: remove 'sparse-index' from main help
  userdiff-cpp: back out the digit-separators in numbers
  submodule--helper: fix incorrect newlines in an error message
  branch (doc): -m/-c copies config and reflog
  ...

4 years agoGit 2.34-rc0 v2.34.0-rc0
Junio C Hamano [Fri, 29 Oct 2021 22:43:50 +0000 (15:43 -0700)] 
Git 2.34-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 're/completion-fix-test-equality'
Junio C Hamano [Fri, 29 Oct 2021 22:43:16 +0000 (15:43 -0700)] 
Merge branch 're/completion-fix-test-equality'

Fix long-standing shell syntax error in the completion script.

* re/completion-fix-test-equality:
  completion: fix incorrect bash/zsh string equality check

4 years agoMerge branch 'mt/fix-add-rm-with-sparse-index'
Junio C Hamano [Fri, 29 Oct 2021 22:43:16 +0000 (15:43 -0700)] 
Merge branch 'mt/fix-add-rm-with-sparse-index'

Fix-up to a topic already merged to 'master'.

* mt/fix-add-rm-with-sparse-index:
  add, rm, mv: fix bug that prevents the update of non-sparse dirs

4 years agoMerge branch 'cm/drop-xunsetenv'
Junio C Hamano [Fri, 29 Oct 2021 22:43:15 +0000 (15:43 -0700)] 
Merge branch 'cm/drop-xunsetenv'

Drop a helper function that has never been used since its addition.

* cm/drop-xunsetenv:
  wrapper: remove xunsetenv()

4 years agoMerge branch 'jk/log-warn-on-bogus-encoding'
Junio C Hamano [Fri, 29 Oct 2021 22:43:15 +0000 (15:43 -0700)] 
Merge branch 'jk/log-warn-on-bogus-encoding'

Squelch over-eager warning message added during this cycle.

* jk/log-warn-on-bogus-encoding:
  log: document --encoding behavior on iconv() failure
  Revert "logmsg_reencode(): warn when iconv() fails"

4 years agoMerge branch 'ab/unbundle-progress'
Junio C Hamano [Fri, 29 Oct 2021 22:43:15 +0000 (15:43 -0700)] 
Merge branch 'ab/unbundle-progress'

Doc clarification.

* ab/unbundle-progress:
  git-bundle.txt: add missing words and punctuation

4 years agoMerge branch 'jc/branch-copy-doc'
Junio C Hamano [Fri, 29 Oct 2021 22:43:15 +0000 (15:43 -0700)] 
Merge branch 'jc/branch-copy-doc'

"git branch -c/-m new old" was not described to copy config, which
has been corrected.

* jc/branch-copy-doc:
  branch (doc): -m/-c copies config and reflog

4 years agoMerge branch 'ma/doc-folder-to-directory'
Junio C Hamano [Fri, 29 Oct 2021 22:43:15 +0000 (15:43 -0700)] 
Merge branch 'ma/doc-folder-to-directory'

Consistently use 'directory', not 'folder', to call the filesystem
entity that collects a group of files and, eh, directories.

* ma/doc-folder-to-directory:
  gitweb.txt: change "folder" to "directory"
  gitignore.txt: change "folder" to "directory"
  git-multi-pack-index.txt: change "folder" to "directory"

4 years agoMerge branch 'sg/sparse-index-not-that-common-a-command'
Junio C Hamano [Fri, 29 Oct 2021 22:43:14 +0000 (15:43 -0700)] 
Merge branch 'sg/sparse-index-not-that-common-a-command'

Drop "git sparse-index" from the list of common commands.

* sg/sparse-index-not-that-common-a-command:
  command-list.txt: remove 'sparse-index' from main help

4 years agoMerge branch 'ma/doc-git-version'
Junio C Hamano [Fri, 29 Oct 2021 22:43:14 +0000 (15:43 -0700)] 
Merge branch 'ma/doc-git-version'

Typofix.

* ma/doc-git-version:
  git.txt: fix typo

4 years agoMerge branch 'js/expand-runtime-prefix'
Junio C Hamano [Fri, 29 Oct 2021 22:43:14 +0000 (15:43 -0700)] 
Merge branch 'js/expand-runtime-prefix'

Typofix.

* js/expand-runtime-prefix:
  config.txt: fix typo

4 years agoMerge branch 'bs/archive-doc-compression-level'
Junio C Hamano [Fri, 29 Oct 2021 22:43:14 +0000 (15:43 -0700)] 
Merge branch 'bs/archive-doc-compression-level'

Update "git archive" documentation and give explicit mention on the
compression level for both zip and tar.gz format.

* bs/archive-doc-compression-level:
  archive: describe compression level option

4 years agoMerge branch 'ks/submodule-add-message-fix'
Junio C Hamano [Fri, 29 Oct 2021 22:43:14 +0000 (15:43 -0700)] 
Merge branch 'ks/submodule-add-message-fix'

Message regression fix.

* ks/submodule-add-message-fix:
  submodule: drop unused sm_name parameter from append_fetch_remotes()
  submodule--helper: fix incorrect newlines in an error message

4 years agoMerge branch 'ab/fix-make-lint-docs'
Junio C Hamano [Fri, 29 Oct 2021 22:43:13 +0000 (15:43 -0700)] 
Merge branch 'ab/fix-make-lint-docs'

Hotfix for a topic recently merged to 'master'.

* ab/fix-make-lint-docs:
  Documentation/Makefile: fix lint-docs mkdir dependency

4 years agoMerge branch 'ab/sh-retire-rebase-preserve-merges'
Junio C Hamano [Fri, 29 Oct 2021 22:43:13 +0000 (15:43 -0700)] 
Merge branch 'ab/sh-retire-rebase-preserve-merges'

Code clean-up to remove unused helpers.

* ab/sh-retire-rebase-preserve-merges:
  git-sh-setup: remove messaging supporting --preserve-merges
  git-sh-i18n: remove unused eval_ngettext()

4 years agoMerge branch 'ab/plug-random-leaks'
Junio C Hamano [Fri, 29 Oct 2021 22:43:13 +0000 (15:43 -0700)] 
Merge branch 'ab/plug-random-leaks'

Leakfix.

* ab/plug-random-leaks:
  reflog: free() ref given to us by dwim_log()
  submodule--helper: fix small memory leaks
  clone: fix a memory leak of the "git_dir" variable
  grep: fix a "path_list" memory leak
  grep: use object_array_clear() in cmd_grep()
  grep: prefer "struct grep_opt" over its "void *" equivalent

4 years agoMerge branch 'ab/plug-handle-path-exclude-leak'
Junio C Hamano [Fri, 29 Oct 2021 22:43:12 +0000 (15:43 -0700)] 
Merge branch 'ab/plug-handle-path-exclude-leak'

Leakfix.

* ab/plug-handle-path-exclude-leak:
  config.c: don't leak memory in handle_path_include()

4 years agoMerge branch 'ab/ref-filter-leakfix'
Junio C Hamano [Fri, 29 Oct 2021 22:43:12 +0000 (15:43 -0700)] 
Merge branch 'ab/ref-filter-leakfix'

"git for-each-ref" family of commands were leaking the ref_sorting
instances that hold sorting keys specified by the user; this has
been corrected.

* ab/ref-filter-leakfix:
  branch: use ref_sorting_release()
  ref-filter API user: add and use a ref_sorting_release()
  tag: use a "goto cleanup" pattern, leak less memory

4 years agoMerge branch 'jk/http-push-status-fix'
Junio C Hamano [Fri, 29 Oct 2021 22:43:12 +0000 (15:43 -0700)] 
Merge branch 'jk/http-push-status-fix'

"git push" client talking to an HTTP server did not diagnose the
lack of the final status report from the other side correctly,
which has been corrected.

* jk/http-push-status-fix:
  transport-helper: recognize "expecting report" error from send-pack
  send-pack: complain about "expecting report" with --helper-status

4 years agoMerge branch 'ab/test-bail'
Junio C Hamano [Fri, 29 Oct 2021 22:43:12 +0000 (15:43 -0700)] 
Merge branch 'ab/test-bail'

A new feature has been added to abort early in the test framework.

* ab/test-bail:
  test-lib.sh: use "Bail out!" syntax on bad SANITIZE=leak use
  test-lib.sh: de-duplicate error() teardown code

4 years agoMerge branch 'ab/make-sparse-for-real'
Junio C Hamano [Fri, 29 Oct 2021 22:43:12 +0000 (15:43 -0700)] 
Merge branch 'ab/make-sparse-for-real'

Fix-up for a recent topic.

* ab/make-sparse-for-real:
  Makefile: remove redundant GIT-CFLAGS dependency from "sparse"

4 years agoMerge branch 'bs/doc-blame-color-lines'
Junio C Hamano [Fri, 29 Oct 2021 22:43:12 +0000 (15:43 -0700)] 
Merge branch 'bs/doc-blame-color-lines'

Doc fix.

* bs/doc-blame-color-lines:
  git config doc: fix recent ASCIIDOC formatting regression

4 years agounsetenv(3) returns int, not void
Junio C Hamano [Fri, 29 Oct 2021 21:42:12 +0000 (14:42 -0700)] 
unsetenv(3) returns int, not void

This compatilibity implementation has been returning a wrong type,
ever since 731043fd (Add compat/unsetenv.c ., 2006-01-25) added to
the system, yet nobody noticed it in the past 16 years, presumably
because no code checks failures in their unsetenv() calls.  Sigh.

For now, make it always succeed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agowrapper: remove xunsetenv()
Carlo Marcelo Arenas Belón [Fri, 29 Oct 2021 21:27:05 +0000 (14:27 -0700)] 
wrapper: remove xunsetenv()

Remove the unused wrapper function.

Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agolog: document --encoding behavior on iconv() failure
Jeff King [Fri, 29 Oct 2021 21:10:03 +0000 (17:10 -0400)] 
log: document --encoding behavior on iconv() failure

We already note that we may produce invalid output when we skip calling
iconv() altogether. But we may also do so if iconv() fails, and we have
no good alternative. Let's document this to avoid surprising users.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoRevert "logmsg_reencode(): warn when iconv() fails"
Junio C Hamano [Fri, 29 Oct 2021 20:48:58 +0000 (13:48 -0700)] 
Revert "logmsg_reencode(): warn when iconv() fails"

This reverts commit fd680bc5 (logmsg_reencode(): warn when iconv()
fails, 2021-08-27).  Throwing a warning for each and every commit
that gets reencoded, without allowing a way to squelch, would make
it unpleasant for folks who have to deal with an ancient part of the
history in an old project that used wrong encoding in the commits.

4 years agodocs: add headers in MyFirstObjectWalk
John Cai [Fri, 29 Oct 2021 19:52:43 +0000 (19:52 +0000)] 
docs: add headers in MyFirstObjectWalk

In several places, headers need to be included or else the code won't
compile. Since this is the first object walk, it would be nice to
include them in the tutorial to make it easier to follow.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodocs: fix places that break compilation in MyFirstObjectWalk
John Cai [Fri, 29 Oct 2021 19:52:42 +0000 (19:52 +0000)] 
docs: fix places that break compilation in MyFirstObjectWalk

Two errors in the example code caused compilation failures due to
a missing semicolon as well as initialization with an empty struct.
This commit fixes that to make the MyFirstObjectWalk tutorial easier to
follow.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocument positive variant of commit and merge option "--no-verify"
Alex Riesen [Fri, 29 Oct 2021 13:45:45 +0000 (15:45 +0200)] 
Document positive variant of commit and merge option "--no-verify"

This documents "--verify" option of the commands. It can be used to re-enable
the hooks disabled by an earlier "--no-verify" in command-line.

Signed-off-by: Alexander Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>