vcswatch reports that
this package seems to have new commits in its VCS but has
not yet updated debian/changelog. You should consider updating
the Debian changelog and uploading this new version into the archive.
Here are the relevant commit logs:
commit 875860669b678a01ff4f0a47d5b235d6edc7e514
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon Mar 20 18:26:39 2023 -0700
debian: new "next" snapshot
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Change-Id: I61b40df64e094afcbd4e6ee270c21c01e529a1a0
commit d47a28a3ef5bd81640965571205bb5fae7a021a9
Merge: 5c44ad8ae9 86825d005a
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon Mar 20 18:23:39 2023 -0700
Merge branch 'next' of https://kernel.googlesource.com/pub/scm/git/git into debian-experimental
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Change-Id: I12ef121c9c0373c8180f9c13acfbf30a1cde61b3
commit 5c44ad8ae97bb1e51eef3e646e6e1427a28007a7
Merge: 53e8d93516 510235e6ae
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon Mar 20 17:00:03 2023 -0700
Merge branch 'debian-sid' into debian-experimental
* debian-sid:
debian: new upstream release
remove unwanted doc-base entries
Correct paths in git-doc doc-base control files
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Change-Id: I1c14c54bdd18a36e9d78101cde4bd1e8ddf4c01a
commit 510235e6aeda34741a6b62025307c120e049d92b
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon Mar 20 16:51:58 2023 -0700
debian: new upstream release
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
commit b99c097eb2be21f7b6e2ec85e73080d80a18e9ce
Merge: e24836a1c1 73876f4861
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon Mar 20 16:45:19 2023 -0700
Merge tag 'v2.40.0' into debian-sid
Git 2.40
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
commit e24836a1c1615be50195f9a258be0e90b3272e01
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon Mar 20 16:44:28 2023 -0700
remove unwanted doc-base entries
Thanks to Matthew Vernon for noticing.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
commit a39304b7a6798344cf6f796ff8dc7a8d3e3a6e16
Author: Matthew Vernon <matthew@debian.org>
Date: Tue Feb 28 09:25:32 2023 +0000
Correct paths in git-doc doc-base control files
Bug: https://bugs.debian.org/1023255
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
commit 86825d005ae00eaf3b6dfb3e942c98319f6e2452
Merge: 35911c8f54 e25cabbf6b
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:04:42 2023 -0700
Sync with 'master'
commit 35911c8f545066f813d779da306592f0a9756f21
Merge: d9ab777d41 7ee1af8cb8
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:04:33 2023 -0700
Merge branch 'fc/completion-colors-do-not-need-prompt-command' into next
Lift the limitation that colored prompts can only be used with
PROMPT_COMMAND mode.
* fc/completion-colors-do-not-need-prompt-command:
completion: prompt: use generic colors
commit e25cabbf6b34e4a6e903d65102d87055cc994778
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:22 2023 -0700
The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit a9f4a01760fae8b8ee47068120f218c983d3f215
Merge: 947604ddb7 28d1122f9c
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:13 2023 -0700
Merge branch 'jk/add-p-unmerged-fix'
"git add -p" while the index is unmerged sometimes failed to parse
the diff output it internally produces and died, which has been
corrected.
* jk/add-p-unmerged-fix:
add-patch: handle "* Unmerged path" lines
commit 947604ddb7fffd6be6aa34192360ec338079dd6a
Merge: 9de14c71f7 15184ae9da
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:13 2023 -0700
Merge branch 'ew/fetch-no-write-fetch-head-fix'
* ew/fetch-no-write-fetch-head-fix:
fetch: pass --no-write-fetch-head to subprocesses
commit 9de14c71f720b1da50c95309fc06d30c8455aae2
Merge: fc1a4ce043 765071a8f2
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:12 2023 -0700
Merge branch 'fc/advice-diverged-history'
After "git pull" that is configured with pull.rebase=false
merge.ff=only fails due to our end having our own development, give
advice messages to get out of the "Not possible to fast-forward"
state.
* fc/advice-diverged-history:
advice: add diverging advice for novices
commit fc1a4ce043e4b07d1551a24ec224bd43b9405ec8
Merge: 0717a424a7 15a4cc912e
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:12 2023 -0700
Merge branch 'ab/fix-strategy-opts-parsing'
The code to parse "git rebase -X<opt>" was not prepared to see an
unparsable option string, which has been corrected.
* ab/fix-strategy-opts-parsing:
sequencer.c: fix overflow & segfault in parse_strategy_opts()
commit 0717a424a723201c4b77da3638764c70819c3f63
Merge: 5c92a451be e2d003dbed
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:12 2023 -0700
Merge branch 'ds/reprepare-alternates-when-repreparing-packfiles'
Once we start running, we assumed that the list of alternate object
databases would never change. Hook into the machinery used to
update the list of packfiles during runtime to update this list as
well.
* ds/reprepare-alternates-when-repreparing-packfiles:
object-file: reprepare alternates when necessary
commit 5c92a451be8050576aa271a82b00727278dc4642
Merge: 95de376349 94c4289435
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:12 2023 -0700
Merge branch 'jk/format-patch-change-format-for-empty-commits'
"git format-patch" learned to write a log-message only output file
for empty commits.
* jk/format-patch-change-format-for-empty-commits:
format-patch: output header for empty commits
commit 95de3763498a5a092a454bb548d40e918c2870c1
Merge: 12201fd756 0bbe10313e
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:12 2023 -0700
Merge branch 'jk/bundle-use-dash-for-stdfiles'
"git bundle" learned that "-" is a common way to say that the input
comes from the standard input and/or the output goes to the
standard output. It used to work only for output and only from the
root level of the working tree.
* jk/bundle-use-dash-for-stdfiles:
parse-options: use prefix_filename_except_for_dash() helper
parse-options: consistently allocate memory in fix_filename()
bundle: don't blindly apply prefix_filename() to "-"
bundle: document handling of "-" as stdin
bundle: let "-" mean stdin for reading operations
commit 12201fd756bad12c137343d5fd65200f4d0f192d
Merge: 3f3bb90c8f 8b95521edb
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:11 2023 -0700
Merge branch 'jk/bundle-progress'
Simplify UI to control progress meter given by "git bundle" command.
* jk/bundle-progress:
bundle: turn on --all-progress-implied by default
commit 3f3bb90c8f86279f4708f6b91e90216b285ca599
Merge: 96a806f87a f7111175df
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:11 2023 -0700
Merge branch 'as/doc-markup-fix'
Fix for a mis-mark-up in doc made in Git 2.39 days.
* as/doc-markup-fix:
git-merge-tree.txt: replace spurious HTML entity
commit 96a806f87a379fbc54b5cdb889518e9540d954c9
Merge: c79786c486 894ea94509
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:11 2023 -0700
Merge branch 'rj/avoid-switching-to-already-used-branch'
A few subcommands have been taught to stop users from working on a
branch that is being used in another worktree linked to the same
repository.
* rj/avoid-switching-to-already-used-branch:
switch: reject if the branch is already checked out elsewhere (test)
rebase: refuse to switch to a branch already checked out elsewhere (test)
branch: fix die_if_checked_out() when ignore_current_worktree
worktree: introduce is_shared_symref()
commit c79786c486cb84e2f9dad41a04d982bb23075815
Merge: 4a25b911cd 7fb89047cc
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:11 2023 -0700
Merge branch 'rj/bisect-already-used-branch'
Allow "git bisect reset" to check out the original branch when the
branch is already checked out in a different worktree linked to the
same repository.
* rj/bisect-already-used-branch:
bisect: fix "reset" when branch is checked out elsewhere
commit 4a25b911cdb0cd79b6ab8b60ccbece77df03340d
Merge: 67076b85b8 7c3c55026c
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:10 2023 -0700
Merge branch 'zh/push-to-delete-onelevel-ref'
"git push" has been taught to allow deletion of refs with one-level
names to help repairing a repository who acquired such a ref by
mistake. In general, we don't encourage use of such a ref, and
creation or update to such a ref is rejected as before.
* zh/push-to-delete-onelevel-ref:
push: allow delete single-level ref
receive-pack: fix funny ref error messsage
commit 67076b85b8f82c751fe634abb112139d6e32a5f1
Merge: b0d2440442 ee8a88826a
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:10 2023 -0700
Merge branch 'ak/restore-both-incompatible-with-conflicts'
"git restore" supports options like "--ours" that are only
meaningful during a conflicted merge, but these options are only
meaningful when updating the working tree files. These options are
marked to be incompatible when both "--staged" and "--worktree" are
in effect.
* ak/restore-both-incompatible-with-conflicts:
restore: fault --staged --worktree with merge opts
commit b0d2440442e3455887bd0afaa2c630ef9c4e583d
Merge: 6f54213718 c5773dc078
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:10 2023 -0700
Merge branch 'ew/commit-reach-clean-up-flags-fix'
Fix a segfaulting loop. The function and its caller may need
further clean-up.
* ew/commit-reach-clean-up-flags-fix:
commit-reach: avoid NULL dereference
commit 6f54213718ccd05be8a07f74d0d4e524ebccb3be
Merge: 950264636c 9fdc79ecba
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 19 15:03:10 2023 -0700
Merge branch 'ab/avoid-losing-exit-codes-in-tests'
Test clean-up.
* ab/avoid-losing-exit-codes-in-tests:
tests: don't lose misc "git" exit codes
tests: don't lose exit status with "test <op> $(git ...)"
tests: don't lose "git" exit codes in "! ( git ... | grep )"
tests: don't lose exit status with "(cd ...; test <op> $(git ...))"
t/lib-patch-mode.sh: fix ignored exit codes
auto-crlf tests: don't lose exit code in loops and outside tests
commit d9ab777d41f92a8c1684c91cfb02053d7dd1046b
Merge: f938b09366 950264636c
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:20:56 2023 -0700
Sync with 'master'
commit 950264636c68591989456e3ba0a5442f93152c1a
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:20 2023 -0700
Start the 2.41 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 5009dd4a1c1b18b3093d9a37e6508d218c1e8876
Merge: 4d87411ffe f17a1542b2
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:10 2023 -0700
Merge branch 'fz/rebase-msg-update'
Message update.
* fz/rebase-msg-update:
rebase: fix capitalisation autoSquash in i18n string
commit 4d87411ffe2432efa8800b9e9d889241dd0f1f07
Merge: 92c56da096 c6ce27ab08
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:10 2023 -0700
Merge branch 'ew/fetch-hiderefs'
A new "fetch.hideRefs" option can be used to exclude specified refs
from "rev-list --objects --stdin --not --all" traversal for
checking object connectivity, most useful when there are many
unrelated histories in a single repository.
* ew/fetch-hiderefs:
fetch: support hideRefs to speed up connectivity checks
commit 92c56da09683fa3331668adec073b6769da8f0b7
Merge: af5388d2dd 5f2117b24f
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:10 2023 -0700
Merge branch 'mc/credential-helper-www-authenticate'
Allow information carried on the WWW-AUthenticate header to be
passed to the credential helpers.
* mc/credential-helper-www-authenticate:
credential: add WWW-Authenticate header to cred requests
http: read HTTP WWW-Authenticate response headers
t5563: add tests for basic and anoymous HTTP access
commit af5388d2ddb0bc7c22fbe698078f4ca07879d954
Merge: d0732a8120 cc5d1d32fd
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:10 2023 -0700
Merge branch 'jc/gpg-lazy-init'
Instead of forcing each command to choose to honor GPG related
configuration variables, make the subsystem lazily initialize
itself.
* jc/gpg-lazy-init:
drop pure pass-through config callbacks
gpg-interface: lazily initialize and read the configuration
commit d0732a8120d9cc62d8b6efa4ec48966f890f84b7
Merge: 88cc8ed8bc 506ebaac96
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:09 2023 -0700
Merge branch 'jk/unused-post-2.39-part2'
More work towards -Wunused.
* jk/unused-post-2.39-part2: (21 commits)
help: mark unused parameter in git_unknown_cmd_config()
run_processes_parallel: mark unused callback parameters
userformat_want_item(): mark unused parameter
for_each_commit_graft(): mark unused callback parameter
rewrite_parents(): mark unused callback parameter
fetch-pack: mark unused parameter in callback function
notes: mark unused callback parameters
prio-queue: mark unused parameters in comparison functions
for_each_object: mark unused callback parameters
list-objects: mark unused callback parameters
mark unused parameters in signal handlers
run-command: mark error routine parameters as unused
mark "pointless" data pointers in callbacks
ref-filter: mark unused callback parameters
http-backend: mark unused parameters in virtual functions
http-backend: mark argc/argv unused
object-name: mark unused parameters in disambiguate callbacks
serve: mark unused parameters in virtual functions
serve: use repository pointer to get config
ls-refs: drop config caching
...
commit 88cc8ed8bc7d4bc9521b426e95ae2a38d3aec13a
Merge: f17d232f14 f524970185
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:08 2023 -0700
Merge branch 'en/header-cleanup'
Code clean-up to clarify the rule that "git-compat-util.h" must be
the first to be included.
* en/header-cleanup:
diff.h: remove unnecessary include of object.h
Remove unnecessary includes of builtin.h
treewide: replace cache.h with more direct headers, where possible
replace-object.h: move read_replace_refs declaration from cache.h to here
object-store.h: move struct object_info from cache.h
dir.h: refactor to no longer need to include cache.h
object.h: stop depending on cache.h; make cache.h depend on object.h
ident.h: move ident-related declarations out of cache.h
pretty.h: move has_non_ascii() declaration from commit.h
cache.h: remove dependence on hex.h; make other files include it explicitly
hex.h: move some hex-related declarations from cache.h
hash.h: move some oid-related declarations from cache.h
alloc.h: move ALLOC_GROW() functions from cache.h
treewide: remove unnecessary cache.h includes in source files
treewide: remove unnecessary cache.h includes
treewide: remove unnecessary git-compat-util.h includes in headers
treewide: ensure one of the appropriate headers is sourced first
commit f17d232f14135c9cce6e043389a9b7c434443606
Merge: 2d019f46b0 f297424a3a
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:08 2023 -0700
Merge branch 'en/dir-api-cleanup'
Code clean-up to clarify directory traversal API.
* en/dir-api-cleanup:
unpack-trees: add usage notices around df_conflict_entry
unpack-trees: special case read-tree debugging as internal usage
unpack-trees: rewrap a few overlong lines from previous patch
unpack-trees: mark fields only used internally as internal
unpack_trees: start splitting internal fields from public API
sparse-checkout: avoid using internal API of unpack-trees, take 2
sparse-checkout: avoid using internal API of unpack-trees
unpack-trees: clean up some flow control
dir: mark output only fields of dir_struct as such
dir: add a usage note to exclude_per_dir
dir: separate public from internal portion of dir_struct
unpack-trees: heed requests to overwrite ignored files
t2021: fix platform-specific leftover cruft
commit 2d019f46b00530c6c97413a840a4f0bb14b45877
Merge: 73876f4861 8d3e7eac52
Author: Junio C Hamano <gitster@pobox.com>
Date: Fri Mar 17 14:03:08 2023 -0700
Merge branch 'jk/fsck-indices-in-worktrees'
"git fsck" learned to check the index files in other worktrees,
just like "git gc" honors them as anchoring points.
* jk/fsck-indices-in-worktrees:
fsck: check even zero-entry index files
fsck: mention file path for index errors
fsck: check index files in all worktrees
fsck: factor out index fsck
commit 53e8d93516773f052a87bfdfaa431ef588ac6f9a
Author: Jonathan Tan <jonathantanmy@google.com>
Date: Fri Mar 17 09:20:24 2023 -0700
debian: new "next" snapshot
Change-Id: I00d5d974d7c154166f53d08a30c0d50e25d39520
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
commit 7427df645a5dd542d630a7f269a327d4cc563ddf
Merge: 0712138c67 f938b09366
Author: Jonathan Tan <jonathantanmy@google.com>
Date: Fri Mar 17 09:18:44 2023 -0700
Merge branch 'next' into debian-experimental
Change-Id: I62e3d5c2a5b271797678afeba5133cb434791251
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
commit 7ee1af8cb8b97385fc4e603bc024d877def5adb4
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date: Tue Feb 28 08:59:34 2023 -0600
completion: prompt: use generic colors
When the prompt command mode was introduced in 1bfc51ac81 (Allow
__git_ps1 to be used in PROMPT_COMMAND, 2012-10-10), the assumption was
that it was necessary in order to properly add colors to PS1 in bash,
but this wasn't true.
It's true that the \[ \] markers add the information needed to properly
calculate the width of the prompt, and they have to be added directly to
PS1, a function returning them doesn't work.
But that is because bash coverts the \[ \] markers in PS1 to \001 \002,
which is what readline ultimately needs in order to calculate the width.
We don't need bash to do this conversion, we can use \001 \002
ourselves, and then the prompt command mode is not necessary to display
colors.
This is what functions returning colors are supposed to do [1].
[1] http://mywiki.wooledge.org/BashFAQ/053
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Tested-by: Joakim Petersen <joak-pet@online.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit f938b09366326fbbe13acfec711b20e64765ea4f
Merge: 8d099dffcc 90ff7c9898
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 13 15:21:06 2023 -0700
Merge branch 'fc/test-aggregation-clean-up' into next
Code clean-up for test framework.
* fc/test-aggregation-clean-up:
test: don't print aggregate-results command
test: simplify counts aggregation
commit 8d099dffccfa685b2ec3acc8b219a5208fc457b3
Merge: 27f876afa4 c55c30669c
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 13 15:21:05 2023 -0700
Merge branch 'ps/receive-pack-unlock-before-die' into next
"git receive-pack" that responds to "git push" requests failed to
clean a stale lockfile when killed in the middle, which has been
corrected.
* ps/receive-pack-unlock-before-die:
receive-pack: fix stale packfile locks when dying
commit 27f876afa4a03e8049033e10299b5e719ba59088
Merge: 4b28e389f5 cfb62dd006
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 13 15:21:05 2023 -0700
Merge branch 'aj/ls-files-format-fix' into next
Fix for a "ls-files --format="%(path)" that produced nonsense
output, which was a bug in 2.38.
* aj/ls-files-format-fix:
ls-files: fix "--format" output of relative paths
commit 4b28e389f5131c522f07ea20ea9cf571b1208583
Merge: 60544f874f ab89575387
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 13 15:21:05 2023 -0700
Merge branch 'jk/format-patch-ignore-noprefix' into next
"git format-patch" honors the src/dst prefixes set to nonstandard
values with configuration variables like "diff.noprefix", causing
receiving end of the patch that expects the standard -p1 format to
break. Teach "format-patch" to ignore end-user configuration and
always use the standard prefixes.
This is a backward compatibility breaking change.
* jk/format-patch-ignore-noprefix:
rebase: prefer --default-prefix to --{src,dst}-prefix for format-patch
commit ab89575387c02ea024163256826ad1c6dd2e4247
Author: Jeff King <peff@peff.net>
Date: Mon Mar 13 15:54:11 2023 -0400
rebase: prefer --default-prefix to --{src,dst}-prefix for format-patch
When git-rebase invokes format-patch, it wants to make sure we use the
normal prefixes, and are not confused by diff.noprefix or similar. When
this was added in 5b220a6876f (Add --src/dst-prefix to git-formt-patch
in git-rebase.sh, 2010-09-09), we only had --src-prefix and --dst-prefix
to do so, which requires re-specifying the prefixes we expect to see.
These days we can say what we want more directly: just use the defaults.
This is a minor cleanup that should have no behavior change, but
hopefully the result expresses more clearly what the code is trying to
accomplish.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 60544f874fd51e4f7a5848f94bc42e74e5323d6a
Merge: 621d71c151 73876f4861
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 12 14:38:42 2023 -0700
Sync with Git 2.40
commit 621d71c151390cfa26ce87a6dc30a97f08e67986
Merge: a46443480c 8d5213decf
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Mar 12 14:38:18 2023 -0700
Merge branch 'jk/format-patch-ignore-noprefix' into next
"git format-patch" honors the src/dst prefixes set to nonstandard
values with configuration variables like "diff.noprefix", causing
receiving end of the patch that expects the standard -p1 format to
break. Teach "format-patch" to ignore end-user configuration and
always use the standard prefixes.
This is a backward compatibility breaking change.
* jk/format-patch-ignore-noprefix:
format-patch: add format.noprefix option
format-patch: do not respect diff.noprefix
diff: add --default-prefix option
t4013: add tests for diff prefix options
diff: factor out src/dst prefix setup
commit 0712138c67d33b492070e47c72b4be3af3b8d583
Author: Emily Shaffer <emilyshaffer@google.com>
Date: Fri Mar 10 09:54:39 2023 -0800
debian: new "next" snapshot
Change-Id: I73a71ebf631ebd085fae0f3520e45ad11dd4095d
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
commit f4d7d3aa99a70043cba56926d4d409a0bc034a4a
Merge: d7a6192c0e a46443480c
Author: Emily Shaffer <emilyshaffer@google.com>
Date: Fri Mar 10 09:38:49 2023 -0800
Merge branch 'next' into debian-experimental
Change-Id: Iff8cfbdaa00498a8a9071dd3a11e4af2db6ad005
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
commit cfb62dd006ae82dd1e06fb177095c8885b40b1c3
Author: Adam Johnson <me@adamj.eu>
Date: Fri Mar 10 13:04:33 2023 +0000
ls-files: fix "--format" output of relative paths
Fix a bug introduced with the "--format" option in
ce74de93 (ls-files: introduce "--format" option, 2022-07-23),
where relative paths were computed using the output buffer,
which could lead to random garbage data in the output.
Signed-off-by: Adam Johnson <me@adamj.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit c55c30669ced6e08b41b3c921f0da200247c9811
Author: Patrick Steinhardt <ps@pks.im>
Date: Fri Mar 10 07:52:10 2023 +0100
receive-pack: fix stale packfile locks when dying
When accepting a packfile in git-receive-pack(1), we feed that packfile
into git-index-pack(1) to generate the packfile index. As the packfile
would often only contain unreachable objects until the references have
been updated, concurrently running garbage collection might be tempted
to delete the packfile right away and thus cause corruption. To fix
this, we ask git-index-pack(1) to create a `.keep` file before moving
the packfile into place, which is getting deleted again once all of the
reference updates have been processed.
Now in production systems we have observed that those `.keep` files are
sometimes not getting deleted as expected, where the result is that
repositories tend to grow packfiles that are never deleted over time.
This seems to be caused by a race when git-receive-pack(1) is killed
after we have migrated the kept packfile from the quarantine directory
into the main object database. While this race window is typically small
it can be extended for example by installing a `proc-receive` hook.
Fix this race by registering the lockfile as a tempfile so that it will
automatically be removed at exit or when receiving a signal.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 90ff7c9898f6dfd76aae39ad06b1d0e746a615b8
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date: Thu Mar 9 11:30:32 2023 -0600
test: don't print aggregate-results command
There's no value in it.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 5d1d62e87540fd43bb16b123c9c73b022cc463e2
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date: Thu Mar 9 11:30:31 2023 -0600
test: simplify counts aggregation
When the list of files as input was implemented in 6508eedf67
(t/aggregate-results: accomodate systems with small max argument list
length, 2010-06-01), a much simpler solution wasn't considered.
Let's just pass the directory as an argument.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit a46443480cb8da3077933730b5f6ab16143ac2db
Merge: 283e2159c8 28d1122f9c
Author: Junio C Hamano <gitster@pobox.com>
Date: Thu Mar 9 11:47:19 2023 -0800
Merge branch 'jk/add-p-unmerged-fix' into next
"git add -p" while the index is unmerged sometimes failed to parse
the diff output it internally produces and died, which has been
corrected.
* jk/add-p-unmerged-fix:
add-patch: handle "* Unmerged path" lines
commit 283e2159c8d1aa0bd9f2d53891d1ee29e1ffa480
Merge: 851bceed17 15184ae9da
Author: Junio C Hamano <gitster@pobox.com>
Date: Thu Mar 9 11:47:19 2023 -0800
Merge branch 'ew/fetch-no-write-fetch-head-fix' into next
* ew/fetch-no-write-fetch-head-fix:
fetch: pass --no-write-fetch-head to subprocesses
commit 851bceed173d41b67b5ad683a812a91bb3dd1a22
Merge: e1f06af52a e2d003dbed
Author: Junio C Hamano <gitster@pobox.com>
Date: Thu Mar 9 11:47:17 2023 -0800
Merge branch 'ds/reprepare-alternates-when-repreparing-packfiles' into next
Once we start running, we assumed that the list of alternate object
databases would never change. Hook into the machinery used to
update the list of packfiles during runtime to update this list as
well.
* ds/reprepare-alternates-when-repreparing-packfiles:
object-file: reprepare alternates when necessary
commit e2d003dbedf05906c0cc22493a96124c94521973
Author: Derrick Stolee <derrickstolee@github.com>
Date: Wed Mar 8 18:47:32 2023 +0000
object-file: reprepare alternates when necessary
When an object is not found in a repository's object store, we sometimes
call reprepare_packed_git() to see if the object was temporarily moved
into a new pack-file (and its old pack-file or loose object was
deleted). This process does a scan of each pack directory within each
odb, but does not reevaluate if the odb list needs updating.
Extend reprepare_packed_git() to also reprepare the alternate odb list
by setting loaded_alternates to zero and calling prepare_alt_odb(). This
will add newly-discoverd odbs to the linked list, but will not duplicate
existing ones nor will it remove existing ones that are no longer listed
in the alternates file. Do this under the object read lock to avoid
readers from interacting with a potentially incomplete odb being added
to the odb list.
If the alternates file was edited to _remove_ some alternates during the
course of the Git process, Git will continue to see alternates that were
ever valid for that repository. ODBs are not removed from the list, the
same as the existing behavior before this change. Git already has
protections against an alternate directory disappearing from the
filesystem during the lifetime of a process, and those are still in
effect.
This change is specifically for concurrent changes to the repository, so
it is difficult to create a test that guarantees this behavior is
correct. I manually verified by introducing a reprepare_packed_git() call
into get_revision() and stepped into that call in a debugger with a
parent 'git log' process. Multiple runs of prepare_alt_odb() kept
the_repository->objects->odb as a single-item chain until I added a
.git/objects/info/alternates file in a different process. The next run
added the new odb to the chain and subsequent runs did not add to the
chain.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit e1f06af52acf60d31d62ef4604710374f90f3370
Author: Junio C Hamano <gitster@pobox.com>
Date: Thu Mar 9 11:44:49 2023 -0800
Revert "Merge branch 'ds/reprepare-alternates-when-repreparing-packfiles' into next"
This reverts commit 390cd4f4db6d9e6ed548140915a710ab957e4543, reversing
changes made to 1c421f4a9fa86e9f6925fd0c75493608a14539fb.
commit 15184ae9da1474908060a5c9b8c6ca88891e415e
Author: Eric Wong <e@80x24.org>
Date: Wed Mar 8 22:22:05 2023 +0000
fetch: pass --no-write-fetch-head to subprocesses
It seems a user would expect this option would work regardless
of whether it's fetching from a single remote, many remotes,
or recursing into submodules.
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 28d1122f9ca41a688aded33835bcb4740d1d5d8c
Author: Jeff King <peff@peff.net>
Date: Thu Mar 9 03:58:16 2023 -0500
add-patch: handle "* Unmerged path" lines
When we generate a diff with --cached, unmerged entries have no oid for
their index entry:
$ git diff-index --abbrev --cached HEAD
:100644 000000 f719efd 0000000 U my-conflict
So when we are asked to produce a patch, since we only have one side, we
just emit a special message:
$ git diff-index --cached -p HEAD
* Unmerged path my-conflict
This confuses interactive-patch modes that look at cached diffs. For
example:
$ git reset -p
BUG: add-patch.c:498: diff starts with unexpected line:
* Unmerged path my-conflict
Making things even more confusing, you'll get that error only if the
unmerged entry is alphabetically the first changed file. Otherwise, we
simply stick the unrecognized line to the end of the previous hunk.
There it's mostly harmless, as it eventually gets fed back to "git
apply", which happily ignores it. But it's still shown to the user
attached to the hunk, which is wrong.
So let's handle these lines as a noop. There's not really anything
useful to do with a conflicted merge in this case, and that's what we do
for other cases like "add -p". There we get a "diff --cc" line, which we
accept as starting a new file, but we refuse to use any of its hunks
(their headers start with "@@@" and not "@@ ", so we silently ignore
them).
It seems like simply recognizing the line and continuing in our parsing
loop would work. But we actually need to run the rest of the loop body
to handle matching up our colored/filtered output. But that code assumes
that we have some active file_diff we're working on. So instead, we'll
just insert a dummy entry into our array. This ends up the same as if we
saw a "diff --cc" line (a file with no hunks).
Reported-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 8d5213decff887b2d950b732e37b7abad6f8d450
Author: Jeff King <peff@peff.net>
Date: Thu Mar 9 01:12:37 2023 -0500
format-patch: add format.noprefix option
The previous commit dropped support for diff.noprefix in format-patch.
While this will do the right thing in most cases (where sending patches
without a prefix was an accidental side effect of the sender preferring
to see their local patches without prefixes), it left no good option for
a project or workflow where you really do want to send patches without
prefixes. You'd be stuck using "--no-prefix" for every invocation.
So let's add a config option specific to format-patch that enables this
behavior. That gives people who have such a workflow a way to get what
they want, but makes it hard to accidentally trigger it.
A more backwards-compatible way of doing the transition would be to have
format.noprefix default to diff.noprefix when it's not set. But that
doesn't really help the "accidental" problem; people would have to
manually set format.noprefix=false. And it's unlikely that anybody
really wants format.noprefix=true in the first place. I'm adding it here
mostly as an escape hatch, not because anybody has expressed any
interest in it.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit c169af8f7ab521cc47b59f104db78847e324a3cb
Author: Jeff King <peff@peff.net>
Date: Thu Mar 9 01:11:49 2023 -0500
format-patch: do not respect diff.noprefix
The output of format-patch respects diff.noprefix, but this usually ends
up being a hassle for people receiving the patch, as they have to
manually specify "-p0" in order to apply it.
I don't think there was any specific intention for it to behave this
way. The noprefix option is handled by git_diff_ui_config(), and
format-patch exists in a gray area between plumbing and porcelain.
People do look at the output, and we'd expect it to colorize things,
respect their choice of algorithm, and so on. But this particular option
creates problems for the receiver (in theory so does diff.mnemonicprefix,
but since we are always formatting commits, the mnemonic prefixes will
always be "a/" and "b/").
So let's disable it. The slight downsides are:
- people who have set diff.noprefix presumably like to see their
patches without prefixes. If they use format-patch to review their
series, they'll see prefixes. On the other hand, it is probably a
good idea for them to look at what will actually get sent out.
We could try to play games here with "is stdout a tty", as we do for
color. But that's not a completely reliable signal, and it's
probably not worth the trouble. If you want to see the patch with
the usual bells and whistles, then you are better off using "git
log" or "git show".
- if a project really does have a workflow that likes prefix-less
patches, and the receiver is prepared to use "-p0", then the sender
now has to manually say "--no-prefix" for each format-patch
invocation. That doesn't seem _too_ terrible given that the receiver
has to manually say "-p0" for each git-am invocation.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit b39a5697296659c344cd0a286b51303fd5375fab
Author: Jeff King <peff@peff.net>
Date: Thu Mar 9 01:09:54 2023 -0500
diff: add --default-prefix option
You can change the output of prefixes with diff.noprefix and
diff.mnemonicprefix, but there's no easy way to override them from the
command-line. We do have "--no-prefix", but there's no way to get back
to the default prefix. So let's add an option to do that.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 7c03d0db8807d303540297432455adfa1c45b05e
Author: Jeff King <peff@peff.net>
Date: Thu Mar 9 01:07:45 2023 -0500
t4013: add tests for diff prefix options
We don't have any specific test coverage of diff's various prefix
options. We do incidentally invoke them in a few places, but it's worth
having a more thorough set of tests that covers all of the effects we
expect to see, and that the options kick in at the appropriate times.
This will be especially useful as the next patch adds more options.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 6799aadfdf484135476aaf74f5d2eb825d9f00e8
Author: Jeff King <peff@peff.net>
Date: Thu Mar 9 01:07:06 2023 -0500
diff: factor out src/dst prefix setup
We directly manipulate diffopt's a_prefix and b_prefix to set up either
the default "a/foo" prefix or the "--no-prefix" variant. Although this
is only a few lines, it's worth pulling these into their own functions.
That lets us avoid one repetition already in this patch, but will also
give us a cleaner interface for callers which want to tweak this
setting.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 30e7016218e437458a876b1b91708e5bd4f46131
Merge: bd9eff2779 765071a8f2
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 8 15:18:06 2023 -0800
Merge branch 'fc/advice-diverged-history' into next
After "git pull" that is configured with pull.rebase=false
merge.ff=only fails due to our end having our own development, give
advice messages to get out of the "Not possible to fast-forward"
state.
* fc/advice-diverged-history:
advice: add diverging advice for novices
commit bd9eff27797f69bc133845e67934726ea959157d
Merge: 390cd4f4db 15a4cc912e
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 8 15:18:06 2023 -0800
Merge branch 'ab/fix-strategy-opts-parsing' into next
The code to parse "git rebase -X<opt>" was not prepared to see an
unparsable option string, which has been corrected.
* ab/fix-strategy-opts-parsing:
sequencer.c: fix overflow & segfault in parse_strategy_opts()
commit 390cd4f4db6d9e6ed548140915a710ab957e4543
Merge: 1c421f4a9f 057a59ecf3
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 8 15:18:05 2023 -0800
Merge branch 'ds/reprepare-alternates-when-repreparing-packfiles' into next
Once we start running, we assumed that the list of alternate object
databases would never change. Hook into the machinery used to
update the list of packfiles during runtime to update this list as
well.
* ds/reprepare-alternates-when-repreparing-packfiles:
object-file: reprepare alternates when necessary
commit 15a4cc912e601c1641e549861e284f63e30f562c
Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date: Tue Mar 7 19:21:59 2023 +0100
sequencer.c: fix overflow & segfault in parse_strategy_opts()
The split_cmdline() function introduced in [1] returns an "int". If
it's negative it signifies an error. The option parsing in [2] didn't
account for this, and assigned the value directly to the "size_t
xopts_nr". We'd then attempt to loop over all of these elements, and
access uninitialized memory.
There's a few things that use this for option parsing, but one way to
trigger it is with a bad value to "-X <strategy-option>", e.g:
git rebase -X"bad argument\""
In another context this might be a security issue, but in this case
someone who's already able to inject arguments directly to our
commands would be past other defenses, making this potential
escalation a moot point.
As the example above & test case shows the error reporting leaves
something to be desired. The function will loop over the
whitespace-split values, but when it encounters an error we'll only
report the first element, which is OK, not the second "argument\""
whose quote is unbalanced.
This is an inherent limitation of the current API, and the issue
affects other API users. Let's not attempt to fix that now. If and
when that happens these tests will need to be adjusted to assert the
new output.
1. 2b11e3170e9 (If you have a config containing something like this:,
2006-06-05)
2. ca6c6b45dd9 (sequencer (rebase -i): respect strategy/strategy_opts
settings, 2017-01-02)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 057a59ecf3425f4a6e0f7166c02476244316b35c
Author: Derrick Stolee <derrickstolee@github.com>
Date: Wed Mar 8 18:47:32 2023 +0000
object-file: reprepare alternates when necessary
When an object is not found in a repository's object store, we sometimes
call reprepare_packed_git() to see if the object was temporarily moved
into a new pack-file (and its old pack-file or loose object was
deleted). This process does a scan of each pack directory within each
odb, but does not reevaluate if the odb list needs updating.
Extend reprepare_packed_git() to also reprepate the alternate odb list
by setting loaded_alternates to zero and calling prepare_alt_odb(). This
will add newly-discoverd odbs to the linked list, but will not duplicate
existing ones nor will it remove existing ones that are no longer listed
in the alternates file. Do this under the object read lock to avoid
readers from interacting with a potentially incomplete odb being added
to the odb list.
If the alternates file was edited to _remove_ some alternates during the
course of the Git process, Git will continue to see alternates that were
ever valid for that repository. ODBs are not removed from the list, the
same as the existing behavior before this change. Git already has
protections against an alternate directory disappearing from the
filesystem during the lifetime of a process, and those are still in
effect.
This change is specifically for concurrent changes to the repository, so
it is difficult to create a test that guarantees this behavior is
correct. I manually verified by introducing a reprepare_packed_git() call
into get_revision() and stepped into that call in a debugger with a
parent 'git log' process. Multiple runs of prepare_alt_odb() kept
the_repository->objects->odb as a single-item chain until I added a
.git/objects/info/alternates file in a different process. The next run
added the new odb to the chain and subsequent runs did not add to the
chain.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 765071a8f27fcaae27ce940b3a784b9d586faa12
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date: Tue Mar 7 20:48:33 2023 -0600
advice: add diverging advice for novices
The user might not necessarily know why ff only was configured, maybe an
admin did it, or the installer (Git for Windows), or perhaps they just
followed some online advice.
This can happen not only on pull.ff=only, but merge.ff=only too.
Even worse if the user has configured pull.rebase=false and
merge.ff=only, because in those cases a diverging merge will constantly
keep failing. There's no trivial way to get out of this other than
`git merge --no-ff`.
Let's not assume our users are experts in git who completely understand
all their configurations.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 1c421f4a9fa86e9f6925fd0c75493608a14539fb
Merge: 8ceb58f725 94c4289435
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Mar 7 13:56:35 2023 -0800
Merge branch 'jk/format-patch-change-format-for-empty-commits' into next
"git format-patch" learned to write a log-message only output file
for empty commits.
* jk/format-patch-change-format-for-empty-commits:
format-patch: output header for empty commits
commit 8ceb58f7250d3811aaa46ddbadfc253257904d6c
Merge: 0df2b09e1b 0bbe10313e
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Mar 7 13:56:35 2023 -0800
Merge branch 'jk/bundle-use-dash-for-stdfiles' into next
"git bundle" learned that "-" is a common way to say that the input
comes from the standard input and/or the output goes to the
standard output. It used to work only for output and only from the
root level of the working tree.
* jk/bundle-use-dash-for-stdfiles:
parse-options: use prefix_filename_except_for_dash() helper
parse-options: consistently allocate memory in fix_filename()
bundle: don't blindly apply prefix_filename() to "-"
bundle: document handling of "-" as stdin
bundle: let "-" mean stdin for reading operations
commit 0df2b09e1bc23bbeb6492859266dcae054168386
Merge: 8c7289659a 8b95521edb
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Mar 7 13:56:34 2023 -0800
Merge branch 'jk/bundle-progress' into next
Simplify UI to control progress meter given by "git bundle" command.
* jk/bundle-progress:
bundle: turn on --all-progress-implied by default
commit 8c7289659ac41a7fc8f4c8d45489d5e499f76aa9
Merge: 97d40d926e f7111175df
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Mar 7 13:56:33 2023 -0800
Merge branch 'as/doc-markup-fix' into next
Fix for a mis-mark-up in doc made in Git 2.39 days.
* as/doc-markup-fix:
git-merge-tree.txt: replace spurious HTML entity
commit 97d40d926ee7422876456a84ac38bfc5edc7d9d1
Merge: 7546231ddf 725f57037d
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:56:08 2023 -0800
Sync with Git 2.40-rc2
commit 7546231ddf8e89941792efa626c60ce22e164c3d
Merge: 6ee0ec72ae 894ea94509
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:54 2023 -0800
Merge branch 'rj/avoid-switching-to-already-used-branch' into next
A few subcommands have been taught to stop users from working on a
branch that is being used in another worktree linked to the same
repository.
* rj/avoid-switching-to-already-used-branch:
switch: reject if the branch is already checked out elsewhere (test)
rebase: refuse to switch to a branch already checked out elsewhere (test)
branch: fix die_if_checked_out() when ignore_current_worktree
worktree: introduce is_shared_symref()
commit 6ee0ec72aec3ae24c0df4dce5acd6eb28ba84678
Merge: 3508814a41 1b878cad43
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:53 2023 -0800
Merge branch 'rj/branch-unborn-in-other-worktrees' into next
Error messages given when working on an unborn branch that is
checked out in another worktree have been improvved.
* rj/branch-unborn-in-other-worktrees:
branch: rename orphan branches in any worktree
branch: description for orphan branch errors
branch: avoid unnecessary worktrees traversals
commit 3508814a413e50fc06101be9e13e24e419424bb6
Merge: f08def5949 7fb89047cc
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:52 2023 -0800
Merge branch 'rj/bisect-already-used-branch' into next
Allow "git bisect reset [name]" to check out the named branch (or
the original one) even when the branch is already checked out in a
different worktree linked to the same repository.
* rj/bisect-already-used-branch:
bisect: fix "reset" when branch is checked out elsewhere
commit f08def5949a2f37550847beba34354cba86cb468
Merge: 4ee341853c 7c3c55026c
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:51 2023 -0800
Merge branch 'zh/push-to-delete-onelevel-ref' into next
"git push" has been taught to allow deletion of refs with one-level
names to help repairing a repository who acquired such a ref by
mistake. In general, we don't encourage use of such a ref, and
creation or update to such a ref is rejected as before.
* zh/push-to-delete-onelevel-ref:
push: allow delete single-level ref
receive-pack: fix funny ref error messsage
commit 4ee341853c9cdd7b4268007ac4941677b10d1349
Merge: 5dc1c4c0b7 ee8a88826a
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:51 2023 -0800
Merge branch 'ak/restore-both-incompatible-with-conflicts' into next
"git restore" supports options like "--ours" that are only
meaningful during a conflicted merge, but these options are only
meaningful when updating the working tree files. These options are
marked to be incompatible when both "--staged" and "--worktree" are
in effect.
* ak/restore-both-incompatible-with-conflicts:
restore: fault --staged --worktree with merge opts
commit 5dc1c4c0b7c8f240601ece8e0149d178992b575c
Merge: 60d7d0d493 c5773dc078
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:50 2023 -0800
Merge branch 'ew/commit-reach-clean-up-flags-fix' into next
Fix a segfaulting loop. The function and its caller may need
further clean-up.
* ew/commit-reach-clean-up-flags-fix:
commit-reach: avoid NULL dereference
commit 60d7d0d49329c1c837f0940a2fb956745420d9cd
Merge: 88254d51c5 9fdc79ecba
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon Mar 6 21:55:49 2023 -0800
Merge branch 'ab/avoid-losing-exit-codes-in-tests' into next
Test clean-up.
* ab/avoid-losing-exit-codes-in-tests:
tests: don't lose misc "git" exit codes
tests: don't lose exit status with "test <op> $(git ...)"
tests: don't lose "git" exit codes in "! ( git ... | grep )"
tests: don't lose exit status with "(cd ...; test <op> $(git ...))"
t/lib-patch-mode.sh: fix ignored exit codes
auto-crlf tests: don't lose exit code in loops and outside tests
commit 0bbe10313e0b61812082d47431e8648f9df48f15
Author: Jeff King <peff@peff.net>
Date: Sat Mar 4 05:31:47 2023 -0500
parse-options: use prefix_filename_except_for_dash() helper
Since our fix_filename()'s only remaining special case is handling "-",
we can use the newly-minted helper function that handles this already.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 7ce4088ab78e06fc5c4ae42fc75b65a48bf7b3ff
Author: Jeff King <peff@peff.net>
Date: Sat Mar 4 05:31:22 2023 -0500
parse-options: consistently allocate memory in fix_filename()
When handling OPT_FILENAME(), we have to stick the "prefix" (if any) in
front of the filename to make up for the fact that Git has chdir()'d to
the top of the repository. We can do this with prefix_filename(), but
there are a few special cases we handle ourselves.
Unfortunately the memory allocation is inconsistent here; if we do make
it to prefix_filename(), we'll allocate a string which the caller must
free to avoid a leak. But if we hit our special cases, we'll return the
string as-is, and a caller which tries to free it will crash. So there's
no way to win.
Let's consistently allocate, so that callers can do the right thing.
There are now three cases to care about in the function (and hence a
three-armed if/else):
1. we got a NULL input (and should leave it as NULL, though arguably
this is the sign of a bug; let's keep the status quo for now and we
can pick at that scab later)
2. we hit a special case that means we leave the name intact; we
should duplicate the string. This includes our special "-"
matching. Prior to this patch, it also included empty prefixes and
absolute filenames. But we can observe that prefix_filename()
already handles these, so we don't need to detect them.
3. everything else goes to prefix_filename()
I've dropped the "const" from the "char **file" parameter to indicate
that we're allocating, though in practice it's not really important.
This is all being shuffled through a void pointer via opt->value before
it hits code which ever looks at the string. And it's even a bit weird,
because we are really taking _in_ a const string and using the same
out-parameter for a non-const string. A better function signature would
be:
static char *fix_filename(const char *prefix, const char *file);
but that would mean the caller dereferences the double-pointer (and the
NULL check is currently handled inside this function). So I took the
path of least-change here.
Note that we have to fix several callers in this commit, too, or we'll
break the leak-checking tests. These are "new" leaks in the sense that
they are now triggered by the test suite, but these spots have always
been leaky when Git is run in a subdirectory of the repository. I fixed
all of the cases that trigger with GIT_TEST_PASSING_SANITIZE_LEAK. There
may be others in scripts that have other leaks, but we can fix them
later along with those other leaks (and again, you _couldn't_ fix them
before this patch, so this is the necessary first step).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit a8bfa99d443d3c461217db4924f8eca24caa055a
Author: Junio C Hamano <gitster@pobox.com>
Date: Sat Mar 4 05:27:56 2023 -0500
bundle: don't blindly apply prefix_filename() to "-"
A user can specify a filename to a command from the command line,
either as the value given to a command line option, or a command
line argument. When it is given as a relative filename, in the
user's mind, it is relative to the directory "git" was started from,
but by the time the filename is used, "git" would almost always have
chdir()'ed up to the root level of the working tree.
The given filename, if it is relative, needs to be prefixed with the
path to the current directory, and it typically is done by calling
prefix_filename() helper function. For commands that can also take
"-" to use the standard input or the standard output, however, this
needs to be done with care.
"git bundle create" uses the next word on the command line as the
output filename, and can take "-" to mean "write to the standard
output". It blindly called prefix_filename(), so running it in a
subdirectory did not quite work as expected.
Introduce a new helper, prefix_filename_except_for_dash(), and use
it to help "git bundle create" codepath.
Reported-by: Michael Henry
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit ef3b291a5f19d7e3b7f4cc4524003e50d40614f7
Author: Jeff King <peff@peff.net>
Date: Sat Mar 4 05:26:40 2023 -0500
bundle: document handling of "-" as stdin
We have always allowed "bundle create -" to write to stdout, but it was
never documented. And a recent patch let reading operations like "bundle
list-heads -" read from stdin.
Let's document all of these cases.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit bf8b1e04ffa3bb6c64bb8ae50ec825b128ef957d
Author: Jeff King <peff@peff.net>
Date: Sat Mar 4 05:26:14 2023 -0500
bundle: let "-" mean stdin for reading operations
For writing, "bundle create -" indicates that the bundle should be
written to stdout. But there's no matching handling of "-" for reading
operations. This is inconsistent, and a little inflexible (though one
can always use "/dev/stdin" on systems that support it).
However, it's easy to change. Once upon a time, the bundle-reading code
required a seekable descriptor, but that was fixed long ago in
e9ee84cf28b (bundle: allowing to read from an unseekable fd,
2011-10-13). So we just need to handle "-" explicitly when opening the
file.
We _could_ do this by handling "-" in read_bundle_header(), which the
reading functions all call already. But that is probably a bad idea.
It's also used by low-level code like the transport functions, and we
may want to be more careful there. We do not know that stdin is even
available to us, and certainly we would not want to get confused by a
configured URL that happens to point to "-".
So instead, let's add a helper to builtin/bundle.c. Since both the
bundle code and some of the callers refer to the bundle by name for
error messages, let's use the string "<stdin>" to make the output a bit
nicer to read.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit f7111175df0fe258784d6f18ee86f019e889676f
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Sat Mar 4 18:00:46 2023 +0100
git-merge-tree.txt: replace spurious HTML entity
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 8b95521edb2a449a9b85064ee49821438d1ffca2
Author: Jeff King <peff@peff.net>
Date: Sat Mar 4 05:55:13 2023 -0500
bundle: turn on --all-progress-implied by default
In 79862b6b77c (bundle-create: progress output control, 2019-11-10),
"bundle create" learned about the --all-progress and
--all-progress-implied options, which were copied from pack-objects.
I think these were a mistake.
In pack-objects, "all-progress-implied" is about switching the behavior
between a regular on-disk "git repack" and the use of pack-objects for
push/fetch (where a fetch does not want progress from the server during
the write stage; the client will print progress as it receives the
data). But there's no such distinction for bundles. Prior to
79862b6b77c, we always printed the write stage. Afterwards, a vanilla:
git bundle create foo.bundle
omits the write progress, appearing to hang (especially if your
repository is large or your disk is slow). That seems like a regression.
It's possible that the flexibility to disable the write-phase progress
_could_ be useful for bundle. E.g., if you did something like:
ssh some-host git bundle create foo.bundle |
git bundle unbundle
But if you are running both in real-time, why are you using bundles in
the first place? You're better off doing a real fetch.
But even if we did want to support that, it should be the exception, and
vanilla "bundle create" should display the full progress. So we'd want
to name the option "--no-write-progress" or something.
The "--all-progress" option itself is even worse. It exists in
pack-objects only for historical reasons. It's a mistake because it
implies "--progress", and we added "--all-progress-implied" to fix that.
There is no reason to propagate that mistake to new commands.
Likewise, the documentation for these options was pulled from
pack-objects. But it doesn't make any sense in this context. It talks
about "--stdout", but that is not even an option that git-bundle
supports.
This patch flips the default for "--all-progress-implied" back to
"true", fixing the regression in 79862b6b77c. This turns that option
into a noop, and means that "--all-progress" is really the same as
"--progress". We _could_ drop them completely, but since they've been
shipped with Git since v2.25.0, it's polite to continue accepting them.
I didn't implement any sort of "--no-write-progress" here. I'm not at
all convinced it's necessary, and the discussion from the original
thread:
https://lore.kernel.org/git/20191110204126.30553-2-robbat2@gentoo.org/
shows that that the main focus was on getting --progress and --quiet
support, and not any kind of clever "real-time bundle over the network"
feature. But technically this patch is making it impossible to do
something that you _could_ do post-79862b6b77c.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit d7a6192c0e836095fb764e0b62080c8d670ee266
Author: Calvin Wan <calvinwan@google.com>
Date: Fri Mar 3 21:47:58 2023 +0000
debian: new "next" snapshot
Change-Id: Ia7b4282869edff6a900552a3db407c2dc2f1f785
Signed-off-by: Calvin Wan <calvinwan@google.com>
commit f040a92cb4df43ca264cacd0a64c7c2285d9def3
Merge: d429f1c57e 88254d51c5
Author: Calvin Wan <calvinwan@google.com>
Date: Fri Mar 3 21:45:22 2023 +0000
Merge branch 'next' into debian-experimental
Change-Id: Ib4fa5490b6345bd61135ea9e29d891c14ba1db63
Signed-off-by: Calvin Wan <calvinwan@google.com>
commit 94c4289435605a9c39951ccebaf82f131e07c255
Author: John Keeping <john@keeping.me.uk>
Date: Fri Mar 3 16:03:01 2023 +0000
format-patch: output header for empty commits
When formatting an empty commit, it is surprising that a totally empty
file is generated. Set the flag to always print the header, matching
the behaviour of git-log.
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 88254d51c5b526a5bbc1adb3ab56675d64ec92ae
Merge: e12885d4f5 d15644fe02
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 1 13:27:22 2023 -0800
Sync with 'master'
commit e12885d4f5a6a5e9a900ddf12ad1635bcc81869b
Merge: f28c0df111 ef7d4f53c2
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 1 08:21:46 2023 -0800
Sync with Git 2.40-rc1
* commit 'v2.40.0-rc1^0':
Git 2.40-rc1
commit f28c0df111f83ec403ef03767d579f44619a5cd8
Merge: 19f9ce8c40 f17a1542b2
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 1 08:21:29 2023 -0800
Merge branch 'fz/rebase-msg-update' into next
Message update.
* fz/rebase-msg-update:
rebase: fix capitalisation autoSquash in i18n string
commit 19f9ce8c40ee8f70be8aa05f32287548a536653e
Merge: 6a7eece733 31a431b18b
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 1 08:21:28 2023 -0800
Merge branch 'gm/signature-format-doc' into next
Doc update.
* gm/signature-format-doc:
signature-format.txt: note SSH and X.509 signature delimiters
commit 6a7eece733c1ba4689360733db3fa5ea44523872
Merge: 221deaecd7 c6ce27ab08
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Mar 1 08:21:28 2023 -0800
Merge branch 'ew/fetch-hiderefs' into next
A new "fetch.hideRefs" option can be used to exclude specified refs
from "rev-list --objects --stdin --not --all" traversal for
checking object connectivity, most useful when there are many
unrelated histories in a single repository.
* ew/fetch-hiderefs:
fetch: support hideRefs to speed up connectivity checks
commit 7c3c55026c25f038d790d21fb7242229a9a08fed
Author: ZheNing Hu <adlternative@gmail.com>
Date: Wed Mar 1 10:20:29 2023 +0000
push: allow delete single-level ref
We discourage the creation/update of single-level refs
because some upper-layer applications only work in specified
reference namespaces, such as "refs/heads/*" or "refs/tags/*",
these single-level refnames may not be recognized. However,
we still hope users can delete them which have been created
by mistake.
Therefore, when updating branches on the server with
"git receive-pack", by checking whether it is a branch deletion
operation, it will determine whether to allow the update of
a single-level refs. This avoids creating/updating such
single-level refs, but allows them to be deleted.
On the client side, "git push" also does not properly fill in
the old-oid of single-level refs, which causes the server-side
"git receive-pack" to think that the ref's old-oid has changed
when deleting single-level refs, this causes the push to be
rejected. So the solution is to fix the client to be able to
delete single-level refs by properly filling old-oid.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit d81ba50a9b044d51039fc1a45fb6685d631d1dfe
Author: ZheNing Hu <adlternative@gmail.com>
Date: Wed Mar 1 10:20:28 2023 +0000
receive-pack: fix funny ref error messsage
When the user deletes the remote one level branch through
"git push origin -d refs/foo", remote will return an error:
"refusing to create funny ref 'refs/foo' remotely", here we
are not creating "refs/foo" instead wants to delete it, so a
better error description here would be: "refusing to update
funny ref 'refs/foo' remotely".
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 221deaecd74407833432615052c9d1cb089de3f8
Merge: 82f1929a15 454dfcbddf
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Feb 28 16:42:14 2023 -0800
Sync with 'master'
commit 82f1929a152914b05e30a41d4645699acc3a0e67
Merge: 89c9bd4b8f d9165bef58
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Feb 28 16:42:02 2023 -0800
Merge branch 'rs/range-diff-custom-abbrev-fix' into next
* rs/range-diff-custom-abbrev-fix:
range-diff: avoid compiler warning when char is unsigned