]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
2 years agorefs API: don't expose "errno" in run_transaction_hook()
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:25 +0000 (11:39 +0200)] 
refs API: don't expose "errno" in run_transaction_hook()

In run_transaction_hook() we've checked errno since 67541597670 (refs:
implement reference transaction hook, 2020-06-19), let's reset errno
afterwards to make sure nobody using refs.c directly or indirectly
relies on it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make expand_ref() & repo_dwim_log() not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:24 +0000 (11:39 +0200)] 
refs API: make expand_ref() & repo_dwim_log() not set errno

The use of these two is rather trivial, and it's easy to see none of
their callers care about errno. So let's move them from
refs_resolve_ref_unsafe() to refs_resolve_ref_unsafe_with_errno(),
these were the last two callers, so we can get rid of that wrapper
function.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make resolve_ref_unsafe() not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:23 +0000 (11:39 +0200)] 
refs API: make resolve_ref_unsafe() not set errno

Change the resolve_ref_unsafe() wrapper function to use the underlying
refs_werrres_ref_unsafe() directly.

From a reading of the callers I determined that the only one who cared
about errno was a sequencer.c caller added in e47c6cafcb5 (commit:
move print_commit_summary() to libgit, 2017-11-24), I'm migrating it
to using refs_werrres_ref_unsafe() directly.

This adds another "set errno" instance, but in this case it's OK and
idiomatic. We are setting it just before calling die_errno(). We could
have some hypothetical die_errno_var(&saved_errno, ...) here, but I
don't think it's worth it. The problem with errno is subtle action at
distance, not this sort of thing. We already use this pattern in a
couple of places in wrapper.c

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make refs_ref_exists() not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:22 +0000 (11:39 +0200)] 
refs API: make refs_ref_exists() not set errno

Move refs_ref_exists from the legacy refs_resolve_ref_unsafe() to the
new refs_werrres_ref_unsafe(). I have read its callers and determined
that they don't care about errno being set, in particular:

    git grep -W -w -e refs_ref_exists -e ref_exists

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make refs_resolve_refdup() not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:21 +0000 (11:39 +0200)] 
refs API: make refs_resolve_refdup() not set errno

Move refs_resolve_refdup() from the legacy refs_resolve_ref_unsafe()
to the new refs_werrres_ref_unsafe(). I have read its callers and
determined that they don't care about errno being set.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs tests: ignore ignore errno in test-ref-store helper
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:20 +0000 (11:39 +0200)] 
refs tests: ignore ignore errno in test-ref-store helper

The cmd_resolve_ref() function has always ignored errno on failure,
but let's do so explicitly when using the refs_resolve_ref_unsafe()
function.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: ignore errno in worktree.c's find_shared_symref()
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:19 +0000 (11:39 +0200)] 
refs API: ignore errno in worktree.c's find_shared_symref()

There are only handful of callers of find_shared_symref(), none of
whom care about errno, so let's migrate to the non-errno-propagating
version of refs_resolve_ref_unsafe() and explicitly ignore errno here.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: ignore errno in worktree.c's add_head_info()
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:18 +0000 (11:39 +0200)] 
refs API: ignore errno in worktree.c's add_head_info()

The static add_head_info() function is only used indirectly by callers
of get_worktrees(), none of whom care about errno, and even if they
did having the faked-up one from refs_resolve_ref_unsafe() would only
confuse them if they used die_errno() et al. So let's explicitly
ignore it here.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make files_copy_or_rename_ref() et al not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:17 +0000 (11:39 +0200)] 
refs API: make files_copy_or_rename_ref() et al not set errno

None of the callers of rename_ref() and copy_ref() care about errno,
and as seen in the context here we already emit our own non-errno
using error() in the case where we'd use it.

So let's have it explicitly ignore errno, and do the same in
commit_ref_update(), which is only used within other code in
files_copy_or_rename_ref() itself which doesn't care about errno
either.

It might actually be sensible to have the callers use errno if the
failure was filesystem-specific, and with the upcoming reftable
backend we don't want to rely on that sort of thing, so let's keep
ignoring that for now.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make loose_fill_ref_dir() not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:16 +0000 (11:39 +0200)] 
refs API: make loose_fill_ref_dir() not set errno

Change the refs_resolve_ref_unsafe() invoked in loose_fill_ref_dir()
to a form that ignores errno. The only eventual caller of this
function is create_ref_cache(), whose callers in turn don't have their
failure depend on any errno set here.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make resolve_gitlink_ref() not set errno
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:15 +0000 (11:39 +0200)] 
refs API: make resolve_gitlink_ref() not set errno

I have carefully read the upstream callers of resolve_gitlink_ref()
and determined that they don't care about errno.

So let's move away from the errno-setting refs_resolve_ref_unsafe()
wrapper to refs_werrres_ref_unsafe(), and explicitly ignore the errno
it sets for us.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: remove refs_read_ref_full() wrapper
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:14 +0000 (11:39 +0200)] 
refs API: remove refs_read_ref_full() wrapper

Remove the refs_read_ref_full() wrapper in favor of migrating various
refs.c API users to the underlying refs_werrres_ref_unsafe() function.

A careful reading of these callers shows that the callers of this
function did not care about "errno", by moving away from the
refs_resolve_ref_unsafe() wrapper we can be sure that nothing relies
on it anymore.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs/files: remove "name exist?" check in lock_ref_oid_basic()
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:13 +0000 (11:39 +0200)] 
refs/files: remove "name exist?" check in lock_ref_oid_basic()

In lock_ref_oid_basic() we'll happily lock a reference that doesn't
exist yet. That's normal, and is how references are initially born,
but we don't need to retain checks here in lock_ref_oid_basic() about
the state of the ref, when what we're checking is either checked
already, or something we're about to discover by trying to lock the
ref with raceproof_create_file().

The one exception is the caller in files_reflog_expire(), who passes
us a "type" to find out if the reference is a symref or not. We can
move the that logic over to that caller, which can now defer its
discovery of whether or not the ref is a symref until it's needed. In
the preceding commit an exhaustive regression test was added for that
case in a new test in "t1417-reflog-updateref.sh".

The improved diagnostics here were added in
5b2d8d6f218 (lock_ref_sha1_basic(): improve diagnostics for ref D/F
conflicts, 2015-05-11), and then much of the surrounding code went
away recently in my 245fbba46d6 (refs/files: remove unused "errno ==
EISDIR" code, 2021-08-23).

The refs_resolve_ref_unsafe() code being removed here looks like it
should be tasked with doing that, but it's actually redundant to other
code.

The reason for that is as noted in 245fbba46d6 this once widely used
function now only has a handful of callers left, which all handle this
case themselves.

To the extent that we're racy between their check and ours removing
this check actually improves the situation, as we'll be doing fewer
things between the not-under-lock initial check and acquiring the
lock.

Why this is OK for all the remaining callers of lock_ref_oid_basic()
is noted below. There are only two of those callers:

* "git branch -[cm] <oldbranch> <newbranch>":

  In files_copy_or_rename_ref() we'll call this when we copy or rename
  refs via rename_ref() and copy_ref(). but only after we've checked
  if the refname exists already via its own call to
  refs_resolve_ref_unsafe() and refs_rename_ref_available().

  As the updated comment to the latter here notes neither of those are
  actually needed. If we delete not only this code but also
  refs_rename_ref_available() we'll do just fine, we'll just emit a
  less friendly error message if e.g. "git branch -m A B/C" would have
  a D/F conflict with a "B" file.

  Actually we'd probably die before that in case reflogs for the
  branch existed, i.e. when the try to rename() or copy_file() the
  relevant reflog, since if we've got a D/F conflict with a branch
  name we'll probably also have the same with its reflogs (but not
  necessarily, we might have reflogs, but it might not).

  As some #leftoverbits that code seems buggy to me, i.e. the reflog
  "protocol" should be to get a lock on the main ref, and then perform
  ref and/or reflog operations. That code dates back to
  c976d415e53 (git-branch: add options and tests for branch renaming,
  2006-11-28) and probably pre-dated the solidifying of that
  convention. But in any case, that edge case is not our bug or
  problem right now.

* "git reflog expire <ref>":

  In files_reflog_expire() we'll call this without previous ref
  existence checking in files-backend.c, but that code is in turn
  called by code that's just finished checking if the refname whose
  reflog we're expiring exists.

  See ae35e16cd43 (reflog expire: don't lock reflogs using previously
  seen OID, 2021-08-23) for the current state of that code, and
  5e6f003ca8a (reflog_expire(): ignore --updateref for symbolic
  references, 2015-03-03) for the code we'd break if we only did a
  "update = !!ref" here, which is covered by the aforementioned
  regression test in "t1417-reflog-updateref.sh".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoreflog tests: add --updateref tests
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:12 +0000 (11:39 +0200)] 
reflog tests: add --updateref tests

Add tests that cover blindspots in "git reflog delete --updateref"
behavior. Before this change removing the "type & REF_ISSYMREF" check
added in 5e6f003ca8a (reflog_expire(): ignore --updateref for symbolic
references, 2015-03-03) would not fail any tests.

The "--updateref" option was added in 55f10565371 (git-reflog: add
option --updateref to write the last reflog sha1 into the ref,
2008-02-22) for use in git-stash.sh, see e25d5f9c82e (git-stash: add
new 'drop' subcommand, 2008-02-22).

Even though the regression test I need is just the "C" case here,
let's test all these combinations for good measure. I started out
doing these as a for-loop, but I think this is more readable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make refs_rename_ref_available() static
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:11 +0000 (11:39 +0200)] 
refs API: make refs_rename_ref_available() static

Move the refs_rename_ref_available() function into
"refs/files-backend.c". It is file-backend specific.

This function was added in 5fe7d825da8 (refs.c: pass a list of names
to skip to is_refname_available, 2014-05-01) as rename_ref_available()
and was only ever used in this one file-backend specific codepath. So
let's move it there.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make parse_loose_ref_contents() not set errno
Han-Wen Nienhuys [Sat, 16 Oct 2021 09:39:10 +0000 (11:39 +0200)] 
refs API: make parse_loose_ref_contents() not set errno

Change the parse_loose_ref_contents() function to stop setting "errno"
and failure, and to instead pass up a "failure_errno" via a
parameter. This requires changing its callers to do the same.

The EINVAL error from parse_loose_ref_contents is used in files-backend
to create a custom error message.

In untangling this we discovered a tricky edge case. The
refs_read_special_head() function was relying on
parse_loose_ref_contents() setting EINVAL.

By converting it to use "saved_errno" we can migrate away from "errno"
in this part of the code entirely, and do away with an existing
"save_errno" pattern, its only purpose was to not clobber the "errno"
we previously needed at the end of files_read_raw_ref().

Let's assert that we can do that by not having files_read_raw_ref()
itself operate on *failure_errno in addition to passing it on. Instead
we'll assert that if we return non-zero we actually do set errno, thus
assuring ourselves and callers that they can trust the resulting
"failure_errno".

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: make refs_read_raw_ref() not set errno
Han-Wen Nienhuys [Sat, 16 Oct 2021 09:39:09 +0000 (11:39 +0200)] 
refs API: make refs_read_raw_ref() not set errno

Add a "failure_errno" to refs_read_raw_ref(), his allows
refs_werrres_ref_unsafe() to pass along its "failure_errno", as a
first step before its own callers are migrated to pass it further up
the chain.

We are leaving out out the refs_read_special_head() in
refs_read_raw_ref() for now, as noted in a subsequent commit moving it
to "failure_errno" will require some special consideration.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agorefs API: add a version of refs_resolve_ref_unsafe() with "errno"
Ævar Arnfjörð Bjarmason [Sat, 16 Oct 2021 09:39:08 +0000 (11:39 +0200)] 
refs API: add a version of refs_resolve_ref_unsafe() with "errno"

Add a new refs_werrres_ref_unsafe() function, which is like
refs_resolve_ref_unsafe() except that it explicitly saves away the
"errno" to a passed-in parameter, the refs_resolve_ref_unsafe() then
becomes a wrapper for it.

In subsequent commits we'll migrate code over to it, before finally
making "refs_resolve_ref_unsafe()" with an "errno" parameter the
canonical version, so this this function exists only so that we can
incrementally migrate callers, it will be going away in a subsequent
commit.

As the added comment notes has a rather tortured name to be the same
length as "refs_resolve_ref_unsafe", to avoid churn as we won't need
to re-indent the argument lists, similarly the documentation and
structure of it in refs.h is designed to minimize a diff in a
subsequent commit, where that documentation will be added to the new
refs_resolve_ref_unsafe().

At the end of this migration the "meaningful errno" TODO item left in
76d70dc0c63 (refs.c: make resolve_ref_unsafe set errno to something
meaningful on error, 2014-06-20) will be resolved.

As can be seen from the use of refs_read_raw_ref() we'll also need to
convert some functions that the new refs_werrres_ref_unsafe() itself
calls to take this "failure_errno". That will be done in subsequent
commits.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agobranch tests: test for errno propagating on failing read
Han-Wen Nienhuys [Sat, 16 Oct 2021 09:39:07 +0000 (11:39 +0200)] 
branch tests: test for errno propagating on failing read

Add a test for "git branch" to cover the case where .git/refs is
symlinked. To check availability, refs_verify_refname_available() will
run refs_read_raw_ref() on each prefix, leading to a read() from
.git/refs (which is a directory).

It would probably be more robust to re-issue the lstat() as a normal
stat(), in which case, we would fall back to the directory case, but
for now let's just test for the existing behavior as-is. This test
covers a regression in a commit that only ever made it to "next", see
[1].

1. http://lore.kernel.org/git/pull.1068.git.git.1629203489546.gitgitgadget@gmail.com

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoThirteenth batch
Junio C Hamano [Thu, 14 Oct 2021 16:55:16 +0000 (09:55 -0700)] 
Thirteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoMerge branch 'ja/doc-status-types-and-copies'
Junio C Hamano [Wed, 13 Oct 2021 22:15:58 +0000 (15:15 -0700)] 
Merge branch 'ja/doc-status-types-and-copies'

A few kinds of changes "git status" can show were not documented.

* ja/doc-status-types-and-copies:
  Documentation/git-status: mention how to detect copies
  Documentation/git-status: document porcelain status T (typechange)
  Documentation/diff-format: state in which cases porcelain status is T
  Documentation/git-status: remove impossible porcelain status DR and DC

2 years agoMerge branch 'ab/make-sparse-for-real'
Junio C Hamano [Wed, 13 Oct 2021 22:15:58 +0000 (15:15 -0700)] 
Merge branch 'ab/make-sparse-for-real'

Prevent "make sparse" from running for the source files that
haven't been modified.

* ab/make-sparse-for-real:
  Makefile: make the "sparse" target non-.PHONY

2 years agoMerge branch 'ab/align-parse-options-help'
Junio C Hamano [Wed, 13 Oct 2021 22:15:58 +0000 (15:15 -0700)] 
Merge branch 'ab/align-parse-options-help'

When "git cmd -h" shows more than one line of usage text (e.g.
the cmd subcommand may take sub-sub-command), parse-options API
learned to align these lines, even across i18n/l10n.

* ab/align-parse-options-help:
  parse-options: properly align continued usage output
  git rev-parse --parseopt tests: add more usagestr tests
  send-pack: properly use parse_options() API for usage string
  parse-options API users: align usage output in C-strings

2 years agoMerge branch 'ab/help-config-vars'
Junio C Hamano [Wed, 13 Oct 2021 22:15:58 +0000 (15:15 -0700)] 
Merge branch 'ab/help-config-vars'

Teach "git help -c" into helping the command line completion of
configuration variables.

* ab/help-config-vars:
  help: move column config discovery to help.c library
  help / completion: make "git help" do the hard work
  help tests: test --config-for-completion option & output
  help: simplify by moving to OPT_CMDMODE()
  help: correct logic error in combining --all and --guides
  help: correct logic error in combining --all and --config
  help tests: add test for --config output
  help: correct usage & behavior of "git help --guides"
  help: correct the usage string in -h and documentation

2 years agoMerge branch 'jh/builtin-fsmonitor-part1'
Junio C Hamano [Wed, 13 Oct 2021 22:15:57 +0000 (15:15 -0700)] 
Merge branch 'jh/builtin-fsmonitor-part1'

Built-in fsmonitor (part 1).

* jh/builtin-fsmonitor-part1:
  t/helper/simple-ipc: convert test-simple-ipc to use start_bg_command
  run-command: create start_bg_command
  simple-ipc/ipc-win32: add Windows ACL to named pipe
  simple-ipc/ipc-win32: add trace2 debugging
  simple-ipc: move definition of ipc_active_state outside of ifdef
  simple-ipc: preparations for supporting binary messages.
  trace2: add trace2_child_ready() to report on background children

2 years agoMerge branch 'ab/config-based-hooks-1'
Junio C Hamano [Wed, 13 Oct 2021 22:15:57 +0000 (15:15 -0700)] 
Merge branch 'ab/config-based-hooks-1'

Mostly preliminary clean-up in the hook API.

* ab/config-based-hooks-1:
  hook-list.h: add a generated list of hooks, like config-list.h
  hook.c users: use "hook_exists()" instead of "find_hook()"
  hook.c: add a hook_exists() wrapper and use it in bugreport.c
  hook.[ch]: move find_hook() from run-command.c to hook.c
  Makefile: remove an out-of-date comment
  Makefile: don't perform "mv $@+ $@" dance for $(GENERATED_H)
  Makefile: stop hardcoding {command,config}-list.h
  Makefile: mark "check" target as .PHONY

2 years agoMerge branch 'ab/lib-subtest'
Junio C Hamano [Wed, 13 Oct 2021 22:15:57 +0000 (15:15 -0700)] 
Merge branch 'ab/lib-subtest'

Updates to the tests in t0000 to test the test framework.

* ab/lib-subtest:
  test-lib tests: get rid of copy/pasted mock test code
  test-lib tests: assert 1 exit code, not non-zero
  test-lib tests: refactor common part of check_sub_test_lib_test*()
  test-lib tests: avoid subshell for "test_cmp" for readability
  test-lib tests: don't provide a description for the sub-tests
  test-lib tests: split up "write and run" into two functions
  test-lib tests: move "run_sub_test" to a new lib-subtest.sh

2 years agoMerge branch 'en/removing-untracked-fixes'
Junio C Hamano [Wed, 13 Oct 2021 22:15:57 +0000 (15:15 -0700)] 
Merge branch 'en/removing-untracked-fixes'

Various fixes in code paths that move untracked files away to make room.

* en/removing-untracked-fixes:
  Documentation: call out commands that nuke untracked files/directories
  Comment important codepaths regarding nuking untracked files/dirs
  unpack-trees: avoid nuking untracked dir in way of locally deleted file
  unpack-trees: avoid nuking untracked dir in way of unmerged file
  Change unpack_trees' 'reset' flag into an enum
  Remove ignored files by default when they are in the way
  unpack-trees: make dir an internal-only struct
  unpack-trees: introduce preserve_ignored to unpack_trees_options
  read-tree, merge-recursive: overwrite ignored files by default
  checkout, read-tree: fix leak of unpack_trees_options.dir
  t2500: add various tests for nuking untracked files

2 years agoMerge branch 'mt/grep-submodule-textconv'
Junio C Hamano [Wed, 13 Oct 2021 22:15:56 +0000 (15:15 -0700)] 
Merge branch 'mt/grep-submodule-textconv'

"git grep --recurse-submodules" takes trees and blobs from the
submodule repository, but the textconv settings when processing a
blob from the submodule is not taken from the submodule repository.
A test is added to demonstrate the issue, without fixing it.

* mt/grep-submodule-textconv:
  grep: demonstrate bug with textconv attributes and submodules

2 years agoMerge branch 'ds/add-rm-with-sparse-index'
Junio C Hamano [Wed, 13 Oct 2021 22:15:56 +0000 (15:15 -0700)] 
Merge branch 'ds/add-rm-with-sparse-index'

"git add", "git mv", and "git rm" have been adjusted to avoid
updating paths outside of the sparse-checkout definition unless
the user specifies a "--sparse" option.

* ds/add-rm-with-sparse-index:
  advice: update message to suggest '--sparse'
  mv: refuse to move sparse paths
  rm: skip sparse paths with missing SKIP_WORKTREE
  rm: add --sparse option
  add: update --renormalize to skip sparse paths
  add: update --chmod to skip sparse paths
  add: implement the --sparse option
  add: skip tracked paths outside sparse-checkout cone
  add: fail when adding an untracked sparse file
  dir: fix pattern matching on dirs
  dir: select directories correctly
  t1092: behavior for adding sparse files
  t3705: test that 'sparse_entry' is unstaged

2 years agoSync with Git 2.33.1
Junio C Hamano [Tue, 12 Oct 2021 20:59:32 +0000 (13:59 -0700)] 
Sync with Git 2.33.1

2 years agoGit 2.33.1 v2.33.1
Junio C Hamano [Tue, 12 Oct 2021 20:51:59 +0000 (13:51 -0700)] 
Git 2.33.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoMerge branch 'ah/connect-parse-feature-v0-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:49 +0000 (13:51 -0700)] 
Merge branch 'ah/connect-parse-feature-v0-fix' into maint

Protocol v0 clients can get stuck parsing a malformed feature line.

* ah/connect-parse-feature-v0-fix:
  connect: also update offset for features without values

2 years agoMerge branch 'ab/make-clean-depend-dirs' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:49 +0000 (13:51 -0700)] 
Merge branch 'ab/make-clean-depend-dirs' into maint

"make clean" has been updated to remove leftover .depend/
directories, even when it is not told to use them to compute header
dependencies.

* ab/make-clean-depend-dirs:
  Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes

2 years agoMerge branch 'jk/http-redact-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:48 +0000 (13:51 -0700)] 
Merge branch 'jk/http-redact-fix' into maint

Sensitive data in the HTTP trace were supposed to be redacted, but
we failed to do so in HTTP/2 requests.

* jk/http-redact-fix:
  http: match headers case-insensitively when redacting

2 years agoMerge branch 'da/difftool-dir-diff-symlink-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:48 +0000 (13:51 -0700)] 
Merge branch 'da/difftool-dir-diff-symlink-fix' into maint

"git difftool --dir-diff" mishandled symbolic links.

* da/difftool-dir-diff-symlink-fix:
  difftool: fix symlink-file writing in dir-diff mode

2 years agoMerge branch 'cb/cvsserver' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:48 +0000 (13:51 -0700)] 
Merge branch 'cb/cvsserver' into maint

"git cvsserver" had a long-standing bug in its authentication code,
which has finally been corrected (it is unclear and is a separate
question if anybody is seriously using it, though).

* cb/cvsserver:
  Documentation: cleanup git-cvsserver
  git-cvsserver: protect against NULL in crypt(3)
  git-cvsserver: use crypt correctly to compare password hashes

2 years agoMerge branch 'jk/clone-unborn-head-in-bare' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:47 +0000 (13:51 -0700)] 
Merge branch 'jk/clone-unborn-head-in-bare' into maint

"git clone" from a repository whose HEAD is unborn into a bare
repository didn't follow the branch name the other side used, which
is corrected.

* jk/clone-unborn-head-in-bare:
  clone: handle unborn branch in bare repos

2 years agoMerge branch 'en/stash-df-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:47 +0000 (13:51 -0700)] 
Merge branch 'en/stash-df-fix' into maint

"git stash", where the tentative change involves changing a
directory to a file (or vice versa), was confused, which has been
corrected.

* en/stash-df-fix:
  stash: restore untracked files AFTER restoring tracked files
  stash: avoid feeding directories to update-index
  t3903: document a pair of directory/file bugs

2 years agoMerge branch 'jk/strvec-typefix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:47 +0000 (13:51 -0700)] 
Merge branch 'jk/strvec-typefix' into maint

Correct nr and alloc members of strvec struct to be of type size_t.

* jk/strvec-typefix:
  strvec: use size_t to store nr and alloc

2 years agoMerge branch 'en/am-abort-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:46 +0000 (13:51 -0700)] 
Merge branch 'en/am-abort-fix' into maint

When "git am --abort" fails to abort correctly, it still exited
with exit status of 0, which has been corrected.

* en/am-abort-fix:
  am: fix incorrect exit status on am fail to abort
  t4151: add a few am --abort tests
  git-am.txt: clarify --abort behavior

2 years agoMerge branch 'ps/update-ref-batch-flush' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:46 +0000 (13:51 -0700)] 
Merge branch 'ps/update-ref-batch-flush' into maint

"git update-ref --stdin" failed to flush its output as needed,
which potentially led the conversation to a deadlock.

* ps/update-ref-batch-flush:
  t1400: avoid SIGPIPE race condition on fifo
  update-ref: fix streaming of status updates

2 years agoMerge branch 'rs/no-mode-to-open-when-appending' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:46 +0000 (13:51 -0700)] 
Merge branch 'rs/no-mode-to-open-when-appending' into maint

The "mode" word is useless in a call to open(2) that does not
create a new file.  Such a call in the files backend of the ref
subsystem has been cleaned up.

* rs/no-mode-to-open-when-appending:
  refs/files-backend: remove unused open mode parameter

2 years agoMerge branch 'tb/pack-finalize-ordering' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:45 +0000 (13:51 -0700)] 
Merge branch 'tb/pack-finalize-ordering' into maint

The order in which various files that make up a single (conceptual)
packfile has been reevaluated and straightened up.  This matters in
correctness, as an incomplete set of files must not be shown to a
running Git.

* tb/pack-finalize-ordering:
  pack-objects: rename .idx files into place after .bitmap files
  pack-write: split up finish_tmp_packfile() function
  builtin/index-pack.c: move `.idx` files into place last
  index-pack: refactor renaming in final()
  builtin/repack.c: move `.idx` files into place last
  pack-write.c: rename `.idx` files after `*.rev`
  pack-write: refactor renaming in finish_tmp_packfile()
  bulk-checkin.c: store checksum directly
  pack.h: line-wrap the definition of finish_tmp_packfile()

2 years agoMerge branch 'rs/range-diff-avoid-segfault-with-I' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:45 +0000 (13:51 -0700)] 
Merge branch 'rs/range-diff-avoid-segfault-with-I' into maint

"git range-diff -I... <range> <range>" segfaulted, which has been
corrected.

* rs/range-diff-avoid-segfault-with-I:
  range-diff: avoid segfault with -I

2 years agoMerge branch 'ab/reverse-midx-optim' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:45 +0000 (13:51 -0700)] 
Merge branch 'ab/reverse-midx-optim' into maint

The code that optionally creates the *.rev reverse index file has
been optimized to avoid needless computation when it is not writing
the file out.

* ab/reverse-midx-optim:
  pack-write: skip *.rev work when not writing *.rev

2 years agoMerge branch 'jc/trivial-threeway-binary-merge' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:44 +0000 (13:51 -0700)] 
Merge branch 'jc/trivial-threeway-binary-merge' into maint

The "git apply -3" code path learned not to bother the lower level
merge machinery when the three-way merge can be trivially resolved
without the content level merge.

* jc/trivial-threeway-binary-merge:
  apply: resolve trivial merge without hitting ll-merge with "--3way"

2 years agoMerge branch 'ab/send-email-config-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:44 +0000 (13:51 -0700)] 
Merge branch 'ab/send-email-config-fix' into maint

Regression fix.

* ab/send-email-config-fix:
  send-email: fix a "first config key wins" regression in v2.33.0

2 years agoMerge branch 'so/diff-index-regression-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:44 +0000 (13:51 -0700)] 
Merge branch 'so/diff-index-regression-fix' into maint

Recent "diff -m" changes broke "gitk", which has been corrected.

* so/diff-index-regression-fix:
  diff-index: restore -c/--cc options handling

2 years agoMerge branch 'jk/log-warn-on-bogus-encoding' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:43 +0000 (13:51 -0700)] 
Merge branch 'jk/log-warn-on-bogus-encoding' into maint

Doc update plus improved error reporting.

* jk/log-warn-on-bogus-encoding:
  docs: use "character encoding" to refer to commit-object encoding
  logmsg_reencode(): warn when iconv() fails

2 years agoMerge branch 'tk/fast-export-anonymized-tag-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:43 +0000 (13:51 -0700)] 
Merge branch 'tk/fast-export-anonymized-tag-fix' into maint

The output from "git fast-export", when its anonymization feature
is in use, showed an annotated tag incorrectly.

* tk/fast-export-anonymized-tag-fix:
  fast-export: fix anonymized tag using original length

2 years agoMerge branch 'mh/send-email-reset-in-reply-to' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:43 +0000 (13:51 -0700)] 
Merge branch 'mh/send-email-reset-in-reply-to' into maint

Even when running "git send-email" without its own threaded
discussion support, a threading related header in one message is
carried over to the subsequent message to result in an unwanted
threading, which has been corrected.

* mh/send-email-reset-in-reply-to:
  send-email: avoid incorrect header propagation

2 years agoMerge branch 'sg/set-ceiling-during-tests' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:42 +0000 (13:51 -0700)] 
Merge branch 'sg/set-ceiling-during-tests' into maint

Buggy tests could damage repositories outside the throw-away test
area we created.  We now by default export GIT_CEILING_DIRECTORIES
to limit the damage from such a stray test.

* sg/set-ceiling-during-tests:
  test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository

2 years agoMerge branch 'jh/sparse-index-resize-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:42 +0000 (13:51 -0700)] 
Merge branch 'jh/sparse-index-resize-fix' into maint

The sparse-index support can corrupt the index structure by storing
a stale and/or uninitialized data, which has been corrected.

* jh/sparse-index-resize-fix:
  sparse-index: copy dir_hash in ensure_full_index()

2 years agoMerge branch 'ka/want-ref-in-namespace' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:42 +0000 (13:51 -0700)] 
Merge branch 'ka/want-ref-in-namespace' into maint

"git upload-pack" which runs on the other side of "git fetch"
forgot to take the ref namespaces into account when handling
want-ref requests.

* ka/want-ref-in-namespace:
  docs: clarify the interaction of transfer.hideRefs and namespaces
  upload-pack.c: treat want-ref relative to namespace
  t5730: introduce fetch command helper

2 years agoMerge branch 'sg/column-nl' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:41 +0000 (13:51 -0700)] 
Merge branch 'sg/column-nl' into maint

The parser for the "--nl" option of "git column" has been
corrected.

* sg/column-nl:
  column: fix parsing of the '--nl' option

2 years agoMerge branch 'cb/makefile-apple-clang' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:41 +0000 (13:51 -0700)] 
Merge branch 'cb/makefile-apple-clang' into maint

Build update for Apple clang.

* cb/makefile-apple-clang:
  build: catch clang that identifies itself as "$VENDOR clang"
  build: clang version may not be followed by extra words
  build: update detect-compiler for newer Xcode version

2 years agoMerge branch 'rs/branch-allow-deleting-dangling' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:41 +0000 (13:51 -0700)] 
Merge branch 'rs/branch-allow-deleting-dangling' into maint

"git branch -D <branch>" used to refuse to remove a broken branch
ref that points at a missing commit, which has been corrected.

* rs/branch-allow-deleting-dangling:
  branch: allow deleting dangling branches with --force

2 years agoMerge branch 'mt/quiet-with-delayed-checkout' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:40 +0000 (13:51 -0700)] 
Merge branch 'mt/quiet-with-delayed-checkout' into maint

The delayed checkout code path in "git checkout" etc. were chatty
even when --quiet and/or --no-progress options were given.

* mt/quiet-with-delayed-checkout:
  checkout: make delayed checkout respect --quiet and --no-progress

2 years agoMerge branch 'dd/diff-files-unmerged-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:40 +0000 (13:51 -0700)] 
Merge branch 'dd/diff-files-unmerged-fix' into maint

"git diff --relative" segfaulted and/or produced incorrect result
when there are unmerged paths.

* dd/diff-files-unmerged-fix:
  diff-lib: ignore paths that are outside $cwd if --relative asked

2 years agoMerge branch 'rs/git-mmap-uses-malloc' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:39 +0000 (13:51 -0700)] 
Merge branch 'rs/git-mmap-uses-malloc' into maint

mmap() imitation used to call xmalloc() that dies upon malloc()
failure, which has been corrected to just return an error to the
caller to be handled.

* rs/git-mmap-uses-malloc:
  compat: let git_mmap use malloc(3) directly

2 years agoMerge branch 'pw/rebase-r-fixes' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:39 +0000 (13:51 -0700)] 
Merge branch 'pw/rebase-r-fixes' into maint

Various bugs in "git rebase -r" have been fixed.

* pw/rebase-r-fixes:
  rebase -r: fix merge -c with a merge strategy
  rebase -r: don't write .git/MERGE_MSG when fast-forwarding
  rebase -i: add another reword test
  rebase -r: make 'merge -c' behave like reword

2 years agoMerge branch 'pw/rebase-skip-final-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:39 +0000 (13:51 -0700)] 
Merge branch 'pw/rebase-skip-final-fix' into maint

Checking out all the paths from HEAD during the last conflicted
step in "git rebase" and continuing would cause the step to be
skipped (which is expected), but leaves MERGE_MSG file behind in
$GIT_DIR and confuses the next "git commit", which has been
corrected.

* pw/rebase-skip-final-fix:
  rebase --continue: remove .git/MERGE_MSG
  rebase --apply: restore some tests
  t3403: fix commit authorship

2 years agoMerge branch 'cb/ci-use-upload-artifacts-v1' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:38 +0000 (13:51 -0700)] 
Merge branch 'cb/ci-use-upload-artifacts-v1' into maint

Use upload-artifacts v1 (instead of v2) for 32-bit linux, as the
new version has a blocker bug for that architecture.

* cb/ci-use-upload-artifacts-v1:
  ci: use upload-artifacts v1 for dockerized jobs

2 years agoMerge branch 'jk/commit-edit-fixup-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:38 +0000 (13:51 -0700)] 
Merge branch 'jk/commit-edit-fixup-fix' into maint

"git commit --fixup" now works with "--edit" again, after it was
broken in v2.32.

* jk/commit-edit-fixup-fix:
  commit: restore --edit when combined with --fixup

2 years agoMerge branch 'jk/range-diff-fixes' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:38 +0000 (13:51 -0700)] 
Merge branch 'jk/range-diff-fixes' into maint

"git range-diff" code clean-up.

* jk/range-diff-fixes:
  range-diff: use ssize_t for parsed "len" in read_patches()
  range-diff: handle unterminated lines in read_patches()
  range-diff: drop useless "offset" variable from read_patches()

2 years agoMerge branch 'jk/apply-binary-hunk-parsing-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:37 +0000 (13:51 -0700)] 
Merge branch 'jk/apply-binary-hunk-parsing-fix' into maint

"git apply" miscounted the bytes and failed to read to the end of
binary hunks.

* jk/apply-binary-hunk-parsing-fix:
  apply: keep buffer/size pair in sync when parsing binary hunks

2 years agoMerge branch 'en/pull-conflicting-options' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:36 +0000 (13:51 -0700)] 
Merge branch 'en/pull-conflicting-options' into maint

"git pull" had various corner cases that were not well thought out
around its --rebase backend, e.g. "git pull --ff-only" did not stop
but went ahead and rebased when the history on other side is not a
descendant of our history.  The series tries to fix them up.

* en/pull-conflicting-options:
  pull: fix handling of multiple heads
  pull: update docs & code for option compatibility with rebasing
  pull: abort by default when fast-forwarding is not possible
  pull: make --rebase and --no-rebase override pull.ff=only
  pull: since --ff-only overrides, handle it first
  pull: abort if --ff-only is given and fast-forwarding is impossible
  t7601: add tests of interactions with multiple merge heads and config
  t7601: test interaction of merge/rebase/fast-forward flags and options

2 years agoMerge branch 'jt/push-negotiation-fixes' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:36 +0000 (13:51 -0700)] 
Merge branch 'jt/push-negotiation-fixes' into maint

Bugfix for common ancestor negotiation recently introduced in "git
push" codepath.

* jt/push-negotiation-fixes:
  fetch: die on invalid --negotiation-tip hash
  send-pack: fix push nego. when remote has refs
  send-pack: fix push.negotiate with remote helper

2 years agoMerge branch 'ab/pack-stdin-packs-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:35 +0000 (13:51 -0700)] 
Merge branch 'ab/pack-stdin-packs-fix' into maint

Input validation of "git pack-objects --stdin-packs" has been
corrected.

* ab/pack-stdin-packs-fix:
  pack-objects: fix segfault in --stdin-packs option
  pack-objects tests: cover blindspots in stdin handling

2 years agoMerge branch 'en/typofixes' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:35 +0000 (13:51 -0700)] 
Merge branch 'en/typofixes' into maint

Typofixes.

* en/typofixes:
  merge-ort: fix completely wrong comment
  trace2.h: fix trivial comment typo

2 years agoMerge branch 'cb/unicode-14' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:35 +0000 (13:51 -0700)] 
Merge branch 'cb/unicode-14' into maint

The unicode character width table (used for output alignment) has
been updated.

* cb/unicode-14:
  unicode: update the width tables to Unicode 14

2 years agoMerge branch 'po/git-config-doc-mentions-help-c' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:34 +0000 (13:51 -0700)] 
Merge branch 'po/git-config-doc-mentions-help-c' into maint

Doc update.

* po/git-config-doc-mentions-help-c:
  doc: config, tell readers of `git help --config`

2 years agoMerge branch 'kz/revindex-comment-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:34 +0000 (13:51 -0700)] 
Merge branch 'kz/revindex-comment-fix' into maint

Header comment fix.

* kz/revindex-comment-fix:
  pack-revindex.h: correct the time complexity descriptions

2 years agoMerge branch 'cb/plug-leaks-in-alloca-emu-users' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:34 +0000 (13:51 -0700)] 
Merge branch 'cb/plug-leaks-in-alloca-emu-users' into maint

Leakfix.

* cb/plug-leaks-in-alloca-emu-users:
  t0000: avoid masking git exit value through pipes
  tree-diff: fix leak when not HAVE_ALLOCA_H

2 years agoMerge branch 'ma/doc-git-version' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:34 +0000 (13:51 -0700)] 
Merge branch 'ma/doc-git-version' into maint

Doc update.

* ma/doc-git-version:
  documentation: add documentation for 'git version'

2 years agoMerge branch 'rs/drop-core-compression-vars' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:33 +0000 (13:51 -0700)] 
Merge branch 'rs/drop-core-compression-vars' into maint

Code clean-up.

* rs/drop-core-compression-vars:
  compression: drop write-only core_compression_* variables

2 years agoMerge branch 'jk/t5562-racefix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:33 +0000 (13:51 -0700)] 
Merge branch 'jk/t5562-racefix' into maint

Test update.

* jk/t5562-racefix:
  t5562: use alarm() to interrupt timed child-wait

2 years agoMerge branch 'rs/setup-use-xopen-and-xdup' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:33 +0000 (13:51 -0700)] 
Merge branch 'rs/setup-use-xopen-and-xdup' into maint

Code clean-up.

* rs/setup-use-xopen-and-xdup:
  setup: use xopen and xdup in sanitize_stdfds

2 years agoMerge branch 'jc/prefix-filename-allocates' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:32 +0000 (13:51 -0700)] 
Merge branch 'jc/prefix-filename-allocates' into maint

Leakfix.

* jc/prefix-filename-allocates:
  hash-object: prefix_filename() returns allocated memory these days

2 years agoMerge branch 'ab/no-more-check-bindir' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:32 +0000 (13:51 -0700)] 
Merge branch 'ab/no-more-check-bindir' into maint

Build simplification.

* ab/no-more-check-bindir:
  Makefile: remove the check_bindir script

2 years agoMerge branch 'bs/doc-bugreport-outdir' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:32 +0000 (13:51 -0700)] 
Merge branch 'bs/doc-bugreport-outdir' into maint

Docfix.

* bs/doc-bugreport-outdir:
  Documentation: fix default directory of git bugreport -o

2 years agoMerge branch 'cb/ci-build-pedantic' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:31 +0000 (13:51 -0700)] 
Merge branch 'cb/ci-build-pedantic' into maint

CI update.

* cb/ci-build-pedantic:
  ci: run a pedantic build as part of the GitHub workflow

2 years agoMerge branch 'rs/archive-use-object-id' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:31 +0000 (13:51 -0700)] 
Merge branch 'rs/archive-use-object-id' into maint

Code cleanup.

* rs/archive-use-object-id:
  archive: convert queue_directory to struct object_id

2 years agoMerge branch 'rs/show-branch-simplify' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:31 +0000 (13:51 -0700)] 
Merge branch 'rs/show-branch-simplify' into maint

Code cleanup.

* rs/show-branch-simplify:
  show-branch: simplify rev_is_head()

2 years agoMerge branch 'cb/remote-ndebug-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:30 +0000 (13:51 -0700)] 
Merge branch 'cb/remote-ndebug-fix' into maint

Build fix.

* cb/remote-ndebug-fix:
  remote: avoid -Wunused-but-set-variable in gcc with -DNDEBUG

2 years agoMerge branch 'ab/mailmap-leakfix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:30 +0000 (13:51 -0700)] 
Merge branch 'ab/mailmap-leakfix' into maint

Leakfix.

* ab/mailmap-leakfix:
  mailmap.c: fix a memory leak in free_mailap_{info,entry}()

2 years agoMerge branch 'ab/gc-log-rephrase' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:30 +0000 (13:51 -0700)] 
Merge branch 'ab/gc-log-rephrase' into maint

A pathname in an advice message has been made cut-and-paste ready.

* ab/gc-log-rephrase:
  gc: remove trailing dot from "gc.log" line

2 years agoMerge branch 'ba/object-info' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:29 +0000 (13:51 -0700)] 
Merge branch 'ba/object-info' into maint

Leakfix.

* ba/object-info:
  protocol-caps.c: fix memory leak in send_info()

2 years agoMerge branch 'es/walken-tutorial-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:29 +0000 (13:51 -0700)] 
Merge branch 'es/walken-tutorial-fix' into maint

Typofix.

* es/walken-tutorial-fix:
  doc: fix syntax error and the format of printf

2 years agoMerge branch 'rs/xopen-reports-open-failures' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:28 +0000 (13:51 -0700)] 
Merge branch 'rs/xopen-reports-open-failures' into maint

Error diagnostics improvement.

* rs/xopen-reports-open-failures:
  use xopen() to handle fatal open(2) failures
  xopen: explicitly report creation failures

2 years agoMerge branch 'dd/t6300-wo-gpg-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:28 +0000 (13:51 -0700)] 
Merge branch 'dd/t6300-wo-gpg-fix' into maint

Test fix.

* dd/t6300-wo-gpg-fix:
  t6300: check for cat-file exit status code
  t6300: don't run cat-file on non-existent object

2 years agoMerge branch 'mh/credential-leakfix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:28 +0000 (13:51 -0700)] 
Merge branch 'mh/credential-leakfix' into maint

Leak fix.

* mh/credential-leakfix:
  credential: fix leak in credential_apply_config()

2 years agoMerge branch 'jk/t5323-no-pack-test-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:27 +0000 (13:51 -0700)] 
Merge branch 'jk/t5323-no-pack-test-fix' into maint

Test fix.

* jk/t5323-no-pack-test-fix:
  t5323: drop mentions of "master"

2 years agoMerge branch 'js/maintenance-launchctl-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:27 +0000 (13:51 -0700)] 
Merge branch 'js/maintenance-launchctl-fix' into maint

"git maintenance" scheduler fix for macOS.

* js/maintenance-launchctl-fix:
  maintenance: skip bootout/bootstrap when plist is registered
  maintenance: create `launchctl` configuration using a lock file

2 years agoMerge branch 'ab/rebase-fatal-fatal-fix' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:27 +0000 (13:51 -0700)] 
Merge branch 'ab/rebase-fatal-fatal-fix' into maint

Error message fix.

* ab/rebase-fatal-fatal-fix:
  rebase: emit one "fatal" in "fatal: fatal: <error>"

2 years agoMerge branch 'ab/ls-remote-packet-trace' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:26 +0000 (13:51 -0700)] 
Merge branch 'ab/ls-remote-packet-trace' into maint

Debugging aid fix.

* ab/ls-remote-packet-trace:
  ls-remote: set packet_trace_identity(<name>)

2 years agoMerge branch 'ga/send-email-sendmail-cmd' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:26 +0000 (13:51 -0700)] 
Merge branch 'ga/send-email-sendmail-cmd' into maint

Test fix.

* ga/send-email-sendmail-cmd:
  t9001: PATH must not use Windows-style paths

2 years agoMerge branch 'me/t5582-cleanup' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:25 +0000 (13:51 -0700)] 
Merge branch 'me/t5582-cleanup' into maint

Test fix.

* me/t5582-cleanup:
  t5582: remove spurious 'cd "$D"' line

2 years agoMerge branch 'sg/make-fix-ar-invocation' into maint
Junio C Hamano [Tue, 12 Oct 2021 20:51:25 +0000 (13:51 -0700)] 
Merge branch 'sg/make-fix-ar-invocation' into maint

Build fix.

* sg/make-fix-ar-invocation:
  Makefile: remove archives before manipulating them with 'ar'