]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/t5563-portability-fix'
authorJunio C Hamano <gitster@pobox.com>
Sat, 1 Apr 2023 00:50:23 +0000 (17:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 1 Apr 2023 00:50:23 +0000 (17:50 -0700)
Test portability fix.

* js/t5563-portability-fix:
  t5563: prevent "ambiguous redirect"

589 files changed:
.gitattributes
.gitignore
Documentation/CodingGuidelines
Documentation/Makefile
Documentation/RelNotes/2.30.8.txt [new file with mode: 0644]
Documentation/RelNotes/2.31.7.txt [new file with mode: 0644]
Documentation/RelNotes/2.32.6.txt [new file with mode: 0644]
Documentation/RelNotes/2.33.7.txt [new file with mode: 0644]
Documentation/RelNotes/2.34.7.txt [new file with mode: 0644]
Documentation/RelNotes/2.35.7.txt [new file with mode: 0644]
Documentation/RelNotes/2.36.5.txt [new file with mode: 0644]
Documentation/RelNotes/2.37.6.txt [new file with mode: 0644]
Documentation/RelNotes/2.38.4.txt [new file with mode: 0644]
Documentation/RelNotes/2.39.2.txt [new file with mode: 0644]
Documentation/RelNotes/2.39.3.txt [new file with mode: 0644]
Documentation/RelNotes/2.40.0.txt
Documentation/RelNotes/2.41.0.txt [new file with mode: 0644]
Documentation/config/add.txt
Documentation/config/advice.txt
Documentation/config/bundle.txt
Documentation/config/fetch.txt
Documentation/config/format.txt
Documentation/config/gpg.txt
Documentation/diff-options.txt
Documentation/git-add.txt
Documentation/git-am.txt
Documentation/git-archive.txt
Documentation/git-bundle.txt
Documentation/git-credential.txt
Documentation/git-hook.txt
Documentation/git-ls-remote.txt
Documentation/git-merge-tree.txt
Documentation/git-rev-parse.txt
Documentation/gitattributes.txt
Documentation/gitcredentials.txt
Documentation/gitformat-index.txt
Documentation/gitformat-signature.txt
Documentation/howto/new-command.txt
Documentation/manpage-quote-apos.xsl [deleted file]
Documentation/rev-list-options.txt
Documentation/technical/bundle-uri.txt
Documentation/urls-remotes.txt
GIT-VERSION-GEN
INSTALL
Makefile
RelNotes
abspath.c
add-interactive.c
add-patch.c
advice.c
advice.h
alias.c
alloc.c
alloc.h
apply.c
archive-tar.c
archive-zip.c
archive.c
archive.h
attr.c
bisect.c
blame.c
blame.h
blob.c
branch.c
builtin/add.c
builtin/am.c
builtin/archive.c
builtin/bisect.c
builtin/blame.c
builtin/bundle.c
builtin/cat-file.c
builtin/check-mailmap.c
builtin/checkout--worker.c
builtin/checkout.c
builtin/clean.c
builtin/clone.c
builtin/commit-graph.c
builtin/commit-tree.c
builtin/commit.c
builtin/config.c
builtin/count-objects.c
builtin/credential-cache--daemon.c
builtin/describe.c
builtin/diff-tree.c
builtin/difftool.c
builtin/fast-export.c
builtin/fast-import.c
builtin/fetch-pack.c
builtin/fetch.c
builtin/fsck.c
builtin/fsmonitor--daemon.c
builtin/gc.c
builtin/grep.c
builtin/hash-object.c
builtin/hook.c
builtin/index-pack.c
builtin/log.c
builtin/ls-files.c
builtin/ls-remote.c
builtin/ls-tree.c
builtin/merge-base.c
builtin/merge-index.c
builtin/merge-tree.c
builtin/merge.c
builtin/mktag.c
builtin/mktree.c
builtin/mv.c
builtin/name-rev.c
builtin/notes.c
builtin/pack-objects.c
builtin/pack-redundant.c
builtin/patch-id.c
builtin/prune.c
builtin/pull.c
builtin/push.c
builtin/read-tree.c
builtin/rebase.c
builtin/receive-pack.c
builtin/reflog.c
builtin/repack.c
builtin/replace.c
builtin/reset.c
builtin/rev-list.c
builtin/rev-parse.c
builtin/revert.c
builtin/rm.c
builtin/send-pack.c
builtin/show-branch.c
builtin/show-index.c
builtin/show-ref.c
builtin/sparse-checkout.c
builtin/stash.c
builtin/submodule--helper.c
builtin/tag.c
builtin/unpack-file.c
builtin/unpack-objects.c
builtin/update-index.c
builtin/upload-pack.c
builtin/var.c
builtin/verify-commit.c
builtin/verify-tag.c
builtin/worktree.c
builtin/write-tree.c
bulk-checkin.c
bundle-uri.c
bundle-uri.h
bundle.c
cache-tree.c
cache-tree.h
cache.h
cbtree.c
cbtree.h
checkout.h
chunk-format.c
chunk-format.h
ci/run-build-and-tests.sh
color.c
combine-diff.c
commit-graph.c
commit-graph.h
commit-reach.c
commit-slab-impl.h
commit.c
commit.h
compat/fsmonitor/fsm-ipc-darwin.c
compat/fsmonitor/fsm-ipc-win32.c
compat/fsmonitor/fsm-settings-darwin.c
compat/mingw.c
compat/winansi.c
config.c
config.h
config.mak.uname
connect.c
connect.h
connected.c
contrib/coccinelle/index-compatibility.cocci
contrib/coccinelle/index-compatibility.pending.cocci [deleted file]
contrib/completion/git-prompt.sh
contrib/subtree/t/Makefile
convert.c
credential.c
credential.h
daemon.c
decorate.c
delta-islands.c
delta-islands.h
diagnose.c
diagnose.h
diff-lib.c
diff-merges.c
diff-no-index.c
diff.c
diff.h
diffcore-delta.c
diffcore-order.c
diffcore-pickaxe.c
diffcore-rename.c
diffcore-rotate.c
diffcore.h
dir-iterator.c
dir-iterator.h
dir.c
dir.h
entry.c
entry.h
environment.c
ewah/bitmap.c
ewah/ewah_bitmap.c
fetch-pack.c
fmt-merge-msg.c
fsck.c
fsck.h
fsmonitor-settings.c
git-add--interactive.perl [deleted file]
git-compat-util.h
git.c
gpg-interface.c
gpg-interface.h
graph.c
grep.c
grep.h
hash.h
hashmap.c
help.c
hex.c
hex.h [new file with mode: 0644]
hook.c
hook.h
http-backend.c
http-fetch.c
http-push.c
http-walker.c
http.c
ident.c
ident.h [new file with mode: 0644]
imap-send.c
json-writer.c
khash.h
kwset.c
levenshtein.c
line-log.c
line-log.h
linear-assignment.c
list-objects-filter-options.c
list-objects-filter-options.h
list-objects-filter.c
list-objects.c
log-tree.c
ls-refs.c
mailinfo.c
match-trees.c
mem-pool.c
merge-blobs.c
merge-ort.c
merge-recursive.c
merge.c
midx.c
negotiator/noop.c
negotiator/skipping.c
notes-merge.c
notes.c
object-file.c
object-name.c
object-store.h
object.c
object.h
oid-array.c
oidmap.c
oidmap.h
oidset.c
oidtree.c
oss-fuzz/fuzz-commit-graph.c
oss-fuzz/fuzz-pack-headers.c
oss-fuzz/fuzz-pack-idx.c
pack-bitmap-write.c
pack-bitmap.c
pack-check.c
pack-mtimes.h
pack-objects.c
pack-write.c
packfile.c
parallel-checkout.c
parse-options.c
parse-options.h
patch-ids.c
path.c
pathspec.c
pathspec.h
pkt-line.c
pkt-line.h
po/bg.po
po/ca.po
po/de.po
po/fr.po
po/id.po
po/sv.po
po/tr.po
po/zh_CN.po
pretty.c
pretty.h
prio-queue.c
progress.c
promisor-remote.c
protocol-caps.c
prune-packed.c
quote.c
range-diff.c
reachable.c
read-cache.c
rebase.c
ref-filter.c
ref-filter.h
reflog-walk.c
reflog-walk.h
refs.c
refs/debug.c
refs/files-backend.c
refs/packed-backend.c
refs/ref-cache.c
refs/refs-internal.h
refspec.c
remote-curl.c
remote.c
remote.h
replace-object.c
replace-object.h
repo-settings.c
repository.h
rerere.c
reset.c
revision.c
revision.h
run-command.c
send-pack.c
sequencer.c
sequencer.h
serve.c
server-info.c
sha1dc_git.c
shallow.c
shallow.h
shell.c
sigchain.c
sparse-index.c
split-index.c
statinfo.h [new file with mode: 0644]
strbuf.c
string-list.c
strvec.c
sub-process.c
sub-process.h
submodule-config.c
submodule-config.h
submodule.c
t/Makefile
t/README
t/aggregate-results.sh
t/helper/test-bloom.c
t/helper/test-cache-tree.c
t/helper/test-crontab.c
t/helper/test-ctype.c
t/helper/test-dir-iterator.c
t/helper/test-dump-cache-tree.c
t/helper/test-dump-split-index.c
t/helper/test-dump-untracked-cache.c
t/helper/test-example-decorate.c
t/helper/test-fast-rebase.c
t/helper/test-genzeros.c
t/helper/test-hash.c
t/helper/test-json-writer.c
t/helper/test-match-trees.c
t/helper/test-oid-array.c
t/helper/test-oidmap.c
t/helper/test-oidtree.c
t/helper/test-pack-mtimes.c
t/helper/test-parse-pathspec-file.c
t/helper/test-partial-clone.c
t/helper/test-pcre2-config.c
t/helper/test-prio-queue.c
t/helper/test-proc-receive.c
t/helper/test-reach.c
t/helper/test-read-midx.c
t/helper/test-ref-store.c
t/helper/test-repository.c
t/helper/test-run-command.c
t/helper/test-sigchain.c
t/helper/test-simple-ipc.c
t/helper/test-submodule-nested-repo-config.c
t/helper/test-wildmatch.c
t/lib-diff-alternative.sh
t/lib-httpd.sh
t/lib-httpd/apache.conf
t/lib-httpd/proxy-passwd [new file with mode: 0644]
t/lib-httpd/ssl.cnf
t/lib-patch-mode.sh
t/lib-rebase.sh
t/lib-submodule-update.sh
t/t0001-init.sh
t/t0002-gitfile.sh
t/t0023-crlf-am.sh
t/t0027-auto-crlf.sh
t/t0055-beyond-symlinks.sh
t/t0060-path-utils.sh
t/t0066-dir-iterator.sh
t/t0100-previous.sh
t/t0300-credentials.sh
t/t1301-shared-repo.sh
t/t1302-repo-version.sh
t/t1304-default-acl.sh
t/t1401-symbolic-ref.sh
t/t1408-packed-refs.sh
t/t1410-reflog.sh
t/t1416-ref-transaction-hooks.sh
t/t1450-fsck.sh
t/t1451-fsck-buffer.sh
t/t1504-ceiling-dirs.sh
t/t1507-rev-parse-upstream.sh
t/t1800-hook.sh
t/t2005-checkout-index-symlinks.sh
t/t2015-checkout-unborn.sh
t/t2016-checkout-patch.sh
t/t2021-checkout-overwrite.sh
t/t2060-switch.sh
t/t2070-restore.sh
t/t2401-worktree-prune.sh
t/t2402-worktree-list.sh
t/t2406-worktree-repair.sh
t/t3013-ls-files-format.sh
t/t3200-branch.sh
t/t3206-range-diff.sh
t/t3210-pack-refs.sh
t/t3400-rebase.sh
t/t3404-rebase-interactive.sh
t/t3405-rebase-malformed.sh
t/t3412-rebase-root.sh
t/t3416-rebase-onto-threedots.sh
t/t3419-rebase-patch-id.sh
t/t3423-rebase-reword.sh
t/t3425-rebase-topology-merges.sh
t/t3431-rebase-fork-point.sh
t/t3432-rebase-fast-forward.sh
t/t3436-rebase-more-options.sh
t/t3437-rebase-fixup-options.sh
t/t3438-rebase-broken-files.sh
t/t3501-revert-cherry-pick.sh
t/t3502-cherry-pick-merge.sh
t/t3503-cherry-pick-root.sh
t/t3506-cherry-pick-ff.sh
t/t3511-cherry-pick-x.sh
t/t3700-add.sh
t/t3701-add-interactive.sh
t/t3800-mktag.sh
t/t4013-diff-various.sh
t/t4014-format-patch.sh
t/t4018/java-class-brace-on-separate-line [new file with mode: 0644]
t/t4018/java-class-space-before-type-parameters [new file with mode: 0644]
t/t4018/java-class-type-parameters [new file with mode: 0644]
t/t4018/java-class-type-parameters-implements [new file with mode: 0644]
t/t4018/java-interface-type-parameters [new file with mode: 0644]
t/t4018/java-interface-type-parameters-extends [new file with mode: 0644]
t/t4018/java-non-sealed [new file with mode: 0644]
t/t4018/java-record [new file with mode: 0644]
t/t4018/java-record-space-before-components [new file with mode: 0644]
t/t4018/java-record-type-parameters [new file with mode: 0644]
t/t4018/java-sealed [new file with mode: 0644]
t/t4018/java-sealed-permits [new file with mode: 0644]
t/t4018/java-sealed-type-parameters [new file with mode: 0644]
t/t4018/java-sealed-type-parameters-implements-permits [new file with mode: 0644]
t/t4018/java-sealed-type-parameters-permits [new file with mode: 0644]
t/t4115-apply-symlink.sh
t/t4152-am-subjects.sh
t/t4254-am-corrupt.sh
t/t4256-am-format-flowed.sh
t/t4257-am-interactive.sh
t/t5000-tar-tree.sh
t/t5001-archive-attr.sh
t/t5004-archive-corner-cases.sh
t/t5302-pack-index.sh
t/t5306-pack-nobase.sh
t/t5312-prune-corruption.sh
t/t5317-pack-objects-filter-objects.sh
t/t5319-multi-pack-index.sh
t/t5330-no-lazy-fetch-with-commit-graph.sh
t/t5403-post-checkout-hook.sh
t/t5405-send-pack-rewind.sh
t/t5406-remote-rejects.sh
t/t5502-quickfetch.sh
t/t5504-fetch-receive-strict.sh
t/t5507-remote-environment.sh
t/t5510-fetch.sh
t/t5514-fetch-multiple.sh
t/t5516-fetch-push.sh
t/t5522-pull-symlink.sh
t/t5523-push-upstream.sh
t/t5526-fetch-submodules.sh
t/t5527-fetch-odd-refs.sh
t/t5529-push-errors.sh
t/t5541-http-push-smart.sh
t/t5546-receive-limits.sh
t/t5547-push-quarantine.sh
t/t5551-http-fetch-smart.sh
t/t5558-clone-bundle-uri.sh
t/t5559-http-fetch-smart-http2.sh
t/t5560-http-backend-noserver.sh
t/t5561-http-backend.sh
t/t5562-http-backend-content-length.sh
t/t5564-http-proxy.sh [new file with mode: 0755]
t/t5573-pull-verify-signatures.sh
t/t5601-clone.sh
t/t5604-clone-reference.sh
t/t5605-clone-local.sh
t/t5606-clone-options.sh
t/t5613-info-alternate.sh
t/t5619-clone-local-ambiguous-transport.sh [new file with mode: 0755]
t/t5702-protocol-v2.sh
t/t5705-session-id-in-capabilities.sh
t/t5750-bundle-uri-parse.sh
t/t5810-proto-disable-local.sh
t/t5813-proto-disable-ssh.sh
t/t6011-rev-list-with-bad-commit.sh
t/t6014-rev-list-all.sh
t/t6018-rev-list-glob.sh
t/t6020-bundle-misc.sh
t/t6021-rev-list-exclude-hidden.sh
t/t6030-bisect-porcelain.sh
t/t6120-describe.sh
t/t6132-pathspec-exclude.sh
t/t6439-merge-co-error-msgs.sh
t/t6501-freshen-objects.sh
t/t7031-verify-tag-signed-ssh.sh
t/t7105-reset-patch.sh
t/t7106-reset-unborn-branch.sh
t/t7107-reset-pathspec-file.sh
t/t7301-clean-interactive.sh
t/t7402-submodule-rebase.sh
t/t7403-submodule-sync.sh
t/t7409-submodule-detached-work-tree.sh
t/t7416-submodule-dash-url.sh
t/t7450-bad-git-dotfiles.sh
t/t7504-commit-msg-hook.sh
t/t7510-signed-commit.sh
t/t7516-commit-races.sh
t/t7612-merge-verify-signatures.sh
t/t7701-repack-unpack-unreachable.sh
t/t7810-grep.sh
t/t9106-git-svn-commit-diff-clobber.sh
t/t9164-git-svn-dcommit-concurrent.sh
t/t9700-perl-git.sh
t/t9903-bash-prompt.sh
t/test-lib-functions.sh
t/test-lib.sh
tag.c
thread-utils.c
trace.c
trace.h
trace2.c
trace2/tr2_ctr.c
trace2/tr2_sid.c
trace2/tr2_sysenv.c
trace2/tr2_tbuf.c
trace2/tr2_tgt_event.c
trace2/tr2_tgt_normal.c
trace2/tr2_tgt_perf.c
trace2/tr2_tls.c
trace2/tr2_tmr.c
trailer.c
transport-helper.c
transport.c
tree-walk.c
tree-walk.h
tree.c
unicode-width.h
unix-socket.c
unix-stream-server.c
unpack-trees.c
unpack-trees.h
upload-pack.c
url.c
urlmatch.c
userdiff.c
userdiff.h
walker.c
wildmatch.c
worktree.c
worktree.h
wt-status.c
xdiff-interface.c
xdiff-interface.h

index b0044cf272fec9b987e99c600d6a95bc357261c3..158c3d45c4c10cb19c7d3fb02d6bfdaf7a1794f1 100644 (file)
@@ -1,17 +1,17 @@
 * whitespace=!indent,trail,space
 *.[ch] whitespace=indent,trail,space diff=cpp
-*.sh whitespace=indent,trail,space eol=lf
-*.perl eol=lf diff=perl
-*.pl eof=lf diff=perl
-*.pm eol=lf diff=perl
-*.py eol=lf diff=python
-*.bat eol=crlf
+*.sh whitespace=indent,trail,space text eol=lf
+*.perl text eol=lf diff=perl
+*.pl text eof=lf diff=perl
+*.pm text eol=lf diff=perl
+*.py text eol=lf diff=python
+*.bat text eol=crlf
 CODE_OF_CONDUCT.md -whitespace
-/Documentation/**/*.txt eol=lf
-/command-list.txt eol=lf
-/GIT-VERSION-GEN eol=lf
-/mergetools/* eol=lf
-/t/oid-info/* eol=lf
+/Documentation/**/*.txt text eol=lf
+/command-list.txt text eol=lf
+/GIT-VERSION-GEN text eol=lf
+/mergetools/* text eol=lf
+/t/oid-info/* text eol=lf
 /Documentation/git-merge.txt conflict-marker-size=32
 /Documentation/gitk.txt conflict-marker-size=32
 /Documentation/user-manual.txt conflict-marker-size=32
index 6782f3cecac67b06a26a42c7d79d14026380e109..e875c5905455885b174a4591aa5bb3cc2fd0bae2 100644 (file)
@@ -14,7 +14,6 @@
 /bin-wrappers/
 /git
 /git-add
-/git-add--interactive
 /git-am
 /git-annotate
 /git-apply
index 9d5c27807a40bcf597c6266b848d89f15afb5165..003393ed161dab04a5c73269d49fa2e2f2fdd1f6 100644 (file)
@@ -442,8 +442,12 @@ For C programs:
    detail.
 
  - The first #include in C files, except in platform specific compat/
-   implementations, must be either "git-compat-util.h", "cache.h" or
-   "builtin.h".  You do not have to include more than one of these.
+   implementations and sha1dc/, must be either "git-compat-util.h" or
+   one of the approved headers that includes it first for you.  (The
+   approved headers currently include "cache.h", "builtin.h",
+   "t/helper/test-tool.h", "xdiff/xinclude.h", or
+   "reftable/system.h").  You do not have to include more than one of
+   these.
 
  - A C file must directly include the header files that declare the
    functions and the types it uses, except for the functions and types
index 9c67c3a1c50d4b87853a1cb2fcbfd6f0619d118c..a6ba5bd460208b099b9281fafb5d1a65db4b2937 100644 (file)
@@ -191,14 +191,6 @@ MAN_BASE_URL = file://$(htmldir)/
 endif
 XMLTO_EXTRA += -m manpage-base-url.xsl
 
-# If your target system uses GNU groff, it may try to render
-# apostrophes as a "pretty" apostrophe using unicode.  This breaks
-# cut&paste, so you should set GNU_ROFF to force them to be ASCII
-# apostrophes.  Unfortunately does not work with non-GNU roff.
-ifdef GNU_ROFF
-XMLTO_EXTRA += -m manpage-quote-apos.xsl
-endif
-
 ifdef USE_ASCIIDOCTOR
 ASCIIDOC = asciidoctor
 ASCIIDOC_CONF =
diff --git a/Documentation/RelNotes/2.30.8.txt b/Documentation/RelNotes/2.30.8.txt
new file mode 100644 (file)
index 0000000..5ed3efb
--- /dev/null
@@ -0,0 +1,51 @@
+Git v2.30.8 Release Notes
+=========================
+
+This release addresses the security issues CVE-2023-22490 and
+CVE-2023-23946.
+
+
+Fixes since v2.30.7
+-------------------
+
+ * CVE-2023-22490:
+
+   Using a specially-crafted repository, Git can be tricked into using
+   its local clone optimization even when using a non-local transport.
+   Though Git will abort local clones whose source $GIT_DIR/objects
+   directory contains symbolic links (c.f., CVE-2022-39253), the objects
+   directory itself may still be a symbolic link.
+
+   These two may be combined to include arbitrary files based on known
+   paths on the victim's filesystem within the malicious repository's
+   working copy, allowing for data exfiltration in a similar manner as
+   CVE-2022-39253.
+
+ * CVE-2023-23946:
+
+   By feeding a crafted input to "git apply", a path outside the
+   working tree can be overwritten as the user who is running "git
+   apply".
+
+ * A mismatched type in `attr.c::read_attr_from_index()` which could
+   cause Git to errantly reject attributes on Windows and 32-bit Linux
+   has been corrected.
+
+Credit for finding CVE-2023-22490 goes to yvvdwf, and the fix was
+developed by Taylor Blau, with additional help from others on the
+Git security mailing list.
+
+Credit for finding CVE-2023-23946 goes to Joern Schneeweisz, and the
+fix was developed by Patrick Steinhardt.
+
+
+Johannes Schindelin (1):
+      attr: adjust a mismatched data type
+
+Patrick Steinhardt (1):
+      apply: fix writing behind newly created symbolic links
+
+Taylor Blau (3):
+      t5619: demonstrate clone_local() with ambiguous transport
+      clone: delay picking a transport until after get_repo_path()
+      dir-iterator: prevent top-level symlinks without FOLLOW_SYMLINKS
diff --git a/Documentation/RelNotes/2.31.7.txt b/Documentation/RelNotes/2.31.7.txt
new file mode 100644 (file)
index 0000000..dd44d5b
--- /dev/null
@@ -0,0 +1,6 @@
+Git v2.31.7 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8 to
+address the security issues CVE-2023-22490 and CVE-2023-23946;
+see the release notes for that version for details.
diff --git a/Documentation/RelNotes/2.32.6.txt b/Documentation/RelNotes/2.32.6.txt
new file mode 100644 (file)
index 0000000..fd65961
--- /dev/null
@@ -0,0 +1,6 @@
+Git v2.32.6 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8 and v2.31.7
+to address the security issues CVE-2023-22490 and CVE-2023-23946;
+see the release notes for these versions for details.
diff --git a/Documentation/RelNotes/2.33.7.txt b/Documentation/RelNotes/2.33.7.txt
new file mode 100644 (file)
index 0000000..078a837
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.33.7 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7
+and v2.32.6 to address the security issues CVE-2023-22490 and
+CVE-2023-23946; see the release notes for these versions for
+details.
diff --git a/Documentation/RelNotes/2.34.7.txt b/Documentation/RelNotes/2.34.7.txt
new file mode 100644 (file)
index 0000000..88898ad
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.34.7 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7,
+v2.32.6 and v2.33.7 to address the security issues CVE-2023-22490
+and CVE-2023-23946; see the release notes for these versions
+for details.
diff --git a/Documentation/RelNotes/2.35.7.txt b/Documentation/RelNotes/2.35.7.txt
new file mode 100644 (file)
index 0000000..42baabf
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.35.7 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7,
+v2.32.6, v2.33.7 and v2.34.7 to address the security issues
+CVE-2023-22490 and CVE-2023-23946; see the release notes for
+these versions for details.
diff --git a/Documentation/RelNotes/2.36.5.txt b/Documentation/RelNotes/2.36.5.txt
new file mode 100644 (file)
index 0000000..8a098c7
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.36.5 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7,
+v2.32.6, v2.33.7, v2.34.7 and v2.35.7 to address the security
+issues CVE-2023-22490 and CVE-2023-23946; see the release notes
+for these versions for details.
diff --git a/Documentation/RelNotes/2.37.6.txt b/Documentation/RelNotes/2.37.6.txt
new file mode 100644 (file)
index 0000000..51dc149
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.37.6 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7,
+v2.32.6, v2.33.7, v2.34.7, v2.35.7 and v2.36.5 to address the
+security issues CVE-2023-22490 and CVE-2023-23946; see the release
+notes for these versions for details.
diff --git a/Documentation/RelNotes/2.38.4.txt b/Documentation/RelNotes/2.38.4.txt
new file mode 100644 (file)
index 0000000..fdfde22
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.38.4 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7,
+v2.32.6, v2.33.7, v2.34.7, v2.35.7, v2.36.5 and v2.37.6 to
+address the security issues CVE-2023-22490 and CVE-2023-23946;
+see the release notes for these versions for details.
diff --git a/Documentation/RelNotes/2.39.2.txt b/Documentation/RelNotes/2.39.2.txt
new file mode 100644 (file)
index 0000000..ebb9900
--- /dev/null
@@ -0,0 +1,7 @@
+Git v2.39.2 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.30.8, v2.31.7,
+v2.32.6, v2.33.7, v2.34.7, v2.35.7, v2.36.5, v2.37.6 and v2.38.4
+to address the security issues CVE-2023-22490 and CVE-2023-23946;
+see the release notes for these versions for details.
diff --git a/Documentation/RelNotes/2.39.3.txt b/Documentation/RelNotes/2.39.3.txt
new file mode 100644 (file)
index 0000000..dddff53
--- /dev/null
@@ -0,0 +1,58 @@
+Git v2.39.3 Release Notes
+=========================
+
+This release is primarily to merge fixes accumulated on the 'master'
+front to prepare for 2.40 release that are still relevant to 2.39.x
+maintenance track.
+
+Fixes since v2.39.2
+-------------------
+
+ * Stop running win+VS build by default.
+
+ * CI updates.  We probably want a clean-up to move the long shell
+   script embedded in yaml file into a separate file, but that can
+   come later.
+
+ * Avoid unnecessary builds in CI, with settings configured in
+   ci-config.
+
+ * Redefining system functions for a few functions did not follow our
+   usual "implement git_foo() and #define foo(args) git_foo(args)"
+   pattern, which has broken build for some folks.
+
+ * Deal with a few deprecation warning from cURL library.
+
+ * Newer regex library macOS stopped enabling GNU-like enhanced BRE,
+   where '\(A\|B\)' works as alternation, unless explicitly asked with
+   the REG_ENHANCED flag.  "git grep" now can be compiled to do so, to
+   retain the old behaviour.
+
+ * When given a pattern that matches an empty string at the end of a
+   line, the code to parse the "git diff" line-ranges fell into an
+   infinite loop, which has been corrected.
+
+ * Fix the sequence to fsync $GIT_DIR/packed-refs file that forgot to
+   flush its output to the disk..
+
+ * "git diff --relative" did not mix well with "git diff --ext-diff",
+   which has been corrected.
+
+ * The logic to see if we are using the "cone" mode by checking the
+   sparsity patterns has been tightened to avoid mistaking a pattern
+   that names a single file as specifying a cone.
+
+ * Doc update for environment variables set when hooks are invoked.
+
+ * Document ORIG_HEAD a bit more.
+
+ * "git ls-tree --format='%(path) %(path)' $tree $path" showed the
+   path three times, which has been corrected.
+
+ * Document that "branch -f <branch>" disables only the safety to
+   avoid recreating an existing branch.
+
+ * Clarify how "checkout -b/-B" and "git branch [-f]" are similar but
+   different in the documentation.
+
+Also contains minor documentation updates and code clean-ups.
index 3f4d282cb5297b91bf24361b71ee61da4167caa5..3ea445bf20d3c194abbe5ba9b95d9ed732c0812f 100644 (file)
@@ -49,6 +49,39 @@ UI, Workflows & Features
  * "scalar" warns but continues when its periodic maintenance
    feature cannot be enabled.
 
+ * The bundle-URI subsystem adds support for creation-token heuristics
+   to help incremental fetches.
+
+ * Userdiff regexp update for Java language.
+
+ * "git fetch --jobs=0" used to hit a BUG(), which has been corrected
+   to use the available CPUs.
+
+ * An invalid label or ref in the "rebase -i" todo file used to
+   trigger an runtime error. SUch an error is now diagnosed while the
+   todo file is parsed.
+
+ * The "diff" drivers specified by the "diff" attribute attached to
+   paths can now specify which algorithm (e.g. histogram) to use.
+
+ * "git range-diff" learned --abbrev=<num> option.
+
+ * "git archive HEAD^{tree}" records the paths with the current
+   timestamp in the archive, making it harder to obtain a stable
+   output.  The command learned the --mtime option to specify an
+   arbitrary timestamp (e.g. --mtime="@0 +0000" for the epoch).
+
+ * The credential subsystem learned that a password may have an
+   explicit expiration.
+
+ * The format.attach configuration variable lacked a way to override a
+   value defined in a lower-priority configuration file (e.g. the
+   system one) by redefining it in a higher-priority configuration
+   file.  Now, setting format.attach to an empty string means show the
+   patch inline in the e-mail message, without using MIME attachment.
+
+   This is a backward incompatible change.
+
 
 Performance, Internal Implementation, Development Support etc.
 
@@ -69,12 +102,10 @@ Performance, Internal Implementation, Development Support etc.
    the submodule--helper.
 
  * Stop running win+VS build by default.
-   (merge a0da6deeec js/ci-disable-cmake-by-default later to maint).
 
  * CI updates.  We probably want a clean-up to move the long shell
    script embedded in yaml file into a separate file, but that can
    come later.
-   (merge 4542582e59 cw/ci-whitespace later to maint).
 
  * Use `git diff --no-index` as a test_cmp on Windows.
 
@@ -84,14 +115,21 @@ Performance, Internal Implementation, Development Support etc.
 
  * Avoid unnecessary builds in CI, with settings configured in
    ci-config.
-   (merge eb5b03a9c0 tb/ci-concurrency later to maint).
+
+ * Plug leaks in sequencer subsystem and its users.
+
+ * In-tree .gitattributes update to match the way we recommend our
+   users to mark a file as text.
+   (merge 1f34e0cd3d po/attributes-text later to maint).
+
+ * Finally retire the scripted "git add -p/-i" implementation and have
+   everybody use the one reimplemented in C.
 
 
 Fixes since v2.39
 -----------------
 
  * Various leak fixes.
-   (merge ac95f5d36a ab/various-leak-fixes later to maint).
 
  * Fix a bug where `pack-objects` would not respect multiple `--filter`
    arguments when invoked directly.
@@ -106,8 +144,6 @@ Fixes since v2.39
  * Redefining system functions for a few functions did not follow our
    usual "implement git_foo() and #define foo(args) git_foo(args)"
    pattern, which has broken build for some folks.
-   (merge e1a95b78d8 jk/avoid-redef-system-functions-2.30 later to maint).
-   (merge 395bec6b39 jk/avoid-redef-system-functions later to maint).
 
  * The way the diff machinery prepares the options array for the
    parse_options API has been refactored to avoid resource leaks.
@@ -137,36 +173,27 @@ Fixes since v2.39
  * When given a pattern that matches an empty string at the end of a
    line, the code to parse the "git diff" line-ranges fell into an
    infinite loop, which has been corrected.
-   (merge 4e57c88e02 lk/line-range-parsing-fix later to maint).
 
  * Fix the sequence to fsync $GIT_DIR/packed-refs file that forgot to
    flush its output to the disk..
-   (merge ce54672f9b ps/fsync-refs-fix later to maint).
 
  * Fix to a small regression in 2.38 days.
-   (merge 6d5e9e53aa ab/bundle-wo-args later to maint).
 
  * "git diff --relative" did not mix well with "git diff --ext-diff",
    which has been corrected.
-   (merge f034bb1cad jk/ext-diff-with-relative later to maint).
 
  * The logic to see if we are using the "cone" mode by checking the
    sparsity patterns has been tightened to avoid mistaking a pattern
    that names a single file as specifying a cone.
-   (merge 5842710dc2 ws/single-file-cone later to maint).
 
  * Deal with a few deprecation warning from cURL library.
-   (merge 6c065f72b8 jk/curl-avoid-deprecated-api later to maint).
 
  * Doc update for environment variables set when hooks are invoked.
-   (merge 772f8ff826 es/hooks-and-local-env later to maint).
 
  * Document ORIG_HEAD a bit more.
-   (merge f1c9243fc5 pb/doc-orig-head later to maint).
 
  * "git ls-tree --format='%(path) %(path)' $tree $path" showed the
    path three times, which has been corrected.
-   (merge c388fcda99 rs/ls-tree-path-expansion-fix later to maint).
 
  * Remove "git env--helper" and demote it to a test-tool subcommand.
    (merge 4a1baacd46 ab/test-env-helper later to maint).
@@ -175,7 +202,6 @@ Fixes since v2.39
    where '\(A\|B\)' works as alternation, unless explicitly asked with
    the REG_ENHANCED flag.  "git grep" now can be compiled to do so, to
    retain the old behaviour.
-   (merge 54463d32ef rs/use-enhanced-bre-on-macos later to maint).
 
  * Pthread emulation on Win32 leaked thread handle when a thread is
    joined.
@@ -188,7 +214,6 @@ Fixes since v2.39
 
  * Document that "branch -f <branch>" disables only the safety to
    avoid recreating an existing branch.
-   (merge bf08abac56 jc/doc-branch-update-checked-out-branch later to maint).
 
  * "git fetch <group>", when "<group>" of remotes lists the same
    remote twice, unnecessarily failed when parallel fetching was
@@ -197,7 +222,6 @@ Fixes since v2.39
 
  * Clarify how "checkout -b/-B" and "git branch [-f]" are similar but
    different in the documentation.
-   (merge fedb8ea2df jc/doc-checkout-b later to maint).
 
  * "git hash-object" now checks that the resulting object is well
    formed with the same code as "git fsck".
@@ -211,22 +235,62 @@ Fixes since v2.39
    tags to notice non-PGP signatures.
    (merge a9cad02538 gm/request-pull-with-non-pgp-signed-tags later to maint).
 
+ * Remove support for MSys, which now lags way behind MSys2.
+   (merge 2987407f3c hj/remove-msys-support later to maint).
+
+ * Fix use of CreateThread() API call made early in the windows
+   start-up code.
+   (merge 592bcab61b sk/winansi-createthread-fix later to maint).
+
+ * "git pack-objects" learned to release delta-island bitmap data when
+   it is done using it, saving peak heap memory usage.
+   (merge 647982bb71 ew/free-island-marks later to maint).
+
+ * In an environment where dynamically generated code is prohibited to
+   run (e.g. SELinux), failure to JIT pcre patterns is expected.  Fall
+   back to interpreted execution in such a case.
+   (merge 50b6ad55b0 cb/grep-fallback-failing-jit later to maint).
+
+ * "git name-rev" heuristics update.
+   (merge b2182a8730 en/name-rev-make-taggerdate-much-less-important later to maint).
+
+ * Remove more remaining uses of macros that relies on the_index
+   singleton instance without explicitly spelling it out.
+
+ * Remove unnecessary explicit sizing of strbuf.
+   (merge 93ea118bed rs/cache-tree-strbuf-growth-fix later to maint).
+
+ * Doc update.
+   (merge d9ec3b0dc0 jk/doc-ls-remote-matching later to maint).
+
+ * Error messages given upon a signature verification failure used to
+   discard the errors from underlying gpg program, which has been
+   corrected.
+   (merge ad6b320756 js/gpg-errors later to maint).
+
+ * Update --date=default documentation.
+   (merge 9deef088ae rd/doc-default-date-format later to maint).
+
+ * A test helper had a single write(2) of 256kB, which was too big for
+   some platforms (e.g. NonStop), which has been corrected by using
+   xwrite() wrapper appropriately.
+   (merge 58eab6ff13 jc/genzeros-avoid-raw-write later to maint).
+
+ * sscanf(3) used in "git symbolic-ref --short" implementation found
+   to be not working reliably on macOS in UTF-8 locales.  Rewrite the
+   code to avoid sscanf() altogether to work it around.
+   (merge 613bef56b8 jk/shorten-unambiguous-ref-wo-sscanf later to maint).
+
+ * Various fix-ups on HTTP tests.
+   (merge 8f2146dbf1 jk/http-test-fixes later to maint).
+
+ * Fixes to code that parses the todo file used in "rebase -i".
+   (merge 666b6e1135 pw/rebase-i-parse-fix later to maint).
+
+ * Test library clean-up.
+   (merge c600a91c94 ar/test-lib-remove-stale-comment later to maint).
+
  * Other code cleanup, docfix, build fix, etc.
-   (merge 77e04b2ed4 rs/t4205-do-not-exit-in-test-script later to maint).
-   (merge faebba436e rs/plug-pattern-list-leak-in-lof later to maint).
-   (merge 243caa8982 ab/t5314-avoid-losing-exit-status later to maint).
-   (merge 4d81ce1b99 ab/t7600-avoid-losing-exit-status-of-git later to maint).
-   (merge 5f3bfdc4f3 ab/t4023-avoid-losing-exit-status-of-diff later to maint).
-   (merge 500317ae03 js/t3920-shell-and-or-fix later to maint).
-   (merge 86325d36e6 rs/t3920-crlf-eating-grep-fix later to maint).
-   (merge cfbd173ccb rj/branch-copy-and-rename later to maint).
-   (merge c25d9e529d jk/unused-post-2.39 later to maint).
-   (merge a31cfe3283 jk/server-supports-v2-cleanup later to maint).
-   (merge a658e881c1 rs/am-parse-options-cleanup later to maint).
-   (merge 4cb39fcf19 rs/clear-commit-marks-cleanup later to maint).
-   (merge b07a819c05 rs/reflog-expiry-cleanup later to maint).
-   (merge d422d06167 rs/clarify-error-in-write-loose-object later to maint).
-   (merge 92cb135855 sk/remove-duplicate-includes later to maint).
    (merge 4eb1ccecd4 dh/mingw-ownership-check-typofix later to maint).
    (merge f95526419b ar/typofix-gitattributes-doc later to maint).
    (merge 27875aeec9 km/doc-branch-start-point later to maint).
@@ -245,3 +309,12 @@ Fixes since v2.39
    (merge 70661d288b ar/markup-em-dash later to maint).
    (merge e750951e74 en/ls-files-doc-update later to maint).
    (merge 4f542975d1 mh/doc-credential-cache-only-in-core later to maint).
+   (merge 3a2ebaebc7 gc/index-format-doc later to maint).
+   (merge b08edf709d jk/httpd-test-updates later to maint).
+   (merge d85e9448dd wl/new-command-doc later to maint).
+   (merge d912a603ed kf/t5000-modernise later to maint).
+   (merge e65b868d07 rs/size-t-fixes later to maint).
+   (merge 3eb1e1ca9a ab/config-h-remove-unused later to maint).
+   (merge d390e08076 cw/doc-pushurl-vs-url later to maint).
+   (merge 567342fc77 rs/ctype-test later to maint).
+   (merge d35d8f2e7a ap/t2015-style-update later to maint).
diff --git a/Documentation/RelNotes/2.41.0.txt b/Documentation/RelNotes/2.41.0.txt
new file mode 100644 (file)
index 0000000..05b755a
--- /dev/null
@@ -0,0 +1,141 @@
+Git v2.41 Release Notes
+=======================
+
+UI, Workflows & Features
+
+ * Allow information carried on the WWW-AUthenticate header to be
+   passed to the credential helpers.
+
+ * 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.
+
+ * "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.
+
+ * 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.
+
+ * 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.
+
+ * "git format-patch" learned to write a log-message only output file
+   for empty commits.
+
+ * "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.  "format-patch" has been taught to ignore end-user configuration
+   and always use the standard prefixes.
+
+   This is a backward compatibility breaking change.
+
+ * Lift the limitation that colored prompts can only be used with
+   PROMPT_COMMAND mode.
+
+
+Performance, Internal Implementation, Development Support etc.
+
+ * Code clean-up to clarify directory traversal API.
+
+ * Code clean-up to clarify the rule that "git-compat-util.h" must be
+   the first to be included.
+
+ * More work towards -Wunused.
+
+ * Instead of forcing each command to choose to honor GPG related
+   configuration variables, make the subsystem lazily initialize
+   itself.
+
+ * Remove workaround for ancient versions of DocBook to make it work
+   correctly with groff, which has not been necessary since docbook
+   1.76 from 2010.
+
+ * Code clean-up to include and/or uninclude parse-options.h file as
+   needed.
+
+
+Fixes since v2.40
+-----------------
+
+ * "git fsck" learned to check the index files in other worktrees,
+   just like "git gc" honors them as anchoring points.
+   (merge 8d3e7eac52 jk/fsck-indices-in-worktrees later to maint).
+
+ * Fix a segfaulting loop.  The function and its caller may need
+   further clean-up.
+   (merge c5773dc078 ew/commit-reach-clean-up-flags-fix later to maint).
+
+ * "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.
+   (merge ee8a88826a ak/restore-both-incompatible-with-conflicts later to maint).
+
+ * Simplify UI to control progress meter given by "git bundle" command.
+   (merge 8b95521edb jk/bundle-progress later to maint).
+
+ * "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.
+   (merge 0bbe10313e jk/bundle-use-dash-for-stdfiles later to maint).
+
+ * 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.
+   (merge e2d003dbed ds/reprepare-alternates-when-repreparing-packfiles later to maint).
+
+ * The code to parse "git rebase -X<opt>" was not prepared to see an
+   unparsable option string, which has been corrected.
+   (merge 15a4cc912e ab/fix-strategy-opts-parsing later to maint).
+
+ * "git add -p" while the index is unmerged sometimes failed to parse
+   the diff output it internally produces and died, which has been
+   corrected.
+   (merge 28d1122f9c jk/add-p-unmerged-fix later to maint).
+
+ * Fix for a "ls-files --format="%(path)" that produced nonsense
+   output, which was a bug in 2.38.
+   (merge cfb62dd006 aj/ls-files-format-fix later to maint).
+
+ * "git receive-pack" that responds to "git push" requests failed to
+   clean a stale lockfile when killed in the middle, which has been
+   corrected.
+   (merge c55c30669c ps/receive-pack-unlock-before-die later to maint).
+
+ * "git rev-parse --quiet foo@{u}", or anything that asks @{u} to be
+   parsed with GET_OID_QUIETLY option, did not quietly fail, which has
+   been corrected.
+   (merge dfbfdc521d fc/oid-quietly-parse-upstream later to maint).
+
+ * Transports that do not support protocol v2 did not correctly fall
+   back to protocol v0 under certain conditions, which has been
+   corrected.
+   (merge eaa0fd6584 jk/fix-proto-downgrade-to-v0 later to maint).
+
+ * time(2) on glib 2.31+, especially on Linux, goes out of sync with
+   higher resolution timers used for gettimeofday(2) and by the
+   filesystem.  Replace all calls to it with a git_time() wrapper and
+   (merge 370ddcbc89 pe/time-use-gettimeofday later to maint).
+
+ * Code clean-up to use designated initializers in parse-options API.
+   (merge 353e6d4554 sg/parse-options-h-initializers later to maint).
+
+ * A recent-ish change to allow unicode character classes to be used
+   with "grep -P" triggered a JIT bug in older pcre2 libraries.
+   The problematic change in Git built with these older libraries has
+   been disabled to work around the bug.
+   (merge 14b9a04479 mk/workaround-pcre-jit-ucp-bug later to maint).
+
+ * Other code cleanup, docfix, build fix, etc.
+   (merge f7111175df as/doc-markup-fix later to maint).
+   (merge 90ff7c9898 fc/test-aggregation-clean-up later to maint).
+   (merge 9b0c7f308a jc/am-doc-refer-to-format-patch later to maint).
index 3e859f34197bc43c8d266ec04d569e5353dae27e..e0354ceaed9e870abce7b59468ed08439267b17a 100644 (file)
@@ -7,6 +7,7 @@ add.ignore-errors (deprecated)::
        variables.
 
 add.interactive.useBuiltin::
-       Set to `false` to fall back to the original Perl implementation of
-       the interactive version of linkgit:git-add[1] instead of the built-in
-       version. Is `true` by default.
+       Unused configuration variable. Used in Git versions v2.25.0 to
+       v2.36.0 to enable the built-in version of linkgit:git-add[1]'s
+       interactive mode, which then became the default in Git
+       versions v2.37.0 to v2.39.0.
index a00d0100a82ba710ea52470764b047e2aeb38d56..c96b5b2e5d2160c3f6b1147fc6500f22acf06a55 100644 (file)
@@ -136,4 +136,6 @@ advice.*::
                Advice shown when either linkgit:git-add[1] or linkgit:git-rm[1]
                is asked to update index entries outside the current sparse
                checkout.
+       diverging::
+               Advice shown when a fast-forward is not possible.
 --
index daa21eb674ae32826ec5074a19092bd009978bcf..3faae3868534e24b396d76b594484d484c1eb78b 100644 (file)
@@ -15,6 +15,13 @@ bundle.mode::
        complete understanding of the bundled information (`all`) or if any one
        of the listed bundle URIs is sufficient (`any`).
 
+bundle.heuristic::
+       If this string-valued key exists, then the bundle list is designed to
+       work well with incremental `git fetch` commands. The heuristic signals
+       that there are additional keys available for each bundle that help
+       determine which subset of bundles the client should download. The
+       only value currently understood is `creationToken`.
+
 bundle.<id>.*::
        The `bundle.<id>.*` keys are used to describe a single item in the
        bundle list, grouped under `<id>` for identification purposes.
index cd65d236b43ffc3a7c08fa9df480fcbe6c82e68c..568f0f75b3027d374a53857c06cf481ff376c6b7 100644 (file)
@@ -96,3 +96,27 @@ fetch.writeCommitGraph::
        merge and the write may take longer. Having an updated commit-graph
        file helps performance of many Git commands, including `git merge-base`,
        `git push -f`, and `git log --graph`. Defaults to false.
+
+fetch.bundleURI::
+       This value stores a URI for downloading Git object data from a bundle
+       URI before performing an incremental fetch from the origin Git server.
+       This is similar to how the `--bundle-uri` option behaves in
+       linkgit:git-clone[1]. `git clone --bundle-uri` will set the
+       `fetch.bundleURI` value if the supplied bundle URI contains a bundle
+       list that is organized for incremental fetches.
++
+If you modify this value and your repository has a `fetch.bundleCreationToken`
+value, then remove that `fetch.bundleCreationToken` value before fetching from
+the new bundle URI.
+
+fetch.bundleCreationToken::
+       When using `fetch.bundleURI` to fetch incrementally from a bundle
+       list that uses the "creationToken" heuristic, this config value
+       stores the maximum `creationToken` value of the downloaded bundles.
+       This value is used to prevent downloading bundles in the future
+       if the advertised `creationToken` is not strictly larger than this
+       value.
++
+The creation token values are chosen by the provider serving the specific
+bundle URI. If you modify the URI at `fetch.bundleURI`, then be sure to
+remove the value for the `fetch.bundleCreationToken` value before fetching.
index 3bd78269e29a544fa13369f9e5169b403be294ac..8cf6f00d9365cf19b6244ba005d078c5ebed8a05 100644 (file)
@@ -3,7 +3,8 @@ format.attach::
        'format-patch'.  The value can also be a double quoted string
        which will enable attachments as the default and set the
        value as the boundary.  See the --attach option in
-       linkgit:git-format-patch[1].
+       linkgit:git-format-patch[1].  To countermand an earlier
+       value, set it to an empty string.
 
 format.from::
        Provides the default value for the `--from` option to format-patch.
@@ -143,3 +144,10 @@ will only show notes from `refs/notes/bar`.
 format.mboxrd::
        A boolean value which enables the robust "mboxrd" format when
        `--stdout` is in use to escape "^>+From " lines.
+
+format.noprefix::
+       If set, do not show any source or destination prefix in patches.
+       This is equivalent to the `diff.noprefix` option used by `git
+       diff` (but which is not respected by `format-patch`). Note that
+       by setting this, the receiver of any patches you generate will
+       have to apply them using the `-p0` option.
index 86f6308c4c051814cc4f32a2d7b5d20aabb276e1..37e2831cd511c8a6f00112f9e357ab58c44ddf98 100644 (file)
@@ -12,6 +12,9 @@ gpg.program::
 gpg.format::
        Specifies which key format to use when signing with `--gpg-sign`.
        Default is "openpgp". Other possible values are "x509", "ssh".
++
+See linkgit:gitformat-signature[5] for the signature format, which differs
+based on the selected `gpg.format`.
 
 gpg.<format>.program::
        Use this to customize the program used for the signing format you
index 7d73e976d9936bb35981ad7f64b0af66865491b8..08ab86189a7b62cf88898d04a57ed3e943bdc311 100644 (file)
@@ -852,6 +852,11 @@ endif::git-format-patch[]
 --no-prefix::
        Do not show any source or destination prefix.
 
+--default-prefix::
+       Use the default source and destination prefixes ("a/" and "b/").
+       This is usually the default already, but may be used to override
+       config such as `diff.noprefix`.
+
 --line-prefix=<prefix>::
        Prepend an additional prefix to every line of output.
 
index a030d33c6e704adaf0b12168cb7ef0d062a1ef19..ed44c1cb31ca6eaf7e63d7920cbc15c3a2e0619f 100644 (file)
@@ -274,7 +274,7 @@ status::
 ------------
               staged     unstaged path
      1:       binary      nothing foo.png
-     2:     +403/-35        +1/-1 git-add--interactive.perl
+     2:     +403/-35        +1/-1 add-interactive.c
 ------------
 +
 It shows that foo.png has differences from HEAD (but that is
@@ -282,7 +282,7 @@ binary so line count cannot be shown) and there is no
 difference between indexed copy and the working tree
 version (if the working tree version were also different,
 'binary' would have been shown in place of 'nothing').  The
-other file, git-add{litdd}interactive.perl, has 403 lines added
+other file, add-interactive.c, has 403 lines added
 and 35 lines deleted if you commit what is in the index, but
 working tree file has further modifications (one addition and
 one deletion).
@@ -303,7 +303,7 @@ like this:
 ------------
            staged     unstaged path
   1:       binary      nothing foo.png
-* 2:     +403/-35        +1/-1 git-add--interactive.perl
+* 2:     +403/-35        +1/-1 add-interactive.c
 ------------
 +
 To remove selection, prefix the input with `-`
index 0c1dfb3c98b440f87e561a0d44c240a41d80dc14..900be198b14e933d19f87febd9860cb0c67a6bf0 100644 (file)
@@ -24,7 +24,9 @@ DESCRIPTION
 -----------
 Splits mail messages in a mailbox into commit log message,
 authorship information and patches, and applies them to the
-current branch.
+current branch. You could think of it as a reverse operation
+of linkgit:git-format-patch[1] run on a branch with a straight
+history without merges.
 
 OPTIONS
 -------
@@ -273,7 +275,8 @@ include::config/am.txt[]
 
 SEE ALSO
 --------
-linkgit:git-apply[1].
+linkgit:git-apply[1],
+linkgit:git-format-patch[1].
 
 GIT
 ---
index 60c040988bb803cbca608b9e58647b75a75ac173..6bab201d37548dd5c4f911baf981f3fc1995a889 100644 (file)
@@ -86,6 +86,11 @@ cases, write an untracked file and use `--add-file` instead.
        Look for attributes in .gitattributes files in the working tree
        as well (see <<ATTRIBUTES>>).
 
+--mtime=<time>::
+       Set modification time of archive entries.  Without this option
+       the committer time is used if `<tree-ish>` is a commit or tag,
+       and the current time if it is a tree.
+
 <extra>::
        This can be any options that the archiver backend understands.
        See next section.
index 18a022b4b40c345040c23e83bed1fd1983bd725e..3ab42a19cae4aca0e6a3a83db92d25a4d88bf927 100644 (file)
@@ -9,7 +9,7 @@ git-bundle - Move objects and refs by archive
 SYNOPSIS
 --------
 [verse]
-'git bundle' create [-q | --quiet | --progress | --all-progress] [--all-progress-implied]
+'git bundle' create [-q | --quiet | --progress]
                    [--version=<version>] <file> <git-rev-list-args>
 'git bundle' verify [-q | --quiet] <file>
 'git bundle' list-heads <file> [<refname>...]
@@ -66,7 +66,7 @@ create [options] <file> <git-rev-list-args>::
        Used to create a bundle named 'file'.  This requires the
        '<git-rev-list-args>' arguments to define the bundle contents.
        'options' contains the options specific to the 'git bundle create'
-       subcommand.
+       subcommand. If 'file' is `-`, the bundle is written to stdout.
 
 verify <file>::
        Used to check that a bundle file is valid and will apply
@@ -77,12 +77,13 @@ verify <file>::
        Finally, information about additional capabilities, such as "object
        filter", is printed. See "Capabilities" in linkgit:gitformat-bundle[5]
        for more information. The exit code is zero for success, but will
-       be nonzero if the bundle file is invalid.
+       be nonzero if the bundle file is invalid. If 'file' is `-`, the
+       bundle is read from stdin.
 
 list-heads <file>::
        Lists the references defined in the bundle.  If followed by a
        list of references, only references matching those given are
-       printed out.
+       printed out. If 'file' is `-`, the bundle is read from stdin.
 
 unbundle <file>::
        Passes the objects in the bundle to 'git index-pack'
@@ -90,6 +91,7 @@ unbundle <file>::
        defined references. If a list of references is given, only
        references matching those in the list are printed. This command is
        really plumbing, intended to be called only by 'git fetch'.
+       If 'file' is `-`, the bundle is read from stdin.
 
 <git-rev-list-args>::
        A list of arguments, acceptable to 'git rev-parse' and
@@ -115,22 +117,6 @@ unbundle <file>::
        is specified. This flag forces progress status even if
        the standard error stream is not directed to a terminal.
 
---all-progress::
-       When --stdout is specified then progress report is
-       displayed during the object count and compression phases
-       but inhibited during the write-out phase. The reason is
-       that in some cases the output stream is directly linked
-       to another command which may wish to display progress
-       status of its own as it processes incoming pack data.
-       This flag is like --progress except that it forces progress
-       report for the write-out phase as well even if --stdout is
-       used.
-
---all-progress-implied::
-       This is used to imply --all-progress whenever progress display
-       is activated.  Unlike --all-progress this flag doesn't actually
-       force any progress display by itself.
-
 --version=<version>::
        Specify the bundle version.  Version 2 is the older format and can only be
        used with SHA-1 repositories; the newer version 3 contains capabilities that
index 50759153ef15c7e3af4ea431701da9e0e154bbcd..3394c036113acd827b824a1f6ed7ae6fb13f143b 100644 (file)
@@ -150,6 +150,12 @@ Git understands the following attributes:
 
        The credential's password, if we are asking it to be stored.
 
+`password_expiry_utc`::
+
+       Generated passwords such as an OAuth access token may have an expiry date.
+       When reading credentials from helpers, `git credential fill` ignores expired
+       passwords. Represented as Unix time UTC, seconds since 1970.
+
 `url`::
 
        When this special attribute is read by `git credential`, the
index 77c3a8ad909def201ea48034fe88eb88cf2a3a97..3407f3c2c078264505d28455c93c6ec5424234b1 100644 (file)
@@ -8,7 +8,7 @@ git-hook - Run git hooks
 SYNOPSIS
 --------
 [verse]
-'git hook' run [--ignore-missing] <hook-name> [-- <hook-args>]
+'git hook' run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>]
 
 DESCRIPTION
 -----------
@@ -31,6 +31,11 @@ linkgit:githooks[5] for arguments hooks might expect (if any).
 OPTIONS
 -------
 
+--to-stdin::
+       For "run"; Specify a file which will be streamed into the
+       hook's stdin. The hook will receive the entire file from
+       beginning to EOF.
+
 --ignore-missing::
        Ignore any missing hook by quietly returning zero. Used for
        tools that want to do a blind one-shot run of a hook that may
index 492e573856f24f6444fefb842e8ee733fa95be25..ff3da547ddb98a5493b5752a4b2b84bed7f799c5 100644 (file)
@@ -11,7 +11,7 @@ SYNOPSIS
 [verse]
 'git ls-remote' [--heads] [--tags] [--refs] [--upload-pack=<exec>]
              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]
-             [--symref] [<repository> [<refs>...]]
+             [--symref] [<repository> [<patterns>...]]
 
 DESCRIPTION
 -----------
@@ -85,25 +85,32 @@ OPTIONS
        either a URL or the name of a remote (see the GIT URLS and
        REMOTES sections of linkgit:git-fetch[1]).
 
-<refs>...::
+<patterns>...::
        When unspecified, all references, after filtering done
-       with --heads and --tags, are shown.  When <refs>... are
-       specified, only references matching the given patterns
-       are displayed.
+       with --heads and --tags, are shown.  When <patterns>... are
+       specified, only references matching one or more of the given
+       patterns are displayed. Each pattern is interpreted as a glob
+       (see `glob` in linkgit:gitglossary[7]) which is matched against
+       the "tail" of a ref, starting either from the start of the ref
+       (so a full name like `refs/heads/foo` matches) or from a slash
+       separator (so `bar` matches `refs/heads/bar` but not
+       `refs/heads/foobar`).
 
 EXAMPLES
 --------
 
 ----
-$ git ls-remote --tags ./.
+$ git ls-remote --tags .
 d6602ec5194c87b0fc87103ca4d67251c76f233a       refs/tags/v0.99
 f25a265a342aed6041ab0cc484224d9ca54b6f41       refs/tags/v0.99.1
 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e       refs/tags/v0.99.3
 c5db5456ae3b0873fc659c19fafdde22313cc441       refs/tags/v0.99.2
 0918385dbd9656cab0d1d81ba7453d49bbc16250       refs/tags/junio-gpg-pub
+
 $ git ls-remote http://www.kernel.org/pub/scm/git/git.git master seen rc
 5fe978a5381f1fbad26a80e682ddd2a401966740       refs/heads/master
 c781a84b5204fb294c9ccc79f8b3baceeb32c061       refs/heads/seen
+
 $ git remote add korg http://www.kernel.org/pub/scm/git/git.git
 $ git ls-remote --tags korg v\*
 d6602ec5194c87b0fc87103ca4d67251c76f233a       refs/tags/v0.99
index 88ee942101a7748ac2a7b5030b364ed7e27d5fdb..ffc4fbf7e89a89b075bb00bafcb041c19adc271f 100644 (file)
@@ -108,7 +108,7 @@ This is an integer status followed by a NUL character.  The integer status is:
 
      0: merge had conflicts
      1: merge was clean
-     &lt;0: something prevented the merge from running (e.g. access to repository
+     <0: something prevented the merge from running (e.g. access to repository
         objects denied by filesystem)
 
 [[OIDTLT]]
index bcd80692870ae002db0bc3c1684c9a0959673964..f26a7591e3737df6bcf190fc26f0fe2bf50fcd83 100644 (file)
@@ -197,10 +197,11 @@ respectively, and they must begin with `refs/` when applied to `--glob`
 or `--all`. If a trailing '/{asterisk}' is intended, it must be given
 explicitly.
 
---exclude-hidden=[receive|uploadpack]::
-       Do not include refs that would be hidden by `git-receive-pack` or
-       `git-upload-pack` by consulting the appropriate `receive.hideRefs` or
-       `uploadpack.hideRefs` configuration along with `transfer.hideRefs` (see
+--exclude-hidden=[fetch|receive|uploadpack]::
+       Do not include refs that would be hidden by `git-fetch`,
+       `git-receive-pack` or `git-upload-pack` by consulting the appropriate
+       `fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs`
+       configuration along with `transfer.hideRefs` (see
        linkgit:git-config[1]). This option affects the next pseudo-ref option
        `--all` or `--glob` and is cleared after processing them.
 
index c19e64ea0eff616010436fb9edb947ef20c8ecba..39bfbca1ffe565f52b9536beaf040539ab7c0bbc 100644 (file)
@@ -758,6 +758,37 @@ with the above configuration, i.e. `j-c-diff`, with 7
 parameters, just like `GIT_EXTERNAL_DIFF` program is called.
 See linkgit:git[1] for details.
 
+Setting the internal diff algorithm
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The diff algorithm can be set through the `diff.algorithm` config key, but
+sometimes it may be helpful to set the diff algorithm per path. For example,
+one may want to use the `minimal` diff algorithm for .json files, and the
+`histogram` for .c files, and so on without having to pass in the algorithm
+through the command line each time.
+
+First, in `.gitattributes`, assign the `diff` attribute for paths.
+
+------------------------
+*.json diff=<name>
+------------------------
+
+Then, define a "diff.<name>.algorithm" configuration to specify the diff
+algorithm, choosing from `myers`, `patience`, `minimal`, or `histogram`.
+
+----------------------------------------------------------------
+[diff "<name>"]
+  algorithm = histogram
+----------------------------------------------------------------
+
+This diff algorithm applies to user facing diff output like git-diff(1),
+git-show(1) and is used for the `--stat` output as well. The merge machinery
+will not use the diff algorithm set through this method.
+
+NOTE: If `diff.<name>.command` is defined for path with the
+`diff=<name>` attribute, it is executed as an external diff driver
+(see above), and adding `diff.<name>.algorithm` has no effect, as the
+algorithm is not passed to the external diff driver.
 
 Defining a custom hunk-header
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index 4522471c33758c534328c010c65f4a69dee39b4b..100f045bb1a0918e51cc3834a015913f9286dbbb 100644 (file)
@@ -167,7 +167,7 @@ helper::
 If there are multiple instances of the `credential.helper` configuration
 variable, each helper will be tried in turn, and may provide a username,
 password, or nothing. Once Git has acquired both a username and a
-password, no more helpers will be tried.
+non-expired password, no more helpers will be tried.
 +
 If `credential.helper` is configured to the empty string, this resets
 the helper list to empty (so you may override a helper set by a
index 015cb21bdc089a30e5403877ca1c61bea2b04e24..0773e5c3800392b8d4a548519b70379501207054 100644 (file)
@@ -83,11 +83,13 @@ Git index format
 
   32-bit mode, split into (high to low bits)
 
+    16-bit unused, must be zero
+
     4-bit object type
       valid values in binary are 1000 (regular file), 1010 (symbolic link)
       and 1110 (gitlink)
 
-    3-bit unused
+    3-bit unused, must be zero
 
     9-bit unix permission. Only 0755 and 0644 are valid for regular files.
     Symbolic links and gitlinks have value 0 in this field.
index d8e3eb1bac316db170047285e0e094f29ec9cfd1..d4d3a31f03541199f7e65feb80b2c713f217573d 100644 (file)
@@ -17,12 +17,24 @@ DESCRIPTION
 Git uses cryptographic signatures in various places, currently objects (tags,
 commits, mergetags) and transactions (pushes). In every case, the command which
 is about to create an object or transaction determines a payload from that,
-calls gpg to obtain a detached signature for the payload (`gpg -bsa`) and
-embeds the signature into the object or transaction.
+calls an external program to obtain a detached signature for the payload
+(`gpg -bsa` in the case of PGP signatures), and embeds the signature into the
+object or transaction.
 
-Signatures always begin with `-----BEGIN PGP SIGNATURE-----`
-and end with `-----END PGP SIGNATURE-----`, unless gpg is told to
-produce RFC1991 signatures which use `MESSAGE` instead of `SIGNATURE`.
+Signatures begin with an "ASCII Armor" header line and end with a tail line,
+which differ depending on signature type (as selected by `gpg.format`, see
+linkgit:git-config[1]). These are, for `gpg.format` values:
+
+`gpg` (PGP)::
+       `-----BEGIN PGP SIGNATURE-----` and `-----END PGP SIGNATURE-----`.
+       Or, if gpg is told to produce RFC1991 signatures,
+       `-----BEGIN PGP MESSAGE-----` and `-----END PGP MESSAGE-----`
+
+`ssh` (SSH)::
+       `-----BEGIN SSH SIGNATURE-----` and `-----END SSH SIGNATURE-----`
+
+`x509` (X.509)::
+       `-----BEGIN SIGNED MESSAGE-----` and `-----END SIGNED MESSAGE-----`
 
 Signatures sometimes appear as a part of the normal payload
 (e.g. a signed tag has the signature block appended after the payload
index 15a4c8031f1f3bee61ca77d4d37b7ae443d98d9c..880c51112ba4789bd8b903976c25e7c2cb689599 100644 (file)
@@ -1,13 +1,13 @@
 From: Eric S. Raymond <esr@thyrsus.com>
 Abstract: This is how-to documentation for people who want to add extension
- commands to Git.  It should be read alongside api-builtin.txt.
+ commands to Git.  It should be read alongside builtin.h.
 Content-type: text/asciidoc
 
 How to integrate new subcommands
 ================================
 
 This is how-to documentation for people who want to add extension
-commands to Git.  It should be read alongside api-builtin.txt.
+commands to Git.  It should be read alongside builtin.h.
 
 Runtime environment
 -------------------
diff --git a/Documentation/manpage-quote-apos.xsl b/Documentation/manpage-quote-apos.xsl
deleted file mode 100644 (file)
index aeb8839..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-               version="1.0">
-
-<!-- work around newer groff/man setups using a prettier apostrophe
-     that unfortunately does not quote anything when cut&pasting
-     examples to the shell -->
-<xsl:template name="escape.apostrophe">
-  <xsl:param name="content"/>
-  <xsl:call-template name="string.subst">
-    <xsl:with-param name="string" select="$content"/>
-    <xsl:with-param name="target">'</xsl:with-param>
-    <xsl:with-param name="replacement">\(aq</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
index ff68e484069a84854c97d141dbef376badbaec2c..90c73d6708b1d7dc90f50380c20521a1f713ff90 100644 (file)
@@ -195,10 +195,11 @@ respectively, and they must begin with `refs/` when applied to `--glob`
 or `--all`. If a trailing '/{asterisk}' is intended, it must be given
 explicitly.
 
---exclude-hidden=[receive|uploadpack]::
-       Do not include refs that would be hidden by `git-receive-pack` or
-       `git-upload-pack` by consulting the appropriate `receive.hideRefs` or
-       `uploadpack.hideRefs` configuration along with `transfer.hideRefs` (see
+--exclude-hidden=[fetch|receive|uploadpack]::
+       Do not include refs that would be hidden by `git-fetch`,
+       `git-receive-pack` or `git-upload-pack` by consulting the appropriate
+       `fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs`
+       configuration along with `transfer.hideRefs` (see
        linkgit:git-config[1]). This option affects the next pseudo-ref option
        `--all` or `--glob` and is cleared after processing them.
 
@@ -1100,12 +1101,12 @@ preferred format.  See the `strftime` manual for a complete list of
 format placeholders. When using `-local`, the correct syntax is
 `--date=format-local:...`.
 
-`--date=default` is the default format, and is similar to
-`--date=rfc2822`, with a few exceptions:
+`--date=default` is the default format, and is based on ctime(3)
+output.  It shows a single line with three-letter day of the week,
+three-letter month, day-of-month, hour-minute-seconds in "HH:MM:SS"
+format, followed by 4-digit year, plus timezone information, unless
+the local time zone is used, e.g. `Thu Jan 1 00:00:00 1970 +0000`.
 --
-       - there is no comma after the day-of-week
-
-       - the time zone is omitted when the local time zone is used
 
 ifdef::git-rev-list[]
 --header::
index b78d01d9adfc72ff7598cda0e836d8c9f3c99e0b..91d3a13e3276fcc609abe7268c462e2da61b97af 100644 (file)
@@ -479,14 +479,14 @@ outline for submitting these features:
    (This choice is an opt-in via a config option and a command-line
    option.)
 
-4. Allow the client to understand the `bundle.flag=forFetch` configuration
+4. Allow the client to understand the `bundle.heuristic` configuration key
    and the `bundle.<id>.creationToken` heuristic. When `git clone`
-   discovers a bundle URI with `bundle.flag=forFetch`, it configures the
-   client repository to check that bundle URI during later `git fetch <remote>`
+   discovers a bundle URI with `bundle.heuristic`, it configures the client
+   repository to check that bundle URI during later `git fetch <remote>`
    commands.
 
 5. Allow clients to discover bundle URIs during `git fetch` and configure
-   a bundle URI for later fetches if `bundle.flag=forFetch`.
+   a bundle URI for later fetches if `bundle.heuristic` is set.
 
 6. Implement the "inspect headers" heuristic to reduce data downloads when
    the `bundle.<id>.creationToken` heuristic is not available.
index 86d0008f94d878278c1318fa6b96dcc36356344a..e410912fe52b9defd6de1601174cd214998ab336 100644 (file)
@@ -33,7 +33,9 @@ config file would appear like this:
 ------------
 
 The `<pushurl>` is used for pushes only. It is optional and defaults
-to `<URL>`.
+to `<URL>`. Pushing to a remote affects all defined pushurls or to all
+defined urls if no pushurls are defined. Fetch, however, will only
+fetch from the first defined url if muliple urls are defined.
 
 Named file in `$GIT_DIR/remotes`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index c4c2d3e022da810454b1aab7172603ea2aac2209..9a1111af9b14f373be57a832931062d57e0723f1 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v2.39.GIT
+DEF_VER=v2.40.GIT
 
 LF='
 '
diff --git a/INSTALL b/INSTALL
index d5694f8c47089c6e3fef43079f28ec17f969b18e..4b422888828d0e99b7398f9e55055525330cf597 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -120,7 +120,7 @@ Issues of note:
          for everyday use (e.g. "bisect", "request-pull").
 
        - "Perl" version 5.8 or later is needed to use some of the
-         features (e.g. preparing a partial commit using "git add -i/-p",
+         features (e.g. sending patches using "git send-email",
          interacting with svn repositories with "git svn").  If you can
          live without these, use NO_PERL.  Note that recent releases of
          Redhat/Fedora are reported to ship Perl binary package with some
index 45bd6ac9c3e9c85aadf3ac0c2e6c08437acfdb67..60ab1a8b4f4f2f72b6d6232d1d0130a57eb4a082 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -207,10 +207,6 @@ include shared.mak
 # Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks
 # field that counts the on-disk footprint in 512-byte blocks.
 #
-# Define GNU_ROFF if your target system uses GNU groff.  This forces
-# apostrophes to be ASCII so that cut&pasting examples to the shell
-# will work.
-#
 # Define USE_ASCIIDOCTOR to use Asciidoctor instead of AsciiDoc to build the
 # documentation.
 #
@@ -708,7 +704,6 @@ SCRIPT_LIB += git-mergetool--lib
 SCRIPT_LIB += git-sh-i18n
 SCRIPT_LIB += git-sh-setup
 
-SCRIPT_PERL += git-add--interactive.perl
 SCRIPT_PERL += git-archimport.perl
 SCRIPT_PERL += git-cvsexportcommit.perl
 SCRIPT_PERL += git-cvsimport.perl
index 47807bf257fd5e52f95f1fb628867a349034571b..4da73c9a6d376789944260138a56c6d8d79fd5fb 120000 (symlink)
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.40.0.txt
\ No newline at end of file
+Documentation/RelNotes/2.41.0.txt
\ No newline at end of file
index 39e06b58486e3e94e640929c27460e786533a2f8..9a81c5525bea667ecaba3909f195f40bb4e69d7d 100644 (file)
--- a/abspath.c
+++ b/abspath.c
@@ -280,3 +280,10 @@ char *prefix_filename(const char *pfx, const char *arg)
 #endif
        return strbuf_detach(&path, NULL);
 }
+
+char *prefix_filename_except_for_dash(const char *pfx, const char *arg)
+{
+       if (!strcmp(arg, "-"))
+               return xstrdup(arg);
+       return prefix_filename(pfx, arg);
+}
index 00a0f6f96f3f5ebc54bbfb841921c5ceff88c1c3..ae25ec50bce77289a7486bda135de8f91f8fb6cc 100644 (file)
@@ -3,6 +3,7 @@
 #include "color.h"
 #include "config.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "revision.h"
 #include "refs.h"
 #include "string-list.h"
index a86a92e16461384cbe8ac880fa6515e0f74e243c..e6c34b9c381c6732cf310106c29bdf60a62241e7 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "add-interactive.h"
+#include "alloc.h"
 #include "strbuf.h"
 #include "run-command.h"
 #include "strvec.h"
@@ -483,7 +484,8 @@ static int parse_diff(struct add_p_state *s, const struct pathspec *ps)
                if (!eol)
                        eol = pend;
 
-               if (starts_with(p, "diff ")) {
+               if (starts_with(p, "diff ") ||
+                   starts_with(p, "* Unmerged path ")) {
                        complete_file(marker, hunk);
                        ALLOC_GROW_BY(s->file_diff, s->file_diff_nr, 1,
                                   file_diff_alloc);
index fd189689437c7512e549482fe696f7a2d2400cd2..d6232439c3863b4c6136adfd12465b0aa714e81f 100644 (file)
--- a/advice.c
+++ b/advice.c
@@ -1,6 +1,8 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "advice.h"
 #include "config.h"
 #include "color.h"
+#include "gettext.h"
 #include "help.h"
 #include "string-list.h"
 
@@ -44,6 +46,7 @@ static struct {
        [ADVICE_COMMIT_BEFORE_MERGE]                    = { "commitBeforeMerge", 1 },
        [ADVICE_DETACHED_HEAD]                          = { "detachedHead", 1 },
        [ADVICE_SUGGEST_DETACHING_HEAD]                 = { "suggestDetachingHead", 1 },
+       [ADVICE_DIVERGING]                              = { "diverging", 1 },
        [ADVICE_FETCH_SHOW_FORCED_UPDATES]              = { "fetchShowForcedUpdates", 1 },
        [ADVICE_GRAFT_FILE_DEPRECATED]                  = { "graftFileDeprecated", 1 },
        [ADVICE_IGNORED_HOOK]                           = { "ignoredHook", 1 },
@@ -217,6 +220,14 @@ void NORETURN die_conclude_merge(void)
 
 void NORETURN die_ff_impossible(void)
 {
+       advise_if_enabled(ADVICE_DIVERGING,
+               _("Diverging branches can't be fast-forwarded, you need to either:\n"
+               "\n"
+               "\tgit merge --no-ff\n"
+               "\n"
+               "or:\n"
+               "\n"
+               "\tgit rebase\n"));
        die(_("Not possible to fast-forward, aborting."));
 }
 
index 07e0f76833e78070a26ec288db929ec966024d7e..0f584163f5808ce536ff5d1a5294eed2437ba23b 100644 (file)
--- a/advice.h
+++ b/advice.h
@@ -1,8 +1,6 @@
 #ifndef ADVICE_H
 #define ADVICE_H
 
-#include "git-compat-util.h"
-
 struct string_list;
 
 /*
@@ -21,6 +19,7 @@ struct string_list;
        ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,
        ADVICE_COMMIT_BEFORE_MERGE,
        ADVICE_DETACHED_HEAD,
+       ADVICE_DIVERGING,
        ADVICE_SUGGEST_DETACHING_HEAD,
        ADVICE_FETCH_SHOW_FORCED_UPDATES,
        ADVICE_GRAFT_FILE_DEPRECATED,
diff --git a/alias.c b/alias.c
index 00abde081739436236aa077412c3b5b686144f42..e814948ced329937a5ad2e0a6c5b17b05a653183 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -1,6 +1,8 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "alias.h"
+#include "alloc.h"
 #include "config.h"
+#include "gettext.h"
 #include "string-list.h"
 
 struct config_alias_data {
diff --git a/alloc.c b/alloc.c
index 27f697e4c87a05ef7cc847a17e83e14e9cfd2a4d..2886aa93543478f4bf221ca3e4a830a40f9baf42 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -8,7 +8,7 @@
  * up with maximal alignment because it doesn't know what the object alignment
  * for the new allocation is.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "object.h"
 #include "blob.h"
 #include "tree.h"
diff --git a/alloc.h b/alloc.h
index 3f4a0ad310a94bd026f48f48491985e3e2053ee2..4312db4bd087bde3632c547bb72d0b5cc77be713 100644 (file)
--- a/alloc.h
+++ b/alloc.h
@@ -17,4 +17,79 @@ void *alloc_object_node(struct repository *r);
 struct alloc_state *allocate_alloc_state(void);
 void clear_alloc_state(struct alloc_state *s);
 
+#define alloc_nr(x) (((x)+16)*3/2)
+
+/**
+ * Dynamically growing an array using realloc() is error prone and boring.
+ *
+ * Define your array with:
+ *
+ * - a pointer (`item`) that points at the array, initialized to `NULL`
+ *   (although please name the variable based on its contents, not on its
+ *   type);
+ *
+ * - an integer variable (`alloc`) that keeps track of how big the current
+ *   allocation is, initialized to `0`;
+ *
+ * - another integer variable (`nr`) to keep track of how many elements the
+ *   array currently has, initialized to `0`.
+ *
+ * Then before adding `n`th element to the item, call `ALLOC_GROW(item, n,
+ * alloc)`.  This ensures that the array can hold at least `n` elements by
+ * calling `realloc(3)` and adjusting `alloc` variable.
+ *
+ * ------------
+ * sometype *item;
+ * size_t nr;
+ * size_t alloc
+ *
+ * for (i = 0; i < nr; i++)
+ *     if (we like item[i] already)
+ *             return;
+ *
+ * // we did not like any existing one, so add one
+ * ALLOC_GROW(item, nr + 1, alloc);
+ * item[nr++] = value you like;
+ * ------------
+ *
+ * You are responsible for updating the `nr` variable.
+ *
+ * If you need to specify the number of elements to allocate explicitly
+ * then use the macro `REALLOC_ARRAY(item, alloc)` instead of `ALLOC_GROW`.
+ *
+ * Consider using ALLOC_GROW_BY instead of ALLOC_GROW as it has some
+ * added niceties.
+ *
+ * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'.
+ */
+#define ALLOC_GROW(x, nr, alloc) \
+       do { \
+               if ((nr) > alloc) { \
+                       if (alloc_nr(alloc) < (nr)) \
+                               alloc = (nr); \
+                       else \
+                               alloc = alloc_nr(alloc); \
+                       REALLOC_ARRAY(x, alloc); \
+               } \
+       } while (0)
+
+/*
+ * Similar to ALLOC_GROW but handles updating of the nr value and
+ * zeroing the bytes of the newly-grown array elements.
+ *
+ * DO NOT USE any expression with side-effect for any of the
+ * arguments.
+ */
+#define ALLOC_GROW_BY(x, nr, increase, alloc) \
+       do { \
+               if (increase) { \
+                       size_t new_nr = nr + (increase); \
+                       if (new_nr < nr) \
+                               BUG("negative growth in ALLOC_GROW_BY"); \
+                       ALLOC_GROW(x, new_nr, alloc); \
+                       memset((x) + nr, 0, sizeof(*(x)) * (increase)); \
+                       nr = new_nr; \
+               } \
+       } while (0)
+
 #endif
diff --git a/apply.c b/apply.c
index 5eec433583ec277e0c11351e0a68008e192fdd17..8776ab939ad8cbe0c20ee85c8bc166b8f2614095 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -8,12 +8,14 @@
  */
 
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "object-store.h"
 #include "blob.h"
 #include "delta.h"
 #include "diff.h"
 #include "dir.h"
+#include "hex.h"
 #include "xdiff-interface.h"
 #include "ll-merge.h"
 #include "lockfile.h"
@@ -4418,6 +4420,33 @@ static int create_one_file(struct apply_state *state,
        if (state->cached)
                return 0;
 
+       /*
+        * We already try to detect whether files are beyond a symlink in our
+        * up-front checks. But in the case where symlinks are created by any
+        * of the intermediate hunks it can happen that our up-front checks
+        * didn't yet see the symlink, but at the point of arriving here there
+        * in fact is one. We thus repeat the check for symlinks here.
+        *
+        * Note that this does not make the up-front check obsolete as the
+        * failure mode is different:
+        *
+        * - The up-front checks cause us to abort before we have written
+        *   anything into the working directory. So when we exit this way the
+        *   working directory remains clean.
+        *
+        * - The checks here happen in the middle of the action where we have
+        *   already started to apply the patch. The end result will be a dirty
+        *   working directory.
+        *
+        * Ideally, we should update the up-front checks to catch what would
+        * happen when we apply the patch before we damage the working tree.
+        * We have all the information necessary to do so.  But for now, as a
+        * part of embargoed security work, having this check would serve as a
+        * reasonable first step.
+        */
+       if (path_is_beyond_symlink(state, path))
+               return error(_("affected file '%s' is beyond a symbolic link"), path);
+
        res = try_create_file(state, path, mode, buf, size);
        if (res < 0)
                return -1;
index f8fad2946ef97324756b78363fb90d329f504209..ee27fa0b39b8e082fa8680d44b8ff54a0637658f 100644 (file)
@@ -1,8 +1,10 @@
 /*
  * Copyright (c) 2005, 2006 Rene Scharfe
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "tar.h"
 #include "archive.h"
 #include "object-store.h"
index 0456f1ebf15c839639f4759c329cb957b0a64feb..c5d1f72eb800e771ec6599ddbfaf90de4d7aa90f 100644 (file)
@@ -4,6 +4,7 @@
 #include "cache.h"
 #include "config.h"
 #include "archive.h"
+#include "hex.h"
 #include "streaming.h"
 #include "utf8.h"
 #include "object-store.h"
index 81ff76fce99ed2c6eb569f033ab927e91f6632bc..1c2ca78e52a8daaf3a7b123ce2ea004f970b1a79 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "refs.h"
 #include "object-store.h"
 #include "commit.h"
@@ -472,6 +474,8 @@ static void parse_treeish_arg(const char **argv,
                commit_oid = NULL;
                archive_time = time(NULL);
        }
+       if (ar_args->mtime_option)
+               archive_time = approxidate(ar_args->mtime_option);
 
        tree = parse_tree_indirect(&oid);
        if (!tree)
@@ -586,6 +590,7 @@ static int parse_archive_args(int argc, const char **argv,
        const char *remote = NULL;
        const char *exec = NULL;
        const char *output = NULL;
+       const char *mtime_option = NULL;
        int compression_level = -1;
        int verbose = 0;
        int i;
@@ -607,6 +612,9 @@ static int parse_archive_args(int argc, const char **argv,
                OPT_BOOL(0, "worktree-attributes", &worktree_attributes,
                        N_("read .gitattributes in working directory")),
                OPT__VERBOSE(&verbose, N_("report archived files on stderr")),
+               { OPTION_STRING, 0, "mtime", &mtime_option, N_("time"),
+                 N_("set modification time of archive entries"),
+                 PARSE_OPT_NONEG },
                OPT_NUMBER_CALLBACK(&compression_level,
                        N_("set compression level"), number_callback),
                OPT_GROUP(""),
@@ -668,6 +676,7 @@ static int parse_archive_args(int argc, const char **argv,
        args->base = base;
        args->baselen = strlen(base);
        args->worktree_attributes = worktree_attributes;
+       args->mtime_option = mtime_option;
 
        return argc;
 }
@@ -710,6 +719,7 @@ int write_archive(int argc, const char **argv, const char *prefix,
 
        string_list_clear_func(&args.extra_files, extra_file_info_clear);
        free(args.refname);
+       clear_pathspec(&args.pathspec);
 
        return rc;
 }
index 08bed3ed3af6b062f3ff2791613c64b86d42ec00..7178e2a9a2d06c5c3eaaa8884464e6f4cc26fbde 100644 (file)
--- a/archive.h
+++ b/archive.h
@@ -16,6 +16,7 @@ struct archiver_args {
        struct tree *tree;
        const struct object_id *commit_oid;
        const struct commit *commit;
+       const char *mtime_option;
        timestamp_t time;
        struct pathspec pathspec;
        unsigned int verbose : 1;
diff --git a/attr.c b/attr.c
index 1053dfcd4b61b56e99df60e469ec4e757c80e860..657ee52229ee3efca65a7e6e5dcadbc83cbbbe70 100644 (file)
--- a/attr.c
+++ b/attr.c
@@ -7,6 +7,7 @@
  */
 
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "exec-cmd.h"
 #include "attr.h"
index ef5ee5a6436f066e33510219e9a0f73b09bf7aaf..1409150c5c316726f396a644566a987f87214b86 100644 (file)
--- a/bisect.c
+++ b/bisect.c
@@ -2,6 +2,7 @@
 #include "config.h"
 #include "commit.h"
 #include "diff.h"
+#include "hex.h"
 #include "revision.h"
 #include "refs.h"
 #include "list-objects.h"
diff --git a/blame.c b/blame.c
index 8bfeaa1c63aedc151b1125e98f52229842d48b19..e45d8a3bf92a4a3aac39ed41226a01b870254a15 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -5,6 +5,7 @@
 #include "mergesort.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "tag.h"
 #include "blame.h"
 #include "alloc.h"
diff --git a/blame.h b/blame.h
index 38bde535b3d46461d0619bc68c852210693de571..b60d1d81e3032acc5df2191321202b13eecc81fe 100644 (file)
--- a/blame.h
+++ b/blame.h
@@ -1,7 +1,6 @@
 #ifndef BLAME_H
 #define BLAME_H
 
-#include "cache.h"
 #include "commit.h"
 #include "xdiff-interface.h"
 #include "revision.h"
diff --git a/blob.c b/blob.c
index 8f83523b0cde6dbf1b808b3dcf8ab1c1c23085f3..888e28a5594747bd263df0bb8f2179122bccb131 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "blob.h"
 #include "repository.h"
 #include "alloc.h"
index e5614b53b3699d9fc08d41135b16a4a875b0fc68..eacef62b7c97efde6e193f49f604346678d989f4 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -2,6 +2,7 @@
 #include "cache.h"
 #include "config.h"
 #include "branch.h"
+#include "hex.h"
 #include "refs.h"
 #include "refspec.h"
 #include "remote.h"
@@ -820,12 +821,16 @@ void remove_branch_state(struct repository *r, int verbose)
 void die_if_checked_out(const char *branch, int ignore_current_worktree)
 {
        struct worktree **worktrees = get_worktrees();
-       const struct worktree *wt;
 
-       wt = find_shared_symref(worktrees, "HEAD", branch);
-       if (wt && (!ignore_current_worktree || !wt->is_current)) {
-               skip_prefix(branch, "refs/heads/", &branch);
-               die(_("'%s' is already checked out at '%s'"), branch, wt->path);
+       for (int i = 0; worktrees[i]; i++) {
+               if (worktrees[i]->is_current && ignore_current_worktree)
+                       continue;
+
+               if (is_shared_symref(worktrees[i], "HEAD", branch)) {
+                       skip_prefix(branch, "refs/heads/", &branch);
+                       die(_("'%s' is already checked out at '%s'"),
+                               branch, worktrees[i]->path);
+               }
        }
 
        free_worktrees(worktrees);
index 0c60402267653c5aff56c8b2bd1702793e4170be..61dd386d109b3756e90756b91d9405c71d1b4145 100644 (file)
@@ -238,58 +238,14 @@ static int refresh(int verbose, const struct pathspec *pathspec)
        return ret;
 }
 
-int run_add_interactive(const char *revision, const char *patch_mode,
-                       const struct pathspec *pathspec)
-{
-       int i;
-       struct child_process cmd = CHILD_PROCESS_INIT;
-       int use_builtin_add_i =
-               git_env_bool("GIT_TEST_ADD_I_USE_BUILTIN", -1);
-
-       if (use_builtin_add_i < 0 &&
-           git_config_get_bool("add.interactive.usebuiltin",
-                               &use_builtin_add_i))
-               use_builtin_add_i = 1;
-
-       if (use_builtin_add_i != 0) {
-               enum add_p_mode mode;
-
-               if (!patch_mode)
-                       return !!run_add_i(the_repository, pathspec);
-
-               if (!strcmp(patch_mode, "--patch"))
-                       mode = ADD_P_ADD;
-               else if (!strcmp(patch_mode, "--patch=stash"))
-                       mode = ADD_P_STASH;
-               else if (!strcmp(patch_mode, "--patch=reset"))
-                       mode = ADD_P_RESET;
-               else if (!strcmp(patch_mode, "--patch=checkout"))
-                       mode = ADD_P_CHECKOUT;
-               else if (!strcmp(patch_mode, "--patch=worktree"))
-                       mode = ADD_P_WORKTREE;
-               else
-                       die("'%s' not supported", patch_mode);
-
-               return !!run_add_p(the_repository, mode, revision, pathspec);
-       }
-
-       strvec_push(&cmd.args, "add--interactive");
-       if (patch_mode)
-               strvec_push(&cmd.args, patch_mode);
-       if (revision)
-               strvec_push(&cmd.args, revision);
-       strvec_push(&cmd.args, "--");
-       for (i = 0; i < pathspec->nr; i++)
-               /* pass original pathspec, to be re-parsed */
-               strvec_push(&cmd.args, pathspec->items[i].original);
-
-       cmd.git_cmd = 1;
-       return run_command(&cmd);
-}
-
 int interactive_add(const char **argv, const char *prefix, int patch)
 {
        struct pathspec pathspec;
+       int unused;
+
+       if (!git_config_get_bool("add.interactive.usebuiltin", &unused))
+               warning(_("the add.interactive.useBuiltin setting has been removed!\n"
+                         "See its entry in 'git help config' for details."));
 
        parse_pathspec(&pathspec, 0,
                       PATHSPEC_PREFER_FULL |
@@ -297,9 +253,10 @@ int interactive_add(const char **argv, const char *prefix, int patch)
                       PATHSPEC_PREFIX_ORIGIN,
                       prefix, argv);
 
-       return run_add_interactive(NULL,
-                                  patch ? "--patch" : NULL,
-                                  &pathspec);
+       if (patch)
+               return !!run_add_p(the_repository, ADD_P_ADD, NULL, &pathspec);
+       else
+               return !!run_add_i(the_repository, &pathspec);
 }
 
 static int edit_patch(int argc, const char **argv, const char *prefix)
index 82a41cbfc4e9ce2538644b9247dfc3a3bbe60888..5e6b237c4240da3112212259e1853e3521614508 100644 (file)
@@ -3,11 +3,12 @@
  *
  * Based on git-am.sh by Junio C Hamano.
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
 #include "exec-cmd.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "dir.h"
 #include "run-command.h"
@@ -495,24 +496,12 @@ static int run_applypatch_msg_hook(struct am_state *state)
  */
 static int run_post_rewrite_hook(const struct am_state *state)
 {
-       struct child_process cp = CHILD_PROCESS_INIT;
-       const char *hook = find_hook("post-rewrite");
-       int ret;
-
-       if (!hook)
-               return 0;
-
-       strvec_push(&cp.args, hook);
-       strvec_push(&cp.args, "rebase");
-
-       cp.in = xopen(am_path(state, "rewritten"), O_RDONLY);
-       cp.stdout_to_stderr = 1;
-       cp.trace2_hook_name = "post-rewrite";
+       struct run_hooks_opt opt = RUN_HOOKS_OPT_INIT;
 
-       ret = run_command(&cp);
+       strvec_push(&opt.args, "rebase");
+       opt.path_to_stdin = am_path(state, "rewritten");
 
-       close(cp.in);
-       return ret;
+       return run_hooks_opt("post-rewrite", &opt);
 }
 
 /**
@@ -1655,7 +1644,7 @@ static void do_commit(const struct am_state *state)
        if (!state->no_verify && run_hooks("pre-applypatch"))
                exit(1);
 
-       if (write_cache_as_tree(&tree, 0, NULL))
+       if (write_index_as_tree(&tree, &the_index, get_index_file(), 0, NULL))
                die(_("git write-tree failed to write a tree"));
 
        if (!get_oid_commit("HEAD", &parent)) {
@@ -2063,7 +2052,7 @@ static int clean_index(const struct object_id *head, const struct object_id *rem
        if (fast_forward_to(head_tree, head_tree, 1))
                return -1;
 
-       if (write_cache_as_tree(&index, 0, NULL))
+       if (write_index_as_tree(&index, &the_index, get_index_file(), 0, NULL))
                return -1;
 
        index_tree = parse_tree_indirect(&index);
@@ -2312,17 +2301,6 @@ static int parse_opt_show_current_patch(const struct option *opt, const char *ar
        return 0;
 }
 
-static int git_am_config(const char *k, const char *v, void *cb UNUSED)
-{
-       int status;
-
-       status = git_gpg_config(k, v, NULL);
-       if (status)
-               return status;
-
-       return git_default_config(k, v, NULL);
-}
-
 int cmd_am(int argc, const char **argv, const char *prefix)
 {
        struct am_state state;
@@ -2446,7 +2424,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
        if (argc == 2 && !strcmp(argv[1], "-h"))
                usage_with_options(usage, options);
 
-       git_config(git_am_config, NULL);
+       git_config(git_default_config, NULL);
 
        am_state_init(&state);
 
index f094390ee01f810e7035f2efc2be75deedc3befa..d0a583ea95864e8746806b9a7799b0d4cc950a11 100644 (file)
@@ -81,7 +81,7 @@ static int run_remote_archiver(int argc, const char **argv,
 int cmd_archive(int argc, const char **argv, const char *prefix)
 {
        const char *exec = "git-upload-archive";
-       const char *output = NULL;
+       char *output = NULL;
        const char *remote = NULL;
        struct option local_opts[] = {
                OPT_FILENAME('o', "output", &output,
@@ -106,5 +106,6 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
 
        setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
 
+       UNLEAK(output);
        return write_archive(argc, argv, prefix, the_repository, output, 0);
 }
index 73017402671d30ce7f868a9691f9bb6f520695e1..c64c8d715a5cae653103e6a802e0251afdea80d1 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "bisect.h"
 #include "refs.h"
@@ -244,7 +245,8 @@ static int bisect_reset(const char *commit)
                struct child_process cmd = CHILD_PROCESS_INIT;
 
                cmd.git_cmd = 1;
-               strvec_pushl(&cmd.args, "checkout", branch.buf, "--", NULL);
+               strvec_pushl(&cmd.args, "checkout", "--ignore-other-worktrees",
+                               branch.buf, "--", NULL);
                if (run_command(&cmd)) {
                        error(_("could not check out original"
                                " HEAD '%s'. Try 'git bisect"
index 71f925e456c34513b85e64e7dd6a72d510a8307e..fdd9f0c0fc7a775e57111f6550d936e22e89a708 100644 (file)
@@ -5,10 +5,12 @@
  * See COPYING for licensing conditions
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "color.h"
 #include "builtin.h"
+#include "hex.h"
 #include "repository.h"
 #include "commit.h"
 #include "diff.h"
index acceef6200172cf7a44de45bfa6f3e940b6444c9..666f01bccd040104418d0714e9dd42969c09e918 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #define BUILTIN_BUNDLE_CREATE_USAGE \
-       N_("git bundle create [-q | --quiet | --progress | --all-progress] [--all-progress-implied]\n" \
+       N_("git bundle create [-q | --quiet | --progress]\n" \
           "                  [--version=<version>] <file> <git-rev-list-args>")
 #define BUILTIN_BUNDLE_VERIFY_USAGE \
        N_("git bundle verify [-q | --quiet] <file>")
@@ -59,12 +59,12 @@ static int parse_options_cmd_bundle(int argc,
                             PARSE_OPT_STOP_AT_NON_OPTION);
        if (!argc)
                usage_msg_opt(_("need a <file> argument"), usagestr, options);
-       *bundle_file = prefix_filename(prefix, argv[0]);
+       *bundle_file = prefix_filename_except_for_dash(prefix, argv[0]);
        return argc;
 }
 
 static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
-       int all_progress_implied = 0;
+       int all_progress_implied = 1;
        int progress = isatty(STDERR_FILENO);
        struct strvec pack_opts;
        int version = -1;
@@ -74,11 +74,12 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
                            N_("do not show progress meter"), 0),
                OPT_SET_INT(0, "progress", &progress,
                            N_("show progress meter"), 1),
-               OPT_SET_INT(0, "all-progress", &progress,
-                           N_("show progress meter during object writing phase"), 2),
-               OPT_BOOL(0, "all-progress-implied",
-                        &all_progress_implied,
-                        N_("similar to --all-progress when progress meter is shown")),
+               OPT_SET_INT_F(0, "all-progress", &progress,
+                             N_("historical; same as --progress"), 2,
+                             PARSE_OPT_HIDDEN),
+               OPT_HIDDEN_BOOL(0, "all-progress-implied",
+                               &all_progress_implied,
+                               N_("historical; does nothing")),
                OPT_INTEGER(0, "version", &version,
                            N_("specify bundle format version")),
                OPT_END()
@@ -107,6 +108,23 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
        return ret;
 }
 
+/*
+ * Similar to read_bundle_header(), but handle "-" as stdin.
+ */
+static int open_bundle(const char *path, struct bundle_header *header,
+                      const char **name)
+{
+       if (!strcmp(path, "-")) {
+               if (name)
+                       *name = "<stdin>";
+               return read_bundle_header_fd(0, header, "<stdin>");
+       }
+
+       if (name)
+               *name = path;
+       return read_bundle_header(path, header);
+}
+
 static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
        struct bundle_header header = BUNDLE_HEADER_INIT;
        int bundle_fd = -1;
@@ -118,12 +136,13 @@ static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
                OPT_END()
        };
        char *bundle_file;
+       const char *name;
 
        argc = parse_options_cmd_bundle(argc, argv, prefix,
                        builtin_bundle_verify_usage, options, &bundle_file);
        /* bundle internals use argv[1] as further parameters */
 
-       if ((bundle_fd = read_bundle_header(bundle_file, &header)) < 0) {
+       if ((bundle_fd = open_bundle(bundle_file, &header, &name)) < 0) {
                ret = 1;
                goto cleanup;
        }
@@ -134,7 +153,7 @@ static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
                goto cleanup;
        }
 
-       fprintf(stderr, _("%s is okay\n"), bundle_file);
+       fprintf(stderr, _("%s is okay\n"), name);
        ret = 0;
 cleanup:
        free(bundle_file);
@@ -155,7 +174,7 @@ static int cmd_bundle_list_heads(int argc, const char **argv, const char *prefix
                        builtin_bundle_list_heads_usage, options, &bundle_file);
        /* bundle internals use argv[1] as further parameters */
 
-       if ((bundle_fd = read_bundle_header(bundle_file, &header)) < 0) {
+       if ((bundle_fd = open_bundle(bundle_file, &header, NULL)) < 0) {
                ret = 1;
                goto cleanup;
        }
@@ -185,7 +204,7 @@ static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix)
                        builtin_bundle_unbundle_usage, options, &bundle_file);
        /* bundle internals use argv[1] as further parameters */
 
-       if ((bundle_fd = read_bundle_header(bundle_file, &header)) < 0) {
+       if ((bundle_fd = open_bundle(bundle_file, &header, NULL)) < 0) {
                ret = 1;
                goto cleanup;
        }
index cc17635e76536471a0a756903a8187eaa01d5733..9e7e03ade41ec1671559921ab878495f3d3079c5 100644 (file)
@@ -5,9 +5,12 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "builtin.h"
 #include "diff.h"
+#include "hex.h"
+#include "ident.h"
 #include "parse-options.h"
 #include "userdiff.h"
 #include "streaming.h"
@@ -15,6 +18,7 @@
 #include "oid-array.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "promisor-remote.h"
 #include "mailmap.h"
 
@@ -559,7 +563,7 @@ static int batch_object_cb(const struct object_id *oid, void *vdata)
 }
 
 static int collect_loose_object(const struct object_id *oid,
-                               const char *path,
+                               const char *path UNUSED,
                                void *data)
 {
        oid_array_append(data, oid);
@@ -567,8 +571,8 @@ static int collect_loose_object(const struct object_id *oid,
 }
 
 static int collect_packed_object(const struct object_id *oid,
-                                struct packed_git *pack,
-                                uint32_t pos,
+                                struct packed_git *pack UNUSED,
+                                uint32_t pos UNUSED,
                                 void *data)
 {
        oid_array_append(data, oid);
@@ -591,7 +595,7 @@ static int batch_unordered_object(const struct object_id *oid,
 }
 
 static int batch_unordered_loose(const struct object_id *oid,
-                                const char *path,
+                                const char *path UNUSED,
                                 void *data)
 {
        return batch_unordered_object(oid, NULL, 0, data);
index 7dc47e47932c7d2e76128e54f49fa2ea0c570d62..96db3ddb4bb0c74b8e237fdeb49fdd58f394b741 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "config.h"
+#include "ident.h"
 #include "mailmap.h"
 #include "parse-options.h"
 #include "string-list.h"
index ede7dc32a43c01a78a0074e1bddd5ba18b487568..0a7d762573ce3b99550161b1119914f880b6ddd2 100644 (file)
@@ -1,4 +1,5 @@
 #include "builtin.h"
+#include "alloc.h"
 #include "config.h"
 #include "entry.h"
 #include "parallel-checkout.h"
index 5963e1b74b82f5bd1d572325aed01ff66c587d52..734d730980c18e7fd8e774ac2b720e1e823dc47e 100644 (file)
@@ -9,6 +9,7 @@
 #include "config.h"
 #include "diff.h"
 #include "dir.h"
+#include "hex.h"
 #include "hook.h"
 #include "ll-merge.h"
 #include "lockfile.h"
@@ -29,6 +30,7 @@
 #include "xdiff-interface.h"
 #include "entry.h"
 #include "parallel-checkout.h"
+#include "add-interactive.h"
 
 static const char * const checkout_usage[] = {
        N_("git checkout [<options>] <branch>"),
@@ -74,7 +76,7 @@ struct checkout_opts {
        const char *ignore_unmerged_opt;
        int ignore_unmerged;
        int pathspec_file_nul;
-       const char *pathspec_from_file;
+       char *pathspec_from_file;
 
        const char *new_branch;
        const char *new_branch_force;
@@ -488,18 +490,31 @@ static int checkout_paths(const struct checkout_opts *opts,
                die(_("'%s' must be used when '%s' is not specified"),
                    "--worktree", "--source");
 
-       if (opts->checkout_index && !opts->checkout_worktree &&
-           opts->writeout_stage)
-               die(_("'%s' or '%s' cannot be used with %s"),
-                   "--ours", "--theirs", "--staged");
-
-       if (opts->checkout_index && !opts->checkout_worktree &&
-           opts->merge)
-               die(_("'%s' or '%s' cannot be used with %s"),
-                   "--merge", "--conflict", "--staged");
+       /*
+        * Reject --staged option to the restore command when combined with
+        * merge-related options. Use the accept_ref flag to distinguish it
+        * from the checkout command, which does not accept --staged anyway.
+        *
+        * `restore --ours|--theirs --worktree --staged` could mean resolving
+        * conflicted paths to one side in both the worktree and the index,
+        * but does not currently.
+        *
+        * `restore --merge|--conflict=<style>` already recreates conflicts
+        * in both the worktree and the index, so adding --staged would be
+        * meaningless.
+        */
+       if (!opts->accept_ref && opts->checkout_index) {
+               if (opts->writeout_stage)
+                       die(_("'%s' or '%s' cannot be used with %s"),
+                           "--ours", "--theirs", "--staged");
+
+               if (opts->merge)
+                       die(_("'%s' or '%s' cannot be used with %s"),
+                           "--merge", "--conflict", "--staged");
+       }
 
        if (opts->patch_mode) {
-               const char *patch_mode;
+               enum add_p_mode patch_mode;
                const char *rev = new_branch_info->name;
                char rev_oid[GIT_MAX_HEXSZ + 1];
 
@@ -517,15 +532,16 @@ static int checkout_paths(const struct checkout_opts *opts,
                        rev = oid_to_hex_r(rev_oid, &new_branch_info->commit->object.oid);
 
                if (opts->checkout_index && opts->checkout_worktree)
-                       patch_mode = "--patch=checkout";
+                       patch_mode = ADD_P_CHECKOUT;
                else if (opts->checkout_index && !opts->checkout_worktree)
-                       patch_mode = "--patch=reset";
+                       patch_mode = ADD_P_RESET;
                else if (!opts->checkout_index && opts->checkout_worktree)
-                       patch_mode = "--patch=worktree";
+                       patch_mode = ADD_P_WORKTREE;
                else
                        BUG("either flag must have been set, worktree=%d, index=%d",
                            opts->checkout_worktree, opts->checkout_index);
-               return run_add_interactive(rev, patch_mode, &opts->pathspec);
+               return !!run_add_p(the_repository, patch_mode, rev,
+                                  &opts->pathspec);
        }
 
        repo_hold_locked_index(the_repository, &lock_file, LOCK_DIE_ON_ERROR);
@@ -1874,6 +1890,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
                            options, checkout_usage, &new_branch_info);
        branch_info_release(&new_branch_info);
        clear_pathspec(&opts.pathspec);
+       free(opts.pathspec_from_file);
        FREE_AND_NULL(options);
        return ret;
 }
index b2701a2815803e8c1231eb7516bc5936311e9f0a..10aaa8c603fe587682724531bbdbfc92de80a79c 100644 (file)
@@ -560,7 +560,7 @@ static int parse_choice(struct menu_stuff *menu_stuff,
 
 /*
  * Implement a git-add-interactive compatible UI, which is borrowed
- * from git-add--interactive.perl.
+ * from add-interactive.c.
  *
  * Return value:
  *
@@ -1092,5 +1092,6 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
        strbuf_release(&buf);
        string_list_clear(&del_list, 0);
        string_list_clear(&exclude_list, 0);
+       clear_pathspec(&pathspec);
        return (errors != 0);
 }
index 5453ba5277f968cbac419b7aee9911182beb41e6..462c286274c73a76b8ae08ae3023563243502156 100644 (file)
@@ -11,6 +11,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "parse-options.h"
 #include "fetch-pack.h"
@@ -892,6 +893,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        int is_bundle = 0, is_local;
        int reject_shallow = 0;
        const char *repo_name, *repo, *work_tree, *git_dir;
+       char *repo_to_free = NULL;
        char *path = NULL, *dir, *display_repo = NULL;
        int dest_exists, real_dest_exists = 0;
        const struct ref *refs, *remote_head;
@@ -949,7 +951,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        path = get_repo_path(repo_name, &is_bundle);
        if (path) {
                FREE_AND_NULL(path);
-               repo = absolute_pathdup(repo_name);
+               repo = repo_to_free = absolute_pathdup(repo_name);
        } else if (strchr(repo_name, ':')) {
                repo = repo_name;
                display_repo = transport_anonymize_url(repo);
@@ -1170,10 +1172,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        refspec_appendf(&remote->fetch, "+%s*:%s*", src_ref_prefix,
                        branch_top.buf);
 
-       transport = transport_get(remote, remote->url[0]);
-       transport_set_verbosity(transport, option_verbosity, option_progress);
-       transport->family = family;
-
        path = get_repo_path(remote->url[0], &is_bundle);
        is_local = option_local != 0 && path && !is_bundle;
        if (is_local) {
@@ -1195,6 +1193,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        }
        if (option_local > 0 && !is_local)
                warning(_("--local is ignored"));
+
+       transport = transport_get(remote, path ? path : remote->url[0]);
+       transport_set_verbosity(transport, option_verbosity, option_progress);
+       transport->family = family;
        transport->cloning = 1;
 
        if (is_bundle) {
@@ -1248,12 +1250,16 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
         * data from the --bundle-uri option.
         */
        if (bundle_uri) {
+               int has_heuristic = 0;
+
                /* At this point, we need the_repository to match the cloned repo. */
                if (repo_init(the_repository, git_dir, work_tree))
                        warning(_("failed to initialize the repo, skipping bundle URI"));
-               else if (fetch_bundle_uri(the_repository, bundle_uri))
+               else if (fetch_bundle_uri(the_repository, bundle_uri, &has_heuristic))
                        warning(_("failed to fetch objects from bundle URI '%s'"),
                                bundle_uri);
+               else if (has_heuristic)
+                       git_config_set_gently("fetch.bundleuri", bundle_uri);
        }
 
        strvec_push(&transport_ls_refs_options.ref_prefixes, "HEAD");
@@ -1413,7 +1419,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        free(unborn_head);
        free(dir);
        free(path);
-       UNLEAK(repo);
+       free(repo_to_free);
        junk_mode = JUNK_LEAVE_ALL;
 
        transport_ls_refs_options_release(&transport_ls_refs_options);
index e8f77f535f3075405853f6ff6d4fdf40a4b019af..d3be7f3b3189b89b6345e367911129cf3c196239 100644 (file)
@@ -1,12 +1,14 @@
 #include "builtin.h"
 #include "config.h"
 #include "dir.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "parse-options.h"
 #include "repository.h"
 #include "commit-graph.h"
 #include "object-store.h"
 #include "progress.h"
+#include "replace-object.h"
 #include "tag.h"
 
 #define BUILTIN_COMMIT_GRAPH_VERIFY_USAGE \
@@ -67,6 +69,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix)
        int fd;
        struct stat st;
        int flags = 0;
+       int ret;
 
        static struct option builtin_commit_graph_verify_options[] = {
                OPT_BOOL(0, "shallow", &opts.shallow,
@@ -111,8 +114,9 @@ static int graph_verify(int argc, const char **argv, const char *prefix)
        if (!graph)
                return !!open_ok;
 
-       UNLEAK(graph);
-       return verify_commit_graph(the_repository, graph, flags);
+       ret = verify_commit_graph(the_repository, graph, flags);
+       free_commit_graph(graph);
+       return ret;
 }
 
 extern int read_replace_refs;
@@ -267,8 +271,8 @@ static int graph_write(int argc, const char **argv, const char *prefix)
 
        if (opts.reachable) {
                if (write_commit_graph_reachable(odb, flags, &write_opts))
-                       return 1;
-               return 0;
+                       result = 1;
+               goto cleanup;
        }
 
        if (opts.stdin_packs) {
index cc8d584be2f4a9d3b0c950a4b8cbc6c140904d8c..e805da5bb1cc5b08715dc981aab7686e4e30e121 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "repository.h"
 #include "commit.h"
@@ -37,14 +38,6 @@ static void new_parent(struct commit *parent, struct commit_list **parents_p)
        commit_list_insert(parent, parents_p);
 }
 
-static int commit_tree_config(const char *var, const char *value, void *cb)
-{
-       int status = git_gpg_config(var, value, NULL);
-       if (status)
-               return status;
-       return git_default_config(var, value, cb);
-}
-
 static int parse_parent_arg_callback(const struct option *opt,
                const char *arg, int unset)
 {
@@ -121,7 +114,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                OPT_END()
        };
 
-       git_config(commit_tree_config, NULL);
+       git_config(git_default_config, NULL);
 
        if (argc < 2 || !strcmp(argv[1], "-h"))
                usage_with_options(commit_tree_usage, options);
index 44b763d7cd025db45581d60902502ae2a2a9fe11..f71ed41bf59e3054a2ca6960a2d9a17625868233 100644 (file)
@@ -5,7 +5,7 @@
  * Based on git-commit.sh by Junio C Hamano and Linus Torvalds
  */
 
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
 #include "lockfile.h"
@@ -414,7 +414,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
                discard_index(&the_index);
                read_index_from(&the_index, get_lock_file_path(&index_lock),
                                get_git_dir());
-               if (update_main_cache_tree(WRITE_TREE_SILENT) == 0) {
+               if (cache_tree_update(&the_index, WRITE_TREE_SILENT) == 0) {
                        if (reopen_lock_file(&index_lock) < 0)
                                die(_("unable to write index file"));
                        if (write_locked_index(&the_index, &index_lock, 0))
@@ -444,7 +444,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
                                       LOCK_DIE_ON_ERROR);
                add_files_to_cache(also ? prefix : NULL, &pathspec, 0);
                refresh_cache_or_die(refresh_flags);
-               update_main_cache_tree(WRITE_TREE_SILENT);
+               cache_tree_update(&the_index, WRITE_TREE_SILENT);
                if (write_locked_index(&the_index, &index_lock, 0))
                        die(_("unable to write new_index file"));
                commit_style = COMMIT_NORMAL;
@@ -467,7 +467,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
                refresh_cache_or_die(refresh_flags);
                if (the_index.cache_changed
                    || !cache_tree_fully_valid(the_index.cache_tree))
-                       update_main_cache_tree(WRITE_TREE_SILENT);
+                       cache_tree_update(&the_index, WRITE_TREE_SILENT);
                if (write_locked_index(&the_index, &index_lock,
                                       COMMIT_LOCK | SKIP_IF_UNCHANGED))
                        die(_("unable to write new_index file"));
@@ -516,7 +516,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
        repo_hold_locked_index(the_repository, &index_lock, LOCK_DIE_ON_ERROR);
        add_remove_files(&partial);
        refresh_index(&the_index, REFRESH_QUIET, NULL, NULL, NULL);
-       update_main_cache_tree(WRITE_TREE_SILENT);
+       cache_tree_update(&the_index, WRITE_TREE_SILENT);
        if (write_locked_index(&the_index, &index_lock, 0))
                die(_("unable to write new_index file"));
 
@@ -991,9 +991,9 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
                struct object_id oid;
                const char *parent = "HEAD";
 
-               if (!active_nr) {
-                       discard_cache();
-                       if (read_cache() < 0)
+               if (!the_index.cache_nr) {
+                       discard_index(&the_index);
+                       if (repo_read_index(the_repository) < 0)
                                die(_("Cannot read index"));
                }
 
@@ -1079,7 +1079,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
        }
        read_index_from(&the_index, index_file, get_git_dir());
 
-       if (update_main_cache_tree(0)) {
+       if (cache_tree_update(&the_index, 0)) {
                error(_("Error building trees"));
                return 0;
        }
@@ -1600,7 +1600,6 @@ int cmd_status(int argc, const char **argv, const char *prefix)
 static int git_commit_config(const char *k, const char *v, void *cb)
 {
        struct wt_status *s = cb;
-       int status;
 
        if (!strcmp(k, "commit.template"))
                return git_config_pathname(&template_file, k, v);
@@ -1620,9 +1619,6 @@ static int git_commit_config(const char *k, const char *v, void *cb)
                return 0;
        }
 
-       status = git_gpg_config(k, v, NULL);
-       if (status)
-               return status;
        return git_status_config(k, v, s);
 }
 
index 060cf9f3e05e6718ae02923e132e4804dbdcb291..49d832d40931c8a895e0381a995581dfd936b038 100644 (file)
@@ -1,7 +1,8 @@
 #include "builtin.h"
-#include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "color.h"
+#include "ident.h"
 #include "parse-options.h"
 #include "urlmatch.h"
 #include "quote.h"
index 07b941959628b9d02dbf0282e779040cea5b27be..bb21bc43e42e606b53dd268a9eb19df30fd98500 100644 (file)
@@ -57,7 +57,8 @@ static void loose_garbage(const char *path)
                report_garbage(PACKDIR_FILE_GARBAGE, path);
 }
 
-static int count_loose(const struct object_id *oid, const char *path, void *data)
+static int count_loose(const struct object_id *oid, const char *path,
+                      void *data UNUSED)
 {
        struct stat st;
 
@@ -72,7 +73,8 @@ static int count_loose(const struct object_id *oid, const char *path, void *data
        return 0;
 }
 
-static int count_cruft(const char *basename, const char *path, void *data)
+static int count_cruft(const char *basename UNUSED, const char *path,
+                      void *data UNUSED)
 {
        loose_garbage(path);
        return 0;
index f3c89831d4a27fb5a2637433ffa724ff0b5e9656..6e509d02c370486a22fe45b39cfc9ee0fa938384 100644 (file)
@@ -1,4 +1,5 @@
 #include "builtin.h"
+#include "alloc.h"
 #include "parse-options.h"
 
 #ifndef NO_UNIX_SOCKETS
@@ -127,6 +128,9 @@ static void serve_one_client(FILE *in, FILE *out)
                if (e) {
                        fprintf(out, "username=%s\n", e->item.username);
                        fprintf(out, "password=%s\n", e->item.password);
+                       if (e->item.password_expiry_utc != TIME_MAX)
+                               fprintf(out, "password_expiry_utc=%"PRItime"\n",
+                                       e->item.password_expiry_utc);
                }
        }
        else if (!strcmp(action.buf, "exit")) {
index eea1e330c00c62a649b5a059bbfcf6e351f95269..5b5930f5c8c05dfa7581be78b6fc2f8e73e758d0 100644 (file)
@@ -1,6 +1,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "commit.h"
 #include "tag.h"
index 25b853b85ca99d210d230d6783b824a270de9d6c..a393efa4f0807f4608d7c1f7499e222d530c6e70 100644 (file)
@@ -3,6 +3,7 @@
 #include "config.h"
 #include "diff.h"
 #include "commit.h"
+#include "hex.h"
 #include "log-tree.h"
 #include "builtin.h"
 #include "submodule.h"
index dbbfb19f1921028f78b499af0ad35a67c9595d59..01681d0fb88f305e50f9836c1c0cbcdc03b5e1c6 100644 (file)
@@ -17,6 +17,7 @@
 #include "builtin.h"
 #include "run-command.h"
 #include "exec-cmd.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "strvec.h"
 #include "strbuf.h"
index 39a890fc005192a5082a1c170550f4be102efbc1..78493c6d2bf877e6f47b6ad0b80f11b40f36da7b 100644 (file)
@@ -6,6 +6,7 @@
 #include "builtin.h"
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "refs.h"
 #include "refspec.h"
 #include "object-store.h"
index 7134683ab93f96d4c213d478fc7fadc8a17856c0..f7548ff4a35c081d79af0d895cbf18ca888e2758 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "lockfile.h"
@@ -436,7 +437,7 @@ static void set_checkpoint_signal(void)
 
 #else
 
-static void checkpoint_signal(int signo)
+static void checkpoint_signal(int signo UNUSED)
 {
        checkpoint_requested = 1;
 }
index afe679368deec2a0288de1606259b73847ce434b..d1a4306da3ad76574603c01d199cf5f7914d014c 100644 (file)
@@ -1,4 +1,6 @@
 #include "builtin.h"
+#include "alloc.h"
+#include "hex.h"
 #include "pkt-line.h"
 #include "fetch-pack.h"
 #include "remote.h"
@@ -211,8 +213,8 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
                int flags = args.verbose ? CONNECT_VERBOSE : 0;
                if (args.diag_url)
                        flags |= CONNECT_DIAG_URL;
-               conn = git_connect(fd, dest, args.uploadpack,
-                                  flags);
+               conn = git_connect(fd, dest, "git-upload-pack",
+                                  args.uploadpack, flags);
                if (!conn)
                        return args.diag_url ? 0 : 1;
        }
index 12978622d512edab47c19e1291cef42353c59e86..7221e57f3529f22104b55a7200d5df04c2c4e63d 100644 (file)
@@ -3,6 +3,7 @@
  */
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "repository.h"
 #include "refs.h"
 #include "refspec.h"
@@ -29,6 +30,7 @@
 #include "commit-graph.h"
 #include "shallow.h"
 #include "worktree.h"
+#include "bundle-uri.h"
 
 #define FORCED_UPDATES_DELAY_WARNING_IN_MS (10 * 1000)
 
@@ -1131,6 +1133,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
        if (!connectivity_checked) {
                struct check_connected_options opt = CHECK_CONNECTED_INIT;
 
+               opt.exclude_hidden_refs_section = "fetch";
                rm = ref_map;
                if (check_connected(iterate_ref_map, &rm, &opt)) {
                        rc = error(_("%s did not send all necessary objects\n"), url);
@@ -1324,6 +1327,7 @@ static int check_exist_and_connected(struct ref *ref_map)
        }
 
        opt.quiet = 1;
+       opt.exclude_hidden_refs_section = "fetch";
        return check_connected(iterate_ref_map, &rm, &opt);
 }
 
@@ -1879,6 +1883,8 @@ static void add_options_to_argv(struct strvec *argv)
                strvec_push(argv, "--ipv4");
        else if (family == TRANSPORT_FAMILY_IPV6)
                strvec_push(argv, "--ipv6");
+       if (!write_fetch_head)
+               strvec_push(argv, "--no-write-fetch-head");
 }
 
 /* Fetch multiple remotes in parallel */
@@ -1889,7 +1895,8 @@ struct parallel_fetch_state {
        int next, result;
 };
 
-static int fetch_next_remote(struct child_process *cp, struct strbuf *out,
+static int fetch_next_remote(struct child_process *cp,
+                            struct strbuf *out UNUSED,
                             void *cb, void **task_cb)
 {
        struct parallel_fetch_state *state = cb;
@@ -1911,7 +1918,8 @@ static int fetch_next_remote(struct child_process *cp, struct strbuf *out,
        return 1;
 }
 
-static int fetch_failed_to_start(struct strbuf *out, void *cb, void *task_cb)
+static int fetch_failed_to_start(struct strbuf *out UNUSED,
+                                void *cb, void *task_cb)
 {
        struct parallel_fetch_state *state = cb;
        const char *remote = task_cb;
@@ -2109,6 +2117,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv,
 int cmd_fetch(int argc, const char **argv, const char *prefix)
 {
        int i;
+       const char *bundle_uri;
        struct string_list list = STRING_LIST_INIT_DUP;
        struct remote *remote = NULL;
        int result = 0;
@@ -2194,6 +2203,13 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
        if (dry_run)
                write_fetch_head = 0;
 
+       if (!max_jobs)
+               max_jobs = online_cpus();
+
+       if (!git_config_get_string_tmp("fetch.bundleuri", &bundle_uri) &&
+           fetch_bundle_uri(the_repository, bundle_uri, NULL))
+               warning(_("failed to fetch bundles from '%s'"), bundle_uri);
+
        if (all) {
                if (argc == 1)
                        die(_("fetch --all does not take a repository argument"));
index d207bd909b4b6da0671628c20bb29e98f427b550..c4a633c0329a8ec84a353de90bb2a7af4de1ae08 100644 (file)
@@ -1,6 +1,6 @@
-#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "cache.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "commit.h"
@@ -19,6 +19,7 @@
 #include "decorate.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "resolve-undo.h"
 #include "run-command.h"
 #include "worktree.h"
@@ -233,17 +234,17 @@ static void mark_unreachable_referents(const struct object_id *oid)
 }
 
 static int mark_loose_unreachable_referents(const struct object_id *oid,
-                                           const char *path,
-                                           void *data)
+                                           const char *path UNUSED,
+                                           void *data UNUSED)
 {
        mark_unreachable_referents(oid);
        return 0;
 }
 
 static int mark_packed_unreachable_referents(const struct object_id *oid,
-                                            struct packed_git *pack,
-                                            uint32_t pos,
-                                            void *data)
+                                            struct packed_git *pack UNUSED,
+                                            uint32_t pos UNUSED,
+                                            void *data UNUSED)
 {
        mark_unreachable_referents(oid);
        return 0;
@@ -661,14 +662,15 @@ static int fsck_loose(const struct object_id *oid, const char *path, void *data)
        return 0; /* keep checking other objects, even if we saw an error */
 }
 
-static int fsck_cruft(const char *basename, const char *path, void *data)
+static int fsck_cruft(const char *basename, const char *path,
+                     void *data UNUSED)
 {
        if (!starts_with(basename, "tmp_obj_"))
                fprintf_ln(stderr, _("bad sha1 file: %s"), path);
        return 0;
 }
 
-static int fsck_subdir(unsigned int nr, const char *path, void *data)
+static int fsck_subdir(unsigned int nr, const char *path UNUSED, void *data)
 {
        struct for_each_loose_cb *cb_data = data;
        struct progress *progress = cb_data->progress;
@@ -732,19 +734,19 @@ static int fsck_head_link(const char *head_ref_name,
        return 0;
 }
 
-static int fsck_cache_tree(struct cache_tree *it)
+static int fsck_cache_tree(struct cache_tree *it, const char *index_path)
 {
        int i;
        int err = 0;
 
        if (verbose)
-               fprintf_ln(stderr, _("Checking cache tree"));
+               fprintf_ln(stderr, _("Checking cache tree of %s"), index_path);
 
        if (0 <= it->entry_count) {
                struct object *obj = parse_object(the_repository, &it->oid);
                if (!obj) {
-                       error(_("%s: invalid sha1 pointer in cache-tree"),
-                             oid_to_hex(&it->oid));
+                       error(_("%s: invalid sha1 pointer in cache-tree of %s"),
+                             oid_to_hex(&it->oid), index_path);
                        errors_found |= ERROR_REFS;
                        return 1;
                }
@@ -755,11 +757,12 @@ static int fsck_cache_tree(struct cache_tree *it)
                        err |= objerror(obj, _("non-tree in cache-tree"));
        }
        for (i = 0; i < it->subtree_nr; i++)
-               err |= fsck_cache_tree(it->down[i]->cache_tree);
+               err |= fsck_cache_tree(it->down[i]->cache_tree, index_path);
        return err;
 }
 
-static int fsck_resolve_undo(struct index_state *istate)
+static int fsck_resolve_undo(struct index_state *istate,
+                            const char *index_path)
 {
        struct string_list_item *item;
        struct string_list *resolve_undo = istate->resolve_undo;
@@ -782,8 +785,9 @@ static int fsck_resolve_undo(struct index_state *istate)
 
                        obj = parse_object(the_repository, &ru->oid[i]);
                        if (!obj) {
-                               error(_("%s: invalid sha1 pointer in resolve-undo"),
-                                     oid_to_hex(&ru->oid[i]));
+                               error(_("%s: invalid sha1 pointer in resolve-undo of %s"),
+                                     oid_to_hex(&ru->oid[i]),
+                                     index_path);
                                errors_found |= ERROR_REFS;
                                continue;
                        }
@@ -796,6 +800,38 @@ static int fsck_resolve_undo(struct index_state *istate)
        return 0;
 }
 
+static void fsck_index(struct index_state *istate, const char *index_path,
+                      int is_main_index)
+{
+       unsigned int i;
+
+       /* TODO: audit for interaction with sparse-index. */
+       ensure_full_index(istate);
+       for (i = 0; i < istate->cache_nr; i++) {
+               unsigned int mode;
+               struct blob *blob;
+               struct object *obj;
+
+               mode = istate->cache[i]->ce_mode;
+               if (S_ISGITLINK(mode))
+                       continue;
+               blob = lookup_blob(the_repository,
+                                  &istate->cache[i]->oid);
+               if (!blob)
+                       continue;
+               obj = &blob->object;
+               obj->flags |= USED;
+               fsck_put_object_name(&fsck_walk_options, &obj->oid,
+                                    "%s:%s",
+                                    is_main_index ? "" : index_path,
+                                    istate->cache[i]->name);
+               mark_object_reachable(obj);
+       }
+       if (istate->cache_tree)
+               fsck_cache_tree(istate->cache_tree, index_path);
+       fsck_resolve_undo(istate, index_path);
+}
+
 static void mark_object_for_connectivity(const struct object_id *oid)
 {
        struct object *obj = lookup_unknown_object(the_repository, oid);
@@ -803,17 +839,17 @@ static void mark_object_for_connectivity(const struct object_id *oid)
 }
 
 static int mark_loose_for_connectivity(const struct object_id *oid,
-                                      const char *path,
-                                      void *data)
+                                      const char *path UNUSED,
+                                      void *data UNUSED)
 {
        mark_object_for_connectivity(oid);
        return 0;
 }
 
 static int mark_packed_for_connectivity(const struct object_id *oid,
-                                       struct packed_git *pack,
-                                       uint32_t pos,
-                                       void *data)
+                                       struct packed_git *pack UNUSED,
+                                       uint32_t pos UNUSED,
+                                       void *data UNUSED)
 {
        mark_object_for_connectivity(oid);
        return 0;
@@ -956,32 +992,30 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
        }
 
        if (keep_cache_objects) {
+               struct worktree **worktrees, **p;
+
                verify_index_checksum = 1;
                verify_ce_order = 1;
-               repo_read_index(the_repository);
-               /* TODO: audit for interaction with sparse-index. */
-               ensure_full_index(&the_index);
-               for (i = 0; i < the_index.cache_nr; i++) {
-                       unsigned int mode;
-                       struct blob *blob;
-                       struct object *obj;
 
-                       mode = the_index.cache[i]->ce_mode;
-                       if (S_ISGITLINK(mode))
-                               continue;
-                       blob = lookup_blob(the_repository,
-                                          &the_index.cache[i]->oid);
-                       if (!blob)
-                               continue;
-                       obj = &blob->object;
-                       obj->flags |= USED;
-                       fsck_put_object_name(&fsck_walk_options, &obj->oid,
-                                            ":%s", the_index.cache[i]->name);
-                       mark_object_reachable(obj);
+               worktrees = get_worktrees();
+               for (p = worktrees; *p; p++) {
+                       struct worktree *wt = *p;
+                       struct index_state istate =
+                               INDEX_STATE_INIT(the_repository);
+                       char *path;
+
+                       /*
+                        * Make a copy since the buffer is reusable
+                        * and may get overwritten by other calls
+                        * while we're examining the index.
+                        */
+                       path = xstrdup(worktree_git_path(wt, "index"));
+                       read_index_from(&istate, path, get_worktree_git_dir(wt));
+                       fsck_index(&istate, path, wt->is_current);
+                       discard_index(&istate);
+                       free(path);
                }
-               if (the_index.cache_tree)
-                       fsck_cache_tree(the_index.cache_tree);
-               fsck_resolve_undo(&the_index);
+               free_worktrees(worktrees);
        }
 
        check_connectivity();
index 0feef8caf6d5e27d508b3d4ea3e2679cd50a9966..cae804a190808bf787ad098f749c721d440c1036 100644 (file)
@@ -1,4 +1,5 @@
 #include "builtin.h"
+#include "alloc.h"
 #include "config.h"
 #include "parse-options.h"
 #include "fsmonitor.h"
index 02455fdcd73603ad640a7a54c697c7d7f58225cf..c58fe8c936c63da46134c5ab764228baaa0b88ef 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "builtin.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "tempfile.h"
@@ -976,9 +977,9 @@ struct write_loose_object_data {
 
 static int loose_object_auto_limit = 100;
 
-static int loose_object_count(const struct object_id *oid,
-                              const char *path,
-                              void *data)
+static int loose_object_count(const struct object_id *oid UNUSED,
+                             const char *path UNUSED,
+                             void *data)
 {
        int *count = (int*)data;
        if (++(*count) >= loose_object_auto_limit)
@@ -1003,15 +1004,15 @@ static int loose_object_auto_condition(void)
                                             NULL, NULL, &count);
 }
 
-static int bail_on_loose(const struct object_id *oid,
-                        const char *path,
-                        void *data)
+static int bail_on_loose(const struct object_id *oid UNUSED,
+                        const char *path UNUSED,
+                        void *data UNUSED)
 {
        return 1;
 }
 
 static int write_loose_object_to_stdin(const struct object_id *oid,
-                                      const char *path,
+                                      const char *path UNUSED,
                                       void *data)
 {
        struct write_loose_object_data *d = (struct write_loose_object_data *)data;
index f7821c5fbbaeda3888f3011ee5215393e1319952..c590fcb19dd2044c434dd70246f0cc443e3281da 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright (c) 2006 Junio C Hamano
  */
 #include "cache.h"
+#include "alloc.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "blob.h"
index 44db83f07fd12c535d758f596b6b12f20b7eeb2e..1848768b97c92e0073fa213fb99d7c33fbd6712f 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include "builtin.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "blob.h"
 #include "quote.h"
index b6530d189ad08dc76367fca61cc8eae95be13ffd..f95b7965c58efe779d91a60d2b91b36742ac31f7 100644 (file)
@@ -7,7 +7,7 @@
 #include "strvec.h"
 
 #define BUILTIN_HOOK_RUN_USAGE \
-       N_("git hook run [--ignore-missing] <hook-name> [-- <hook-args>]")
+       N_("git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>]")
 
 static const char * const builtin_hook_usage[] = {
        BUILTIN_HOOK_RUN_USAGE,
@@ -28,6 +28,8 @@ static int run(int argc, const char **argv, const char *prefix)
        struct option run_options[] = {
                OPT_BOOL(0, "ignore-missing", &ignore_missing,
                         N_("silently ignore missing requested <hook-name>")),
+               OPT_STRING(0, "to-stdin", &opt.path_to_stdin, N_("path"),
+                          N_("file to read into hooks' stdin")),
                OPT_END(),
        };
        int ret;
index 6648f2daef5cef38fd59dfba47c048ce72bb4c36..b451755f405a89bf8bfdfd28e288a6c7e1dbedf1 100644 (file)
@@ -1,6 +1,8 @@
 #include "builtin.h"
+#include "alloc.h"
 #include "config.h"
 #include "delta.h"
+#include "hex.h"
 #include "pack.h"
 #include "csum-file.h"
 #include "blob.h"
@@ -14,6 +16,7 @@
 #include "thread-utils.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "promisor-remote.h"
 
 static const char index_pack_usage[] =
index 04412dd9c936569506c1ca932a7804059a57904f..4693385e8ed307ad104c5238284f4930286c8c1e 100644 (file)
@@ -4,8 +4,10 @@
  * (C) Copyright 2006 Linus Torvalds
  *              2006 Junio Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "refs.h"
 #include "object-store.h"
 #include "color.h"
@@ -56,6 +58,7 @@ static int stdout_mboxrd;
 static const char *fmt_patch_subject_prefix = "PATCH";
 static int fmt_patch_name_max = FORMAT_PATCH_NAME_MAX_DEFAULT;
 static const char *fmt_pretty;
+static int format_no_prefix;
 
 static const char * const builtin_log_usage[] = {
        N_("git log [<options>] [<revision-range>] [[--] <path>...]"),
@@ -436,7 +439,7 @@ static void log_show_early(struct rev_info *revs, struct commit_list *list)
        setitimer(ITIMER_REAL, &early_output_timer, NULL);
 }
 
-static void early_output(int signal)
+static void early_output(int signal UNUSED)
 {
        show_early_output = log_show_early;
 }
@@ -601,8 +604,6 @@ static int git_log_config(const char *var, const char *value, void *cb)
                return 0;
        }
 
-       if (git_gpg_config(var, value, cb) < 0)
-               return -1;
        return git_diff_ui_config(var, value, cb);
 }
 
@@ -1007,6 +1008,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
        if (!strcmp(var, "format.attach")) {
                if (value && *value)
                        default_attach = xstrdup(value);
+               else if (value && !*value)
+                       FREE_AND_NULL(default_attach);
                else
                        default_attach = xstrdup(git_version_string);
                return 0;
@@ -1082,6 +1085,19 @@ static int git_format_config(const char *var, const char *value, void *cb)
                stdout_mboxrd = git_config_bool(var, value);
                return 0;
        }
+       if (!strcmp(var, "format.noprefix")) {
+               format_no_prefix = 1;
+               return 0;
+       }
+
+       /*
+        * ignore some porcelain config which would otherwise be parsed by
+        * git_diff_ui_config(), via git_log_config(); we can't just avoid
+        * diff_ui_config completely, because we do care about some ui options
+        * like color.
+        */
+       if (!strcmp(var, "diff.noprefix"))
+               return 0;
 
        return git_log_config(var, value, cb);
 }
@@ -1991,6 +2007,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
        s_r_opt.def = "HEAD";
        s_r_opt.revarg_opt = REVARG_COMMITTISH;
 
+       if (format_no_prefix)
+               diff_set_noprefix(&rev.diffopt);
+
        if (default_attach) {
                rev.mime_boundary = default_attach;
                rev.no_inline = 1;
@@ -2095,6 +2114,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 
        /* Always generate a patch */
        rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
+       rev.always_show_header = 1;
 
        rev.zero_commit = zero_commit;
        rev.patch_name_max = fmt_patch_name_max;
index a03b559ecaab4caeba9a9a18bb268f22274e7b2a..26e309f533a7e5303f203775b1618a6ea8e1a95e 100644 (file)
@@ -89,12 +89,15 @@ static void write_name(const char *name)
 
 static void write_name_to_buf(struct strbuf *sb, const char *name)
 {
-       const char *rel = relative_path(name, prefix_len ? prefix : NULL, sb);
+       struct strbuf buf = STRBUF_INIT;
+       const char *rel = relative_path(name, prefix_len ? prefix : NULL, &buf);
 
        if (line_terminator)
                quote_c_style(rel, sb, NULL, 0);
        else
                strbuf_addstr(sb, rel);
+
+       strbuf_release(&buf);
 }
 
 static const char *get_tag(const struct cache_entry *ce, const char *tag)
index 5d5ac0387165fa8f4fb5a4c22b0f0f002f0e1545..a9de0575ce5685329385658711fa84cf9d4d1984 100644 (file)
@@ -1,14 +1,16 @@
 #include "builtin.h"
 #include "cache.h"
+#include "hex.h"
 #include "transport.h"
 #include "ref-filter.h"
 #include "remote.h"
 #include "refs.h"
+#include "parse-options.h"
 
 static const char * const ls_remote_usage[] = {
        N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
           "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-          "              [--symref] [<repository> [<refs>...]]"),
+          "              [--symref] [<repository> [<patterns>...]]"),
        NULL
 };
 
index 8cc8c995df9399cd84465060965d065d33cd5d3b..64d8e54318c97ee8b9e74afdcc5a9607bf6f4325 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "blob.h"
 #include "tree.h"
index 6f3941f2a49ce51ee295158a4d78f5c80c1afeb7..be8f3b221c97be3f5e7c23d2790e420b245d752e 100644 (file)
@@ -2,6 +2,7 @@
 #include "cache.h"
 #include "config.h"
 #include "commit.h"
+#include "hex.h"
 #include "refs.h"
 #include "diff.h"
 #include "revision.h"
index 452f833ac4610121d5194a65087d733e4b66914f..c875f5d37ee63f489f03a3f0f8007998fca69ca0 100644 (file)
@@ -1,5 +1,6 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "hex.h"
 #include "run-command.h"
 
 static const char *pgm;
index 828dc81c426514d822e6bbce172495373f9a92c5..e78251816485d9d9fae2c37afc2073165649351e 100644 (file)
@@ -3,6 +3,7 @@
 #include "tree-walk.h"
 #include "xdiff-interface.h"
 #include "help.h"
+#include "hex.h"
 #include "commit.h"
 #include "commit-reach.h"
 #include "merge-ort.h"
index 74de2ebd2b33f967ff85988779bbf85819fe9a3c..19c31d4ff488335e5c2e5717fb8649589f72f0bb 100644 (file)
@@ -6,9 +6,11 @@
  * Based on git-merge.sh by Junio C Hamano.
  */
 
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "builtin.h"
 #include "lockfile.h"
@@ -390,8 +392,8 @@ static void restore_state(const struct object_id *head,
        run_command(&cmd);
 
 refresh_cache:
-       discard_cache();
-       if (read_cache() < 0)
+       discard_index(&the_index);
+       if (repo_read_index(the_repository) < 0)
                die(_("could not read index"));
 }
 
@@ -659,9 +661,6 @@ static int git_merge_config(const char *k, const char *v, void *cb)
        }
 
        status = fmt_merge_msg_config(k, v, cb);
-       if (status)
-               return status;
-       status = git_gpg_config(k, v, NULL);
        if (status)
                return status;
        return git_diff_ui_config(k, v, cb);
@@ -706,7 +705,7 @@ static int read_tree_trivial(struct object_id *common, struct object_id *head,
 
 static void write_tree_trivial(struct object_id *oid)
 {
-       if (write_cache_as_tree(oid, 0, NULL))
+       if (write_index_as_tree(oid, &the_index, get_index_file(), 0, NULL))
                die(_("git write-tree failed to write a tree"));
 }
 
@@ -1560,7 +1559,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                        !common->next &&
                        oideq(&common->item->object.oid, &head_commit->object.oid)) {
                /* Again the most common case of merging one remote. */
-               struct strbuf msg = STRBUF_INIT;
+               const char *msg = have_message ?
+                       "Fast-forward (no commit created; -m option ignored)" :
+                       "Fast-forward";
                struct commit *commit;
 
                if (verbosity >= 0) {
@@ -1570,10 +1571,6 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                               find_unique_abbrev(&remoteheads->item->object.oid,
                                                  DEFAULT_ABBREV));
                }
-               strbuf_addstr(&msg, "Fast-forward");
-               if (have_message)
-                       strbuf_addstr(&msg,
-                               " (no commit created; -m option ignored)");
                commit = remoteheads->item;
                if (!commit) {
                        ret = 1;
@@ -1592,9 +1589,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                        goto done;
                }
 
-               finish(head_commit, remoteheads, &commit->object.oid, msg.buf);
+               finish(head_commit, remoteheads, &commit->object.oid, msg);
                remove_merge_branch_state(the_repository);
-               strbuf_release(&msg);
                goto done;
        } else if (!remoteheads->next && common->next)
                ;
@@ -1621,7 +1617,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                                error(_("Your local changes to the following files would be overwritten by merge:\n  %s"),
                                      sb.buf);
                                strbuf_release(&sb);
-                               return 2;
+                               ret = 2;
+                               goto done;
                        }
 
                        /* See if it is really trivial. */
index 5d22909122d195873f2427812084dc8bd4319180..42c2457c7052c715549f313d2df0b4531a130a41 100644 (file)
@@ -1,4 +1,5 @@
 #include "builtin.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "tag.h"
 #include "replace-object.h"
index 06d81400f558152292718a57c384e12078e2b9be..848c7b47476fab78c15984178654f62e8b74cfd9 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright (c) Junio C Hamano, 2006, 2009
  */
 #include "builtin.h"
+#include "alloc.h"
+#include "hex.h"
 #include "quote.h"
 #include "tree.h"
 #include "parse-options.h"
index 19790ce38fa265d1b2b02f738ad6351492752e10..8129050377529e99cb851f08876b7a013a8f5f27 100644 (file)
@@ -3,8 +3,9 @@
  *
  * Copyright (C) 2006 Johannes Schindelin
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "alloc.h"
 #include "config.h"
 #include "pathspec.h"
 #include "lockfile.h"
@@ -489,7 +490,8 @@ remove_entry:
                        if ((mode & SPARSE) &&
                            path_in_sparse_checkout(dst, &the_index)) {
                                /* from out-of-cone to in-cone */
-                               int dst_pos = cache_name_pos(dst, strlen(dst));
+                               int dst_pos = index_name_pos(&the_index, dst,
+                                                            strlen(dst));
                                struct cache_entry *dst_ce = the_index.cache[dst_pos];
 
                                dst_ce->ce_flags &= ~CE_SKIP_WORKTREE;
@@ -500,7 +502,8 @@ remove_entry:
                                   !(mode & SPARSE) &&
                                   !path_in_sparse_checkout(dst, &the_index)) {
                                /* from in-cone to out-of-cone */
-                               int dst_pos = cache_name_pos(dst, strlen(dst));
+                               int dst_pos = index_name_pos(&the_index, dst,
+                                                            strlen(dst));
                                struct cache_entry *dst_ce = the_index.cache[dst_pos];
 
                                /*
index 15535e914a6939d661296798e0b325da9f1ac7b6..723ba616a88d46c8e04f4df28ee5ba8efe6c5d2f 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
-#include "cache.h"
+#include "alloc.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "commit.h"
@@ -108,19 +109,11 @@ static int is_better_name(struct rev_name *name,
        int name_distance = effective_distance(name->distance, name->generation);
        int new_distance = effective_distance(distance, generation);
 
-       /*
-        * When comparing names based on tags, prefer names
-        * based on the older tag, even if it is farther away.
-        */
+       /* If both are tags, we prefer the nearer one. */
        if (from_tag && name->from_tag)
-               return (name->taggerdate > taggerdate ||
-                       (name->taggerdate == taggerdate &&
-                        name_distance > new_distance));
+               return name_distance > new_distance;
 
-       /*
-        * We know that at least one of them is a non-tag at this point.
-        * favor a tag over a non-tag.
-        */
+       /* Favor a tag over a non-tag. */
        if (name->from_tag != from_tag)
                return from_tag;
 
@@ -273,17 +266,6 @@ static int subpath_matches(const char *path, const char *filter)
        return -1;
 }
 
-static const char *name_ref_abbrev(const char *refname, int shorten_unambiguous)
-{
-       if (shorten_unambiguous)
-               refname = shorten_unambiguous_ref(refname, 0);
-       else if (skip_prefix(refname, "refs/heads/", &refname))
-               ; /* refname already advanced */
-       else
-               skip_prefix(refname, "refs/", &refname);
-       return refname;
-}
-
 struct name_ref_data {
        int tags_only;
        int name_only;
@@ -309,11 +291,19 @@ static void add_to_tip_table(const struct object_id *oid, const char *refname,
                             int shorten_unambiguous, struct commit *commit,
                             timestamp_t taggerdate, int from_tag, int deref)
 {
-       refname = name_ref_abbrev(refname, shorten_unambiguous);
+       char *short_refname = NULL;
+
+       if (shorten_unambiguous)
+               short_refname = shorten_unambiguous_ref(refname, 0);
+       else if (skip_prefix(refname, "refs/heads/", &refname))
+               ; /* refname already advanced */
+       else
+               skip_prefix(refname, "refs/", &refname);
 
        ALLOC_GROW(tip_table.table, tip_table.nr + 1, tip_table.alloc);
        oidcpy(&tip_table.table[tip_table.nr].oid, oid);
-       tip_table.table[tip_table.nr].refname = xstrdup(refname);
+       tip_table.table[tip_table.nr].refname = short_refname ?
+               short_refname : xstrdup(refname);
        tip_table.table[tip_table.nr].commit = commit;
        tip_table.table[tip_table.nr].taggerdate = taggerdate;
        tip_table.table[tip_table.nr].from_tag = from_tag;
index 80d9dfd25cad2afcb90c0219894529bcc1558cac..75ce7f3f5742b60ce2f76253aef4f9c357635def 100644 (file)
@@ -10,6 +10,7 @@
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
+#include "hex.h"
 #include "notes.h"
 #include "object-store.h"
 #include "repository.h"
@@ -113,8 +114,9 @@ static void free_note_data(struct note_data *d)
 }
 
 static int list_each_note(const struct object_id *object_oid,
-               const struct object_id *note_oid, char *note_path,
-               void *cb_data)
+                         const struct object_id *note_oid,
+                         char *note_path UNUSED,
+                         void *cb_data UNUSED)
 {
        printf("%s %s\n", oid_to_hex(note_oid), oid_to_hex(object_oid));
        return 0;
index cabace4abbe41f00ad6fd7caa0c2251a8364935a..7e9e20172a22abeb800a62ac4c8527038832a74c 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
-#include "cache.h"
+#include "alloc.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "attr.h"
 #include "list.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "dir.h"
 #include "midx.h"
 #include "trace2.h"
 #include "shallow.h"
 #include "promisor-remote.h"
 #include "pack-mtimes.h"
+#include "parse-options.h"
 
 /*
  * Objects we are going to pack are collected in the `to_pack` structure.
@@ -929,8 +932,10 @@ static struct object_entry **compute_write_order(void)
         */
        for_each_tag_ref(mark_tagged, NULL);
 
-       if (use_delta_islands)
+       if (use_delta_islands) {
                max_layers = compute_pack_layers(&to_pack);
+               free_island_marks();
+       }
 
        ALLOC_ARRAY(wo, to_pack.nr_objects);
        wo_end = 0;
@@ -1588,7 +1593,7 @@ static int add_object_entry(const struct object_id *oid, enum object_type type,
 
 static int add_object_entry_from_bitmap(const struct object_id *oid,
                                        enum object_type type,
-                                       int flags, uint32_t name_hash,
+                                       int flags UNUSED, uint32_t name_hash,
                                        struct packed_git *pack, off_t offset)
 {
        display_progress(progress_state, ++nr_seen);
@@ -1708,17 +1713,14 @@ static void pbase_tree_put(struct pbase_tree_cache *cache)
        free(cache);
 }
 
-static int name_cmp_len(const char *name)
+static size_t name_cmp_len(const char *name)
 {
-       int i;
-       for (i = 0; name[i] && name[i] != '\n' && name[i] != '/'; i++)
-               ;
-       return i;
+       return strcspn(name, "\n/");
 }
 
 static void add_pbase_object(struct tree_desc *tree,
                             const char *name,
-                            int cmplen,
+                            size_t cmplen,
                             const char *fullname)
 {
        struct name_entry entry;
@@ -1743,7 +1745,7 @@ static void add_pbase_object(struct tree_desc *tree,
                        struct tree_desc sub;
                        struct pbase_tree_cache *tree;
                        const char *down = name+cmplen+1;
-                       int downlen = name_cmp_len(down);
+                       size_t downlen = name_cmp_len(down);
 
                        tree = pbase_tree_get(&entry.oid);
                        if (!tree)
@@ -1795,7 +1797,7 @@ static int check_pbase_path(unsigned hash)
 static void add_preferred_base_object(const char *name)
 {
        struct pbase_tree *it;
-       int cmplen;
+       size_t cmplen;
        unsigned hash = pack_name_hash(name);
 
        if (!num_preferred_base || check_pbase_path(hash))
@@ -3261,13 +3263,14 @@ static int add_object_entry_from_pack(const struct object_id *oid,
        return 0;
 }
 
-static void show_commit_pack_hint(struct commit *commit, void *_data)
+static void show_commit_pack_hint(struct commit *commit UNUSED,
+                                 void *data UNUSED)
 {
        /* nothing to do; commits don't have a namehash */
 }
 
 static void show_object_pack_hint(struct object *object, const char *name,
-                                 void *_data)
+                                 void *data UNUSED)
 {
        struct object_entry *oe = packlist_find(&to_pack, &object->oid);
        if (!oe)
@@ -3465,7 +3468,7 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type
        return;
 }
 
-static void show_cruft_object(struct object *obj, const char *name, void *data)
+static void show_cruft_object(struct object *obj, const char *name, void *data UNUSED)
 {
        /*
         * if we did not record it earlier, it's at least as old as our
@@ -3485,7 +3488,7 @@ static void show_cruft_commit(struct commit *commit, void *data)
        show_cruft_object((struct object*)commit, NULL, data);
 }
 
-static int cruft_include_check_obj(struct object *obj, void *data)
+static int cruft_include_check_obj(struct object *obj, void *data UNUSED)
 {
        return !has_object_kept_pack(&obj->oid, IN_CORE_KEEP_PACKS);
 }
@@ -3664,7 +3667,7 @@ static void read_object_list_from_stdin(void)
        }
 }
 
-static void show_commit(struct commit *commit, void *data)
+static void show_commit(struct commit *commit, void *data UNUSED)
 {
        add_object_entry(&commit->object.oid, OBJ_COMMIT, NULL, 0);
 
@@ -3675,7 +3678,8 @@ static void show_commit(struct commit *commit, void *data)
                propagate_island_marks(commit);
 }
 
-static void show_object(struct object *obj, const char *name, void *data)
+static void show_object(struct object *obj, const char *name,
+                       void *data UNUSED)
 {
        add_preferred_base_object(name);
        add_object_entry(&obj->oid, obj->type, name, 0);
@@ -3762,7 +3766,7 @@ static void show_edge(struct commit *commit)
 static int add_object_in_unpacked_pack(const struct object_id *oid,
                                       struct packed_git *pack,
                                       uint32_t pos,
-                                      void *_data)
+                                      void *data UNUSED)
 {
        if (cruft) {
                off_t offset;
@@ -3796,7 +3800,7 @@ static void add_objects_in_unpacked_packs(void)
 }
 
 static int add_loose_object(const struct object_id *oid, const char *path,
-                           void *data)
+                           void *data UNUSED)
 {
        enum object_type type = oid_object_info(the_repository, oid, NULL);
 
@@ -3947,13 +3951,13 @@ static int get_object_list_from_bitmap(struct rev_info *revs)
 }
 
 static void record_recent_object(struct object *obj,
-                                const char *name,
-                                void *data)
+                                const char *name UNUSED,
+                                void *data UNUSED)
 {
        oid_array_append(&recent_objects, &obj->oid);
 }
 
-static void record_recent_commit(struct commit *commit, void *data)
+static void record_recent_commit(struct commit *commit, void *data UNUSED)
 {
        oid_array_append(&recent_objects, &commit->object.oid);
 }
index ecd49ca268f53bb4b986d5fdbf3876c0dc010733..82115c5808caf34ff875621fbbac22201f80aee0 100644 (file)
@@ -7,6 +7,7 @@
 */
 
 #include "builtin.h"
+#include "hex.h"
 #include "repository.h"
 #include "packfile.h"
 #include "object-store.h"
index f840fbf1c7e81332bd5f898b6eca7363c645ec60..338b15cd7b018c82467fadc624dc6555e38d7a7a 100644 (file)
@@ -2,6 +2,7 @@
 #include "builtin.h"
 #include "config.h"
 #include "diff.h"
+#include "hex.h"
 #include "parse-options.h"
 
 static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
index 27192201086877115157d6f5cedb2f8fc1e231a6..119a253a2adc4b3e867b95d61c97c40f21625614 100644 (file)
@@ -1,12 +1,14 @@
 #include "cache.h"
 #include "commit.h"
 #include "diff.h"
+#include "hex.h"
 #include "revision.h"
 #include "builtin.h"
 #include "reachable.h"
 #include "parse-options.h"
 #include "progress.h"
 #include "prune-packed.h"
+#include "replace-object.h"
 #include "object-store.h"
 #include "shallow.h"
 
@@ -98,7 +100,8 @@ static int prune_object(const struct object_id *oid, const char *fullpath,
        return 0;
 }
 
-static int prune_cruft(const char *basename, const char *path, void *data)
+static int prune_cruft(const char *basename, const char *path,
+                      void *data UNUSED)
 {
        if (starts_with(basename, "tmp_obj_"))
                prune_tmp_file(path);
@@ -107,7 +110,8 @@ static int prune_cruft(const char *basename, const char *path, void *data)
        return 0;
 }
 
-static int prune_subdir(unsigned int nr, const char *path, void *data)
+static int prune_subdir(unsigned int nr UNUSED, const char *path,
+                       void *data UNUSED)
 {
        if (!show_only)
                rmdir(path);
index 1ab4de0005da3f6d2aa4b6a93d61544818af8700..56f679d94a07353e7dfabdbc76b7aae9ccccc055 100644 (file)
@@ -9,6 +9,7 @@
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "exec-cmd.h"
 #include "run-command.h"
@@ -359,8 +360,6 @@ static enum rebase_type config_get_rebase(int *rebase_unspecified)
  */
 static int git_pull_config(const char *var, const char *value, void *cb)
 {
-       int status;
-
        if (!strcmp(var, "rebase.autostash")) {
                config_autostash = git_config_bool(var, value);
                return 0;
@@ -372,10 +371,6 @@ static int git_pull_config(const char *var, const char *value, void *cb)
                check_trust_level = 0;
        }
 
-       status = git_gpg_config(var, value, cb);
-       if (status)
-               return status;
-
        return git_default_config(var, value, cb);
 }
 
index 60ac8017e521f0c7c9192df89c797e1898ec60fd..12a402aea3d952e409c394bc853c56deae963dbd 100644 (file)
@@ -63,16 +63,9 @@ static struct refspec rs = REFSPEC_INIT_PUSH;
 static struct string_list push_options_config = STRING_LIST_INIT_DUP;
 
 static void refspec_append_mapped(struct refspec *refspec, const char *ref,
-                                 struct remote *remote, struct ref *local_refs)
+                                 struct remote *remote, struct ref *matched)
 {
        const char *branch_name;
-       struct ref *matched = NULL;
-
-       /* Does "ref" uniquely name our ref? */
-       if (count_refspec_match(ref, local_refs, &matched) != 1) {
-               refspec_append(refspec, ref);
-               return;
-       }
 
        if (remote->push.nr) {
                struct refspec_item query;
@@ -120,15 +113,28 @@ static void set_refspecs(const char **refs, int nr, const char *repo)
                                die(_("--delete only accepts plain target ref names"));
                        refspec_appendf(&rs, ":%s", ref);
                } else if (!strchr(ref, ':')) {
-                       if (!remote) {
-                               /* lazily grab remote and local_refs */
-                               remote = remote_get(repo);
+                       struct ref *matched = NULL;
+
+                       /* lazily grab local_refs */
+                       if (!local_refs)
                                local_refs = get_local_heads();
+
+                       /* Does "ref" uniquely name our ref? */
+                       if (count_refspec_match(ref, local_refs, &matched) != 1) {
+                               refspec_append(&rs, ref);
+                       } else {
+                               /* lazily grab remote */
+                               if (!remote)
+                                       remote = remote_get(repo);
+                               if (!remote)
+                                       BUG("must get a remote for repo '%s'", repo);
+
+                               refspec_append_mapped(&rs, ref, remote, matched);
                        }
-                       refspec_append_mapped(&rs, ref, remote, local_refs);
                } else
                        refspec_append(&rs, ref);
        }
+       free_refs(local_refs);
 }
 
 static int push_url_of_remote(struct remote *remote, const char ***url_p)
@@ -502,11 +508,6 @@ static int git_push_config(const char *k, const char *v, void *cb)
 {
        const char *slot_name;
        int *flags = cb;
-       int status;
-
-       status = git_gpg_config(k, v, NULL);
-       if (status)
-               return status;
 
        if (!strcmp(k, "push.followtags")) {
                if (git_config_bool(k, v))
index 3ce75417833bf9f57ca1ddfa17a53c67ef39a9d8..11759c415f31f35cbc7a633a2e345ae83b6fcf4e 100644 (file)
@@ -7,6 +7,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "object.h"
 #include "tree.h"
@@ -87,9 +88,9 @@ static int debug_merge(const struct cache_entry * const *stages,
 {
        int i;
 
-       printf("* %d-way merge\n", o->merge_size);
+       printf("* %d-way merge\n", o->internal.merge_size);
        debug_stage("index", stages[0], o);
-       for (i = 1; i <= o->merge_size; i++) {
+       for (i = 1; i <= o->internal.merge_size; i++) {
                char buf[24];
                xsnprintf(buf, sizeof(buf), "ent#%d", i);
                debug_stage(buf, stages[i], o);
@@ -144,7 +145,7 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
                OPT__DRY_RUN(&opts.dry_run, N_("don't update the index or the work tree")),
                OPT_BOOL(0, "no-sparse-checkout", &opts.skip_sparse_checkout,
                         N_("skip applying sparse checkout filter")),
-               OPT_BOOL(0, "debug-unpack", &opts.debug_unpack,
+               OPT_BOOL(0, "debug-unpack", &opts.internal.debug_unpack,
                         N_("debug unpack-trees")),
                OPT_CALLBACK_F(0, "recurse-submodules", NULL,
                            "checkout", "control recursive updating of submodules",
@@ -247,7 +248,7 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
                        opts.head_idx = 1;
        }
 
-       if (opts.debug_unpack)
+       if (opts.internal.debug_unpack)
                opts.fn = debug_merge;
 
        /* If we're going to prime_cache_tree later, skip cache tree update */
@@ -263,7 +264,7 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
        if (unpack_trees(nr_trees, t, &opts))
                return 128;
 
-       if (opts.debug_unpack || opts.dry_run)
+       if (opts.internal.debug_unpack || opts.dry_run)
                return 0; /* do not write the index out */
 
        /*
index 7171be40eeb4f05ae1bcc415b988e67b522de4fa..5b7b908b66b446bc65259c812184329ad95f22fa 100644 (file)
@@ -6,6 +6,7 @@
 
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "hex.h"
 #include "run-command.h"
 #include "exec-cmd.h"
 #include "strvec.h"
@@ -254,7 +255,7 @@ static int init_basic_state(struct replay_opts *opts, const char *head_name,
 
 static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
 {
-       int ret;
+       int ret = -1;
        char *revisions = NULL, *shortrevisions = NULL;
        struct strvec make_script_args = STRVEC_INIT;
        struct todo_list todo_list = TODO_LIST_INIT;
@@ -262,16 +263,12 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
 
        if (get_revision_ranges(opts->upstream, opts->onto, &opts->orig_head->object.oid,
                                &revisions, &shortrevisions))
-               return -1;
+               goto cleanup;
 
        if (init_basic_state(&replay,
                             opts->head_name ? opts->head_name : "detached HEAD",
-                            opts->onto, &opts->orig_head->object.oid)) {
-               free(revisions);
-               free(shortrevisions);
-
-               return -1;
-       }
+                            opts->onto, &opts->orig_head->object.oid))
+               goto cleanup;
 
        if (!opts->upstream && opts->squash_onto)
                write_file(path_squash_onto(), "%s\n",
@@ -300,6 +297,8 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
                        opts->autosquash, opts->update_refs, &todo_list);
        }
 
+cleanup:
+       replay_opts_release(&replay);
        free(revisions);
        free(shortrevisions);
        todo_list_release(&todo_list);
@@ -341,6 +340,7 @@ static int run_sequencer_rebase(struct rebase_options *opts)
                struct replay_opts replay_opts = get_replay_opts(opts);
 
                ret = sequencer_continue(the_repository, &replay_opts);
+               replay_opts_release(&replay_opts);
                break;
        }
        case ACTION_EDIT_TODO:
@@ -556,6 +556,7 @@ static int finish_rebase(struct rebase_options *opts)
 
                replay.action = REPLAY_INTERACTIVE_REBASE;
                ret = sequencer_remove_state(&replay);
+               replay_opts_release(&replay);
        } else {
                strbuf_addstr(&dir, opts->state_dir);
                if (remove_dir_recursively(&dir, 0))
@@ -660,7 +661,7 @@ static int run_am(struct rebase_options *opts)
        format_patch.git_cmd = 1;
        strvec_pushl(&format_patch.args, "format-patch", "-k", "--stdout",
                     "--full-index", "--cherry-pick", "--right-only",
-                    "--src-prefix=a/", "--dst-prefix=b/", "--no-renames",
+                    "--default-prefix", "--no-renames",
                     "--no-cover-letter", "--pretty=mboxrd", "--topo-order",
                     "--no-base", NULL);
        if (opts->git_format_patch_opt.len)
@@ -1039,6 +1040,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
        struct string_list strategy_options = STRING_LIST_INIT_NODUP;
        struct object_id squash_onto;
        char *squash_onto_name = NULL;
+       char *keep_base_onto_name = NULL;
        int reschedule_failed_exec = -1;
        int allow_preemptive_ff = 1;
        int preserve_merges_selected = 0;
@@ -1327,6 +1329,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 
                        replay.action = REPLAY_INTERACTIVE_REBASE;
                        ret = sequencer_remove_state(&replay);
+                       replay_opts_release(&replay);
                } else {
                        strbuf_reset(&buf);
                        strbuf_addstr(&buf, options.state_dir);
@@ -1511,7 +1514,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
                                die(_("apply options and merge options "
                                          "cannot be used together"));
                        else if (options.autosquash == -1 && options.config_autosquash == 1)
-                               die(_("apply options are incompatible with rebase.autosquash.  Consider adding --no-autosquash"));
+                               die(_("apply options are incompatible with rebase.autoSquash.  Consider adding --no-autosquash"));
                        else if (options.update_refs == -1 && options.config_update_refs == 1)
                                die(_("apply options are incompatible with rebase.updateRefs.  Consider adding --no-update-refs"));
                        else
@@ -1674,7 +1677,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
                strbuf_addstr(&buf, options.upstream_name);
                strbuf_addstr(&buf, "...");
                strbuf_addstr(&buf, branch_name);
-               options.onto_name = xstrdup(buf.buf);
+               options.onto_name = keep_base_onto_name = xstrdup(buf.buf);
        } else if (!options.onto_name)
                options.onto_name = options.upstream_name;
        if (strstr(options.onto_name, "...")) {
@@ -1848,8 +1851,10 @@ cleanup:
        free(options.gpg_sign_opt);
        string_list_clear(&options.exec, 0);
        free(options.strategy);
+       free(options.strategy_opts);
        strbuf_release(&options.git_format_patch_opt);
        free(squash_onto_name);
+       free(keep_base_onto_name);
        string_list_clear(&strategy_options, 0);
        return !!ret;
 }
index a90af3036303f1c6d8261559c7309fe9934874c7..554cda269d0110340097c5b09d4f6651bd093c44 100644 (file)
@@ -1,6 +1,7 @@
 #include "builtin.h"
 #include "repository.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "pack.h"
 #include "refs.h"
@@ -30,6 +31,7 @@
 #include "commit-reach.h"
 #include "worktree.h"
 #include "shallow.h"
+#include "parse-options.h"
 
 static const char * const receive_pack_usage[] = {
        N_("git receive-pack <git-dir>"),
@@ -133,10 +135,6 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
 {
        int status = parse_hide_refs_config(var, value, "receive", &hidden_refs);
 
-       if (status)
-               return status;
-
-       status = git_gpg_config(var, value, NULL);
        if (status)
                return status;
 
@@ -1463,8 +1461,10 @@ static const char *update(struct command *cmd, struct shallow_info *si)
                find_shared_symref(worktrees, "HEAD", name);
 
        /* only refs/... are allowed */
-       if (!starts_with(name, "refs/") || check_refname_format(name + 5, 0)) {
-               rp_error("refusing to create funny ref '%s' remotely", name);
+       if (!starts_with(name, "refs/") ||
+           check_refname_format(name + 5, is_null_oid(new_oid) ?
+                                REFNAME_ALLOW_ONELEVEL : 0)) {
+               rp_error("refusing to update funny ref '%s' remotely", name);
                ret = "funny refname";
                goto out;
        }
@@ -2032,6 +2032,16 @@ static struct command **queue_command(struct command **tail,
        return &cmd->next;
 }
 
+static void free_commands(struct command *commands)
+{
+       while (commands) {
+               struct command *next = commands->next;
+
+               free(commands);
+               commands = next;
+       }
+}
+
 static void queue_commands_from_cert(struct command **tail,
                                     struct strbuf *push_cert)
 {
@@ -2174,7 +2184,7 @@ static const char *parse_pack_header(struct pack_header *hdr)
        }
 }
 
-static const char *pack_lockfile;
+static struct tempfile *pack_lockfile;
 
 static void push_header_arg(struct strvec *args, struct pack_header *hdr)
 {
@@ -2241,6 +2251,7 @@ static const char *unpack(int err_fd, struct shallow_info *si)
                        return "unpack-objects abnormal exit";
        } else {
                char hostname[HOST_NAME_MAX + 1];
+               char *lockfile;
 
                strvec_pushl(&child.args, "index-pack", "--stdin", NULL);
                push_header_arg(&child.args, &hdr);
@@ -2270,8 +2281,14 @@ static const char *unpack(int err_fd, struct shallow_info *si)
                status = start_command(&child);
                if (status)
                        return "index-pack fork failed";
-               pack_lockfile = index_pack_lockfile(child.out, NULL);
+
+               lockfile = index_pack_lockfile(child.out, NULL);
+               if (lockfile) {
+                       pack_lockfile = register_tempfile(lockfile);
+                       free(lockfile);
+               }
                close(child.out);
+
                status = finish_command(&child);
                if (status)
                        return "index-pack abnormal exit";
@@ -2558,8 +2575,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
                use_keepalive = KEEPALIVE_ALWAYS;
                execute_commands(commands, unpack_status, &si,
                                 &push_options);
-               if (pack_lockfile)
-                       unlink_or_warn(pack_lockfile);
+               delete_tempfile(&pack_lockfile);
                sigchain_push(SIGPIPE, SIG_IGN);
                if (report_status_v2)
                        report_v2(commands, unpack_status);
@@ -2569,6 +2585,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
                run_receive_hook(commands, "post-receive", 1,
                                 &push_options);
                run_update_post_hook(commands);
+               free_commands(commands);
                string_list_clear(&push_options, 0);
                if (auto_gc) {
                        struct child_process proc = CHILD_PROCESS_INIT;
index 270681dcdf40e3c7ff0bf2969340eb1b981cf8e8..9b000bb6bcaf0fe8f243e01b236bdeb341b1ca6e 100644 (file)
@@ -4,6 +4,7 @@
 #include "reachable.h"
 #include "worktree.h"
 #include "reflog.h"
+#include "parse-options.h"
 
 #define BUILTIN_REFLOG_SHOW_USAGE \
        N_("git reflog [show] [<log-options>] [<ref>]")
index c1402ad038f2d4e2a60441db11fb1209e7d63c62..87f73c8923a92a57a75a3204fbbdd19969c8287c 100644 (file)
@@ -1,7 +1,8 @@
 #include "builtin.h"
-#include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "dir.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "run-command.h"
 #include "sigchain.h"
@@ -182,8 +183,9 @@ static void prepare_pack_objects(struct child_process *cmd,
  * Write oid to the given struct child_process's stdin, starting it first if
  * necessary.
  */
-static int write_oid(const struct object_id *oid, struct packed_git *pack,
-                    uint32_t pos, void *data)
+static int write_oid(const struct object_id *oid,
+                    struct packed_git *pack UNUSED,
+                    uint32_t pos UNUSED, void *data)
 {
        struct child_process *cmd = data;
 
@@ -948,7 +950,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
 
        ret = start_command(&cmd);
        if (ret)
-               return ret;
+               goto cleanup;
 
        if (geometry) {
                FILE *in = xfdopen(cmd.in, "w");
@@ -977,7 +979,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
        fclose(out);
        ret = finish_command(&cmd);
        if (ret)
-               return ret;
+               goto cleanup;
 
        if (!names.nr && !po_args.quiet)
                printf_ln(_("Nothing new to pack."));
@@ -1007,7 +1009,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                                       &existing_nonkept_packs,
                                       &existing_kept_packs);
                if (ret)
-                       return ret;
+                       goto cleanup;
 
                if (delete_redundant && expire_to) {
                        /*
@@ -1039,7 +1041,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                                               &existing_nonkept_packs,
                                               &existing_kept_packs);
                        if (ret)
-                               return ret;
+                               goto cleanup;
                }
        }
 
@@ -1115,7 +1117,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                string_list_clear(&include, 0);
 
                if (ret)
-                       return ret;
+                       goto cleanup;
        }
 
        reprepare_packed_git(the_repository);
@@ -1172,10 +1174,11 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                write_midx_file(get_object_directory(), NULL, NULL, flags);
        }
 
+cleanup:
        string_list_clear(&names, 1);
        string_list_clear(&existing_nonkept_packs, 0);
        string_list_clear(&existing_kept_packs, 0);
        clear_pack_geometry(geometry);
 
-       return 0;
+       return ret;
 }
index a29e911d3099be9d327ecc030d68c56fe046a04a..71d8e949e353c8583c5a3cbf383edab3544c95c2 100644 (file)
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
+#include "hex.h"
 #include "refs.h"
 #include "parse-options.h"
 #include "run-command.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "repository.h"
 #include "tag.h"
 
index fea20a9ba0b99bc730f7c7fc7c1000fa57febf3e..24b04aeecb9222750fe9dd7dcff1e1ab97cb467f 100644 (file)
@@ -10,6 +10,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "tag.h"
 #include "object.h"
@@ -26,6 +27,7 @@
 #include "submodule.h"
 #include "submodule-config.h"
 #include "dir.h"
+#include "add-interactive.h"
 
 #define REFRESH_INDEX_DELAY_WARNING_IN_MS (2 * 1000)
 
@@ -316,7 +318,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
        int reset_type = NONE, update_ref_status = 0, quiet = 0;
        int no_refresh = 0;
        int patch_mode = 0, pathspec_file_nul = 0, unborn;
-       const char *rev, *pathspec_from_file = NULL;
+       const char *rev;
+       char *pathspec_from_file = NULL;
        struct object_id oid;
        struct pathspec pathspec;
        int intent_to_add = 0;
@@ -390,7 +393,9 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                if (reset_type != NONE)
                        die(_("options '%s' and '%s' cannot be used together"), "--patch", "--{hard,mixed,soft}");
                trace2_cmd_mode("patch-interactive");
-               return run_add_interactive(rev, "--patch=reset", &pathspec);
+               update_ref_status = !!run_add_p(the_repository, ADD_P_RESET, rev,
+                                  &pathspec);
+               goto cleanup;
        }
 
        /* git reset tree [--] paths... can be used to
@@ -439,8 +444,10 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                                       LOCK_DIE_ON_ERROR);
                if (reset_type == MIXED) {
                        int flags = quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN;
-                       if (read_from_tree(&pathspec, &oid, intent_to_add))
-                               return 1;
+                       if (read_from_tree(&pathspec, &oid, intent_to_add)) {
+                               update_ref_status = 1;
+                               goto cleanup;
+                       }
                        the_index.updated_skipworktree = 1;
                        if (!no_refresh && get_git_work_tree()) {
                                uint64_t t_begin, t_delta_in_ms;
@@ -488,5 +495,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
 
        discard_index(&the_index);
 
+cleanup:
+       clear_pathspec(&pathspec);
+       free(pathspec_from_file);
        return update_ref_status;
 }
index d42db0b0cc9fa22ad8674ceddef8d1c735791f37..85e522dff8a98bd541c1b8169d72d8e28ec6dcc6 100644 (file)
@@ -2,6 +2,7 @@
 #include "config.h"
 #include "commit.h"
 #include "diff.h"
+#include "hex.h"
 #include "revision.h"
 #include "list-objects.h"
 #include "list-objects-filter.h"
@@ -38,7 +39,7 @@ static const char rev_list_usage[] =
 "    --tags\n"
 "    --remotes\n"
 "    --stdin\n"
-"    --exclude-hidden=[receive|uploadpack]\n"
+"    --exclude-hidden=[fetch|receive|uploadpack]\n"
 "    --quiet\n"
 "  ordering output:\n"
 "    --topo-order\n"
@@ -257,7 +258,8 @@ static inline void finish_object__ma(struct object *obj)
        }
 }
 
-static int finish_object(struct object *obj, const char *name, void *cb_data)
+static int finish_object(struct object *obj, const char *name UNUSED,
+                        void *cb_data)
 {
        struct rev_list_info *info = cb_data;
        if (oid_object_info_extended(the_repository, &obj->oid, NULL, 0) < 0) {
@@ -362,11 +364,11 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
 
 static int show_object_fast(
        const struct object_id *oid,
-       enum object_type type,
-       int exclude,
-       uint32_t name_hash,
-       struct packed_git *found_pack,
-       off_t found_offset)
+       enum object_type type UNUSED,
+       int exclude UNUSED,
+       uint32_t name_hash UNUSED,
+       struct packed_git *found_pack UNUSED,
+       off_t found_offset UNUSED)
 {
        fprintf(stdout, "%s\n", oid_to_hex(oid));
        return 1;
index e67999e5ebc5ef640fe5dcd45dfa1b4126a9c7a8..e1fa9c6348ceccb7d26fb9c312f5499ac2a1b478 100644 (file)
@@ -5,8 +5,10 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "commit.h"
+#include "hex.h"
 #include "refs.h"
 #include "quote.h"
 #include "builtin.h"
index f2d86d2a8f999bbad13f51319e1ba3c0e4561d53..62986a7b1b07984a8f1af60cf93fb24492c3d0b4 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "builtin.h"
 #include "parse-options.h"
@@ -248,9 +249,7 @@ int cmd_revert(int argc, const char **argv, const char *prefix)
        res = run_sequencer(argc, argv, &opts);
        if (res < 0)
                die(_("revert failed"));
-       if (opts.revs)
-               release_revisions(opts.revs);
-       free(opts.revs);
+       replay_opts_release(&opts);
        return res;
 }
 
@@ -262,10 +261,8 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
        opts.action = REPLAY_PICK;
        sequencer_init_config(&opts);
        res = run_sequencer(argc, argv, &opts);
-       if (opts.revs)
-               release_revisions(opts.revs);
-       free(opts.revs);
        if (res < 0)
                die(_("cherry-pick failed"));
+       replay_opts_release(&opts);
        return res;
 }
index 4a4aec0d00e07e5d0260efc5f6195221075ea61d..dc198f79082093f3ac95b39801b6ab890ae7bd4b 100644 (file)
@@ -3,8 +3,9 @@
  *
  * Copyright (C) Linus Torvalds 2006
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "alloc.h"
 #include "advice.h"
 #include "config.h"
 #include "lockfile.h"
index 4c5d125fa0a1cb4a01deac04637bd4e71763c619..640125fe955de2deff642b2d40a29a69263ff27b 100644 (file)
@@ -1,6 +1,7 @@
 #include "builtin.h"
 #include "config.h"
 #include "commit.h"
+#include "hex.h"
 #include "refs.h"
 #include "pkt-line.h"
 #include "sideband.h"
@@ -15,6 +16,7 @@
 #include "gpg-interface.h"
 #include "gettext.h"
 #include "protocol.h"
+#include "parse-options.h"
 
 static const char * const send_pack_usage[] = {
        N_("git send-pack [--mirror] [--dry-run] [--force]\n"
@@ -130,8 +132,6 @@ static void print_helper_status(struct ref *ref)
 
 static int send_pack_config(const char *k, const char *v, void *cb)
 {
-       git_gpg_config(k, v, NULL);
-
        if (!strcmp(k, "push.gpgsign")) {
                const char *value;
                if (!git_config_get_value("push.gpgsign", &value)) {
@@ -275,7 +275,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
                fd[0] = 0;
                fd[1] = 1;
        } else {
-               conn = git_connect(fd, dest, receivepack,
+               conn = git_connect(fd, dest, "git-receive-pack", receivepack,
                        args.verbose ? CONNECT_VERBOSE : 0);
        }
 
index c013abaf94251bd3b37027e8ab48917a4feb099b..8342b68aef706e2455f50a0a9f7c023754927b63 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "pretty.h"
 #include "refs.h"
 #include "builtin.h"
@@ -956,5 +957,6 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                if (shown_merge_point && --extra < 0)
                        break;
        }
+       free(head);
        return 0;
 }
index 0e0b9fb95bc11395fecb3718cbe85fd7a0bea903..98ec40ddf46874f6ce1e67d10e3366a989e6f9d5 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "hex.h"
 #include "pack.h"
 #include "parse-options.h"
 
index 3af6a53ee9750ef5d4e45031ae0088d5e12f37a4..1f28d7fe4b9486184b3c01b3f78ca65e295c619b 100644 (file)
@@ -1,6 +1,7 @@
 #include "builtin.h"
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "refs.h"
 #include "object-store.h"
 #include "object.h"
index c37381549181837ce4afe3659e5790e88485a816..8d5ae6f2a60f913323cebf7014fd305ab09403bc 100644 (file)
@@ -217,16 +217,14 @@ static int update_working_directory(struct pattern_list *pl)
        o.head_idx = -1;
        o.src_index = r->index;
        o.dst_index = r->index;
-       index_state_init(&o.result, r);
        o.skip_sparse_checkout = 0;
-       o.pl = pl;
 
        setup_work_tree();
 
        repo_hold_locked_index(r, &lock_file, LOCK_DIE_ON_ERROR);
 
        setup_unpack_trees_porcelain(&o, "sparse-checkout");
-       result = update_sparsity(&o);
+       result = update_sparsity(&o, pl);
        clear_unpack_trees_porcelain(&o);
 
        if (result == UPDATE_SPARSITY_WARNINGS)
index 839569a98033f1cf2e8eb74b2eb6fc1770eba8fc..6a12fed2713073f91441bd9058058591f4155ddf 100644 (file)
@@ -1,6 +1,7 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "config.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "refs.h"
 #include "lockfile.h"
@@ -18,6 +19,7 @@
 #include "diffcore.h"
 #include "exec-cmd.h"
 #include "reflog.h"
+#include "add-interactive.h"
 
 #define INCLUDE_ALL_FILES 2
 
@@ -528,7 +530,8 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
                                         NULL, NULL, NULL))
                return -1;
 
-       if (write_cache_as_tree(&c_tree, 0, NULL))
+       if (write_index_as_tree(&c_tree, &the_index, get_index_file(), 0,
+                               NULL))
                return error(_("cannot apply a stash in the middle of a merge"));
 
        if (index) {
@@ -552,7 +555,8 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
 
                        discard_index(&the_index);
                        repo_read_index(the_repository);
-                       if (write_cache_as_tree(&index_tree, 0, NULL))
+                       if (write_index_as_tree(&index_tree, &the_index,
+                                               get_index_file(), 0, NULL))
                                return error(_("could not save index tree"));
 
                        reset_head();
@@ -1229,7 +1233,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps,
        old_index_env = xstrdup_or_null(getenv(INDEX_ENVIRONMENT));
        setenv(INDEX_ENVIRONMENT, the_repository->index_file, 1);
 
-       ret = run_add_interactive(NULL, "--patch=stash", ps);
+       ret = !!run_add_p(the_repository, ADD_P_STASH, NULL, ps);
 
        the_repository->index_file = old_repo_index_file;
        if (old_index_env && *old_index_env)
@@ -1377,7 +1381,8 @@ static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_b
 
        strbuf_addf(&commit_tree_label, "index on %s\n", msg.buf);
        commit_list_insert(head_commit, &parents);
-       if (write_cache_as_tree(&info->i_tree, 0, NULL) ||
+       if (write_index_as_tree(&info->i_tree, &the_index, get_index_file(), 0,
+                               NULL) ||
            commit_tree(commit_tree_label.buf, commit_tree_label.len,
                        &info->i_tree, parents, &info->i_commit, NULL, NULL)) {
                if (!quiet)
@@ -1727,6 +1732,7 @@ static int push_stash(int argc, const char **argv, const char *prefix,
                OPT_PATHSPEC_FILE_NUL(&pathspec_file_nul),
                OPT_END()
        };
+       int ret;
 
        if (argc) {
                force_assume = !strcmp(argv[0], "-p");
@@ -1766,8 +1772,10 @@ static int push_stash(int argc, const char **argv, const char *prefix,
                die(_("the option '%s' requires '%s'"), "--pathspec-file-nul", "--pathspec-from-file");
        }
 
-       return do_push_stash(&ps, stash_msg, quiet, keep_index, patch_mode,
-                            include_untracked, only_staged);
+       ret = do_push_stash(&ps, stash_msg, quiet, keep_index, patch_mode,
+                           include_untracked, only_staged);
+       clear_pathspec(&ps);
+       return ret;
 }
 
 static int push_stash_unassumed(int argc, const char **argv, const char *prefix)
index 4c173d8b37adfc72ec840fd88ca27e36f432aef3..d05d1a846233341046a4835a579964323b4e07d0 100644 (file)
@@ -1,5 +1,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "alloc.h"
+#include "hex.h"
 #include "repository.h"
 #include "cache.h"
 #include "config.h"
@@ -2132,9 +2134,9 @@ static int update_clone_get_next_task(struct child_process *child,
        return 0;
 }
 
-static int update_clone_start_failure(struct strbuf *err,
+static int update_clone_start_failure(struct strbuf *err UNUSED,
                                      void *suc_cb,
-                                     void *idx_task_cb)
+                                     void *idx_task_cb UNUSED)
 {
        struct submodule_update_clone *suc = suc_cb;
 
index d428c45dc8d812255336ed5da20804981d3be4ab..adcaa547b0d57094fa811f5f81e3a601cc05e2b2 100644 (file)
@@ -9,6 +9,7 @@
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
+#include "hex.h"
 #include "refs.h"
 #include "object-store.h"
 #include "tag.h"
@@ -180,8 +181,6 @@ static const char tag_template_nocleanup[] =
 
 static int git_tag_config(const char *var, const char *value, void *cb)
 {
-       int status;
-
        if (!strcmp(var, "tag.gpgsign")) {
                config_sign_tag = git_config_bool(var, value);
                return 0;
@@ -194,9 +193,6 @@ static int git_tag_config(const char *var, const char *value, void *cb)
                return 0;
        }
 
-       status = git_gpg_config(var, value, cb);
-       if (status)
-               return status;
        if (!strcmp(var, "tag.forcesignannotated")) {
                force_sign_annotate = git_config_bool(var, value);
                return 0;
@@ -433,7 +429,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
        int create_reflog = 0;
        int annotate = 0, force = 0;
        int cmdmode = 0, create_tag_object = 0;
-       const char *msgfile = NULL, *keyid = NULL;
+       char *msgfile = NULL;
+       const char *keyid = NULL;
        struct msg_arg msg = { .buf = STRBUF_INIT };
        struct ref_transaction *transaction;
        struct strbuf err = STRBUF_INIT;
@@ -643,5 +640,6 @@ cleanup:
        strbuf_release(&reflog_msg);
        strbuf_release(&msg.buf);
        strbuf_release(&err);
+       free(msgfile);
        return ret;
 }
index 88de32b7d7e66e3d7e1c57775b5f0a1b0b045175..e9b105a5397a3fe232f8aa0c005f8ce72599b98b 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 
 static char *create_temp_file(struct object_id *oid)
index 43789b8ef294d8aa3fc9517f65712ac90e1fa60c..1908dcfcffb7b89234cdcd788f1302e307beed2b 100644 (file)
@@ -2,12 +2,14 @@
 #include "cache.h"
 #include "bulk-checkin.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "object.h"
 #include "delta.h"
 #include "pack.h"
 #include "blob.h"
 #include "commit.h"
+#include "replace-object.h"
 #include "tag.h"
 #include "tree.h"
 #include "tree-walk.h"
index 82d5902cc8b15bafaeb09813ae99a45c54800b20..11dc1352716f9dcf8da717a0fb909280a1ca4d7b 100644 (file)
@@ -3,10 +3,11 @@
  *
  * Copyright (C) Linus Torvalds, 2005
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "bulk-checkin.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "quote.h"
 #include "cache-tree.h"
@@ -381,7 +382,7 @@ static int process_path(const char *path, struct stat *st, int stat_errno)
        if (has_symlink_leading_path(path, len))
                return error("'%s' is beyond a symbolic link", path);
 
-       pos = cache_name_pos(path, len);
+       pos = index_name_pos(&the_index, path, len);
        ce = pos < 0 ? NULL : the_index.cache[pos];
        if (ce && ce_skip_worktree(ce)) {
                /*
index 25b69da2bf2815796d885030c91dbf177a4c4e2e..7a3c68720f14666cb839dd22cb5dd41688405cea 100644 (file)
@@ -4,6 +4,7 @@
 #include "pkt-line.h"
 #include "parse-options.h"
 #include "protocol.h"
+#include "replace-object.h"
 #include "upload-pack.h"
 #include "serve.h"
 
index a80c1df86fd532bb6353b990381bfb050ac5e688..d9943be9afd73dfc46e471ecee426aed00f8da08 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "builtin.h"
 #include "config.h"
+#include "ident.h"
 #include "refs.h"
 
 static const char var_usage[] = "git var (-l | <variable>)";
index 3ebad32b0f14fffb5cfafce87411a534bccdf724..7aedf10e856952f035d506dd678b8dfb8b410ebc 100644 (file)
@@ -52,14 +52,6 @@ static int verify_commit(const char *name, unsigned flags)
        return run_gpg_verify((struct commit *)obj, flags);
 }
 
-static int git_verify_commit_config(const char *var, const char *value, void *cb)
-{
-       int status = git_gpg_config(var, value, cb);
-       if (status)
-               return status;
-       return git_default_config(var, value, cb);
-}
-
 int cmd_verify_commit(int argc, const char **argv, const char *prefix)
 {
        int i = 1, verbose = 0, had_error = 0;
@@ -70,7 +62,7 @@ int cmd_verify_commit(int argc, const char **argv, const char *prefix)
                OPT_END()
        };
 
-       git_config(git_verify_commit_config, NULL);
+       git_config(git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, verify_commit_options,
                             verify_commit_usage, PARSE_OPT_KEEP_ARGV0);
index 217566952d83ce0c657128d6d5e253bebc72f3bb..5c00b0b0f77d4e16301b5726dde640426604434e 100644 (file)
@@ -19,14 +19,6 @@ static const char * const verify_tag_usage[] = {
                NULL
 };
 
-static int git_verify_tag_config(const char *var, const char *value, void *cb)
-{
-       int status = git_gpg_config(var, value, cb);
-       if (status)
-               return status;
-       return git_default_config(var, value, cb);
-}
-
 int cmd_verify_tag(int argc, const char **argv, const char *prefix)
 {
        int i = 1, verbose = 0, had_error = 0;
@@ -39,7 +31,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
                OPT_END()
        };
 
-       git_config(git_verify_tag_config, NULL);
+       git_config(git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, verify_tag_options,
                             verify_tag_usage, PARSE_OPT_KEEP_ARGV0);
index f51c40f1e1edb35942c5af3546cfa483873f22b7..80d05e246d8c4615e6858a700a08d842575ff165 100644 (file)
@@ -3,6 +3,7 @@
 #include "config.h"
 #include "builtin.h"
 #include "dir.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "strvec.h"
 #include "branch.h"
@@ -173,7 +174,7 @@ static void prune_worktrees(void)
 {
        struct strbuf reason = STRBUF_INIT;
        struct strbuf main_path = STRBUF_INIT;
-       struct string_list kept = STRING_LIST_INIT_NODUP;
+       struct string_list kept = STRING_LIST_INIT_DUP;
        DIR *dir = opendir(git_path("worktrees"));
        struct dirent *d;
        if (!dir)
@@ -184,14 +185,14 @@ static void prune_worktrees(void)
                if (should_prune_worktree(d->d_name, &reason, &path, expire))
                        prune_worktree(d->d_name, reason.buf);
                else if (path)
-                       string_list_append(&kept, path)->util = xstrdup(d->d_name);
+                       string_list_append_nodup(&kept, path)->util = xstrdup(d->d_name);
        }
        closedir(dir);
 
        strbuf_add_absolute_path(&main_path, get_git_common_dir());
        /* massage main worktree absolute path to match 'gitdir' content */
        strbuf_strip_suffix(&main_path, "/.");
-       string_list_append(&kept, strbuf_detach(&main_path, NULL));
+       string_list_append_nodup(&kept, strbuf_detach(&main_path, NULL));
        prune_dups(&kept);
        string_list_clear(&kept, 1);
 
index 45d61707e7d11e60e5ba2e6da90017fb38b30dc3..7ad0d05945378a2e640e795f38bd83f891c81898 100644 (file)
@@ -3,10 +3,11 @@
  *
  * Copyright (C) Linus Torvalds, 2005
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "tree.h"
 #include "cache-tree.h"
 #include "parse-options.h"
@@ -38,7 +39,8 @@ int cmd_write_tree(int argc, const char **argv, const char *cmd_prefix)
        argc = parse_options(argc, argv, cmd_prefix, write_tree_options,
                             write_tree_usage, 0);
 
-       ret = write_cache_as_tree(&oid, flags, tree_prefix);
+       ret = write_index_as_tree(&oid, &the_index, get_index_file(), flags,
+                                 tree_prefix);
        switch (ret) {
        case 0:
                printf("%s\n", oid_to_hex(&oid));
index 855b68ec23bdb1bdc85c1184a9c144c226f0245c..d64cd5c52d01b1ccbd72a062c0dea963a8a3dfd2 100644 (file)
@@ -1,8 +1,10 @@
 /*
  * Copyright (c) 2011, Google Inc.
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "bulk-checkin.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "repository.h"
 #include "csum-file.h"
index 6462ab6deb9710dcc36d2179f6702828d25455e2..177c18104022ac23a87bdc21e51f3c5073ebb855 100644 (file)
@@ -9,6 +9,14 @@
 #include "config.h"
 #include "remote.h"
 
+static struct {
+       enum bundle_list_heuristic heuristic;
+       const char *name;
+} heuristics[BUNDLE_HEURISTIC__COUNT] = {
+       { BUNDLE_HEURISTIC_NONE, ""},
+       { BUNDLE_HEURISTIC_CREATIONTOKEN, "creationToken" },
+};
+
 static int compare_bundles(const void *hashmap_cmp_fn_data,
                           const struct hashmap_entry *he1,
                           const struct hashmap_entry *he2,
@@ -75,6 +83,9 @@ static int summarize_bundle(struct remote_bundle_info *info, void *data)
        FILE *fp = data;
        fprintf(fp, "[bundle \"%s\"]\n", info->id);
        fprintf(fp, "\turi = %s\n", info->uri);
+
+       if (info->creationToken)
+               fprintf(fp, "\tcreationToken = %"PRIu64"\n", info->creationToken);
        return 0;
 }
 
@@ -100,6 +111,17 @@ void print_bundle_list(FILE *fp, struct bundle_list *list)
        fprintf(fp, "\tversion = %d\n", list->version);
        fprintf(fp, "\tmode = %s\n", mode);
 
+       if (list->heuristic) {
+               int i;
+               for (i = 0; i < BUNDLE_HEURISTIC__COUNT; i++) {
+                       if (heuristics[i].heuristic == list->heuristic) {
+                               printf("\theuristic = %s\n",
+                                      heuristics[list->heuristic].name);
+                               break;
+                       }
+               }
+       }
+
        for_all_bundles_in_list(list, summarize_bundle, fp);
 }
 
@@ -142,6 +164,21 @@ static int bundle_list_update(const char *key, const char *value,
                        return 0;
                }
 
+               if (!strcmp(subkey, "heuristic")) {
+                       int i;
+                       for (i = 0; i < BUNDLE_HEURISTIC__COUNT; i++) {
+                               if (heuristics[i].heuristic &&
+                                   heuristics[i].name &&
+                                   !strcmp(value, heuristics[i].name)) {
+                                       list->heuristic = heuristics[i].heuristic;
+                                       return 0;
+                               }
+                       }
+
+                       /* Ignore unknown heuristics. */
+                       return 0;
+               }
+
                /* Ignore other unknown global keys. */
                return 0;
        }
@@ -169,6 +206,13 @@ static int bundle_list_update(const char *key, const char *value,
                return 0;
        }
 
+       if (!strcmp(subkey, "creationtoken")) {
+               if (sscanf(value, "%"PRIu64, &bundle->creationToken) != 1)
+                       warning(_("could not parse bundle list key %s with value '%s'"),
+                               "creationToken", value);
+               return 0;
+       }
+
        /*
         * At this point, we ignore any information that we don't
         * understand, assuming it to be hints for a heuristic the client
@@ -403,6 +447,183 @@ static int download_bundle_to_file(struct remote_bundle_info *bundle, void *data
        return 0;
 }
 
+struct bundles_for_sorting {
+       struct remote_bundle_info **items;
+       size_t alloc;
+       size_t nr;
+};
+
+static int append_bundle(struct remote_bundle_info *bundle, void *data)
+{
+       struct bundles_for_sorting *list = data;
+       list->items[list->nr++] = bundle;
+       return 0;
+}
+
+/**
+ * For use in QSORT() to get a list sorted by creationToken
+ * in decreasing order.
+ */
+static int compare_creation_token_decreasing(const void *va, const void *vb)
+{
+       const struct remote_bundle_info * const *a = va;
+       const struct remote_bundle_info * const *b = vb;
+
+       if ((*a)->creationToken > (*b)->creationToken)
+               return -1;
+       if ((*a)->creationToken < (*b)->creationToken)
+               return 1;
+       return 0;
+}
+
+static int fetch_bundles_by_token(struct repository *r,
+                                 struct bundle_list *list)
+{
+       int cur;
+       int move_direction = 0;
+       const char *creationTokenStr;
+       uint64_t maxCreationToken = 0, newMaxCreationToken = 0;
+       struct bundle_list_context ctx = {
+               .r = r,
+               .list = list,
+               .mode = list->mode,
+       };
+       struct bundles_for_sorting bundles = {
+               .alloc = hashmap_get_size(&list->bundles),
+       };
+
+       ALLOC_ARRAY(bundles.items, bundles.alloc);
+
+       for_all_bundles_in_list(list, append_bundle, &bundles);
+
+       if (!bundles.nr) {
+               free(bundles.items);
+               return 0;
+       }
+
+       QSORT(bundles.items, bundles.nr, compare_creation_token_decreasing);
+
+       /*
+        * If fetch.bundleCreationToken exists, parses to a uint64t, and
+        * is not strictly smaller than the maximum creation token in the
+        * bundle list, then do not download any bundles.
+        */
+       if (!repo_config_get_value(r,
+                                  "fetch.bundlecreationtoken",
+                                  &creationTokenStr) &&
+           sscanf(creationTokenStr, "%"PRIu64, &maxCreationToken) == 1 &&
+           bundles.items[0]->creationToken <= maxCreationToken) {
+               free(bundles.items);
+               return 0;
+       }
+
+       /*
+        * Attempt to download and unbundle the minimum number of bundles by
+        * creationToken in decreasing order. If we fail to unbundle (after
+        * a successful download) then move to the next non-downloaded bundle
+        * and attempt downloading. Once we succeed in applying a bundle,
+        * move to the previous unapplied bundle and attempt to unbundle it
+        * again.
+        *
+        * In the case of a fresh clone, we will likely download all of the
+        * bundles before successfully unbundling the oldest one, then the
+        * rest of the bundles unbundle successfully in increasing order
+        * of creationToken.
+        *
+        * If there are existing objects, then this process may terminate
+        * early when all required commits from "new" bundles exist in the
+        * repo's object store.
+        */
+       cur = 0;
+       while (cur >= 0 && cur < bundles.nr) {
+               struct remote_bundle_info *bundle = bundles.items[cur];
+
+               /*
+                * If we need to dig into bundles below the previous
+                * creation token value, then likely we are in an erroneous
+                * state due to missing or invalid bundles. Halt the process
+                * instead of continuing to download extra data.
+                */
+               if (bundle->creationToken <= maxCreationToken)
+                       break;
+
+               if (!bundle->file) {
+                       /*
+                        * Not downloaded yet. Try downloading.
+                        *
+                        * Note that bundle->file is non-NULL if a download
+                        * was attempted, even if it failed to download.
+                        */
+                       if (fetch_bundle_uri_internal(ctx.r, bundle, ctx.depth + 1, ctx.list)) {
+                               /* Mark as unbundled so we do not retry. */
+                               bundle->unbundled = 1;
+
+                               /* Try looking deeper in the list. */
+                               move_direction = 1;
+                               goto move;
+                       }
+
+                       /* We expect bundles when using creationTokens. */
+                       if (!is_bundle(bundle->file, 1)) {
+                               warning(_("file downloaded from '%s' is not a bundle"),
+                                       bundle->uri);
+                               break;
+                       }
+               }
+
+               if (bundle->file && !bundle->unbundled) {
+                       /*
+                        * This was downloaded, but not successfully
+                        * unbundled. Try unbundling again.
+                        */
+                       if (unbundle_from_file(ctx.r, bundle->file)) {
+                               /* Try looking deeper in the list. */
+                               move_direction = 1;
+                       } else {
+                               /*
+                                * Succeeded in unbundle. Retry bundles
+                                * that previously failed to unbundle.
+                                */
+                               move_direction = -1;
+                               bundle->unbundled = 1;
+
+                               if (bundle->creationToken > newMaxCreationToken)
+                                       newMaxCreationToken = bundle->creationToken;
+                       }
+               }
+
+               /*
+                * Else case: downloaded and unbundled successfully.
+                * Skip this by moving in the same direction as the
+                * previous step.
+                */
+
+move:
+               /* Move in the specified direction and repeat. */
+               cur += move_direction;
+       }
+
+       /*
+        * We succeed if the loop terminates because 'cur' drops below
+        * zero. The other case is that we terminate because 'cur'
+        * reaches the end of the list, so we have a failure no matter
+        * which bundles we apply from the list.
+        */
+       if (cur < 0) {
+               struct strbuf value = STRBUF_INIT;
+               strbuf_addf(&value, "%"PRIu64"", newMaxCreationToken);
+               if (repo_config_set_multivar_gently(ctx.r,
+                                                   "fetch.bundleCreationToken",
+                                                   value.buf, NULL, 0))
+                       warning(_("failed to store maximum creation token"));
+
+               strbuf_release(&value);
+       }
+
+       free(bundles.items);
+       return cur >= 0;
+}
+
 static int download_bundle_list(struct repository *r,
                                struct bundle_list *local_list,
                                struct bundle_list *global_list,
@@ -440,7 +661,15 @@ static int fetch_bundle_list_in_config_format(struct repository *r,
                goto cleanup;
        }
 
-       if ((result = download_bundle_list(r, &list_from_bundle,
+       /*
+        * If this list uses the creationToken heuristic, then the URIs
+        * it advertises are expected to be bundles, not nested lists.
+        * We can drop 'global_list' and 'depth'.
+        */
+       if (list_from_bundle.heuristic == BUNDLE_HEURISTIC_CREATIONTOKEN) {
+               result = fetch_bundles_by_token(r, &list_from_bundle);
+               global_list->heuristic = BUNDLE_HEURISTIC_CREATIONTOKEN;
+       } else if ((result = download_bundle_list(r, &list_from_bundle,
                                           global_list, depth)))
                goto cleanup;
 
@@ -551,7 +780,8 @@ static int unlink_bundle(struct remote_bundle_info *info, void *data)
        return 0;
 }
 
-int fetch_bundle_uri(struct repository *r, const char *uri)
+int fetch_bundle_uri(struct repository *r, const char *uri,
+                    int *has_heuristic)
 {
        int result;
        struct bundle_list list;
@@ -571,6 +801,8 @@ int fetch_bundle_uri(struct repository *r, const char *uri)
        result = unbundle_all_bundles(r, &list);
 
 cleanup:
+       if (has_heuristic)
+               *has_heuristic = (list.heuristic != BUNDLE_HEURISTIC_NONE);
        for_all_bundles_in_list(&list, unlink_bundle, NULL);
        clear_bundle_list(&list);
        clear_remote_bundle_info(&bundle, NULL);
@@ -582,6 +814,14 @@ int fetch_bundle_list(struct repository *r, struct bundle_list *list)
        int result;
        struct bundle_list global_list;
 
+       /*
+        * If the creationToken heuristic is used, then the URIs
+        * advertised by 'list' are not nested lists and instead
+        * direct bundles. We do not need to use global_list.
+        */
+       if (list->heuristic == BUNDLE_HEURISTIC_CREATIONTOKEN)
+               return fetch_bundles_by_token(r, list);
+
        init_bundle_list(&global_list);
 
        /* If a bundle is added to this global list, then it is required. */
@@ -590,7 +830,10 @@ int fetch_bundle_list(struct repository *r, struct bundle_list *list)
        if ((result = download_bundle_list(r, list, &global_list, 0)))
                goto cleanup;
 
-       result = unbundle_all_bundles(r, &global_list);
+       if (list->heuristic == BUNDLE_HEURISTIC_CREATIONTOKEN)
+               result = fetch_bundles_by_token(r, list);
+       else
+               result = unbundle_all_bundles(r, &global_list);
 
 cleanup:
        for_all_bundles_in_list(&global_list, unlink_bundle, NULL);
@@ -641,7 +884,7 @@ int bundle_uri_command(struct repository *r,
         * Read all "bundle.*" config lines to the client as key=value
         * packet lines.
         */
-       git_config(config_to_packet_line, &writer);
+       repo_config(r, config_to_packet_line, &writer);
 
        packet_writer_flush(&writer);
 
index d5e89f1671caa3717b35242f20b8993cea32d14f..6dbc780f661bc06bbc9f0badddec91101814349c 100644 (file)
@@ -42,6 +42,12 @@ struct remote_bundle_info {
         * this boolean is true.
         */
        unsigned unbundled:1;
+
+       /**
+        * If the bundle is part of a list with the creationToken
+        * heuristic, then we use this member for sorting the bundles.
+        */
+       uint64_t creationToken;
 };
 
 #define REMOTE_BUNDLE_INFO_INIT { 0 }
@@ -52,6 +58,14 @@ enum bundle_list_mode {
        BUNDLE_MODE_ANY
 };
 
+enum bundle_list_heuristic {
+       BUNDLE_HEURISTIC_NONE = 0,
+       BUNDLE_HEURISTIC_CREATIONTOKEN,
+
+       /* Must be last. */
+       BUNDLE_HEURISTIC__COUNT
+};
+
 /**
  * A bundle_list contains an unordered set of remote_bundle_info structs,
  * as well as information about the bundle listing, such as version and
@@ -75,6 +89,12 @@ struct bundle_list {
         * advertised by the bundle list at that location.
         */
        char *baseURI;
+
+       /**
+        * A list can have a heuristic, which helps reduce the number of
+        * downloaded bundles.
+        */
+       enum bundle_list_heuristic heuristic;
 };
 
 void init_bundle_list(struct bundle_list *list);
@@ -104,8 +124,14 @@ int bundle_uri_parse_config_format(const char *uri,
  * based on that information.
  *
  * Returns non-zero if no bundle information is found at the given 'uri'.
+ *
+ * If the pointer 'has_heuristic' is non-NULL, then the value it points to
+ * will be set to be non-zero if and only if the fetched list has a
+ * heuristic value. Such a value indicates that the list was designed for
+ * incremental fetches.
  */
-int fetch_bundle_uri(struct repository *r, const char *uri);
+int fetch_bundle_uri(struct repository *r, const char *uri,
+                    int *has_heuristic);
 
 /**
  * Given a bundle list that was already advertised (likely by the
index 4ef7256aa11e8b43691f238970da6c6bf21cd4ee..99d7de97f6cf9cc4ff8c93f10b898ba5857069f4 100644 (file)
--- a/bundle.c
+++ b/bundle.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "lockfile.h"
 #include "bundle.h"
+#include "hex.h"
 #include "object-store.h"
 #include "repository.h"
 #include "object.h"
@@ -12,6 +13,7 @@
 #include "refs.h"
 #include "strvec.h"
 #include "list-objects-filter-options.h"
+#include "connected.h"
 
 static const char v2_bundle_signature[] = "# v2 git bundle\n";
 static const char v3_bundle_signature[] = "# v3 git bundle\n";
@@ -187,6 +189,21 @@ static int list_refs(struct string_list *r, int argc, const char **argv)
 /* Remember to update object flag allocation in object.h */
 #define PREREQ_MARK (1u<<16)
 
+struct string_list_iterator {
+       struct string_list *list;
+       size_t cur;
+};
+
+static const struct object_id *iterate_ref_map(void *cb_data)
+{
+       struct string_list_iterator *iter = cb_data;
+
+       if (iter->cur >= iter->list->nr)
+               return NULL;
+
+       return iter->list->items[iter->cur++].util;
+}
+
 int verify_bundle(struct repository *r,
                  struct bundle_header *header,
                  enum verify_bundle_flags flags)
@@ -196,26 +213,25 @@ int verify_bundle(struct repository *r,
         * to be verbose about the errors
         */
        struct string_list *p = &header->prerequisites;
-       struct rev_info revs = REV_INFO_INIT;
-       const char *argv[] = {NULL, "--all", NULL};
-       struct commit *commit;
-       int i, ret = 0, req_nr;
+       int i, ret = 0;
        const char *message = _("Repository lacks these prerequisite commits:");
+       struct string_list_iterator iter = {
+               .list = p,
+       };
+       struct check_connected_options opts = {
+               .quiet = 1,
+       };
 
        if (!r || !r->objects || !r->objects->odb)
                return error(_("need a repository to verify a bundle"));
 
-       repo_init_revisions(r, &revs, NULL);
        for (i = 0; i < p->nr; i++) {
                struct string_list_item *e = p->items + i;
                const char *name = e->string;
                struct object_id *oid = e->util;
                struct object *o = parse_object(r, oid);
-               if (o) {
-                       o->flags |= PREREQ_MARK;
-                       add_pending_object(&revs, o, name);
+               if (o)
                        continue;
-               }
                ret++;
                if (flags & VERIFY_BUNDLE_QUIET)
                        continue;
@@ -223,37 +239,14 @@ int verify_bundle(struct repository *r,
                        error("%s", message);
                error("%s %s", oid_to_hex(oid), name);
        }
-       if (revs.pending.nr != p->nr)
+       if (ret)
                goto cleanup;
-       req_nr = revs.pending.nr;
-       setup_revisions(2, argv, &revs, NULL);
 
-       list_objects_filter_copy(&revs.filter, &header->filter);
-
-       if (prepare_revision_walk(&revs))
-               die(_("revision walk setup failed"));
-
-       i = req_nr;
-       while (i && (commit = get_revision(&revs)))
-               if (commit->object.flags & PREREQ_MARK)
-                       i--;
-
-       for (i = 0; i < p->nr; i++) {
-               struct string_list_item *e = p->items + i;
-               const char *name = e->string;
-               const struct object_id *oid = e->util;
-               struct object *o = parse_object(r, oid);
-               assert(o); /* otherwise we'd have returned early */
-               if (o->flags & SHOWN)
-                       continue;
-               ret++;
-               if (flags & VERIFY_BUNDLE_QUIET)
-                       continue;
-               if (ret == 1)
-                       error("%s", message);
-               error("%s %s", oid_to_hex(oid), name);
-       }
+       if ((ret = check_connected(iterate_ref_map, &iter, &opts)))
+               error(_("some prerequisite commits exist in the object store, "
+                       "but are not connected to the repository's history"));
 
+       /* TODO: preserve this verbose language. */
        if (flags & VERIFY_BUNDLE_VERBOSE) {
                struct string_list *r;
 
@@ -282,15 +275,6 @@ int verify_bundle(struct repository *r,
                                  list_objects_filter_spec(&header->filter));
        }
 cleanup:
-       /* Clean up objects used, as they will be reused. */
-       for (i = 0; i < p->nr; i++) {
-               struct string_list_item *e = p->items + i;
-               struct object_id *oid = e->util;
-               commit = lookup_commit_reference_gently(r, oid, 1);
-               if (commit)
-                       clear_commit_marks(commit, ALL_REV_FLAGS | PREREQ_MARK);
-       }
-       release_revisions(&revs);
        return ret;
 }
 
@@ -627,6 +611,10 @@ int unbundle(struct repository *r, struct bundle_header *header,
             enum verify_bundle_flags flags)
 {
        struct child_process ip = CHILD_PROCESS_INIT;
+
+       if (verify_bundle(r, header, flags))
+               return -1;
+
        strvec_pushl(&ip.args, "index-pack", "--fix-thin", "--stdin", NULL);
 
        /* If there is a filter, then we need to create the promisor pack. */
@@ -638,8 +626,6 @@ int unbundle(struct repository *r, struct bundle_header *header,
                strvec_clear(extra_index_pack_args);
        }
 
-       if (verify_bundle(r, header, flags))
-               return -1;
        ip.in = bundle_fd;
        ip.no_stdout = 1;
        ip.git_cmd = 1;
index 9af457f47ca212fe0e4eeef6c2aaabf68681a73c..9d46ecef09162a2d01d6f4ee508b2b1cdb1c2304 100644 (file)
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "tree.h"
 #include "tree-walk.h"
@@ -760,7 +762,7 @@ static void prime_cache_tree_rec(struct repository *r,
        struct tree_desc desc;
        struct name_entry entry;
        int cnt;
-       int base_path_len = tree_path->len;
+       size_t base_path_len = tree_path->len;
 
        oidcpy(&it->oid, &tree->object.oid);
 
@@ -785,7 +787,6 @@ static void prime_cache_tree_rec(struct repository *r,
                         */
                        if (r->index->sparse_index) {
                                strbuf_setlen(tree_path, base_path_len);
-                               strbuf_grow(tree_path, base_path_len + entry.pathlen + 1);
                                strbuf_add(tree_path, entry.path, entry.pathlen);
                                strbuf_addch(tree_path, '/');
                        }
index 8efeccebfc9f0bf8c9cfda1aa4ac531108b52650..faae88be63c2ce012c700af3a88e02e165982a4e 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef CACHE_TREE_H
 #define CACHE_TREE_H
 
-#include "cache.h"
 #include "tree.h"
 #include "tree-walk.h"
 
@@ -53,19 +52,4 @@ int write_index_as_tree(struct object_id *oid, struct index_state *index_state,
 void prime_cache_tree(struct repository *, struct index_state *, struct tree *);
 
 int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info);
-
-#ifdef USE_THE_INDEX_COMPATIBILITY_MACROS
-static inline int write_cache_as_tree(struct object_id *oid, int flags, const char *prefix)
-{
-       return write_index_as_tree(oid, &the_index, get_index_file(), flags, prefix);
-}
-
-static inline int update_main_cache_tree(int flags)
-{
-       if (!the_index.cache_tree)
-               the_index.cache_tree = cache_tree();
-       return cache_tree_update(&the_index, flags);
-}
-#endif
-
 #endif
diff --git a/cache.h b/cache.h
index 4bf14e0bd94feb2af58a107e6664bb8906c63026..5a736a2b7e714afbc28cc398e6b088c9f0a52293 100644 (file)
--- a/cache.h
+++ b/cache.h
 #include "pack-revindex.h"
 #include "hash.h"
 #include "path.h"
+#include "pathspec.h"
+#include "object.h"
 #include "oid-array.h"
 #include "repository.h"
+#include "statinfo.h"
 #include "mem-pool.h"
 
 typedef struct git_zstream {
@@ -118,26 +121,6 @@ struct cache_header {
 #define INDEX_FORMAT_LB 2
 #define INDEX_FORMAT_UB 4
 
-/*
- * The "cache_time" is just the low 32 bits of the
- * time. It doesn't matter if it overflows - we only
- * check it for equality in the 32 bits we save.
- */
-struct cache_time {
-       uint32_t sec;
-       uint32_t nsec;
-};
-
-struct stat_data {
-       struct cache_time sd_ctime;
-       struct cache_time sd_mtime;
-       unsigned int sd_dev;
-       unsigned int sd_ino;
-       unsigned int sd_uid;
-       unsigned int sd_gid;
-       unsigned int sd_size;
-};
-
 struct cache_entry {
        struct hashmap_entry ent;
        struct stat_data ce_stat_data;
@@ -293,6 +276,15 @@ static inline unsigned int canon_mode(unsigned int mode)
        return S_IFGITLINK;
 }
 
+static inline int ce_path_match(struct index_state *istate,
+                               const struct cache_entry *ce,
+                               const struct pathspec *pathspec,
+                               char *seen)
+{
+       return match_pathspec(istate, pathspec, ce->name, ce_namelen(ce), 0, seen,
+                             S_ISDIR(ce->ce_mode) || S_ISGITLINK(ce->ce_mode));
+}
+
 #define cache_entry_size(len) (offsetof(struct cache_entry,name) + (len) + 1)
 
 #define SOMETHING_CHANGED      (1 << 0) /* unclassified changes go here */
@@ -449,39 +441,9 @@ typedef int (*must_prefetch_predicate)(const struct cache_entry *);
 void prefetch_cache_entries(const struct index_state *istate,
                            must_prefetch_predicate must_prefetch);
 
-#if defined(USE_THE_INDEX_COMPATIBILITY_MACROS) || defined(USE_THE_INDEX_VARIABLE)
+#ifdef USE_THE_INDEX_VARIABLE
 extern struct index_state the_index;
-
-#ifndef USE_THE_INDEX_VARIABLE
-#ifdef USE_THE_INDEX_COMPATIBILITY_MACROS
-#define active_nr (the_index.cache_nr)
-
-#define read_cache() repo_read_index(the_repository)
-#define discard_cache() discard_index(&the_index)
-#define cache_name_pos(name, namelen) index_name_pos(&the_index,(name),(namelen))
 #endif
-#endif
-#endif
-
-#define TYPE_BITS 3
-
-/*
- * Values in this enum (except those outside the 3 bit range) are part
- * of pack file format. See gitformat-pack(5) for more information.
- */
-enum object_type {
-       OBJ_BAD = -1,
-       OBJ_NONE = 0,
-       OBJ_COMMIT = 1,
-       OBJ_TREE = 2,
-       OBJ_BLOB = 3,
-       OBJ_TAG = 4,
-       /* 5 for future expansion */
-       OBJ_OFS_DELTA = 6,
-       OBJ_REF_DELTA = 7,
-       OBJ_ANY,
-       OBJ_MAX
-};
 
 static inline enum object_type object_type(unsigned int mode)
 {
@@ -648,6 +610,9 @@ char *prefix_path_gently(const char *prefix, int len, int *remaining, const char
  */
 char *prefix_filename(const char *prefix, const char *path);
 
+/* Likewise, but path=="-" always yields "-" */
+char *prefix_filename_except_for_dash(const char *prefix, const char *path);
+
 int check_filename(const char *prefix, const char *name);
 void verify_filename(const char *prefix,
                     const char *name,
@@ -666,81 +631,6 @@ void initialize_repository_version(int hash_algo, int reinit);
 void sanitize_stdfds(void);
 int daemonize(void);
 
-#define alloc_nr(x) (((x)+16)*3/2)
-
-/**
- * Dynamically growing an array using realloc() is error prone and boring.
- *
- * Define your array with:
- *
- * - a pointer (`item`) that points at the array, initialized to `NULL`
- *   (although please name the variable based on its contents, not on its
- *   type);
- *
- * - an integer variable (`alloc`) that keeps track of how big the current
- *   allocation is, initialized to `0`;
- *
- * - another integer variable (`nr`) to keep track of how many elements the
- *   array currently has, initialized to `0`.
- *
- * Then before adding `n`th element to the item, call `ALLOC_GROW(item, n,
- * alloc)`.  This ensures that the array can hold at least `n` elements by
- * calling `realloc(3)` and adjusting `alloc` variable.
- *
- * ------------
- * sometype *item;
- * size_t nr;
- * size_t alloc
- *
- * for (i = 0; i < nr; i++)
- *     if (we like item[i] already)
- *             return;
- *
- * // we did not like any existing one, so add one
- * ALLOC_GROW(item, nr + 1, alloc);
- * item[nr++] = value you like;
- * ------------
- *
- * You are responsible for updating the `nr` variable.
- *
- * If you need to specify the number of elements to allocate explicitly
- * then use the macro `REALLOC_ARRAY(item, alloc)` instead of `ALLOC_GROW`.
- *
- * Consider using ALLOC_GROW_BY instead of ALLOC_GROW as it has some
- * added niceties.
- *
- * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'.
- */
-#define ALLOC_GROW(x, nr, alloc) \
-       do { \
-               if ((nr) > alloc) { \
-                       if (alloc_nr(alloc) < (nr)) \
-                               alloc = (nr); \
-                       else \
-                               alloc = alloc_nr(alloc); \
-                       REALLOC_ARRAY(x, alloc); \
-               } \
-       } while (0)
-
-/*
- * Similar to ALLOC_GROW but handles updating of the nr value and
- * zeroing the bytes of the newly-grown array elements.
- *
- * DO NOT USE any expression with side-effect for any of the
- * arguments.
- */
-#define ALLOC_GROW_BY(x, nr, increase, alloc) \
-       do { \
-               if (increase) { \
-                       size_t new_nr = nr + (increase); \
-                       if (new_nr < nr) \
-                               BUG("negative growth in ALLOC_GROW_BY"); \
-                       ALLOC_GROW(x, new_nr, alloc); \
-                       memset((x) + nr, 0, sizeof(*(x)) * (increase)); \
-                       nr = new_nr; \
-               } \
-       } while (0)
-
 /* Initialize and use the cache information */
 struct lock_file;
 void preload_index(struct index_state *index,
@@ -999,14 +889,6 @@ void set_shared_repository(int value);
 int get_shared_repository(void);
 void reset_shared_repository(void);
 
-/*
- * Do replace refs need to be checked this run?  This variable is
- * initialized to true unless --no-replace-object is used or
- * $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
- * commands that do not want replace references to be active.
- */
-extern int read_replace_refs;
-
 /*
  * These values are used to help identify parts of a repository to fsync.
  * FSYNC_COMPONENT_NONE identifies data that will not be a persistent part of the
@@ -1410,22 +1292,6 @@ int finalize_object_file(const char *tmpfile, const char *filename);
 /* Helper to check and "touch" a file */
 int check_and_freshen_file(const char *fn, int freshen);
 
-extern const signed char hexval_table[256];
-static inline unsigned int hexval(unsigned char c)
-{
-       return hexval_table[c];
-}
-
-/*
- * Convert two consecutive hexadecimal digits into a char.  Return a
- * negative value on error.  Don't run over the end of short strings.
- */
-static inline int hex2chr(const char *s)
-{
-       unsigned int val = hexval(s[0]);
-       return (val & ~0xf) ? val : (val << 4) | hexval(s[1]);
-}
-
 /* Convert to/from hex/sha1 representation */
 #define MINIMUM_ABBREV minimum_abbrev
 #define DEFAULT_ABBREV default_abbrev
@@ -1448,40 +1314,6 @@ struct object_context {
        char *path;
 };
 
-#define GET_OID_QUIETLY           01
-#define GET_OID_COMMIT            02
-#define GET_OID_COMMITTISH        04
-#define GET_OID_TREE             010
-#define GET_OID_TREEISH          020
-#define GET_OID_BLOB             040
-#define GET_OID_FOLLOW_SYMLINKS 0100
-#define GET_OID_RECORD_PATH     0200
-#define GET_OID_ONLY_TO_DIE    04000
-#define GET_OID_REQUIRE_PATH  010000
-
-#define GET_OID_DISAMBIGUATORS \
-       (GET_OID_COMMIT | GET_OID_COMMITTISH | \
-       GET_OID_TREE | GET_OID_TREEISH | \
-       GET_OID_BLOB)
-
-enum get_oid_result {
-       FOUND = 0,
-       MISSING_OBJECT = -1, /* The requested object is missing */
-       SHORT_NAME_AMBIGUOUS = -2,
-       /* The following only apply when symlinks are followed */
-       DANGLING_SYMLINK = -4, /*
-                               * The initial symlink is there, but
-                               * (transitively) points to a missing
-                               * in-tree file
-                               */
-       SYMLINK_LOOP = -5,
-       NOT_DIR = -6, /*
-                      * Somewhere along the symlink chain, a path is
-                      * requested which contains a file as a
-                      * non-final element.
-                      */
-};
-
 int repo_get_oid(struct repository *r, const char *str, struct object_id *oid);
 __attribute__((format (printf, 2, 3)))
 int get_oidf(struct object_id *oid, const char *fmt, ...);
@@ -1512,68 +1344,6 @@ int repo_for_each_abbrev(struct repository *r, const char *prefix, each_abbrev_f
 
 int set_disambiguate_hint_config(const char *var, const char *value);
 
-/*
- * Try to read a SHA1 in hexadecimal format from the 40 characters
- * starting at hex.  Write the 20-byte result to sha1 in binary form.
- * Return 0 on success.  Reading stops if a NUL is encountered in the
- * input, so it is safe to pass this function an arbitrary
- * null-terminated string.
- */
-int get_sha1_hex(const char *hex, unsigned char *sha1);
-int get_oid_hex(const char *hex, struct object_id *sha1);
-
-/* Like get_oid_hex, but for an arbitrary hash algorithm. */
-int get_oid_hex_algop(const char *hex, struct object_id *oid, const struct git_hash_algo *algop);
-
-/*
- * Read `len` pairs of hexadecimal digits from `hex` and write the
- * values to `binary` as `len` bytes. Return 0 on success, or -1 if
- * the input does not consist of hex digits).
- */
-int hex_to_bytes(unsigned char *binary, const char *hex, size_t len);
-
-/*
- * Convert a binary hash in "unsigned char []" or an object name in
- * "struct object_id *" to its hex equivalent. The `_r` variant is reentrant,
- * and writes the NUL-terminated output to the buffer `out`, which must be at
- * least `GIT_MAX_HEXSZ + 1` bytes, and returns a pointer to out for
- * convenience.
- *
- * The non-`_r` variant returns a static buffer, but uses a ring of 4
- * buffers, making it safe to make multiple calls for a single statement, like:
- *
- *   printf("%s -> %s", hash_to_hex(one), hash_to_hex(two));
- *   printf("%s -> %s", oid_to_hex(one), oid_to_hex(two));
- */
-char *hash_to_hex_algop_r(char *buffer, const unsigned char *hash, const struct git_hash_algo *);
-char *oid_to_hex_r(char *out, const struct object_id *oid);
-char *hash_to_hex_algop(const unsigned char *hash, const struct git_hash_algo *);      /* static buffer result! */
-char *hash_to_hex(const unsigned char *hash);                                          /* same static buffer */
-char *oid_to_hex(const struct object_id *oid);                                         /* same static buffer */
-
-/*
- * Parse a 40-character hexadecimal object ID starting from hex, updating the
- * pointer specified by end when parsing stops.  The resulting object ID is
- * stored in oid.  Returns 0 on success.  Parsing will stop on the first NUL or
- * other invalid character.  end is only updated on success; otherwise, it is
- * unmodified.
- */
-int parse_oid_hex(const char *hex, struct object_id *oid, const char **end);
-
-/* Like parse_oid_hex, but for an arbitrary hash algorithm. */
-int parse_oid_hex_algop(const char *hex, struct object_id *oid, const char **end,
-                       const struct git_hash_algo *algo);
-
-
-/*
- * These functions work like get_oid_hex and parse_oid_hex, but they will parse
- * a hex value for any algorithm. The algorithm is detected based on the length
- * and the algorithm in use is returned. If this is not a hex object ID in any
- * algorithm, returns GIT_HASH_UNKNOWN.
- */
-int get_oid_hex_any(const char *hex, struct object_id *oid);
-int parse_oid_hex_any(const char *hex, struct object_id *oid, const char **end);
-
 /*
  * This reads short-hand syntax that not only evaluates to a commit
  * object name, but also can act as if the end user spelled the name
@@ -1623,8 +1393,10 @@ int repo_interpret_branch_name(struct repository *r,
 
 int validate_headref(const char *ref);
 
-int base_name_compare(const char *name1, int len1, int mode1, const char *name2, int len2, int mode2);
-int df_name_compare(const char *name1, int len1, int mode1, const char *name2, int len2, int mode2);
+int base_name_compare(const char *name1, size_t len1, int mode1,
+                     const char *name2, size_t len2, int mode2);
+int df_name_compare(const char *name1, size_t len1, int mode1,
+                   const char *name2, size_t len2, int mode2);
 int name_compare(const char *name1, size_t len1, const char *name2, size_t len2);
 int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2);
 
@@ -1640,65 +1412,10 @@ struct object *repo_peel_to_type(struct repository *r,
 #define peel_to_type(name, namelen, obj, type) \
        repo_peel_to_type(the_repository, name, namelen, obj, type)
 
-#define IDENT_STRICT          1
-#define IDENT_NO_DATE         2
-#define IDENT_NO_NAME         4
-
-enum want_ident {
-       WANT_BLANK_IDENT,
-       WANT_AUTHOR_IDENT,
-       WANT_COMMITTER_IDENT
-};
-
-const char *git_author_info(int);
-const char *git_committer_info(int);
-const char *fmt_ident(const char *name, const char *email,
-                     enum want_ident whose_ident,
-                     const char *date_str, int);
-const char *fmt_name(enum want_ident);
-const char *ident_default_name(void);
-const char *ident_default_email(void);
 const char *git_editor(void);
 const char *git_sequence_editor(void);
 const char *git_pager(int stdout_is_tty);
 int is_terminal_dumb(void);
-int git_ident_config(const char *, const char *, void *);
-/*
- * Prepare an ident to fall back on if the user didn't configure it.
- */
-void prepare_fallback_ident(const char *name, const char *email);
-void reset_ident_date(void);
-
-struct ident_split {
-       const char *name_begin;
-       const char *name_end;
-       const char *mail_begin;
-       const char *mail_end;
-       const char *date_begin;
-       const char *date_end;
-       const char *tz_begin;
-       const char *tz_end;
-};
-/*
- * Signals an success with 0, but time part of the result may be NULL
- * if the input lacks timestamp and zone
- */
-int split_ident_line(struct ident_split *, const char *, int);
-
-/*
- * Given a commit or tag object buffer and the commit or tag headers, replaces
- * the idents in the headers with their canonical versions using the mailmap mechanism.
- */
-void apply_mailmap_to_header(struct strbuf *, const char **, struct string_list *);
-
-/*
- * Compare split idents for equality or strict ordering. Note that we
- * compare only the ident part of the line, ignoring any timestamp.
- *
- * Because there are two fields, we must choose one as the primary key; we
- * currently arbitrarily pick the email.
- */
-int ident_cmp(const struct ident_split *, const struct ident_split *);
 
 struct cache_def {
        struct strbuf path;
@@ -1765,9 +1482,6 @@ int update_server_info(int);
 const char *get_log_output_encoding(void);
 const char *get_commit_output_encoding(void);
 
-int committer_ident_sufficiently_given(void);
-int author_ident_sufficiently_given(void);
-
 extern const char *git_commit_encoding;
 extern const char *git_log_output_encoding;
 extern const char *git_mailmap_file;
index 336e46dbba5a06e7d9b5fdb5dd6f3c7bdd971186..c1cc30a5dc7edaadfa69877b4a8f7a6e3a92ffdb 100644 (file)
--- a/cbtree.c
+++ b/cbtree.c
@@ -4,6 +4,7 @@
  * Based on Adam Langley's adaptation of Dan Bernstein's public domain code
  * git clone https://github.com/agl/critbit.git
  */
+#include "git-compat-util.h"
 #include "cbtree.h"
 
 static struct cb_node *cb_node_of(const void *p)
index 0be14fb7ee4276dff338eb27b35c68973dd2c4b2..43193abdda23cef279f9e9cee99370509611f7c5 100644 (file)
--- a/cbtree.h
+++ b/cbtree.h
@@ -14,8 +14,6 @@
 #ifndef CBTREE_H
 #define CBTREE_H
 
-#include "git-compat-util.h"
-
 struct cb_node;
 struct cb_node {
        struct cb_node *child[2];
index 1152133bd77a773f40afd6c3477224e051318e0c..1917f3b32300abf113bf3128450da26eb2efd9b4 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef CHECKOUT_H
 #define CHECKOUT_H
 
-#include "cache.h"
+#include "hash.h"
 
 /*
  * Check if the branch name uniquely matches a branch name on a remote
index 0275b74a895a17bb62b7fe12299e6f12aa503d92..f65e9a1e4290c1b704e61c0c9909c61c14bf67da 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "chunk-format.h"
 #include "csum-file.h"
 
index 7885aa084878dde2f2786545b7edc05e7d3fee24..025c38f938ed38bd4fdb0c280b3ddc23af8dd525 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef CHUNK_FORMAT_H
 #define CHUNK_FORMAT_H
 
-#include "git-compat-util.h"
 #include "hash.h"
 
 struct hashfile;
index 8ebff4259676e303b953385ba14cf17b78c1a4de..b098e10f52aed2f9d8928958fd393cbd574ddf8b 100755 (executable)
@@ -26,7 +26,6 @@ linux-TEST-vars)
        export GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1
        export GIT_TEST_MULTI_PACK_INDEX=1
        export GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=1
-       export GIT_TEST_ADD_I_USE_BUILTIN=0
        export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
        export GIT_TEST_WRITE_REV_INDEX=1
        export GIT_TEST_CHECKOUT_WORKERS=2
diff --git a/color.c b/color.c
index f05d8a81d72115edbf47d34950a31615a15ea98e..6b577ce0a75545f532fb189ccedb5d48c99ce3a4 100644 (file)
--- a/color.c
+++ b/color.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "config.h"
 #include "color.h"
+#include "hex.h"
 
 static int git_use_color_default = GIT_COLOR_AUTO;
 int color_stdout_is_tty = -1;
index 1a39b5dde0946df0c1e36c7b1f4c48552885985a..91051dc3258925a10d6de5d67101720376b8d630 100644 (file)
@@ -4,6 +4,7 @@
 #include "blob.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "quote.h"
 #include "xdiff-interface.h"
 #include "xdiff/xmacros.h"
index c11b59f28b3164cee21ab972088c32082d8f5bb6..5e6098ff356b937f7790e2c8dfe5634ebc5f56be 100644 (file)
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "pack.h"
 #include "packfile.h"
index 37faee6b66d59c693dc9ee829dbd5ad61654fe3c..bb88bec7aa3d8f0d56b262b21b3a2ea47b969b52 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef COMMIT_GRAPH_H
 #define COMMIT_GRAPH_H
 
-#include "git-compat-util.h"
 #include "object-store.h"
 #include "oidset.h"
 
index 2e33c599a82c81127b9a24547d0834e6c7a55bcf..7c0c39fd2864c2db72b81adc4c0b1b6d7cf0337e 100644 (file)
@@ -1,7 +1,9 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "commit.h"
 #include "commit-graph.h"
 #include "decorate.h"
+#include "hex.h"
 #include "prio-queue.h"
 #include "tree.h"
 #include "ref-filter.h"
@@ -807,8 +809,12 @@ cleanup:
        clear_commit_marks_many(nr_commits, list, RESULT | assign_flag);
        free(list);
 
-       for (i = 0; i < from->nr; i++)
-               from->objects[i].item->flags &= ~assign_flag;
+       for (i = 0; i < from->nr; i++) {
+               struct object *from_one = from->objects[i].item;
+
+               if (from_one)
+                       from_one->flags &= ~assign_flag;
+       }
 
        return result;
 }
index 557738df271c7dd78c5ddcc65d6fe6e47c665758..4a414ee905d5de4498d1fcca2da53e7c6a07b50e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef COMMIT_SLAB_IMPL_H
 #define COMMIT_SLAB_IMPL_H
 
-#include "git-compat-util.h"
-
 #define implement_static_commit_slab(slabname, elemtype) \
        implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static)
 
index 14538a811ae0e000f140caf2f4738c89116684a5..7b63d3b0e1c0f2004e463b3d5fc4ca9ff28d9684 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -2,6 +2,7 @@
 #include "tag.h"
 #include "commit.h"
 #include "commit-graph.h"
+#include "hex.h"
 #include "repository.h"
 #include "object-store.h"
 #include "pkt-line.h"
@@ -801,7 +802,8 @@ int compare_commits_by_author_date(const void *a_, const void *b_,
        return 0;
 }
 
-int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_, void *unused)
+int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_,
+                                           void *unused UNUSED)
 {
        const struct commit *a = a_, *b = b_;
        const timestamp_t generation_a = commit_graph_generation(a),
@@ -821,7 +823,8 @@ int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_, void
        return 0;
 }
 
-int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused)
+int compare_commits_by_commit_date(const void *a_, const void *b_,
+                                  void *unused UNUSED)
 {
        const struct commit *a = a_, *b = b_;
        /* newer commits with larger date first */
@@ -1033,6 +1036,7 @@ struct commit *get_fork_point(const char *refname, struct commit *commit)
        ret = bases->item;
 
 cleanup_return:
+       free(revs.commit);
        free_commit_list(bases);
        free(full_refname);
        return ret;
index fa39202fa6b09837f2a08202bc1f758fa0eac4de..06657b4c6e7494899b4e9671f6dd08d8c5c96db1 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -205,7 +205,6 @@ void free_commit_list(struct commit_list *list);
 
 struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
 
-int has_non_ascii(const char *text);
 const char *logmsg_reencode(const struct commit *commit,
                            char **commit_encoding,
                            const char *output_encoding);
@@ -274,8 +273,6 @@ struct ref;
 int for_each_commit_graft(each_commit_graft_fn, void *);
 
 int interactive_add(const char **argv, const char *prefix, int patch);
-int run_add_interactive(const char *revision, const char *patch_mode,
-                       const struct pathspec *pathspec);
 
 struct commit_extra_header {
        struct commit_extra_header *next;
index d67b0ee50d351682f2a9e5e80c3164fa601f65e6..eb25123fa124866d7438b0dc155e8ea4932edc9f 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "strbuf.h"
 #include "fsmonitor.h"
 #include "fsmonitor-ipc.h"
index e08c505c148933ed830ae2071198999827d84d14..c9536dfb666318468612701481d7216fd3b723e9 100644 (file)
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "config.h"
 #include "fsmonitor-ipc.h"
 
index 6abbc7af3ab53cd4911edf93d91ebf18e2c5c152..58b623fbb9a3bf598e44d6fe377340d960e004f4 100644 (file)
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "config.h"
 #include "fsmonitor.h"
 #include "fsmonitor-ipc.h"
index e433740381be9cad8cd6c7453508931684832209..3afbde789449c786873733dba935eb9a00cdc04b 100644 (file)
@@ -7,6 +7,7 @@
 #include "../strbuf.h"
 #include "../run-command.h"
 #include "../cache.h"
+#include "../alloc.h"
 #include "win32/lazyload.h"
 #include "../config.h"
 #include "dir.h"
index 3abe8dd5a2711b5268cb5efe623d8c027f0d3d83..f83610f684d031f8660542b108a940207cad89df 100644 (file)
@@ -644,7 +644,7 @@ void winansi_init(void)
 
        /* start console spool thread on the pipe's read end */
        hthread = CreateThread(NULL, 0, console_thread, NULL, 0, NULL);
-       if (hthread == INVALID_HANDLE_VALUE)
+       if (!hthread)
                die_lasterr("CreateThread(console_thread) failed");
 
        /* schedule cleanup routine */
index 00090a32fc3a2bd82fe01f9060eb7b0b4f7b8ca1..d0aff55fa66b7f57f29a958092ce898034547ec3 100644 (file)
--- a/config.c
+++ b/config.c
@@ -5,11 +5,13 @@
  * Copyright (C) Johannes Schindelin, 2005
  *
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "date.h"
 #include "branch.h"
 #include "config.h"
 #include "environment.h"
+#include "ident.h"
 #include "repository.h"
 #include "lockfile.h"
 #include "exec-cmd.h"
@@ -21,6 +23,7 @@
 #include "utf8.h"
 #include "dir.h"
 #include "color.h"
+#include "replace-object.h"
 #include "refs.h"
 #include "worktree.h"
 
index ef9eade6414e2661a6ab7e1970dafea3b3219114..7606246531a798a0f400a38742323626ae0d9524 100644 (file)
--- a/config.h
+++ b/config.h
@@ -447,15 +447,6 @@ void git_configset_init(struct config_set *cs);
  */
 int git_configset_add_file(struct config_set *cs, const char *filename);
 
-/**
- * Parses command line options and environment variables, and adds the
- * variable-value pairs to the `config_set`. Returns 0 on success, or -1
- * if there is an error in parsing. The caller decides whether to free
- * the incomplete configset or continue using it when the function
- * returns -1.
- */
-int git_configset_add_parameters(struct config_set *cs);
-
 /**
  * Finds and returns the value list, sorted in order of increasing priority
  * for the configuration variable `key` and config set `cs`. When the
index 7d259952652291eb9c3aba161a9f710be8ada8f5..64c44db8058e0ca530519814bd5f4a3714d49695 100644 (file)
@@ -624,6 +624,9 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
        SHELL_PATH = /usr/coreutils/bin/bash
 endif
 ifeq ($(uname_S),MINGW)
+       ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
+               $(error "Building with MSys is no longer supported")
+       endif
        pathsep = ;
        HAVE_ALLOCA_H = YesPlease
        NO_PREAD = YesPlease
@@ -653,7 +656,6 @@ ifeq ($(uname_S),MINGW)
        USE_WIN32_IPC = YesPlease
        USE_WIN32_MMAP = YesPlease
        MMAP_PREVENTS_DELETE = UnfortunatelyYes
-       USE_NED_ALLOCATOR = YesPlease
        UNRELIABLE_FSTAT = UnfortunatelyYes
        OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
        NO_REGEX = YesPlease
@@ -678,61 +680,43 @@ ifeq ($(uname_S),MINGW)
        RC = windres -O coff
        NATIVE_CRLF = YesPlease
        X = .exe
-ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
-       htmldir = doc/git/html/
-       prefix =
+       # MSys2
+       prefix = /usr/
+       # Enable DEP
+       BASIC_LDFLAGS += -Wl,--nxcompat
+       # Enable ASLR (unless debugging)
+       ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS))))
+               BASIC_LDFLAGS += -Wl,--dynamicbase
+       endif
+       ifeq (MINGW32,$(MSYSTEM))
+               prefix = /mingw32
+               HOST_CPU = i686
+               BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
+       endif
+       ifeq (MINGW64,$(MSYSTEM))
+               prefix = /mingw64
+               HOST_CPU = x86_64
+               BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
+       else
+               COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
+               BASIC_LDFLAGS += -Wl,--large-address-aware
+       endif
+       CC = gcc
+       COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \
+               -fstack-protector-strong
+       EXTLIBS += -lntdll
        INSTALL = /bin/install
-       EXTLIBS += /mingw/lib/libz.a
        INTERNAL_QSORT = YesPlease
        HAVE_LIBCHARSET_H = YesPlease
-       NO_GETTEXT = YesPlease
-       NO_PYTHON = YesPlease
-       COMPAT_CFLAGS += -D__USE_MINGW_ACCESS
-else
-       ifneq ($(shell expr "$(uname_R)" : '1\.'),2)
-               # MSys2
-               prefix = /usr/
-               # Enable DEP
-               BASIC_LDFLAGS += -Wl,--nxcompat
-               # Enable ASLR (unless debugging)
-               ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS))))
-                       BASIC_LDFLAGS += -Wl,--dynamicbase
-               endif
-               ifeq (MINGW32,$(MSYSTEM))
-                       prefix = /mingw32
-                       HOST_CPU = i686
-                       BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
-               endif
-               ifeq (MINGW64,$(MSYSTEM))
-                       prefix = /mingw64
-                       HOST_CPU = x86_64
-                       BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
-               else
-                       COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
-                       BASIC_LDFLAGS += -Wl,--large-address-aware
-               endif
-               CC = gcc
-               COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \
-                       -fstack-protector-strong
-               EXTLIBS += -lntdll
-               INSTALL = /bin/install
-               INTERNAL_QSORT = YesPlease
-               HAVE_LIBCHARSET_H = YesPlease
-               USE_GETTEXT_SCHEME = fallthrough
-               USE_LIBPCRE = YesPlease
-               USE_NED_ALLOCATOR = YesPlease
-               ifeq (/mingw64,$(subst 32,64,$(prefix)))
-                       # Move system config into top-level /etc/
-                       ETC_GITCONFIG = ../etc/gitconfig
-                       ETC_GITATTRIBUTES = ../etc/gitattributes
-               endif
-       else
-               COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
-               NO_CURL = YesPlease
-               NO_PYTHON = YesPlease
+       USE_GETTEXT_SCHEME = fallthrough
+       USE_LIBPCRE = YesPlease
+       USE_NED_ALLOCATOR = YesPlease
+       ifeq (/mingw64,$(subst 32,64,$(prefix)))
+               # Move system config into top-level /etc/
+               ETC_GITCONFIG = ../etc/gitconfig
+               ETC_GITATTRIBUTES = ../etc/gitattributes
        endif
 endif
-endif
 ifeq ($(uname_S),QNX)
        COMPAT_CFLAGS += -DSA_RESTART=0
        EXPAT_NEEDS_XMLPARSE_H = YesPlease
index 63e59641c0d4d5c60fc4bee2761e6acd471535a2..ed486116ee1e5f36c5fa42031e5b656d67ed5d5a 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -1,6 +1,7 @@
 #include "git-compat-util.h"
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "pkt-line.h"
 #include "quote.h"
 #include "refs.h"
@@ -30,7 +31,8 @@ static int check_ref(const char *name, unsigned int flags)
                return 0;
 
        /* REF_NORMAL means that we don't want the magic fake tag refs */
-       if ((flags & REF_NORMAL) && check_refname_format(name, 0))
+       if ((flags & REF_NORMAL) && check_refname_format(name,
+                                                        REFNAME_ALLOW_ONELEVEL))
                return 0;
 
        /* REF_HEADS means that we want regular branch heads */
@@ -1406,6 +1408,7 @@ static void fill_ssh_args(struct child_process *conn, const char *ssh_host,
  * the connection failed).
  */
 struct child_process *git_connect(int fd[2], const char *url,
+                                 const char *name,
                                  const char *prog, int flags)
 {
        char *hostandport, *path;
@@ -1415,10 +1418,11 @@ struct child_process *git_connect(int fd[2], const char *url,
 
        /*
         * NEEDSWORK: If we are trying to use protocol v2 and we are planning
-        * to perform a push, then fallback to v0 since the client doesn't know
-        * how to push yet using v2.
+        * to perform any operation that doesn't involve upload-pack (i.e., a
+        * fetch, ls-remote, etc), then fallback to v0 since we don't know how
+        * to do anything else (like push or remote archive) via v2.
         */
-       if (version == protocol_v2 && !strcmp("git-receive-pack", prog))
+       if (version == protocol_v2 && strcmp("git-upload-pack", name))
                version = protocol_v0;
 
        /* Without this we cannot rely on waitpid() to tell
index b26f7de7841838e0d6e88bb81169191f579fb56d..f41a0b4c1fb766523d6bee7964989063a6ceeaa2 100644 (file)
--- a/connect.h
+++ b/connect.h
@@ -7,7 +7,7 @@
 #define CONNECT_DIAG_URL      (1u << 1)
 #define CONNECT_IPV4          (1u << 2)
 #define CONNECT_IPV6          (1u << 3)
-struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
+struct child_process *git_connect(int fd[2], const char *url, const char *name, const char *prog, int flags);
 int finish_connect(struct child_process *conn);
 int git_connection_is_socket(struct child_process *conn);
 int server_supports(const char *feature);
index b90fd61790cef00d4141bb2eb30f33522e6e8c47..39cb1e1074dc6ced60e73fc625bcec0491bdd017 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "object-store.h"
 #include "run-command.h"
 #include "sigchain.h"
index 8520f03128a109cc83c559b7477539b8c4c21895..31e36cf3c4167e77a9b1d21154b39d6f31209411 100644 (file)
@@ -1,6 +1,7 @@
 // the_index.* variables
 @@
 identifier AC = active_cache;
+identifier AN = active_nr;
 identifier ACC = active_cache_changed;
 identifier ACT = active_cache_tree;
 @@
@@ -8,6 +9,9 @@ identifier ACT = active_cache_tree;
 - AC
 + the_index.cache
 |
+- AN
++ the_index.cache_nr
+|
 - ACC
 + the_index.cache_changed
 |
@@ -15,19 +19,13 @@ identifier ACT = active_cache_tree;
 + the_index.cache_tree
 )
 
-@@
-identifier AN = active_nr;
-identifier f != prepare_to_commit;
-@@
-  f(...) {<...
-- AN
-+ the_index.cache_nr
-  ...>}
-
 // "the_repository" simple cases
 @@
 @@
 (
+- read_cache
++ repo_read_index
+|
 - read_cache_unmerged
 + repo_read_index_unmerged
 |
@@ -96,6 +94,15 @@ identifier f != prepare_to_commit;
 |
 - resolve_undo_clear
 + resolve_undo_clear_index
+|
+- cache_name_pos
++ index_name_pos
+|
+- update_main_cache_tree
++ cache_tree_update
+|
+- discard_cache
++ discard_index
 )
   (
 + &the_index,
@@ -137,3 +144,14 @@ identifier f != prepare_to_commit;
   ...
 + , NULL, NULL, NULL
   )
+
+@@
+expression O;
+@@
+- write_cache_as_tree
++ write_index_as_tree
+  (
+- O,
++ O, &the_index, get_index_file(),
+  ...
+  )
diff --git a/contrib/coccinelle/index-compatibility.pending.cocci b/contrib/coccinelle/index-compatibility.pending.cocci
deleted file mode 100644 (file)
index 01f875d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// "the_repository" simple cases
-@@
-@@
-(
-- read_cache
-+ repo_read_index
-)
-  (
-+ the_repository,
-  ...)
-
-// "the_index" simple cases
-@@
-@@
-(
-- discard_cache
-+ discard_index
-|
-- cache_name_pos
-+ index_name_pos
-)
-  (
-+ &the_index,
-  ...)
index 57972c2845c135dc45aeb560d289aade4caa5e5d..76ee4ab1e54965f6bf02afb5b562eb327d66ebac 100644 (file)
 #
 # If you would like a colored hint about the current dirty state, set
 # GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
-# the colored output of "git status -sb" and are available only when
-# using __git_ps1 for PROMPT_COMMAND or precmd in Bash,
-# but always available in Zsh.
+# the colored output of "git status -sb".
 #
 # If you would like __git_ps1 to do nothing in the case when the current
 # directory is set up to be ignored by git, then set
@@ -259,12 +257,12 @@ __git_ps1_colorize_gitstring ()
                local c_lblue='%F{blue}'
                local c_clear='%f'
        else
-               # Using \[ and \] around colors is necessary to prevent
+               # Using \001 and \002 around colors is necessary to prevent
                # issues with command line editing/browsing/completion!
-               local c_red='\[\e[31m\]'
-               local c_green='\[\e[32m\]'
-               local c_lblue='\[\e[1;34m\]'
-               local c_clear='\[\e[0m\]'
+               local c_red=$'\001\e[31m\002'
+               local c_green=$'\001\e[32m\002'
+               local c_lblue=$'\001\e[1;34m\002'
+               local c_clear=$'\001\e[0m\002'
        fi
        local bad_color=$c_red
        local ok_color=$c_green
@@ -574,11 +572,8 @@ __git_ps1 ()
                b="\${__git_ps1_branch_name}"
        fi
 
-       # NO color option unless in PROMPT_COMMAND mode or it's Zsh
        if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
-               if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then
-                       __git_ps1_colorize_gitstring
-               fi
+               __git_ps1_colorize_gitstring
        fi
 
        local f="$h$w$i$s$u$p"
index 4655e0987b32a837e966832eaebf89ed3ea829e9..093399c788178f3d4f005fc9d580e7c030e2d40a 100644 (file)
@@ -74,9 +74,7 @@ aggregate-results-and-cleanup: $(T)
        $(MAKE) clean
 
 aggregate-results:
-       for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \
-               echo "$$f"; \
-       done | '$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh
+       @'$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 valgrind:
        $(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
index a54d1690c083178fd0c1356c8c8c8bee5cfdbda1..349c7e4af155357417b937836da43c84111435b8 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "attr.h"
 #include "run-command.h"
index f566c8ab195c41741f9e55e4663f013ce66dd49e..ea40a2a410bb5b7b1294ca2a77944d9f7ca6c878 100644 (file)
@@ -7,6 +7,7 @@
 #include "prompt.h"
 #include "sigchain.h"
 #include "urlmatch.h"
+#include "git-compat-util.h"
 
 void credential_init(struct credential *c)
 {
@@ -235,6 +236,11 @@ int credential_read(struct credential *c, FILE *fp)
                } else if (!strcmp(key, "path")) {
                        free(c->path);
                        c->path = xstrdup(value);
+               } else if (!strcmp(key, "password_expiry_utc")) {
+                       errno = 0;
+                       c->password_expiry_utc = parse_timestamp(value, NULL, 10);
+                       if (c->password_expiry_utc == 0 || errno == ERANGE)
+                               c->password_expiry_utc = TIME_MAX;
                } else if (!strcmp(key, "url")) {
                        credential_from_url(c, value);
                } else if (!strcmp(key, "quit")) {
@@ -270,9 +276,13 @@ void credential_write(const struct credential *c, FILE *fp)
        credential_write_item(fp, "path", c->path, 0);
        credential_write_item(fp, "username", c->username, 0);
        credential_write_item(fp, "password", c->password, 0);
+       if (c->password_expiry_utc != TIME_MAX) {
+               char *s = xstrfmt("%"PRItime, c->password_expiry_utc);
+               credential_write_item(fp, "password_expiry_utc", s, 0);
+               free(s);
+       }
        for (size_t i = 0; i < c->wwwauth_headers.nr; i++)
-               credential_write_item(fp, "wwwauth[]", c->wwwauth_headers.v[i],
-                                     0);
+               credential_write_item(fp, "wwwauth[]", c->wwwauth_headers.v[i], 0);
 }
 
 static int run_credential_helper(struct credential *c,
@@ -346,6 +356,12 @@ void credential_fill(struct credential *c)
 
        for (i = 0; i < c->helpers.nr; i++) {
                credential_do(c, c->helpers.items[i].string, "get");
+               if (c->password_expiry_utc < time(NULL)) {
+                       /* Discard expired password */
+                       FREE_AND_NULL(c->password);
+                       /* Reset expiry to maintain consistency */
+                       c->password_expiry_utc = TIME_MAX;
+               }
                if (c->username && c->password)
                        return;
                if (c->quit)
@@ -364,7 +380,7 @@ void credential_approve(struct credential *c)
 
        if (c->approved)
                return;
-       if (!c->username || !c->password)
+       if (!c->username || !c->password || c->password_expiry_utc < time(NULL))
                return;
 
        credential_apply_config(c);
@@ -385,6 +401,7 @@ void credential_reject(struct credential *c)
 
        FREE_AND_NULL(c->username);
        FREE_AND_NULL(c->password);
+       c->password_expiry_utc = TIME_MAX;
        c->approved = 0;
 }
 
index 3756a54c74dc809a59f092321b3475a3a885f037..2b5958cd431706026b243057cdb68f4274300703 100644 (file)
@@ -141,10 +141,12 @@ struct credential {
        char *protocol;
        char *host;
        char *path;
+       timestamp_t password_expiry_utc;
 };
 
 #define CREDENTIAL_INIT { \
        .helpers = STRING_LIST_INIT_DUP, \
+       .password_expiry_utc = TIME_MAX, \
        .wwwauth_headers = STRVEC_INIT, \
 }
 
index 0ae7d12b5c132883907192d16c3e2f04d56a80fb..8908e7f8d2a27c4e81225f69c4a4401e0698c363 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "pkt-line.h"
 #include "run-command.h"
@@ -928,7 +929,7 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
                add_child(&cld, addr, addrlen);
 }
 
-static void child_handler(int signo)
+static void child_handler(int signo UNUSED)
 {
        /*
         * Otherwise empty handler because systemcalls will get interrupted
index 2036d15967125303effff870a45066710ef99e3e..71e79daa8259684f836f0addade83d644af91601 100644 (file)
@@ -2,7 +2,8 @@
  * decorate.c - decorate a git object with some arbitrary
  * data.
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "hashmap.h"
 #include "object.h"
 #include "decorate.h"
 
index 90c0d6958f4003b6b883366788ff15943151204d..fe12c93005b049b417ff77988e80bb14a9ae4494 100644 (file)
@@ -1,8 +1,10 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "attr.h"
 #include "object.h"
 #include "blob.h"
 #include "commit.h"
+#include "hex.h"
 #include "tag.h"
 #include "tree.h"
 #include "delta.h"
@@ -513,6 +515,22 @@ void propagate_island_marks(struct commit *commit)
        }
 }
 
+void free_island_marks(void)
+{
+       struct island_bitmap *bitmap;
+
+       if (island_marks) {
+               kh_foreach_value(island_marks, bitmap, {
+                       if (!--bitmap->refcount)
+                               free(bitmap);
+               });
+               kh_destroy_oid_map(island_marks);
+       }
+
+       /* detect use-after-free with a an address which is never valid: */
+       island_marks = (void *)-1;
+}
+
 int compute_pack_layers(struct packing_data *to_pack)
 {
        uint32_t i;
index eb0f952629fc0a6cdcc113e19a04ddaa54bb32dd..8d1591ae28be302d2bb56fe05ad6c3465bf7668a 100644 (file)
@@ -14,5 +14,6 @@ void resolve_tree_islands(struct repository *r,
 void load_delta_islands(struct repository *r, int progress);
 void propagate_island_marks(struct commit *commit);
 int compute_pack_layers(struct packing_data *to_pack);
+void free_island_marks(void);
 
 #endif /* DELTA_ISLANDS_H */
index 8f2656989666b67a3281d29a83f73ff82a006a1d..998f517c48869836c4c634ef9f0c129cbe2d274a 100644 (file)
@@ -4,9 +4,11 @@
 #include "archive.h"
 #include "dir.h"
 #include "help.h"
+#include "hex.h"
 #include "strvec.h"
 #include "object-store.h"
 #include "packfile.h"
+#include "parse-options.h"
 
 struct archive_dir {
        const char *path;
@@ -43,7 +45,8 @@ int option_parse_diagnose(const struct option *opt, const char *arg, int unset)
        return error(_("invalid --%s value '%s'"), opt->long_name, arg);
 }
 
-static void dir_file_stats_objects(const char *full_path, size_t full_path_len,
+static void dir_file_stats_objects(const char *full_path,
+                                  size_t full_path_len UNUSED,
                                   const char *file_name, void *data)
 {
        struct strbuf *buf = data;
index 7a4951a7863bcea8ac37e2d40d656b794f9bc925..f525219ab0cf9b36249892c847e731b952b081af 100644 (file)
@@ -2,7 +2,8 @@
 #define DIAGNOSE_H
 
 #include "strbuf.h"
-#include "parse-options.h"
+
+struct option;
 
 enum diagnose_mode {
        DIAGNOSE_NONE,
index dec040c366c82a71bc57bad9cf9db865182efe20..70b3578b907b0cd69a18c24b6bf03f8cb8dcd8d2 100644 (file)
@@ -6,6 +6,7 @@
 #include "commit.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "revision.h"
 #include "cache-tree.h"
 #include "unpack-trees.h"
index 85cbefa5afd7c00e903232011ef3d2ff7aca4a8f..ec97616db1dfaa0673945bb08a9f364b2d570db1 100644 (file)
@@ -1,5 +1,7 @@
+#include "git-compat-util.h"
 #include "diff-merges.h"
 
+#include "gettext.h"
 #include "revision.h"
 
 typedef void (*diff_merges_setup_func_t)(struct rev_info *);
index 05fafd0019b6d5acc7295b999a8a46c92e1a649e..a3cf358baf0c1e24417c57094d80e3e3ce838808 100644 (file)
@@ -13,7 +13,6 @@
 #include "diffcore.h"
 #include "revision.h"
 #include "log-tree.h"
-#include "builtin.h"
 #include "parse-options.h"
 #include "string-list.h"
 #include "dir.h"
diff --git a/diff.c b/diff.c
index 329eebf16a0b100cb3de9afb530e4cac25fede4c..1617aa50a983fdfe2421566efdf192d2ce87fbb3 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2,12 +2,14 @@
  * Copyright (C) 2005 Junio C Hamano
  */
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "tempfile.h"
 #include "quote.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "delta.h"
+#include "hex.h"
 #include "xdiff-interface.h"
 #include "color.h"
 #include "attr.h"
@@ -3374,6 +3376,17 @@ void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const
                options->b_prefix = b;
 }
 
+void diff_set_noprefix(struct diff_options *options)
+{
+       options->a_prefix = options->b_prefix = "";
+}
+
+void diff_set_default_prefix(struct diff_options *options)
+{
+       options->a_prefix = "a/";
+       options->b_prefix = "b/";
+}
+
 struct userdiff_driver *get_textconv(struct repository *r,
                                     struct diff_filespec *one)
 {
@@ -3437,6 +3450,22 @@ static int diff_filepair_is_phoney(struct diff_filespec *one,
        return !DIFF_FILE_VALID(one) && !DIFF_FILE_VALID(two);
 }
 
+static int set_diff_algorithm(struct diff_options *opts,
+                             const char *alg)
+{
+       long value = parse_algorithm_value(alg);
+
+       if (value < 0)
+               return -1;
+
+       /* clear out previous settings */
+       DIFF_XDL_CLR(opts, NEED_MINIMAL);
+       opts->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
+       opts->xdl_opts |= value;
+
+       return 0;
+}
+
 static void builtin_diff(const char *name_a,
                         const char *name_b,
                         struct diff_filespec *one,
@@ -4440,15 +4469,13 @@ static void run_diff_cmd(const char *pgm,
        const char *xfrm_msg = NULL;
        int complete_rewrite = (p->status == DIFF_STATUS_MODIFIED) && p->score;
        int must_show_header = 0;
+       struct userdiff_driver *drv = NULL;
 
-
-       if (o->flags.allow_external) {
-               struct userdiff_driver *drv;
-
+       if (o->flags.allow_external || !o->ignore_driver_algorithm)
                drv = userdiff_find_by_path(o->repo->index, attr_path);
-               if (drv && drv->external)
-                       pgm = drv->external;
-       }
+
+       if (o->flags.allow_external && drv && drv->external)
+               pgm = drv->external;
 
        if (msg) {
                /*
@@ -4465,12 +4492,16 @@ static void run_diff_cmd(const char *pgm,
                run_external_diff(pgm, name, other, one, two, xfrm_msg, o);
                return;
        }
-       if (one && two)
+       if (one && two) {
+               if (!o->ignore_driver_algorithm && drv && drv->algorithm)
+                       set_diff_algorithm(o, drv->algorithm);
+
                builtin_diff(name, other ? other : name,
                             one, two, xfrm_msg, must_show_header,
                             o, complete_rewrite);
-       else
+       } else {
                fprintf(o->file, "* Unmerged path %s\n", name);
+       }
 }
 
 static void diff_fill_oid_info(struct diff_filespec *one, struct index_state *istate)
@@ -4567,6 +4598,14 @@ static void run_diffstat(struct diff_filepair *p, struct diff_options *o,
        const char *name;
        const char *other;
 
+       if (!o->ignore_driver_algorithm) {
+               struct userdiff_driver *drv = userdiff_find_by_path(o->repo->index,
+                                                                   p->one->path);
+
+               if (drv && drv->algorithm)
+                       set_diff_algorithm(o, drv->algorithm);
+       }
+
        if (DIFF_PAIR_UNMERGED(p)) {
                /* unmerged */
                builtin_diffstat(p->one->path, NULL, NULL, NULL,
@@ -4648,10 +4687,9 @@ void repo_diff_setup(struct repository *r, struct diff_options *options)
                options->flags.ignore_untracked_in_submodules = 1;
 
        if (diff_no_prefix) {
-               options->a_prefix = options->b_prefix = "";
+               diff_set_noprefix(options);
        } else if (!diff_mnemonic_prefix) {
-               options->a_prefix = "a/";
-               options->b_prefix = "b/";
+               diff_set_default_prefix(options);
        }
 
        options->color_moved = diff_color_moved_default;
@@ -5107,17 +5145,32 @@ static int diff_opt_diff_algorithm(const struct option *opt,
                                   const char *arg, int unset)
 {
        struct diff_options *options = opt->value;
-       long value = parse_algorithm_value(arg);
 
        BUG_ON_OPT_NEG(unset);
-       if (value < 0)
+
+       if (set_diff_algorithm(options, arg))
                return error(_("option diff-algorithm accepts \"myers\", "
                               "\"minimal\", \"patience\" and \"histogram\""));
 
-       /* clear out previous settings */
-       DIFF_XDL_CLR(options, NEED_MINIMAL);
-       options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
-       options->xdl_opts |= value;
+       options->ignore_driver_algorithm = 1;
+
+       return 0;
+}
+
+static int diff_opt_diff_algorithm_no_arg(const struct option *opt,
+                                  const char *arg, int unset)
+{
+       struct diff_options *options = opt->value;
+
+       BUG_ON_OPT_NEG(unset);
+       BUG_ON_OPT_ARG(arg);
+
+       if (set_diff_algorithm(options, opt->long_name))
+               BUG("available diff algorithms include \"myers\", "
+                              "\"minimal\", \"patience\" and \"histogram\"");
+
+       options->ignore_driver_algorithm = 1;
+
        return 0;
 }
 
@@ -5220,8 +5273,18 @@ static int diff_opt_no_prefix(const struct option *opt,
 
        BUG_ON_OPT_NEG(unset);
        BUG_ON_OPT_ARG(optarg);
-       options->a_prefix = "";
-       options->b_prefix = "";
+       diff_set_noprefix(options);
+       return 0;
+}
+
+static int diff_opt_default_prefix(const struct option *opt,
+                                  const char *optarg, int unset)
+{
+       struct diff_options *options = opt->value;
+
+       BUG_ON_OPT_NEG(unset);
+       BUG_ON_OPT_ARG(optarg);
+       diff_set_default_prefix(options);
        return 0;
 }
 
@@ -5250,7 +5313,6 @@ static int diff_opt_patience(const struct option *opt,
 
        BUG_ON_OPT_NEG(unset);
        BUG_ON_OPT_ARG(arg);
-       options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
        /*
         * Both --patience and --anchored use PATIENCE_DIFF
         * internally, so remove any anchors previously
@@ -5259,7 +5321,9 @@ static int diff_opt_patience(const struct option *opt,
        for (i = 0; i < options->anchors_nr; i++)
                free(options->anchors[i]);
        options->anchors_nr = 0;
-       return 0;
+       options->ignore_driver_algorithm = 1;
+
+       return set_diff_algorithm(options, "patience");
 }
 
 static int diff_opt_ignore_regex(const struct option *opt,
@@ -5513,6 +5577,9 @@ struct option *add_diff_options(const struct option *opts,
                OPT_CALLBACK_F(0, "no-prefix", options, NULL,
                               N_("do not show any source or destination prefix"),
                               PARSE_OPT_NONEG | PARSE_OPT_NOARG, diff_opt_no_prefix),
+               OPT_CALLBACK_F(0, "default-prefix", options, NULL,
+                              N_("use default prefixes a/ and b/"),
+                              PARSE_OPT_NONEG | PARSE_OPT_NOARG, diff_opt_default_prefix),
                OPT_INTEGER_F(0, "inter-hunk-context", &options->interhunkcontext,
                              N_("show context between diff hunks up to the specified number of lines"),
                              PARSE_OPT_NONEG),
@@ -5562,9 +5629,10 @@ struct option *add_diff_options(const struct option *opts,
                            N_("prevent rename/copy detection if the number of rename/copy targets exceeds given limit")),
 
                OPT_GROUP(N_("Diff algorithm options")),
-               OPT_BIT(0, "minimal", &options->xdl_opts,
-                       N_("produce the smallest possible diff"),
-                       XDF_NEED_MINIMAL),
+               OPT_CALLBACK_F(0, "minimal", options, NULL,
+                              N_("produce the smallest possible diff"),
+                              PARSE_OPT_NONEG | PARSE_OPT_NOARG,
+                              diff_opt_diff_algorithm_no_arg),
                OPT_BIT_F('w', "ignore-all-space", &options->xdl_opts,
                          N_("ignore whitespace when comparing lines"),
                          XDF_IGNORE_WHITESPACE, PARSE_OPT_NONEG),
@@ -5590,9 +5658,10 @@ struct option *add_diff_options(const struct option *opts,
                               N_("generate diff using the \"patience diff\" algorithm"),
                               PARSE_OPT_NONEG | PARSE_OPT_NOARG,
                               diff_opt_patience),
-               OPT_BITOP(0, "histogram", &options->xdl_opts,
-                         N_("generate diff using the \"histogram diff\" algorithm"),
-                         XDF_HISTOGRAM_DIFF, XDF_DIFF_ALGORITHM_MASK),
+               OPT_CALLBACK_F(0, "histogram", options, NULL,
+                              N_("generate diff using the \"histogram diff\" algorithm"),
+                              PARSE_OPT_NONEG | PARSE_OPT_NOARG,
+                              diff_opt_diff_algorithm_no_arg),
                OPT_CALLBACK_F(0, "diff-algorithm", options, N_("<algorithm>"),
                               N_("choose a diff algorithm"),
                               PARSE_OPT_NONEG, diff_opt_diff_algorithm),
diff --git a/diff.h b/diff.h
index 41eb2c3d428801130bc6ffe355cc723067689b85..09627f6e84a5bfc2a2030670bc3a35a86e68d269 100644 (file)
--- a/diff.h
+++ b/diff.h
@@ -6,8 +6,8 @@
 
 #include "tree-walk.h"
 #include "pathspec.h"
-#include "object.h"
 #include "oidset.h"
+#include "strbuf.h"
 
 /**
  * The diff API is for programs that compare two sets of files (e.g. two trees,
@@ -71,7 +71,6 @@ struct oid_array;
 struct option;
 struct repository;
 struct rev_info;
-struct strbuf;
 struct userdiff_driver;
 
 typedef int (*pathchange_fn_t)(struct diff_options *options,
@@ -333,6 +332,7 @@ struct diff_options {
        int prefix_length;
        const char *stat_sep;
        int xdl_opts;
+       int ignore_driver_algorithm;
 
        /* see Documentation/diff-options.txt */
        char **anchors;
@@ -496,6 +496,8 @@ void diff_tree_combined(const struct object_id *oid, const struct oid_array *par
 void diff_tree_combined_merge(const struct commit *commit, struct rev_info *rev);
 
 void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const char *b);
+void diff_set_noprefix(struct diff_options *options);
+void diff_set_default_prefix(struct diff_options *options);
 
 int diff_can_quit_early(struct diff_options *);
 
index 18d8f766d70108e868a5bb21ad6c45550bb8c34d..c30b56e983bda39e18eda24bb81608ae7a33942c 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "diff.h"
 #include "diffcore.h"
 
index 19e73311f9cd830da70428439b7b6a14d5345eec..57ccab284645693322301e59b07f6fceb62d6224 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * Copyright (C) 2005 Junio C Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
 #include "diff.h"
 #include "diffcore.h"
 
index 03fcbcb40ba6ab42037d1c429658ed48ee40982f..13c98a7b5e7751c8db6a9d78575a9b76e0313f92 100644 (file)
@@ -2,12 +2,12 @@
  * Copyright (C) 2005 Junio C Hamano
  * Copyright (C) 2010 Google Inc.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "xdiff-interface.h"
 #include "kwset.h"
-#include "commit.h"
+#include "pretty.h"
 #include "quote.h"
 
 typedef int (*pickaxe_fn)(mmfile_t *one, mmfile_t *two,
index c0422d9e709a65d5a77d1444fcff0a4d313299bd..7e9ff96d435819307071fd9ff5cf94a0892bb510 100644 (file)
@@ -2,14 +2,19 @@
  *
  * Copyright (C) 2005 Junio C Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "object-store.h"
 #include "hashmap.h"
+#include "mem-pool.h"
+#include "oid-array.h"
 #include "progress.h"
 #include "promisor-remote.h"
+#include "string-list.h"
 #include "strmap.h"
+#include "trace2.h"
 
 /* Table of rename/copy destinations */
 
index 445f060ab0010ede4009b92c3d4acb0b34f644b9..533986cf632d4231fd067b244e2776a256af8e3e 100644 (file)
@@ -2,7 +2,8 @@
  * Copyright (C) 2021, Google LLC.
  * Based on diffcore-order.c, which is Copyright (C) 2005, Junio C Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
 #include "diff.h"
 #include "diffcore.h"
 
index 9b588a1ee15a3bc93eaf4464f7d1e74265b2f3a2..1701ed50b9c823ffc5f06b299b92eafc7ea477a3 100644 (file)
@@ -4,9 +4,11 @@
 #ifndef DIFFCORE_H
 #define DIFFCORE_H
 
-#include "cache.h"
+#include "hash.h"
 
 struct diff_options;
+struct mem_pool;
+struct oid_array;
 struct repository;
 struct strintmap;
 struct strmap;
index b17e9f970a747a3ac85aae81a92c38d2a6491546..fb7c47f0e8a9516d17ded95d70e3dabaa61264bb 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "dir.h"
 #include "iterator.h"
 #include "dir-iterator.h"
@@ -112,10 +113,7 @@ static int prepare_next_entry_data(struct dir_iterator_int *iter,
        iter->base.basename = iter->base.path.buf +
                              iter->levels[iter->levels_nr - 1].prefix_len;
 
-       if (iter->flags & DIR_ITERATOR_FOLLOW_SYMLINKS)
-               err = stat(iter->base.path.buf, &iter->base.st);
-       else
-               err = lstat(iter->base.path.buf, &iter->base.st);
+       err = lstat(iter->base.path.buf, &iter->base.st);
 
        saved_errno = errno;
        if (err && errno != ENOENT)
@@ -203,7 +201,7 @@ struct dir_iterator *dir_iterator_begin(const char *path, unsigned int flags)
 {
        struct dir_iterator_int *iter = xcalloc(1, sizeof(*iter));
        struct dir_iterator *dir_iterator = &iter->base;
-       int saved_errno;
+       int saved_errno, err;
 
        strbuf_init(&iter->base.path, PATH_MAX);
        strbuf_addstr(&iter->base.path, path);
@@ -213,10 +211,12 @@ struct dir_iterator *dir_iterator_begin(const char *path, unsigned int flags)
        iter->flags = flags;
 
        /*
-        * Note: stat already checks for NULL or empty strings and
-        * inexistent paths.
+        * Note: lstat already checks for NULL or empty strings and
+        * nonexistent paths.
         */
-       if (stat(iter->base.path.buf, &iter->base.st) < 0) {
+       err = lstat(iter->base.path.buf, &iter->base.st);
+
+       if (err < 0) {
                saved_errno = errno;
                goto error_out;
        }
index 08229157c638040cb19f7dd32b680fbea45f3965..479e1ec784dfa4081430ea5a104302e79d10eae3 100644 (file)
  *   and ITER_ERROR is returned immediately. In both cases, a meaningful
  *   warning is emitted. Note: ENOENT errors are always ignored so that
  *   the API users may remove files during iteration.
- *
- * - DIR_ITERATOR_FOLLOW_SYMLINKS: make dir-iterator follow symlinks.
- *   i.e., linked directories' contents will be iterated over and
- *   iter->base.st will contain information on the referred files,
- *   not the symlinks themselves, which is the default behavior. Broken
- *   symlinks are ignored.
- *
- * Warning: circular symlinks are also followed when
- * DIR_ITERATOR_FOLLOW_SYMLINKS is set. The iteration may end up with
- * an ELOOP if they happen and DIR_ITERATOR_PEDANTIC is set.
  */
 #define DIR_ITERATOR_PEDANTIC (1 << 0)
-#define DIR_ITERATOR_FOLLOW_SYMLINKS (1 << 1)
 
 struct dir_iterator {
        /* The current path: */
@@ -83,9 +72,7 @@ struct dir_iterator {
        const char *basename;
 
        /*
-        * The result of calling lstat() on path; or stat(), if the
-        * DIR_ITERATOR_FOLLOW_SYMLINKS flag was set at
-        * dir_iterator's initialization.
+        * The result of calling lstat() on path.
         */
        struct stat st;
 };
diff --git a/dir.c b/dir.c
index 4e99f0c868f3d7955c4a6f84bf22bbce0d917ae3..d5bb199f4b43ea6ad8b8f404b2221ee3b1e30cce 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -5,7 +5,8 @@
  * Copyright (C) Linus Torvalds, 2005-2006
  *              Junio Hamano, 2005-2006
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "dir.h"
 #include "object-store.h"
@@ -1190,7 +1191,7 @@ struct pattern_list *add_pattern_list(struct dir_struct *dir,
        struct pattern_list *pl;
        struct exclude_list_group *group;
 
-       group = &dir->exclude_list_group[group_type];
+       group = &dir->internal.exclude_list_group[group_type];
        ALLOC_GROW(group->pl, group->nr + 1, group->alloc);
        pl = &group->pl[group->nr++];
        memset(pl, 0, sizeof(*pl));
@@ -1211,7 +1212,7 @@ static void add_patterns_from_file_1(struct dir_struct *dir, const char *fname,
         * differently when dir->untracked is non-NULL.
         */
        if (!dir->untracked)
-               dir->unmanaged_exclude_files++;
+               dir->internal.unmanaged_exclude_files++;
        pl = add_pattern_list(dir, EXC_FILE, fname);
        if (add_patterns(fname, "", 0, pl, NULL, 0, oid_stat) < 0)
                die(_("cannot use %s as an exclude file"), fname);
@@ -1219,7 +1220,7 @@ static void add_patterns_from_file_1(struct dir_struct *dir, const char *fname,
 
 void add_patterns_from_file(struct dir_struct *dir, const char *fname)
 {
-       dir->unmanaged_exclude_files++; /* see validate_untracked_cache() */
+       dir->internal.unmanaged_exclude_files++; /* see validate_untracked_cache() */
        add_patterns_from_file_1(dir, fname, NULL);
 }
 
@@ -1519,7 +1520,7 @@ static struct path_pattern *last_matching_pattern_from_lists(
        struct exclude_list_group *group;
        struct path_pattern *pattern;
        for (i = EXC_CMDL; i <= EXC_FILE; i++) {
-               group = &dir->exclude_list_group[i];
+               group = &dir->internal.exclude_list_group[i];
                for (j = group->nr - 1; j >= 0; j--) {
                        pattern = last_matching_pattern_from_list(
                                pathname, pathlen, basename, dtype_p,
@@ -1545,20 +1546,20 @@ static void prep_exclude(struct dir_struct *dir,
        struct untracked_cache_dir *untracked;
        int current;
 
-       group = &dir->exclude_list_group[EXC_DIRS];
+       group = &dir->internal.exclude_list_group[EXC_DIRS];
 
        /*
         * Pop the exclude lists from the EXCL_DIRS exclude_list_group
         * which originate from directories not in the prefix of the
         * path being checked.
         */
-       while ((stk = dir->exclude_stack) != NULL) {
+       while ((stk = dir->internal.exclude_stack) != NULL) {
                if (stk->baselen <= baselen &&
-                   !strncmp(dir->basebuf.buf, base, stk->baselen))
+                   !strncmp(dir->internal.basebuf.buf, base, stk->baselen))
                        break;
-               pl = &group->pl[dir->exclude_stack->exclude_ix];
-               dir->exclude_stack = stk->prev;
-               dir->pattern = NULL;
+               pl = &group->pl[dir->internal.exclude_stack->exclude_ix];
+               dir->internal.exclude_stack = stk->prev;
+               dir->internal.pattern = NULL;
                free((char *)pl->src); /* see strbuf_detach() below */
                clear_pattern_list(pl);
                free(stk);
@@ -1566,7 +1567,7 @@ static void prep_exclude(struct dir_struct *dir,
        }
 
        /* Skip traversing into sub directories if the parent is excluded */
-       if (dir->pattern)
+       if (dir->internal.pattern)
                return;
 
        /*
@@ -1574,12 +1575,12 @@ static void prep_exclude(struct dir_struct *dir,
         * memset(dir, 0, sizeof(*dir)) before use. Changing all of
         * them seems lots of work for little benefit.
         */
-       if (!dir->basebuf.buf)
-               strbuf_init(&dir->basebuf, PATH_MAX);
+       if (!dir->internal.basebuf.buf)
+               strbuf_init(&dir->internal.basebuf, PATH_MAX);
 
        /* Read from the parent directories and push them down. */
        current = stk ? stk->baselen : -1;
-       strbuf_setlen(&dir->basebuf, current < 0 ? 0 : current);
+       strbuf_setlen(&dir->internal.basebuf, current < 0 ? 0 : current);
        if (dir->untracked)
                untracked = stk ? stk->ucd : dir->untracked->root;
        else
@@ -1599,32 +1600,33 @@ static void prep_exclude(struct dir_struct *dir,
                                die("oops in prep_exclude");
                        cp++;
                        untracked =
-                               lookup_untracked(dir->untracked, untracked,
+                               lookup_untracked(dir->untracked,
+                                                untracked,
                                                 base + current,
                                                 cp - base - current);
                }
-               stk->prev = dir->exclude_stack;
+               stk->prev = dir->internal.exclude_stack;
                stk->baselen = cp - base;
                stk->exclude_ix = group->nr;
                stk->ucd = untracked;
                pl = add_pattern_list(dir, EXC_DIRS, NULL);
-               strbuf_add(&dir->basebuf, base + current, stk->baselen - current);
-               assert(stk->baselen == dir->basebuf.len);
+               strbuf_add(&dir->internal.basebuf, base + current, stk->baselen - current);
+               assert(stk->baselen == dir->internal.basebuf.len);
 
                /* Abort if the directory is excluded */
                if (stk->baselen) {
                        int dt = DT_DIR;
-                       dir->basebuf.buf[stk->baselen - 1] = 0;
-                       dir->pattern = last_matching_pattern_from_lists(dir,
+                       dir->internal.basebuf.buf[stk->baselen - 1] = 0;
+                       dir->internal.pattern = last_matching_pattern_from_lists(dir,
                                                                        istate,
-                               dir->basebuf.buf, stk->baselen - 1,
-                               dir->basebuf.buf + current, &dt);
-                       dir->basebuf.buf[stk->baselen - 1] = '/';
-                       if (dir->pattern &&
-                           dir->pattern->flags & PATTERN_FLAG_NEGATIVE)
-                               dir->pattern = NULL;
-                       if (dir->pattern) {
-                               dir->exclude_stack = stk;
+                               dir->internal.basebuf.buf, stk->baselen - 1,
+                               dir->internal.basebuf.buf + current, &dt);
+                       dir->internal.basebuf.buf[stk->baselen - 1] = '/';
+                       if (dir->internal.pattern &&
+                           dir->internal.pattern->flags & PATTERN_FLAG_NEGATIVE)
+                               dir->internal.pattern = NULL;
+                       if (dir->internal.pattern) {
+                               dir->internal.exclude_stack = stk;
                                return;
                        }
                }
@@ -1647,15 +1649,15 @@ static void prep_exclude(struct dir_struct *dir,
                      */
                     !is_null_oid(&untracked->exclude_oid))) {
                        /*
-                        * dir->basebuf gets reused by the traversal, but we
-                        * need fname to remain unchanged to ensure the src
-                        * member of each struct path_pattern correctly
+                        * dir->internal.basebuf gets reused by the traversal,
+                        * but we need fname to remain unchanged to ensure the
+                        * src member of each struct path_pattern correctly
                         * back-references its source file.  Other invocations
                         * of add_pattern_list provide stable strings, so we
                         * strbuf_detach() and free() here in the caller.
                         */
                        struct strbuf sb = STRBUF_INIT;
-                       strbuf_addbuf(&sb, &dir->basebuf);
+                       strbuf_addbuf(&sb, &dir->internal.basebuf);
                        strbuf_addstr(&sb, dir->exclude_per_dir);
                        pl->src = strbuf_detach(&sb, NULL);
                        add_patterns(pl->src, pl->src, stk->baselen, pl, istate,
@@ -1681,10 +1683,10 @@ static void prep_exclude(struct dir_struct *dir,
                        invalidate_gitignore(dir->untracked, untracked);
                        oidcpy(&untracked->exclude_oid, &oid_stat.oid);
                }
-               dir->exclude_stack = stk;
+               dir->internal.exclude_stack = stk;
                current = stk->baselen;
        }
-       strbuf_setlen(&dir->basebuf, baselen);
+       strbuf_setlen(&dir->internal.basebuf, baselen);
 }
 
 /*
@@ -1704,8 +1706,8 @@ struct path_pattern *last_matching_pattern(struct dir_struct *dir,
 
        prep_exclude(dir, istate, pathname, basename-pathname);
 
-       if (dir->pattern)
-               return dir->pattern;
+       if (dir->internal.pattern)
+               return dir->internal.pattern;
 
        return last_matching_pattern_from_lists(dir, istate, pathname, pathlen,
                        basename, dtype_p);
@@ -1742,7 +1744,7 @@ static struct dir_entry *dir_add_name(struct dir_struct *dir,
        if (index_file_exists(istate, pathname, len, ignore_case))
                return NULL;
 
-       ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
+       ALLOC_GROW(dir->entries, dir->nr+1, dir->internal.alloc);
        return dir->entries[dir->nr++] = dir_entry_new(pathname, len);
 }
 
@@ -1753,7 +1755,7 @@ struct dir_entry *dir_add_ignored(struct dir_struct *dir,
        if (!index_name_is_other(istate, pathname, len))
                return NULL;
 
-       ALLOC_GROW(dir->ignored, dir->ignored_nr+1, dir->ignored_alloc);
+       ALLOC_GROW(dir->ignored, dir->ignored_nr+1, dir->internal.ignored_alloc);
        return dir->ignored[dir->ignored_nr++] = dir_entry_new(pathname, len);
 }
 
@@ -2569,7 +2571,7 @@ static enum path_treatment read_directory_recursive(struct dir_struct *dir,
 
        if (open_cached_dir(&cdir, dir, untracked, istate, &path, check_only))
                goto out;
-       dir->visited_directories++;
+       dir->internal.visited_directories++;
 
        if (untracked)
                untracked->check_only = !!check_only;
@@ -2578,7 +2580,7 @@ static enum path_treatment read_directory_recursive(struct dir_struct *dir,
                /* check how the file or directory should be treated */
                state = treat_path(dir, untracked, &cdir, istate, &path,
                                   baselen, pathspec);
-               dir->visited_paths++;
+               dir->internal.visited_paths++;
 
                if (state > dir_state)
                        dir_state = state;
@@ -2586,7 +2588,8 @@ static enum path_treatment read_directory_recursive(struct dir_struct *dir,
                /* recurse into subdir if instructed by treat_path */
                if (state == path_recurse) {
                        struct untracked_cache_dir *ud;
-                       ud = lookup_untracked(dir->untracked, untracked,
+                       ud = lookup_untracked(dir->untracked,
+                                             untracked,
                                              path.buf + baselen,
                                              path.len - baselen);
                        subdir_state =
@@ -2846,7 +2849,7 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d
         * condition also catches running setup_standard_excludes()
         * before setting dir->untracked!
         */
-       if (dir->unmanaged_exclude_files)
+       if (dir->internal.unmanaged_exclude_files)
                return NULL;
 
        /*
@@ -2875,7 +2878,7 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d
         * EXC_CMDL is not considered in the cache. If people set it,
         * skip the cache.
         */
-       if (dir->exclude_list_group[EXC_CMDL].nr)
+       if (dir->internal.exclude_list_group[EXC_CMDL].nr)
                return NULL;
 
        if (!ident_in_untracked(dir->untracked)) {
@@ -2935,15 +2938,15 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d
 
        /* Validate $GIT_DIR/info/exclude and core.excludesfile */
        root = dir->untracked->root;
-       if (!oideq(&dir->ss_info_exclude.oid,
+       if (!oideq(&dir->internal.ss_info_exclude.oid,
                   &dir->untracked->ss_info_exclude.oid)) {
                invalidate_gitignore(dir->untracked, root);
-               dir->untracked->ss_info_exclude = dir->ss_info_exclude;
+               dir->untracked->ss_info_exclude = dir->internal.ss_info_exclude;
        }
-       if (!oideq(&dir->ss_excludes_file.oid,
+       if (!oideq(&dir->internal.ss_excludes_file.oid,
                   &dir->untracked->ss_excludes_file.oid)) {
                invalidate_gitignore(dir->untracked, root);
-               dir->untracked->ss_excludes_file = dir->ss_excludes_file;
+               dir->untracked->ss_excludes_file = dir->internal.ss_excludes_file;
        }
 
        /* Make sure this directory is not dropped out at saving phase */
@@ -2969,9 +2972,9 @@ static void emit_traversal_statistics(struct dir_struct *dir,
        }
 
        trace2_data_intmax("read_directory", repo,
-                          "directories-visited", dir->visited_directories);
+                          "directories-visited", dir->internal.visited_directories);
        trace2_data_intmax("read_directory", repo,
-                          "paths-visited", dir->visited_paths);
+                          "paths-visited", dir->internal.visited_paths);
 
        if (!dir->untracked)
                return;
@@ -2993,8 +2996,8 @@ int read_directory(struct dir_struct *dir, struct index_state *istate,
        struct untracked_cache_dir *untracked;
 
        trace2_region_enter("dir", "read_directory", istate->repo);
-       dir->visited_paths = 0;
-       dir->visited_directories = 0;
+       dir->internal.visited_paths = 0;
+       dir->internal.visited_directories = 0;
 
        if (has_symlink_leading_path(path, len)) {
                trace2_region_leave("dir", "read_directory", istate->repo);
@@ -3342,14 +3345,14 @@ void setup_standard_excludes(struct dir_struct *dir)
                excludes_file = xdg_config_home("ignore");
        if (excludes_file && !access_or_warn(excludes_file, R_OK, 0))
                add_patterns_from_file_1(dir, excludes_file,
-                                        dir->untracked ? &dir->ss_excludes_file : NULL);
+                                        dir->untracked ? &dir->internal.ss_excludes_file : NULL);
 
        /* per repository user preference */
        if (startup_info->have_repository) {
                const char *path = git_path_info_exclude();
                if (!access_or_warn(path, R_OK, 0))
                        add_patterns_from_file_1(dir, path,
-                                                dir->untracked ? &dir->ss_info_exclude : NULL);
+                                                dir->untracked ? &dir->internal.ss_info_exclude : NULL);
        }
 }
 
@@ -3405,7 +3408,7 @@ void dir_clear(struct dir_struct *dir)
        struct dir_struct new = DIR_INIT;
 
        for (i = EXC_CMDL; i <= EXC_FILE; i++) {
-               group = &dir->exclude_list_group[i];
+               group = &dir->internal.exclude_list_group[i];
                for (j = 0; j < group->nr; j++) {
                        pl = &group->pl[j];
                        if (i == EXC_DIRS)
@@ -3422,13 +3425,13 @@ void dir_clear(struct dir_struct *dir)
        free(dir->ignored);
        free(dir->entries);
 
-       stk = dir->exclude_stack;
+       stk = dir->internal.exclude_stack;
        while (stk) {
                struct exclude_stack *prev = stk->prev;
                free(stk);
                stk = prev;
        }
-       strbuf_release(&dir->basebuf);
+       strbuf_release(&dir->internal.basebuf);
 
        memcpy(dir, &new, sizeof(*dir));
 }
diff --git a/dir.h b/dir.h
index 8acfc044181ca2f47aa39bef25713b1a811e987c..3d6c87387e964311783bf749dafc450809b7d512 100644 (file)
--- a/dir.h
+++ b/dir.h
@@ -1,8 +1,9 @@
 #ifndef DIR_H
 #define DIR_H
 
-#include "cache.h"
 #include "hashmap.h"
+#include "pathspec.h"
+#include "statinfo.h"
 #include "strbuf.h"
 
 /**
@@ -212,17 +213,6 @@ struct untracked_cache {
  */
 struct dir_struct {
 
-       /* The number of members in `entries[]` array. */
-       int nr;
-
-       /* Internal use; keeps track of allocation of `entries[]` array.*/
-       int alloc;
-
-       /* The number of members in `ignored[]` array. */
-       int ignored_nr;
-
-       int ignored_alloc;
-
        /* bit-field of options */
        enum {
 
@@ -287,60 +277,81 @@ struct dir_struct {
                DIR_SKIP_NESTED_GIT = 1<<9
        } flags;
 
+       /* The number of members in `entries[]` array. */
+       int nr; /* output only */
+
+       /* The number of members in `ignored[]` array. */
+       int ignored_nr; /* output only */
+
        /* An array of `struct dir_entry`, each element of which describes a path. */
-       struct dir_entry **entries;
+       struct dir_entry **entries; /* output only */
 
        /**
         * used for ignored paths with the `DIR_SHOW_IGNORED_TOO` and
         * `DIR_COLLECT_IGNORED` flags.
         */
-       struct dir_entry **ignored;
+       struct dir_entry **ignored; /* output only */
+
+       /* Enable/update untracked file cache if set */
+       struct untracked_cache *untracked;
 
        /**
-        * The name of the file to be read in each directory for excluded files
-        * (typically `.gitignore`).
+        * Deprecated: ls-files is the only allowed caller; all other callers
+        * should leave this as NULL; it pre-dated the
+        * setup_standard_excludes() mechanism that replaces this.
+        *
+        * This field tracks the name of the file to be read in each directory
+        * for excluded files (typically `.gitignore`).
         */
        const char *exclude_per_dir;
 
-       /*
-        * We maintain three groups of exclude pattern lists:
-        *
-        * EXC_CMDL lists patterns explicitly given on the command line.
-        * EXC_DIRS lists patterns obtained from per-directory ignore files.
-        * EXC_FILE lists patterns from fallback ignore files, e.g.
-        *   - .git/info/exclude
-        *   - core.excludesfile
-        *
-        * Each group contains multiple exclude lists, a single list
-        * per source.
-        */
+       struct dir_struct_internal {
+               /* Keeps track of allocation of `entries[]` array.*/
+               int alloc;
+
+               /* Keeps track of allocation of `ignored[]` array. */
+               int ignored_alloc;
+
+               /*
+                * We maintain three groups of exclude pattern lists:
+                *
+                * EXC_CMDL lists patterns explicitly given on the command line.
+                * EXC_DIRS lists patterns obtained from per-directory ignore
+                *          files.
+                * EXC_FILE lists patterns from fallback ignore files, e.g.
+                *   - .git/info/exclude
+                *   - core.excludesfile
+                *
+                * Each group contains multiple exclude lists, a single list
+                * per source.
+                */
 #define EXC_CMDL 0
 #define EXC_DIRS 1
 #define EXC_FILE 2
-       struct exclude_list_group exclude_list_group[3];
-
-       /*
-        * Temporary variables which are used during loading of the
-        * per-directory exclude lists.
-        *
-        * exclude_stack points to the top of the exclude_stack, and
-        * basebuf contains the full path to the current
-        * (sub)directory in the traversal. Exclude points to the
-        * matching exclude struct if the directory is excluded.
-        */
-       struct exclude_stack *exclude_stack;
-       struct path_pattern *pattern;
-       struct strbuf basebuf;
+               struct exclude_list_group exclude_list_group[3];
 
-       /* Enable untracked file cache if set */
-       struct untracked_cache *untracked;
-       struct oid_stat ss_info_exclude;
-       struct oid_stat ss_excludes_file;
-       unsigned unmanaged_exclude_files;
-
-       /* Stats about the traversal */
-       unsigned visited_paths;
-       unsigned visited_directories;
+               /*
+                * Temporary variables which are used during loading of the
+                * per-directory exclude lists.
+                *
+                * exclude_stack points to the top of the exclude_stack, and
+                * basebuf contains the full path to the current
+                * (sub)directory in the traversal. Exclude points to the
+                * matching exclude struct if the directory is excluded.
+                */
+               struct exclude_stack *exclude_stack;
+               struct path_pattern *pattern;
+               struct strbuf basebuf;
+
+               /* Additional metadata related to 'untracked' */
+               struct oid_stat ss_info_exclude;
+               struct oid_stat ss_excludes_file;
+               unsigned unmanaged_exclude_files;
+
+               /* Stats about the traversal */
+               unsigned visited_paths;
+               unsigned visited_directories;
+       } internal;
 };
 
 #define DIR_INIT { 0 }
@@ -363,10 +374,6 @@ int count_slashes(const char *s);
 int simple_length(const char *match);
 int no_wildcard(const char *string);
 char *common_prefix(const struct pathspec *pathspec);
-int match_pathspec(struct index_state *istate,
-                  const struct pathspec *pathspec,
-                  const char *name, int namelen,
-                  int prefix, char *seen, int is_dir);
 int report_path_error(const char *ps_matched, const struct pathspec *pathspec);
 int within_depth(const char *name, int namelen, int depth, int max_depth);
 
@@ -533,15 +540,6 @@ int submodule_path_match(struct index_state *istate,
                         const char *submodule_name,
                         char *seen);
 
-static inline int ce_path_match(struct index_state *istate,
-                               const struct cache_entry *ce,
-                               const struct pathspec *pathspec,
-                               char *seen)
-{
-       return match_pathspec(istate, pathspec, ce->name, ce_namelen(ce), 0, seen,
-                             S_ISDIR(ce->ce_mode) || S_ISGITLINK(ce->ce_mode));
-}
-
 static inline int dir_path_match(struct index_state *istate,
                                 const struct dir_entry *ent,
                                 const struct pathspec *pathspec,
diff --git a/entry.c b/entry.c
index 971ab268714b96cdaa179ae7589c8377ff728e74..c97cfa833bbd253a6b0d5153ddacaa6cf66f3989 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -2,6 +2,7 @@
 #include "blob.h"
 #include "object-store.h"
 #include "dir.h"
+#include "hex.h"
 #include "streaming.h"
 #include "submodule.h"
 #include "progress.h"
diff --git a/entry.h b/entry.h
index 2d4fbb88c8ffabbd36faec0247d5a39a30f99c4f..7329f918a97ee3f80aeeaff07e4236143fcf3cbf 100644 (file)
--- a/entry.h
+++ b/entry.h
@@ -1,9 +1,11 @@
 #ifndef ENTRY_H
 #define ENTRY_H
 
-#include "cache.h"
 #include "convert.h"
 
+struct cache_entry;
+struct index_state;
+
 struct checkout {
        struct index_state *istate;
        const char *base_dir;
index 1ee3686fd8a34270db8d47738f2ea12fcdbc1976..89d89110e4190c8220c13469c3c72c1a5f6f8f6d 100644 (file)
@@ -17,6 +17,7 @@
 #include "commit.h"
 #include "strvec.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "tmp-objdir.h"
 #include "chdir-notify.h"
 #include "shallow.h"
index ac618641632f8c347b2a2900fb15b0de9ed8dd8a..12d6aa398e907f83eeaee9e9635ccbf11220ce35 100644 (file)
@@ -16,7 +16,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "ewok.h"
 
 #define EWAH_MASK(x) ((eword_t)1 << (x % BITS_IN_EWORD))
index 6fe48d3ae0449a0298deb109b967ef3479ef0c47..c6d4ffc87cacaaaefb3edf4f81f62f7481b4b742 100644 (file)
@@ -17,9 +17,9 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "git-compat-util.h"
+#include "alloc.h"
 #include "ewok.h"
 #include "ewok_rlw.h"
-#include "cache.h"
 
 static inline size_t min_size(size_t a, size_t b)
 {
index 04016d1e3250f28ae6cd53a784913f02879769d8..4ddabb4ec765ae3b29b72cd19394aea8f65fc8e4 100644 (file)
@@ -1,6 +1,8 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "repository.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "refs.h"
 #include "pkt-line.h"
@@ -722,7 +724,7 @@ static void filter_refs(struct fetch_pack_args *args,
        *refs = newlist;
 }
 
-static void mark_alternate_complete(struct fetch_negotiator *unused,
+static void mark_alternate_complete(struct fetch_negotiator *negotiator UNUSED,
                                    struct object *obj)
 {
        mark_complete(&obj->oid);
index f48f44f9cd1dbdd3aeafbe5a4bd3598e783d0e25..24cc44bdbc9070d699447e10fc3e03bd8b71965f 100644 (file)
@@ -1,8 +1,11 @@
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "refs.h"
 #include "object-store.h"
 #include "diff.h"
 #include "diff-merges.h"
+#include "hex.h"
 #include "revision.h"
 #include "tag.h"
 #include "string-list.h"
@@ -17,8 +20,6 @@ static struct string_list suppress_dest_patterns = STRING_LIST_INIT_DUP;
 
 int fmt_merge_msg_config(const char *key, const char *value, void *cb)
 {
-       int status = 0;
-
        if (!strcmp(key, "merge.log") || !strcmp(key, "merge.summary")) {
                int is_bool;
                merge_log_config = git_config_bool_or_int(key, value, &is_bool);
@@ -37,9 +38,6 @@ int fmt_merge_msg_config(const char *key, const char *value, void *cb)
                        string_list_append(&suppress_dest_patterns, value);
                suppress_dest_pattern_seen = 1;
        } else {
-               status = git_gpg_config(key, value, NULL);
-               if (status)
-                       return status;
                return git_default_config(key, value, cb);
        }
        return 0;
diff --git a/fsck.c b/fsck.c
index 2b18717ee805bc73aa50943731ac9a7212303d18..871c0a9a2522cdf1abd16ceef4d224d12fcb7d2e 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "object-store.h"
 #include "repository.h"
 #include "object.h"
diff --git a/fsck.h b/fsck.h
index 668330880ef65f72ba4e9d38487152cc28c205a1..e17730e9da94053f39f1610e8cd81ab80bbf8a9f 100644 (file)
--- a/fsck.h
+++ b/fsck.h
@@ -1,6 +1,7 @@
 #ifndef GIT_FSCK_H
 #define GIT_FSCK_H
 
+#include "object.h"
 #include "oidset.h"
 
 enum fsck_msg_type {
index 899bfe9c8138e1ae46f1fd0f0dfc7aebba05b81a..b62acf44aee2b9c029fac4389f6af7e4c4df6dab 100644 (file)
@@ -1,5 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
+#include "gettext.h"
 #include "repository.h"
 #include "fsmonitor-ipc.h"
 #include "fsmonitor-settings.h"
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
deleted file mode 100755 (executable)
index 95887fd..0000000
+++ /dev/null
@@ -1,1920 +0,0 @@
-#!/usr/bin/perl
-
-use 5.008;
-use strict;
-use warnings;
-use Git qw(unquote_path);
-use Git::I18N;
-
-binmode(STDOUT, ":raw");
-
-my $repo = Git->repository();
-
-my $menu_use_color = $repo->get_colorbool('color.interactive');
-my ($prompt_color, $header_color, $help_color) =
-       $menu_use_color ? (
-               $repo->get_color('color.interactive.prompt', 'bold blue'),
-               $repo->get_color('color.interactive.header', 'bold'),
-               $repo->get_color('color.interactive.help', 'red bold'),
-       ) : ();
-my $error_color = ();
-if ($menu_use_color) {
-       my $help_color_spec = ($repo->config('color.interactive.help') or
-                               'red bold');
-       $error_color = $repo->get_color('color.interactive.error',
-                                       $help_color_spec);
-}
-
-my $diff_use_color = $repo->get_colorbool('color.diff');
-my ($fraginfo_color) =
-       $diff_use_color ? (
-               $repo->get_color('color.diff.frag', 'cyan'),
-       ) : ();
-my ($diff_context_color) =
-       $diff_use_color ? (
-               $repo->get_color($repo->config('color.diff.context') ? 'color.diff.context' : 'color.diff.plain', ''),
-       ) : ();
-my ($diff_old_color) =
-       $diff_use_color ? (
-               $repo->get_color('color.diff.old', 'red'),
-       ) : ();
-my ($diff_new_color) =
-       $diff_use_color ? (
-               $repo->get_color('color.diff.new', 'green'),
-       ) : ();
-
-my $normal_color = $repo->get_color("", "reset");
-
-my $diff_algorithm = $repo->config('diff.algorithm');
-my $diff_filter = $repo->config('interactive.difffilter');
-
-my $use_readkey = 0;
-my $use_termcap = 0;
-my %term_escapes;
-
-sub ReadMode;
-sub ReadKey;
-if ($repo->config_bool("interactive.singlekey")) {
-       eval {
-               require Term::ReadKey;
-               Term::ReadKey->import;
-               $use_readkey = 1;
-       };
-       if (!$use_readkey) {
-               print STDERR "missing Term::ReadKey, disabling interactive.singlekey\n";
-       }
-       eval {
-               require Term::Cap;
-               my $termcap = Term::Cap->Tgetent;
-               foreach (values %$termcap) {
-                       $term_escapes{$_} = 1 if /^\e/;
-               }
-               $use_termcap = 1;
-       };
-}
-
-sub colored {
-       my $color = shift;
-       my $string = join("", @_);
-
-       if (defined $color) {
-               # Put a color code at the beginning of each line, a reset at the end
-               # color after newlines that are not at the end of the string
-               $string =~ s/(\n+)(.)/$1$color$2/g;
-               # reset before newlines
-               $string =~ s/(\n+)/$normal_color$1/g;
-               # codes at beginning and end (if necessary):
-               $string =~ s/^/$color/;
-               $string =~ s/$/$normal_color/ unless $string =~ /\n$/;
-       }
-       return $string;
-}
-
-# command line options
-my $patch_mode_only;
-my $patch_mode;
-my $patch_mode_revision;
-
-sub apply_patch;
-sub apply_patch_for_checkout_commit;
-sub apply_patch_for_stash;
-
-my %patch_modes = (
-       'stage' => {
-               DIFF => 'diff-files -p',
-               APPLY => sub { apply_patch 'apply --cached', @_; },
-               APPLY_CHECK => 'apply --cached',
-               FILTER => 'file-only',
-               IS_REVERSE => 0,
-       },
-       'stash' => {
-               DIFF => 'diff-index -p HEAD',
-               APPLY => sub { apply_patch 'apply --cached', @_; },
-               APPLY_CHECK => 'apply --cached',
-               FILTER => undef,
-               IS_REVERSE => 0,
-       },
-       'reset_head' => {
-               DIFF => 'diff-index -p --cached',
-               APPLY => sub { apply_patch 'apply -R --cached', @_; },
-               APPLY_CHECK => 'apply -R --cached',
-               FILTER => 'index-only',
-               IS_REVERSE => 1,
-       },
-       'reset_nothead' => {
-               DIFF => 'diff-index -R -p --cached',
-               APPLY => sub { apply_patch 'apply --cached', @_; },
-               APPLY_CHECK => 'apply --cached',
-               FILTER => 'index-only',
-               IS_REVERSE => 0,
-       },
-       'checkout_index' => {
-               DIFF => 'diff-files -p',
-               APPLY => sub { apply_patch 'apply -R', @_; },
-               APPLY_CHECK => 'apply -R',
-               FILTER => 'file-only',
-               IS_REVERSE => 1,
-       },
-       'checkout_head' => {
-               DIFF => 'diff-index -p',
-               APPLY => sub { apply_patch_for_checkout_commit '-R', @_ },
-               APPLY_CHECK => 'apply -R',
-               FILTER => undef,
-               IS_REVERSE => 1,
-       },
-       'checkout_nothead' => {
-               DIFF => 'diff-index -R -p',
-               APPLY => sub { apply_patch_for_checkout_commit '', @_ },
-               APPLY_CHECK => 'apply',
-               FILTER => undef,
-               IS_REVERSE => 0,
-       },
-       'worktree_head' => {
-               DIFF => 'diff-index -p',
-               APPLY => sub { apply_patch 'apply -R', @_ },
-               APPLY_CHECK => 'apply -R',
-               FILTER => undef,
-               IS_REVERSE => 1,
-       },
-       'worktree_nothead' => {
-               DIFF => 'diff-index -R -p',
-               APPLY => sub { apply_patch 'apply', @_ },
-               APPLY_CHECK => 'apply',
-               FILTER => undef,
-               IS_REVERSE => 0,
-       },
-);
-
-$patch_mode = 'stage';
-my %patch_mode_flavour = %{$patch_modes{$patch_mode}};
-
-sub run_cmd_pipe {
-       if ($^O eq 'MSWin32') {
-               my @invalid = grep {m/[":*]/} @_;
-               die "$^O does not support: @invalid\n" if @invalid;
-               my @args = map { m/ /o ? "\"$_\"": $_ } @_;
-               return qx{@args};
-       } else {
-               my $fh = undef;
-               open($fh, '-|', @_) or die;
-               my @out = <$fh>;
-               close $fh || die "Cannot close @_ ($!)";
-               return @out;
-       }
-}
-
-my ($GIT_DIR) = run_cmd_pipe(qw(git rev-parse --git-dir));
-
-if (!defined $GIT_DIR) {
-       exit(1); # rev-parse would have already said "not a git repo"
-}
-chomp($GIT_DIR);
-
-sub refresh {
-       my $fh;
-       open $fh, 'git update-index --refresh |'
-           or die;
-       while (<$fh>) {
-               ;# ignore 'needs update'
-       }
-       close $fh;
-}
-
-sub list_untracked {
-       map {
-               chomp $_;
-               unquote_path($_);
-       }
-       run_cmd_pipe(qw(git ls-files --others --exclude-standard --), @ARGV);
-}
-
-# TRANSLATORS: you can adjust this to align "git add -i" status menu
-my $status_fmt = __('%12s %12s %s');
-my $status_head = sprintf($status_fmt, __('staged'), __('unstaged'), __('path'));
-
-{
-       my $initial;
-       sub is_initial_commit {
-               $initial = system('git rev-parse HEAD -- >/dev/null 2>&1') != 0
-                       unless defined $initial;
-               return $initial;
-       }
-}
-
-{
-       my $empty_tree;
-       sub get_empty_tree {
-               return $empty_tree if defined $empty_tree;
-
-               ($empty_tree) = run_cmd_pipe(qw(git hash-object -t tree /dev/null));
-               chomp $empty_tree;
-               return $empty_tree;
-       }
-}
-
-sub get_diff_reference {
-       my $ref = shift;
-       if (defined $ref and $ref ne 'HEAD') {
-               return $ref;
-       } elsif (is_initial_commit()) {
-               return get_empty_tree();
-       } else {
-               return 'HEAD';
-       }
-}
-
-# Returns list of hashes, contents of each of which are:
-# VALUE:       pathname
-# BINARY:      is a binary path
-# INDEX:       is index different from HEAD?
-# FILE:                is file different from index?
-# INDEX_ADDDEL:        is it add/delete between HEAD and index?
-# FILE_ADDDEL: is it add/delete between index and file?
-# UNMERGED:    is the path unmerged
-
-sub list_modified {
-       my ($only) = @_;
-       my (%data, @return);
-       my ($add, $del, $adddel, $file);
-
-       my $reference = get_diff_reference($patch_mode_revision);
-       for (run_cmd_pipe(qw(git diff-index --cached
-                            --numstat --summary), $reference,
-                            '--', @ARGV)) {
-               if (($add, $del, $file) =
-                   /^([-\d]+)  ([-\d]+)        (.*)/) {
-                       my ($change, $bin);
-                       $file = unquote_path($file);
-                       if ($add eq '-' && $del eq '-') {
-                               $change = __('binary');
-                               $bin = 1;
-                       }
-                       else {
-                               $change = "+$add/-$del";
-                       }
-                       $data{$file} = {
-                               INDEX => $change,
-                               BINARY => $bin,
-                               FILE => __('nothing'),
-                       }
-               }
-               elsif (($adddel, $file) =
-                      /^ (create|delete) mode [0-7]+ (.*)$/) {
-                       $file = unquote_path($file);
-                       $data{$file}{INDEX_ADDDEL} = $adddel;
-               }
-       }
-
-       for (run_cmd_pipe(qw(git diff-files --ignore-submodules=dirty --numstat --summary --raw --), @ARGV)) {
-               if (($add, $del, $file) =
-                   /^([-\d]+)  ([-\d]+)        (.*)/) {
-                       $file = unquote_path($file);
-                       my ($change, $bin);
-                       if ($add eq '-' && $del eq '-') {
-                               $change = __('binary');
-                               $bin = 1;
-                       }
-                       else {
-                               $change = "+$add/-$del";
-                       }
-                       $data{$file}{FILE} = $change;
-                       if ($bin) {
-                               $data{$file}{BINARY} = 1;
-                       }
-               }
-               elsif (($adddel, $file) =
-                      /^ (create|delete) mode [0-7]+ (.*)$/) {
-                       $file = unquote_path($file);
-                       $data{$file}{FILE_ADDDEL} = $adddel;
-               }
-               elsif (/^:[0-7]+ [0-7]+ [0-9a-f]+ [0-9a-f]+ (.) (.*)$/) {
-                       $file = unquote_path($2);
-                       if (!exists $data{$file}) {
-                               $data{$file} = +{
-                                       INDEX => __('unchanged'),
-                                       BINARY => 0,
-                               };
-                       }
-                       if ($1 eq 'U') {
-                               $data{$file}{UNMERGED} = 1;
-                       }
-               }
-       }
-
-       for (sort keys %data) {
-               my $it = $data{$_};
-
-               if ($only) {
-                       if ($only eq 'index-only') {
-                               next if ($it->{INDEX} eq __('unchanged'));
-                       }
-                       if ($only eq 'file-only') {
-                               next if ($it->{FILE} eq __('nothing'));
-                       }
-               }
-               push @return, +{
-                       VALUE => $_,
-                       %$it,
-               };
-       }
-       return @return;
-}
-
-sub find_unique {
-       my ($string, @stuff) = @_;
-       my $found = undef;
-       for (my $i = 0; $i < @stuff; $i++) {
-               my $it = $stuff[$i];
-               my $hit = undef;
-               if (ref $it) {
-                       if ((ref $it) eq 'ARRAY') {
-                               $it = $it->[0];
-                       }
-                       else {
-                               $it = $it->{VALUE};
-                       }
-               }
-               eval {
-                       if ($it =~ /^$string/) {
-                               $hit = 1;
-                       };
-               };
-               if (defined $hit && defined $found) {
-                       return undef;
-               }
-               if ($hit) {
-                       $found = $i + 1;
-               }
-       }
-       return $found;
-}
-
-# inserts string into trie and updates count for each character
-sub update_trie {
-       my ($trie, $string) = @_;
-       foreach (split //, $string) {
-               $trie = $trie->{$_} ||= {COUNT => 0};
-               $trie->{COUNT}++;
-       }
-}
-
-# returns an array of tuples (prefix, remainder)
-sub find_unique_prefixes {
-       my @stuff = @_;
-       my @return = ();
-
-       # any single prefix exceeding the soft limit is omitted
-       # if any prefix exceeds the hard limit all are omitted
-       # 0 indicates no limit
-       my $soft_limit = 0;
-       my $hard_limit = 3;
-
-       # build a trie modelling all possible options
-       my %trie;
-       foreach my $print (@stuff) {
-               if ((ref $print) eq 'ARRAY') {
-                       $print = $print->[0];
-               }
-               elsif ((ref $print) eq 'HASH') {
-                       $print = $print->{VALUE};
-               }
-               update_trie(\%trie, $print);
-               push @return, $print;
-       }
-
-       # use the trie to find the unique prefixes
-       for (my $i = 0; $i < @return; $i++) {
-               my $ret = $return[$i];
-               my @letters = split //, $ret;
-               my %search = %trie;
-               my ($prefix, $remainder);
-               my $j;
-               for ($j = 0; $j < @letters; $j++) {
-                       my $letter = $letters[$j];
-                       if ($search{$letter}{COUNT} == 1) {
-                               $prefix = substr $ret, 0, $j + 1;
-                               $remainder = substr $ret, $j + 1;
-                               last;
-                       }
-                       else {
-                               my $prefix = substr $ret, 0, $j;
-                               return ()
-                                   if ($hard_limit && $j + 1 > $hard_limit);
-                       }
-                       %search = %{$search{$letter}};
-               }
-               if (ord($letters[0]) > 127 ||
-                   ($soft_limit && $j + 1 > $soft_limit)) {
-                       $prefix = undef;
-                       $remainder = $ret;
-               }
-               $return[$i] = [$prefix, $remainder];
-       }
-       return @return;
-}
-
-# filters out prefixes which have special meaning to list_and_choose()
-sub is_valid_prefix {
-       my $prefix = shift;
-       return (defined $prefix) &&
-           !($prefix =~ /[\s,]/) && # separators
-           !($prefix =~ /^-/) &&    # deselection
-           !($prefix =~ /^\d+/) &&  # selection
-           ($prefix ne '*') &&      # "all" wildcard
-           ($prefix ne '?');        # prompt help
-}
-
-# given a prefix/remainder tuple return a string with the prefix highlighted
-# for now use square brackets; later might use ANSI colors (underline, bold)
-sub highlight_prefix {
-       my $prefix = shift;
-       my $remainder = shift;
-
-       if (!defined $prefix) {
-               return $remainder;
-       }
-
-       if (!is_valid_prefix($prefix)) {
-               return "$prefix$remainder";
-       }
-
-       if (!$menu_use_color) {
-               return "[$prefix]$remainder";
-       }
-
-       return "$prompt_color$prefix$normal_color$remainder";
-}
-
-sub error_msg {
-       print STDERR colored $error_color, @_;
-}
-
-sub list_and_choose {
-       my ($opts, @stuff) = @_;
-       my (@chosen, @return);
-       if (!@stuff) {
-           return @return;
-       }
-       my $i;
-       my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY};
-
-      TOPLOOP:
-       while (1) {
-               my $last_lf = 0;
-
-               if ($opts->{HEADER}) {
-                       my $indent = $opts->{LIST_FLAT} ? "" : "     ";
-                       print colored $header_color, "$indent$opts->{HEADER}\n";
-               }
-               for ($i = 0; $i < @stuff; $i++) {
-                       my $chosen = $chosen[$i] ? '*' : ' ';
-                       my $print = $stuff[$i];
-                       my $ref = ref $print;
-                       my $highlighted = highlight_prefix(@{$prefixes[$i]})
-                           if @prefixes;
-                       if ($ref eq 'ARRAY') {
-                               $print = $highlighted || $print->[0];
-                       }
-                       elsif ($ref eq 'HASH') {
-                               my $value = $highlighted || $print->{VALUE};
-                               $print = sprintf($status_fmt,
-                                   $print->{INDEX},
-                                   $print->{FILE},
-                                   $value);
-                       }
-                       else {
-                               $print = $highlighted || $print;
-                       }
-                       printf("%s%2d: %s", $chosen, $i+1, $print);
-                       if (($opts->{LIST_FLAT}) &&
-                           (($i + 1) % ($opts->{LIST_FLAT}))) {
-                               print "\t";
-                               $last_lf = 0;
-                       }
-                       else {
-                               print "\n";
-                               $last_lf = 1;
-                       }
-               }
-               if (!$last_lf) {
-                       print "\n";
-               }
-
-               return if ($opts->{LIST_ONLY});
-
-               print colored $prompt_color, $opts->{PROMPT};
-               if ($opts->{SINGLETON}) {
-                       print "> ";
-               }
-               else {
-                       print ">> ";
-               }
-               my $line = <STDIN>;
-               if (!$line) {
-                       print "\n";
-                       $opts->{ON_EOF}->() if $opts->{ON_EOF};
-                       last;
-               }
-               chomp $line;
-               last if $line eq '';
-               if ($line eq '?') {
-                       $opts->{SINGLETON} ?
-                           singleton_prompt_help_cmd() :
-                           prompt_help_cmd();
-                       next TOPLOOP;
-               }
-               for my $choice (split(/[\s,]+/, $line)) {
-                       my $choose = 1;
-                       my ($bottom, $top);
-
-                       # Input that begins with '-'; unchoose
-                       if ($choice =~ s/^-//) {
-                               $choose = 0;
-                       }
-                       # A range can be specified like 5-7 or 5-.
-                       if ($choice =~ /^(\d+)-(\d*)$/) {
-                               ($bottom, $top) = ($1, length($2) ? $2 : 1 + @stuff);
-                       }
-                       elsif ($choice =~ /^\d+$/) {
-                               $bottom = $top = $choice;
-                       }
-                       elsif ($choice eq '*') {
-                               $bottom = 1;
-                               $top = 1 + @stuff;
-                       }
-                       else {
-                               $bottom = $top = find_unique($choice, @stuff);
-                               if (!defined $bottom) {
-                                       error_msg sprintf(__("Huh (%s)?\n"), $choice);
-                                       next TOPLOOP;
-                               }
-                       }
-                       if ($opts->{SINGLETON} && $bottom != $top) {
-                               error_msg sprintf(__("Huh (%s)?\n"), $choice);
-                               next TOPLOOP;
-                       }
-                       for ($i = $bottom-1; $i <= $top-1; $i++) {
-                               next if (@stuff <= $i || $i < 0);
-                               $chosen[$i] = $choose;
-                       }
-               }
-               last if ($opts->{IMMEDIATE} || $line eq '*');
-       }
-       for ($i = 0; $i < @stuff; $i++) {
-               if ($chosen[$i]) {
-                       push @return, $stuff[$i];
-               }
-       }
-       return @return;
-}
-
-sub singleton_prompt_help_cmd {
-       print colored $help_color, __ <<'EOF' ;
-Prompt help:
-1          - select a numbered item
-foo        - select item based on unique prefix
-           - (empty) select nothing
-EOF
-}
-
-sub prompt_help_cmd {
-       print colored $help_color, __ <<'EOF' ;
-Prompt help:
-1          - select a single item
-3-5        - select a range of items
-2-3,6-9    - select multiple ranges
-foo        - select item based on unique prefix
--...       - unselect specified items
-*          - choose all items
-           - (empty) finish selecting
-EOF
-}
-
-sub status_cmd {
-       list_and_choose({ LIST_ONLY => 1, HEADER => $status_head },
-                       list_modified());
-       print "\n";
-}
-
-sub say_n_paths {
-       my $did = shift @_;
-       my $cnt = scalar @_;
-       if ($did eq 'added') {
-               printf(__n("added %d path\n", "added %d paths\n",
-                          $cnt), $cnt);
-       } elsif ($did eq 'updated') {
-               printf(__n("updated %d path\n", "updated %d paths\n",
-                          $cnt), $cnt);
-       } elsif ($did eq 'reverted') {
-               printf(__n("reverted %d path\n", "reverted %d paths\n",
-                          $cnt), $cnt);
-       } else {
-               printf(__n("touched %d path\n", "touched %d paths\n",
-                          $cnt), $cnt);
-       }
-}
-
-sub update_cmd {
-       my @mods = list_modified('file-only');
-       return if (!@mods);
-
-       my @update = list_and_choose({ PROMPT => __('Update'),
-                                      HEADER => $status_head, },
-                                    @mods);
-       if (@update) {
-               system(qw(git update-index --add --remove --),
-                      map { $_->{VALUE} } @update);
-               say_n_paths('updated', @update);
-       }
-       print "\n";
-}
-
-sub revert_cmd {
-       my @update = list_and_choose({ PROMPT => __('Revert'),
-                                      HEADER => $status_head, },
-                                    list_modified());
-       if (@update) {
-               if (is_initial_commit()) {
-                       system(qw(git rm --cached),
-                               map { $_->{VALUE} } @update);
-               }
-               else {
-                       my @lines = run_cmd_pipe(qw(git ls-tree HEAD --),
-                                                map { $_->{VALUE} } @update);
-                       my $fh;
-                       open $fh, '| git update-index --index-info'
-                           or die;
-                       for (@lines) {
-                               print $fh $_;
-                       }
-                       close($fh);
-                       for (@update) {
-                               if ($_->{INDEX_ADDDEL} &&
-                                   $_->{INDEX_ADDDEL} eq 'create') {
-                                       system(qw(git update-index --force-remove --),
-                                              $_->{VALUE});
-                                       printf(__("note: %s is untracked now.\n"), $_->{VALUE});
-                               }
-                       }
-               }
-               refresh();
-               say_n_paths('reverted', @update);
-       }
-       print "\n";
-}
-
-sub add_untracked_cmd {
-       my @add = list_and_choose({ PROMPT => __('Add untracked') },
-                                 list_untracked());
-       if (@add) {
-               system(qw(git update-index --add --), @add);
-               say_n_paths('added', @add);
-       } else {
-               print __("No untracked files.\n");
-       }
-       print "\n";
-}
-
-sub run_git_apply {
-       my $cmd = shift;
-       my $fh;
-       open $fh, '| git ' . $cmd . " --allow-overlap";
-       print $fh @_;
-       return close $fh;
-}
-
-sub parse_diff {
-       my ($path) = @_;
-       my @diff_cmd = split(" ", $patch_mode_flavour{DIFF});
-       if (defined $diff_algorithm) {
-               splice @diff_cmd, 1, 0, "--diff-algorithm=${diff_algorithm}";
-       }
-       if (defined $patch_mode_revision) {
-               push @diff_cmd, get_diff_reference($patch_mode_revision);
-       }
-       my @diff = run_cmd_pipe("git", @diff_cmd, qw(--no-color --), $path);
-       my @colored = ();
-       if ($diff_use_color) {
-               my @display_cmd = ("git", @diff_cmd, qw(--color --), $path);
-               if (defined $diff_filter) {
-                       # quotemeta is overkill, but sufficient for shell-quoting
-                       my $diff = join(' ', map { quotemeta } @display_cmd);
-                       @display_cmd = ("$diff | $diff_filter");
-               }
-
-               @colored = run_cmd_pipe(@display_cmd);
-       }
-       my (@hunk) = { TEXT => [], DISPLAY => [], TYPE => 'header' };
-
-       if (@colored && @colored != @diff) {
-               print STDERR
-                 "fatal: mismatched output from interactive.diffFilter\n",
-                 "hint: Your filter must maintain a one-to-one correspondence\n",
-                 "hint: between its input and output lines.\n";
-               exit 1;
-       }
-
-       for (my $i = 0; $i < @diff; $i++) {
-               if ($diff[$i] =~ /^@@ /) {
-                       push @hunk, { TEXT => [], DISPLAY => [],
-                               TYPE => 'hunk' };
-               }
-               push @{$hunk[-1]{TEXT}}, $diff[$i];
-               push @{$hunk[-1]{DISPLAY}},
-                       (@colored ? $colored[$i] : $diff[$i]);
-       }
-       return @hunk;
-}
-
-sub parse_diff_header {
-       my $src = shift;
-
-       my $head = { TEXT => [], DISPLAY => [], TYPE => 'header' };
-       my $mode = { TEXT => [], DISPLAY => [], TYPE => 'mode' };
-       my $deletion = { TEXT => [], DISPLAY => [], TYPE => 'deletion' };
-       my $addition;
-
-       for (my $i = 0; $i < @{$src->{TEXT}}; $i++) {
-               if ($src->{TEXT}->[$i] =~ /^new file/) {
-                       $addition = 1;
-                       $head->{TYPE} = 'addition';
-               }
-               my $dest =
-                  $src->{TEXT}->[$i] =~ /^(old|new) mode (\d+)$/ ? $mode :
-                  $src->{TEXT}->[$i] =~ /^deleted file/ ? $deletion :
-                  $head;
-               push @{$dest->{TEXT}}, $src->{TEXT}->[$i];
-               push @{$dest->{DISPLAY}}, $src->{DISPLAY}->[$i];
-       }
-       return ($head, $mode, $deletion, $addition);
-}
-
-sub hunk_splittable {
-       my ($text) = @_;
-
-       my @s = split_hunk($text);
-       return (1 < @s);
-}
-
-sub parse_hunk_header {
-       my ($line) = @_;
-       my ($o_ofs, $o_cnt, $n_ofs, $n_cnt) =
-           $line =~ /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;
-       $o_cnt = 1 unless defined $o_cnt;
-       $n_cnt = 1 unless defined $n_cnt;
-       return ($o_ofs, $o_cnt, $n_ofs, $n_cnt);
-}
-
-sub format_hunk_header {
-       my ($o_ofs, $o_cnt, $n_ofs, $n_cnt) = @_;
-       return ("@@ -$o_ofs" .
-               (($o_cnt != 1) ? ",$o_cnt" : '') .
-               " +$n_ofs" .
-               (($n_cnt != 1) ? ",$n_cnt" : '') .
-               " @@\n");
-}
-
-sub split_hunk {
-       my ($text, $display) = @_;
-       my @split = ();
-       if (!defined $display) {
-               $display = $text;
-       }
-       # If there are context lines in the middle of a hunk,
-       # it can be split, but we would need to take care of
-       # overlaps later.
-
-       my ($o_ofs, undef, $n_ofs) = parse_hunk_header($text->[0]);
-       my $hunk_start = 1;
-
-      OUTER:
-       while (1) {
-               my $next_hunk_start = undef;
-               my $i = $hunk_start - 1;
-               my $this = +{
-                       TEXT => [],
-                       DISPLAY => [],
-                       TYPE => 'hunk',
-                       OLD => $o_ofs,
-                       NEW => $n_ofs,
-                       OCNT => 0,
-                       NCNT => 0,
-                       ADDDEL => 0,
-                       POSTCTX => 0,
-                       USE => undef,
-               };
-
-               while (++$i < @$text) {
-                       my $line = $text->[$i];
-                       my $display = $display->[$i];
-                       if ($line =~ /^\\/) {
-                               push @{$this->{TEXT}}, $line;
-                               push @{$this->{DISPLAY}}, $display;
-                               next;
-                       }
-                       if ($line =~ /^ /) {
-                               if ($this->{ADDDEL} &&
-                                   !defined $next_hunk_start) {
-                                       # We have seen leading context and
-                                       # adds/dels and then here is another
-                                       # context, which is trailing for this
-                                       # split hunk and leading for the next
-                                       # one.
-                                       $next_hunk_start = $i;
-                               }
-                               push @{$this->{TEXT}}, $line;
-                               push @{$this->{DISPLAY}}, $display;
-                               $this->{OCNT}++;
-                               $this->{NCNT}++;
-                               if (defined $next_hunk_start) {
-                                       $this->{POSTCTX}++;
-                               }
-                               next;
-                       }
-
-                       # add/del
-                       if (defined $next_hunk_start) {
-                               # We are done with the current hunk and
-                               # this is the first real change for the
-                               # next split one.
-                               $hunk_start = $next_hunk_start;
-                               $o_ofs = $this->{OLD} + $this->{OCNT};
-                               $n_ofs = $this->{NEW} + $this->{NCNT};
-                               $o_ofs -= $this->{POSTCTX};
-                               $n_ofs -= $this->{POSTCTX};
-                               push @split, $this;
-                               redo OUTER;
-                       }
-                       push @{$this->{TEXT}}, $line;
-                       push @{$this->{DISPLAY}}, $display;
-                       $this->{ADDDEL}++;
-                       if ($line =~ /^-/) {
-                               $this->{OCNT}++;
-                       }
-                       else {
-                               $this->{NCNT}++;
-                       }
-               }
-
-               push @split, $this;
-               last;
-       }
-
-       for my $hunk (@split) {
-               $o_ofs = $hunk->{OLD};
-               $n_ofs = $hunk->{NEW};
-               my $o_cnt = $hunk->{OCNT};
-               my $n_cnt = $hunk->{NCNT};
-
-               my $head = format_hunk_header($o_ofs, $o_cnt, $n_ofs, $n_cnt);
-               my $display_head = $head;
-               unshift @{$hunk->{TEXT}}, $head;
-               if ($diff_use_color) {
-                       $display_head = colored($fraginfo_color, $head);
-               }
-               unshift @{$hunk->{DISPLAY}}, $display_head;
-       }
-       return @split;
-}
-
-sub find_last_o_ctx {
-       my ($it) = @_;
-       my $text = $it->{TEXT};
-       my ($o_ofs, $o_cnt) = parse_hunk_header($text->[0]);
-       my $i = @{$text};
-       my $last_o_ctx = $o_ofs + $o_cnt;
-       while (0 < --$i) {
-               my $line = $text->[$i];
-               if ($line =~ /^ /) {
-                       $last_o_ctx--;
-                       next;
-               }
-               last;
-       }
-       return $last_o_ctx;
-}
-
-sub merge_hunk {
-       my ($prev, $this) = @_;
-       my ($o0_ofs, $o0_cnt, $n0_ofs, $n0_cnt) =
-           parse_hunk_header($prev->{TEXT}[0]);
-       my ($o1_ofs, $o1_cnt, $n1_ofs, $n1_cnt) =
-           parse_hunk_header($this->{TEXT}[0]);
-
-       my (@line, $i, $ofs, $o_cnt, $n_cnt);
-       $ofs = $o0_ofs;
-       $o_cnt = $n_cnt = 0;
-       for ($i = 1; $i < @{$prev->{TEXT}}; $i++) {
-               my $line = $prev->{TEXT}[$i];
-               if ($line =~ /^\+/) {
-                       $n_cnt++;
-                       push @line, $line;
-                       next;
-               } elsif ($line =~ /^\\/) {
-                       push @line, $line;
-                       next;
-               }
-
-               last if ($o1_ofs <= $ofs);
-
-               $o_cnt++;
-               $ofs++;
-               if ($line =~ /^ /) {
-                       $n_cnt++;
-               }
-               push @line, $line;
-       }
-
-       for ($i = 1; $i < @{$this->{TEXT}}; $i++) {
-               my $line = $this->{TEXT}[$i];
-               if ($line =~ /^\+/) {
-                       $n_cnt++;
-                       push @line, $line;
-                       next;
-               } elsif ($line =~ /^\\/) {
-                       push @line, $line;
-                       next;
-               }
-               $ofs++;
-               $o_cnt++;
-               if ($line =~ /^ /) {
-                       $n_cnt++;
-               }
-               push @line, $line;
-       }
-       my $head = format_hunk_header($o0_ofs, $o_cnt, $n0_ofs, $n_cnt);
-       @{$prev->{TEXT}} = ($head, @line);
-}
-
-sub coalesce_overlapping_hunks {
-       my (@in) = @_;
-       my @out = ();
-
-       my ($last_o_ctx, $last_was_dirty);
-       my $ofs_delta = 0;
-
-       for (@in) {
-               if ($_->{TYPE} ne 'hunk') {
-                       push @out, $_;
-                       next;
-               }
-               my $text = $_->{TEXT};
-               my ($o_ofs, $o_cnt, $n_ofs, $n_cnt) =
-                                               parse_hunk_header($text->[0]);
-               unless ($_->{USE}) {
-                       $ofs_delta += $o_cnt - $n_cnt;
-                       # If this hunk has been edited then subtract
-                       # the delta that is due to the edit.
-                       if ($_->{OFS_DELTA}) {
-                               $ofs_delta -= $_->{OFS_DELTA};
-                       }
-                       next;
-               }
-               if ($ofs_delta) {
-                       if ($patch_mode_flavour{IS_REVERSE}) {
-                               $o_ofs -= $ofs_delta;
-                       } else {
-                               $n_ofs += $ofs_delta;
-                       }
-                       $_->{TEXT}->[0] = format_hunk_header($o_ofs, $o_cnt,
-                                                            $n_ofs, $n_cnt);
-               }
-               # If this hunk was edited then adjust the offset delta
-               # to reflect the edit.
-               if ($_->{OFS_DELTA}) {
-                       $ofs_delta += $_->{OFS_DELTA};
-               }
-               if (defined $last_o_ctx &&
-                   $o_ofs <= $last_o_ctx &&
-                   !$_->{DIRTY} &&
-                   !$last_was_dirty) {
-                       merge_hunk($out[-1], $_);
-               }
-               else {
-                       push @out, $_;
-               }
-               $last_o_ctx = find_last_o_ctx($out[-1]);
-               $last_was_dirty = $_->{DIRTY};
-       }
-       return @out;
-}
-
-sub reassemble_patch {
-       my $head = shift;
-       my @patch;
-
-       # Include everything in the header except the beginning of the diff.
-       push @patch, (grep { !/^[-+]{3}/ } @$head);
-
-       # Then include any headers from the hunk lines, which must
-       # come before any actual hunk.
-       while (@_ && $_[0] !~ /^@/) {
-               push @patch, shift;
-       }
-
-       # Then begin the diff.
-       push @patch, grep { /^[-+]{3}/ } @$head;
-
-       # And then the actual hunks.
-       push @patch, @_;
-
-       return @patch;
-}
-
-sub color_diff {
-       return map {
-               colored((/^@/  ? $fraginfo_color :
-                        /^\+/ ? $diff_new_color :
-                        /^-/  ? $diff_old_color :
-                        $diff_context_color),
-                       $_);
-       } @_;
-}
-
-my %edit_hunk_manually_modes = (
-       stage => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for staging."),
-       stash => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for stashing."),
-       reset_head => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for unstaging."),
-       reset_nothead => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for applying."),
-       checkout_index => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for discarding."),
-       checkout_head => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for discarding."),
-       checkout_nothead => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for applying."),
-       worktree_head => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for discarding."),
-       worktree_nothead => N__(
-"If the patch applies cleanly, the edited hunk will immediately be
-marked for applying."),
-);
-
-sub recount_edited_hunk {
-       local $_;
-       my ($oldtext, $newtext) = @_;
-       my ($o_cnt, $n_cnt) = (0, 0);
-       for (@{$newtext}[1..$#{$newtext}]) {
-               my $mode = substr($_, 0, 1);
-               if ($mode eq '-') {
-                       $o_cnt++;
-               } elsif ($mode eq '+') {
-                       $n_cnt++;
-               } elsif ($mode eq ' ' or $mode eq "\n") {
-                       $o_cnt++;
-                       $n_cnt++;
-               }
-       }
-       my ($o_ofs, undef, $n_ofs, undef) =
-                                       parse_hunk_header($newtext->[0]);
-       $newtext->[0] = format_hunk_header($o_ofs, $o_cnt, $n_ofs, $n_cnt);
-       my (undef, $orig_o_cnt, undef, $orig_n_cnt) =
-                                       parse_hunk_header($oldtext->[0]);
-       # Return the change in the number of lines inserted by this hunk
-       return $orig_o_cnt - $orig_n_cnt - $o_cnt + $n_cnt;
-}
-
-sub edit_hunk_manually {
-       my ($oldtext) = @_;
-
-       my $hunkfile = $repo->repo_path . "/addp-hunk-edit.diff";
-       my $fh;
-       open $fh, '>', $hunkfile
-               or die sprintf(__("failed to open hunk edit file for writing: %s"), $!);
-       print $fh Git::comment_lines __("Manual hunk edit mode -- see bottom for a quick guide.\n");
-       print $fh @$oldtext;
-       my $is_reverse = $patch_mode_flavour{IS_REVERSE};
-       my ($remove_plus, $remove_minus) = $is_reverse ? ('-', '+') : ('+', '-');
-       my $comment_line_char = Git::get_comment_line_char;
-       print $fh Git::comment_lines sprintf(__ <<EOF, $remove_minus, $remove_plus, $comment_line_char),
----
-To remove '%s' lines, make them ' ' lines (context).
-To remove '%s' lines, delete them.
-Lines starting with %s will be removed.
-EOF
-__($edit_hunk_manually_modes{$patch_mode}),
-# TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
-__ <<EOF2 ;
-If it does not apply cleanly, you will be given an opportunity to
-edit again.  If all lines of the hunk are removed, then the edit is
-aborted and the hunk is left unchanged.
-EOF2
-       close $fh;
-
-       chomp(my ($editor) = run_cmd_pipe(qw(git var GIT_EDITOR)));
-       system('sh', '-c', $editor.' "$@"', $editor, $hunkfile);
-
-       if ($? != 0) {
-               return undef;
-       }
-
-       open $fh, '<', $hunkfile
-               or die sprintf(__("failed to open hunk edit file for reading: %s"), $!);
-       my @newtext = grep { !/^\Q$comment_line_char\E/ } <$fh>;
-       close $fh;
-       unlink $hunkfile;
-
-       # Abort if nothing remains
-       if (!grep { /\S/ } @newtext) {
-               return undef;
-       }
-
-       # Reinsert the first hunk header if the user accidentally deleted it
-       if ($newtext[0] !~ /^@/) {
-               unshift @newtext, $oldtext->[0];
-       }
-       return \@newtext;
-}
-
-sub diff_applies {
-       return run_git_apply($patch_mode_flavour{APPLY_CHECK} . ' --check',
-                            map { @{$_->{TEXT}} } @_);
-}
-
-sub _restore_terminal_and_die {
-       ReadMode 'restore';
-       print "\n";
-       exit 1;
-}
-
-sub prompt_single_character {
-       if ($use_readkey) {
-               local $SIG{TERM} = \&_restore_terminal_and_die;
-               local $SIG{INT} = \&_restore_terminal_and_die;
-               ReadMode 'cbreak';
-               my $key = ReadKey 0;
-               ReadMode 'restore';
-               if (defined $key) {
-                       if ($use_termcap and $key eq "\e") {
-                               while (!defined $term_escapes{$key}) {
-                                       my $next = ReadKey 0.5;
-                                       last if (!defined $next);
-                                       $key .= $next;
-                               }
-                               $key =~ s/\e/^[/;
-                       }
-                       print "$key";
-               }
-               print "\n";
-               return $key;
-       } else {
-               return <STDIN>;
-       }
-}
-
-sub prompt_yesno {
-       my ($prompt) = @_;
-       while (1) {
-               print colored $prompt_color, $prompt;
-               my $line = prompt_single_character;
-               return undef unless defined $line;
-               return 0 if $line =~ /^n/i;
-               return 1 if $line =~ /^y/i;
-       }
-}
-
-sub edit_hunk_loop {
-       my ($head, $hunks, $ix) = @_;
-       my $hunk = $hunks->[$ix];
-       my $text = $hunk->{TEXT};
-
-       while (1) {
-               my $newtext = edit_hunk_manually($text);
-               if (!defined $newtext) {
-                       return undef;
-               }
-               my $newhunk = {
-                       TEXT => $newtext,
-                       TYPE => $hunk->{TYPE},
-                       USE => 1,
-                       DIRTY => 1,
-               };
-               $newhunk->{OFS_DELTA} = recount_edited_hunk($text, $newtext);
-               # If this hunk has already been edited then add the
-               # offset delta of the previous edit to get the real
-               # delta from the original unedited hunk.
-               $hunk->{OFS_DELTA} and
-                               $newhunk->{OFS_DELTA} += $hunk->{OFS_DELTA};
-               if (diff_applies($head,
-                                @{$hunks}[0..$ix-1],
-                                $newhunk,
-                                @{$hunks}[$ix+1..$#{$hunks}])) {
-                       $newhunk->{DISPLAY} = [color_diff(@{$newtext})];
-                       return $newhunk;
-               }
-               else {
-                       prompt_yesno(
-                               # TRANSLATORS: do not translate [y/n]
-                               # The program will only accept that input
-                               # at this point.
-                               # Consider translating (saying "no" discards!) as
-                               # (saying "n" for "no" discards!) if the translation
-                               # of the word "no" does not start with n.
-                               __('Your edited hunk does not apply. Edit again '
-                                  . '(saying "no" discards!) [y/n]? ')
-                               ) or return undef;
-               }
-       }
-}
-
-my %help_patch_modes = (
-       stage => N__(
-"y - stage this hunk
-n - do not stage this hunk
-q - quit; do not stage this hunk or any of the remaining ones
-a - stage this hunk and all later hunks in the file
-d - do not stage this hunk or any of the later hunks in the file"),
-       stash => N__(
-"y - stash this hunk
-n - do not stash this hunk
-q - quit; do not stash this hunk or any of the remaining ones
-a - stash this hunk and all later hunks in the file
-d - do not stash this hunk or any of the later hunks in the file"),
-       reset_head => N__(
-"y - unstage this hunk
-n - do not unstage this hunk
-q - quit; do not unstage this hunk or any of the remaining ones
-a - unstage this hunk and all later hunks in the file
-d - do not unstage this hunk or any of the later hunks in the file"),
-       reset_nothead => N__(
-"y - apply this hunk to index
-n - do not apply this hunk to index
-q - quit; do not apply this hunk or any of the remaining ones
-a - apply this hunk and all later hunks in the file
-d - do not apply this hunk or any of the later hunks in the file"),
-       checkout_index => N__(
-"y - discard this hunk from worktree
-n - do not discard this hunk from worktree
-q - quit; do not discard this hunk or any of the remaining ones
-a - discard this hunk and all later hunks in the file
-d - do not discard this hunk or any of the later hunks in the file"),
-       checkout_head => N__(
-"y - discard this hunk from index and worktree
-n - do not discard this hunk from index and worktree
-q - quit; do not discard this hunk or any of the remaining ones
-a - discard this hunk and all later hunks in the file
-d - do not discard this hunk or any of the later hunks in the file"),
-       checkout_nothead => N__(
-"y - apply this hunk to index and worktree
-n - do not apply this hunk to index and worktree
-q - quit; do not apply this hunk or any of the remaining ones
-a - apply this hunk and all later hunks in the file
-d - do not apply this hunk or any of the later hunks in the file"),
-       worktree_head => N__(
-"y - discard this hunk from worktree
-n - do not discard this hunk from worktree
-q - quit; do not discard this hunk or any of the remaining ones
-a - discard this hunk and all later hunks in the file
-d - do not discard this hunk or any of the later hunks in the file"),
-       worktree_nothead => N__(
-"y - apply this hunk to worktree
-n - do not apply this hunk to worktree
-q - quit; do not apply this hunk or any of the remaining ones
-a - apply this hunk and all later hunks in the file
-d - do not apply this hunk or any of the later hunks in the file"),
-);
-
-sub help_patch_cmd {
-       local $_;
-       my $other = $_[0] . ",?";
-       print colored $help_color, __($help_patch_modes{$patch_mode}), "\n",
-               map { "$_\n" } grep {
-                       my $c = quotemeta(substr($_, 0, 1));
-                       $other =~ /,$c/
-               } split "\n", __ <<EOF ;
-g - select a hunk to go to
-/ - search for a hunk matching the given regex
-j - leave this hunk undecided, see next undecided hunk
-J - leave this hunk undecided, see next hunk
-k - leave this hunk undecided, see previous undecided hunk
-K - leave this hunk undecided, see previous hunk
-s - split the current hunk into smaller hunks
-e - manually edit the current hunk
-? - print help
-EOF
-}
-
-sub apply_patch {
-       my $cmd = shift;
-       my $ret = run_git_apply $cmd, @_;
-       if (!$ret) {
-               print STDERR @_;
-       }
-       return $ret;
-}
-
-sub apply_patch_for_checkout_commit {
-       my $reverse = shift;
-       my $applies_index = run_git_apply 'apply '.$reverse.' --cached --check', @_;
-       my $applies_worktree = run_git_apply 'apply '.$reverse.' --check', @_;
-
-       if ($applies_worktree && $applies_index) {
-               run_git_apply 'apply '.$reverse.' --cached', @_;
-               run_git_apply 'apply '.$reverse, @_;
-               return 1;
-       } elsif (!$applies_index) {
-               print colored $error_color, __("The selected hunks do not apply to the index!\n");
-               if (prompt_yesno __("Apply them to the worktree anyway? ")) {
-                       return run_git_apply 'apply '.$reverse, @_;
-               } else {
-                       print colored $error_color, __("Nothing was applied.\n");
-                       return 0;
-               }
-       } else {
-               print STDERR @_;
-               return 0;
-       }
-}
-
-sub patch_update_cmd {
-       my @all_mods = list_modified($patch_mode_flavour{FILTER});
-       error_msg sprintf(__("ignoring unmerged: %s\n"), $_->{VALUE})
-               for grep { $_->{UNMERGED} } @all_mods;
-       @all_mods = grep { !$_->{UNMERGED} } @all_mods;
-
-       my @mods = grep { !($_->{BINARY}) } @all_mods;
-       my @them;
-
-       if (!@mods) {
-               if (@all_mods) {
-                       print STDERR __("Only binary files changed.\n");
-               } else {
-                       print STDERR __("No changes.\n");
-               }
-               return 0;
-       }
-       if ($patch_mode_only) {
-               @them = @mods;
-       }
-       else {
-               @them = list_and_choose({ PROMPT => __('Patch update'),
-                                         HEADER => $status_head, },
-                                       @mods);
-       }
-       for (@them) {
-               return 0 if patch_update_file($_->{VALUE});
-       }
-}
-
-# Generate a one line summary of a hunk.
-sub summarize_hunk {
-       my $rhunk = shift;
-       my $summary = $rhunk->{TEXT}[0];
-
-       # Keep the line numbers, discard extra context.
-       $summary =~ s/@@(.*?)@@.*/$1 /s;
-       $summary .= " " x (20 - length $summary);
-
-       # Add some user context.
-       for my $line (@{$rhunk->{TEXT}}) {
-               if ($line =~ m/^[+-].*\w/) {
-                       $summary .= $line;
-                       last;
-               }
-       }
-
-       chomp $summary;
-       return substr($summary, 0, 80) . "\n";
-}
-
-
-# Print a one-line summary of each hunk in the array ref in
-# the first argument, starting with the index in the 2nd.
-sub display_hunks {
-       my ($hunks, $i) = @_;
-       my $ctr = 0;
-       $i ||= 0;
-       for (; $i < @$hunks && $ctr < 20; $i++, $ctr++) {
-               my $status = " ";
-               if (defined $hunks->[$i]{USE}) {
-                       $status = $hunks->[$i]{USE} ? "+" : "-";
-               }
-               printf "%s%2d: %s",
-                       $status,
-                       $i + 1,
-                       summarize_hunk($hunks->[$i]);
-       }
-       return $i;
-}
-
-my %patch_update_prompt_modes = (
-       stage => {
-               mode => N__("Stage mode change [y,n,q,a,d%s,?]? "),
-               deletion => N__("Stage deletion [y,n,q,a,d%s,?]? "),
-               addition => N__("Stage addition [y,n,q,a,d%s,?]? "),
-               hunk => N__("Stage this hunk [y,n,q,a,d%s,?]? "),
-       },
-       stash => {
-               mode => N__("Stash mode change [y,n,q,a,d%s,?]? "),
-               deletion => N__("Stash deletion [y,n,q,a,d%s,?]? "),
-               addition => N__("Stash addition [y,n,q,a,d%s,?]? "),
-               hunk => N__("Stash this hunk [y,n,q,a,d%s,?]? "),
-       },
-       reset_head => {
-               mode => N__("Unstage mode change [y,n,q,a,d%s,?]? "),
-               deletion => N__("Unstage deletion [y,n,q,a,d%s,?]? "),
-               addition => N__("Unstage addition [y,n,q,a,d%s,?]? "),
-               hunk => N__("Unstage this hunk [y,n,q,a,d%s,?]? "),
-       },
-       reset_nothead => {
-               mode => N__("Apply mode change to index [y,n,q,a,d%s,?]? "),
-               deletion => N__("Apply deletion to index [y,n,q,a,d%s,?]? "),
-               addition => N__("Apply addition to index [y,n,q,a,d%s,?]? "),
-               hunk => N__("Apply this hunk to index [y,n,q,a,d%s,?]? "),
-       },
-       checkout_index => {
-               mode => N__("Discard mode change from worktree [y,n,q,a,d%s,?]? "),
-               deletion => N__("Discard deletion from worktree [y,n,q,a,d%s,?]? "),
-               addition => N__("Discard addition from worktree [y,n,q,a,d%s,?]? "),
-               hunk => N__("Discard this hunk from worktree [y,n,q,a,d%s,?]? "),
-       },
-       checkout_head => {
-               mode => N__("Discard mode change from index and worktree [y,n,q,a,d%s,?]? "),
-               deletion => N__("Discard deletion from index and worktree [y,n,q,a,d%s,?]? "),
-               addition => N__("Discard addition from index and worktree [y,n,q,a,d%s,?]? "),
-               hunk => N__("Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "),
-       },
-       checkout_nothead => {
-               mode => N__("Apply mode change to index and worktree [y,n,q,a,d%s,?]? "),
-               deletion => N__("Apply deletion to index and worktree [y,n,q,a,d%s,?]? "),
-               addition => N__("Apply addition to index and worktree [y,n,q,a,d%s,?]? "),
-               hunk => N__("Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "),
-       },
-       worktree_head => {
-               mode => N__("Discard mode change from worktree [y,n,q,a,d%s,?]? "),
-               deletion => N__("Discard deletion from worktree [y,n,q,a,d%s,?]? "),
-               addition => N__("Discard addition from worktree [y,n,q,a,d%s,?]? "),
-               hunk => N__("Discard this hunk from worktree [y,n,q,a,d%s,?]? "),
-       },
-       worktree_nothead => {
-               mode => N__("Apply mode change to worktree [y,n,q,a,d%s,?]? "),
-               deletion => N__("Apply deletion to worktree [y,n,q,a,d%s,?]? "),
-               addition => N__("Apply addition to worktree [y,n,q,a,d%s,?]? "),
-               hunk => N__("Apply this hunk to worktree [y,n,q,a,d%s,?]? "),
-       },
-);
-
-sub patch_update_file {
-       my $quit = 0;
-       my ($ix, $num);
-       my $path = shift;
-       my ($head, @hunk) = parse_diff($path);
-       ($head, my $mode, my $deletion, my $addition) = parse_diff_header($head);
-       for (@{$head->{DISPLAY}}) {
-               print;
-       }
-
-       if (@{$mode->{TEXT}}) {
-               unshift @hunk, $mode;
-       }
-       if (@{$deletion->{TEXT}}) {
-               foreach my $hunk (@hunk) {
-                       push @{$deletion->{TEXT}}, @{$hunk->{TEXT}};
-                       push @{$deletion->{DISPLAY}}, @{$hunk->{DISPLAY}};
-               }
-               @hunk = ($deletion);
-       }
-
-       $num = scalar @hunk;
-       $ix = 0;
-
-       while (1) {
-               my ($prev, $next, $other, $undecided, $i);
-               $other = '';
-
-               last if ($ix and !$num);
-               if ($num <= $ix) {
-                       $ix = 0;
-               }
-               for ($i = 0; $i < $ix; $i++) {
-                       if (!defined $hunk[$i]{USE}) {
-                               $prev = 1;
-                               $other .= ',k';
-                               last;
-                       }
-               }
-               if ($ix) {
-                       $other .= ',K';
-               }
-               for ($i = $ix + 1; $i < $num; $i++) {
-                       if (!defined $hunk[$i]{USE}) {
-                               $next = 1;
-                               $other .= ',j';
-                               last;
-                       }
-               }
-               if ($ix < $num - 1) {
-                       $other .= ',J';
-               }
-               if ($num > 1) {
-                       $other .= ',g,/';
-               }
-               for ($i = 0; $i < $num; $i++) {
-                       if (!defined $hunk[$i]{USE}) {
-                               $undecided = 1;
-                               last;
-                       }
-               }
-               last if (!$undecided && ($num || !$addition));
-
-               if ($num) {
-                       if ($hunk[$ix]{TYPE} eq 'hunk' &&
-                           hunk_splittable($hunk[$ix]{TEXT})) {
-                               $other .= ',s';
-                       }
-                       if ($hunk[$ix]{TYPE} eq 'hunk') {
-                               $other .= ',e';
-                       }
-                       for (@{$hunk[$ix]{DISPLAY}}) {
-                               print;
-                       }
-               }
-               my $type = $num ? $hunk[$ix]{TYPE} : $head->{TYPE};
-               print colored $prompt_color, "(", ($ix+1), "/", ($num ? $num : 1), ") ",
-                       sprintf(__($patch_update_prompt_modes{$patch_mode}{$type}), $other);
-
-               my $line = prompt_single_character;
-               last unless defined $line;
-               if ($line) {
-                       if ($line =~ /^y/i) {
-                               if ($num) {
-                                       $hunk[$ix]{USE} = 1;
-                               } else {
-                                       $head->{USE} = 1;
-                               }
-                       }
-                       elsif ($line =~ /^n/i) {
-                               if ($num) {
-                                       $hunk[$ix]{USE} = 0;
-                               } else {
-                                       $head->{USE} = 0;
-                               }
-                       }
-                       elsif ($line =~ /^a/i) {
-                               if ($num) {
-                                       while ($ix < $num) {
-                                               if (!defined $hunk[$ix]{USE}) {
-                                                       $hunk[$ix]{USE} = 1;
-                                               }
-                                               $ix++;
-                                       }
-                               } else {
-                                       $head->{USE} = 1;
-                                       $ix++;
-                               }
-                               next;
-                       }
-                       elsif ($line =~ /^g(.*)/) {
-                               my $response = $1;
-                               unless ($other =~ /g/) {
-                                       error_msg __("No other hunks to goto\n");
-                                       next;
-                               }
-                               my $no = $ix > 10 ? $ix - 10 : 0;
-                               while ($response eq '') {
-                                       $no = display_hunks(\@hunk, $no);
-                                       if ($no < $num) {
-                                               print __("go to which hunk (<ret> to see more)? ");
-                                       } else {
-                                               print __("go to which hunk? ");
-                                       }
-                                       $response = <STDIN>;
-                                       if (!defined $response) {
-                                               $response = '';
-                                       }
-                                       chomp $response;
-                               }
-                               if ($response !~ /^\s*\d+\s*$/) {
-                                       error_msg sprintf(__("Invalid number: '%s'\n"),
-                                                            $response);
-                               } elsif (0 < $response && $response <= $num) {
-                                       $ix = $response - 1;
-                               } else {
-                                       error_msg sprintf(__n("Sorry, only %d hunk available.\n",
-                                                             "Sorry, only %d hunks available.\n", $num), $num);
-                               }
-                               next;
-                       }
-                       elsif ($line =~ /^d/i) {
-                               if ($num) {
-                                       while ($ix < $num) {
-                                               if (!defined $hunk[$ix]{USE}) {
-                                                       $hunk[$ix]{USE} = 0;
-                                               }
-                                               $ix++;
-                                       }
-                               } else {
-                                       $head->{USE} = 0;
-                                       $ix++;
-                               }
-                               next;
-                       }
-                       elsif ($line =~ /^q/i) {
-                               if ($num) {
-                                       for ($i = 0; $i < $num; $i++) {
-                                               if (!defined $hunk[$i]{USE}) {
-                                                       $hunk[$i]{USE} = 0;
-                                               }
-                                       }
-                               } elsif (!defined $head->{USE}) {
-                                       $head->{USE} = 0;
-                               }
-                               $quit = 1;
-                               last;
-                       }
-                       elsif ($line =~ m|^/(.*)|) {
-                               my $regex = $1;
-                               unless ($other =~ m|/|) {
-                                       error_msg __("No other hunks to search\n");
-                                       next;
-                               }
-                               if ($regex eq "") {
-                                       print colored $prompt_color, __("search for regex? ");
-                                       $regex = <STDIN>;
-                                       if (defined $regex) {
-                                               chomp $regex;
-                                       }
-                               }
-                               my $search_string;
-                               eval {
-                                       $search_string = qr{$regex}m;
-                               };
-                               if ($@) {
-                                       my ($err,$exp) = ($@, $1);
-                                       $err =~ s/ at .*git-add--interactive line \d+, <STDIN> line \d+.*$//;
-                                       error_msg sprintf(__("Malformed search regexp %s: %s\n"), $exp, $err);
-                                       next;
-                               }
-                               my $iy = $ix;
-                               while (1) {
-                                       my $text = join ("", @{$hunk[$iy]{TEXT}});
-                                       last if ($text =~ $search_string);
-                                       $iy++;
-                                       $iy = 0 if ($iy >= $num);
-                                       if ($ix == $iy) {
-                                               error_msg __("No hunk matches the given pattern\n");
-                                               last;
-                                       }
-                               }
-                               $ix = $iy;
-                               next;
-                       }
-                       elsif ($line =~ /^K/) {
-                               if ($other =~ /K/) {
-                                       $ix--;
-                               }
-                               else {
-                                       error_msg __("No previous hunk\n");
-                               }
-                               next;
-                       }
-                       elsif ($line =~ /^J/) {
-                               if ($other =~ /J/) {
-                                       $ix++;
-                               }
-                               else {
-                                       error_msg __("No next hunk\n");
-                               }
-                               next;
-                       }
-                       elsif ($line =~ /^k/) {
-                               if ($other =~ /k/) {
-                                       while (1) {
-                                               $ix--;
-                                               last if (!$ix ||
-                                                        !defined $hunk[$ix]{USE});
-                                       }
-                               }
-                               else {
-                                       error_msg __("No previous hunk\n");
-                               }
-                               next;
-                       }
-                       elsif ($line =~ /^j/) {
-                               if ($other !~ /j/) {
-                                       error_msg __("No next hunk\n");
-                                       next;
-                               }
-                       }
-                       elsif ($line =~ /^s/) {
-                               unless ($other =~ /s/) {
-                                       error_msg __("Sorry, cannot split this hunk\n");
-                                       next;
-                               }
-                               my @split = split_hunk($hunk[$ix]{TEXT}, $hunk[$ix]{DISPLAY});
-                               if (1 < @split) {
-                                       print colored $header_color, sprintf(
-                                               __n("Split into %d hunk.\n",
-                                                   "Split into %d hunks.\n",
-                                                   scalar(@split)), scalar(@split));
-                               }
-                               splice (@hunk, $ix, 1, @split);
-                               $num = scalar @hunk;
-                               next;
-                       }
-                       elsif ($line =~ /^e/) {
-                               unless ($other =~ /e/) {
-                                       error_msg __("Sorry, cannot edit this hunk\n");
-                                       next;
-                               }
-                               my $newhunk = edit_hunk_loop($head, \@hunk, $ix);
-                               if (defined $newhunk) {
-                                       splice @hunk, $ix, 1, $newhunk;
-                               }
-                       }
-                       else {
-                               help_patch_cmd($other);
-                               next;
-                       }
-                       # soft increment
-                       while (1) {
-                               $ix++;
-                               last if ($ix >= $num ||
-                                        !defined $hunk[$ix]{USE});
-                       }
-               }
-       }
-
-       @hunk = coalesce_overlapping_hunks(@hunk) if ($num);
-
-       my $n_lofs = 0;
-       my @result = ();
-       for (@hunk) {
-               if ($_->{USE}) {
-                       push @result, @{$_->{TEXT}};
-               }
-       }
-
-       if (@result or $head->{USE}) {
-               my @patch = reassemble_patch($head->{TEXT}, @result);
-               my $apply_routine = $patch_mode_flavour{APPLY};
-               &$apply_routine(@patch);
-               refresh();
-       }
-
-       print "\n";
-       return $quit;
-}
-
-sub diff_cmd {
-       my @mods = list_modified('index-only');
-       @mods = grep { !($_->{BINARY}) } @mods;
-       return if (!@mods);
-       my (@them) = list_and_choose({ PROMPT => __('Review diff'),
-                                    IMMEDIATE => 1,
-                                    HEADER => $status_head, },
-                                  @mods);
-       return if (!@them);
-       my $reference = (is_initial_commit()) ? get_empty_tree() : 'HEAD';
-       system(qw(git diff -p --cached), $reference, '--',
-               map { $_->{VALUE} } @them);
-}
-
-sub quit_cmd {
-       print __("Bye.\n");
-       exit(0);
-}
-
-sub help_cmd {
-# TRANSLATORS: please do not translate the command names
-# 'status', 'update', 'revert', etc.
-       print colored $help_color, __ <<'EOF' ;
-status        - show paths with changes
-update        - add working tree state to the staged set of changes
-revert        - revert staged set of changes back to the HEAD version
-patch         - pick hunks and update selectively
-diff          - view diff between HEAD and index
-add untracked - add contents of untracked files to the staged set of changes
-EOF
-}
-
-sub process_args {
-       return unless @ARGV;
-       my $arg = shift @ARGV;
-       if ($arg =~ /--patch(?:=(.*))?/) {
-               if (defined $1) {
-                       if ($1 eq 'reset') {
-                               $patch_mode = 'reset_head';
-                               $patch_mode_revision = 'HEAD';
-                               $arg = shift @ARGV or die __("missing --");
-                               if ($arg ne '--') {
-                                       $patch_mode_revision = $arg;
-
-                                       # NEEDSWORK: Instead of comparing to the literal "HEAD",
-                                       # compare the commit objects instead so that other ways of
-                                       # saying the same thing (such as "@") are also handled
-                                       # appropriately.
-                                       #
-                                       # This applies to the cases below too.
-                                       $patch_mode = ($arg eq 'HEAD' ?
-                                                      'reset_head' : 'reset_nothead');
-                                       $arg = shift @ARGV or die __("missing --");
-                               }
-                       } elsif ($1 eq 'checkout') {
-                               $arg = shift @ARGV or die __("missing --");
-                               if ($arg eq '--') {
-                                       $patch_mode = 'checkout_index';
-                               } else {
-                                       $patch_mode_revision = $arg;
-                                       $patch_mode = ($arg eq 'HEAD' ?
-                                                      'checkout_head' : 'checkout_nothead');
-                                       $arg = shift @ARGV or die __("missing --");
-                               }
-                       } elsif ($1 eq 'worktree') {
-                               $arg = shift @ARGV or die __("missing --");
-                               if ($arg eq '--') {
-                                       $patch_mode = 'checkout_index';
-                               } else {
-                                       $patch_mode_revision = $arg;
-                                       $patch_mode = ($arg eq 'HEAD' ?
-                                                      'worktree_head' : 'worktree_nothead');
-                                       $arg = shift @ARGV or die __("missing --");
-                               }
-                       } elsif ($1 eq 'stage' or $1 eq 'stash') {
-                               $patch_mode = $1;
-                               $arg = shift @ARGV or die __("missing --");
-                       } else {
-                               die sprintf(__("unknown --patch mode: %s"), $1);
-                       }
-               } else {
-                       $patch_mode = 'stage';
-                       $arg = shift @ARGV or die __("missing --");
-               }
-               die sprintf(__("invalid argument %s, expecting --"),
-                              $arg) unless $arg eq "--";
-               %patch_mode_flavour = %{$patch_modes{$patch_mode}};
-               $patch_mode_only = 1;
-       }
-       elsif ($arg ne "--") {
-               die sprintf(__("invalid argument %s, expecting --"), $arg);
-       }
-}
-
-sub main_loop {
-       my @cmd = ([ 'status', \&status_cmd, ],
-                  [ 'update', \&update_cmd, ],
-                  [ 'revert', \&revert_cmd, ],
-                  [ 'add untracked', \&add_untracked_cmd, ],
-                  [ 'patch', \&patch_update_cmd, ],
-                  [ 'diff', \&diff_cmd, ],
-                  [ 'quit', \&quit_cmd, ],
-                  [ 'help', \&help_cmd, ],
-       );
-       while (1) {
-               my ($it) = list_and_choose({ PROMPT => __('What now'),
-                                            SINGLETON => 1,
-                                            LIST_FLAT => 4,
-                                            HEADER => __('*** Commands ***'),
-                                            ON_EOF => \&quit_cmd,
-                                            IMMEDIATE => 1 }, @cmd);
-               if ($it) {
-                       eval {
-                               $it->[1]->();
-                       };
-                       if ($@) {
-                               print "$@";
-                       }
-               }
-       }
-}
-
-process_args();
-refresh();
-if ($patch_mode_only) {
-       patch_update_cmd();
-}
-else {
-       status_cmd();
-       main_loop();
-}
index f671a0ec3f49552cc744231df157386d450c41af..4a200a9fb41123e1d945ae9a397f09d7c0456367 100644 (file)
@@ -339,6 +339,25 @@ static inline const char *precompose_string_if_needed(const char *in)
 int compat_mkdir_wo_trailing_slash(const char*, mode_t);
 #endif
 
+#ifdef time
+#undef time
+#endif
+static inline time_t git_time(time_t *tloc)
+{
+       struct timeval tv;
+
+       /*
+        * Avoid time(NULL), which can disagree with gettimeofday(2)
+        * and filesystem timestamps.
+        */
+       gettimeofday(&tv, NULL);
+
+       if (tloc)
+               *tloc = tv.tv_sec;
+       return tv.tv_sec;
+}
+#define time git_time
+
 #ifdef NO_STRUCT_ITIMERVAL
 struct itimerval {
        struct timeval it_interval;
@@ -1225,6 +1244,7 @@ extern const unsigned char tolower_trans_tbl[256];
 #undef isxdigit
 
 extern const unsigned char sane_ctype[256];
+extern const signed char hexval_table[256];
 #define GIT_SPACE 0x01
 #define GIT_DIGIT 0x02
 #define GIT_ALPHA 0x04
diff --git a/git.c b/git.c
index 96b0a2837dcd69d875181fe6b9f395f1703c4583..ae2134f29a803f6ea4d68af9cba3c5ca3cfec325 100644 (file)
--- a/git.c
+++ b/git.c
@@ -4,6 +4,7 @@
 #include "help.h"
 #include "run-command.h"
 #include "alias.h"
+#include "replace-object.h"
 #include "shallow.h"
 
 #define RUN_SETUP              (1<<0)
@@ -430,7 +431,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
                use_pager = 1;
        if (run_setup && startup_info->have_repository)
                /* get_git_dir() may set up repo, avoid that */
-               trace_repo_setup(prefix);
+               trace_repo_setup();
        commit_pager_choice();
 
        if (!help && p->option & NEED_WORK_TREE)
index 687236430bf21c7c64d9a13128af016cf579d3c3..855970bb939fb84c09d9b52c4afbc0b7689f9956 100644 (file)
@@ -4,11 +4,24 @@
 #include "run-command.h"
 #include "strbuf.h"
 #include "dir.h"
+#include "ident.h"
 #include "gpg-interface.h"
 #include "sigchain.h"
 #include "tempfile.h"
 #include "alias.h"
 
+static int git_gpg_config(const char *, const char *, void *);
+
+static void gpg_interface_lazy_init(void)
+{
+       static int done;
+
+       if (done)
+               return;
+       done = 1;
+       git_config(git_gpg_config, NULL);
+}
+
 static char *configured_signing_key;
 static const char *ssh_default_key_command, *ssh_allowed_signers, *ssh_revocation_file;
 static enum signature_trust_level configured_min_trust_level = TRUST_UNDEFINED;
@@ -632,6 +645,8 @@ int check_signature(struct signature_check *sigc,
        struct gpg_format *fmt;
        int status;
 
+       gpg_interface_lazy_init();
+
        sigc->result = 'N';
        sigc->trust_level = -1;
 
@@ -695,11 +710,13 @@ int parse_signature(const char *buf, size_t size, struct strbuf *payload, struct
 
 void set_signing_key(const char *key)
 {
+       gpg_interface_lazy_init();
+
        free(configured_signing_key);
        configured_signing_key = xstrdup(key);
 }
 
-int git_gpg_config(const char *var, const char *value, void *cb UNUSED)
+static int git_gpg_config(const char *var, const char *value, void *cb UNUSED)
 {
        struct gpg_format *fmt = NULL;
        char *fmtname = NULL;
@@ -888,6 +905,8 @@ static const char *get_ssh_key_id(void) {
 /* Returns a textual but unique representation of the signing key */
 const char *get_signing_key_id(void)
 {
+       gpg_interface_lazy_init();
+
        if (use_format->get_key_id) {
                return use_format->get_key_id();
        }
@@ -898,6 +917,8 @@ const char *get_signing_key_id(void)
 
 const char *get_signing_key(void)
 {
+       gpg_interface_lazy_init();
+
        if (configured_signing_key)
                return configured_signing_key;
        if (use_format->get_default_key) {
@@ -923,6 +944,8 @@ const char *gpg_trust_level_to_str(enum signature_trust_level level)
 
 int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key)
 {
+       gpg_interface_lazy_init();
+
        return use_format->sign_buffer(buffer, signature, signing_key);
 }
 
@@ -977,9 +1000,13 @@ static int sign_buffer_gpg(struct strbuf *buffer, struct strbuf *signature,
                        break; /* found */
        }
        ret |= !cp;
+       if (ret) {
+               error(_("gpg failed to sign the data:\n%s"),
+                     gpg_status.len ? gpg_status.buf : "(no gpg output)");
+               strbuf_release(&gpg_status);
+               return -1;
+       }
        strbuf_release(&gpg_status);
-       if (ret)
-               return error(_("gpg failed to sign the data"));
 
        /* Strip CR from the line endings, in case we are on Windows. */
        remove_cr_after(signature, bottom);
index 8a9ef41779e2fe91305dcb1b13cf66a282446cf6..143cdc1c02d4b31fa08f92fbcae1691c80d2c2d6 100644 (file)
@@ -79,7 +79,6 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature,
  */
 const char *gpg_trust_level_to_str(enum signature_trust_level level);
 
-int git_gpg_config(const char *, const char *, void *);
 void set_signing_key(const char *);
 const char *get_signing_key(void);
 
diff --git a/graph.c b/graph.c
index 568b6e7cd41512d17cc68e0595675ee858165164..2a9dc430fae105c8d6fb5a8763320ae40fb1e5c8 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
 #include "config.h"
 #include "commit.h"
 #include "color.h"
diff --git a/grep.c b/grep.c
index 1687f65b64fdf6a229a1ab2e37d7c7ac8955a5b6..25dc2ec78841b9e97103c267f37db665bb4d4149 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "config.h"
 #include "grep.h"
+#include "hex.h"
 #include "object-store.h"
 #include "userdiff.h"
 #include "xdiff-interface.h"
@@ -262,6 +263,31 @@ static void pcre2_free(void *pointer, MAYBE_UNUSED void *memory_data)
        free(pointer);
 }
 
+static int pcre2_jit_functional(void)
+{
+       static int jit_working = -1;
+       pcre2_code *code;
+       size_t off;
+       int err;
+
+       if (jit_working != -1)
+               return jit_working;
+
+       /*
+        * Try to JIT compile a simple pattern to probe if the JIT is
+        * working in general. It might fail for systems where creating
+        * memory mappings for runtime code generation is restricted.
+        */
+       code = pcre2_compile((PCRE2_SPTR)".", 1, 0, &err, &off, NULL);
+       if (!code)
+               return 0;
+
+       jit_working = pcre2_jit_compile(code, PCRE2_JIT_COMPLETE) == 0;
+       pcre2_code_free(code);
+
+       return jit_working;
+}
+
 static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt)
 {
        int error;
@@ -295,6 +321,15 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
        if (!opt->ignore_locale && is_utf8_locale() && !literal)
                options |= (PCRE2_UTF | PCRE2_UCP | PCRE2_MATCH_INVALID_UTF);
 
+#ifndef GIT_PCRE2_VERSION_10_35_OR_HIGHER
+       /*
+        * Work around a JIT bug related to invalid Unicode character handling
+        * fixed in 10.35:
+        * https://github.com/PCRE2Project/pcre2/commit/c21bd977547d
+        */
+       options &= ~PCRE2_UCP;
+#endif
+
 #ifndef GIT_PCRE2_VERSION_10_36_OR_HIGHER
        /* Work around https://bugs.exim.org/show_bug.cgi?id=2642 fixed in 10.36 */
        if (PCRE2_MATCH_INVALID_UTF && options & (PCRE2_UTF | PCRE2_CASELESS))
@@ -317,8 +352,29 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
        pcre2_config(PCRE2_CONFIG_JIT, &p->pcre2_jit_on);
        if (p->pcre2_jit_on) {
                jitret = pcre2_jit_compile(p->pcre2_pattern, PCRE2_JIT_COMPLETE);
-               if (jitret)
-                       die("Couldn't JIT the PCRE2 pattern '%s', got '%d'\n", p->pattern, jitret);
+               if (jitret == PCRE2_ERROR_NOMEMORY && !pcre2_jit_functional()) {
+                       /*
+                        * Even though pcre2_config(PCRE2_CONFIG_JIT, ...)
+                        * indicated JIT support, the library might still
+                        * fail to generate JIT code for various reasons,
+                        * e.g. when SELinux's 'deny_execmem' or PaX's
+                        * MPROTECT prevent creating W|X memory mappings.
+                        *
+                        * Instead of faling hard, fall back to interpreter
+                        * mode, just as if the pattern was prefixed with
+                        * '(*NO_JIT)'.
+                        */
+                       p->pcre2_jit_on = 0;
+                       return;
+               } else if (jitret) {
+                       int need_clip = p->patternlen > 64;
+                       int clip_len = need_clip ? 64 : p->patternlen;
+                       die("Couldn't JIT the PCRE2 pattern '%.*s'%s, got '%d'%s",
+                           clip_len, p->pattern, need_clip ? "..." : "", jitret,
+                           pcre2_jit_functional()
+                           ? "\nPerhaps prefix (*NO_JIT) to your pattern?"
+                           : "");
+               }
 
                /*
                 * The pcre2_config(PCRE2_CONFIG_JIT, ...) call just
@@ -769,11 +825,11 @@ static void free_pattern_expr(struct grep_expr *x)
        free(x);
 }
 
-void free_grep_patterns(struct grep_opt *opt)
+static void free_grep_pat(struct grep_pat *pattern)
 {
        struct grep_pat *p, *n;
 
-       for (p = opt->pattern_list; p; p = n) {
+       for (p = pattern; p; p = n) {
                n = p->next;
                switch (p->token) {
                case GREP_PATTERN: /* atom */
@@ -790,10 +846,15 @@ void free_grep_patterns(struct grep_opt *opt)
                }
                free(p);
        }
+}
 
-       if (!opt->pattern_expression)
-               return;
-       free_pattern_expr(opt->pattern_expression);
+void free_grep_patterns(struct grep_opt *opt)
+{
+       free_grep_pat(opt->pattern_list);
+       free_grep_pat(opt->header_list);
+
+       if (opt->pattern_expression)
+               free_pattern_expr(opt->pattern_expression);
 }
 
 static const char *end_of_line(const char *cp, unsigned long *left)
diff --git a/grep.h b/grep.h
index 6075f997e68f5594f771123ae62655181278d38e..c59592e3bdba5205befb38b5a19881ba3c6c9ce2 100644 (file)
--- a/grep.h
+++ b/grep.h
@@ -7,6 +7,9 @@
 #if (PCRE2_MAJOR >= 10 && PCRE2_MINOR >= 36) || PCRE2_MAJOR >= 11
 #define GIT_PCRE2_VERSION_10_36_OR_HIGHER
 #endif
+#if (PCRE2_MAJOR >= 10 && PCRE2_MINOR >= 35) || PCRE2_MAJOR >= 11
+#define GIT_PCRE2_VERSION_10_35_OR_HIGHER
+#endif
 #if (PCRE2_MAJOR >= 10 && PCRE2_MINOR >= 34) || PCRE2_MAJOR >= 11
 #define GIT_PCRE2_VERSION_10_34_OR_HIGHER
 #endif
diff --git a/hash.h b/hash.h
index 36b64165fc96375457415a6348eeebd2944c41f9..d39f73618cb8d9e8678ccf3d0794fbef1a55243c 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -1,7 +1,6 @@
 #ifndef HASH_H
 #define HASH_H
 
-#include "git-compat-util.h"
 #include "repository.h"
 
 #if defined(SHA1_APPLE)
@@ -124,6 +123,40 @@ struct object_id {
        int algo;       /* XXX requires 4-byte alignment */
 };
 
+#define GET_OID_QUIETLY           01
+#define GET_OID_COMMIT            02
+#define GET_OID_COMMITTISH        04
+#define GET_OID_TREE             010
+#define GET_OID_TREEISH          020
+#define GET_OID_BLOB             040
+#define GET_OID_FOLLOW_SYMLINKS 0100
+#define GET_OID_RECORD_PATH     0200
+#define GET_OID_ONLY_TO_DIE    04000
+#define GET_OID_REQUIRE_PATH  010000
+
+#define GET_OID_DISAMBIGUATORS \
+       (GET_OID_COMMIT | GET_OID_COMMITTISH | \
+       GET_OID_TREE | GET_OID_TREEISH | \
+       GET_OID_BLOB)
+
+enum get_oid_result {
+       FOUND = 0,
+       MISSING_OBJECT = -1, /* The requested object is missing */
+       SHORT_NAME_AMBIGUOUS = -2,
+       /* The following only apply when symlinks are followed */
+       DANGLING_SYMLINK = -4, /*
+                               * The initial symlink is there, but
+                               * (transitively) points to a missing
+                               * in-tree file
+                               */
+       SYMLINK_LOOP = -5,
+       NOT_DIR = -6, /*
+                      * Somewhere along the symlink chain, a path is
+                      * requested which contains a file as a
+                      * non-final element.
+                      */
+};
+
 /* A suitably aligned type for stack allocations of hash contexts. */
 union git_hash_ctx {
        git_SHA_CTX sha1;
index cf5fea87eb02bf753d408f1eeb00f5de2a02e907..ee45ef00852c86b5f0fe0de8177c806c53d7efa0 100644 (file)
--- a/hashmap.c
+++ b/hashmap.c
@@ -1,7 +1,7 @@
 /*
  * Generic implementation of hash-based key value mappings.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "hashmap.h"
 
 #define FNV32_BASE ((unsigned int) 0x811c9dc5)
diff --git a/help.c b/help.c
index 812af4cdea62129c12ec33813d934d677c61d714..5d7637dce92867c1c0bee7f6f6b904852d237222 100644 (file)
--- a/help.c
+++ b/help.c
@@ -1,9 +1,11 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "builtin.h"
 #include "exec-cmd.h"
 #include "run-command.h"
 #include "levenshtein.h"
+#include "gettext.h"
 #include "help.h"
 #include "command-list.h"
 #include "string-list.h"
@@ -540,7 +542,8 @@ static struct cmdnames aliases;
 #define AUTOCORRECT_NEVER (-2)
 #define AUTOCORRECT_IMMEDIATELY (-1)
 
-static int git_unknown_cmd_config(const char *var, const char *value, void *cb)
+static int git_unknown_cmd_config(const char *var, const char *value,
+                                 void *cb UNUSED)
 {
        const char *p;
 
diff --git a/hex.c b/hex.c
index 4f64d34696379d35e7ace281a5d471f55f1737ad..0a1bddc1284320fa4709715d53a6d59905cc3d8c 100644 (file)
--- a/hex.c
+++ b/hex.c
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "hex.h"
 
 const signed char hexval_table[256] = {
         -1, -1, -1, -1, -1, -1, -1, -1,                /* 00-07 */
diff --git a/hex.h b/hex.h
new file mode 100644 (file)
index 0000000..e2abfc5
--- /dev/null
+++ b/hex.h
@@ -0,0 +1,84 @@
+#ifndef HEX_H
+#define HEX_H
+
+#include "hash.h"
+
+extern const signed char hexval_table[256];
+static inline unsigned int hexval(unsigned char c)
+{
+       return hexval_table[c];
+}
+
+/*
+ * Convert two consecutive hexadecimal digits into a char.  Return a
+ * negative value on error.  Don't run over the end of short strings.
+ */
+static inline int hex2chr(const char *s)
+{
+       unsigned int val = hexval(s[0]);
+       return (val & ~0xf) ? val : (val << 4) | hexval(s[1]);
+}
+
+/*
+ * Try to read a SHA1 in hexadecimal format from the 40 characters
+ * starting at hex.  Write the 20-byte result to sha1 in binary form.
+ * Return 0 on success.  Reading stops if a NUL is encountered in the
+ * input, so it is safe to pass this function an arbitrary
+ * null-terminated string.
+ */
+int get_sha1_hex(const char *hex, unsigned char *sha1);
+int get_oid_hex(const char *hex, struct object_id *sha1);
+
+/* Like get_oid_hex, but for an arbitrary hash algorithm. */
+int get_oid_hex_algop(const char *hex, struct object_id *oid, const struct git_hash_algo *algop);
+
+/*
+ * Read `len` pairs of hexadecimal digits from `hex` and write the
+ * values to `binary` as `len` bytes. Return 0 on success, or -1 if
+ * the input does not consist of hex digits).
+ */
+int hex_to_bytes(unsigned char *binary, const char *hex, size_t len);
+
+/*
+ * Convert a binary hash in "unsigned char []" or an object name in
+ * "struct object_id *" to its hex equivalent. The `_r` variant is reentrant,
+ * and writes the NUL-terminated output to the buffer `out`, which must be at
+ * least `GIT_MAX_HEXSZ + 1` bytes, and returns a pointer to out for
+ * convenience.
+ *
+ * The non-`_r` variant returns a static buffer, but uses a ring of 4
+ * buffers, making it safe to make multiple calls for a single statement, like:
+ *
+ *   printf("%s -> %s", hash_to_hex(one), hash_to_hex(two));
+ *   printf("%s -> %s", oid_to_hex(one), oid_to_hex(two));
+ */
+char *hash_to_hex_algop_r(char *buffer, const unsigned char *hash, const struct git_hash_algo *);
+char *oid_to_hex_r(char *out, const struct object_id *oid);
+char *hash_to_hex_algop(const unsigned char *hash, const struct git_hash_algo *);      /* static buffer result! */
+char *hash_to_hex(const unsigned char *hash);                                          /* same static buffer */
+char *oid_to_hex(const struct object_id *oid);                                         /* same static buffer */
+
+/*
+ * Parse a 40-character hexadecimal object ID starting from hex, updating the
+ * pointer specified by end when parsing stops.  The resulting object ID is
+ * stored in oid.  Returns 0 on success.  Parsing will stop on the first NUL or
+ * other invalid character.  end is only updated on success; otherwise, it is
+ * unmodified.
+ */
+int parse_oid_hex(const char *hex, struct object_id *oid, const char **end);
+
+/* Like parse_oid_hex, but for an arbitrary hash algorithm. */
+int parse_oid_hex_algop(const char *hex, struct object_id *oid, const char **end,
+                       const struct git_hash_algo *algo);
+
+
+/*
+ * These functions work like get_oid_hex and parse_oid_hex, but they will parse
+ * a hex value for any algorithm. The algorithm is detected based on the length
+ * and the algorithm in use is returned. If this is not a hex object ID in any
+ * algorithm, returns GIT_HASH_UNKNOWN.
+ */
+int get_oid_hex_any(const char *hex, struct object_id *oid);
+int parse_oid_hex_any(const char *hex, struct object_id *oid, const char **end);
+
+#endif
diff --git a/hook.c b/hook.c
index a4fa1031f287652eb734b276d9d6c98df40d9a08..76e322f5804852ee44850fcf8339efc1ce785260 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -1,7 +1,10 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "advice.h"
+#include "gettext.h"
 #include "hook.h"
 #include "run-command.h"
 #include "config.h"
+#include "strbuf.h"
 
 const char *find_hook(const char *name)
 {
@@ -43,9 +46,9 @@ int hook_exists(const char *name)
 }
 
 static int pick_next_hook(struct child_process *cp,
-                         struct strbuf *out,
+                         struct strbuf *out UNUSED,
                          void *pp_cb,
-                         void **pp_task_cb)
+                         void **pp_task_cb UNUSED)
 {
        struct hook_cb_data *hook_cb = pp_cb;
        const char *hook_path = hook_cb->hook_path;
@@ -55,6 +58,11 @@ static int pick_next_hook(struct child_process *cp,
 
        cp->no_stdin = 1;
        strvec_pushv(&cp->env, hook_cb->options->env.v);
+       /* reopen the file for stdin; run_command closes it. */
+       if (hook_cb->options->path_to_stdin) {
+               cp->no_stdin = 0;
+               cp->in = xopen(hook_cb->options->path_to_stdin, O_RDONLY);
+       }
        cp->stdout_to_stderr = 1;
        cp->trace2_hook_name = hook_cb->hook_name;
        cp->dir = hook_cb->options->dir;
@@ -72,9 +80,9 @@ static int pick_next_hook(struct child_process *cp,
        return 1;
 }
 
-static int notify_start_failure(struct strbuf *out,
+static int notify_start_failure(struct strbuf *out UNUSED,
                                void *pp_cb,
-                               void *pp_task_cp)
+                               void *pp_task_cp UNUSED)
 {
        struct hook_cb_data *hook_cb = pp_cb;
 
@@ -84,9 +92,9 @@ static int notify_start_failure(struct strbuf *out,
 }
 
 static int notify_hook_finished(int result,
-                               struct strbuf *out,
+                               struct strbuf *out UNUSED,
                                void *pp_cb,
-                               void *pp_task_cb)
+                               void *pp_task_cb UNUSED)
 {
        struct hook_cb_data *hook_cb = pp_cb;
        struct run_hooks_opt *opt = hook_cb->options;
diff --git a/hook.h b/hook.h
index 4258b13da0d7c3c88a81b79eb25e8cc6a29dc6b6..19ab9a5806e1c1de11f7b300471c957fa5e6b4d4 100644 (file)
--- a/hook.h
+++ b/hook.h
@@ -30,6 +30,11 @@ struct run_hooks_opt
         * was invoked.
         */
        int *invoked_hook;
+
+       /**
+        * Path to file which should be piped to stdin for each hook.
+        */
+       const char *path_to_stdin;
 };
 
 #define RUN_HOOKS_OPT_INIT { \
index 6eb3b2fe51c6fe839f2dec5dd584cf174d5b5f73..9cfc6f25414b5cc40b7b1e4389339f47aead50b0 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "repository.h"
 #include "refs.h"
 #include "pkt-line.h"
@@ -524,7 +526,7 @@ static int show_text_ref(const char *name, const struct object_id *oid,
        return 0;
 }
 
-static void get_info_refs(struct strbuf *hdr, char *arg)
+static void get_info_refs(struct strbuf *hdr, char *arg UNUSED)
 {
        const char *service_name = get_parameter("service");
        struct strbuf buf = STRBUF_INIT;
@@ -578,7 +580,7 @@ static int show_head_ref(const char *refname, const struct object_id *oid,
        return 0;
 }
 
-static void get_head(struct strbuf *hdr, char *arg)
+static void get_head(struct strbuf *hdr, char *arg UNUSED)
 {
        struct strbuf buf = STRBUF_INIT;
 
@@ -588,7 +590,7 @@ static void get_head(struct strbuf *hdr, char *arg)
        strbuf_release(&buf);
 }
 
-static void get_info_packs(struct strbuf *hdr, char *arg)
+static void get_info_packs(struct strbuf *hdr, char *arg UNUSED)
 {
        size_t objdirlen = strlen(get_object_directory());
        struct strbuf buf = STRBUF_INIT;
@@ -736,7 +738,7 @@ static int bad_request(struct strbuf *hdr, const struct service_cmd *c)
        return 0;
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd_main(int argc UNUSED, const char **argv UNUSED)
 {
        char *method = getenv("REQUEST_METHOD");
        const char *proto_header;
@@ -759,10 +761,14 @@ int cmd_main(int argc, const char **argv)
                struct service_cmd *c = &services[i];
                regex_t re;
                regmatch_t out[1];
+               int ret;
 
                if (regcomp(&re, c->pattern, REG_EXTENDED))
                        die("Bogus regex in service table: %s", c->pattern);
-               if (!regexec(&re, dir, 1, out, 0)) {
+               ret = regexec(&re, dir, 1, out, 0);
+               regfree(&re);
+
+               if (!ret) {
                        size_t n;
 
                        if (strcmp(method, c->method))
@@ -774,7 +780,6 @@ int cmd_main(int argc, const char **argv)
                        dir[out[0].rm_so] = 0;
                        break;
                }
-               regfree(&re);
        }
 
        if (!cmd)
@@ -786,6 +791,7 @@ int cmd_main(int argc, const char **argv)
        if (!getenv("GIT_HTTP_EXPORT_ALL") &&
            access("git-daemon-export-ok", F_OK) )
                not_found(&hdr, "Repository not exported: '%s'", dir);
+       free(dir);
 
        http_config();
        max_request_buffer = git_env_ulong("GIT_HTTP_MAX_REQUEST_BUFFER",
@@ -795,5 +801,6 @@ int cmd_main(int argc, const char **argv)
                setenv(GIT_PROTOCOL_ENVIRONMENT, proto_header, 0);
 
        cmd->imp(&hdr, cmd_arg);
+       free(cmd_arg);
        return 0;
 }
index 258fec2068262c815ae68b08c8729b0bc60ee498..8db35b9767d4936749675f275e41f6b7260a84b7 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "config.h"
 #include "exec-cmd.h"
+#include "hex.h"
 #include "http.h"
 #include "walker.h"
 #include "strvec.h"
index 7f71316456c6832daa28bfc054f53b3224bf970f..88aa045ecba453eaab7f56c02c54a972ab07fd7c 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "repository.h"
 #include "commit.h"
 #include "tag.h"
index b8f0f98ae146999adf3770cc7338cbacbbbf8cb3..c3e902c40e654d86b8e2cefe2d8ccd6a475d3e5e 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "repository.h"
 #include "commit.h"
+#include "hex.h"
 #include "walker.h"
 #include "http.h"
 #include "list.h"
diff --git a/http.c b/http.c
index 32906eb2ac50a8fb76c9ad441316122dbf207e67..dbe4d29ef7abb87bf4a9cba21558745975ac795f 100644 (file)
--- a/http.c
+++ b/http.c
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "git-curl-compat.h"
+#include "hex.h"
 #include "http.h"
 #include "config.h"
 #include "pack.h"
diff --git a/ident.c b/ident.c
index 6de76f9421d57f38c478cca68fcb97c4ede2d36c..8fad92d7007e2101d630680f4aecd9626c97d6bd 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -5,10 +5,13 @@
  *
  * Copyright (C) 2005 Linus Torvalds
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "ident.h"
 #include "config.h"
 #include "date.h"
+#include "gettext.h"
 #include "mailmap.h"
+#include "strbuf.h"
 
 static struct strbuf git_default_name = STRBUF_INIT;
 static struct strbuf git_default_email = STRBUF_INIT;
diff --git a/ident.h b/ident.h
new file mode 100644 (file)
index 0000000..96a6489
--- /dev/null
+++ b/ident.h
@@ -0,0 +1,67 @@
+#ifndef IDENT_H
+#define IDENT_H
+
+#include "string-list.h"
+
+struct ident_split {
+       const char *name_begin;
+       const char *name_end;
+       const char *mail_begin;
+       const char *mail_end;
+       const char *date_begin;
+       const char *date_end;
+       const char *tz_begin;
+       const char *tz_end;
+};
+
+#define IDENT_STRICT          1
+#define IDENT_NO_DATE         2
+#define IDENT_NO_NAME         4
+
+enum want_ident {
+       WANT_BLANK_IDENT,
+       WANT_AUTHOR_IDENT,
+       WANT_COMMITTER_IDENT
+};
+
+const char *ident_default_name(void);
+const char *ident_default_email(void);
+/*
+ * Prepare an ident to fall back on if the user didn't configure it.
+ */
+void prepare_fallback_ident(const char *name, const char *email);
+void reset_ident_date(void);
+/*
+ * Signals an success with 0, but time part of the result may be NULL
+ * if the input lacks timestamp and zone
+ */
+int split_ident_line(struct ident_split *, const char *, int);
+
+/*
+ * Given a commit or tag object buffer and the commit or tag headers, replaces
+ * the idents in the headers with their canonical versions using the mailmap mechanism.
+ */
+void apply_mailmap_to_header(struct strbuf *, const char **, struct string_list *);
+
+/*
+ * Compare split idents for equality or strict ordering. Note that we
+ * compare only the ident part of the line, ignoring any timestamp.
+ *
+ * Because there are two fields, we must choose one as the primary key; we
+ * currently arbitrarily pick the email.
+ */
+int ident_cmp(const struct ident_split *, const struct ident_split *);
+
+const char *git_author_info(int);
+const char *git_committer_info(int);
+const char *fmt_ident(const char *name, const char *email,
+                     enum want_ident whose_ident,
+                     const char *date_str, int);
+const char *fmt_name(enum want_ident);
+
+int committer_ident_sufficiently_given(void);
+int author_ident_sufficiently_given(void);
+
+int git_ident_config(const char *, const char *, void *);
+
+#endif
index a50af56b827033dc68923e038566e7718fb81a65..93e9018439c51193b12a52609ae125ae2ae6cfdb 100644 (file)
@@ -21,7 +21,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "credential.h"
 #include "exec-cmd.h"
index f1cfd8fa8c664bfca0dcaada59e59af8dd2db38a..005c820aa42e1f3c98bd2c1a376bd3a52bfc32a2 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "json-writer.h"
 
 void jw_init(struct json_writer *jw)
diff --git a/khash.h b/khash.h
index cb79bf885674ea6fc54fdcea17543739530a3b14..85362718c565e727da2beb9b10c9f32dd44a505a 100644 (file)
--- a/khash.h
+++ b/khash.h
@@ -26,7 +26,6 @@
 #ifndef __AC_KHASH_H
 #define __AC_KHASH_H
 
-#include "cache.h"
 #include "hashmap.h"
 
 #define AC_VERSION_KHASH_H "0.2.8"
diff --git a/kwset.c b/kwset.c
index 08aadf03117c5069116bb7e7fa4aa5ed7a9b1fb0..4b14d4f86b8d1965023a49586fdd56631631cb8e 100644 (file)
--- a/kwset.c
+++ b/kwset.c
@@ -32,7 +32,7 @@
    String Matching:  An Aid to Bibliographic Search," CACM June 1975,
    Vol. 18, No. 6, which describes the failure function used below. */
 
-#include "cache.h"
+#include "git-compat-util.h"
 
 #include "kwset.h"
 #include "compat/obstack.h"
index d2632690d5107b53ee8a7ac4832cd85eb8c7bfc1..fd8026fe20182e5d90dad6db72ab453b5ed0a23c 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "levenshtein.h"
 
 /*
index a7f3e7f6ce43e0ce4786e417608a1a43bac47105..6e7fc4b2e0baa7d56e1b205213a752b70c3037e8 100644 (file)
@@ -1,6 +1,8 @@
 #include "git-compat-util.h"
+#include "alloc.h"
 #include "line-range.h"
 #include "cache.h"
+#include "hex.h"
 #include "tag.h"
 #include "blob.h"
 #include "tree.h"
@@ -1281,7 +1283,8 @@ int line_log_process_ranges_arbitrary_commit(struct rev_info *rev, struct commit
        return changed;
 }
 
-static enum rewrite_result line_log_rewrite_one(struct rev_info *rev, struct commit **pp)
+static enum rewrite_result line_log_rewrite_one(struct rev_info *rev UNUSED,
+                                               struct commit **pp)
 {
        for (;;) {
                struct commit *p = *pp;
index 82ae8d98a403bb644eede373a8def1a37a811fdd..adff361b1bc93905641341df88a7cfcbfb6c118d 100644 (file)
@@ -5,6 +5,7 @@
 
 struct rev_info;
 struct commit;
+struct string_list;
 
 /* A range [start,end].  Lines are numbered starting at 0, and the
  * ranges include start but exclude end. */
index ecffc09be6ec5c1a9646ac152a899f3415f6321d..5416cbcf409d2689d4fe620564f2e010a93131b8 100644 (file)
@@ -3,7 +3,7 @@
  * algorithm for dense and sparse linear assignment problems</i>. Computing,
  * 38(4), 325-340.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "linear-assignment.h"
 
 #define COST(column, row) cost[(column) + column_count * (row)]
index ee01bcd2cc365c12c72bcd3f5597ecceecb2a7d9..72aeb089cc94633f5e7af5917d9398888d143ff9 100644 (file)
@@ -1,6 +1,8 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "commit.h"
 #include "config.h"
+#include "gettext.h"
 #include "revision.h"
 #include "strvec.h"
 #include "list-objects.h"
@@ -9,6 +11,7 @@
 #include "promisor-remote.h"
 #include "trace.h"
 #include "url.h"
+#include "parse-options.h"
 
 static int parse_combine_filter(
        struct list_objects_filter_options *filter_options,
index 1fe393f447303a6d94abbd571a1ea83a1bfc7620..727c986122fc710b72bc827f1a18cb05b2fb0622 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef LIST_OBJECTS_FILTER_OPTIONS_H
 #define LIST_OBJECTS_FILTER_OPTIONS_H
 
-#include "cache.h"
-#include "parse-options.h"
+#include "object.h"
 #include "string-list.h"
+#include "strbuf.h"
+
+struct option;
 
 /*
  * The list of defined filters for list-objects.
index 7ed21cb299c126fb2d2107eb3e418a18e64fbc6c..5d7b33166086e66372be44d756728f7e1f56fc0f 100644 (file)
@@ -1,5 +1,7 @@
 #include "cache.h"
+#include "alloc.h"
 #include "dir.h"
+#include "hex.h"
 #include "tag.h"
 #include "commit.h"
 #include "tree.h"
index 7528fe1db2c85c0b4d923854ef3ec53c3a8f1fad..ab5745bbfe4d2149694eb3f358ea0ce184ad494d 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "tag.h"
 #include "commit.h"
+#include "hex.h"
 #include "tree.h"
 #include "blob.h"
 #include "diff.h"
index 1dd5fcbf7be433740d83382db4c401d438a51720..3adcb576e4cae12052af13d25bcd861c84bd4174 100644 (file)
@@ -2,6 +2,7 @@
 #include "commit-reach.h"
 #include "config.h"
 #include "diff.h"
+#include "hex.h"
 #include "object-store.h"
 #include "repository.h"
 #include "tmp-objdir.h"
@@ -12,6 +13,7 @@
 #include "merge-ort.h"
 #include "reflog-walk.h"
 #include "refs.h"
+#include "replace-object.h"
 #include "string-list.h"
 #include "color.h"
 #include "gpg-interface.h"
@@ -196,7 +198,8 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
        return 0;
 }
 
-static int add_graft_decoration(const struct commit_graft *graft, void *cb_data)
+static int add_graft_decoration(const struct commit_graft *graft,
+                               void *cb_data UNUSED)
 {
        struct commit *commit = lookup_commit(the_repository, &graft->oid);
        if (!commit)
index 697d4beb8de43a4a7ae48be8284e10c6be2a9bfd..8091b0cca8cae05112230e7644674e37138dfa93 100644 (file)
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "repository.h"
 #include "refs.h"
 #include "remote.h"
@@ -8,38 +9,32 @@
 #include "config.h"
 #include "string-list.h"
 
-static int config_read;
-static int advertise_unborn;
-static int allow_unborn;
-
-static void ensure_config_read(void)
+static enum {
+       UNBORN_IGNORE = 0,
+       UNBORN_ALLOW,
+       UNBORN_ADVERTISE /* implies ALLOW */
+} unborn_config(struct repository *r)
 {
        const char *str = NULL;
 
-       if (config_read)
-               return;
-
-       if (repo_config_get_string_tmp(the_repository, "lsrefs.unborn", &str)) {
+       if (repo_config_get_string_tmp(r, "lsrefs.unborn", &str)) {
                /*
                 * If there is no such config, advertise and allow it by
                 * default.
                 */
-               advertise_unborn = 1;
-               allow_unborn = 1;
+               return UNBORN_ADVERTISE;
        } else {
                if (!strcmp(str, "advertise")) {
-                       advertise_unborn = 1;
-                       allow_unborn = 1;
+                       return UNBORN_ADVERTISE;
                } else if (!strcmp(str, "allow")) {
-                       allow_unborn = 1;
+                       return UNBORN_ALLOW;
                } else if (!strcmp(str, "ignore")) {
-                       /* do nothing */
+                       return UNBORN_IGNORE;
                } else {
                        die(_("invalid value for '%s': '%s'"),
                            "lsrefs.unborn", str);
                }
        }
-       config_read = 1;
 }
 
 /*
@@ -159,7 +154,6 @@ int ls_refs(struct repository *r, struct packet_reader *request)
        strbuf_init(&data.buf, 0);
        string_list_init_dup(&data.hidden_refs);
 
-       ensure_config_read();
        git_config(ls_refs_config, &data);
 
        while (packet_reader_read(request) == PACKET_READ_NORMAL) {
@@ -175,7 +169,7 @@ int ls_refs(struct repository *r, struct packet_reader *request)
                                strvec_push(&data.prefixes, out);
                }
                else if (!strcmp("unborn", arg))
-                       data.unborn = allow_unborn;
+                       data.unborn = !!unborn_config(r);
                else
                        die(_("unexpected line: '%s'"), arg);
        }
@@ -206,11 +200,8 @@ int ls_refs(struct repository *r, struct packet_reader *request)
 
 int ls_refs_advertise(struct repository *r, struct strbuf *value)
 {
-       if (value) {
-               ensure_config_read();
-               if (advertise_unborn)
-                       strbuf_addstr(value, "unborn");
-       }
+       if (value && unborn_config(r) == UNBORN_ADVERTISE)
+               strbuf_addstr(value, "unborn");
 
        return 1;
 }
index 833d28612f77473e9a50d6329ba55bd9706ba81d..9f1495ddcf1e1df362038bd72ad286595372cde3 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
+#include "gettext.h"
+#include "hex.h"
 #include "utf8.h"
 #include "strbuf.h"
 #include "mailinfo.h"
index 49398e599fe3afdc88f481608fb58b0887b019e3..c38dcbac7c6e241b957348465702ea16e21f7774 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "tree.h"
 #include "tree-walk.h"
 #include "object-store.h"
index 599d8e895f81216e0e0cb44696734cb2a157309b..c34846d176c886ecb9f028ec48bb847402d242f9 100644 (file)
@@ -2,7 +2,7 @@
  * Memory Pool implementation logic.
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
 #include "mem-pool.h"
 
 #define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))
index 8138090f81cf726ee9834daa7edbfc5b542aec44..aedcab81138ebe1e4b2e38cf6dcbb93f6f8dcb80 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "run-command.h"
 #include "xdiff-interface.h"
 #include "ll-merge.h"
index d1611ca400a40b05914a14759a009bf16d76f5ce..4c5be8ed910df704839024affc98cf265492012e 100644 (file)
@@ -26,6 +26,7 @@
 #include "diff.h"
 #include "diffcore.h"
 #include "dir.h"
+#include "hex.h"
 #include "entry.h"
 #include "ll-merge.h"
 #include "object-store.h"
index ae469f8cc81d58a2be40be4e0365c715866012ec..89731f40908e484d2a6e1b1f715c193f64d8bc74 100644 (file)
@@ -10,7 +10,6 @@
 #include "alloc.h"
 #include "attr.h"
 #include "blob.h"
-#include "builtin.h"
 #include "cache-tree.h"
 #include "commit.h"
 #include "commit-reach.h"
@@ -18,6 +17,7 @@
 #include "diff.h"
 #include "diffcore.h"
 #include "dir.h"
+#include "hex.h"
 #include "ll-merge.h"
 #include "lockfile.h"
 #include "object-store.h"
diff --git a/merge.c b/merge.c
index 445b4f19aa8618b5641f3f007e8cb42d9d39b57c..2c8b84568421b193f5032f3a9b095287666ddc46 100644 (file)
--- a/merge.c
+++ b/merge.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "commit.h"
 #include "run-command.h"
diff --git a/midx.c b/midx.c
index 7cfad04a24027c1f0703dafdeeb31989414a13c5..47989f7ea70931f53c00c7b385e66282d9f5e1b4 100644 (file)
--- a/midx.c
+++ b/midx.c
@@ -1,7 +1,9 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "csum-file.h"
 #include "dir.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "packfile.h"
 #include "object-store.h"
@@ -1607,7 +1609,7 @@ struct clear_midx_data {
        const char *ext;
 };
 
-static void clear_midx_file_ext(const char *full_path, size_t full_path_len,
+static void clear_midx_file_ext(const char *full_path, size_t full_path_len UNUSED,
                                const char *file_name, void *_data)
 {
        struct clear_midx_data *data = _data;
index 60569b83501a0d789452a934fcabcfc7aa5b24e4..7b729376867afee47c76aaf74901aa19f3615804 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "noop.h"
 #include "../commit.h"
 #include "../fetch-negotiator.h"
index 0f5ac48e87608ee9fee69efb94b51d985b60c707..264acf8bbeade378e1ba8358d8b39bcea5515693 100644 (file)
@@ -2,6 +2,7 @@
 #include "skipping.h"
 #include "../commit.h"
 #include "../fetch-negotiator.h"
+#include "../hex.h"
 #include "../prio-queue.h"
 #include "../refs.h"
 #include "../tag.h"
@@ -50,7 +51,7 @@ struct data {
        int non_common_revs;
 };
 
-static int compare(const void *a_, const void *b_, void *unused)
+static int compare(const void *a_, const void *b_, void *data UNUSED)
 {
        const struct entry *a = a_;
        const struct entry *b = b_;
index b4cc594a790965aca297fe87392a50b643e6fb41..5b1a9ff13f77238d23a18bd54a0049669f875ff7 100644 (file)
@@ -5,6 +5,7 @@
 #include "repository.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "xdiff-interface.h"
 #include "ll-merge.h"
 #include "dir.h"
diff --git a/notes.c b/notes.c
index f2805d51bb15131c46d41fa9554c43ab2e9a492d..a7187236e981ff0bd4d996bdcfedee6fe6767315 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "notes.h"
 #include "object-store.h"
 #include "blob.h"
@@ -752,7 +753,7 @@ static int write_each_non_note_until(const char *note_path,
        return 0;
 }
 
-static int write_each_note(const struct object_id *object_oid,
+static int write_each_note(const struct object_id *object_oid UNUSED,
                const struct object_id *note_oid, char *note_path,
                void *cb_data)
 {
@@ -780,8 +781,9 @@ struct note_delete_list {
 };
 
 static int prune_notes_helper(const struct object_id *object_oid,
-               const struct object_id *note_oid, char *note_path,
-               void *cb_data)
+                             const struct object_id *note_oid UNUSED,
+                             char *note_path UNUSED,
+                             void *cb_data)
 {
        struct note_delete_list **l = (struct note_delete_list **) cb_data;
        struct note_delete_list *n;
@@ -848,8 +850,8 @@ int combine_notes_overwrite(struct object_id *cur_oid,
        return 0;
 }
 
-int combine_notes_ignore(struct object_id *cur_oid,
-                        const struct object_id *new_oid)
+int combine_notes_ignore(struct object_id *cur_oid UNUSED,
+                        const struct object_id *new_oid UNUSED)
 {
        return 0;
 }
index 939865c1ae0566ba577861505f2ecf2e9fd19eeb..8fab8dbe80bb33cd09f8d31fead747095cce3288 100644 (file)
@@ -6,8 +6,10 @@
  * This handles basic git object files - packing, unpacking,
  * creation etc.
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "string-list.h"
 #include "lockfile.h"
 #include "delta.h"
@@ -2644,7 +2646,8 @@ int for_each_loose_object(each_loose_object_fn cb, void *data,
        return 0;
 }
 
-static int append_loose_object(const struct object_id *oid, const char *path,
+static int append_loose_object(const struct object_id *oid,
+                              const char *path UNUSED,
                               void *data)
 {
        oidtree_insert(data, oid);
index 2dd1a0f56e1e442dec47dfbbcdd46d58aecc812c..61e8540f2ec26281436be0422fdcd93d2098e997 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "tag.h"
 #include "commit.h"
 #include "tree.h"
@@ -223,7 +224,7 @@ static int finish_object_disambiguation(struct disambiguate_state *ds,
 
 static int disambiguate_commit_only(struct repository *r,
                                    const struct object_id *oid,
-                                   void *cb_data_unused)
+                                   void *cb_data UNUSED)
 {
        int kind = oid_object_info(r, oid, NULL);
        return kind == OBJ_COMMIT;
@@ -231,7 +232,7 @@ static int disambiguate_commit_only(struct repository *r,
 
 static int disambiguate_committish_only(struct repository *r,
                                        const struct object_id *oid,
-                                       void *cb_data_unused)
+                                       void *cb_data UNUSED)
 {
        struct object *obj;
        int kind;
@@ -251,7 +252,7 @@ static int disambiguate_committish_only(struct repository *r,
 
 static int disambiguate_tree_only(struct repository *r,
                                  const struct object_id *oid,
-                                 void *cb_data_unused)
+                                 void *cb_data UNUSED)
 {
        int kind = oid_object_info(r, oid, NULL);
        return kind == OBJ_TREE;
@@ -259,7 +260,7 @@ static int disambiguate_tree_only(struct repository *r,
 
 static int disambiguate_treeish_only(struct repository *r,
                                     const struct object_id *oid,
-                                    void *cb_data_unused)
+                                    void *cb_data UNUSED)
 {
        struct object *obj;
        int kind;
@@ -279,7 +280,7 @@ static int disambiguate_treeish_only(struct repository *r,
 
 static int disambiguate_blob_only(struct repository *r,
                                  const struct object_id *oid,
-                                 void *cb_data_unused)
+                                 void *cb_data UNUSED)
 {
        int kind = oid_object_info(r, oid, NULL);
        return kind == OBJ_BLOB;
@@ -473,7 +474,7 @@ static int collect_ambiguous(const struct object_id *oid, void *data)
        return 0;
 }
 
-static int repo_collect_ambiguous(struct repository *r,
+static int repo_collect_ambiguous(struct repository *r UNUSED,
                                  const struct object_id *oid,
                                  void *data)
 {
@@ -665,7 +666,7 @@ static int extend_abbrev_len(const struct object_id *oid, void *cb_data)
        return 0;
 }
 
-static int repo_extend_abbrev_len(struct repository *r,
+static int repo_extend_abbrev_len(struct repository *r UNUSED,
                                  const struct object_id *oid,
                                  void *cb_data)
 {
@@ -898,6 +899,7 @@ static int get_oid_basic(struct repository *r, const char *str, int len,
        char *real_ref = NULL;
        int refs_found = 0;
        int at, reflog_len, nth_prior = 0;
+       int fatal = !(flags & GET_OID_QUIETLY);
 
        if (len == r->hash_algo->hexsz && !get_oid_hex(str, oid)) {
                if (warn_ambiguous_refs && warn_on_object_refname_ambiguity) {
@@ -952,11 +954,11 @@ static int get_oid_basic(struct repository *r, const char *str, int len,
 
        if (!len && reflog_len)
                /* allow "@{...}" to mean the current branch reflog */
-               refs_found = repo_dwim_ref(r, "HEAD", 4, oid, &real_ref, 0);
+               refs_found = repo_dwim_ref(r, "HEAD", 4, oid, &real_ref, !fatal);
        else if (reflog_len)
                refs_found = repo_dwim_log(r, str, len, oid, &real_ref);
        else
-               refs_found = repo_dwim_ref(r, str, len, oid, &real_ref, 0);
+               refs_found = repo_dwim_ref(r, str, len, oid, &real_ref, !fatal);
 
        if (!refs_found)
                return -1;
index 1a713d89d7c872bfd253c4a88bec6efa8ed597f8..82201ec3e7b09ca5fa53b5be9d5ce8d144c1d42e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef OBJECT_STORE_H
 #define OBJECT_STORE_H
 
-#include "cache.h"
+#include "object.h"
 #include "oidmap.h"
 #include "list.h"
 #include "oid-array.h"
@@ -284,6 +284,69 @@ int pretend_object_file(void *, unsigned long, enum object_type,
 
 int force_object_loose(const struct object_id *oid, time_t mtime);
 
+struct object_info {
+       /* Request */
+       enum object_type *typep;
+       unsigned long *sizep;
+       off_t *disk_sizep;
+       struct object_id *delta_base_oid;
+       struct strbuf *type_name;
+       void **contentp;
+
+       /* Response */
+       enum {
+               OI_CACHED,
+               OI_LOOSE,
+               OI_PACKED,
+               OI_DBCACHED
+       } whence;
+       union {
+               /*
+                * struct {
+                *      ... Nothing to expose in this case
+                * } cached;
+                * struct {
+                *      ... Nothing to expose in this case
+                * } loose;
+                */
+               struct {
+                       struct packed_git *pack;
+                       off_t offset;
+                       unsigned int is_delta;
+               } packed;
+       } u;
+};
+
+/*
+ * Initializer for a "struct object_info" that wants no items. You may
+ * also memset() the memory to all-zeroes.
+ */
+#define OBJECT_INFO_INIT { 0 }
+
+/* Invoke lookup_replace_object() on the given hash */
+#define OBJECT_INFO_LOOKUP_REPLACE 1
+/* Allow reading from a loose object file of unknown/bogus type */
+#define OBJECT_INFO_ALLOW_UNKNOWN_TYPE 2
+/* Do not retry packed storage after checking packed and loose storage */
+#define OBJECT_INFO_QUICK 8
+/*
+ * Do not attempt to fetch the object if missing (even if fetch_is_missing is
+ * nonzero).
+ */
+#define OBJECT_INFO_SKIP_FETCH_OBJECT 16
+/*
+ * This is meant for bulk prefetching of missing blobs in a partial
+ * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
+ */
+#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
+
+/* Die if object corruption (not just an object being missing) was detected. */
+#define OBJECT_INFO_DIE_IF_CORRUPT 32
+
+int oid_object_info_extended(struct repository *r,
+                            const struct object_id *,
+                            struct object_info *, unsigned flags);
+
 /*
  * Open the loose object at path, check its hash, and return the contents,
  * use the "oi" argument to assert things about the object, or e.g. populate its
@@ -381,69 +444,6 @@ static inline void obj_read_unlock(void)
                pthread_mutex_unlock(&obj_read_mutex);
 }
 
-struct object_info {
-       /* Request */
-       enum object_type *typep;
-       unsigned long *sizep;
-       off_t *disk_sizep;
-       struct object_id *delta_base_oid;
-       struct strbuf *type_name;
-       void **contentp;
-
-       /* Response */
-       enum {
-               OI_CACHED,
-               OI_LOOSE,
-               OI_PACKED,
-               OI_DBCACHED
-       } whence;
-       union {
-               /*
-                * struct {
-                *      ... Nothing to expose in this case
-                * } cached;
-                * struct {
-                *      ... Nothing to expose in this case
-                * } loose;
-                */
-               struct {
-                       struct packed_git *pack;
-                       off_t offset;
-                       unsigned int is_delta;
-               } packed;
-       } u;
-};
-
-/*
- * Initializer for a "struct object_info" that wants no items. You may
- * also memset() the memory to all-zeroes.
- */
-#define OBJECT_INFO_INIT { 0 }
-
-/* Invoke lookup_replace_object() on the given hash */
-#define OBJECT_INFO_LOOKUP_REPLACE 1
-/* Allow reading from a loose object file of unknown/bogus type */
-#define OBJECT_INFO_ALLOW_UNKNOWN_TYPE 2
-/* Do not retry packed storage after checking packed and loose storage */
-#define OBJECT_INFO_QUICK 8
-/*
- * Do not attempt to fetch the object if missing (even if fetch_is_missing is
- * nonzero).
- */
-#define OBJECT_INFO_SKIP_FETCH_OBJECT 16
-/*
- * This is meant for bulk prefetching of missing blobs in a partial
- * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
- */
-#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
-
-/* Die if object corruption (not just an object being missing) was detected. */
-#define OBJECT_INFO_DIE_IF_CORRUPT 32
-
-int oid_object_info_extended(struct repository *r,
-                            const struct object_id *,
-                            struct object_info *, unsigned flags);
-
 /*
  * Iterate over the files in the loose-object parts of the object
  * directory "path", triggering the following callbacks:
index 344087de4de5184fcbfb599277180cec8f39c474..609fed1b73da3c18661c2f04f06c97790103bd5a 100644 (file)
--- a/object.c
+++ b/object.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "object.h"
 #include "replace-object.h"
 #include "object-store.h"
index 31ebe114585bb14cb95f4c74486635754d199955..fc45b158da095d750d9dc55b93282aabe997e7f1 100644 (file)
--- a/object.h
+++ b/object.h
@@ -1,7 +1,7 @@
 #ifndef OBJECT_H
 #define OBJECT_H
 
-#include "cache.h"
+#include "hash.h"
 
 struct buffer_slab;
 
@@ -81,6 +81,26 @@ struct object_array {
  */
 #define FLAG_BITS  28
 
+#define TYPE_BITS 3
+
+/*
+ * Values in this enum (except those outside the 3 bit range) are part
+ * of pack file format. See gitformat-pack(5) for more information.
+ */
+enum object_type {
+       OBJ_BAD = -1,
+       OBJ_NONE = 0,
+       OBJ_COMMIT = 1,
+       OBJ_TREE = 2,
+       OBJ_BLOB = 3,
+       OBJ_TAG = 4,
+       /* 5 for future expansion */
+       OBJ_OFS_DELTA = 6,
+       OBJ_REF_DELTA = 7,
+       OBJ_ANY,
+       OBJ_MAX
+};
+
 /*
  * The object type is stored in 3 bits.
  */
index 73ba76e9e9a223306a03c3d04123c0c4af4aeda2..e8228c777b1619d6bd1baaac0e24f14124d3e4d3 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "oid-array.h"
 #include "hash-lookup.h"
 
index 49965fe856814393c9381788dced2b05d35aed1f..8c1a139c974d360afcd9b23608484af134d77c9f 100644 (file)
--- a/oidmap.c
+++ b/oidmap.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "oidmap.h"
 
 static int oidmap_neq(const void *hashmap_cmp_fn_data UNUSED,
index c66a83ab1d6891dbe6916d13339b64456b8cc440..c1642927fa614764312b0ebccd05a77d12a07388 100644 (file)
--- a/oidmap.h
+++ b/oidmap.h
@@ -1,7 +1,6 @@
 #ifndef OIDMAP_H
 #define OIDMAP_H
 
-#include "cache.h"
 #include "hashmap.h"
 
 /*
index b36a2bae86470236a51ffe6bec7792222de478fe..d1e5376316ecd5f9dcf549e1067697283bdc712c 100644 (file)
--- a/oidset.c
+++ b/oidset.c
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "oidset.h"
+#include "hex.h"
+#include "strbuf.h"
 
 void oidset_init(struct oidset *set, size_t initial_size)
 {
index 0d39389bee29be3f0496185331df1ac85f87003b..7d57b7b19e364706f037ccb44388e00e901b1583 100644 (file)
--- a/oidtree.c
+++ b/oidtree.c
@@ -2,6 +2,7 @@
  * A wrapper around cbtree which stores oids
  * May be used to replace oid-array for prefix (abbreviation) matches
  */
+#include "git-compat-util.h"
 #include "oidtree.h"
 #include "alloc.h"
 #include "hash.h"
index 914026f5d80f876c8a7c28a914a58295a5a72346..2992079dd97d75892f4f411cd4a979f459d68170 100644 (file)
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "commit-graph.h"
 #include "repository.h"
 
index 99da1d0fd385eb3bc0c7f0b4a0b8cd167e0cb5e0..150c0f5fa2d7ec2b9dd6a14f6000e5b58b753aa9 100644 (file)
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "packfile.h"
 
 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
index 0c3d777aac8de618a36777c5c82edae302c1bbcc..609a343ee3ea41e6c4f18f0d07a104922dc952f2 100644 (file)
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "object-store.h"
 #include "packfile.h"
 
index cfa67a510fd9a98ec5461084d08373086de858d5..891d9d2772ea33253e309a6b83676dbc8e19a07e 100644 (file)
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "object-store.h"
 #include "commit.h"
 #include "tag.h"
index d2a42abf28cc7246b3d076b1c855a350edcded70..ca7c81b5c9f2770daf79d4fe15b889ac4e8b5251 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "commit.h"
+#include "hex.h"
 #include "strbuf.h"
 #include "tag.h"
 #include "diff.h"
@@ -951,7 +953,8 @@ static void show_object(struct object *object, const char *name, void *data_)
        bitmap_set(data->base, bitmap_pos);
 }
 
-static void show_commit(struct commit *commit, void *data)
+static void show_commit(struct commit *commit UNUSED,
+                       void *data UNUSED)
 {
 }
 
@@ -1940,7 +1943,8 @@ static void test_bitmap_type(struct bitmap_test_data *tdata,
                    type_name(bitmap_type));
 }
 
-static void test_show_object(struct object *object, const char *name,
+static void test_show_object(struct object *object,
+                            const char *name UNUSED,
                             void *data)
 {
        struct bitmap_test_data *tdata = data;
index bfb593ba7261a18a8283604f4e1cfdd10eb978f6..7ed594d6679744759956c200d63f09219ed0537b 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "repository.h"
 #include "pack.h"
 #include "pack-revindex.h"
index cc957b3e852716541f764a40641462cb39fe0407..107327cec0bc5202051b6139e926fd27a1ce6c9c 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef PACK_MTIMES_H
 #define PACK_MTIMES_H
 
-#include "git-compat-util.h"
-
 #define MTIMES_SIGNATURE 0x4d544d45 /* "MTME" */
 #define MTIMES_VERSION 1
 
index 272e8d451739e8466a35df155520c9c54d85e75c..ccab09fe654391ef8da95c4f4ecf0bf55d5f3df7 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "object.h"
 #include "pack.h"
 #include "pack-objects.h"
index 336372974872882a235598d254c876e31c49b24a..041e573bc164ca1fc8568f270957cc8ba68fc247 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "pack.h"
 #include "csum-file.h"
 #include "remote.h"
index 79e21ab18e7844461c3743e45ebb7ccc1022caea..2023df1b75b4a4694e49a08ca9c21f61f013659a 100644 (file)
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "list.h"
 #include "pack.h"
 #include "repository.h"
@@ -1008,6 +1010,16 @@ void reprepare_packed_git(struct repository *r)
        struct object_directory *odb;
 
        obj_read_lock();
+
+       /*
+        * Reprepare alt odbs, in case the alternates file was modified
+        * during the course of this process. This only _adds_ odbs to
+        * the linked list, so existing odbs will continue to exist for
+        * the lifetime of the process.
+        */
+       r->objects->loaded_alternates = 0;
+       prepare_alt_odb(r);
+
        for (odb = r->objects->odb; odb; odb = odb->next)
                odb_clear_loose_cache(odb);
 
@@ -2204,8 +2216,8 @@ int for_each_packed_object(each_packed_object_fn cb, void *data,
 }
 
 static int add_promisor_object(const struct object_id *oid,
-                              struct packed_git *pack,
-                              uint32_t pos,
+                              struct packed_git *pack UNUSED,
+                              uint32_t pos UNUSED,
                               void *set_)
 {
        struct oidset *set = set_;
index 4f6819f2406ea8f90651b7769cbaf1758ce4c098..2455aa356db920f00b9e025bcc5134468ce18ef0 100644 (file)
@@ -1,6 +1,8 @@
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "entry.h"
+#include "hex.h"
 #include "parallel-checkout.h"
 #include "pkt-line.h"
 #include "progress.h"
index fd4743293fc48f9453499ad4f9695462b9c08217..6dd4c090e03f39c6dd5e73695c1a8b8e82d2bc49 100644 (file)
@@ -59,12 +59,12 @@ static enum parse_opt_result get_arg(struct parse_opt_ctx_t *p,
        return 0;
 }
 
-static void fix_filename(const char *prefix, const char **file)
+static void fix_filename(const char *prefix, char **file)
 {
-       if (!file || !*file || !prefix || is_absolute_path(*file)
-           || !strcmp("-", *file))
-               return;
-       *file = prefix_filename(prefix, *file);
+       if (!file || !*file)
+               ; /* leave as NULL */
+       else
+               *file = prefix_filename_except_for_dash(prefix, *file);
 }
 
 static enum parse_opt_result opt_command_mode_error(
@@ -177,7 +177,7 @@ static enum parse_opt_result get_value(struct parse_opt_ctx_t *p,
                        err = get_arg(p, opt, flags, (const char **)opt->value);
 
                if (!err)
-                       fix_filename(p->prefix, (const char **)opt->value);
+                       fix_filename(p->prefix, (char **)opt->value);
                return err;
 
        case OPTION_CALLBACK:
index 50d852f2991738c951bb447ce8206640aabb8a80..26f19384e50ff6fcb7cbae915fa69468afa93faf 100644 (file)
@@ -158,71 +158,202 @@ struct option {
        parse_opt_subcommand_fn *subcommand_fn;
 };
 
-#define OPT_BIT_F(s, l, v, h, b, f) { OPTION_BIT, (s), (l), (v), NULL, (h), \
-                                     PARSE_OPT_NOARG|(f), NULL, (b) }
-#define OPT_COUNTUP_F(s, l, v, h, f) { OPTION_COUNTUP, (s), (l), (v), NULL, \
-                                      (h), PARSE_OPT_NOARG|(f) }
-#define OPT_SET_INT_F(s, l, v, h, i, f) { OPTION_SET_INT, (s), (l), (v), NULL, \
-                                         (h), PARSE_OPT_NOARG | (f), NULL, (i) }
+#define OPT_BIT_F(s, l, v, h, b, f) { \
+       .type = OPTION_BIT, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG|(f), \
+       .callback = NULL, \
+       .defval = (b), \
+}
+#define OPT_COUNTUP_F(s, l, v, h, f) { \
+       .type = OPTION_COUNTUP, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG|(f), \
+}
+#define OPT_SET_INT_F(s, l, v, h, i, f) { \
+       .type = OPTION_SET_INT, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG | (f), \
+       .defval = (i), \
+}
 #define OPT_BOOL_F(s, l, v, h, f)   OPT_SET_INT_F(s, l, v, h, 1, f)
-#define OPT_CALLBACK_F(s, l, v, a, h, f, cb)                   \
-       { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), (cb) }
-#define OPT_STRING_F(s, l, v, a, h, f)   { OPTION_STRING,  (s), (l), (v), (a), (h), (f) }
-#define OPT_INTEGER_F(s, l, v, h, f)     { OPTION_INTEGER, (s), (l), (v), N_("n"), (h), (f) }
+#define OPT_CALLBACK_F(s, l, v, a, h, f, cb) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = (a), \
+       .help = (h), \
+       .flags = (f), \
+       .callback = (cb), \
+}
+#define OPT_STRING_F(s, l, v, a, h, f) { \
+       .type = OPTION_STRING, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = (a), \
+       .help = (h), \
+       .flags = (f), \
+}
+#define OPT_INTEGER_F(s, l, v, h, f) { \
+       .type = OPTION_INTEGER, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("n"), \
+       .help = (h), \
+       .flags = (f), \
+}
 
-#define OPT_END()                   { OPTION_END }
-#define OPT_GROUP(h)                { OPTION_GROUP, 0, NULL, NULL, NULL, (h) }
+#define OPT_END() { \
+       .type = OPTION_END, \
+}
+#define OPT_GROUP(h) { \
+       .type = OPTION_GROUP, \
+       .help = (h), \
+}
 #define OPT_BIT(s, l, v, h, b)      OPT_BIT_F(s, l, v, h, b, 0)
-#define OPT_BITOP(s, l, v, h, set, clear) { OPTION_BITOP, (s), (l), (v), NULL, (h), \
-                                           PARSE_OPT_NOARG|PARSE_OPT_NONEG, NULL, \
-                                           (set), NULL, (clear) }
-#define OPT_NEGBIT(s, l, v, h, b)   { OPTION_NEGBIT, (s), (l), (v), NULL, \
-                                     (h), PARSE_OPT_NOARG, NULL, (b) }
+#define OPT_BITOP(s, l, v, h, set, clear) { \
+       .type = OPTION_BITOP, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG|PARSE_OPT_NONEG, \
+       .defval = (set), \
+       .extra = (clear), \
+}
+#define OPT_NEGBIT(s, l, v, h, b) { \
+       .type = OPTION_NEGBIT, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG, \
+       .defval = (b), \
+}
 #define OPT_COUNTUP(s, l, v, h)     OPT_COUNTUP_F(s, l, v, h, 0)
 #define OPT_SET_INT(s, l, v, h, i)  OPT_SET_INT_F(s, l, v, h, i, 0)
 #define OPT_BOOL(s, l, v, h)        OPT_BOOL_F(s, l, v, h, 0)
-#define OPT_HIDDEN_BOOL(s, l, v, h) { OPTION_SET_INT, (s), (l), (v), NULL, \
-                                     (h), PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1}
-#define OPT_CMDMODE_F(s, l, v, h, i, f)  { OPTION_SET_INT, (s), (l), (v), NULL, \
-                                     (h), PARSE_OPT_CMDMODE|PARSE_OPT_NOARG|PARSE_OPT_NONEG | (f), NULL, (i) }
+#define OPT_HIDDEN_BOOL(s, l, v, h) { \
+       .type = OPTION_SET_INT, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, \
+       .defval = 1, \
+}
+#define OPT_CMDMODE_F(s, l, v, h, i, f) { \
+       .type = OPTION_SET_INT, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_CMDMODE|PARSE_OPT_NOARG|PARSE_OPT_NONEG | (f), \
+       .defval = (i), \
+}
 #define OPT_CMDMODE(s, l, v, h, i)  OPT_CMDMODE_F(s, l, v, h, i, 0)
 
 #define OPT_INTEGER(s, l, v, h)     OPT_INTEGER_F(s, l, v, h, 0)
-#define OPT_MAGNITUDE(s, l, v, h)   { OPTION_MAGNITUDE, (s), (l), (v), \
-                                     N_("n"), (h), PARSE_OPT_NONEG }
+#define OPT_MAGNITUDE(s, l, v, h) { \
+       .type = OPTION_MAGNITUDE, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("n"), \
+       .help = (h), \
+       .flags = PARSE_OPT_NONEG, \
+}
 #define OPT_STRING(s, l, v, a, h)   OPT_STRING_F(s, l, v, a, h, 0)
-#define OPT_STRING_LIST(s, l, v, a, h) \
-                                   { OPTION_CALLBACK, (s), (l), (v), (a), \
-                                     (h), 0, &parse_opt_string_list }
-#define OPT_UYN(s, l, v, h)         { OPTION_CALLBACK, (s), (l), (v), NULL, \
-                                     (h), PARSE_OPT_NOARG, &parse_opt_tertiary }
-#define OPT_EXPIRY_DATE(s, l, v, h) \
-       { OPTION_CALLBACK, (s), (l), (v), N_("expiry-date"),(h), 0,     \
-         parse_opt_expiry_date_cb }
-#define OPT_CALLBACK(s, l, v, a, h, f) OPT_CALLBACK_F(s, l, v, a, h, 0, f)
-#define OPT_NUMBER_CALLBACK(v, h, f) \
-       { OPTION_NUMBER, 0, NULL, (v), NULL, (h), \
-         PARSE_OPT_NOARG | PARSE_OPT_NONEG, (f) }
-#define OPT_FILENAME(s, l, v, h)    { OPTION_FILENAME, (s), (l), (v), \
-                                      N_("file"), (h) }
-#define OPT_COLOR_FLAG(s, l, v, h) \
-       { OPTION_CALLBACK, (s), (l), (v), N_("when"), (h), PARSE_OPT_OPTARG, \
-               parse_opt_color_flag_cb, (intptr_t)"always" }
-
-#define OPT_NOOP_NOARG(s, l) \
-       { OPTION_CALLBACK, (s), (l), NULL, NULL, \
-         N_("no-op (backward compatibility)"),         \
-         PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, parse_opt_noop_cb }
-
-#define OPT_ALIAS(s, l, source_long_name) \
-       { OPTION_ALIAS, (s), (l), (source_long_name) }
+#define OPT_STRING_LIST(s, l, v, a, h) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = (a), \
+       .help = (h), \
+       .callback = &parse_opt_string_list, \
+}
+#define OPT_UYN(s, l, v, h) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG, \
+       .callback = &parse_opt_tertiary, \
+}
+#define OPT_EXPIRY_DATE(s, l, v, h) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("expiry-date"), \
+       .help = (h), \
+       .callback = parse_opt_expiry_date_cb, \
+}
+#define OPT_CALLBACK(s, l, v, a, h, cb) OPT_CALLBACK_F(s, l, v, a, h, 0, cb)
+#define OPT_NUMBER_CALLBACK(v, h, cb) { \
+       .type = OPTION_NUMBER, \
+       .value = (v), \
+       .help = (h), \
+       .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, \
+       .callback = (cb), \
+}
+#define OPT_FILENAME(s, l, v, h) { \
+       .type = OPTION_FILENAME, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("file"), \
+       .help = (h), \
+}
+#define OPT_COLOR_FLAG(s, l, v, h) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("when"), \
+       .help = (h), \
+       .flags = PARSE_OPT_OPTARG, \
+       .callback = parse_opt_color_flag_cb, \
+       .defval = (intptr_t)"always", \
+}
+
+#define OPT_NOOP_NOARG(s, l) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .help = N_("no-op (backward compatibility)"), \
+       .flags = PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, \
+       .callback = parse_opt_noop_cb, \
+}
+
+#define OPT_ALIAS(s, l, source_long_name) { \
+       .type = OPTION_ALIAS, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (source_long_name), \
+}
 
 #define OPT_SUBCOMMAND_F(l, v, fn, f) { \
        .type = OPTION_SUBCOMMAND, \
        .long_name = (l), \
        .value = (v), \
        .flags = (f), \
-       .subcommand_fn = (fn) }
+       .subcommand_fn = (fn), \
+}
 #define OPT_SUBCOMMAND(l, v, fn)    OPT_SUBCOMMAND_F((l), (v), (fn), 0)
 
 /*
@@ -358,34 +489,80 @@ int parse_opt_tracking_mode(const struct option *, const char *, int);
 
 #define OPT__VERBOSE(var, h)  OPT_COUNTUP('v', "verbose", (var), (h))
 #define OPT__QUIET(var, h)    OPT_COUNTUP('q', "quiet",   (var), (h))
-#define OPT__VERBOSITY(var) \
-       { OPTION_CALLBACK, 'v', "verbose", (var), NULL, N_("be more verbose"), \
-         PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \
-       { OPTION_CALLBACK, 'q', "quiet", (var), NULL, N_("be more quiet"), \
-         PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }
+#define OPT__VERBOSITY(var) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = 'v', \
+       .long_name = "verbose", \
+       .value = (var), \
+       .help = N_("be more verbose"), \
+       .flags = PARSE_OPT_NOARG, \
+       .callback = &parse_opt_verbosity_cb, \
+}, { \
+       .type = OPTION_CALLBACK, \
+       .short_name = 'q', \
+       .long_name = "quiet", \
+       .value = (var), \
+       .help = N_("be more quiet"), \
+       .flags = PARSE_OPT_NOARG, \
+       .callback = &parse_opt_verbosity_cb, \
+}
 #define OPT__DRY_RUN(var, h)  OPT_BOOL('n', "dry-run", (var), (h))
 #define OPT__FORCE(var, h, f) OPT_COUNTUP_F('f', "force",   (var), (h), (f))
-#define OPT__ABBREV(var)  \
-       { OPTION_CALLBACK, 0, "abbrev", (var), N_("n"), \
-         N_("use <n> digits to display object names"), \
-         PARSE_OPT_OPTARG, &parse_opt_abbrev_cb, 0 }
+#define OPT__ABBREV(var) { \
+       .type = OPTION_CALLBACK, \
+       .long_name = "abbrev", \
+       .value = (var), \
+       .argh = N_("n"), \
+       .help = N_("use <n> digits to display object names"), \
+       .flags = PARSE_OPT_OPTARG, \
+       .callback = &parse_opt_abbrev_cb, \
+}
 #define OPT__SUPER_PREFIX(var) \
        OPT_STRING_F(0, "super-prefix", (var), N_("prefix"), \
                N_("prefixed path to initial superproject"), PARSE_OPT_HIDDEN)
 
 #define OPT__COLOR(var, h) \
        OPT_COLOR_FLAG(0, "color", (var), (h))
-#define OPT_COLUMN(s, l, v, h) \
-       { OPTION_CALLBACK, (s), (l), (v), N_("style"), (h), PARSE_OPT_OPTARG, parseopt_column_callback }
-#define OPT_PASSTHRU(s, l, v, a, h, f) \
-       { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), parse_opt_passthru }
-#define OPT_PASSTHRU_ARGV(s, l, v, a, h, f) \
-       { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), parse_opt_passthru_argv }
-#define _OPT_CONTAINS_OR_WITH(name, variable, help, flag) \
-       { OPTION_CALLBACK, 0, name, (variable), N_("commit"), (help), \
-         PARSE_OPT_LASTARG_DEFAULT | flag, \
-         parse_opt_commits, (intptr_t) "HEAD" \
-       }
+#define OPT_COLUMN(s, l, v, h) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("style"), \
+       .help = (h), \
+       .flags = PARSE_OPT_OPTARG, \
+       .callback = parseopt_column_callback, \
+}
+#define OPT_PASSTHRU(s, l, v, a, h, f) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = (a), \
+       .help = (h), \
+       .flags = (f), \
+       .callback = parse_opt_passthru, \
+}
+#define OPT_PASSTHRU_ARGV(s, l, v, a, h, f) { \
+       .type = OPTION_CALLBACK, \
+       .short_name = (s), \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = (a), \
+       .help = (h), \
+       .flags = (f), \
+       .callback = parse_opt_passthru_argv, \
+}
+#define _OPT_CONTAINS_OR_WITH(l, v, h, f) { \
+       .type = OPTION_CALLBACK, \
+       .long_name = (l), \
+       .value = (v), \
+       .argh = N_("commit"), \
+       .help = (h), \
+       .flags = PARSE_OPT_LASTARG_DEFAULT | (f), \
+       .callback = parse_opt_commits, \
+       .defval = (intptr_t) "HEAD", \
+}
 #define OPT_CONTAINS(v, h) _OPT_CONTAINS_OR_WITH("contains", v, h, PARSE_OPT_NONEG)
 #define OPT_NO_CONTAINS(v, h) _OPT_CONTAINS_OR_WITH("no-contains", v, h, PARSE_OPT_NONEG)
 #define OPT_WITH(v, h) _OPT_CONTAINS_OR_WITH("with", v, h, PARSE_OPT_HIDDEN | PARSE_OPT_NONEG)
index 31534466266ccd80cd02ce187a1a4c799934e056..a4473a88fa2f55b4f8e399fdcf4747f0e666a015 100644 (file)
@@ -2,6 +2,7 @@
 #include "diff.h"
 #include "commit.h"
 #include "hash-lookup.h"
+#include "hex.h"
 #include "patch-ids.h"
 
 static int patch_id_defined(struct commit *commit)
diff --git a/path.c b/path.c
index 492e17ad12106233ddde63b724992f388693be10..632a051809a3e69f79980b9f1a72fb10e842a084 100644 (file)
--- a/path.c
+++ b/path.c
@@ -2,6 +2,7 @@
  * Utilities for paths and pathnames
  */
 #include "cache.h"
+#include "hex.h"
 #include "repository.h"
 #include "strbuf.h"
 #include "string-list.h"
@@ -347,7 +348,8 @@ static void init_common_trie(void)
  * Helper function for update_common_dir: returns 1 if the dir
  * prefix is common.
  */
-static int check_common(const char *unmatched, void *value, void *baton)
+static int check_common(const char *unmatched, void *value,
+                       void *baton UNUSED)
 {
        struct common_dir *dir = value;
 
index dbcfe7b32169d7f29de7fea28c39d01169203342..ab70fcbe613526dd09e59cb87d2393c95409d28d 100644 (file)
@@ -545,7 +545,7 @@ static void NORETURN unsupported_magic(const char *pattern,
        }
        /*
         * We may want to substitute "this command" with a command
-        * name. E.g. when add--interactive dies when running
+        * name. E.g. when "git add -p" or "git add -i" dies when running
         * "checkout -p"
         */
        die(_("%s: pathspec magic not supported by this command: %s"),
index 41f6adfbb421fee745e3717ffd57ff92acfc82b1..a5b38e0907a9b8c498d643653d445ed7cd71fe02 100644 (file)
@@ -171,6 +171,11 @@ int match_pathspec_attrs(struct index_state *istate,
                         const char *name, int namelen,
                         const struct pathspec_item *item);
 
+int match_pathspec(struct index_state *istate,
+                  const struct pathspec *pathspec,
+                  const char *name, int namelen,
+                  int prefix, char *seen, int is_dir);
+
 /*
  * Determine whether a pathspec will match only entire index entries (non-sparse
  * files and/or entire sparse directories). If the pathspec has the potential to
index ce4e73b6833a48119dfc5f36b64daa8e962dc9c4..1ea7f8600ec6a47f069e508da99103ff8e42dbe3 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "pkt-line.h"
+#include "hex.h"
 #include "run-command.h"
 
 char packet_buffer[LARGE_PACKET_MAX];
index 79c538b99e477660fb8819d7fd0175daf4520cc5..8e9846f3151eece6ebd782d946645c61a6382eb1 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef PKTLINE_H
 #define PKTLINE_H
 
-#include "git-compat-util.h"
 #include "strbuf.h"
 #include "sideband.h"
 
index a2cd8a01b4cf09b72610f7658e76536535a54514..daec1326c06dd1597266c67d01b61b85312f54be 100644 (file)
--- a/po/bg.po
+++ b/po/bg.po
@@ -1,7 +1,7 @@
 # Bulgarian translation of git po-file.
-# Copyright (C) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Alexander Shopov <ash@kambanaria.org>.
+# Copyright (C) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Alexander Shopov <ash@kambanaria.org>.
 # This file is distributed under the same license as the git package.
-# Alexander Shopov <ash@kambanaria.org>, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022.
+# Alexander Shopov <ash@kambanaria.org>, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023.
 # ========================
 # DICTIONARY TO MERGE IN GIT GUI
 # ------------------------
 # scalar repo скаларно хранилище
 # unclean завършвам работа/задача с грешка
 # cache tree кеш за обекти-дървета
+# gitattributes file файл с атрибути на git
+# advertised обявен за наличен
+# superproject свръхпроект
+#
 # ------------------------
 # „$var“ - може да не сработва за shell има gettext и eval_gettext - проверка - намират се лесно по „$
 # ------------------------
 # for i in `sort -u FILES`; do cnt=`grep $i FILES | wc -l`; echo $cnt $i ;done | sort -n
 msgid ""
 msgstr ""
-"Project-Id-Version: git 2.39\n"
+"Project-Id-Version: git 2.40\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-12-06 15:52+0100\n"
-"PO-Revision-Date: 2022-12-06 16:55+0200\n"
+"POT-Creation-Date: 2023-03-01 01:20+0000\n"
+"PO-Revision-Date: 2023-03-02 08:54+0200\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@fsa-bg.org>\n"
 "Language: bg\n"
@@ -250,13 +254,13 @@ msgstr "неуспешно добавяне в индекса на „%s“"
 msgid "could not write index"
 msgstr "индексът не може да бъде записан"
 
-#, c-format, perl-format
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "%d файл обновен\n"
 msgstr[1] "%d файла обновени\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "БЕЛЕЖКА: „%s“ вече не се следи.\n"
 
@@ -270,7 +274,7 @@ msgstr "Отмяна"
 msgid "Could not parse HEAD^{tree}"
 msgstr "Указателят „HEAD^{tree}“ не може да бъде анализиран"
 
-#, c-format, perl-format
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "%d файл с отменени промѐни\n"
@@ -283,7 +287,7 @@ msgstr "Няма неследени файлове.\n"
 msgid "Add untracked"
 msgstr "Добавяне на неследени"
 
-#, c-format, perl-format
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "%d файл добавен\n"
@@ -377,19 +381,19 @@ msgstr "индексът не може да бъде обновен"
 msgid "Bye.\n"
 msgstr "Изход.\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Добавяне на промяната на права̀та за достъп [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Добавяне на изтриването [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Добавяне на добавянето [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Добавяне на това парче [y,n,q,a,d%s,?]? "
 
@@ -413,19 +417,19 @@ msgstr ""
 "a — добавяне на това и всички следващи парчета от файла в индекса\n"
 "d — без добавяне на това и всички следващи парчета от файла в индекса\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Скатаване на промяната на права̀та за достъп [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Скатаване на изтриването [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Скатаване на добавянето [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Скатаване на това парче [y,n,q,a,d%s,?]? "
 
@@ -449,19 +453,19 @@ msgstr ""
 "a — скатаване на това и всички следващи парчета от файла\n"
 "d — без скатаване на това и всички следващи парчета от файла\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Изваждане на промяната на права̀та за достъп [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Изваждане на изтриването [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Изваждане на добавянето [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Изваждане на това парче [y,n,q,a,d%s,?]? "
 
@@ -485,20 +489,20 @@ msgstr ""
 "a — изваждане на това и всички следващи парчета от файла от индекса\n"
 "d — без изваждане на това и всички следващи парчета от файла от индекса\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr ""
 "Прилагане на промяната на права̀та за достъп към индекса [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на изтриването към индекса [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на добавянето към индекса [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на това парче към индекса [y,n,q,a,d%s,?]? "
 
@@ -522,21 +526,21 @@ msgstr ""
 "a — прилагане на това и всички следващи парчета от файла към индекса\n"
 "d — без прилагане на това и всички следващи парчета от файла към индекса\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Премахване на промяната в права̀та за достъп от работното дърво [y,n,q,a,"
 "d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Премахване на изтриването от работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Премахване на добавянето от работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Премахване на парчето от работното дърво [y,n,q,a,d%s,?]? "
 
@@ -563,23 +567,23 @@ msgstr ""
 "d — без премахване на това и всички следващи парчета от файла от работното "
 "дърво\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Премахване на промяната в права̀та за достъп от индекса и работното дърво [y,"
 "n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Премахване на изтриването от индекса и работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Премахване на добавянето от индекса и работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Премахване на парчето от индекса и работното дърво [y,n,q,a,d%s,?]? "
 
@@ -599,22 +603,22 @@ msgstr ""
 "d — без премахване на това и всички следващи парчета от файла от индекса и "
 "работното дърво\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Прилагане на промяната в права̀та за достъп от индекса и работното дърво [y,n,"
 "q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Прилагане на изтриването от индекса и работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на добавянето от индекса и работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на парчето от индекса и работното дърво [y,n,q,a,d%s,?]? "
 
@@ -634,21 +638,21 @@ msgstr ""
 "d — без прилагане на това и всички следващи парчета от файла от индекса и "
 "работното дърво\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Прилагане на промяната в права̀та за достъп към работното дърво [y,n,q,a,"
 "d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на изтриването към работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на добавянето към работното дърво [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "Прилагане на парчето към работното дърво [y,n,q,a,d%s,?]? "
 
@@ -725,8 +729,6 @@ msgstr ""
 "За да пропуснете редовете, започващи с „%c“: изтрийте ги.\n"
 "Редовете, които започват с „%c“ ще бъдат пропуснати.\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -742,20 +744,12 @@ msgstr "заглавната част парчето не може да се а
 msgid "'git apply --cached' failed"
 msgstr "неуспешно изпълнение на „git apply --cached“"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
@@ -1621,6 +1615,12 @@ msgstr "изчитане на „.gitattributes“ в работната дир
 msgid "report archived files on stderr"
 msgstr "извеждане на архивираните файлове на стандартната грешка"
 
+msgid "time"
+msgstr "ВРЕМЕ"
+
+msgid "set modification time of archive entries"
+msgstr "задаване на ВРЕМЕ на промяна на елементите в архива"
+
 msgid "set compression level"
 msgstr "задаване на нивото на компресиране"
 
@@ -1661,6 +1661,13 @@ msgstr "Аргументът не се поддържа за форма̀та 
 msgid "%.*s is not a valid attribute name"
 msgstr "„%.*s“ е неправилно име за атрибут"
 
+msgid "unable to add additional attribute"
+msgstr "не може да се добави нов атрибут"
+
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "прескачане на прекалено дълъг ред за атрибути: %d"
+
 #, c-format
 msgid "%s not allowed: %s:%d"
 msgstr "%s: командата не е позволена: „%s:%d“"
@@ -1672,6 +1679,18 @@ msgstr ""
 "Отрицателните шаблони се игнорират в атрибутите на git.\n"
 "Ако ви трябва начална удивителна, ползвайте „\\!“."
 
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "неуспешно изпълнение на „fstat“ върху файла за атрибути на git „%s“"
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "прескачане на прекалено големия файл за атрибути на git: „%s“"
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "прескачане на прекалено големия обект-BLOB за атрибути на git: „%s“"
+
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
 msgstr "Неправилно цитирано съдържание във файла „%s“: %s"
@@ -1951,12 +1970,12 @@ msgstr "подмодул „%s“: подмодулът липсва"
 
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
 "Може да обновите подмодулите с командата:\n"
 "\n"
-"    git checkout %s && git submodule update --init"
+"    git checkout --no-recurse-submodules %s && git submodule update --init"
 
 #, c-format
 msgid "submodule '%s': cannot create branch '%s'"
@@ -1991,6 +2010,13 @@ msgstr "изтриване на „%s“\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "Промѐни, които и след обновяването на индекса не са добавени към него:"
 
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"Настройката „add.interactive.useBuiltin“ е премахната!\n"
+"За подробности я потърсете в изхода от „git help config“."
+
 msgid "Could not read the index"
 msgstr "Индексът не може да бъде прочетен"
 
@@ -2399,6 +2425,11 @@ msgstr "git am [ОПЦИЯ…] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "интерактивна работа"
 
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr ""
+"без изпълнение на куките преди прилагане на кръпка и съобщение преди "
+"прилагане на кръпка"
+
 msgid "historical option -- no-op"
 msgstr "изоставена опция, съществува по исторически причини, нищо не прави"
 
@@ -2548,31 +2579,28 @@ msgstr "git archive: протоколна грешка"
 msgid "git archive: expected a flush"
 msgstr "git archive: очакваше се изчистване на буферите чрез „flush“"
 
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [ПОДАВАНЕ]"
-
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=ЛОШО --term-{old,good}"
-"=ДОБРО] [--no-checkout] [--first-parent] [ЛОШО [ДОБРО…]] [--] [ПЪТ…]"
+"git bisect start [--term-{new,bad}=УПРАВЛЯВАЩА_ДУМА --term-{old,good}"
+"=УПРАВЛЯВАЩА_ДУМА] [--no-checkout] [--first-parent] [ЛОШО [ДОБРО…]] [--] "
+"[ПЪТ…]"
 
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (ЛОШО) [ВЕРСИЯ]"
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [ВЕРСИЯ…]"
 
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (ДОБРО) [ВЕРСИЯ…]"
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(ВЕРСИЯ|ДИАПАЗОН)…]"
 
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay ИМЕ_НА_ФАЙЛ"
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [ПОДАВАНЕ]"
 
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(ВЕРСИЯ|ДИАПАЗОН)…]"
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay ИМЕ_НА_ФАЙЛ"
 
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run КОМАНДА…"
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run КОМАНДА…"
 
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
@@ -2721,11 +2749,6 @@ msgstr ""
 "Неуспешно преминаване към „%s“.  Изпълнете командата „git bisect start "
 "СЪЩЕСТВУВАЩ_КЛОН“."
 
-msgid "won't bisect on cg-seek'ed tree"
-msgstr ""
-"не може да се търси двоично, когато е изпълнена командата „cg-seek“ от "
-"„cogito“"
-
 msgid "bad HEAD - strange symbolic ref"
 msgstr "Неправилен указател „HEAD“ — необичаен символен указател"
 
@@ -2781,7 +2804,7 @@ msgid "bisect run failed: no command provided."
 msgstr "неуспешно двоично търсене, не е зададена команда."
 
 #, c-format
-msgid "unable to verify '%s' on good revision"
+msgid "unable to verify %s on good revision"
 msgstr "„%s“ не може да провери с добра версия"
 
 #, c-format
@@ -2789,7 +2812,7 @@ msgid "bogus exit code %d for good revision"
 msgstr "неправилен изходен код %d за добро подаване"
 
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
 msgstr ""
 "неуспешно двоично търсене: изходният код от командата „%2$s“ е %1$d — това е "
 "извън интервала [0, 128)"
@@ -2801,37 +2824,42 @@ msgstr "файлът „%s“ не може да бъде отворен за з
 msgid "bisect run cannot continue any more"
 msgstr "двоичното търсене не може да продължи"
 
-#, c-format
 msgid "bisect run success"
 msgstr "успешно двоично търсене"
 
-#, c-format
 msgid "bisect found first bad commit"
 msgstr "двоичното търсене откри първото лошо подаване"
 
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
-msgstr ""
-"неуспешно двоично търсене: „git bisect--helper --bisect-state %s“ завърши с "
-"код за грешка: %d"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
+msgstr "неуспешно двоично търсене: „git bisect %s“ завърши с код за грешка: %d"
 
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "опцията „--bisect-reset“ изисква или 0 аргументи, или 1 — подаване"
-
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "опцията „--bisect-terms“ изисква 0 или 1 аргумента"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "„%s“ изисква или 0 аргументи, или едно подаване"
 
-msgid "--bisect-next requires 0 arguments"
-msgstr "опцията „--bisect-next“ не приема аргументи"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "„%s“ изисква 0 или 1 аргумент"
 
-msgid "--bisect-log requires 0 arguments"
-msgstr "опцията „--bisect-log“ не приема аргументи"
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "„%s“ изисква 0 аргументи"
 
 msgid "no logfile given"
 msgstr "не е зададен журнален файл"
 
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "неуспешно изпълнение на „%s“: не е зададена команда."
+
+msgid "need a command"
+msgstr "необходима е команда"
+
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "непозната команда: „%s“"
+
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [ОПЦИЯ…] [ОПЦИЯ_ЗА_ВЕРСИЯТА…] [ВЕРСИЯ] [--] ФАЙЛ"
 
@@ -3425,6 +3453,9 @@ msgstr "git bundle list-heads ФАЙЛ [ИМЕ_НА_УКАЗАТЕЛ…]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] ФАЙЛ [ИМЕ_НА_УКАЗАТЕЛ…]"
 
+msgid "need a <file> argument"
+msgstr "необходим е аргумент ФАЙЛ"
+
 msgid "do not show progress meter"
 msgstr "без извеждане на напредъка"
 
@@ -3479,10 +3510,6 @@ msgstr "командата „%s“ изисква аргумент"
 msgid "%s takes no arguments"
 msgstr "командата „%s“ не приема аргументи"
 
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "непозната команда: „%s“"
-
 msgid "only one batch option may be specified"
 msgstr "може да укажете само една пакетна опция"
 
@@ -3625,11 +3652,18 @@ msgstr "опцията „-%c“ изисква обект"
 msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "в режим с посочен ВИД ОБЕКТ се изискват точно два аргумента, а не %d"
 
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | АТРИБУТ…] [--] ПЪТ…"
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source УКАЗАТЕЛ_КЪМ_ДЪРВО] [-a | --all | АТРИБУТ…] [--] "
+"ПЪТ…"
 
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | АТРИБУТ…]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source УКАЗАТЕЛ_КЪМ_ДЪРВО] [-a | --all | "
+"АТРИБУТ…]"
 
 msgid "report all attributes set on file"
 msgstr "извеждане на всички атрибути, зададени върху файл"
@@ -3643,6 +3677,12 @@ msgstr "изчитане на имената на файловете от ста
 msgid "terminate input and output records by a NUL character"
 msgstr "разделяне на входните и изходните записи с нулевия знак „NUL“"
 
+msgid "<tree-ish>"
+msgstr "УКАЗАТЕЛ_КЪМ_ДЪРВО"
+
+msgid "which tree-ish to check attributes at"
+msgstr "към кой УКАЗАТЕЛ_КЪМ_ДЪРВО да се премине"
+
 msgid "suppress progress reporting"
 msgstr "без показване на напредъка"
 
@@ -4231,7 +4271,7 @@ msgstr ""
 "*          — избиране на всички обекти\n"
 "           — (празно) завършване на избирането\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Неправилен избор (%s).\n"
 
@@ -4382,9 +4422,6 @@ msgstr "ДЪЛБОЧИНА"
 msgid "create a shallow clone of that depth"
 msgstr "плитко клониране до тази ДЪЛБОЧИНА"
 
-msgid "time"
-msgstr "ВРЕМЕ"
-
 msgid "create a shallow clone since a specific time"
 msgstr "плитко клониране до момент във времето"
 
@@ -4635,6 +4672,9 @@ msgstr ""
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "неуспешно доставяне на обекти от пратка на адрес „%s“"
 
+msgid "failed to fetch advertised bundles"
+msgstr "неуспешно доставяне на обявените за налични пратки"
+
 msgid "remote transport reported error"
 msgstr "отдалеченият транспорт върна грешка"
 
@@ -5918,29 +5958,6 @@ msgstr "не е зададена програма за „--tool=ПРОГРАМ
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "не е зададена команда за „--extcmd=КОМАНДА“"
 
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] ОПЦИИ ПРОМЕНЛИВИ"
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr "стандартна, резервна стойност за „git_env_*(…)“"
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr ""
-"без извеждане на информация — стойността на „git_env_*()“ да е изходен код"
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-"опцията „--default“ изисква булева стойност при „--type=bool“, а не „%s“"
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not "
-"`%s`"
-msgstr ""
-"опцията „--default“ изисква целочислена стойност без знак при „--"
-"type=ulong“, а не „%s“"
-
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [ОПЦИЯ_ЗА_СПИСЪКА_С_ВЕРСИИ…]"
 
@@ -6349,6 +6366,10 @@ msgstr "отрицателна дълбочина като аргумент на
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "не може да използвате опцията „--unshallow“ върху пълно хранилище"
 
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "неуспешно доставяне на пратки от „%s“"
+
 msgid "fetch --all does not take a repository argument"
 msgstr "към „git fetch --all“ не може да добавите аргумент-хранилище"
 
@@ -7393,12 +7414,18 @@ msgstr "употреба: %s%s"
 msgid "'git help config' for more information"
 msgstr "За повече информация изпълнете „git help config“"
 
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] КУКА [-- АРГУМЕНТ_ЗА_КУКА…]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=ПЪТ] КУКА [-- АРГУМЕНТ_ЗА_КУКА…]"
 
 msgid "silently ignore missing requested <hook-name>"
 msgstr "прескачане на заявена КУКА, която липсва"
 
+msgid "file to read into hooks' stdin"
+msgstr "файл за изчитане от стандартния вход на куката"
+
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "неправилен вид на обекта „%s“"
@@ -8251,11 +8278,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=КОМАНДА]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=КЛЮЧ]\n"
-"              [--symref] [ХРÐ\90Ð\9dÐ\98Ð\9bÐ\98ЩÐ\95 [УÐ\9aÐ\90Ð\97Ð\90ТÐ\95Ð\9bâ\80¦]]"
+"              [--symref] [ХРÐ\90Ð\9dÐ\98Ð\9bÐ\98ЩÐ\95 [ШÐ\90Ð\91Ð\9bÐ\9eÐ\9d]]"
 
 msgid "do not print remote URL"
 msgstr "без извеждане на адресите на отдалечените хранилища"
@@ -8507,9 +8534,15 @@ msgstr "позволяване на сливане на независими и
 msgid "perform multiple merges, one per line of input"
 msgstr "извършване на множество сливания, по едно на ред"
 
+msgid "specify a merge-base for the merge"
+msgstr "база за сливането"
+
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "„--trivial-merge“ е несъвместима с другите опции"
 
+msgid "--merge-base is incompatible with --stdin"
+msgstr "опциите „--merge-base“ и „--stdin“ са несъвместими"
+
 #, c-format
 msgid "malformed input line: '%s'."
 msgstr "входен ред с неправилен формат: „%s“."
@@ -10455,6 +10488,9 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "не може да се премине към „%s“"
 
+msgid "apply options and merge options cannot be used together"
+msgstr "опциите за прилагане и сливане са несъвместими"
+
 #, c-format
 msgid ""
 "unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
@@ -10700,8 +10736,19 @@ msgid "--strategy requires --merge or --interactive"
 msgstr ""
 "опцията „--strategy“ изисква някоя от опциите „--merge“ или „--interactive“"
 
-msgid "apply options and merge options cannot be used together"
-msgstr "опциите за прилагане и сливане са несъвместими"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
+msgstr ""
+"опциите за прилагане са несъвместими с „rebase.autosquash“.  Пробвайте да "
+"добавите опцията „--no-autosquash“"
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"опциите за прилагане са несъвместими с „rebase.updateRefs“.  Пробвайте да "
+"добавите опцията „--no-update-refs“"
 
 #, c-format
 msgid "Unknown rebase backend: %s"
@@ -12221,7 +12268,7 @@ msgid "show refs unreachable from any other ref"
 msgstr "извеждане на недостижимите указатели"
 
 msgid "show commits in topological order"
-msgstr "извеждане Ð½Ð° Ð¿Ð¾Ð´Ð°Ð²Ð°Ð½Ð¸Ñ\8fÑ\82а Ð² Ñ\82опологиÑ\87еÑ\81ка подредба"
+msgstr "извеждане Ð½Ð° Ð¿Ð¾Ð´Ð°Ð²Ð°Ð½Ð¸Ñ\8fÑ\82а Ð² Ñ\82опологиÑ\87на подредба"
 
 msgid "show only commits not on the first branch"
 msgstr "извеждане само на подаванията, които не са от първия клон"
@@ -12231,7 +12278,7 @@ msgstr "извеждане на сливанията, които може да 
 
 msgid "topologically sort, maintaining date order where possible"
 msgstr ""
-"Ñ\82опологиÑ\87еÑ\81ка подредба, при запазване на подредбата по дата, доколкото е\n"
+"Ñ\82опологиÑ\87на подредба, при запазване на подредбата по дата, доколкото е\n"
 "възможно"
 
 msgid "<n>[,<base>]"
@@ -13247,10 +13294,6 @@ msgstr "„%s“ е неправилно име за подмодул"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper КОМАНДА"
 
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "„%s“ не поддържа опцията „--super-prefix“"
-
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m ПРИЧИНА] ИМЕ УКАЗАТЕЛ"
 
@@ -14012,6 +14055,11 @@ msgstr "само за изчистване на грешки"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "„core.fsyncMethod = batch“ не се поддържа на тази платформа"
 
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr ""
+"ключът за списък с пратки „%s“ не може да се анализира със стойност „%s“"
+
 #, c-format
 msgid "bundle list at '%s' has no mode"
 msgstr "липсва режим в списъка от пратки „%s“"
@@ -14022,6 +14070,13 @@ msgstr "не може да се създаде временен файл"
 msgid "insufficient capabilities"
 msgstr "недостатъчно възможности"
 
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "изтегленият от адрес „%s“ файл не е пратка"
+
+msgid "failed to store maximum creation token"
+msgstr "неуспешно запазване на данните за последно създаденото"
+
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
 msgstr "непознат режим на пратки от адрес „%s“"
@@ -14039,6 +14094,13 @@ msgstr "неуспешно изтегляне на пратка от адрес:
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "файлът на адрес „%s“ не е нито пратка, нито списък с пратки"
 
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: непознат аргумент: %s"
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: след аргументите се очаква изчистване на буферите"
+
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri: получен е празен ред"
 
@@ -14070,6 +14132,13 @@ msgstr "В хранилището липсват следните необход
 msgid "need a repository to verify a bundle"
 msgstr "за проверката на пратка е необходимо хранилище"
 
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"в хранилището на обекти съществуват необходими подавания, които не са "
+"свързани с историята на хранилището"
+
 #, c-format
 msgid "The bundle contains this ref:"
 msgid_plural "The bundle contains these %<PRIuMAX> refs:"
@@ -15525,6 +15594,17 @@ msgstr "протоколна грешка: неочаквано „%s“"
 msgid "unknown object format '%s' specified by server"
 msgstr "сървърът указа непознат формат на обект: „%s“"
 
+#, c-format
+msgid "error on bundle-uri response line %d: %s"
+msgstr "грешка на ред %d в отговора на командата „bundle-uri“: %s"
+
+msgid "expected flush after bundle-uri listing"
+msgstr ""
+"след изброяването на адресите на пратките се очаква изчистване на буферите"
+
+msgid "expected response end packet after ref listing"
+msgstr "след изброяването на указателите се очаква пакет за край"
+
 #, c-format
 msgid "invalid ls-refs response: %s"
 msgstr "неправилен отговор на „ls-refs“: „%s“"
@@ -15532,9 +15612,6 @@ msgstr "неправилен отговор на „ls-refs“: „%s“"
 msgid "expected flush after ref listing"
 msgstr "след изброяването на указателите се очаква изчистване на буферите"
 
-msgid "expected response end packet after ref listing"
-msgstr "след изброяването на указателите се очаква пакет за край"
-
 #, c-format
 msgid "protocol '%s' is not supported"
 msgstr "протокол „%s“ не се поддържа"
@@ -16673,7 +16750,7 @@ msgstr "такъв отдалечен указател няма: %s"
 
 #, c-format
 msgid "Server does not allow request for unadvertised object %s"
-msgstr "Сървърът не позволява заявка за необявен обект „%s“"
+msgstr "СÑ\8aÑ\80вÑ\8aÑ\80Ñ\8aÑ\82 Ð½Ðµ Ð¿Ð¾Ð·Ð²Ð¾Ð»Ñ\8fва Ð·Ð°Ñ\8fвка Ð·Ð° Ð½ÐµÐ¾Ð±Ñ\8fвен Ð·Ð° Ð½Ð°Ð»Ð¸Ñ\87ен Ð¾Ð±ÐµÐºÑ\82 â\80\9e%sâ\80\9c"
 
 #, c-format
 msgid "fsmonitor_ipc__send_query: invalid path '%s'"
@@ -16720,16 +16797,20 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
+"git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n"
+"           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
+"           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
+"bare]\n"
+"           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
+"           [--config-env=<name>=<envvar>] <command> [<args>]\n"
 "git [-v | --version] [-h | --help] [-C ПЪТ] [-c ИМЕ=СТОЙНОСТ]\n"
 "           [--exec-path[=ПЪТ]] [--html-path] [--man-path] [--info-path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=ПЪТ] [--work-tree=ПЪТ] [--namespace=ИМЕ]\n"
-"           [--super-prefix=ПЪТ] [--config-env=ИМЕ=ПРОМЕНЛИВА_НА_СРЕДАТА]\n"
-"           КОМАНДА [АРГ…]"
+"           [--config-env=ИМЕ=ПРОМЕНЛИВА_НА_СРЕДАТА] КОМАНДА [АРГ…]"
 
 msgid ""
 "'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -16756,10 +16837,6 @@ msgstr "опцията „%s“ изисква директория\n"
 msgid "no namespace given for --namespace\n"
 msgstr "опцията „--namespace“ изисква име\n"
 
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "опцията „--super-prefix“ изисква префикс\n"
-
 #, c-format
 msgid "-c expects a configuration string\n"
 msgstr "опцията „-c“ изисква низ за настройка\n"
@@ -16880,8 +16957,13 @@ msgstr ""
 msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "неуспешно изпълнение на „gpg.ssh.defaultKeyCommand“: %s %s"
 
-msgid "gpg failed to sign the data"
-msgstr "Програмата „gpg“ не подписа данните"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"Програмата „gpg“ не подписа данните:\n"
+"%s"
 
 msgid "user.signingKey needs to be set for ssh signing"
 msgstr ""
@@ -17473,7 +17555,7 @@ msgid ""
 "   or update to an existing commit which has merged those changes\n"
 msgstr ""
 " ⁃ преминаване към подмодула (%s), след които или де се слее подаването\n"
-"   „%s“, или да се обновяви към съществуващо подаване, в които\n"
+"   „%s“, или да се обнови към съществуващо подаване, в които\n"
 "   тези промени са слети\n"
 
 #, c-format
@@ -18069,6 +18151,10 @@ msgstr "непакетираният обект „%s“ е повреден"
 msgid "garbage at end of loose object '%s'"
 msgstr "грешни данни в края на непакетирания обект „%s“"
 
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "непакетираният обект „%s“ не може да се отвори"
+
 #, c-format
 msgid "unable to parse %s header"
 msgstr "заглавната част на „%s“ не може да бъде анализирана"
@@ -18085,17 +18171,13 @@ msgid "header for %s too long, exceeds %d bytes"
 msgstr "заглавната част на „%s“ е прекалено дълга — надхвърля %d байта"
 
 #, c-format
-msgid "failed to read object %s"
-msgstr "обекÑ\82Ñ\8aÑ\82 â\80\9e%sâ\80\9c Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð±Ñ\8aде Ð¿Ñ\80оÑ\87еÑ\82ен"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "непакеÑ\82иÑ\80аниÑ\8fÑ\82 Ð¾Ð±ÐµÐºÑ\82 â\80\9e%sâ\80\9c (в â\80\9e%sâ\80\9c) Ðµ Ð¿Ð¾Ð²Ñ\80еден"
 
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "заместителят „%s“ на „%s“ не може да бъде открит"
 
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "непакетираният обект „%s“ (в „%s“) е повреден"
-
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
 msgstr "пакетираният обект „%s“ (в „%s“) е повреден"
@@ -18108,9 +18190,6 @@ msgstr "файлът „%s“ не може да бъде записан"
 msgid "unable to set permission to '%s'"
 msgstr "права̀та за достъп до „%s“ не може да бъдат зададени"
 
-msgid "file write error"
-msgstr "грешка при запис на файл"
-
 msgid "error when closing loose object file"
 msgstr "грешка при затварянето на файла с непакетиран обект"
 
@@ -18157,11 +18236,12 @@ msgstr "директорията „%s“ не може да бъде създа
 msgid "cannot read object for %s"
 msgstr "обектът за „%s“ не може да се прочете"
 
-msgid "corrupt commit"
-msgstr "повредено подаване"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "„fsck“ откри грешка в обект: „%s“"
 
-msgid "corrupt tag"
-msgstr "повÑ\80еден ÐµÑ\82икет"
+msgid "refusing to create malformed object"
+msgstr "не Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ\81е Ñ\81Ñ\8aздаде Ñ\81гÑ\80еÑ\88ен Ð¾Ð±ÐµÐºт"
 
 #, c-format
 msgid "read error while indexing %s"
@@ -18432,10 +18512,6 @@ msgstr "неправилно отместване по XOR в пакетен и
 msgid "cannot fstat bitmap file"
 msgstr "не може да се получи информация за файла с битови маски с „fstat“"
 
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "игнориране на излишния файл с битови маски: „%s“"
-
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr ""
 "сумата за проверка се различава във файла с индекса за множество пакети и "
@@ -18721,6 +18797,9 @@ msgstr "по-малко подробности"
 msgid "use <n> digits to display object names"
 msgstr "да се показват такъв БРОЙ цифри от имената на обектите"
 
+msgid "prefixed path to initial superproject"
+msgstr "път с префикс към първоначалния свръхпроект"
+
 msgid "how to strip spaces and #comments from message"
 msgstr "кои празни знаци и #коментари да се махат от съобщенията"
 
@@ -19239,6 +19318,14 @@ msgstr "назад с %d"
 msgid "ahead %d, behind %d"
 msgstr "напред с %d, назад с %d"
 
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) не приема аргументи"
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "непознат аргумент за „%%(%.*s)“: %s"
+
 #, c-format
 msgid "expected format: %%(color:<color>)"
 msgstr "очакван формат: %%(color:ЦВЯТ)"
@@ -19255,22 +19342,6 @@ msgstr "очаква се цяло число за „refname:lstrip=%s“"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "очаква се цяло число за „refname:rstrip=%s“"
 
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "непознат аргумент за „%%(%s)“: %s"
-
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) не приема аргументи"
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) не приема аргументи"
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) не приема аргументи"
-
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
 msgstr "очаква се %%(trailers:key=ЕПИЛОГ)"
@@ -19287,10 +19358,6 @@ msgstr "очаква се положителна стойност за „conten
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "очаква се положителна стойност за „%s“ в %%(%s)"
 
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "непозната опция за е-поща: %s"
-
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
 msgstr "очакван формат: %%(align:ШИРОЧИНА,ПОЗИЦИЯ)"
@@ -19304,12 +19371,12 @@ msgid "unrecognized width:%s"
 msgstr "непозната широчина: %s"
 
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "оÑ\87аква Ñ\81е Ð¿Ð¾Ð»Ð¾Ð¶Ð¸Ñ\82елна Ñ\88иÑ\80оÑ\87ина Ñ\81 Ð»ÐµÐºÑ\81емаÑ\82а â\80\9e%%(align)â\80\9c"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "непознаÑ\82 Ð°Ñ\80гÑ\83менÑ\82 Ð·Ð° â\80\9e%%(%s)â\80\9c: %s"
 
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) не приема аргументи"
+msgid "positive width expected with the %%(align) atom"
+msgstr "очаква се положителна широчина с лексемата „%%(align)“"
 
 #, c-format
 msgid "malformed field name: %.*s"
@@ -20600,6 +20667,23 @@ msgstr "git %s: неуспешно изчитане на индекса"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s: неуспешно обновяване на индекса"
 
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "„%s“ е неправилен етикет"
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "„%s“ е неправилно име на указател"
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+"командата „update-ref“ изисква пълно име на указател, напр. „refs/heads/%s“"
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "неправилна команда „%.*s“"
+
 #, c-format
 msgid "%s does not accept arguments: '%s'"
 msgstr "„%s“ не приема аргументи: „%s“"
@@ -21426,6 +21510,16 @@ msgstr "„ls-tree“ завърши с неочакван изходен код
 msgid "failed to lstat '%s'"
 msgstr "не може да бъде получена информация чрез „lstat“ за „%s“"
 
+msgid "no remote configured to get bundle URIs from"
+msgstr "не е настроено отдалечено хранилище за списъците с адреси на пратки"
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "не е зададен никакъв адрес за отдалеченото хранилище„%s“"
+
+msgid "could not get the bundle-uri list"
+msgstr "списъкът с адреси на пратки не може да се получи"
+
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree ОПЦИЯ… (control|prime|update)"
 
@@ -21785,6 +21879,14 @@ msgstr "Преустановяване на действието."
 msgid "failed to push all needed submodules"
 msgstr "неуспешно изтласкване на всички необходими подмодули"
 
+msgid "bundle-uri operation not supported by protocol"
+msgstr "операцията „bundle-uri“ (адреси на пратки) не се поддържа от протокола"
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr ""
+"спъсъкът с адреси на пратки обявени за налични от сървъра не може да се "
+"получи "
+
 msgid "too-short tree object"
 msgstr "прекалено кратък обект-дърво"
 
@@ -22533,14 +22635,18 @@ msgstr "Игнорирани файлове"
 
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"Бяха необходими %.2f секунди за изброяването на неследените файлове.\n"
-"Добавянето на опцията „-uno“ към командата „git status“ ще ускори\n"
-"изпълнението, но ще трябва да добавяте новите файлове ръчно.\n"
-"За повече подробности погледнете „git status help“."
+"Изброяването на неследените файлове отне %.2f секунди, но\n"
+"резултатите са запомнени и може да забързат последващиге изброявания."
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "Изброяването на неследените файлове отне %.2f секунди."
+
+msgid "See 'git help status' for information on how to improve this."
+msgstr "Вижте в „git help status“ за начините да подобрите това."
 
 #, c-format
 msgid "Untracked files not listed%s"
@@ -22689,294 +22795,6 @@ msgstr ""
 msgid "Unable to determine absolute path of git directory"
 msgstr "Абсолютният път на работното дърво не може да се определи"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%14s %14s %s"
-
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "%d файл засегнат\n"
-msgstr[1] "%d файла засегнати\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Ако кръпката може да се приложи чисто, редактираното парче ще бъде "
-"незабавно\n"
-"добавено към индекса"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Ако кръпката може да се приложи чисто, редактираното парче ще бъде "
-"незабавно\n"
-"скътано"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Ако кръпката може да се приложи чисто, редактираното парче ще бъде "
-"незабавно\n"
-"извадено от индекса."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Ако кръпката може да се приложи чисто, редактираното парче ще бъде "
-"незабавно\n"
-"набелязано за прилагане."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Ако кръпката може да се приложи чисто, редактираното парче ще бъде "
-"незабавно\n"
-"набелязано за зануляване."
-
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr "файлът за редактиране на парчето код не може да бъде отворен: „%s“"
-
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"———\n"
-"За да пропуснете редовете започващи с „%s“ — заменете знака със „ “ (стават "
-"контекст)\n"
-"За да пропуснете редовете започващи с „%s“ — изтрийте ги.\n"
-"Редовете, които започват с „%s“ ще бъдат пропуснати.\n"
-
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr ""
-"файлът за редактиране на парчето код не може да бъде отворен за четене: „%s“"
-
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y — добавяне на парчето в индекса\n"
-"n — без добавяне на парчето в индекса\n"
-"q — изход, без добавяне на това и всички оставащи парчета от файла\n"
-"a — добавяне на това и всички следващи парчета от файла в индекса\n"
-"d — без добавяне на това и всички следващи парчета от файла в индекса"
-
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y — скатаване на парчето\n"
-"n — без скатаване на парчето\n"
-"q — изход, без скатаване на това и всички оставащи парчета\n"
-"a — скатаване на това и всички следващи парчета от файла\n"
-"d — без скатаване на това и всички следващи парчета от файла"
-
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y — изваждане на парчето от индекса\n"
-"n — без изваждане на парчето от индекса\n"
-"q — изход, без изваждане на това и всички оставащи парчета от индекса\n"
-"a — изваждане на това и всички следващи парчета от файла от индекса\n"
-"d — без изваждане на това и всички следващи парчета от файла от индекса"
-
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y — прилагане на парчето към индекса\n"
-"n — без прилагане на парчето към индекса\n"
-"q — изход, без прилагане на това и всички оставащи парчета към индекса\n"
-"a — прилагане на това и всички следващи парчета от файла към индекса\n"
-"d — без прилагане на това и всички следващи парчета от файла към индекса"
-
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y — премахване на парчето от работното дърво\n"
-"n — без премахване на парчето от работното дърво\n"
-"q — изход, без премахване на това и всички оставащи парчета от работното "
-"дърво\n"
-"a — премахване на това и всички следващи парчета от файла от работното "
-"дърво\n"
-"d — без премахване на това и всички следващи парчета от файла от работното "
-"дърво"
-
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y — премахване на парчето от индекса и работното дърво\n"
-"n — без премахване на парчето от индекса и работното дърво\n"
-"q — изход, без премахване на това и всички оставащи парчета от индекса и "
-"работното дърво\n"
-"a — премахване на това и всички следващи парчета от файла от индекса и "
-"работното дърво\n"
-"d — без премахване на това и всички следващи парчета от файла от индекса и "
-"работното дърво"
-
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y — прилагане на парчето от индекса и работното дърво\n"
-"n — без прилагане на парчето от индекса и работното дърво\n"
-"q — изход, без прилагане на това и всички оставащи парчета от индекса и "
-"работното дърво\n"
-"a — прилагане на това и всички следващи парчета от файла от индекса и "
-"работното дърво\n"
-"d — без прилагане на това и всички следващи парчета от файла от индекса и "
-"работното дърво"
-
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y — прилагане на парчето към работното дърво\n"
-"n — без прилагане на парчето към работното дърво\n"
-"q — изход, без прилагане на това и всички оставащи парчета\n"
-"a — прилагане на това и всички следващи парчета от файла\n"
-"d — без прилагане на това и всички следващи парчета от файла"
-
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g — избор към кое парче да се премине\n"
-"/ — търсене на парче, напасващо към даден регулярен израз\n"
-"j — без решение за парчето, към следващото парче без решение\n"
-"J — без решение за парчето, към следващото парче\n"
-"k — без решение за парчето, към предишното парче без решение\n"
-"K — без решение за парчето, към предишното парче\n"
-"s — разделяне на текущото парче на по-малки\n"
-"e — ръчно редактиране на текущото парче\n"
-"? — извеждане не помощта\n"
-
-msgid "The selected hunks do not apply to the index!\n"
-msgstr "Избраните парчета не може да се добавят в индекса!\n"
-
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "пренебрегване на неслятото: „%s“\n"
-
-msgid "No other hunks to goto\n"
-msgstr "Няма други парчета\n"
-
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "Неправилен номер: „%s“\n"
-
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "Има само %d парче.\n"
-msgstr[1] "Има само %d парчета.\n"
-
-msgid "No other hunks to search\n"
-msgstr "Няма други парчета за търсене\n"
-
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "Сгрешен регулярен израз „%s“: %s\n"
-
-msgid "No hunk matches the given pattern\n"
-msgstr "Никое парче не напасва на регулярния израз\n"
-
-msgid "No previous hunk\n"
-msgstr "Няма друго парче преди това\n"
-
-msgid "No next hunk\n"
-msgstr "Няма друго парче след това\n"
-
-msgid "Sorry, cannot split this hunk\n"
-msgstr "Това парче не може да бъде разделено\n"
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "Разделяне на %d парче.\n"
-msgstr[1] "Разделяне на %d парчета.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "Това парче не може да бъде редактирано\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        — извеждане на пътищата с промѐните\n"
-"update        — добавяне на състоянието на работното дърво към промѐните в\n"
-"                индекса\n"
-"revert        — отмяна на промѐните в индекса към състоянието сочено от "
-"„HEAD“\n"
-"patch         — избиране на парчета код и обновяване поединично\n"
-"diff          — извеждане на разликата между състоянието на соченото от "
-"„HEAD“\n"
-"                и индекса\n"
-"add untracked — добавяне на неследените файлове към промѐните в индекса\n"
-
-msgid "missing --"
-msgstr "„--“ липсва"
-
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "неизвестна стратегия за прилагане на кръпка към „--patch“: „%s“"
-
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "указан е неправилен аргумент „%s“, а се очаква „--“."
-
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr ""
 "разликата между местния часови пояс и GMT съдържа дробна част от минута\n"
index 91411483422d5218b142ff35581ed94174bc47c5..c6d2dd6ecc6138ded82d147b52dd549272830f52 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -1,7 +1,7 @@
 # Catalan translations for Git.
 # This file is distributed under the same license as the Git package.
 # Alex Henrie <alexhenrie24@gmail.com>, 2014-2016.
-# Jordi Mas i Hernàndez <jmas@softcatala.org>, 2016-2022
+# Jordi Mas i Hernàndez <jmas@softcatala.org>, 2016-2023
 #
 # Terminologia i criteris utilitzats
 #
@@ -68,8 +68,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-12-07 07:33+0100\n"
-"PO-Revision-Date: 2022-12-07 19:00-0600\n"
+"POT-Creation-Date: 2023-03-01 01:20+0000\n"
+"PO-Revision-Date: 2023-03-01 19:00-0600\n"
 "Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
 "Language-Team: Catalan\n"
 "Language: ca\n"
@@ -105,13 +105,13 @@ msgstr "no s'ha pogut fer «stage» «%s»"
 msgid "could not write index"
 msgstr "no s'ha pogut escriure l'índex"
 
-#, c-format, perl-format
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "actualitzat %d camí\n"
 msgstr[1] "actualitzats %d camins\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "nota: %s està ara sense seguiment.\n"
 
@@ -125,7 +125,7 @@ msgstr "Reverteix"
 msgid "Could not parse HEAD^{tree}"
 msgstr "No s'ha pogut analitzar HEAD^{tree}"
 
-#, c-format, perl-format
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "revertit %d camí\n"
@@ -138,7 +138,7 @@ msgstr "Sense fitxers no seguits.\n"
 msgid "Add untracked"
 msgstr "Afegeix sense seguiment"
 
-#, c-format, perl-format
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "afegit %d camí\n"
@@ -232,19 +232,19 @@ msgstr "no s'ha pogut actualitzar l'índex"
 msgid "Bye.\n"
 msgstr "Adeu.\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Canvia el mode de «stage» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Suprimeix «stage» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Afegeix a «stage» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Fer un «stage» d'aquest tros [y,n,q,a,d%s,?]? "
 
@@ -268,19 +268,19 @@ msgstr ""
 "a - fes «stage» d'aquest tros i de tota la resta de trossos del fitxer\n"
 "d - no facis «stage» d'aquest tros ni de cap altre restant del fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Canvia el mode de «stash» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Suprimeix «stash» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Afegeix a «stash» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Fer un «stash» d'aquest tros [y,n,q,a,d%s,?]? "
 
@@ -304,19 +304,19 @@ msgstr ""
 "a - fes «stash» d'aquest tros i de tota la resta de trossos del fitxer\n"
 "d - no facis «stash» d'aquest tros ni de cap altre restant del fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Canvia el mode de «unstage» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Suprimeix «Unstage» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Afegeix a «unstage» [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Fer un «unstage» d'aquest tros [y,n,q,a,d%s,?]? "
 
@@ -340,19 +340,19 @@ msgstr ""
 "a - fes «unstage» d'aquest tros i de tota la resta de trossos del fitxer\n"
 "d - no facis «unstage» d'aquest tros ni de cap altre restant del fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "Aplica el canvi de mode a l'índex [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Aplica la supressió a l'índex [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Aplica l'addició a l'índex [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Aplica aquest tros a l'índex [y,n,q,a,d%s,?]? "
 
@@ -376,19 +376,19 @@ msgstr ""
 "a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
 "d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "Descarta el canvi de mode de l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Descarta suprimir de l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Descarta l'addició de l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Descarta aquest tros de l'arbre de treball [y,n,q,a,d%s,?]? "
 
@@ -412,22 +412,22 @@ msgstr ""
 "a - descarta aquest tros i tots els trossos posteriors en el fitxer\n"
 "d - no descartis aquest tros ni cap dels trossos posteriors en el fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Descarta el canvi de mode de l'índex i de l'arbre de treball [y,n,q,a,"
 "d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Descarta suprimir de l'índex i de l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Descarta l'addició de l'índex i de l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Descarta aquest tros de l'índex i de l'arbre de treball [y,n,q,a,d%s,?]? "
@@ -445,20 +445,20 @@ msgstr ""
 "a - descarta aquest tros i tots els trossos posteriors en el fitxer\n"
 "d - no descartis aquest tros ni cap dels trossos posteriors en el fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Aplica el canvi de mode a l'índex i a l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica la supressió a l'índex i a l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica l'addició a l'índex i a l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica aquest tros a l'índex i a l'arbre de treball [y,n,q,a,d%s,?]? "
 
@@ -475,19 +475,19 @@ msgstr ""
 "a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
 "d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica el canvi de mode a l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica la supressió a l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica l'addició a l'arbre de treball [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "Aplica aquest tros a l'arbre de treball [y,n,q,a,d%s,?]? "
 
@@ -564,8 +564,6 @@ msgstr ""
 "Per a eliminar les línies «%c», suprimiu-les.\n"
 "Les línies que comencin per %c s'eliminaran.\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -581,20 +579,12 @@ msgstr "no s'ha pogut analitzar la capçalera del tros"
 msgid "'git apply --cached' failed"
 msgstr "«git apply --cached» ha fallat"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
@@ -1443,6 +1433,12 @@ msgstr "llegeix .gitattributes en el directori de treball"
 msgid "report archived files on stderr"
 msgstr "informa de fitxers arxivats en stderr"
 
+msgid "time"
+msgstr "data"
+
+msgid "set modification time of archive entries"
+msgstr "estableix l'hora de modificació de les entrades de l'arxiu"
+
 msgid "set compression level"
 msgstr "estableix el nivell de compressió"
 
@@ -1483,6 +1479,13 @@ msgstr "Argument no admès per al format «%s»: -%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%.*s no és un nom d'atribut vàlid"
 
+msgid "unable to add additional attribute"
+msgstr "no s'ha pogut afegir l'atribut addicional"
+
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "s'ignorarà la línia d'atributs massa llarga %d"
+
 #, c-format
 msgid "%s not allowed: %s:%d"
 msgstr "%s no està permès: %s:%d"
@@ -1494,6 +1497,18 @@ msgstr ""
 "Els patrons negatius s'ignoren en els atributs de git\n"
 "Useu «\\!» per exclamació capdavantera literal."
 
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "no es pot fer fstat gitattributes al fitxer «%s»"
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "s'ignorarà el fitxer «%s» gitattributes per massa gran"
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "s'ignorarà la blob «%s» gitattributes per massa gran"
+
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
 msgstr "Comentari amb cometes errònies en el fitxer «%s»: %s"
@@ -1773,11 +1788,11 @@ msgstr "submòdul «%s»: no es pot trobar el submòdul"
 
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
-"Podeu provar d'actualitzar els submòduls utilitzant «git checkout %s && git "
-"submodule update --init»"
+"Podeu provar d'actualitzar els submòduls utilitzant «git checkout --no-"
+"recurse-submodules %s && git submodule update --init»"
 
 #, c-format
 msgid "submodule '%s': cannot create branch '%s'"
@@ -1812,6 +1827,13 @@ msgstr "elimina «%s»\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "Canvis «unstaged» després d'actualitzar l'índex:"
 
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"s'ha eliminat la configuració add.interactive.useBuiltin\n"
+"Per a més detalls, vegeu la seva entrada a «git help config»."
+
 msgid "Could not read the index"
 msgstr "No s'ha pogut llegir l'índex"
 
@@ -2201,6 +2223,9 @@ msgstr "git am [<opcions>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "executa interactivament"
 
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "evita els lligams pre-applypatch i applypatch-msg"
+
 msgid "historical option -- no-op"
 msgstr "opció històrica -- no-op"
 
@@ -2344,32 +2369,27 @@ msgstr "git archive: error de protocol"
 msgid "git archive: expected a flush"
 msgstr "git archive: s'esperava una neteja"
 
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<comissió>]"
-
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<rev>]"
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<rev>...]"
 
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<rev>...]"
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<rev>|<range>)...]"
 
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <filename>"
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<comissió>]"
 
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <logfile>"
 
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <ordre>..."
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <ordre>..."
 
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
@@ -2519,9 +2539,6 @@ msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
 msgstr ""
 "l'agafament de «%s» ha fallat. Proveu «git bisect start <branca-vàlida>»."
 
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "no es bisecarà en un arbre en el qual s'ha fet cg-seek"
-
 msgid "bad HEAD - strange symbolic ref"
 msgstr "HEAD incorrecte - referència simbòlica estranya"
 
@@ -2573,7 +2590,7 @@ msgid "bisect run failed: no command provided."
 msgstr "ha fallat l'execució de bisect: no s'ha proporcionat cap ordre."
 
 #, c-format
-msgid "unable to verify '%s' on good revision"
+msgid "unable to verify %s on good revision"
 msgstr "no s'ha pogut verificar «%s» en una bona revisió"
 
 #, c-format
@@ -2581,10 +2598,10 @@ msgid "bogus exit code %d for good revision"
 msgstr "codi d'error de sortida %d per a una bona revisió"
 
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
 msgstr ""
-"l'execució de la de bisecció ha fallat: codi de sortida %d de «%s» és < 0 o "
-">= 128"
+"l'execució de la de bisecció ha fallat: codi de sortida %d de %s és < 0 o >= "
+"128"
 
 #, c-format
 msgid "cannot open file '%s' for writing"
@@ -2593,37 +2610,44 @@ msgstr "no es pot obrir «%s» per a escriptura"
 msgid "bisect run cannot continue any more"
 msgstr "l'execució de la bisecció no pot continuar més"
 
-#, c-format
 msgid "bisect run success"
 msgstr "execució de bisecció amb èxit"
 
-#, c-format
 msgid "bisect found first bad commit"
 msgstr "la bisecció ha trobat una primera comissió errònia"
 
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
 msgstr ""
-"l'execució de la bisecció ha fallat: «git bisect--helper --bisect-state %s» "
-"ha sortit amb el codi d'error %d"
+"ha fallat l'execució del bisect: «git bisect %s» ha sortit amb el codi "
+"d'error %d"
 
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset no requereix cap argument ni comissió"
-
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms requereix 0 o 1 argument"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "«%s» no requereix cap argument ni comissió"
 
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next no requereix cap argument"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "%s requereix 0 o 1 arguments"
 
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log no requereix cap argument"
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "«%s» requereix 0 arguments"
 
 msgid "no logfile given"
 msgstr "no s'ha donat cap fitxer de registre"
 
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "«%s» ha fallat: no s'ha proporcionat cap ordre."
+
+msgid "need a command"
+msgstr "cal una subordre"
+
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "ordre desconeguda: «%s»"
+
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<opcions>] [<opcions-de-revisió>] [<revisió>] [--] fitxer"
 
@@ -3203,6 +3227,9 @@ msgstr "git bundle list-heads <fitxer> [<refname>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <fitxer> [<refname>...]"
 
+msgid "need a <file> argument"
+msgstr "necessita un argument <fitxer>"
+
 msgid "do not show progress meter"
 msgstr "no mostris l'indicador de progrés"
 
@@ -3256,10 +3283,6 @@ msgstr "%s requereix arguments"
 msgid "%s takes no arguments"
 msgstr "%s no accepta cap valor"
 
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "ordre desconeguda: «%s»"
-
 msgid "only one batch option may be specified"
 msgstr "només es pot especificar una opció per lots"
 
@@ -3395,11 +3418,17 @@ msgstr "<objecte> requerit amb «-%c»"
 msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "només es permeten dos arguments en el mode <tipus> <objecte>, no %d"
 
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <atribut>...] [--] <nom-de-camí>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
 
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <atribut>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
 
 msgid "report all attributes set on file"
 msgstr "informa de tots els atributs establerts en el fitxer"
@@ -3413,6 +3442,12 @@ msgstr "llegeix els noms de fitxer de stdin"
 msgid "terminate input and output records by a NUL character"
 msgstr "acaba els registres d'entrada i de sortida amb un caràcter NUL"
 
+msgid "<tree-ish>"
+msgstr "<tree-ish>"
+
+msgid "which tree-ish to check attributes at"
+msgstr "a quin tree-ish s'han de comprovar els atributs"
+
 msgid "suppress progress reporting"
 msgstr "omet els informes de progrés"
 
@@ -3993,7 +4028,7 @@ msgstr ""
 "*          - tria tots els ítems\n"
 "           - (buit) finalitza la selecció\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Perdó (%s)?\n"
 
@@ -4142,9 +4177,6 @@ msgstr "profunditat"
 msgid "create a shallow clone of that depth"
 msgstr "crea un clon superficial d'aquesta profunditat"
 
-msgid "time"
-msgstr "data"
-
 msgid "create a shallow clone since a specific time"
 msgstr "crea un clon superficial des d'una data específica"
 
@@ -4377,6 +4409,9 @@ msgstr "no s'ha pogut inicialitzar el repositori, s'omet l'URI del paquet"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "no s'han pogut obtenir els objectes de l'URI del paquet «%s»"
 
+msgid "failed to fetch advertised bundles"
+msgstr "no s'han pogut obtenir els paquets anunciats"
+
 msgid "remote transport reported error"
 msgstr "el transport remot ha informat d'un error"
 
@@ -5625,27 +5660,6 @@ msgstr "no s'ha proporcionat l'<eina> per a --tool=<eina>"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "no s'ha proporcionat l'<ordre> per a --extcmd=<ordre>"
 
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <opcions> <env-var>"
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr "valor per defecte per a git_env_*(...) en cas d'absència"
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr "silenciós només utilitza el valor git_env_*() com a codi de sortida"
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr "l'opció «--default» espera un valor booleà amb «--type=bool», no «%s»"
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not "
-"`%s`"
-msgstr ""
-"l'opció «--default» espera un valor llarg sense signe amb «--type=ulong», no "
-"«%s»"
-
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<rev-list-opts>]"
 
@@ -6055,6 +6069,10 @@ msgstr "no s'admet una profunditat negativa en --deepen"
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "--unshallow en un repositori complet no té sentit"
 
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "no s'han pogut obtenir els paquets de «%s»"
+
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all no accepta un argument de repositori"
 
@@ -7087,12 +7105,19 @@ msgstr "ús: %s%s"
 msgid "'git help config' for more information"
 msgstr "«git help config» per a més informació"
 
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=<camí>] <hook-name> [-- <hook-"
+"args>]"
 
 msgid "silently ignore missing requested <hook-name>"
 msgstr "ignora silenciosament la sol·licitud <hook-name> perduda"
 
+msgid "file to read into hooks' stdin"
+msgstr "fitxer per a llegir a l'entrada estàndard dels lligams"
+
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "hi ha una discordança de tipus d'objecte a %s"
@@ -7929,11 +7954,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 
 msgid "do not print remote URL"
 msgstr "no imprimeixis l'URL remot"
@@ -8179,9 +8204,15 @@ msgstr "permet fusionar històries no relacionades"
 msgid "perform multiple merges, one per line of input"
 msgstr "realitza múltiples fusions, una per línia d'entrada"
 
+msgid "specify a merge-base for the merge"
+msgstr "cal especificar una referència base per a la fusió"
+
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge és incompatible amb totes les altres opcions"
 
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base és incompatible amb --stdin"
+
 #, c-format
 msgid "malformed input line: '%s'."
 msgstr "línia d'entrada mal formada: «%s»."
@@ -10102,6 +10133,9 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "no s'ha pogut commutar a %s"
 
+msgid "apply options and merge options cannot be used together"
+msgstr "les opcions apply i merge no es poden usar juntes"
+
 #, c-format
 msgid ""
 "unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
@@ -10312,7 +10346,7 @@ msgid ""
 "and run me again.  I am stopping in case you still have something\n"
 "valuable there.\n"
 msgstr ""
-"Sembla que ja exigeix un directori %s, i em pregunto\n"
+"Sembla que ja existeix un directori %s, i em pregunto\n"
 "si esteu enmig d'un altre «rebase». Si aquest és el cas, proveu\n"
 "\t%s\n"
 "Si no és cas, feu:\n"
@@ -10330,8 +10364,19 @@ msgstr "Mode desconegut: %s"
 msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy requereix --merge o --interactive"
 
-msgid "apply options and merge options cannot be used together"
-msgstr "les opcions apply i merge no es poden usar juntes"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
+msgstr ""
+"les opcions «apply» són incompatibles amb rebase.autosquash. Considereu "
+"afegir-hi --no-autosquash"
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"les opcions «apply» són incompatibles amb rebase.updateRefs. Considereu "
+"afegir-hi --no-update-refs"
 
 #, c-format
 msgid "Unknown rebase backend: %s"
@@ -12846,10 +12891,6 @@ msgstr "«%s» no és un nom de submòdul vàlid"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <command>"
 
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s no admet --super-prefix"
-
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <reason>] <name> <ref>"
 
@@ -13596,6 +13637,11 @@ msgstr "només útil per a la depuració"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch no és compatible amb aquesta plataforma"
 
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr ""
+"no s'ha pogut analitzar la clau de llista de paquets %s amb el valor «%s»"
+
 #, c-format
 msgid "bundle list at '%s' has no mode"
 msgstr "la llista de farcells a «%s» no té mode"
@@ -13606,6 +13652,13 @@ msgstr "no s'ha pogut crear un fitxer temporal"
 msgid "insufficient capabilities"
 msgstr "capacitats insuficients"
 
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "el fitxer baixat de «%s» no és un paquet"
+
+msgid "failed to store maximum creation token"
+msgstr "no s'ha pogut emmagatzemar el testimoni de creació màxim"
+
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
 msgstr "no s'ha reconegut el model del farcell de l'URI «%s»"
@@ -13622,6 +13675,13 @@ msgstr "no s'ha pogut baixar el paquet de l'URI «%s»"
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "el fitxer a l'URI «%s» no és farcell o una llista de farcells"
 
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: argument inesperat: «%s»"
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: s'esperava una neteja després dels arguments"
+
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri: té una línia buida"
 
@@ -13653,6 +13713,13 @@ msgstr "Al repositori li manquen aquestes comissions prerequerides:"
 msgid "need a repository to verify a bundle"
 msgstr "cal un repositori per a verificar un farcell"
 
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"hi ha algunes comissions requerides al magatzem d'objectes, però no estan "
+"connectades a l'historial del repositori"
+
 #, c-format
 msgid "The bundle contains this ref:"
 msgid_plural "The bundle contains these %<PRIuMAX> refs:"
@@ -15096,16 +15163,23 @@ msgid "unknown object format '%s' specified by server"
 msgstr "format d'objecte «%s» especificat pel servidor desconegut"
 
 #, c-format
-msgid "invalid ls-refs response: %s"
-msgstr "resposta de ls-refs no vàlida: %s"
+msgid "error on bundle-uri response line %d: %s"
+msgstr "error a la línia de resposta de bundle-uri %d: %s"
 
-msgid "expected flush after ref listing"
-msgstr "s'esperava una neteja després del llistat de referències"
+msgid "expected flush after bundle-uri listing"
+msgstr "s'esperava un buidatge després del llistat de bundle-uri"
 
 msgid "expected response end packet after ref listing"
 msgstr ""
 "s'esperava un paquet de final de resposta després del llistat de referències"
 
+#, c-format
+msgid "invalid ls-refs response: %s"
+msgstr "resposta de ls-refs no vàlida: %s"
+
+msgid "expected flush after ref listing"
+msgstr "s'esperava una neteja després del llistat de referències"
+
 #, c-format
 msgid "protocol '%s' is not supported"
 msgstr "el protocol «%s» no és compatible"
@@ -15479,7 +15553,7 @@ msgid ""
 "unknown color-moved-ws mode '%s', possible values are 'ignore-space-change', "
 "'ignore-space-at-eol', 'ignore-all-space', 'allow-indentation-change'"
 msgstr ""
-"el mode «%s» de «color-moved-ws» és desconegut, els valor possibles són "
+"el mode «%s» de «color-moved-ws» és desconegut, els valors possibles són "
 "«ignore-space-change», «ignore-space-at-eol», «ignore-all-space», «allow-"
 "indentation-change»"
 
@@ -16284,16 +16358,14 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
-"git [-v | --version] [-h | --help] [-C <camí>] [-c <name>=<value>]\n"
-"           [--exec-path[=<camí>]] [--html-path] [--man-path] [--info-path]\n"
+"git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n"
+"           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
-"           [--git-dir=<camí>] [--work-tree=<camí>] [--namespace=<name>]\n"
-"           [--super-prefix=<camí>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 
 msgid ""
 "'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -16318,10 +16390,6 @@ msgstr "no s'ha especificat un directori per a l'opció «%s»\n"
 msgid "no namespace given for --namespace\n"
 msgstr "no s'ha especificat un nom d'espai per --namespace\n"
 
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "no s'ha especificat cap prefix per a --super-prefix\n"
-
 #, c-format
 msgid "-c expects a configuration string\n"
 msgstr "-c espera una cadena de configuració\n"
@@ -16434,8 +16502,13 @@ msgstr ""
 msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand ha fallat: %s %s"
 
-msgid "gpg failed to sign the data"
-msgstr "gpg ha fallat en signar les dades"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg ha fallat en signar les dades:\n"
+"%s"
 
 msgid "user.signingKey needs to be set for ssh signing"
 msgstr "user.signingKey s'ha d'establir per a signar amb ssh"
@@ -17604,6 +17677,10 @@ msgstr "objecte solt corrupte «%s»"
 msgid "garbage at end of loose object '%s'"
 msgstr "brossa al final de l'objecte solt «%s»"
 
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "no s'ha pogut obrir l'objecte solt %s"
+
 #, c-format
 msgid "unable to parse %s header"
 msgstr "no s'ha pogut analitzar la capçalera %s"
@@ -17620,17 +17697,13 @@ msgid "header for %s too long, exceeds %d bytes"
 msgstr "la capçalera per a %s és massa llarga, supera els %d bytes"
 
 #, c-format
-msgid "failed to read object %s"
-msgstr "s'ha produït un error en llegir l'objecte %s"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "l'objecte solt %s (emmagatzemat a %s) és corrupte"
 
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "no s'ha trobat el reemplaçament %s per a %s"
 
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "l'objecte solt %s (emmagatzemat a %s) és corrupte"
-
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
 msgstr "l'objecte empaquetat %s (emmagatzemat a %s) és corrupte"
@@ -17643,9 +17716,6 @@ msgstr "no s'ha pogut escriure al fitxer %s"
 msgid "unable to set permission to '%s'"
 msgstr "no s'ha pogut establir el permís a «%s»"
 
-msgid "file write error"
-msgstr "s'ha produït un error en escriure al fitxer"
-
 msgid "error when closing loose object file"
 msgstr "error en tancar el fitxer d'objecte solt"
 
@@ -17693,11 +17763,12 @@ msgstr "s'ha produït un error en crear el directori %s"
 msgid "cannot read object for %s"
 msgstr "no es pot llegir l'objecte per a %s"
 
-msgid "corrupt commit"
-msgstr "comissió corrupta"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "l'objecte ha fallat fsck: %s"
 
-msgid "corrupt tag"
-msgstr "etiqueta corrupta"
+msgid "refusing to create malformed object"
+msgstr "es nega a crear un objecte mal format"
 
 #, c-format
 msgid "read error while indexing %s"
@@ -17966,10 +18037,6 @@ msgstr "el desplaçament XOR a l'índex de mapa de bits no és vàlid"
 msgid "cannot fstat bitmap file"
 msgstr "no es pot fer fstat en el fitxer de mapa de bits"
 
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "s'ignorarà el fitxer extra de mapa de bits: «%s»"
-
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "la suma de verificació no coincideix amb el MIDX i el mapa de bits"
 
@@ -18240,6 +18307,9 @@ msgstr "sigues més discret"
 msgid "use <n> digits to display object names"
 msgstr "usa <n> xifres per a mostrar els noms d'objecte"
 
+msgid "prefixed path to initial superproject"
+msgstr "camí prefixat al superprojecte inicial"
+
 msgid "how to strip spaces and #comments from message"
 msgstr "com suprimir els espais i #comentaris del missatge"
 
@@ -18748,6 +18818,14 @@ msgstr "darrere per %d"
 msgid "ahead %d, behind %d"
 msgstr "davant per %d, darrere per %d"
 
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) no accepta arguments"
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "argument %%(%.*s) desconegut: %s"
+
 #, c-format
 msgid "expected format: %%(color:<color>)"
 msgstr "format esperat: %%(color:<color>)"
@@ -18764,22 +18842,6 @@ msgstr "Valor enter esperat pel nom de referència:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "Valor enter esperat pel nom de referència:rstrip=%s"
 
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "argument %%(%s) desconegut: %s"
-
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) no accepta arguments"
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) no accepta arguments"
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) no accepta arguments"
-
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
 msgstr "s'esperava %%(trailers:key=<value>)"
@@ -18796,10 +18858,6 @@ msgstr "valor positiu esperat conté:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "valor positiu esperat «%s» a %%(%s)"
 
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "opció del correu electrònic no reconeguda: «%s»"
-
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
 msgstr "format esperat: %%(align:<amplada>,<posició>)"
@@ -18813,12 +18871,12 @@ msgid "unrecognized width:%s"
 msgstr "amplada no reconeguda:%s"
 
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "amplada positiva esperada amb l'àtom %%(align)"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "argument %%(%s) desconegut: %s"
 
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) no accepta arguments"
+msgid "positive width expected with the %%(align) atom"
+msgstr "amplada positiva esperada amb l'àtom %%(align)"
 
 #, c-format
 msgid "malformed field name: %.*s"
@@ -20076,6 +20134,23 @@ msgstr "git %s: s'ha produït un error en llegir l'índex"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s: s'ha produït un error en actualitzar l'índex"
 
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "«%s» no és una etiqueta vàlida"
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "«%s» no és un nom de referència vàlid"
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+"«update-ref» requereix un refname plenament qualificat, p. ex. refs/heads/%s"
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "ordre no vàlida «%.*s»"
+
 #, c-format
 msgid "%s does not accept arguments: '%s'"
 msgstr "%s no accepta arguments: «%s»"
@@ -20882,6 +20957,16 @@ msgstr "ls-tree ha retornat un codi de retorn %d no esperat"
 msgid "failed to lstat '%s'"
 msgstr "s'ha produït un error en fer lstat a «%s»"
 
+msgid "no remote configured to get bundle URIs from"
+msgstr "no hi ha cap remot configurat per a obtenir els URI del paquet"
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "el remot «%s» no té cap URL configurat"
+
+msgid "could not get the bundle-uri list"
+msgstr "no s'ha pogut obtenir la llista bundle-uri"
+
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <opcions> (control|prime|update)"
 
@@ -21234,6 +21319,13 @@ msgstr "S'està avortant."
 msgid "failed to push all needed submodules"
 msgstr "no s'han pogut pujar tots els submòduls necessaris"
 
+msgid "bundle-uri operation not supported by protocol"
+msgstr "L'operació bundle-uri no és compatible amb el protocol"
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr ""
+"no s'ha pogut recuperar la llista de paquets d'URI anunciats pel servidor"
+
 msgid "too-short tree object"
 msgstr "objecte d'arbre massa curt"
 
@@ -21981,14 +22073,20 @@ msgstr "Fitxers ignorats"
 
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
+msgstr ""
+"S'han trigat %.2f segons a enumerar els fitxers sense seguiment,\n"
+"però els resultats es van emmagatzemar a la memòria cau, i les\n"
+"execucions posteriors podrien ser més ràpides."
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "S'han trigat %.2f segons a enumerar els fitxers sense seguiment."
+
+msgid "See 'git help status' for information on how to improve this."
 msgstr ""
-"S'ha trigat %.2f segons enumerar els fitxers no seguits.\n"
-"«status -uno» pot accelerar-ho, però heu d'anar amb compte de no\n"
-"oblidar-vos d'afegir fitxers nous vosaltres mateixos (vegeu\n"
-"«git help status»)."
+"Vegeu «git help status» per a obtenir informació sobre com millorar-ho."
 
 #, c-format
 msgid "Untracked files not listed%s"
@@ -22134,276 +22232,6 @@ msgstr ""
 msgid "Unable to determine absolute path of git directory"
 msgstr "No s'ha pogut determinar el camí absolut del directori de git"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%12s %12s %s"
-
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "modificat %d camí\n"
-msgstr[1] "modificat %d camins\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Si el pedaç s'aplica correctament, el tros editat es marcarà immediatament\n"
-"per «staging»."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Si el pedaç s'aplica correctament, el tros editat es marcarà immediatament\n"
-"per «stashing»."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Si el pedaç s'aplica correctament, el tros editat es marcarà immediatament\n"
-"per «unstaging»."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Si el pedaç s'aplica correctament, el tros editat es marcarà immediatament\n"
-"per a aplicar-se."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Si el pedaç s'aplica correctament, el tros editat es marcarà immediatament\n"
-"per a descartar-se."
-
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr "s'ha produït un error en escriure al fitxer d'edició del tros: %s"
-
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"---\n"
-"Per a eliminar les línies «%s», convertiu-les en línies ' ' (context).\n"
-"Per a eliminar les línies «%s», suprimiu-les.\n"
-"Les línies que comencin per %s s'eliminaran.\n"
-
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr "s'ha produït un error en llegir al fitxer d'edició del tros: %s"
-
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - fes «stage» d'aquest tros\n"
-"n - no facis «stage» d'aquest tros\n"
-"q - surt; no facis «stage» d'aquest tros o de cap altre restant\n"
-"a - fes «stage» d'aquest tros i tota la resta de trossos del fitxer\n"
-"d - no facis «stage» d'aquest tros o de cap altre restant del fitxer"
-
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y - fes «stash» d'aquest tros\n"
-"n - no facis «stash» d'aquest tros\n"
-"q - surt; no facis «stash» d'aquest tros o de cap altre restant\n"
-"a - fes «stash» d'aquest tros i tota la resta de trossos del fitxer\n"
-"d - no facis «stash» d'aquest tros o de cap altre restant del fitxer"
-
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - fes «unstage» d'aquest tros\n"
-"n - no facis «unstage» d'aquest tros\n"
-"q - surt; no facis «unstage» d'aquest tros o de cap altre restant\n"
-"a - fes «unstage» d'aquest tros i tota la resta de trossos del fitxer\n"
-"d - no facis «unstage» d'aquest tros o de cap altre restant del fitxer"
-
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - aplica aquest tros a l'índex\n"
-"n - no apliquis aquest tros a l'índex\n"
-"q - surt; no apliquis aquest tros ni cap dels pendents\n"
-"a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
-"d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer"
-
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - descarta aquest tros de l'arbre de treball\n"
-"n - no descartis aquest tros des de l'arbre de treball\n"
-"q - surt; no descartis aquest tros ni cap dels pendents\n"
-"a - descarta aquest tros i tots els trossos posteriors en el fitxer\n"
-"d - no descartis aquest tros ni cap dels trossos posteriors en el fitxer"
-
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - descarta aquest tros de l'índex i de l'arbre de treball\n"
-"n - no descartis aquest tros des de l'índex i de l'arbre de treball\n"
-"q - surt; no descartis aquest tros ni cap dels pendents\n"
-"a - descarta aquest tros i tots els trossos posteriors en el fitxer\n"
-"d - no descartis aquest tros ni cap dels trossos posteriors en el fitxer"
-
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - aplica aquest tros a l'índex i l'arbre de treball\n"
-"n - no apliquis aquest tros des de l'índex i de l'arbre de treball\n"
-"q - surt; no apliquis aquest tros ni cap dels pendents\n"
-"a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
-"d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer"
-
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - aplica aquest tros a l'arbre de treball\n"
-"n - no apliquis aquest tros a l'arbre de treball\n"
-"q - surt; no apliquis aquest tros ni cap dels pendents\n"
-"a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
-"d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer"
-
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g - selecciona el tros on voleu anar\n"
-"/ - cerca un tros que coincideixi amb l'expressió regular donada\n"
-"j - deixa aquest tros sense decidir, veure el tros sense decidir següent\n"
-"J - deixa aquest tros sense decidir, veure el tros següent\n"
-"k - deixa aquest tros sense decidir, veure el tros sense decidir anterior\n"
-"K - deixa aquest tros sense decidir, veure el tros anterior\n"
-"s - divideix el tros actual en trossos més petits\n"
-"e - edita manualment el tros actual\n"
-"? - mostra l'ajuda\n"
-
-msgid "The selected hunks do not apply to the index!\n"
-msgstr "Els trossos seleccionats no apliquen a l'índex\n"
-
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "s'està ignorant %s no fusionat\n"
-
-msgid "No other hunks to goto\n"
-msgstr "No hi ha altres trossos on anar-hi\n"
-
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "Número no vàlid: «%s»\n"
-
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "Només %d tros disponible.\n"
-msgstr[1] "Només %d trossos disponibles.\n"
-
-msgid "No other hunks to search\n"
-msgstr "No hi ha cap altre tros a cercar\n"
-
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "Expressió regular de cerca mal formada %s: %s\n"
-
-msgid "No hunk matches the given pattern\n"
-msgstr "No hi ha trossos que coincideixin amb el patró donat\n"
-
-msgid "No previous hunk\n"
-msgstr "Sense tros previ\n"
-
-msgid "No next hunk\n"
-msgstr "No hi ha tros següent\n"
-
-msgid "Sorry, cannot split this hunk\n"
-msgstr "No es pot dividir aquest tros\n"
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "Divideix en %d tros.\n"
-msgstr[1] "Divideix en %d trossos.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "No es pot editar aquest tros\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        - mostra els camins amb canvis\n"
-"update        - afegeix l'estat de l'arbre de treball al conjunt de canvis "
-"«staged»\n"
-"revert        - reverteix el conjunt de canvis de «staged» a la versió HEAD\n"
-"patch         - selecciona trossos i actualitza'ls selectivament\n"
-"diff          - mostra la diferència entre HEAD i l'índex\n"
-"add untracked - afegeix el contingut dels fitxers no seguits al conjunt de "
-"canvis «staged»\n"
-
-msgid "missing --"
-msgstr "manca --"
-
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "desconegut --patch mode: %s"
-
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "argument %s no vàlid, s'esperava --"
-
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr "la zona local difereix de GMT per un interval que no és de minuts\n"
 
@@ -22728,6 +22556,366 @@ msgstr "S'està ometent %s amb el sufix de còpia de seguretat «%s».\n"
 msgid "Do you really want to send %s? [y|N]: "
 msgstr "Esteu segur que voleu enviar %s? [y|N]: "
 
+#~ msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
+#~ msgstr "git bisect--helper --bisect-state (bad|new) [<rev>]"
+
+#~ msgid "won't bisect on cg-seek'ed tree"
+#~ msgstr "no es bisecarà en un arbre en el qual s'ha fet cg-seek"
+
+#~ msgid "--bisect-terms requires 0 or 1 argument"
+#~ msgstr "--bisect-terms requereix 0 o 1 argument"
+
+#~ msgid "--bisect-next requires 0 arguments"
+#~ msgstr "--bisect-next no requereix cap argument"
+
+#~ msgid "--bisect-log requires 0 arguments"
+#~ msgstr "--bisect-log no requereix cap argument"
+
+#~ msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
+#~ msgstr "git env--helper --type=[bool|ulong] <opcions> <env-var>"
+
+#~ msgid "default for git_env_*(...) to fall back on"
+#~ msgstr "valor per defecte per a git_env_*(...) en cas d'absència"
+
+#~ msgid "be quiet only use git_env_*() value as exit code"
+#~ msgstr "silenciós només utilitza el valor git_env_*() com a codi de sortida"
+
+#, c-format
+#~ msgid ""
+#~ "option `--default' expects a boolean value with `--type=bool`, not `%s`"
+#~ msgstr ""
+#~ "l'opció «--default» espera un valor booleà amb «--type=bool», no «%s»"
+
+#, c-format
+#~ msgid ""
+#~ "option `--default' expects an unsigned long value with `--type=ulong`, "
+#~ "not `%s`"
+#~ msgstr ""
+#~ "l'opció «--default» espera un valor llarg sense signe amb «--type=ulong», "
+#~ "no «%s»"
+
+#, c-format
+#~ msgid "%s doesn't support --super-prefix"
+#~ msgstr "%s no admet --super-prefix"
+
+#, c-format
+#~ msgid "no prefix given for --super-prefix\n"
+#~ msgstr "no s'ha especificat cap prefix per a --super-prefix\n"
+
+#, c-format
+#~ msgid "failed to read object %s"
+#~ msgstr "s'ha produït un error en llegir l'objecte %s"
+
+#~ msgid "file write error"
+#~ msgstr "s'ha produït un error en escriure al fitxer"
+
+#~ msgid "corrupt commit"
+#~ msgstr "comissió corrupta"
+
+#~ msgid "corrupt tag"
+#~ msgstr "etiqueta corrupta"
+
+#, c-format
+#~ msgid "%%(objecttype) does not take arguments"
+#~ msgstr "%%(objecttype) no accepta arguments"
+
+#, c-format
+#~ msgid "%%(deltabase) does not take arguments"
+#~ msgstr "%%(deltabase) no accepta arguments"
+
+#, c-format
+#~ msgid "%%(body) does not take arguments"
+#~ msgstr "%%(body) no accepta arguments"
+
+#, c-format
+#~ msgid "unrecognized email option: %s"
+#~ msgstr "opció del correu electrònic no reconeguda: «%s»"
+
+#, c-format
+#~ msgid ""
+#~ "It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
+#~ "may speed it up, but you have to be careful not to forget to add\n"
+#~ "new files yourself (see 'git help status')."
+#~ msgstr ""
+#~ "S'ha trigat %.2f segons enumerar els fitxers no seguits.\n"
+#~ "«status -uno» pot accelerar-ho, però heu d'anar amb compte de no\n"
+#~ "oblidar-vos d'afegir fitxers nous vosaltres mateixos (vegeu\n"
+#~ "«git help status»)."
+
+#, perl-format
+#~ msgid "%12s %12s %s"
+#~ msgstr "%12s %12s %s"
+
+#, perl-format
+#~ msgid "touched %d path\n"
+#~ msgid_plural "touched %d paths\n"
+#~ msgstr[0] "modificat %d camí\n"
+#~ msgstr[1] "modificat %d camins\n"
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for staging."
+#~ msgstr ""
+#~ "Si el pedaç s'aplica correctament, el tros editat es marcarà "
+#~ "immediatament\n"
+#~ "per «staging»."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for stashing."
+#~ msgstr ""
+#~ "Si el pedaç s'aplica correctament, el tros editat es marcarà "
+#~ "immediatament\n"
+#~ "per «stashing»."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for unstaging."
+#~ msgstr ""
+#~ "Si el pedaç s'aplica correctament, el tros editat es marcarà "
+#~ "immediatament\n"
+#~ "per «unstaging»."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for applying."
+#~ msgstr ""
+#~ "Si el pedaç s'aplica correctament, el tros editat es marcarà "
+#~ "immediatament\n"
+#~ "per a aplicar-se."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for discarding."
+#~ msgstr ""
+#~ "Si el pedaç s'aplica correctament, el tros editat es marcarà "
+#~ "immediatament\n"
+#~ "per a descartar-se."
+
+#, perl-format
+#~ msgid "failed to open hunk edit file for writing: %s"
+#~ msgstr "s'ha produït un error en escriure al fitxer d'edició del tros: %s"
+
+#, perl-format
+#~ msgid ""
+#~ "---\n"
+#~ "To remove '%s' lines, make them ' ' lines (context).\n"
+#~ "To remove '%s' lines, delete them.\n"
+#~ "Lines starting with %s will be removed.\n"
+#~ msgstr ""
+#~ "---\n"
+#~ "Per a eliminar les línies «%s», convertiu-les en línies ' ' (context).\n"
+#~ "Per a eliminar les línies «%s», suprimiu-les.\n"
+#~ "Les línies que comencin per %s s'eliminaran.\n"
+
+#, perl-format
+#~ msgid "failed to open hunk edit file for reading: %s"
+#~ msgstr "s'ha produït un error en llegir al fitxer d'edició del tros: %s"
+
+#~ msgid ""
+#~ "y - stage this hunk\n"
+#~ "n - do not stage this hunk\n"
+#~ "q - quit; do not stage this hunk or any of the remaining ones\n"
+#~ "a - stage this hunk and all later hunks in the file\n"
+#~ "d - do not stage this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - fes «stage» d'aquest tros\n"
+#~ "n - no facis «stage» d'aquest tros\n"
+#~ "q - surt; no facis «stage» d'aquest tros o de cap altre restant\n"
+#~ "a - fes «stage» d'aquest tros i tota la resta de trossos del fitxer\n"
+#~ "d - no facis «stage» d'aquest tros o de cap altre restant del fitxer"
+
+#~ msgid ""
+#~ "y - stash this hunk\n"
+#~ "n - do not stash this hunk\n"
+#~ "q - quit; do not stash this hunk or any of the remaining ones\n"
+#~ "a - stash this hunk and all later hunks in the file\n"
+#~ "d - do not stash this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - fes «stash» d'aquest tros\n"
+#~ "n - no facis «stash» d'aquest tros\n"
+#~ "q - surt; no facis «stash» d'aquest tros o de cap altre restant\n"
+#~ "a - fes «stash» d'aquest tros i tota la resta de trossos del fitxer\n"
+#~ "d - no facis «stash» d'aquest tros o de cap altre restant del fitxer"
+
+#~ msgid ""
+#~ "y - unstage this hunk\n"
+#~ "n - do not unstage this hunk\n"
+#~ "q - quit; do not unstage this hunk or any of the remaining ones\n"
+#~ "a - unstage this hunk and all later hunks in the file\n"
+#~ "d - do not unstage this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - fes «unstage» d'aquest tros\n"
+#~ "n - no facis «unstage» d'aquest tros\n"
+#~ "q - surt; no facis «unstage» d'aquest tros o de cap altre restant\n"
+#~ "a - fes «unstage» d'aquest tros i tota la resta de trossos del fitxer\n"
+#~ "d - no facis «unstage» d'aquest tros o de cap altre restant del fitxer"
+
+#~ msgid ""
+#~ "y - apply this hunk to index\n"
+#~ "n - do not apply this hunk to index\n"
+#~ "q - quit; do not apply this hunk or any of the remaining ones\n"
+#~ "a - apply this hunk and all later hunks in the file\n"
+#~ "d - do not apply this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - aplica aquest tros a l'índex\n"
+#~ "n - no apliquis aquest tros a l'índex\n"
+#~ "q - surt; no apliquis aquest tros ni cap dels pendents\n"
+#~ "a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
+#~ "d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer"
+
+#~ msgid ""
+#~ "y - discard this hunk from worktree\n"
+#~ "n - do not discard this hunk from worktree\n"
+#~ "q - quit; do not discard this hunk or any of the remaining ones\n"
+#~ "a - discard this hunk and all later hunks in the file\n"
+#~ "d - do not discard this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - descarta aquest tros de l'arbre de treball\n"
+#~ "n - no descartis aquest tros des de l'arbre de treball\n"
+#~ "q - surt; no descartis aquest tros ni cap dels pendents\n"
+#~ "a - descarta aquest tros i tots els trossos posteriors en el fitxer\n"
+#~ "d - no descartis aquest tros ni cap dels trossos posteriors en el fitxer"
+
+#~ msgid ""
+#~ "y - discard this hunk from index and worktree\n"
+#~ "n - do not discard this hunk from index and worktree\n"
+#~ "q - quit; do not discard this hunk or any of the remaining ones\n"
+#~ "a - discard this hunk and all later hunks in the file\n"
+#~ "d - do not discard this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - descarta aquest tros de l'índex i de l'arbre de treball\n"
+#~ "n - no descartis aquest tros des de l'índex i de l'arbre de treball\n"
+#~ "q - surt; no descartis aquest tros ni cap dels pendents\n"
+#~ "a - descarta aquest tros i tots els trossos posteriors en el fitxer\n"
+#~ "d - no descartis aquest tros ni cap dels trossos posteriors en el fitxer"
+
+#~ msgid ""
+#~ "y - apply this hunk to index and worktree\n"
+#~ "n - do not apply this hunk to index and worktree\n"
+#~ "q - quit; do not apply this hunk or any of the remaining ones\n"
+#~ "a - apply this hunk and all later hunks in the file\n"
+#~ "d - do not apply this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - aplica aquest tros a l'índex i l'arbre de treball\n"
+#~ "n - no apliquis aquest tros des de l'índex i de l'arbre de treball\n"
+#~ "q - surt; no apliquis aquest tros ni cap dels pendents\n"
+#~ "a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
+#~ "d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer"
+
+#~ msgid ""
+#~ "y - apply this hunk to worktree\n"
+#~ "n - do not apply this hunk to worktree\n"
+#~ "q - quit; do not apply this hunk or any of the remaining ones\n"
+#~ "a - apply this hunk and all later hunks in the file\n"
+#~ "d - do not apply this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - aplica aquest tros a l'arbre de treball\n"
+#~ "n - no apliquis aquest tros a l'arbre de treball\n"
+#~ "q - surt; no apliquis aquest tros ni cap dels pendents\n"
+#~ "a - aplica aquest tros i tots els trossos posteriors en el fitxer\n"
+#~ "d - no apliquis aquest tros ni cap dels trossos posteriors en el fitxer"
+
+#~ msgid ""
+#~ "g - select a hunk to go to\n"
+#~ "/ - search for a hunk matching the given regex\n"
+#~ "j - leave this hunk undecided, see next undecided hunk\n"
+#~ "J - leave this hunk undecided, see next hunk\n"
+#~ "k - leave this hunk undecided, see previous undecided hunk\n"
+#~ "K - leave this hunk undecided, see previous hunk\n"
+#~ "s - split the current hunk into smaller hunks\n"
+#~ "e - manually edit the current hunk\n"
+#~ "? - print help\n"
+#~ msgstr ""
+#~ "g - selecciona el tros on voleu anar\n"
+#~ "/ - cerca un tros que coincideixi amb l'expressió regular donada\n"
+#~ "j - deixa aquest tros sense decidir, veure el tros sense decidir següent\n"
+#~ "J - deixa aquest tros sense decidir, veure el tros següent\n"
+#~ "k - deixa aquest tros sense decidir, veure el tros sense decidir "
+#~ "anterior\n"
+#~ "K - deixa aquest tros sense decidir, veure el tros anterior\n"
+#~ "s - divideix el tros actual en trossos més petits\n"
+#~ "e - edita manualment el tros actual\n"
+#~ "? - mostra l'ajuda\n"
+
+#~ msgid "The selected hunks do not apply to the index!\n"
+#~ msgstr "Els trossos seleccionats no apliquen a l'índex\n"
+
+#, perl-format
+#~ msgid "ignoring unmerged: %s\n"
+#~ msgstr "s'està ignorant %s no fusionat\n"
+
+#~ msgid "No other hunks to goto\n"
+#~ msgstr "No hi ha altres trossos on anar-hi\n"
+
+#, perl-format
+#~ msgid "Invalid number: '%s'\n"
+#~ msgstr "Número no vàlid: «%s»\n"
+
+#, perl-format
+#~ msgid "Sorry, only %d hunk available.\n"
+#~ msgid_plural "Sorry, only %d hunks available.\n"
+#~ msgstr[0] "Només %d tros disponible.\n"
+#~ msgstr[1] "Només %d trossos disponibles.\n"
+
+#~ msgid "No other hunks to search\n"
+#~ msgstr "No hi ha cap altre tros a cercar\n"
+
+#, perl-format
+#~ msgid "Malformed search regexp %s: %s\n"
+#~ msgstr "Expressió regular de cerca mal formada %s: %s\n"
+
+#~ msgid "No hunk matches the given pattern\n"
+#~ msgstr "No hi ha trossos que coincideixin amb el patró donat\n"
+
+#~ msgid "No previous hunk\n"
+#~ msgstr "Sense tros previ\n"
+
+#~ msgid "No next hunk\n"
+#~ msgstr "No hi ha tros següent\n"
+
+#~ msgid "Sorry, cannot split this hunk\n"
+#~ msgstr "No es pot dividir aquest tros\n"
+
+#, perl-format
+#~ msgid "Split into %d hunk.\n"
+#~ msgid_plural "Split into %d hunks.\n"
+#~ msgstr[0] "Divideix en %d tros.\n"
+#~ msgstr[1] "Divideix en %d trossos.\n"
+
+#~ msgid "Sorry, cannot edit this hunk\n"
+#~ msgstr "No es pot editar aquest tros\n"
+
+#~ msgid ""
+#~ "status        - show paths with changes\n"
+#~ "update        - add working tree state to the staged set of changes\n"
+#~ "revert        - revert staged set of changes back to the HEAD version\n"
+#~ "patch         - pick hunks and update selectively\n"
+#~ "diff          - view diff between HEAD and index\n"
+#~ "add untracked - add contents of untracked files to the staged set of "
+#~ "changes\n"
+#~ msgstr ""
+#~ "status        - mostra els camins amb canvis\n"
+#~ "update        - afegeix l'estat de l'arbre de treball al conjunt de "
+#~ "canvis «staged»\n"
+#~ "revert        - reverteix el conjunt de canvis de «staged» a la versió "
+#~ "HEAD\n"
+#~ "patch         - selecciona trossos i actualitza'ls selectivament\n"
+#~ "diff          - mostra la diferència entre HEAD i l'índex\n"
+#~ "add untracked - afegeix el contingut dels fitxers no seguits al conjunt "
+#~ "de canvis «staged»\n"
+
+#~ msgid "missing --"
+#~ msgstr "manca --"
+
+#, perl-format
+#~ msgid "unknown --patch mode: %s"
+#~ msgstr "desconegut --patch mode: %s"
+
+#, perl-format
+#~ msgid "invalid argument %s, expecting --"
+#~ msgstr "argument %s no vàlid, s'esperava --"
+
 #, c-format
 #~ msgid "unable to normalize object directory: %s"
 #~ msgstr "no s'ha pogut normalitzar el directori de l'objecte: %s"
index 45c7a418d75bacf60080fcb60c5b81560a001063..7559a8c64e4eb799110aa7142a35656c30cdb2b6 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-12-02 17:16+0100\n"
-"PO-Revision-Date: 2022-12-02 17:19+0100\n"
+"POT-Creation-Date: 2023-03-03 17:13+0100\n"
+"PO-Revision-Date: 2023-03-03 13:46+0100\n"
 "Last-Translator: Ralf Thielow <ralf.thielow@gmail.com>\n"
 "Language-Team: German\n"
 "Language: de\n"
@@ -17,7 +17,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n!=1);\n"
-"X-Generator: Poedit 3.2\n"
+"X-Generator: Poedit 3.2.2\n"
 
 #, c-format
 msgid "Huh (%s)?"
@@ -45,13 +45,13 @@ msgstr "Konnte '%s' nicht zum Commit vormerken."
 msgid "could not write index"
 msgstr "konnte Index nicht schreiben"
 
-#, c-format, perl-format
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "%d Pfad aktualisiert\n"
 msgstr[1] "%d Pfade aktualisiert\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "Hinweis: %s ist nun unversioniert.\n"
 
@@ -65,7 +65,7 @@ msgstr "Revert"
 msgid "Could not parse HEAD^{tree}"
 msgstr "Konnte HEAD^{tree} nicht parsen."
 
-#, c-format, perl-format
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "%d Pfad wiederhergestellt\n"
@@ -78,7 +78,7 @@ msgstr "Keine unversionierten Dateien.\n"
 msgid "Add untracked"
 msgstr "Unversionierte Dateien hinzufügen"
 
-#, c-format, perl-format
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "%d Pfad hinzugefügt\n"
@@ -172,19 +172,19 @@ msgstr "Index konnte nicht aktualisiert werden"
 msgid "Bye.\n"
 msgstr "Tschüss.\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Modusänderung der Staging-Area hinzufügen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Löschung der Staging-Area hinzufügen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung der Staging-Area hinzufügen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Diesen Patch-Block der Staging-Area hinzufügen [y,n,q,a,d%s,?]? "
 
@@ -210,19 +210,19 @@ msgstr ""
 "d - diesen oder alle weiteren Patch-Blöcke in dieser Datei nicht zum Commit "
 "vormerken\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Modusänderung stashen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Löschung stashen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung stashen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Diesen Patch-Block stashen [y,n,q,a,d%s,?]? "
 
@@ -246,19 +246,19 @@ msgstr ""
 "a - diesen und alle weiteren Patch-Blöcke dieser Datei stashen\n"
 "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht stashen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Modusänderung aus der Staging-Area entfernen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Löschung aus der Staging-Area entfernen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung aus der Staging-Area entfernen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Diesen Patch-Block aus der Staging-Area entfernen [y,n,q,a,d%s,?]? "
 
@@ -285,19 +285,19 @@ msgstr ""
 "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht aus Staging-"
 "Area entfernen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "Modusänderung auf Index anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Löschung auf Index anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung auf Index anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Diesen Patch-Block auf Index anwenden [y,n,q,a,d%s,?]? "
 
@@ -324,19 +324,19 @@ msgstr ""
 "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht auf den Index "
 "anwenden\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "Modusänderung im Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Löschung im Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung im Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Diesen Patch-Block im Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
@@ -363,20 +363,20 @@ msgstr ""
 "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht im "
 "Arbeitsverzeichnis verwerfen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Modusänderung vom Index und Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Löschung vom Index und Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung im Index und Arbeitsverzeichnis verwerfen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Diesen Patch-Block vom Index und Arbeitsverzeichnis verwerfen [y,n,q,a,"
@@ -395,20 +395,20 @@ msgstr ""
 "a - diesen und alle weiteren Patch-Blöcke in der Datei verwerfen\n"
 "d - diesen oder alle weiteren Patch-Blöcke in der Datei nicht verwerfen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Modusänderung auf Index und Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Löschung auf Index und Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung auf Index und Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Diesen Patch-Block auf Index und Arbeitsverzeichnis anwenden [y,n,q,a,"
@@ -428,19 +428,19 @@ msgstr ""
 "a - diesen und alle weiteren Patch-Blöcke in der Datei anwenden\n"
 "d - diesen oder alle weiteren Patch-Blöcke in der Datei nicht anwenden\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr "Modusänderung auf Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Löschung auf Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Ergänzung auf Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Diesen Patch-Block auf das Arbeitsverzeichnis anwenden [y,n,q,a,d%s,?]? "
@@ -519,7 +519,6 @@ msgstr ""
 "Um '%c' Zeilen zu entfernen, löschen Sie diese.\n"
 "Zeilen, die mit %c beginnen, werden entfernt.\n"
 
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -542,12 +541,6 @@ msgstr "'git apply --cached' schlug fehl"
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
@@ -1416,6 +1409,12 @@ msgstr ".gitattributes aus dem Arbeitsverzeichnis lesen"
 msgid "report archived files on stderr"
 msgstr "archivierte Dateien in der Standard-Fehlerausgabe ausgeben"
 
+msgid "time"
+msgstr "Zeit"
+
+msgid "set modification time of archive entries"
+msgstr "Änderungszeitpunkt von Archiveinträgen festlegen"
+
 msgid "set compression level"
 msgstr "Komprimierungsgrad setzen"
 
@@ -1456,6 +1455,13 @@ msgstr "Argument für Format '%s' nicht unterstützt: -%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%.*s ist kein gültiger Attributname"
 
+msgid "unable to add additional attribute"
+msgstr "konnte kein zusätzliches Attribut hinzufügen"
+
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "ignoriere übermäßig lange Attribut-Zeile %d"
+
 #, c-format
 msgid "%s not allowed: %s:%d"
 msgstr "%s nicht erlaubt: %s:%d"
@@ -1467,6 +1473,18 @@ msgstr ""
 "Verneinende Muster werden in Git-Attributen ignoriert.\n"
 "Benutzen Sie '\\!' für führende Ausrufezeichen."
 
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "Kann gitattributes-Datei '%s' nicht lesen"
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "ignoriere übermäßig große gitattributes-Datei '%s'"
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "ignoriere übermäßig großen gitattribute-Blob '%s'"
+
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
 msgstr "Ungültiger Inhalt bzgl. Anführungszeichen in Datei '%s': %s"
@@ -1651,10 +1669,12 @@ msgstr ""
 msgid "not tracking: ambiguous information for ref '%s'"
 msgstr "kein Tracking: mehrdeutige Informationen für Referenz '%s'"
 
+#. #-#-#-#-#  branch.c.po  #-#-#-#-#
 #. TRANSLATORS: This is a line listing a remote with duplicate
 #. refspecs in the advice message below. For RTL languages you'll
 #. probably want to swap the "%s" and leading "  " space around.
 #.
+#. #-#-#-#-#  object-name.c.po  #-#-#-#-#
 #. TRANSLATORS: This is line item of ambiguous object output
 #. from describe_ambiguous_object() above. For RTL languages
 #. you'll probably want to swap the "%s" and leading " " space
@@ -1748,11 +1768,11 @@ msgstr "Submodul '%s': Submodul konnte nicht gefunden werden"
 
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
-"Sie können versuchen die Submodule mit 'git checkout %s && git submodule "
-"update --init' zu aktualisieren"
+"Sie können versuchen, die Submodule mit \"git checkout --no-recurse-"
+"submodules %s && git submodule update --init\" zu aktualisieren."
 
 #, c-format
 msgid "submodule '%s': cannot create branch '%s'"
@@ -1788,6 +1808,13 @@ msgid "Unstaged changes after refreshing the index:"
 msgstr ""
 "Nicht zum Commit vorgemerkte Änderungen nach Aktualisierung der Staging-Area:"
 
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"Die Einstellung add.interactive.useBuiltin wurde entfernt!\n"
+"Siehe den Eintrag in 'git help config' für Details."
+
 msgid "Could not read the index"
 msgstr "Konnte den Index nicht lesen"
 
@@ -2194,6 +2221,9 @@ msgstr "git am [<Optionen>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "interaktiv ausführen"
 
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "Hooks pre-applypatch und applypatch-msg umgehen"
+
 msgid "historical option -- no-op"
 msgstr "historische Option -- kein Effekt"
 
@@ -2335,32 +2365,28 @@ msgstr "git archive: Protokollfehler"
 msgid "git archive: expected a flush"
 msgstr "git archive: erwartete eine Spülung (flush)"
 
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<Commit>]"
-
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<Begriff> --term-{old,"
-"good}=<Begriff>] [--no-checkout] [--first-parent] [<schlecht> [<gut>...]] "
-"[--] [<Pfade>...]"
+"git bisect start [--term-{new,bad}=<Begriff> --term-{old,good}=<Begriff>] [--"
+"no-checkout] [--first-parent] [<schlecht> [<gut>...]] [--] "
+"[<Pfadspezifikation>...]"
 
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<Commit>]"
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<Commit>...]"
 
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<Commit>...]"
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<Commit>|<Bereich>)...]"
 
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <Dateiname>"
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<Commit>]"
 
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<Commit>|<Bereich>)...]"
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <Logdatei>"
 
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <Programm>..."
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <Programm>..."
 
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
@@ -2507,10 +2533,6 @@ msgstr ""
 "Auschecken von '%s' fehlgeschlagen. Versuchen Sie 'git bisect start "
 "<gültiger-Branch>'."
 
-msgid "won't bisect on cg-seek'ed tree"
-msgstr ""
-"binäre Suche auf einem durch 'cg-seek' geändertem Verzeichnis nicht möglich"
-
 msgid "bad HEAD - strange symbolic ref"
 msgstr "ungültiger HEAD - merkwürdige symbolische Referenz"
 
@@ -2562,16 +2584,16 @@ msgid "bisect run failed: no command provided."
 msgstr "'bisect run' fehlgeschlagen: kein Befehl angegeben."
 
 #, c-format
-msgid "unable to verify '%s' on good revision"
-msgstr "konnte '%s' nicht für guten Commit überprüfen"
+msgid "unable to verify %s on good revision"
+msgstr "kann %s bei gutem Commit nicht verifizieren"
 
 #, c-format
 msgid "bogus exit code %d for good revision"
 msgstr "fehlerhafter Exit-Code %d für guten Commit"
 
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
-msgstr "'bisect run' fehlgeschlagen: Exit-Code %d von '%s' ist < 0 oder >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
+msgstr "bisect-Lauf fehlgeschlagen: Exit-Code %d von %s ist < 0 oder >= 128"
 
 #, c-format
 msgid "cannot open file '%s' for writing"
@@ -2580,37 +2602,43 @@ msgstr "Datei '%s' kann nicht zum Schreiben geöffnet werden"
 msgid "bisect run cannot continue any more"
 msgstr "'bisect run' kann nicht mehr fortgesetzt werden"
 
-#, c-format
 msgid "bisect run success"
 msgstr "'bisect run' erfolgreich ausgeführt"
 
-#, c-format
 msgid "bisect found first bad commit"
 msgstr "binäre Suche fand ersten schlechten Commit"
 
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
 msgstr ""
-"'bisect run' fehlgeschlagen: 'git bisect--helper --bisect-state %s' mit "
-"Fehlercode %d beendet"
-
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset benötigt entweder kein Argument oder ein Commit"
+"bisect-Lauf fehlgeschlagen: 'git bisect %s' wurde mit Fehlercode %d beendet"
 
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms benötigt 0 oder 1 Argument"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "'%s' erfordert entweder kein Argument oder einen Commit"
 
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next benötigt 0 Argumente"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "'%s' erfordert 0 oder 1 Argument"
 
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log benötigt 0 Argumente"
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "'%s' erfordert 0 Argumente"
 
 msgid "no logfile given"
 msgstr "keine Log-Datei angegeben"
 
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "'%s' ist fehlgeschlagen: kein Befehl angegeben."
+
+msgid "need a command"
+msgstr "Befehl benötigt"
+
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "unbekannter Befehl: '%s'"
+
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<Optionen>] [<rev-opts>] [<Commit>] [--] <Datei>"
 
@@ -3201,6 +3229,9 @@ msgstr "git bundle list-heads <Datei> [<Referenzname>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <Datei> [<Referenzname>...]"
 
+msgid "need a <file> argument"
+msgstr "<Datei> Argument benötigt"
+
 msgid "do not show progress meter"
 msgstr "keine Fortschrittsanzeige anzeigen"
 
@@ -3254,10 +3285,6 @@ msgstr "%s benötigt Argumente"
 msgid "%s takes no arguments"
 msgstr "%s braucht kein Argument"
 
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "unbekannter Befehl: '%s'"
-
 msgid "only one batch option may be specified"
 msgstr "Nur eine Batch-Option erlaubt."
 
@@ -3396,11 +3423,18 @@ msgstr "<Objekt> benötigt mit '-%c'"
 msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "nur zwei Argumente im <Typ> <Objekt> Modus erlaubt, nicht %d"
 
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <Attribut>...] [--] <Pfadname>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <Commit-Referenz>] [-a | --all | <Attribut>...] "
+"[--] <Pfadname>..."
 
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <Attribut>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <Commit-Referenz>] [-a | --all | "
+"<Attribut>...]"
 
 msgid "report all attributes set on file"
 msgstr "alle Attribute einer Datei ausgeben"
@@ -3414,6 +3448,12 @@ msgstr "Dateinamen von der Standard-Eingabe lesen"
 msgid "terminate input and output records by a NUL character"
 msgstr "Einträge von Ein- und Ausgabe mit NUL-Zeichen abschließen"
 
+msgid "<tree-ish>"
+msgstr "<Commit-Referenz>"
+
+msgid "which tree-ish to check attributes at"
+msgstr "in welchem Commit die Attribute zu prüfen sind"
+
 msgid "suppress progress reporting"
 msgstr "Fortschrittsanzeige unterdrücken"
 
@@ -4006,7 +4046,7 @@ msgstr ""
 "*          - alle Elemente auswählen\n"
 "           - (leer) Auswahl beenden\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Wie bitte (%s)?\n"
 
@@ -4156,9 +4196,6 @@ msgid "create a shallow clone of that depth"
 msgstr ""
 "einen Klon mit unvollständiger Historie (shallow) in dieser Tiefe erstellen"
 
-msgid "time"
-msgstr "Zeit"
-
 msgid "create a shallow clone since a specific time"
 msgstr ""
 "einen Klon mit unvollständiger Historie (shallow) seit einer bestimmten "
@@ -4410,6 +4447,9 @@ msgstr "konnte das Repository nicht initialisieren, überspringe Bundle-URI"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "Objekte aus Bundle-URI '%s' konnten nicht abgerufen werden"
 
+msgid "failed to fetch advertised bundles"
+msgstr "angekündigte Bundles konnten nicht abgerufen werden"
+
 msgid "remote transport reported error"
 msgstr "Remoteübertragung meldete Fehler"
 
@@ -5675,29 +5715,6 @@ msgstr "kein <Tool> für --tool=<Tool> angegeben"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "kein <Programm> für --extcmd=<Programm> angegeben"
 
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <Optionen> <Umgebungsvariable>"
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr "Standard für git_env_*(...), um darauf zurückzugreifen"
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr "Ausgaben unterdrücken; nur git_env_*() Werte als Exit-Code verwenden"
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-"Option `--default' erwartet einen booleschen Wert bei `--type=bool`, nicht "
-"`%s`"
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not "
-"`%s`"
-msgstr ""
-"Option `--default' erwartet einen vorzeichenlosen Long-Wert bei `--"
-"type=ulong`, nicht `%s`"
-
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<rev-list-opts>]"
 
@@ -6111,6 +6128,10 @@ msgstr ""
 "--unshallow kann nicht in einem Repository mit vollständiger Historie "
 "verwendet werden"
 
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "Bundles aus '%s' konnten nicht abgerufen werden"
+
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all akzeptiert kein Repository als Argument"
 
@@ -6812,6 +6833,7 @@ msgstr "grep: Fehler beim Erzeugen eines Thread: %s"
 msgid "invalid number of threads specified (%d) for %s"
 msgstr "ungültige Anzahl von Threads (%d) für %s angegeben"
 
+#. #-#-#-#-#  grep.c.po  #-#-#-#-#
 #. TRANSLATORS: %s is the configuration
 #. variable for tweaking threads, currently
 #. grep.threads
@@ -7156,12 +7178,19 @@ msgstr "Verwendung: %s%s"
 msgid "'git help config' for more information"
 msgstr "'git help config' für weitere Informationen"
 
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] <Hook-Name> [-- <Hook-Argumente>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=<Pfad>] <Hook-Name> [-- <Hook-"
+"Argumente>]"
 
 msgid "silently ignore missing requested <hook-name>"
 msgstr "fehlende Anforderung <Hook-Name> stillschweigend ignorieren"
 
+msgid "file to read into hooks' stdin"
+msgstr "Datei zum Einlesen in das Hook-stdin"
+
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "Objekt-Typen passen bei %s nicht zusammen"
@@ -7999,11 +8028,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<Programm>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<Schlüssel>]\n"
-"              [--symref] [<Repository> [<Referenzen>...]]"
+"              [--symref] [<Repository> [<Muster>...]]"
 
 msgid "do not print remote URL"
 msgstr "URL des Remote-Repositories nicht ausgeben"
@@ -8253,9 +8282,15 @@ msgstr "erlaube das Zusammenführen von nicht zusammenhängenden Historien"
 msgid "perform multiple merges, one per line of input"
 msgstr "mehrere Merges durchführen, eine pro Eingabezeile"
 
+msgid "specify a merge-base for the merge"
+msgstr "Merge-Basis für den Merge angeben"
+
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge ist mit allen anderen Optionen inkompatibel"
 
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base ist inkompatibel mit --stdin"
+
 #, c-format
 msgid "malformed input line: '%s'."
 msgstr "Fehlerhafte Eingabezeile: '%s'."
@@ -10210,6 +10245,11 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "Konnte nicht zu %s wechseln."
 
+msgid "apply options and merge options cannot be used together"
+msgstr ""
+"Optionen für \"am\" und Optionen für \"merge\" können nicht gemeinsam "
+"verwendet werden"
+
 #, c-format
 msgid ""
 "unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
@@ -10450,10 +10490,19 @@ msgstr "Unbekannter Modus: %s"
 msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy erfordert --merge oder --interactive"
 
-msgid "apply options and merge options cannot be used together"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
 msgstr ""
-"Optionen für \"am\" und Optionen für \"merge\" können nicht gemeinsam "
-"verwendet werden"
+"apply-Optionen sind mit rebase.autosquash nicht kompatibel. Erwägen Sie das "
+"Hinzufügen von --no-autosquash"
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"apply-Optionen sind nicht kompatibel mit rebase.updateRefs. Erwägen Sie das "
+"Hinzufügen von --no-update-refs"
 
 #, c-format
 msgid "Unknown rebase backend: %s"
@@ -13004,10 +13053,6 @@ msgstr "'%s' ist kein gültiger Submodul-Name"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <Befehl>"
 
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s unterstützt kein --super-prefix"
-
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <Grund>] <Name> <Referenz>"
 
@@ -13778,6 +13823,10 @@ msgstr "nur nützlich für Fehlersuche"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch wird auf dieser Plattform nicht unterstützt"
 
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "Konnte Bundle-Listenschlüssel %s mit Wert '%s' nicht parsen."
+
 #, c-format
 msgid "bundle list at '%s' has no mode"
 msgstr "Paketliste bei '%s' hat keinen Modus"
@@ -13788,6 +13837,13 @@ msgstr "temporäre Datei kann nicht erstellt werden"
 msgid "insufficient capabilities"
 msgstr "unzureichende Fähigkeiten"
 
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "die von '%s' heruntergeladene Datei ist kein Bundle"
+
+msgid "failed to store maximum creation token"
+msgstr "das maximale Erstellungs-Token konnte nicht gespeichert werden"
+
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
 msgstr "nicht erkannter Bundle-Modus von URI '%s'"
@@ -13804,6 +13860,13 @@ msgstr "Download des Bundles von URI '%s' fehlgeschlagen"
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "Datei unter URI '%s' ist kein Paket oder keine Paketliste"
 
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: unerwartetes Argument: '%s'"
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: erwarteter Flush nach Argumenten"
+
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri: erhielt eine leere Zeile"
 
@@ -13835,6 +13898,13 @@ msgstr "Dem Repository fehlen folgende vorausgesetzte Commits:"
 msgid "need a repository to verify a bundle"
 msgstr "um ein Paket zu überprüfen wird ein Repository benötigt"
 
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"einige vorausgesetzte Commits sind im Objektspeicher vorhanden, aber sind "
+"nicht mit der Repository-Historie verbunden"
+
 #, c-format
 msgid "The bundle contains this ref:"
 msgid_plural "The bundle contains these %<PRIuMAX> refs:"
@@ -15286,6 +15356,16 @@ msgstr "Protokollfehler: unerwartetes '%s'"
 msgid "unknown object format '%s' specified by server"
 msgstr "unbekanntes Objekt-Format '%s' vom Server angegeben"
 
+#, c-format
+msgid "error on bundle-uri response line %d: %s"
+msgstr "Fehler in der bundle-uri-Antwortzeile %d: %s"
+
+msgid "expected flush after bundle-uri listing"
+msgstr "erwartete Flush nach Bundle-uri-Auflistung"
+
+msgid "expected response end packet after ref listing"
+msgstr "Antwort-Endpaket nach Auflistung der Referenzen erwartet"
+
 #, c-format
 msgid "invalid ls-refs response: %s"
 msgstr "ungültige ls-refs Antwort: %s"
@@ -15293,9 +15373,6 @@ msgstr "ungültige ls-refs Antwort: %s"
 msgid "expected flush after ref listing"
 msgstr "Flush nach Auflistung der Referenzen erwartet"
 
-msgid "expected response end packet after ref listing"
-msgstr "Antwort-Endpaket nach Auflistung der Referenzen erwartet"
-
 #, c-format
 msgid "protocol '%s' is not supported"
 msgstr "Protokoll '%s' wird nicht unterstützt"
@@ -16472,16 +16549,14 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
 "git [-v | --version] [-h | --help] [-C <Pfad>] [-c <Name>=<Wert>]\n"
 "           [--exec-path[=<Pfad>]] [--html-path] [--man-path] [--info-path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<Pfad>] [--work-tree=<Pfad>] [--namespace=<Name>]\n"
-"           [--super-prefix=<Pfad>] [--config-env=<Name>=<Variable>]\n"
-"           <Befehl> [<Argumente>]"
+"           [--config-env=<Name>=<Umgebungsvariable>] <Befehl> [<Argumente>]"
 
 msgid ""
 "'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -16507,10 +16582,6 @@ msgstr "kein Verzeichnis für Option '%s' angegeben\n"
 msgid "no namespace given for --namespace\n"
 msgstr "Kein Namespace für --namespace angegeben.\n"
 
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "Kein Präfix für --super-prefix angegeben.\n"
-
 #, c-format
 msgid "-c expects a configuration string\n"
 msgstr "-c erwartet einen Konfigurationsstring.\n"
@@ -16625,8 +16696,13 @@ msgstr ""
 msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand fehlgeschlagen: %s %s"
 
-msgid "gpg failed to sign the data"
-msgstr "gpg beim Signieren der Daten fehlgeschlagen"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg konnte die Daten nicht signieren:\n"
+"%s"
 
 msgid "user.signingKey needs to be set for ssh signing"
 msgstr "user.signingKey muss für die SSH-Signatur gesetzt sein"
@@ -17206,7 +17282,7 @@ msgstr ""
 #. conflict in a submodule. The first argument is the submodule
 #. name, and the second argument is the abbreviated id of the
 #. commit that needs to be merged.  For example:
-#. - go to submodule (mysubmodule), and either merge commit abc1234"
+#.  - go to submodule (mysubmodule), and either merge commit abc1234"
 #.
 #, c-format
 msgid ""
@@ -17799,6 +17875,10 @@ msgstr "Fehlerhaftes loses Objekt '%s'."
 msgid "garbage at end of loose object '%s'"
 msgstr "Nutzlose Daten am Ende von losem Objekt '%s'."
 
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "loses Objekt %s kann nicht geöffnet werden"
+
 #, c-format
 msgid "unable to parse %s header"
 msgstr "Konnte %s Kopfbereich nicht parsen."
@@ -17815,17 +17895,13 @@ msgid "header for %s too long, exceeds %d bytes"
 msgstr "Header für %s zu lang, überschreitet %d Bytes"
 
 #, c-format
-msgid "failed to read object %s"
-msgstr "Konnte Objekt %s nicht lesen."
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "Loses Objekt %s (gespeichert in %s) ist beschädigt."
 
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "Ersetzung %s für %s nicht gefunden."
 
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "Loses Objekt %s (gespeichert in %s) ist beschädigt."
-
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
 msgstr "Gepacktes Objekt %s (gespeichert in %s) ist beschädigt."
@@ -17838,9 +17914,6 @@ msgstr "Konnte Datei %s nicht schreiben."
 msgid "unable to set permission to '%s'"
 msgstr "Konnte Zugriffsberechtigung auf '%s' nicht setzen."
 
-msgid "file write error"
-msgstr "Fehler beim Schreiben einer Datei."
-
 msgid "error when closing loose object file"
 msgstr "Fehler beim Schließen der Datei für lose Objekte."
 
@@ -17888,11 +17961,12 @@ msgstr "Verzeichnis %s kann nicht erstellt werden"
 msgid "cannot read object for %s"
 msgstr "Kann Objekt für %s nicht lesen."
 
-msgid "corrupt commit"
-msgstr "fehlerhafter Commit"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "fsck schlägt bei Objekt fehl: %s"
 
-msgid "corrupt tag"
-msgstr "fehlerhaftes Tag"
+msgid "refusing to create malformed object"
+msgstr "verweigere Erstellung eines ungültigen Objekts"
 
 #, c-format
 msgid "read error while indexing %s"
@@ -17949,7 +18023,7 @@ msgstr "%s [ungültiges Objekt]"
 #. TRANSLATORS: This is a line of ambiguous commit
 #. object output. E.g.:
 #. *
-#. "deadbeef commit 2021-01-01 - Some Commit Message"
+#.    "deadbeef commit 2021-01-01 - Some Commit Message"
 #.
 #, c-format
 msgid "%s commit %s - %s"
@@ -17958,7 +18032,7 @@ msgstr "%s Commit %s - %s"
 #. TRANSLATORS: This is a line of ambiguous
 #. tag object output. E.g.:
 #. *
-#. "deadbeef tag 2022-01-01 - Some Tag Message"
+#.    "deadbeef tag 2022-01-01 - Some Tag Message"
 #. *
 #. The second argument is the YYYY-MM-DD found
 #. in the tag.
@@ -17974,7 +18048,7 @@ msgstr "%s Tag %s - %s"
 #. tag object output where we couldn't parse
 #. the tag itself. E.g.:
 #. *
-#. "deadbeef [bad tag, could not parse it]"
+#.    "deadbeef [bad tag, could not parse it]"
 #.
 #, c-format
 msgid "%s [bad tag, could not parse it]"
@@ -18160,10 +18234,6 @@ msgstr "ungültiger XOR-Offset im Bitmap-Pack-Index"
 msgid "cannot fstat bitmap file"
 msgstr "kann Bitmap-Datei nicht lesen"
 
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "ignoriere zusätzliche Bitmap-Datei: '%s'"
-
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "Prüfsumme stimmt in MIDX und Bitmap nicht überein"
 
@@ -18432,6 +18502,9 @@ msgstr "weniger Ausgaben"
 msgid "use <n> digits to display object names"
 msgstr "benutze <Anzahl> Ziffern zur Anzeige von Objektnamen"
 
+msgid "prefixed path to initial superproject"
+msgstr "vorangestellter Pfad zum ursprünglichen Superprojekt"
+
 msgid "how to strip spaces and #comments from message"
 msgstr ""
 "wie Leerzeichen und #Kommentare von der Beschreibung getrennt werden sollen"
@@ -18938,6 +19011,14 @@ msgstr "%d hinterher"
 msgid "ahead %d, behind %d"
 msgstr "%d voraus, %d hinterher"
 
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) nimmt keine Argumente entgegen"
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "nicht erkanntes %%(%.*s) Argument: %s"
+
 #, c-format
 msgid "expected format: %%(color:<color>)"
 msgstr "Erwartetes Format: %%(color:<Farbe>)"
@@ -18954,22 +19035,6 @@ msgstr "Positiver Wert erwartet refname:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "Positiver Wert erwartet refname:rstrip=%s"
 
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "nicht erkanntes %%(%s) Argument: %s"
-
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) akzeptiert keine Argumente"
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) akzeptiert keine Argumente"
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) akzeptiert keine Argumente"
-
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
 msgstr "%%(trailers:key=<Wert>) erwartet"
@@ -18986,10 +19051,6 @@ msgstr "Positiver Wert erwartet contents:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "positiver Wert erwartet '%s' in %%(%s)"
 
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "nicht erkannte E-Mail Option: %s"
-
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
 msgstr "erwartetes Format: %%(align:<Breite>,<Position>)"
@@ -19003,12 +19064,12 @@ msgid "unrecognized width:%s"
 msgstr "nicht erkannte Breite:%s"
 
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "Positive Breitenangabe für %%(align) erwartet"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "nicht erkanntes %%(%s) Argument: %s"
 
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) akzeptiert keine Argumente"
+msgid "positive width expected with the %%(align) atom"
+msgstr "Positive Breitenangabe für %%(align) erwartet"
 
 #, c-format
 msgid "malformed field name: %.*s"
@@ -20274,6 +20335,24 @@ msgstr "git %s: Fehler beim Lesen des Index"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s: Fehler beim Aktualisieren des Index"
 
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "'%s' ist keine gültige Beschriftung"
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "'%s' ist kein gültiger Referenzname"
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+"update-ref erfordert einen vollständig qualifizierten Referenznamen, z. B. "
+"refs/heads/%s"
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "ungültiger Befehl '%.*s'"
+
 #, c-format
 msgid "%s does not accept arguments: '%s'"
 msgstr "%s akzeptiert keine Argumente: '%s'"
@@ -21087,6 +21166,16 @@ msgstr "ls-tree mit unerwartetem Rückgabewert %d beendet"
 msgid "failed to lstat '%s'"
 msgstr "'lstat' für '%s' fehlgeschlagen"
 
+msgid "no remote configured to get bundle URIs from"
+msgstr "kein Remote-Repository zum Erhalten von Bundle-URIs konfiguriert"
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "Remote-Repository '%s' hat keine konfigurierte URL"
+
+msgid "could not get the bundle-uri list"
+msgstr "konnte die Bundle-uri-Liste nicht erhalten"
+
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <Optionen> (control|prime|update)"
 
@@ -21442,6 +21531,12 @@ msgstr "Abbruch."
 msgid "failed to push all needed submodules"
 msgstr "Fehler beim Versand aller erforderlichen Submodule."
 
+msgid "bundle-uri operation not supported by protocol"
+msgstr "bundle-uri Operation wird vom Protokoll nicht unterstützt"
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr "konnte die vom Server angekündigte bundle-uri-Liste nicht abrufen"
+
 msgid "too-short tree object"
 msgstr "zu kurzes Tree-Objekt"
 
@@ -22229,13 +22324,22 @@ msgstr "Ignorierte Dateien"
 
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"Es dauerte %.2f Sekunden die unversionierten Dateien zu bestimmen.\n"
-"'status -uno' könnte das beschleunigen, aber Sie müssen darauf achten,\n"
-"neue Dateien selbstständig hinzuzufügen (siehe 'git help status')."
+"Es dauerte %.2f Sekunden, um die unversionierten Dateien aufzuzählen,\n"
+"aber die Ergebnisse wurden zwischengespeichert, sodass spätere Durchläufe "
+"schneller sein können."
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr ""
+"Es hat %.2f Sekunden gedauert, um die unversionierten Dateien aufzuzählen."
+
+msgid "See 'git help status' for information on how to improve this."
+msgstr ""
+"Siehe 'git help status' für Informationen darüber, wie man dies verbessern "
+"kann."
 
 #, c-format
 msgid "Untracked files not listed%s"
@@ -22395,289 +22499,6 @@ msgstr ""
 msgid "Unable to determine absolute path of git directory"
 msgstr "Konnte absoluten Pfad des Git-Verzeichnisses nicht bestimmen"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%28s %25s %s"
-
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "%d Pfad angefasst\n"
-msgstr[1] "%d Pfade angefasst\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
-"Patch-Block direkt zum Hinzufügen zur Staging-Area markiert."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
-"Patch-Block direkt zum Hinzufügen zum Stash markiert."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
-"Patch-Block direkt zum Entfernen aus der Staging-Area markiert."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
-"Patch-Block direkt zum Anwenden markiert."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
-"Patch-Block direkt zum Verwerfen markiert."
-
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr ""
-"Fehler beim Öffnen von Editier-Datei eines Patch-Blocks zum Schreiben: %s"
-
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"---\n"
-"Um '%s' Zeilen zu entfernen, machen Sie aus diesen ' ' Zeilen (Kontext).\n"
-"Um '%s' Zeilen zu entfernen, löschen Sie diese.\n"
-"Zeilen, die mit %s beginnen, werden entfernt.\n"
-
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr "Fehler beim Öffnen von Editier-Datei eines Patch-Blocks zum Lesen: %s"
-
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block zum Commit vormerken\n"
-"n - diesen Patch-Block nicht zum Commit vormerken\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht zum Commit "
-"vormerken\n"
-"a - diesen und alle weiteren Patch-Blöcke dieser Datei zum Commit vormerken\n"
-"d - diesen oder alle weiteren Patch-Blöcke in dieser Datei nicht zum Commit "
-"vormerken"
-
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block stashen\n"
-"n - diesen Patch-Block nicht stashen\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht stashen\n"
-"a - diesen und alle weiteren Patch-Blöcke dieser Datei stashen\n"
-"d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht stashen"
-
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block unstashen\n"
-"n - diesen Patch-Block nicht unstashen\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht unstashen\n"
-"a - diesen und alle weiteren Patch-Blöcke dieser Datei unstashen\n"
-"d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht unstashen"
-
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block auf den Index anwenden\n"
-"n - diesen Patch-Block nicht auf den Index anwenden\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht auf den Index "
-"anwenden\n"
-"a - diesen und alle weiteren Patch-Blöcke dieser Datei auf den Index "
-"anwenden\n"
-"d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht auf den Index "
-"anwenden"
-
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block im Arbeitsverzeichnis verwerfen\n"
-"n - diesen Patch-Block im Arbeitsverzeichnis nicht verwerfen\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht im "
-"Arbeitsverzeichnis verwerfen\n"
-"a - diesen und alle weiteren Patch-Blöcke dieser Datei im Arbeitsverzeichnis "
-"verwerfen\n"
-"d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht im "
-"Arbeitsverzeichnis verwerfen"
-
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block im Index und Arbeitsverzeichnis verwerfen\n"
-"n - diesen Patch-Block nicht im Index und Arbeitsverzeichnis verwerfen\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht im Index und "
-"Arbeitsverzeichnis verwerfen\n"
-"a - diesen und alle weiteren Patch-Blöcke in der Datei verwerfen\n"
-"d - diesen oder alle weiteren Patch-Blöcke in der Datei nicht verwerfen"
-
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block im Index und auf Arbeitsverzeichnis anwenden\n"
-"n - diesen Patch-Block nicht im Index und auf Arbeitsverzeichnis anwenden\n"
-"q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht anwenden\n"
-"a - diesen und alle weiteren Patch-Blöcke in der Datei anwenden\n"
-"d - diesen oder alle weiteren Patch-Blöcke in der Datei nicht anwenden"
-
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - diesen Patch-Block auf das Arbeitsverzeichnis anwenden\n"
-"n - diesen Patch-Block nicht auf das Arbeitsverzeichnis anwenden\n"
-"q - Beenden; diesen und alle verbleibenden Patch-Blöcke nicht anwenden\n"
-"a - diesen und alle weiteren Patch-Blöcke in der Datei anwenden\n"
-"d - diesen und alle weiteren Patch-Blöcke in der Datei nicht anwenden"
-
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g - Patch-Block zum Hinspringen auswählen\n"
-"/ - nach Patch-Block suchen, der gegebenem regulärem Ausdruck entspricht\n"
-"j - diesen Patch-Block unbestimmt lassen, nächsten unbestimmten Patch-Block "
-"anzeigen\n"
-"J - diesen Patch-Block unbestimmt lassen, nächsten Patch-Block anzeigen\n"
-"k - diesen Patch-Block unbestimmt lassen, vorherigen unbestimmten Patch-"
-"Block anzeigen\n"
-"K - diesen Patch-Block unbestimmt lassen, vorherigen Patch-Block anzeigen\n"
-"s - aktuellen Patch-Block in kleinere Patch-Blöcke aufteilen\n"
-"e - aktuellen Patch-Block manuell editieren\n"
-"? - Hilfe anzeigen\n"
-
-msgid "The selected hunks do not apply to the index!\n"
-msgstr ""
-"Die ausgewählten Patch-Blöcke können nicht auf den Index angewendet werden!\n"
-
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "ignoriere nicht zusammengeführte Datei: %s\n"
-
-msgid "No other hunks to goto\n"
-msgstr "Keine anderen Patch-Blöcke verbleibend\n"
-
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "Ungültige Nummer: '%s'\n"
-
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "Entschuldigung, nur %d Patch-Block verfügbar.\n"
-msgstr[1] "Entschuldigung, nur %d Patch-Blöcke verfügbar.\n"
-
-msgid "No other hunks to search\n"
-msgstr "Keine anderen Patch-Blöcke zum Durchsuchen\n"
-
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "Fehlerhafter regulärer Ausdruck für Suche %s: %s\n"
-
-msgid "No hunk matches the given pattern\n"
-msgstr "Kein Patch-Block entspricht dem angegebenen Muster\n"
-
-msgid "No previous hunk\n"
-msgstr "Kein vorheriger Patch-Block\n"
-
-msgid "No next hunk\n"
-msgstr "Kein folgender Patch-Block\n"
-
-msgid "Sorry, cannot split this hunk\n"
-msgstr "Entschuldigung, kann diesen Patch-Block nicht aufteilen.\n"
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "In %d Patch-Block aufgeteilt.\n"
-msgstr[1] "In %d Patch-Blöcke aufgeteilt.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "Entschuldigung, kann diesen Patch-Block nicht bearbeiten.\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        - Pfade mit Änderungen anzeigen\n"
-"update        - Zustand des Arbeitsverzeichnisses den zum Commit "
-"vorgemerkten Änderungen hinzufügen\n"
-"revert        - zum Commit vorgemerkte Änderungen auf HEAD Version "
-"zurücksetzen\n"
-"patch         - Patch-Blöcke auswählen und selektiv aktualisieren\n"
-"diff          - Unterschiede zwischen HEAD und Index anzeigen\n"
-"add untracked - Inhalte von unversionierten Dateien zum Commit vormerken\n"
-
-msgid "missing --"
-msgstr "-- fehlt"
-
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "Unbekannter --patch Modus: %s"
-
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "ungültiges Argument %s, erwarte --"
-
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr ""
 "lokale Zeitzone unterscheidet sich von GMT nicht um ein Minutenintervall\n"
@@ -23016,3 +22837,377 @@ msgstr "Lasse %s mit Backup-Suffix '%s' aus.\n"
 #, perl-format
 msgid "Do you really want to send %s? [y|N]: "
 msgstr "Wollen Sie %s wirklich versenden? [y|N]: "
+
+#~ msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
+#~ msgstr "git bisect--helper --bisect-state (bad|new) [<Commit>]"
+
+#~ msgid "won't bisect on cg-seek'ed tree"
+#~ msgstr ""
+#~ "binäre Suche auf einem durch 'cg-seek' geändertem Verzeichnis nicht "
+#~ "möglich"
+
+#~ msgid "--bisect-terms requires 0 or 1 argument"
+#~ msgstr "--bisect-terms benötigt 0 oder 1 Argument"
+
+#~ msgid "--bisect-next requires 0 arguments"
+#~ msgstr "--bisect-next benötigt 0 Argumente"
+
+#~ msgid "--bisect-log requires 0 arguments"
+#~ msgstr "--bisect-log benötigt 0 Argumente"
+
+#~ msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
+#~ msgstr "git env--helper --type=[bool|ulong] <Optionen> <Umgebungsvariable>"
+
+#~ msgid "default for git_env_*(...) to fall back on"
+#~ msgstr "Standard für git_env_*(...), um darauf zurückzugreifen"
+
+#~ msgid "be quiet only use git_env_*() value as exit code"
+#~ msgstr ""
+#~ "Ausgaben unterdrücken; nur git_env_*() Werte als Exit-Code verwenden"
+
+#, c-format
+#~ msgid ""
+#~ "option `--default' expects a boolean value with `--type=bool`, not `%s`"
+#~ msgstr ""
+#~ "Option `--default' erwartet einen booleschen Wert bei `--type=bool`, "
+#~ "nicht `%s`"
+
+#, c-format
+#~ msgid ""
+#~ "option `--default' expects an unsigned long value with `--type=ulong`, "
+#~ "not `%s`"
+#~ msgstr ""
+#~ "Option `--default' erwartet einen vorzeichenlosen Long-Wert bei `--"
+#~ "type=ulong`, nicht `%s`"
+
+#, c-format
+#~ msgid "%s doesn't support --super-prefix"
+#~ msgstr "%s unterstützt kein --super-prefix"
+
+#, c-format
+#~ msgid "no prefix given for --super-prefix\n"
+#~ msgstr "Kein Präfix für --super-prefix angegeben.\n"
+
+#, c-format
+#~ msgid "failed to read object %s"
+#~ msgstr "Konnte Objekt %s nicht lesen."
+
+#~ msgid "file write error"
+#~ msgstr "Fehler beim Schreiben einer Datei."
+
+#~ msgid "corrupt commit"
+#~ msgstr "fehlerhafter Commit"
+
+#~ msgid "corrupt tag"
+#~ msgstr "fehlerhaftes Tag"
+
+#, c-format
+#~ msgid "%%(objecttype) does not take arguments"
+#~ msgstr "%%(objecttype) akzeptiert keine Argumente"
+
+#, c-format
+#~ msgid "%%(deltabase) does not take arguments"
+#~ msgstr "%%(deltabase) akzeptiert keine Argumente"
+
+#, c-format
+#~ msgid "%%(body) does not take arguments"
+#~ msgstr "%%(body) akzeptiert keine Argumente"
+
+#, c-format
+#~ msgid "unrecognized email option: %s"
+#~ msgstr "nicht erkannte E-Mail Option: %s"
+
+#, c-format
+#~ msgid ""
+#~ "It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
+#~ "may speed it up, but you have to be careful not to forget to add\n"
+#~ "new files yourself (see 'git help status')."
+#~ msgstr ""
+#~ "Es dauerte %.2f Sekunden die unversionierten Dateien zu bestimmen.\n"
+#~ "'status -uno' könnte das beschleunigen, aber Sie müssen darauf achten,\n"
+#~ "neue Dateien selbstständig hinzuzufügen (siehe 'git help status')."
+
+#, perl-format
+#~ msgid "%12s %12s %s"
+#~ msgstr "%28s %25s %s"
+
+#, perl-format
+#~ msgid "touched %d path\n"
+#~ msgid_plural "touched %d paths\n"
+#~ msgstr[0] "%d Pfad angefasst\n"
+#~ msgstr[1] "%d Pfade angefasst\n"
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for staging."
+#~ msgstr ""
+#~ "Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
+#~ "Patch-Block direkt zum Hinzufügen zur Staging-Area markiert."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for stashing."
+#~ msgstr ""
+#~ "Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
+#~ "Patch-Block direkt zum Hinzufügen zum Stash markiert."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for unstaging."
+#~ msgstr ""
+#~ "Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
+#~ "Patch-Block direkt zum Entfernen aus der Staging-Area markiert."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for applying."
+#~ msgstr ""
+#~ "Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
+#~ "Patch-Block direkt zum Anwenden markiert."
+
+#~ msgid ""
+#~ "If the patch applies cleanly, the edited hunk will immediately be\n"
+#~ "marked for discarding."
+#~ msgstr ""
+#~ "Wenn der Patch sauber angewendet werden kann, wird der bearbeitete\n"
+#~ "Patch-Block direkt zum Verwerfen markiert."
+
+#, perl-format
+#~ msgid "failed to open hunk edit file for writing: %s"
+#~ msgstr ""
+#~ "Fehler beim Öffnen von Editier-Datei eines Patch-Blocks zum Schreiben: %s"
+
+#, perl-format
+#~ msgid ""
+#~ "---\n"
+#~ "To remove '%s' lines, make them ' ' lines (context).\n"
+#~ "To remove '%s' lines, delete them.\n"
+#~ "Lines starting with %s will be removed.\n"
+#~ msgstr ""
+#~ "---\n"
+#~ "Um '%s' Zeilen zu entfernen, machen Sie aus diesen ' ' Zeilen (Kontext).\n"
+#~ "Um '%s' Zeilen zu entfernen, löschen Sie diese.\n"
+#~ "Zeilen, die mit %s beginnen, werden entfernt.\n"
+
+#, perl-format
+#~ msgid "failed to open hunk edit file for reading: %s"
+#~ msgstr ""
+#~ "Fehler beim Öffnen von Editier-Datei eines Patch-Blocks zum Lesen: %s"
+
+#~ msgid ""
+#~ "y - stage this hunk\n"
+#~ "n - do not stage this hunk\n"
+#~ "q - quit; do not stage this hunk or any of the remaining ones\n"
+#~ "a - stage this hunk and all later hunks in the file\n"
+#~ "d - do not stage this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block zum Commit vormerken\n"
+#~ "n - diesen Patch-Block nicht zum Commit vormerken\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht zum Commit "
+#~ "vormerken\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke dieser Datei zum Commit "
+#~ "vormerken\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke in dieser Datei nicht zum "
+#~ "Commit vormerken"
+
+#~ msgid ""
+#~ "y - stash this hunk\n"
+#~ "n - do not stash this hunk\n"
+#~ "q - quit; do not stash this hunk or any of the remaining ones\n"
+#~ "a - stash this hunk and all later hunks in the file\n"
+#~ "d - do not stash this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block stashen\n"
+#~ "n - diesen Patch-Block nicht stashen\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht stashen\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke dieser Datei stashen\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht stashen"
+
+#~ msgid ""
+#~ "y - unstage this hunk\n"
+#~ "n - do not unstage this hunk\n"
+#~ "q - quit; do not unstage this hunk or any of the remaining ones\n"
+#~ "a - unstage this hunk and all later hunks in the file\n"
+#~ "d - do not unstage this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block unstashen\n"
+#~ "n - diesen Patch-Block nicht unstashen\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht unstashen\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke dieser Datei unstashen\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht unstashen"
+
+#~ msgid ""
+#~ "y - apply this hunk to index\n"
+#~ "n - do not apply this hunk to index\n"
+#~ "q - quit; do not apply this hunk or any of the remaining ones\n"
+#~ "a - apply this hunk and all later hunks in the file\n"
+#~ "d - do not apply this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block auf den Index anwenden\n"
+#~ "n - diesen Patch-Block nicht auf den Index anwenden\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht auf den "
+#~ "Index anwenden\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke dieser Datei auf den Index "
+#~ "anwenden\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht auf den "
+#~ "Index anwenden"
+
+#~ msgid ""
+#~ "y - discard this hunk from worktree\n"
+#~ "n - do not discard this hunk from worktree\n"
+#~ "q - quit; do not discard this hunk or any of the remaining ones\n"
+#~ "a - discard this hunk and all later hunks in the file\n"
+#~ "d - do not discard this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block im Arbeitsverzeichnis verwerfen\n"
+#~ "n - diesen Patch-Block im Arbeitsverzeichnis nicht verwerfen\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht im "
+#~ "Arbeitsverzeichnis verwerfen\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke dieser Datei im "
+#~ "Arbeitsverzeichnis verwerfen\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke dieser Datei nicht im "
+#~ "Arbeitsverzeichnis verwerfen"
+
+#~ msgid ""
+#~ "y - discard this hunk from index and worktree\n"
+#~ "n - do not discard this hunk from index and worktree\n"
+#~ "q - quit; do not discard this hunk or any of the remaining ones\n"
+#~ "a - discard this hunk and all later hunks in the file\n"
+#~ "d - do not discard this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block im Index und Arbeitsverzeichnis verwerfen\n"
+#~ "n - diesen Patch-Block nicht im Index und Arbeitsverzeichnis verwerfen\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht im Index "
+#~ "und Arbeitsverzeichnis verwerfen\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke in der Datei verwerfen\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke in der Datei nicht verwerfen"
+
+#~ msgid ""
+#~ "y - apply this hunk to index and worktree\n"
+#~ "n - do not apply this hunk to index and worktree\n"
+#~ "q - quit; do not apply this hunk or any of the remaining ones\n"
+#~ "a - apply this hunk and all later hunks in the file\n"
+#~ "d - do not apply this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block im Index und auf Arbeitsverzeichnis anwenden\n"
+#~ "n - diesen Patch-Block nicht im Index und auf Arbeitsverzeichnis "
+#~ "anwenden\n"
+#~ "q - Beenden; diesen oder alle verbleibenden Patch-Blöcke nicht anwenden\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke in der Datei anwenden\n"
+#~ "d - diesen oder alle weiteren Patch-Blöcke in der Datei nicht anwenden"
+
+#~ msgid ""
+#~ "y - apply this hunk to worktree\n"
+#~ "n - do not apply this hunk to worktree\n"
+#~ "q - quit; do not apply this hunk or any of the remaining ones\n"
+#~ "a - apply this hunk and all later hunks in the file\n"
+#~ "d - do not apply this hunk or any of the later hunks in the file"
+#~ msgstr ""
+#~ "y - diesen Patch-Block auf das Arbeitsverzeichnis anwenden\n"
+#~ "n - diesen Patch-Block nicht auf das Arbeitsverzeichnis anwenden\n"
+#~ "q - Beenden; diesen und alle verbleibenden Patch-Blöcke nicht anwenden\n"
+#~ "a - diesen und alle weiteren Patch-Blöcke in der Datei anwenden\n"
+#~ "d - diesen und alle weiteren Patch-Blöcke in der Datei nicht anwenden"
+
+#~ msgid ""
+#~ "g - select a hunk to go to\n"
+#~ "/ - search for a hunk matching the given regex\n"
+#~ "j - leave this hunk undecided, see next undecided hunk\n"
+#~ "J - leave this hunk undecided, see next hunk\n"
+#~ "k - leave this hunk undecided, see previous undecided hunk\n"
+#~ "K - leave this hunk undecided, see previous hunk\n"
+#~ "s - split the current hunk into smaller hunks\n"
+#~ "e - manually edit the current hunk\n"
+#~ "? - print help\n"
+#~ msgstr ""
+#~ "g - Patch-Block zum Hinspringen auswählen\n"
+#~ "/ - nach Patch-Block suchen, der gegebenem regulärem Ausdruck entspricht\n"
+#~ "j - diesen Patch-Block unbestimmt lassen, nächsten unbestimmten Patch-"
+#~ "Block anzeigen\n"
+#~ "J - diesen Patch-Block unbestimmt lassen, nächsten Patch-Block anzeigen\n"
+#~ "k - diesen Patch-Block unbestimmt lassen, vorherigen unbestimmten Patch-"
+#~ "Block anzeigen\n"
+#~ "K - diesen Patch-Block unbestimmt lassen, vorherigen Patch-Block "
+#~ "anzeigen\n"
+#~ "s - aktuellen Patch-Block in kleinere Patch-Blöcke aufteilen\n"
+#~ "e - aktuellen Patch-Block manuell editieren\n"
+#~ "? - Hilfe anzeigen\n"
+
+#~ msgid "The selected hunks do not apply to the index!\n"
+#~ msgstr ""
+#~ "Die ausgewählten Patch-Blöcke können nicht auf den Index angewendet "
+#~ "werden!\n"
+
+#, perl-format
+#~ msgid "ignoring unmerged: %s\n"
+#~ msgstr "ignoriere nicht zusammengeführte Datei: %s\n"
+
+#~ msgid "No other hunks to goto\n"
+#~ msgstr "Keine anderen Patch-Blöcke verbleibend\n"
+
+#, perl-format
+#~ msgid "Invalid number: '%s'\n"
+#~ msgstr "Ungültige Nummer: '%s'\n"
+
+#, perl-format
+#~ msgid "Sorry, only %d hunk available.\n"
+#~ msgid_plural "Sorry, only %d hunks available.\n"
+#~ msgstr[0] "Entschuldigung, nur %d Patch-Block verfügbar.\n"
+#~ msgstr[1] "Entschuldigung, nur %d Patch-Blöcke verfügbar.\n"
+
+#~ msgid "No other hunks to search\n"
+#~ msgstr "Keine anderen Patch-Blöcke zum Durchsuchen\n"
+
+#, perl-format
+#~ msgid "Malformed search regexp %s: %s\n"
+#~ msgstr "Fehlerhafter regulärer Ausdruck für Suche %s: %s\n"
+
+#~ msgid "No hunk matches the given pattern\n"
+#~ msgstr "Kein Patch-Block entspricht dem angegebenen Muster\n"
+
+#~ msgid "No previous hunk\n"
+#~ msgstr "Kein vorheriger Patch-Block\n"
+
+#~ msgid "No next hunk\n"
+#~ msgstr "Kein folgender Patch-Block\n"
+
+#~ msgid "Sorry, cannot split this hunk\n"
+#~ msgstr "Entschuldigung, kann diesen Patch-Block nicht aufteilen.\n"
+
+#, perl-format
+#~ msgid "Split into %d hunk.\n"
+#~ msgid_plural "Split into %d hunks.\n"
+#~ msgstr[0] "In %d Patch-Block aufgeteilt.\n"
+#~ msgstr[1] "In %d Patch-Blöcke aufgeteilt.\n"
+
+#~ msgid "Sorry, cannot edit this hunk\n"
+#~ msgstr "Entschuldigung, kann diesen Patch-Block nicht bearbeiten.\n"
+
+#~ msgid ""
+#~ "status        - show paths with changes\n"
+#~ "update        - add working tree state to the staged set of changes\n"
+#~ "revert        - revert staged set of changes back to the HEAD version\n"
+#~ "patch         - pick hunks and update selectively\n"
+#~ "diff          - view diff between HEAD and index\n"
+#~ "add untracked - add contents of untracked files to the staged set of "
+#~ "changes\n"
+#~ msgstr ""
+#~ "status        - Pfade mit Änderungen anzeigen\n"
+#~ "update        - Zustand des Arbeitsverzeichnisses den zum Commit "
+#~ "vorgemerkten Änderungen hinzufügen\n"
+#~ "revert        - zum Commit vorgemerkte Änderungen auf HEAD Version "
+#~ "zurücksetzen\n"
+#~ "patch         - Patch-Blöcke auswählen und selektiv aktualisieren\n"
+#~ "diff          - Unterschiede zwischen HEAD und Index anzeigen\n"
+#~ "add untracked - Inhalte von unversionierten Dateien zum Commit vormerken\n"
+
+#~ msgid "missing --"
+#~ msgstr "-- fehlt"
+
+#, perl-format
+#~ msgid "unknown --patch mode: %s"
+#~ msgstr "Unbekannter --patch Modus: %s"
+
+#, perl-format
+#~ msgid "invalid argument %s, expecting --"
+#~ msgstr "ungültiges Argument %s, erwarte --"
index 67eab9f900e851de1d6752f568b7721f3e83d31e..f032441614dfecc3848cea6f314588cb7bebd797 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,5 +1,5 @@
 # French translations for Git.
-# Copyright (C) 2019 Jean-Noël Avila <jn.avila@free.fr>
+# Copyright (C) 2023 Jean-Noël Avila <jn.avila@free.fr>
 # This file is distributed under the same license as the Git package.
 # Jean-Noël Avila <jn.avila@free.fr>, 2013-2019.
 # Sébastien Helleu <flashcode@flashtux.org>, 2013.
@@ -78,8 +78,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-11-30 19:40+0100\n"
-"PO-Revision-Date: 2022-11-30 19:42+0100\n"
+"POT-Creation-Date: 2023-03-01 01:20+0000\n"
+"PO-Revision-Date: 2023-03-02 18:44+0100\n"
 "Last-Translator: Cédric Malard <c.malard-git@valdun.net>\n"
 "Language-Team: Jean-Noël Avila <jn.avila@free.fr>\n"
 "Language: fr\n"
@@ -115,13 +115,13 @@ msgstr "impossible d'indexer '%s'"
 msgid "could not write index"
 msgstr "impossible d'écrire l'index"
 
-#, c-format, perl-format
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "%d chemin mis à jour\n"
 msgstr[1] "%d chemins mis à jour\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "note : %s n'est plus suivi à présent.\n"
 
@@ -135,7 +135,7 @@ msgstr "Inverser"
 msgid "Could not parse HEAD^{tree}"
 msgstr "Impossible d'analyser HEAD^{tree}"
 
-#, c-format, perl-format
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "%d chemin inversé\n"
@@ -148,7 +148,7 @@ msgstr "Aucun Fichier non suivi.\n"
 msgid "Add untracked"
 msgstr "Ajouter un fichier non-suivi"
 
-#, c-format, perl-format
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "%d chemin ajouté\n"
@@ -245,19 +245,19 @@ msgstr "impossible de rafraîchir l'index"
 msgid "Bye.\n"
 msgstr "Au revoir.\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Indexer le changement de mode [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Indexer la suppression [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Indexer l'ajout [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Indexer cette section [y,n,q,a,d%s,?] ? "
 
@@ -281,19 +281,19 @@ msgstr ""
 "a - indexer cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas indexer cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Remiser le changement de mode [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Remiser la suppression [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Remiser l'ajout [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Remiser cette section [y,n,q,a,d%s,?] ? "
 
@@ -317,19 +317,19 @@ msgstr ""
 "a - remiser cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas remiser cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Désindexer le changement de mode [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Désindexer la suppression [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Désindexer l'ajout [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Désindexer cette section [y,n,q,a,d%s,?] ? "
 
@@ -353,19 +353,19 @@ msgstr ""
 "a - désindexer cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas désindexer cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "Appliquer le changement de mode à l'index [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Appliquer la suppression à l'index [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Appliquer l'ajout à l'index [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Appliquer cette section à l'index [y,n,q,a,d%s,?] ? "
 
@@ -389,19 +389,19 @@ msgstr ""
 "a - appliquer cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas appliquer cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "Abandonner le changement de mode dans l'arbre [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Abandonner la suppression dans l'arbre [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Abandonner l'ajout dans l'arbre [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Abandonner cette section dans l'arbre [y,n,q,a,d%s,?] ? "
 
@@ -425,20 +425,20 @@ msgstr ""
 "a - supprimer cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas supprimer cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Abandonner le changement de mode dans l'index et l'arbre [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Abandonner la suppression de l'index et de l'arbre [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Abandonner l'ajout de l'index et de l'arbre [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Supprimer la section dans l'index et l'arbre de travail [y,n,q,a,d%s,?] ? "
@@ -456,24 +456,24 @@ msgstr ""
 "a - éliminer cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas éliminer cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Appliquer le changement de mode dans l'index et l'arbre de travail [y,n,q,a,"
 "d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Appliquer la suppression dans l'index et l'arbre de travail [y,n,q,a,"
 "d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Appliquer l'ajout dans l'index et l'arbre de travail [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Appliquer la section à l'index et l'arbre de travail [y,n,q,a,d%s,?] ? "
@@ -491,20 +491,20 @@ msgstr ""
 "a - appliquer cette section et toutes les suivantes de ce fichier\n"
 "d - ne pas appliquer cette section ni les suivantes de ce fichier\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Appliquer le changement de mode dans l'arbre de travail [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Appliquer la suppression dans l'arbre de travail [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Appliquer l'ajout dans l'arbre de travail [y,n,q,a,d%s,?] ? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "Appliquer la section à l'arbre de travail [y,n,q,a,d%s,?] ? "
 
@@ -581,8 +581,6 @@ msgstr ""
 "Pour éliminer les lignes '%c', effacez-les.\n"
 "Les lignes commençant par %c seront éliminées.\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -598,24 +596,16 @@ msgstr "impossible d'analyser l'entête de section"
 msgid "'git apply --cached' failed"
 msgstr "'git apply --cached' a échoué"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
-"Votre section éditée ne s'applique pas. L'éditer à nouveau (\"no\" "
+"Votre section éditée ne s'applique pas. L'éditer à nouveau (\"n\" "
 "l'élimine !) [y|n] ? "
 
 msgid "The selected hunks do not apply to the index!"
@@ -1469,6 +1459,12 @@ msgstr "lire .gitattributes dans le répertoire de travail"
 msgid "report archived files on stderr"
 msgstr "afficher les fichiers archivés sur stderr"
 
+msgid "time"
+msgstr "heure"
+
+msgid "set modification time of archive entries"
+msgstr "régler la date de modification des entrées de l'archive"
+
 msgid "set compression level"
 msgstr "régler le niveau de compression"
 
@@ -1509,6 +1505,13 @@ msgstr "Argument non supporté pour le format '%s' : -%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%.*s n'est pas un nom valide d'attribut"
 
+msgid "unable to add additional attribute"
+msgstr "Impossible d'ajouter l'attribut additionnel"
+
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "ligne d'attribute trop longue ignorée %d"
+
 #, c-format
 msgid "%s not allowed: %s:%d"
 msgstr "%s non permis : %s : %d"
@@ -1520,6 +1523,18 @@ msgstr ""
 "Les motifs de négation sont ignorés dans les attributs git\n"
 "Utilisez '\\!' pour un point d'exclamation littéral."
 
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "impossible de fstat le fichier gitattributes '%s'"
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "fichier gitattributes trop gros ignoré '%s'"
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "blob gitattributes trop gros ignoré '%s'"
+
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
 msgstr "Contenu mal cité dans le fichier '%s' : %s"
@@ -1798,11 +1813,11 @@ msgstr "sous-module '%s' : impossible de trouver le sous-module"
 
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
 "Vous pouvez essayer de mettre à jour les sous-modules en utilisant 'git "
-"checkout %s && git submodule update --init'"
+"checkout --no-recurse-submodules %s && git submodule update --init'"
 
 #, c-format
 msgid "submodule '%s': cannot create branch '%s'"
@@ -1837,6 +1852,13 @@ msgstr "suppression de '%s'\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "Modifications non indexées après rafraîchissement de l'index :"
 
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"le réglage add.interactive.useBuiltin a été supprimé !\n"
+"Référez-vous à cette entrée dans 'git help config' pour plus de détails."
+
 msgid "Could not read the index"
 msgstr "Impossible de lire l'index"
 
@@ -2232,6 +2254,9 @@ msgstr "git am [<options>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "exécution interactive"
 
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "court-circuiter les crochets pre-applypatch and applypatch-msg"
+
 msgid "historical option -- no-op"
 msgstr "option historique -- no-op"
 
@@ -2376,32 +2401,28 @@ msgstr "git archive : erreur de protocole"
 msgid "git archive: expected a flush"
 msgstr "git archive : vidage attendu"
 
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<commit>]"
-
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<terme> --term-{old,good}"
-"=<terme>][--no-checkout] [--first-parent] [<mauvais> [<bon>...]] [--] "
-"[<chemins>...]"
+"git bisect start [--term-{new,bad}=<terme> --term-{old,good}=<terme>]    [--"
+"no-checkout] [--first-parent] [<mauvais> [<bon>...]] [--]    [<spéc-de-"
+"chemin>...]"
 
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<rév>]"
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<rév>...]"
 
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<rév>...]"
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<rév>|<plage>)...]"
 
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <nom-de-fichier>"
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<commit>]"
 
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<rév>|<plage>)...]"
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <fichier-journal>"
 
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <cmd>..."
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <cmd>..."
 
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
@@ -2548,9 +2569,6 @@ msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
 msgstr ""
 "l'extraction de '%s' a échoué. Essayez 'git bisect start <branche-valide>'."
 
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "refus de bissecter sur un arbre 'cg-seeked'"
-
 msgid "bad HEAD - strange symbolic ref"
 msgstr "mauvaise HEAD - référence symbolique douteuse"
 
@@ -2602,16 +2620,16 @@ msgid "bisect run failed: no command provided."
 msgstr "la bissection a échoué : aucune commande fournie."
 
 #, c-format
-msgid "unable to verify '%s' on good revision"
-msgstr "impossible de vérifier '%s' sur une bonne révision"
+msgid "unable to verify %s on good revision"
+msgstr "impossible de vérifier %s sur une bonne révision"
 
 #, c-format
 msgid "bogus exit code %d for good revision"
 msgstr "code de sortie %d erroné pour une bonne révision"
 
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
-msgstr "la bissection a échoué : le code retour %d de '%s' est < 0 ou >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
+msgstr "la bissection a échoué : le code retour %d de %s est < 0 ou >= 128"
 
 #, c-format
 msgid "cannot open file '%s' for writing"
@@ -2620,37 +2638,42 @@ msgstr "impossible d'ouvrir '%s' en écriture"
 msgid "bisect run cannot continue any more"
 msgstr "la bissection ne peut plus continuer"
 
-#, c-format
 msgid "bisect run success"
 msgstr "succès de la bissection"
 
-#, c-format
 msgid "bisect found first bad commit"
 msgstr "la bissection a trouvé le premier mauvais commit"
 
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
-msgstr ""
-"la bissection a échoué : 'git bisect--helper --bisect-state %s' a retourné "
-"le code erreur %d"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
+msgstr "la bissection a échoué : 'git bisect %s' a retourné le code erreur %d"
 
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset supporte soit aucun argument, soit un commit"
-
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms exige 0 ou 1 argument"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "%s supporte soit aucun argument, soit un commit"
 
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next exige 0 argument"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "'%s' nécessite 0 ou 1 argument"
 
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log exige 0 argument"
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "'%s' n'accepte aucun argument"
 
 msgid "no logfile given"
 msgstr "pas de fichier de log donné"
 
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "'%s' a échoué : aucune commande fournie."
+
+msgid "need a command"
+msgstr "commande requise"
+
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "commande inconnue : '%s'"
+
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<options>] [<rev-opts>] [<rev>] [--] <fichier>"
 
@@ -3241,6 +3264,9 @@ msgstr "git bundle list-heads <fichier> [<nom-de-ref>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <fichier> [<nom-de-ref>...]"
 
+msgid "need a <file> argument"
+msgstr "requiert un argument <fichier>"
+
 msgid "do not show progress meter"
 msgstr "ne pas afficher la barre de progression"
 
@@ -3294,10 +3320,6 @@ msgstr "%s nécessite des arguments"
 msgid "%s takes no arguments"
 msgstr "%s n'accepte aucune argument"
 
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "commande inconnue : %s"
-
 msgid "only one batch option may be specified"
 msgstr "une seule option de traitement ne peut être spécifiée à la fois"
 
@@ -3434,11 +3456,17 @@ msgstr "<objet> nécessaire avec '-%c'"
 msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "deux arguments seulement permis dans le mode <type> <objet>, pas %d"
 
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <attr>...] [--] <chemin>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <arbre-esque>] [-a | --all | <attr>...] [--] "
+"<chemin>..."
 
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <attr>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <arbre-esque>] [-a | --all | <attr>...]"
 
 msgid "report all attributes set on file"
 msgstr "afficher tous les attributs associés au fichier"
@@ -3453,6 +3481,12 @@ msgid "terminate input and output records by a NUL character"
 msgstr ""
 "terminer les enregistrements en entrée et en sortie par un caractère NUL"
 
+msgid "<tree-ish>"
+msgstr "<arbre-esque>"
+
+msgid "which tree-ish to check attributes at"
+msgstr "à quel <arbre-esque> vérifier les attributs"
+
 msgid "suppress progress reporting"
 msgstr "supprimer l'état d'avancement"
 
@@ -4040,7 +4074,7 @@ msgstr ""
 "*          - choisir tous les éléments\n"
 "           - (vide) terminer la sélection\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Hein (%s) ?\n"
 
@@ -4189,9 +4223,6 @@ msgstr "profondeur"
 msgid "create a shallow clone of that depth"
 msgstr "créer un clone superficiel de cette profondeur"
 
-msgid "time"
-msgstr "heure"
-
 msgid "create a shallow clone since a specific time"
 msgstr "créer un clone superficiel depuis une date spécifique"
 
@@ -4434,6 +4465,9 @@ msgstr "échec lors de l'initialisation du dépôt, URI du paquet ignoré"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "impossible de récupérer les objets depuis l'URI de paquet '%s'"
 
+msgid "failed to fetch advertised bundles"
+msgstr "échec de récupération des colis annoncés"
+
 msgid "remote transport reported error"
 msgstr "le transport distant a retourné une erreur"
 
@@ -5689,30 +5723,6 @@ msgstr "pas d'<outil> spécifié pour --tool=<outil>"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "pas de <commande> spécifié pour --extcmd=<commande>"
 
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <options> <var d'env>"
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr "valeur par défaut pour git_env_*(...) en cas d'absence"
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr ""
-"mode silencieux n'utilisant la valeur de git_env_*() que pour le code de "
-"sortie"
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-"l'option `--default` attend une valeur booléenne avec `--type=bool`, pas `%s`"
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not "
-"`%s`"
-msgstr ""
-"l'option `--default` attend une valeur entier long non signé avec `--"
-"type=ulong`, pas `%s`"
-
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<options-de-liste-de-révisions>]"
 
@@ -6122,6 +6132,10 @@ msgstr "une profondeur négative dans --deepen n'est pas supportée"
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "--unshallow sur un dépôt complet n'a pas de sens"
 
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "échec de récupération des colis depuis '%s'"
+
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all n'accepte pas d'argument de dépôt"
 
@@ -7160,13 +7174,19 @@ msgstr "usage : %s%s"
 msgid "'git help config' for more information"
 msgstr "'git help config' pour plus d'information"
 
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
 msgstr ""
-"git hook run [--ignore-missing] <nom-de-crochet> [-- <arguments-de-crochet>]"
+"git hook run [--ignore-missing] [--to-stdin=<chemin>] <nom-de-crochet> [-- "
+"<arguments-de-crochet>]"
 
 msgid "silently ignore missing requested <hook-name>"
 msgstr "ignorer silencieusement le <nom-de-crochet> requis manquant"
 
+msgid "file to read into hooks' stdin"
+msgstr "fichier à la lire dans l'entrée standard du crochet"
+
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "type d'objet non correspondant à %s"
@@ -7985,7 +8005,7 @@ msgid "if any <file> is not in the index, treat this as an error"
 msgstr "si un <fichier> n'est pas dans l'index, traiter cela comme une erreur"
 
 msgid "tree-ish"
-msgstr "arbre ou apparenté"
+msgstr "arbre-esque"
 
 msgid "pretend that paths removed since <tree-ish> are still present"
 msgstr ""
@@ -8011,11 +8031,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<clé>]\n"
-"              [--symref] [<dépôt> [<f>...]]"
+"              [--symref] [<dépôt> [<motif>...]]"
 
 msgid "do not print remote URL"
 msgstr "ne pas afficher les URL distantes"
@@ -8265,9 +8285,15 @@ msgstr "permettre la fusion d'historiques sans rapport"
 msgid "perform multiple merges, one per line of input"
 msgstr "réaliser des fusions multiples, une par ligne d'entrée"
 
+msgid "specify a merge-base for the merge"
+msgstr "spécifier une base de fusion pour la fusion"
+
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge est incompatible avec d'autres options"
 
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base est incompatible avec --stdin"
+
 #, c-format
 msgid "malformed input line: '%s'."
 msgstr "ligne en entrée malformée : '%s'."
@@ -10202,6 +10228,10 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "impossible de basculer vers %s"
 
+msgid "apply options and merge options cannot be used together"
+msgstr ""
+"Les options d'apply et celles de merge ne peuvent pas être utilisées ensemble"
+
 #, c-format
 msgid ""
 "unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
@@ -10437,9 +10467,19 @@ msgstr "Mode inconnu : %s"
 msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy requiert --merge ou --interactive"
 
-msgid "apply options and merge options cannot be used together"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
 msgstr ""
-"Les options d'apply et celles de merge ne peuvent pas être utilisées ensemble"
+"les options d'application sont incompatibles avec rebase.autosquash. "
+"Considérez l'ajout de --no-autosquash"
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"les options d'application sont incompatibles avec rebase.updateRefs. "
+"Considérez l'ajout de --no-update-refs"
 
 #, c-format
 msgid "Unknown rebase backend: %s"
@@ -12980,10 +13020,6 @@ msgstr "'%s' n'est pas un nom valide de sous-module"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <commande>"
 
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s ne gère pas --super-prefix"
-
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <raison>] <nom> <réf>"
 
@@ -13743,6 +13779,10 @@ msgstr "seulement utile pour le débogage"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch non géré sur cette plateforme"
 
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "impossible d'analyser la clé de liste de colis %s avec la valeur '%s'"
+
 #, c-format
 msgid "bundle list at '%s' has no mode"
 msgstr "la liste de colis n'a pas de mode à '%s'"
@@ -13753,6 +13793,13 @@ msgstr "impossible de créer un fichier temporaire"
 msgid "insufficient capabilities"
 msgstr "capacités insuffisantes"
 
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "le fichier téléchargé depuis '%s' n'est pas un colis"
+
+msgid "failed to store maximum creation token"
+msgstr "échec de stockage du jeton de création maximum"
+
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
 msgstr "mode de colisage non reconnu depuis l'URI '%s'"
@@ -13769,6 +13816,13 @@ msgstr "impossible de télécharger le colis depuis l'URI '%s'"
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "le fichier à l'URI '%s' n'est pas un colis ou une liste de colis"
 
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri :argument inattendu : '%s'"
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri : vidage attendu après les arguments"
+
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri : ligne vide rencontrée"
 
@@ -13800,6 +13854,13 @@ msgstr "Le dépôt ne dispose pas des commits prérequis suivants :"
 msgid "need a repository to verify a bundle"
 msgstr "la vérification d'un colis requiert un dépôt"
 
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"des commits prérequis existent dans le stock d'objets, mais ne sont pas "
+"connectés à l'historique du dépôt"
+
 #, c-format
 msgid "The bundle contains this ref:"
 msgid_plural "The bundle contains these %<PRIuMAX> refs:"
@@ -15254,6 +15315,16 @@ msgstr "erreur de protocole : '%s' attendu"
 msgid "unknown object format '%s' specified by server"
 msgstr "format d'objet spécifié par le serveur inconnu '%s'"
 
+#, c-format
+msgid "error on bundle-uri response line %d: %s"
+msgstr "erreur sur la ligne %d de réponse bundle-uri : %s"
+
+msgid "expected flush after bundle-uri listing"
+msgstr "vidage attendu après le listage des bundle-uri"
+
+msgid "expected response end packet after ref listing"
+msgstr "paquet de fin de réponse attendu après le listage de références"
+
 #, c-format
 msgid "invalid ls-refs response: %s"
 msgstr "réponse à ls-ref invalide : %s"
@@ -15261,9 +15332,6 @@ msgstr "réponse à ls-ref invalide : %s"
 msgid "expected flush after ref listing"
 msgstr "vidage attendu après le listage de références"
 
-msgid "expected response end packet after ref listing"
-msgstr "paquet de fin de réponse attendu après le listage de références"
-
 #, c-format
 msgid "protocol '%s' is not supported"
 msgstr "le protocole '%s' n'est pas supporté"
@@ -16427,11 +16495,11 @@ msgstr "fsmonitor--daemon n'est pas en cours d'exécution"
 
 #, c-format
 msgid "could not send '%s' command to fsmonitor--daemon"
-msgstr "impossible de lancer la commmand '%s' à fsmonitor--daemon"
+msgstr "impossible de lancer la commande '%s' à fsmonitor--daemon"
 
 #, c-format
 msgid "bare repository '%s' is incompatible with fsmonitor"
-msgstr "le dépôit nu '%s' est incompatible avec fsmonitor"
+msgstr "le dépôt nu '%s' est incompatible avec fsmonitor"
 
 #, c-format
 msgid "repository '%s' is incompatible with fsmonitor due to errors"
@@ -16459,18 +16527,16 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
-"git [--version] [-h | --help] [-C <chemin>] [-c <nom>=<valeur>]\n"
+"git [-v | --version] [-h | --help] [-C <chemin>] [-c <nom>=<valeur>]\n"
 "           [--exec-path[=<chemin>]] [--html-path] [--man-path] [--info-"
 "path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<chemin>] [--work-tree=<chemin>] [--namespace=<nom>]\n"
-"           [--super-prefix=<chemin>] [--config-env=<nom>=<variable-d-"
-"environnement>]\n"
-"           <commande> [<args>]"
+"           [--config-env=<nom>=<variable-d-environnement>] <commande> "
+"[<args>]"
 
 msgid ""
 "'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -16495,10 +16561,6 @@ msgstr "aucun répertoire fourni pour l'option '%s'\n"
 msgid "no namespace given for --namespace\n"
 msgstr "aucun espace de nom fournit pour --namespace\n"
 
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "aucun préfixe fourni pour --super-prefix\n"
-
 #, c-format
 msgid "-c expects a configuration string\n"
 msgstr "-c requiert une chaîne de configuration\n"
@@ -16611,8 +16673,13 @@ msgstr ""
 msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand a échoué : %s %s"
 
-msgid "gpg failed to sign the data"
-msgstr "gpg n'a pas pu signer les données"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg n'a pas pu signer les données :\n"
+"%s"
 
 msgid "user.signingKey needs to be set for ssh signing"
 msgstr "user.signingKey doit être configuré pour signer avec ssh"
@@ -17770,6 +17837,10 @@ msgstr "objet libre corrompu '%s'"
 msgid "garbage at end of loose object '%s'"
 msgstr "données incorrectes à la fin de l'objet libre '%s'"
 
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "impossible d'ouvrir l'objet libre %s"
+
 #, c-format
 msgid "unable to parse %s header"
 msgstr "impossible d'analyser l'entête %s"
@@ -17786,17 +17857,13 @@ msgid "header for %s too long, exceeds %d bytes"
 msgstr "entête de %s trop long, attendu %d octets"
 
 #, c-format
-msgid "failed to read object %s"
-msgstr "impossible de lire l'objet %s"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "l'objet libre %s (stocké dans %s) est corrompu"
 
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "remplacement %s non trouvé pour %s"
 
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "l'objet libre %s (stocké dans %s) est corrompu"
-
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
 msgstr "l'objet empaqueté %s (stocké dans %s) est corrompu"
@@ -17809,9 +17876,6 @@ msgstr "impossible d'écrire le fichier %s"
 msgid "unable to set permission to '%s'"
 msgstr "impossible de régler les droits de '%s'"
 
-msgid "file write error"
-msgstr "erreur d'écriture d'un fichier"
-
 msgid "error when closing loose object file"
 msgstr "erreur en fermeture du fichier d'objet esseulé"
 
@@ -17858,11 +17922,12 @@ msgstr "échec de la création du répertoire %s"
 msgid "cannot read object for %s"
 msgstr "impossible de lire l'objet pour %s"
 
-msgid "corrupt commit"
-msgstr "commit corrompu"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "l'objet est en échec de fsck : %s"
 
-msgid "corrupt tag"
-msgstr "étiquette corrompue"
+msgid "refusing to create malformed object"
+msgstr "Refus de créer un objet malformé"
 
 #, c-format
 msgid "read error while indexing %s"
@@ -18131,10 +18196,6 @@ msgstr "décalage XOR invalide dans l'index de paquet en bitmap"
 msgid "cannot fstat bitmap file"
 msgstr "impossible d'obtenir le statut (fstat) du fichier de bitmap"
 
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "fichier bitmap extra ignoré : '%s'"
-
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "la somme de contrôle ne correspond pas entre MIDX et bitmap"
 
@@ -18400,6 +18461,9 @@ msgstr "être plus silencieux"
 msgid "use <n> digits to display object names"
 msgstr "utiliser <n> chiffres pour afficher les noms des objets"
 
+msgid "prefixed path to initial superproject"
+msgstr "chemin préfixé vers le superprojet initial"
+
 msgid "how to strip spaces and #comments from message"
 msgstr "comment éliminer les espaces et les commentaires # du message"
 
@@ -18913,6 +18977,14 @@ msgstr "en retard de %d"
 msgid "ahead %d, behind %d"
 msgstr "en avance de %d, en retard de %d"
 
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) n'accepte pas d'argument"
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "argument %%(%.*s) non reconnu : %s"
+
 #, c-format
 msgid "expected format: %%(color:<color>)"
 msgstr "format attendu : %%(color:<couleur>)"
@@ -18929,22 +19001,6 @@ msgstr "Valeur entière attendue refname:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "Valeur entière attendue refname:rstrip=%s"
 
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "argument %%(%s) non reconnu : %s"
-
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) n'accepte pas d'argument"
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) n'accepte pas d'argument"
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) n'accepte pas d'argument"
-
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
 msgstr "%%(trailers:key=<value>) attendu"
@@ -18961,10 +19017,6 @@ msgstr "valeur positive attendue contents:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "valeur positive attendue '%s' dans %%(%s)"
 
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "option de courriel non reconnue : %s"
-
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
 msgstr "format attendu : %%(align:<largeur>,<position>)"
@@ -18978,12 +19030,12 @@ msgid "unrecognized width:%s"
 msgstr "largeur non reconnue : %s"
 
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "valeur positive attendue avec l'atome %%(align)"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "argument %%(%s) non reconnu : %s"
 
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) n'accepte pas d'argument"
+msgid "positive width expected with the %%(align) atom"
+msgstr "valeur positive attendue avec l'atome %%(align)"
 
 #, c-format
 msgid "malformed field name: %.*s"
@@ -20242,6 +20294,24 @@ msgstr "git %s : échec à la lecture de l'index"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s : échec du rafraîchissement de l'index"
 
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "'%s' n'est pas un label valide"
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "'%s' n'est pas un nom valide de référence"
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+"update-ref requiert un nom de référence totalement qualifié par ex. refs/"
+"heads/%s"
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "commande '%.*s' invalide"
+
 #, c-format
 msgid "%s does not accept arguments: '%s'"
 msgstr "%s n'accepte pas d'argument : '%s'"
@@ -21053,6 +21123,16 @@ msgstr "ls-tree a renvoyé un code de retour inattendu %d"
 msgid "failed to lstat '%s'"
 msgstr "échec du lstat de '%s'"
 
+msgid "no remote configured to get bundle URIs from"
+msgstr "aucun distant configuré depuis lequel récupérer des URIs de colis"
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "le distant '%s' n'a pas d'URL configuré"
+
+msgid "could not get the bundle-uri list"
+msgstr "impossible d'avoir la liste de bundle-uris"
+
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <options> (control|prime|update)"
 
@@ -21412,6 +21492,13 @@ msgstr "Abandon."
 msgid "failed to push all needed submodules"
 msgstr "échec de la poussée de tous les sous-modules nécessaires"
 
+msgid "bundle-uri operation not supported by protocol"
+msgstr "opération bundle-uri non supportée par le protocole"
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr ""
+"impossible de récupérer la liste de bundle-uris annoncée par le serveur"
+
 msgid "too-short tree object"
 msgstr "objet arbre trop court"
 
@@ -22165,14 +22252,19 @@ msgstr "Fichiers ignorés"
 
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"L'énumération des fichiers non suivis a duré %.2f secondes. 'status -uno'\n"
-"peut l'accélérer, mais vous devez alors faire attention à ne pas\n"
-"oublier d'ajouter les nouveaux fichiers par vous-même (voir 'git help "
-"status')."
+"L'énumération des fichiers non-suivis a pris %.2f secondes,\n"
+"mais les resultats ont été mis en cache, et les lancements suivants seront "
+"plus rapides."
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "L'énumération des fichiers non-suivis a pris %.2f secondes."
+
+msgid "See 'git help status' for information on how to improve this."
+msgstr "Voir 'git help status' pour tout information pour améliorer ceci."
 
 #, c-format
 msgid "Untracked files not listed%s"
@@ -22323,275 +22415,6 @@ msgstr ""
 msgid "Unable to determine absolute path of git directory"
 msgstr "Impossible de déterminer le chemin absolu du répertoire git"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%12s %s12s %s"
-
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "%d chemin touché\n"
-msgstr[1] "%d chemins touchés\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Si le patch s'applique proprement, la section éditée sera\n"
-"immédiatement marquée comme indexée."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Si le patch s'applique proprement, la section éditée sera\n"
-"immédiatement marquée comme remisée."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Si le patch s'applique proprement, la section éditée sera\n"
-"immédiatement marquée comme desindexée."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Si le patch s'applique proprement, la section éditée sera\n"
-"immédiatement marquée comme appliquée."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Si le patch s'applique proprement, la section éditée sera\n"
-"immédiatement marquée comme éliminée."
-
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr "impossible d'ouvrir le fichier d'édition de section en écriture : %s"
-
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"---\n"
-"Pour éliminer les lignes '%s', rendez-les ' ' (contexte).\n"
-"Pour éliminer les lignes '%s', effacez-les.\n"
-"Les lignes commençant par %s seront éliminées.\n"
-
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr "échec de l'ouverture du fichier d'édition de section en lecture : %s"
-
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - indexer cette section\n"
-"n - ne pas indexer cette section\n"
-"q - quitter ; ne pas indexer cette section ni les autres restantes\n"
-"a - indexer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas indexer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y - remiser cette section\n"
-"n - ne pas remiser cette section\n"
-"q - quitter ; ne pas remiser cette section ni les autres restantes\n"
-"a - remiser cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas remiser cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - désindexer cette section\n"
-"n - ne pas désindexer cette section\n"
-"q - quitter ; ne pas désindexer cette section ni les autres restantes\n"
-"a - désindexer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas désindexer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - appliquer cette section\n"
-"n - ne pas appliquer cette section\n"
-"q - quitter ; ne pas appliquer cette section ni les autres restantes\n"
-"a - appliquer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas appliquer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - supprimer cette section\n"
-"n - ne pas supprimer cette section\n"
-"q - quitter ; ne pas supprimer cette section ni les autres restantes\n"
-"a - supprimer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas supprimer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - éliminer cette section de l'index et de l'arbre de travail\n"
-"n - ne pas éliminer cette section\n"
-"q - quitter ; ne pas éliminer cette section ni les autres restantes\n"
-"a - éliminer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas éliminer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - appliquer cette section à l'index et à l'arbre de travail\n"
-"n - ne pas appliquer cette section\n"
-"q - quitter ; ne pas appliquer cette section ni les autres restantes\n"
-"a - appliquer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas appliquer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - appliquer cette section à l'arbre de travail\n"
-"n - ne pas appliquer cette section\n"
-"q - quitter ; ne pas appliquer cette section ni les autres restantes\n"
-"a - appliquer cette section et toutes les suivantes de ce fichier\n"
-"d - ne pas appliquer cette section ni les suivantes de ce fichier"
-
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g - selectionner une section et s'y rendre\n"
-"/ - rechercher une section correspondant à une regex donnée\n"
-"j - laisser cette section non décidée et aller à la suivante non-décidée\n"
-"J - laisser cette section non décidée et aller à la suivante\n"
-"k - laisser cette section non décidée et aller à la précédente non-décidée\n"
-"K - laisser cette section non décidée et aller à la précédente\n"
-"s - découper la section en sections plus petites\n"
-"e - éditer manuellement la section actuelle\n"
-"? - afficher l'aide\n"
-
-msgid "The selected hunks do not apply to the index!\n"
-msgstr "Les sections sélectionnées ne s'applique pas à l'index !\n"
-
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "fichier non-fusionné ignoré : %s\n"
-
-msgid "No other hunks to goto\n"
-msgstr "Aucune autre section à atteindre\n"
-
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "Nombre invalide : '%s'\n"
-
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "Désolé, %d seule section disponible.\n"
-msgstr[1] "Désolé, Seulement %d sections disponibles.\n"
-
-msgid "No other hunks to search\n"
-msgstr "Aucune autre section à rechercher\n"
-
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "Regex de recherche malformée %s : %s\n"
-
-msgid "No hunk matches the given pattern\n"
-msgstr "Aucune section ne correspond au motif donné\n"
-
-msgid "No previous hunk\n"
-msgstr "Pas de section précédente\n"
-
-msgid "No next hunk\n"
-msgstr "Pas de section suivante\n"
-
-msgid "Sorry, cannot split this hunk\n"
-msgstr "Désolé, impossible de découper cette section\n"
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "Découpée en %d section.\n"
-msgstr[1] "Découpée en %d sections.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "Désolé, impossible d'éditer cette section\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        - montrer les chemins modifiés\n"
-"update        - ajouter l'état de l'arbre de travail aux modifications à "
-"indexer\n"
-"revert        - faire revenir les modifications à indexer à la version HEAD\n"
-"patch         - sélectionner les sections et mettre à jour sélectivement\n"
-"diff          - visualiser les diff entre HEAD et l'index\n"
-"add untracked - ajouter les fichiers non-suivis aux modifications à indexer\n"
-
-msgid "missing --"
-msgstr "-- manquant"
-
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "mode de --patch inconnu : %s"
-
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "argument invalide %s, -- attendu"
-
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr ""
 "la zone locale diffère du GMT par un intervalle supérieur à une minute\n"
@@ -22918,232 +22741,3 @@ msgstr "%s sauté avec un suffix de sauvegarde '%s'.\n"
 #, perl-format
 msgid "Do you really want to send %s? [y|N]: "
 msgstr "Souhaitez-vous réellement envoyer %s ?[y|N] : "
-
-#, c-format
-#~ msgid "unable to normalize object directory: %s"
-#~ msgstr "impossible de normaliser le répertoire d'objet : %s"
-
-#~ msgid "reset the bisection state"
-#~ msgstr "réinitialiser l'état de la bissection"
-
-#~ msgid "check whether bad or good terms exist"
-#~ msgstr "vérifier si les termes bons ou mauvais existent"
-
-#~ msgid "print out the bisect terms"
-#~ msgstr "afficher les termes de bissection"
-
-#~ msgid "start the bisect session"
-#~ msgstr "démarrer une session de bissection"
-
-#~ msgid "find the next bisection commit"
-#~ msgstr "trouver le prochain commit de bissection"
-
-#~ msgid "mark the state of ref (or refs)"
-#~ msgstr "marquer l'état d'une références (ou plusieurs)"
-
-#~ msgid "list the bisection steps so far"
-#~ msgstr "lister les étapes de bissection jusqu'ici"
-
-#~ msgid "replay the bisection process from the given file"
-#~ msgstr "rejouer le processus de bissection depuis le fichier fourni"
-
-#~ msgid "skip some commits for checkout"
-#~ msgstr "sauter certains commits pour l'extraction"
-
-#~ msgid "visualize the bisection"
-#~ msgstr "visualiser la bissection"
-
-#~ msgid "use <cmd>... to automatically bisect"
-#~ msgstr "utiliser <cmd>... pour bissecter automatiquement"
-
-#~ msgid "no log for BISECT_WRITE"
-#~ msgstr "pas de journal pour BISECT_WRITE"
-
-#~ msgid "Couldn't look up commit object for HEAD"
-#~ msgstr "Impossible de rechercher l'objet commit pour HEAD"
-
-#~ msgid "git bundle create [<options>] <file> <git-rev-list args>"
-#~ msgstr "git bundle create [<options>] <fichier> <args git-rev-list>"
-
-#, c-format
-#~ msgid "options '%s' and '%s %s' cannot be used together"
-#~ msgstr "les options '%s' et '%s %s' ne peuvent pas être utilisées ensemble"
-
-#~ msgid "git commit [<options>] [--] <pathspec>..."
-#~ msgstr "git commit [<options>] [--] <spécification-de-chemin>..."
-
-#~ msgid "git fsck [<options>] [<object>...]"
-#~ msgstr "git fsck [<options>] [<objet>...]"
-
-#~ msgid "git fsmonitor--daemon stop"
-#~ msgstr "git fsmonitor--daemon stop"
-
-#~ msgid "git fsmonitor--daemon status"
-#~ msgstr "git fsmonitor--daemon status"
-
-#~ msgid "failed to run 'git config'"
-#~ msgstr "échec du lancement de 'git config'"
-
-#, c-format
-#~ msgid "could not get 'onto': '%s'"
-#~ msgstr "impossible d'accéder 'onto' : '%s'"
-
-#~ msgid "Could not resolve HEAD to a revision"
-#~ msgstr "Impossible de résoudre le commit HEAD vers un révision"
-
-#, c-format
-#~ msgid "missing required file: %s"
-#~ msgstr "fichier nécessaire manquant : %s"
-
-#~ msgid "git revert [<options>] <commit-ish>..."
-#~ msgstr "git revert [<options>] <commit ou apparenté>..."
-
-#~ msgid "git revert <subcommand>"
-#~ msgstr "git revert <sous-commande>"
-
-#~ msgid "git cherry-pick [<options>] <commit-ish>..."
-#~ msgstr "git cherry-pick [<options>] <commit ou apparenté>..."
-
-#~ msgid "git cherry-pick <subcommand>"
-#~ msgstr "git cherry-pick <sous-commande>"
-
-#~ msgid "git rm [<options>] [--] <file>..."
-#~ msgstr "git rm [<options>] [--] <fichier>..."
-
-#~ msgid "using --group=trailer with stdin is not supported"
-#~ msgstr "l'utilisation de --group=trailer avec stdin n'est pas supportée"
-
-#~ msgid "git stash show [<options>] [<stash>]"
-#~ msgstr "git stash show [<options>] [<remise>]"
-
-#~ msgid "git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]"
-#~ msgstr "git stash ( pop | apply ) [--index] [-q|--quiet] [<remise>]"
-
-#~ msgid ""
-#~ "git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "          [-u|--include-untracked] [-a|--all] [-m|--message <message>]\n"
-#~ "          [--] [<pathspec>...]]"
-#~ msgstr ""
-#~ "git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "          [-u|--include-untracked] [-a|--all] [-m|--message <message>]\n"
-#~ "          [--] [<spécificateur-de-chemin>...]]"
-
-#~ msgid ""
-#~ "git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "               [-u|--include-untracked] [-a|--all] [<message>]"
-#~ msgstr ""
-#~ "git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "               [-u|--include-untracked] [-a|--all] [<message>]"
-
-#~ msgid "path into the working tree"
-#~ msgstr "chemin dans la copie de travail"
-
-#~ msgid "recurse into submodules"
-#~ msgstr "parcourir récursivement les sous-modules"
-
-#~ msgid "check if it is safe to write to the .gitmodules file"
-#~ msgstr "vérifier si écrire dans le fichier .gitmodules est sur"
-
-#~ msgid "unset the config in the .gitmodules file"
-#~ msgstr "désactiver la configuration dans le fichier .gitmodules"
-
-#~ msgid "git submodule--helper config <name> [<value>]"
-#~ msgstr "git submodule--helper config name [<valeur>]"
-
-#~ msgid "git submodule--helper config --unset <name>"
-#~ msgstr "git submodule--helper config --unset <nom>"
-
-#, c-format
-#~ msgid "'%s' is not a valid submodule--helper subcommand"
-#~ msgstr "'%s' n'est pas une sous-commande valide de submodule--helper"
-
-#~ msgid "git upload-pack [<options>] <dir>"
-#~ msgstr "git upload-pack [<options>] <répertoire>"
-
-#~ msgid "git worktree add [<options>] <path> [<commit-ish>]"
-#~ msgstr "git worktree add [<options>] <chemin> [<commit>]"
-
-#~ msgid "git worktree lock [<options>] <path>"
-#~ msgstr "git worktree lock [<options>] <chemin>"
-
-#~ msgid "(stats|all)"
-#~ msgstr "(stats|all)"
-
-#~ msgid "git maintenance register"
-#~ msgstr "git maintenance register"
-
-#~ msgid "git maintenance unregister"
-#~ msgstr "git maintenance unregister"
-
-#~ msgid "git maintenance stop"
-#~ msgstr "git maintenance stop"
-
-#, c-format
-#~ msgid "could not parse colored hunk header '%.*s'"
-#~ msgstr "impossible d'analyser l'entête coloré de section '%.*s'"
-
-#, c-format
-#~ msgid "Unknown subcommand: %s"
-#~ msgstr "Sous-commande inconnue : %s"
-
-#~ msgid "checked out in another worktree"
-#~ msgstr "extrait dans un autre arbre de travail"
-
-#~ msgid "failed to open stdin of 'crontab'"
-#~ msgstr "échec à l'ouverture de stdin de 'crontab'"
-
-#, c-format
-#~ msgid "invalid subcommand: %s"
-#~ msgstr "sous-commande invalide : %s"
-
-#~ msgid "single arg format must be symmetric range"
-#~ msgstr "un format d'argument unique doit être une plage symétrique"
-
-#~ msgid "git submodule--helper list [--prefix=<path>] [<path>...]"
-#~ msgstr "git submodule--helper list [--prefix=<chemin>] [<chemin>...]"
-
-#, c-format
-#~ msgid "failed to get the default remote for submodule '%s'"
-#~ msgstr ""
-#~ "échec d'obtention du dépôt distant par défaut pour le sous-module '%s'"
-
-#, c-format
-#~ msgid "Invalid update mode '%s' for submodule path '%s'"
-#~ msgstr ""
-#~ "Mode de mise à jour '%s' invalide pour le chemin de sous-module '%s'"
-
-#~ msgid "path into the working tree, across nested submodule boundaries"
-#~ msgstr ""
-#~ "chemin dans la copie de travail, traversant les frontières de sous-modules"
-
-#~ msgid "rebase, merge, checkout or none"
-#~ msgstr "valeurs possibles : rebase, merge, checkout ou none"
-
-#~ msgid "bad value for update parameter"
-#~ msgstr "valeur invalide pour la mise à jour du paramètre"
-
-#~ msgid "Show three-way merge without touching index"
-#~ msgstr "Afficher la fusion à trois points sans modifier l'index"
-
-#, c-format
-#~ msgid "could not create directory for '%s'"
-#~ msgstr "impossible de créer le répertoire pour '%s'"
-
-#, c-format
-#~ msgid "Couldn't start hook '%s'\n"
-#~ msgstr "impossible de démarrer le crochet '%s'\n"
-
-#, c-format
-#~ msgid ""
-#~ "Note: %s not up to date and in way of checking out conflicted version; "
-#~ "old copy renamed to %s"
-#~ msgstr ""
-#~ "Note :%s pas à jour et au milieu de l'extraction d'une version "
-#~ "conflictuelle ; la vielle copie a été renommée en %s"
-
-#, c-format
-#~ msgid "%s: fast-forward"
-#~ msgstr "%s : avance rapide"
-
-#~ msgid "--preserve-merges was replaced by --rebase-merges"
-#~ msgstr "--preserve-merges a été remplacé par --rebase-merges"
index 41465eed2063a8ab78e7bcf0990341a082b10051..e468b6d9b82445b1eaea1dfe238d8920c0f9d5b0 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-11-30 11:05+0700\n"
-"PO-Revision-Date: 2022-11-30 20:45+0700\n"
+"POT-Creation-Date: 2023-03-02 15:18+0700\n"
+"PO-Revision-Date: 2023-03-02 17:52+0700\n"
 "Last-Translator: Bagas Sanjaya <bagasdotme@gmail.com>\n"
 "Language-Team: Indonesian\n"
 "Language: id\n"
@@ -26,19 +26,19 @@ msgstr "Huh (%s)?"
 msgid "could not read index"
 msgstr "tidak dapat membaca indeks"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "binary"
 msgstr "biner"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "nothing"
 msgstr "tidak ada"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "unchanged"
 msgstr "tak berubah"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Update"
 msgstr "Perbarui"
 
@@ -51,15 +51,15 @@ msgstr "tidak dapat menggelar '%s'"
 msgid "could not write index"
 msgstr "tidak dapat menulis indeks"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "%d jalur diperbarui\n"
 msgstr[1] "%d jalur diperbarui\n"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "catatan: %s sekarang tak terlacak.\n"
 
@@ -68,7 +68,7 @@ msgstr "catatan: %s sekarang tak terlacak.\n"
 msgid "make_cache_entry failed for path '%s'"
 msgstr "make_cache_entry gagal untuk jalur '%s'"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Revert"
 msgstr "Kembalikan"
 
@@ -76,24 +76,24 @@ msgstr "Kembalikan"
 msgid "Could not parse HEAD^{tree}"
 msgstr "Tidak dapat menguraikan HEAD^{tree}"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "%d jalur dikembalikan\n"
 msgstr[1] "%d jalur dikembalikan\n"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 #, c-format
 msgid "No untracked files.\n"
 msgstr "Tidak ada berkas tak terlacak.\n"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Add untracked"
 msgstr "Tambahkan tak terlacak"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "%d jalur ditambahkan\n"
@@ -104,21 +104,21 @@ msgstr[1] "%d jalur ditambahkan\n"
 msgid "ignoring unmerged: %s"
 msgstr "mengabaikan tak tergabung: %s"
 
-#: add-interactive.c add-patch.c git-add--interactive.perl
+#: add-interactive.c add-patch.c
 #, c-format
 msgid "Only binary files changed.\n"
 msgstr "Hanya berkas biner yang berubah.\n"
 
-#: add-interactive.c add-patch.c git-add--interactive.perl
+#: add-interactive.c add-patch.c
 #, c-format
 msgid "No changes.\n"
 msgstr "Tidak ada perubahan.\n"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Patch update"
 msgstr "Pembaruan tambalan"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Review diff"
 msgstr "Tinjau diff"
 
@@ -186,25 +186,25 @@ msgstr "pilih item bernomor"
 msgid "(empty) select nothing"
 msgstr "(empty) tidak pilih apapun"
 
-#: add-interactive.c builtin/clean.c git-add--interactive.perl
+#: add-interactive.c builtin/clean.c
 msgid "*** Commands ***"
 msgstr "*** Perintah ***"
 
-#: add-interactive.c builtin/clean.c git-add--interactive.perl
+#: add-interactive.c builtin/clean.c
 msgid "What now"
 msgstr "Apa sekarang"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "staged"
 msgstr "tergelar"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "unstaged"
 msgstr "tak tergelar"
 
 #: add-interactive.c apply.c builtin/am.c builtin/bugreport.c builtin/clone.c
-#: builtin/diagnose.c builtin/fetch.c builtin/merge.c builtin/pull.c
-#: builtin/submodule--helper.c git-add--interactive.perl
+#: builtin/diagnose.c builtin/fetch.c builtin/hook.c builtin/merge.c
+#: builtin/pull.c builtin/submodule--helper.c
 msgid "path"
 msgstr "jalur"
 
@@ -212,28 +212,28 @@ msgstr "jalur"
 msgid "could not refresh index"
 msgstr "tidak dapat menyegarkan indeks"
 
-#: add-interactive.c builtin/clean.c git-add--interactive.perl
+#: add-interactive.c builtin/clean.c
 #, c-format
 msgid "Bye.\n"
 msgstr "Sampai jumpa.\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Gelar perubahan mode [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Gelar penghapusan [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Gelar penambahan [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Gelar bingkah ini [y,n,q,a,d%s,?]? "
 
@@ -259,23 +259,23 @@ msgstr ""
 "a - gelar bingkah ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan gelar bingkah ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Stase perubahan mode [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Stase penghapusan [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Stase penambahan [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Stase bingkah ini [y,n,q,a,d%s,?]? "
 
@@ -301,23 +301,23 @@ msgstr ""
 "a - stase bingkah ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan stase bingkah ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Batal gelar perubahan mode [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Batal gelar penghapusan [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Batal gelar penambahan [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Batal gelar bingkah ini [y,n,q,a,d%s,?]? "
 
@@ -343,23 +343,23 @@ msgstr ""
 "a - batal gelar bingkah ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan batal gelar bingkah ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "Terapkan perubahan mode ke indeks [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Terapkan penghapusan ke indeks [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Terapkan penambahan ke indeks [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Terapkan bingkah ini ke indeks [y,n,q,a,d%s,?]? "
 
@@ -385,23 +385,23 @@ msgstr ""
 "a - terapkan bingkah ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan terapkan bingkah ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang perubahan mode dari pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang penghapusan dari pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang penambahan dari pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang bingkah ini dari pohon kerja [y,n,q,a,d%s,?]? "
 
@@ -427,23 +427,23 @@ msgstr ""
 "a - buang hunk ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan buang hunk ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang perubahan mode dari indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang penghapusan dari indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang penambahan dari indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Buang bingkah ini dari indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
@@ -461,23 +461,23 @@ msgstr ""
 "a - buang bingkah ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan buang bingkah ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan perubahan mode pada indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan penghapusan pada indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan penambahan pada indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan bingkah ini pada indeks dan pohon kerja [y,n,q,a,d%s,?]? "
 
@@ -495,23 +495,23 @@ msgstr ""
 "a - terapkan bingkah ini dan semua bingkah selanjutnya dalam berkas\n"
 "d - jangan terapkan bingkah ini atau bingkah selanjutnya dalam berkas\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan perubahan mode pada pohon kerja [y,n,q,a,d%s,?]?"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan penghapusan pada pohon kerja [y,n,q,a,d%s,?]?"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan penambahan pada pohon kerja [y,n,q,a,d%s,?]?"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "Terapkan bingkah ini pada pohon kerja [y,n,q,a,d%s,?]?"
 
@@ -581,7 +581,7 @@ msgstr ""
 "tidak berakhir dengan:\n"
 "%.*s"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "Manual hunk edit mode -- see bottom for a quick guide.\n"
 msgstr "Mode sunting bingkah manual -- lihat dibawah untuk panduan cepat.\n"
 
@@ -598,9 +598,7 @@ msgstr ""
 "Untuk menghapus baris '%c', hapuslahnya.\n"
 "Baris yang diawali dengan %c akan dihapus.\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -618,21 +616,13 @@ msgstr "tidak dapat menguraikan kepala bingkah"
 msgid "'git apply --cached' failed"
 msgstr "'git apply --cached' gagal"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
@@ -643,11 +633,11 @@ msgstr ""
 msgid "The selected hunks do not apply to the index!"
 msgstr "Bingkah yang dipilih tidak diterapkan pada indeks!"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "Apply them to the worktree anyway? "
 msgstr "Tetap terapkan pada pohon kerja? "
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "Nothing was applied.\n"
 msgstr "Tidak ada yang diterapkan.\n"
 
@@ -685,11 +675,11 @@ msgstr "Tidak ada bingkah selanjutnya"
 msgid "No other hunks to goto"
 msgstr "Tidak ada bingkah lainnya untuk dikunjungi"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "go to which hunk (<ret> to see more)? "
 msgstr "pergi ke bingkah yang mana (<ret> untuk lihat lebih)? "
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "go to which hunk? "
 msgstr "pergi ke bingkah yang mana?"
 
@@ -709,7 +699,7 @@ msgstr[1] "Maaf, hanya %d bingkah yang tersedia."
 msgid "No other hunks to search"
 msgstr "Tidak ada bingkah lainnya untuk dicari"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "search for regex? "
 msgstr "cari untuk regex? "
 
@@ -1308,7 +1298,7 @@ msgstr ""
 msgid "unable to add cache entry for %s"
 msgstr "tidak dapat menambahkan entri tembolok untuk %s"
 
-#: apply.c builtin/bisect--helper.c builtin/gc.c
+#: apply.c builtin/bisect.c builtin/gc.c
 #, c-format
 msgid "failed to write to '%s'"
 msgstr "gagal menulis ke '%s'"
@@ -1646,7 +1636,7 @@ msgstr "fmt"
 msgid "archive format"
 msgstr "format arsip"
 
-#: archive.c builtin/log.c
+#: archive.c builtin/log.c parse-options.h
 msgid "prefix"
 msgstr "prefiks"
 
@@ -1680,6 +1670,15 @@ msgstr "baca .gitattributes dalam direktori kerja"
 msgid "report archived files on stderr"
 msgstr "laporkan berkas terarsip ke error standar"
 
+#: archive.c builtin/clone.c builtin/fetch.c builtin/pack-objects.c
+#: builtin/pull.c
+msgid "time"
+msgstr "waktu"
+
+#: archive.c
+msgid "set modification time of archive entries"
+msgstr "setel waktu modifikasi entri arsip"
+
 #: archive.c
 msgid "set compression level"
 msgstr "setel level kompresi"
@@ -1735,6 +1734,15 @@ msgstr "Argumen tidak didukung untuk format '%s': -%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%.*s bukan sebuah nama atribut valid"
 
+#: attr.c
+msgid "unable to add additional attribute"
+msgstr "Tidak dapat menambahkan atribut tambahan"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "mengabaikan baris atribut ke-%d yang terlalu panjang"
+
 #: attr.c
 #, c-format
 msgid "%s not allowed: %s:%d"
@@ -1748,6 +1756,21 @@ msgstr ""
 "Pola negatif diabaikan di atribut git\n"
 "Gunakan '\\!' untuk tanda seru awal literal."
 
+#: attr.c
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "tidak dapat menulis berkas gitattributes '%s'"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "mengabaikan berkas gitattributes yang terlalu besar '%s'"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "mengabaikan blob gitattributes '%s' yang terlalu besar"
+
 #: bisect.c
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
@@ -1881,8 +1904,8 @@ msgstr ""
 "--reverse dan --first-parent bersama-sama butuh komit terbaru yang disebutkan"
 
 #: blame.c builtin/commit.c builtin/log.c builtin/merge.c
-#: builtin/pack-objects.c builtin/shortlog.c bundle.c midx.c pack-bitmap.c
-#: ref-filter.c remote.c sequencer.c submodule.c
+#: builtin/pack-objects.c builtin/shortlog.c midx.c pack-bitmap.c ref-filter.c
+#: remote.c sequencer.c submodule.c
 msgid "revision walk setup failed"
 msgstr "persiapan jalan revisi gagal"
 
@@ -2072,11 +2095,11 @@ msgstr "submodul '%s': tidak dapat menemukan submodul"
 #: branch.c
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
-"Anda dapat mencoba memperbarui submodul dengan 'git checkout %s && git "
-"submodule update --init'"
+"Anda dapat mencoba memperbarui submodul dengan 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 
 #: branch.c
 #, c-format
@@ -2120,6 +2143,14 @@ msgstr "hapus '%s'\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "Perubahan tak tergelar setelah menyegarkan indeks:"
 
+#: builtin/add.c
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"setelan add.interactive.useBuiltin sudah dihapus!\n"
+"Selengkapnya lihat entrinya di 'git help config'."
+
 #: builtin/add.c builtin/rev-parse.c
 msgid "Could not read the index"
 msgstr "Tidak dapat membaca indeks"
@@ -2590,7 +2621,7 @@ msgstr ""
 "Sepertinya Anda telah memindahkan HEAD sejak kegagalan 'am' terakhir.\n"
 "Tidak memutar ulang ke ORIG_HEAD"
 
-#: builtin/am.c builtin/bisect--helper.c worktree.c
+#: builtin/am.c builtin/bisect.c worktree.c
 #, c-format
 msgid "failed to read '%s'"
 msgstr "gagal membaca '%s'"
@@ -2612,6 +2643,10 @@ msgstr "git am [<opsi>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "jalankan secara interaktif"
 
+#: builtin/am.c
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "lewati kail pre-applypatch dan applypatch-msg"
+
 #: builtin/am.c
 msgid "historical option -- no-op"
 msgstr "opsi bersejarah -- no-op"
@@ -2803,112 +2838,106 @@ msgstr "git archive: kesalahan protokol"
 msgid "git archive: expected a flush"
 msgstr "git archive: sebuah bilasan diharapkan"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<komit>]"
-
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<istilah> --term-{old,"
-"good}=<istilah>] [--no-checkout] [--first-parent] [<jelek> [<bagus>...]] "
-"[--] [<jalur>...]"
+"git bisect start [--term-{new,bad}=<istilah> --term-{old, good}=<istilah>] "
+"[--no-checkout] [--first-parent] [<jelek> [<bagus>...]] [--] [<jalur>...]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<revisi>]"
+#: builtin/bisect.c
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<revisi>...]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<revisi>...]"
+#: builtin/bisect.c
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<revisi>|<rentang>)...]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <nama berkas>"
+#: builtin/bisect.c
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<komit>]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<revisi>|<rentang>)...]"
+#: builtin/bisect.c
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <berkas log>"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <perintah>..."
+#: builtin/bisect.c
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <perintah>..."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
 msgstr "tidak dapat membuka berkas '%s' dalam mode '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "could not write to file '%s'"
 msgstr "tidak dapat menulis ke berkas '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot open file '%s' for reading"
 msgstr "tidak dapat membuka berkas '%s' untuk dibaca"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s' is not a valid term"
 msgstr "'%s' bukan istilah yang valid"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "can't use the builtin command '%s' as a term"
 msgstr "tidak dapat menggunakan perintah bawaan '%s' sebagai istilah"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "can't change the meaning of the term '%s'"
 msgstr "tidak dapat mengubah makna istilah '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "please use two different terms"
 msgstr "mohon gunakan dua istilah yang berbeda"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "We are not bisecting.\n"
 msgstr "Kami tidak sedang membagi dua.\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s' is not a valid commit"
 msgstr "'%s' bukan sebuah komit yang valid"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "could not check out original HEAD '%s'. Try 'git bisect reset <commit>'."
 msgstr ""
 "tidak dapat men-checkout HEAD asli '%s'. Coba 'git bisect reset <komit>'."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Bad bisect_write argument: %s"
 msgstr "argument bisect_write jelek: %s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "couldn't get the oid of the rev '%s'"
 msgstr "tidak dapat mendapatkan oid revisi '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "couldn't open the file '%s'"
 msgstr "tidak dapat membuka berkas '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Invalid command: you're currently in a %s/%s bisect"
 msgstr "Perintah tidak valid: sekarang Anda berada dalam pembagian dua %s/%s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "You need to give me at least one %s and %s revision.\n"
@@ -2917,7 +2946,7 @@ msgstr ""
 "Anda perlu berikan saya setidaknya satu revisi %s dan %s.\n"
 "Untuk itu Anda dapat menggunakan \"git bisect %s\" dan \"git bisect %s\"."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "You need to start by \"git bisect start\".\n"
@@ -2928,7 +2957,7 @@ msgstr ""
 "Lalu Anda perlu berikan saya setidaknya satu revisi %s dan %s.\n"
 "Untuk itu Anda dapat menggunakan \"git bisect %s\" dan \"git bisect %s\"."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "bisecting only with a %s commit"
 msgstr "membagi dua hanya dengan sebuah komit %s"
@@ -2937,30 +2966,30 @@ msgstr "membagi dua hanya dengan sebuah komit %s"
 #. translation. The program will only accept English input
 #. at this point.
 #.
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "Are you sure [Y/n]? "
 msgstr "Anda yakin [Y/n]?"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "status: waiting for both good and bad commits\n"
 msgstr "status: menunggu komit bagus dan jelek\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "status: waiting for bad commit, %d good commit known\n"
 msgid_plural "status: waiting for bad commit, %d good commits known\n"
 msgstr[0] "status: menunggu komit jelek, %d komit bagus diketahui\n"
 msgstr[1] "status: menunggu komit jelek, %d komit bagus diketahui\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "status: waiting for good commit(s), bad commit known\n"
 msgstr "status: menunggu komit bagus, komit jelek diketahui\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "no terms defined"
 msgstr "tidak ada istilah yang didefinisikan"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "Your current terms are %s for the old state\n"
@@ -2969,7 +2998,7 @@ msgstr ""
 "Istilah Anda saat ini adalah %s untuk keadaan lama\n"
 "dan %s untuk keadaan baru.\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "invalid argument %s for 'git bisect terms'.\n"
@@ -2978,52 +3007,48 @@ msgstr ""
 "argumen %s tidak valid untuk 'git bisect terms'.\n"
 "Opsi yang didukung adalah: --term-good|--term-old dan --term-bad|--term-new."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "revision walk setup failed\n"
 msgstr "setup jalan revisi gagal\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "could not open '%s' for appending"
 msgstr "tidak dapat membuka '%s' untuk menambahkan"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "'' is not a valid term"
 msgstr "'' bukan istilah yang valid"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "unrecognized option: '%s'"
 msgstr "opsi tidak dikenal: '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s' does not appear to be a valid revision"
 msgstr "'%s' sepertinya bukan revisi valid"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bad HEAD - I need a HEAD"
 msgstr "HEAD jelek - saya butuh HEAD"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
 msgstr "gagal men-checkout '%s'. Coba 'git bisect start <cabang valid>'."
 
-#: builtin/bisect--helper.c
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "tidak akan membagi dua pada pohon yang di-cg-seek"
-
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bad HEAD - strange symbolic ref"
 msgstr "HEAD jelek - referensi simbolik aneh"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "invalid ref: '%s'"
 msgstr "referensi tidak valid: '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "You need to start by \"git bisect start\"\n"
 msgstr "Anda perlu memulai dengan \"git bisect start\"\n"
 
@@ -3031,115 +3056,122 @@ msgstr "Anda perlu memulai dengan \"git bisect start\"\n"
 #. translation. The program will only accept English input
 #. at this point.
 #.
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "Do you want me to do it for you [Y/n]? "
 msgstr "Anda ingin saya melakukannya untuk Anda [Y/n]"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "Please call `--bisect-state` with at least one argument"
 msgstr "Mohon panggil `--bisect-state` dengan setidaknya satu argumen"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'git bisect %s' can take only one argument."
 msgstr "'git bisect %s' hanya dapat mengambil satu argumen."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Bad rev input: %s"
 msgstr "Masukan revisi jelek: %s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Bad rev input (not a commit): %s"
 msgstr "Masukan revisi jelek (bukan sebuah komit): %s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "We are not bisecting."
 msgstr "Kami tidak sedang membagi dua."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s'?? what are you talking about?"
 msgstr "'%s'?? Anda bilang tentang apa?"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot read file '%s' for replaying"
 msgstr "tidak dapat membuka berkas '%s' untuk memainkan ulang"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "running %s\n"
 msgstr "menjalankan %s\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bisect run failed: no command provided."
 msgstr "bisect run gagal: tidak ada perintah yang diberikan"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
-msgid "unable to verify '%s' on good revision"
-msgstr "tidak dapat memverifikasi '%s' pada revisi bagus"
+msgid "unable to verify %s on good revision"
+msgstr "tidak dapat memverifikasi %s pada revisi bagus"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "bogus exit code %d for good revision"
 msgstr "kode keluar gadungan %d untuk revisi bagu"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
-msgstr "bisect run gagal: kode keluar %d dari '%s' < 0 atau >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
+msgstr "bisect run gagal: kode keluar %d dari %s < 0 atau >= 128"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot open file '%s' for writing"
 msgstr "tidak dapat membuka berkas '%s' untuk ditulis"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bisect run cannot continue any more"
 msgstr "bisect run tidak dapat dilanjutkan lagi"
 
-#: builtin/bisect--helper.c
-#, c-format
+#: builtin/bisect.c
 msgid "bisect run success"
 msgstr "bisect run sukses"
 
-#: builtin/bisect--helper.c
-#, c-format
+#: builtin/bisect.c
 msgid "bisect found first bad commit"
 msgstr "pembagian dua menemukan komit jelek pertama"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
-msgstr ""
-"bisect run gagal: 'git bisect--helper --bisect-state %s' keluar dengan kode "
-"keluar %d"
-
-#: builtin/bisect--helper.c
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset butuh baik tanpa argumen atau sebuah komit"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
+msgstr "bisect run gagal: 'git bisect %s' keluar dengan kode keluar %d"
 
-#: builtin/bisect--helper.c
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms butuh 0 atau 1 argumen"
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "'%s' perlu baik tanpa argumen atau sebuah komit"
 
-#: builtin/bisect--helper.c
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next butuh 0 argumen"
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "%s perlu sebuah argumen"
 
-#: builtin/bisect--helper.c
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log butuh 0 argumen"
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "'%s' butuh tanpa argumen"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "no logfile given"
 msgstr "tidak ada berkas log yang diberikan"
 
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "'%s' gagal: tidak ada perintah yang diberikan."
+
+#: builtin/bisect.c
+msgid "need a command"
+msgstr "butuh sebuah perintah"
+
+#: builtin/bisect.c builtin/cat-file.c
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "perintah tidak dikenal: '%s'"
+
 #: builtin/blame.c
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<opsi>] [<opsi revisi>] [<revisi>] [--] <berkas>"
@@ -3860,6 +3892,10 @@ msgstr "git bundle list-heads <berkas> [<nama referensi>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <berkas> [<nama referensi>...]"
 
+#: builtin/bundle.c
+msgid "need a <file> argument"
+msgstr "butuh sebuah argumen <berkas>"
+
 #: builtin/bundle.c builtin/pack-objects.c
 msgid "do not show progress meter"
 msgstr "jangan perlihatkan meteran perkembangan"
@@ -3929,11 +3965,6 @@ msgstr "%s butuh sebuah argumen"
 msgid "%s takes no arguments"
 msgstr "%s tidak mengambil argumen"
 
-#: builtin/cat-file.c
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "perintah tidak dikenal: '%s'"
-
 #: builtin/cat-file.c
 msgid "only one batch option may be specified"
 msgstr "hanya satu opsi setumpuk yang mungkin disebutkan"
@@ -4109,12 +4140,19 @@ msgstr ""
 "hanya dua argumen yang diperbolehkan di dalam mode <tipe> <objek>, bukan %d"
 
 #: builtin/check-attr.c
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <atribut>...] [--] <nama jalur>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [source <mirip-pohon> [-a | --all | <atribut>...] [--] <nama "
+"jalur>..."
 
 #: builtin/check-attr.c
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <attribut>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <mirip-pohon>] [-a | --all | "
+"<attribut>...]"
 
 #: builtin/check-attr.c
 msgid "report all attributes set on file"
@@ -4132,6 +4170,14 @@ msgstr "baca nama berkas dari masukan standar"
 msgid "terminate input and output records by a NUL character"
 msgstr "akhiri masukan dan keluarkan rekaman oleh sebuah karakter NUL"
 
+#: builtin/check-attr.c
+msgid "<tree-ish>"
+msgstr "<mirip-pohon>"
+
+#: builtin/check-attr.c
+msgid "which tree-ish to check attributes at"
+msgstr "mirip-pohon mana yang diperiksa atributnya"
+
 #: builtin/check-ignore.c builtin/checkout.c builtin/gc.c builtin/worktree.c
 msgid "suppress progress reporting"
 msgstr "padamkan pelaporan kemajuan"
@@ -4813,7 +4859,7 @@ msgstr "Menolak menghapus direktori kerja saat ini\n"
 msgid "Would refuse to remove current working directory\n"
 msgstr "Akan menolak menghapus direktori kerja saat ini\n"
 
-#: builtin/clean.c git-add--interactive.perl
+#: builtin/clean.c
 #, c-format
 msgid ""
 "Prompt help:\n"
@@ -4826,7 +4872,7 @@ msgstr ""
 "foo        - pilih item berdasarkan prefiks unik\n"
 "           - (kosong) tidak pilih apa-apa\n"
 
-#: builtin/clean.c git-add--interactive.perl
+#: builtin/clean.c
 #, c-format
 msgid ""
 "Prompt help:\n"
@@ -4847,8 +4893,8 @@ msgstr ""
 "*          - pilih semua item\n"
 "           - (kosong) selesai memilih\n"
 
-#: builtin/clean.c git-add--interactive.perl
-#, c-format, perl-format
+#: builtin/clean.c
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Huh (%s)?\n"
 
@@ -5039,10 +5085,6 @@ msgstr "kedalaman"
 msgid "create a shallow clone of that depth"
 msgstr "buat klon dangkal sedalam kedalaman tersebut"
 
-#: builtin/clone.c builtin/fetch.c builtin/pack-objects.c builtin/pull.c
-msgid "time"
-msgstr "waktu"
-
 #: builtin/clone.c
 msgid "create a shallow clone since a specific time"
 msgstr "buat klon dangkal sejak waktu yang disebutkan"
@@ -5337,6 +5379,10 @@ msgstr "gagal menginisialisasi repo, melewatkan URI bundel"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "gagal mengambil objek dari URI bundel '%s'"
 
+#: builtin/clone.c
+msgid "failed to fetch advertised bundles"
+msgstr "gagal mengambil bundel yang diiklankan"
+
 #: builtin/clone.c
 msgid "remote transport reported error"
 msgstr "transportasi remote melaporkan kesalahan"
@@ -5714,7 +5760,7 @@ msgstr ""
 "tidak dapat memilih karakter komentar yang tidak terpakai\n"
 "dalam pesan komit saat ini"
 
-#: builtin/commit.c
+#: builtin/commit.c builtin/merge-tree.c
 #, c-format
 msgid "could not lookup commit %s"
 msgstr "tidak dapat mencari komit %s"
@@ -6022,7 +6068,7 @@ msgstr "tangal"
 msgid "override date for commit"
 msgstr "timpa tanggal komit"
 
-#: builtin/commit.c parse-options.h ref-filter.h
+#: builtin/commit.c builtin/merge-tree.c parse-options.h ref-filter.h
 msgid "commit"
 msgstr "komit"
 
@@ -6176,7 +6222,7 @@ msgstr ""
 msgid "git config [<options>]"
 msgstr "git config [<opsi>]"
 
-#: builtin/config.c builtin/env--helper.c
+#: builtin/config.c
 #, c-format
 msgid "unrecognized --type argument, %s"
 msgstr "argumen --type tidak dikenal %s"
@@ -6285,11 +6331,11 @@ msgstr "temukan setelan warna: slot [stdout-is-tty]"
 msgid "Type"
 msgstr "Tipe"
 
-#: builtin/config.c builtin/env--helper.c builtin/hash-object.c
+#: builtin/config.c builtin/hash-object.c
 msgid "type"
 msgstr "tipe"
 
-#: builtin/config.c builtin/env--helper.c
+#: builtin/config.c
 msgid "value is given this type"
 msgstr "Nilai diberikan tipe ini"
 
@@ -6344,7 +6390,7 @@ msgstr ""
 "perlihatkan cakupan konfigurasi (pohon kerja, lokal, global, sistem, "
 "perintah)"
 
-#: builtin/config.c builtin/env--helper.c
+#: builtin/config.c
 msgid "value"
 msgstr "nilai"
 
@@ -6887,34 +6933,6 @@ msgstr "tidak ada <alat> yang diberikan untuk --tool=<alat>"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "tidak ada <perintah> yang diberikan untuk --extcmd=<perintah>"
 
-#: builtin/env--helper.c
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <opsi> <variabel lingkungan>"
-
-#: builtin/env--helper.c
-msgid "default for git_env_*(...) to fall back on"
-msgstr "asali untuk git_env_*(...) agar kembali"
-
-#: builtin/env--helper.c
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr "jadi diam; hanya gunakan nilai git_env_*() sebagai kode keluar"
-
-#: builtin/env--helper.c
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-"opsi `--default' mengharapkan sebuah nilai boolean dengan `--type=bool`, "
-"bukan `%s`"
-
-#: builtin/env--helper.c
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not `"
-"%s`"
-msgstr ""
-"opsi `--default' mengharapkan sebuah nilai unsigned long dengan `--"
-"type=ulong`, bukan `%s`"
-
 #: builtin/fast-export.c
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<opsi rev-list>]"
@@ -7422,6 +7440,11 @@ msgstr "kedalaman negatif pada --deepen tidak didukung"
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "--unshallow pada repositori penuh tidak masuk akal"
 
+#: builtin/fetch.c
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "gagal mengambil bundel dari '%s'"
+
 #: builtin/fetch.c
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all tidak mengambil argumen repositori"
@@ -8730,13 +8753,21 @@ msgid "'git help config' for more information"
 msgstr "'git help config' untuk informasi lebih lanjut"
 
 #: builtin/hook.c
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] <nama kait> [-- <argumen kait>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=<jalur>] <nama kait> [-- "
+"<argumen kait>]"
 
 #: builtin/hook.c
 msgid "silently ignore missing requested <hook-name>"
 msgstr "diam-diam abaikan <nama kait> yang diminta yang hilang"
 
+#: builtin/hook.c
+msgid "file to read into hooks' stdin"
+msgstr "gagal membaca masukan standar kait"
+
 #: builtin/index-pack.c
 #, c-format
 msgid "object type mismatch at %s"
@@ -9799,11 +9830,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<kunci>]\n"
-"              [--symref] [<repositori> [<referensi>...]]"
+"              [--symref] [<repositori> [<pola>...]]"
 
 #: builtin/ls-remote.c
 msgid "do not print remote URL"
@@ -10125,10 +10156,18 @@ msgstr "perbolehkan penggabungan riwayat yang tak terkait"
 msgid "perform multiple merges, one per line of input"
 msgstr "lakukan banyak penggabungan, satu per baris masukan"
 
+#: builtin/merge-tree.c
+msgid "specify a merge-base for the merge"
+msgstr "harus menyebutkan sebuah dasar penggabungan untuk penggabungan"
+
 #: builtin/merge-tree.c
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge tidak kompatibel dengan semua opsi lainnya"
 
+#: builtin/merge-tree.c
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base tidak kompatibel dengan --stdin"
+
 #: builtin/merge-tree.c builtin/notes.c
 #, c-format
 msgid "malformed input line: '%s'."
@@ -12207,7 +12246,7 @@ msgstr "minta transaksi atomik pada sisi remote"
 msgid "--delete doesn't make sense without any refs"
 msgstr "--delete tidak masuk akal tanpa referensi"
 
-#: builtin/push.c
+#: builtin/push.c t/helper/test-bundle-uri.c
 #, c-format
 msgid "bad repository '%s'"
 msgstr "repositori jelek '%s'"
@@ -12484,6 +12523,10 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "tidak dapat mengganti ke %s"
 
+#: builtin/rebase.c
+msgid "apply options and merge options cannot be used together"
+msgstr "opsi apply dan opsi merge tidak dapat digunakan bersamaan"
+
 #: builtin/rebase.c
 #, c-format
 msgid ""
@@ -12769,8 +12812,20 @@ msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy butuh --merge atau --interactive"
 
 #: builtin/rebase.c
-msgid "apply options and merge options cannot be used together"
-msgstr "opsi apply dan opsi merge tidak dapat digunakan bersamaan"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
+msgstr ""
+"opsi penerapan tidak kompatibel dengan rebase.autosquash. "
+"Pertimbangkanmenambahkan --no-autosquash"
+
+#: builtin/rebase.c
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"opsi penerapan tidak kompatibel dengan rebase.updateRefs. "
+"Pertimbangkanmenambahkan --no-update-refs"
 
 #: builtin/rebase.c
 #, c-format
@@ -15878,11 +15933,6 @@ msgstr "'%s' bukan nama submodul yang valid"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <nama>"
 
-#: builtin/submodule--helper.c git.c
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s tidak mendukung --super-prefix"
-
 #: builtin/symbolic-ref.c
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <alasan>] <nama> <referensi>"
@@ -16803,6 +16853,11 @@ msgstr "hanya berguna untuk penirkutuan"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch tidak didukung pada platform ini"
 
+#: bundle-uri.c
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "tidak dapat mengurai kunci daftar bundel %s dengan nilai '%s'"
+
 #: bundle-uri.c
 #, c-format
 msgid "bundle list at '%s' has no mode"
@@ -16816,6 +16871,15 @@ msgstr "tidak dapat membuat berkas sementara"
 msgid "insufficient capabilities"
 msgstr "tidak cukup kemampuan"
 
+#: bundle-uri.c
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "berkas yang diunduh dari '%s' bukan sebuah bundel"
+
+#: bundle-uri.c
+msgid "failed to store maximum creation token"
+msgstr "gagal menyimpan token pembuatan maksimum"
+
 #: bundle-uri.c
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
@@ -16836,6 +16900,15 @@ msgstr "gagal mengunduh bundel dari URI '%s'"
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "berkas pada URI '%s' bukan sebuah bundel atau daftar bundel"
 
+#: bundle-uri.c
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: argumen tidak diharapkan: '%s'"
+
+#: bundle-uri.c
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: bilasan diharapkan setelah argumen"
+
 #: bundle-uri.c
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri: dapat satu baris kosong"
@@ -16876,6 +16949,14 @@ msgstr "Repositori kekurangan komit prasyarat berikut:"
 msgid "need a repository to verify a bundle"
 msgstr "perlu sebuah repositori untuk verifikasi bundel"
 
+#: bundle.c
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"beberapa komit prasyarat ada pada penyimpanan objek, tetapi tidak terhubung "
+"ke riwayat repositori"
+
 #: bundle.c
 #, c-format
 msgid "The bundle contains this ref:"
@@ -18673,17 +18754,26 @@ msgstr "format objek tidak dikenal '%s' disebutkan oleh peladen"
 
 #: connect.c
 #, c-format
-msgid "invalid ls-refs response: %s"
-msgstr "jawaban ls-refs tidak valid: %s"
+msgid "error on bundle-uri response line %d: %s"
+msgstr "kesalahan pada baris tanggapan bundle-uri ke-%d: %s"
 
 #: connect.c
-msgid "expected flush after ref listing"
-msgstr "bilasan diharapkan setelah penyebutan referensi"
+msgid "expected flush after bundle-uri listing"
+msgstr "bilasan diharapkan setelah pendaftaran bundle-uri"
 
 #: connect.c
 msgid "expected response end packet after ref listing"
 msgstr "jawaban akhir paket diharapkan setelah penyebutan referensi"
 
+#: connect.c
+#, c-format
+msgid "invalid ls-refs response: %s"
+msgstr "jawaban ls-refs tidak valid: %s"
+
+#: connect.c
+msgid "expected flush after ref listing"
+msgstr "bilasan diharapkan setelah penyebutan referensi"
+
 #: connect.c
 #, c-format
 msgid "protocol '%s' is not supported"
@@ -20134,16 +20224,14 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
 "git [-v| --version] [-h | --help] [-C <jalur>] [-c <nama>=<nilai>]\n"
 "           [--exec-path[=<jalur>]] [--html-path] [--man-path] [--info-path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<jalur>] [--work-tree=<jalur>] [--namespace=<nama>]\n"
-"           [--super-prefix=<jalur>] [--config-env=<nama>=<variabel "
-"lingkungan>]\n"
+"           [--config-env=<nama>=<variabel lingkungan>]\n"
 "           <perintah> [<argumen>]"
 
 #: git.c
@@ -20173,11 +20261,6 @@ msgstr "tidak ada direktori yang diberikan untuk opsi '%s'\n"
 msgid "no namespace given for --namespace\n"
 msgstr "tidak ada ruang nama yang diberikan untuk --namespace\n"
 
-#: git.c
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "tidak ada prefiks yang diberikan untuk --super-prefix\n"
-
 #: git.c
 #, c-format
 msgid "-c expects a configuration string\n"
@@ -20316,8 +20399,13 @@ msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand gagal: %s %s"
 
 #: gpg-interface.c
-msgid "gpg failed to sign the data"
-msgstr "gpg gagal menandatangani data"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg gagal menandatangani data:\n"
+"%s"
 
 #: gpg-interface.c
 msgid "user.signingKey needs to be set for ssh signing"
@@ -21704,6 +21792,11 @@ msgstr "objek longgar '%s' rusak"
 msgid "garbage at end of loose object '%s'"
 msgstr "sampah pada ujung berkas objek '%s'"
 
+#: object-file.c
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "tidak dapat membuka objek longgar %s"
+
 #: object-file.c
 #, c-format
 msgid "unable to parse %s header"
@@ -21725,19 +21818,14 @@ msgstr "kepala untuk %s terlalu panjang, melebihi %d bita"
 
 #: object-file.c
 #, c-format
-msgid "failed to read object %s"
-msgstr "gagal membaca objek %s"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "objek longgar %s (disimpan di %s) rusak"
 
 #: object-file.c
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "pengganti %s tidak ditemukan untuk %s"
 
-#: object-file.c
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "objek longgar %s (disimpan di %s) rusak"
-
 #: object-file.c
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
@@ -21753,10 +21841,6 @@ msgstr "tidak dapat menulis berkas %s"
 msgid "unable to set permission to '%s'"
 msgstr "tidak dapat menyetel perizinan ke '%s'"
 
-#: object-file.c
-msgid "file write error"
-msgstr "kesalahan menulis berkas"
-
 #: object-file.c
 msgid "error when closing loose object file"
 msgstr "kesalahan saat menutup berkas objek longgar"
@@ -21817,12 +21901,13 @@ msgid "cannot read object for %s"
 msgstr "tidak dapat membaca objek untuk %s"
 
 #: object-file.c
-msgid "corrupt commit"
-msgstr "komit rusak"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "fsck objek gagal: %s"
 
 #: object-file.c
-msgid "corrupt tag"
-msgstr "tag rusak"
+msgid "refusing to create malformed object"
+msgstr "menolak membuat objek jelek"
 
 #: object-file.c
 #, c-format
@@ -22136,11 +22221,6 @@ msgstr "offset XOR tidak valid di indeks pak bitmap"
 msgid "cannot fstat bitmap file"
 msgstr "tidak dapat fstat berkas bitmap"
 
-#: pack-bitmap.c
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "mengabaikan berkas bitmap tambahan: '%s'"
-
 #: pack-bitmap.c
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "checksum tidak cocok di MIDX dan bitmap"
@@ -22468,6 +22548,10 @@ msgstr "jadi lebih dian"
 msgid "use <n> digits to display object names"
 msgstr "gunakan <n> digit untuk menampilkan nama objek"
 
+#: parse-options.h
+msgid "prefixed path to initial superproject"
+msgstr "jalur terprefiks ke superproyek awal"
+
 #: parse-options.h
 msgid "how to strip spaces and #comments from message"
 msgstr "bagaimana cara mengupas spasi dan #komentar dari pesan"
@@ -23069,6 +23153,16 @@ msgstr "di belakang %d"
 msgid "ahead %d, behind %d"
 msgstr "di depan %d, di belakang %d"
 
+#: ref-filter.c
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) tidak mengambil argumen"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "argumen %%(%.*s) tidak dikenal: %s"
+
 #: ref-filter.c
 #, c-format
 msgid "expected format: %%(color:<color>)"
@@ -23089,26 +23183,6 @@ msgstr "Nilai bilangan bulat diharapkan refname:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "Nilai bilangan bulat diharapkan refname:rstrip=%s"
 
-#: ref-filter.c
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "argumen %%(%s) tidak dikenal: %s"
-
-#: ref-filter.c
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) tidak mengambil argumen"
-
-#: ref-filter.c
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) tidak mengambil argumen"
-
-#: ref-filter.c
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) tidak mengambil argumen"
-
 #: ref-filter.c
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
@@ -23129,11 +23203,6 @@ msgstr "nilai positif diharapkan contents:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "nilai positif '%s' diharapkan di %%(%s)"
 
-#: ref-filter.c
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "opsi surel tidak dikenal: %s"
-
 #: ref-filter.c
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
@@ -23151,13 +23220,13 @@ msgstr "lebar tidak dikenal: %s"
 
 #: ref-filter.c
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "lebar positif diharapkan dengan atom %%(align)"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "argumen %%(%s) tidak dikenal: %s"
 
 #: ref-filter.c
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) tidak mengambil argumen"
+msgid "positive width expected with the %%(align) atom"
+msgstr "lebar positif diharapkan dengan atom %%(align)"
 
 #: ref-filter.c
 #, c-format
@@ -24685,6 +24754,28 @@ msgstr "git %s: gagal membaca indeks"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s: gagal menyegarkan indeks"
 
+#: sequencer.c
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "'%s' bukan label valid"
+
+#: sequencer.c
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "'%s' bukan nama referensi valid"
+
+#: sequencer.c
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+"update-ref memerlukan nama referensi terkualifikasi penuh, misalnya refs/"
+"heads/%s"
+
+#: sequencer.c
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "perintah tidak valid '%.*s'"
+
 #: sequencer.c
 #, c-format
 msgid "%s does not accept arguments: '%s'"
@@ -25660,6 +25751,19 @@ msgstr "ls-tree kembalikan kode kembali %d yang tak diharapkan"
 msgid "failed to lstat '%s'"
 msgstr "gagal men-lstat '%s'"
 
+#: t/helper/test-bundle-uri.c
+msgid "no remote configured to get bundle URIs from"
+msgstr "tidak ada remote yang dikonfigurasi untuk mendapatkan URI bundel"
+
+#: t/helper/test-bundle-uri.c
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "remote '%s' tidak punya URL terkonfigurasi"
+
+#: t/helper/test-bundle-uri.c
+msgid "could not get the bundle-uri list"
+msgstr "tidak dapat mendapatkan daftar bundle-uri"
+
 #: t/helper/test-cache-tree.c
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <opsi> (control|prime|update)"
@@ -26101,6 +26205,14 @@ msgstr "Membatalkan."
 msgid "failed to push all needed submodules"
 msgstr "gagal mendorong semua submodul yang dibutuhkan"
 
+#: transport.c
+msgid "bundle-uri operation not supported by protocol"
+msgstr "operasi bundle-uri tidak didukung oleh protokol"
+
+#: transport.c
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr "tidak dapat menerima daftar bundle-uri teriklankan server"
+
 #: tree-walk.c
 msgid "too-short tree object"
 msgstr "objek pohon terlalu pendek"
@@ -27005,13 +27117,22 @@ msgstr "Berkas yang diabaikan"
 #: wt-status.c
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"Butuh %.2f detik untuk menghitung berkas tak terlacak. 'status -uno'\n"
-"mungkin bisa mempercepat, tapi Anda harus berhati-hati jangan sampai lupa\n"
-"untuk tambahkan berkas baru sendiri (lihat 'git help status')."
+"Butuh %.2f detik untuk mengenumerasikan berkas tak terlacak,\n"
+"tapi hasilnya ditembolokkan, dan invokasi berikutnya mungkin\n"
+"lebih cepat."
+
+#: wt-status.c
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "Butuh %.2f detik untuk mengenumerasikan berkas tak terlacak."
+
+#: wt-status.c
+msgid "See 'git help status' for information on how to improve this."
+msgstr ""
+"Lihat 'git help status' untuk informasi bagaimana meningkatkankeadaan ini."
 
 #: wt-status.c
 #, c-format
@@ -27190,241 +27311,6 @@ msgstr "Anda perlu menjalankan perintah ini dari level atas dari pohon kerja."
 msgid "Unable to determine absolute path of git directory"
 msgstr "Tidak dapat menentukan jalur absolut direktori git"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#: git-add--interactive.perl
-#, perl-format
-msgid "%12s %12s %s"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] ""
-msgstr[1] ""
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "The selected hunks do not apply to the index!\n"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "No other hunks to goto\n"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] ""
-msgstr[1] ""
-
-#: git-add--interactive.perl
-msgid "No other hunks to search\n"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "No hunk matches the given pattern\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "No previous hunk\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "No next hunk\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "Sorry, cannot split this hunk\n"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] ""
-msgstr[1] ""
-
-#: git-add--interactive.perl
-msgid "Sorry, cannot edit this hunk\n"
-msgstr ""
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-#: git-add--interactive.perl
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-
-#: git-add--interactive.perl
-msgid "missing --"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr ""
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr ""
-
 #: git-send-email.perl
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr "zona lokal berbeda dari GMT oleh selang non-menit\n"
@@ -27808,147 +27694,3 @@ msgstr "Melewati %s dengan akhiran cadangan '%s'.\n"
 #, perl-format
 msgid "Do you really want to send %s? [y|N]: "
 msgstr "Anda benar-benar ingin mengirim %s? [y|N]: "
-
-#, c-format
-#~ msgid "unable to normalize object directory: %s"
-#~ msgstr "tidak dapat menormalisasikan direktori objek: %s"
-
-#~ msgid "reset the bisection state"
-#~ msgstr "setel ulang keadaan pembagian dua"
-
-#~ msgid "check whether bad or good terms exist"
-#~ msgstr "periksa apakah ada istilah jelek atau bagus"
-
-#~ msgid "print out the bisect terms"
-#~ msgstr "cetak istilah pembagian dua"
-
-#~ msgid "start the bisect session"
-#~ msgstr "mulai sesi pembagian dua"
-
-#~ msgid "find the next bisection commit"
-#~ msgstr "temukan komit pembagian dua berikutnya"
-
-#~ msgid "mark the state of ref (or refs)"
-#~ msgstr "tandai keadaan referensi"
-
-#~ msgid "list the bisection steps so far"
-#~ msgstr "daftar langkah pembagian dua sejauh ini"
-
-#~ msgid "replay the bisection process from the given file"
-#~ msgstr "mainkan ulang proses pembagian dua dari berkas yang diberikan"
-
-#~ msgid "skip some commits for checkout"
-#~ msgstr "lewati beberapa komit untuk checkout"
-
-#~ msgid "visualize the bisection"
-#~ msgstr "visualisasikan pembagian dua"
-
-#~ msgid "use <cmd>... to automatically bisect"
-#~ msgstr "gunakan <cmd>... untuk bagi dua otomatis."
-
-#~ msgid "no log for BISECT_WRITE"
-#~ msgstr "tidak ada log untuk BISECT_WRITE"
-
-#~ msgid "Couldn't look up commit object for HEAD"
-#~ msgstr "Tidak dapat mencari objek komit untuk HEAD"
-
-#~ msgid "git bundle create [<options>] <file> <git-rev-list args>"
-#~ msgstr "git bundle create [<opsi>] <berkas> <argumen git-rev-list>"
-
-#, c-format
-#~ msgid "options '%s' and '%s %s' cannot be used together"
-#~ msgstr "opsi '%s' dan '%s %s' tidak dapat digunakan bersamaan"
-
-#~ msgid "git commit [<options>] [--] <pathspec>..."
-#~ msgstr "git commit [<opsi>] [--] <spek jalur>..."
-
-#~ msgid "git fsck [<options>] [<object>...]"
-#~ msgstr "git fsck [<opsi>] [<objek>...]"
-
-#~ msgid "git fsmonitor--daemon stop"
-#~ msgstr "git fsmonitor--daemon stop"
-
-#~ msgid "git fsmonitor--daemon status"
-#~ msgstr "git fsmonitor--daemon status"
-
-#~ msgid "failed to run 'git config'"
-#~ msgstr "gagal menjalankan 'git config'"
-
-#, c-format
-#~ msgid "could not get 'onto': '%s'"
-#~ msgstr "tidak dapat mendapatkan 'ke': '%s'"
-
-#~ msgid "Could not resolve HEAD to a revision"
-#~ msgstr "Tidak dapat menguraikan HEAD ke sebuah revisi"
-
-#, c-format
-#~ msgid "missing required file: %s"
-#~ msgstr "berkas yang diperlukan hilang: %s"
-
-#~ msgid "git revert [<options>] <commit-ish>..."
-#~ msgstr "git revert [<opsi>] <mirip-komit>..."
-
-#~ msgid "git revert <subcommand>"
-#~ msgstr "git revert <subperintah>"
-
-#~ msgid "git cherry-pick [<options>] <commit-ish>..."
-#~ msgstr "git cherry-pick [<opsi>] <mirip-komit>..."
-
-#~ msgid "git cherry-pick <subcommand>"
-#~ msgstr "git cherry-pick <subperintah>"
-
-#~ msgid "git rm [<options>] [--] <file>..."
-#~ msgstr "git rm [<opsi>] [--] <berkas>..."
-
-#~ msgid "using --group=trailer with stdin is not supported"
-#~ msgstr "mengguanakn --group=trailer dengan stdin tidak didukung"
-
-#~ msgid "git stash show [<options>] [<stash>]"
-#~ msgstr "git stash show [<opsi>] [<stase>]"
-
-#~ msgid "git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]"
-#~ msgstr "git stash ( pop | apply ) [--index] [-q|--quiet] [<stase>]"
-
-#~ msgid ""
-#~ "git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "          [-u|--include-untracked] [-a|--all] [-m|--message <message>]\n"
-#~ "          [--] [<pathspec>...]]"
-#~ msgstr ""
-#~ "git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "          [-u|--include-untracked] [-a|--all] [-m|--message <pesan>]\n"
-#~ "          [--] [<spek jalur>...]"
-
-#~ msgid ""
-#~ "git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "               [-u|--include-untracked] [-a|--all] [<message>]"
-#~ msgstr ""
-#~ "git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-#~ "               [-u|--include-untracked] [-a|--all] [<pesan>]"
-
-#~ msgid "path into the working tree"
-#~ msgstr "jalur ke dalam pohon kerja"
-
-#~ msgid "recurse into submodules"
-#~ msgstr "rekursi ke dalam submodul"
-
-#~ msgid "check if it is safe to write to the .gitmodules file"
-#~ msgstr "periksa apakah itu aman untuk menulis ke berkas .gitmodules"
-
-#~ msgid "unset the config in the .gitmodules file"
-#~ msgstr "batal setel konfigurasi dalam berkas .gitmodules"
-
-#~ msgid "git submodule--helper config --unset <name>"
-#~ msgstr "git submodule--helper config --unset <nama>"
-
-#, c-format
-#~ msgid "'%s' is not a valid submodule--helper subcommand"
-#~ msgstr "'%s' bukan subperintah submodule--helper valid"
-
-#~ msgid "git upload-pack [<options>] <dir>"
-#~ msgstr "git upload-pack [<opsi>] <direktori>"
-
-#~ msgid "git worktree add [<options>] <path> [<commit-ish>]"
-#~ msgstr "git worktree add [<opsi>] <jalur> [<mirip komit>]"
-
-#~ msgid "git worktree lock [<options>] <path>"
-#~ msgstr "git worktree lock [<opsi>] <jalur>"
index 4b5fe17e36ee956514ece525726ac6addc312f41..0ba8585b766d55944805a57753b00a077c6d566f 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,14 +1,14 @@
 # Swedish translations for Git.
-# Copyright (C) 2010-2022 Peter Krefting <peter@softwolves.pp.se>
+# Copyright (C) 2010-2023 Peter Krefting <peter@softwolves.pp.se>
 # This file is distributed under the same license as the Git package.
-# Peter Krefting <peter@softwolves.pp.se>, 2010-2022.
+# Peter Krefting <peter@softwolves.pp.se>, 2010-2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: git 2.39.0\n"
+"Project-Id-Version: git 2.40.0\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-11-29 04:57+0000\n"
-"PO-Revision-Date: 2022-11-29 22:50+0100\n"
+"POT-Creation-Date: 2023-03-02 09:34+0100\n"
+"PO-Revision-Date: 2023-03-02 09:35+0100\n"
 "Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
 "Language: sv\n"
@@ -44,13 +44,13 @@ msgstr "kunde inte köa \"%s\""
 msgid "could not write index"
 msgstr "kunde inte skriva indexet"
 
-#, c-format, perl-format
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "uppdaterade %d sökväg\n"
 msgstr[1] "uppdaterade %d sökvägar\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "observera: %s spåras inte längre.\n"
 
@@ -64,7 +64,7 @@ msgstr "Återställ"
 msgid "Could not parse HEAD^{tree}"
 msgstr "kunde inte tolka HEAD^{tree}"
 
-#, c-format, perl-format
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "återställde %d sökväg\n"
@@ -77,7 +77,7 @@ msgstr "Inga ospårade filer.\n"
 msgid "Add untracked"
 msgstr "Lägg till ospårad"
 
-#, c-format, perl-format
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "lade till %d sökväg\n"
@@ -171,19 +171,19 @@ msgstr "kunde inte uppdatera indexet"
 msgid "Bye.\n"
 msgstr "Hej då.\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Köa ändrat läge [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Köa borttagning [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Köa tillägg [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Köa stycket [y,n,q,a,d%s,?]? "
 
@@ -207,19 +207,19 @@ msgstr ""
 "a - köa stycket och alla följande i filen\n"
 "d - köa inte stycket eller något av de följande i filen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Stash:a ändrat läge [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Stash:a borttagning [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Stash:a tillägg [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Stash:a stycket [y,n,q,a,d%s,?]? "
 
@@ -243,19 +243,19 @@ msgstr ""
 "a - \"stash\":a stycket och alla följande i filen\n"
 "d - \"stash\":a inte stycket eller något av de följande i filen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Ta bort ändrat läge från kön [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Ta bort borttagning från kön [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Ta bort tillägg från kön [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Ta bort stycket från kön [y,n,q,a,d%s,?]? "
 
@@ -279,19 +279,19 @@ msgstr ""
 "a - ta bort stycket och alla följande i filen från kön\n"
 "d - ta inte bort stycket eller något av de följande i filen från kön\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "Applicera ändrat läge på indexet [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Applicera borttagning på indexet [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Applicera tillägg på indexet [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Applicera stycket på indexet [y,n,q,a,d%s,?]? "
 
@@ -315,19 +315,19 @@ msgstr ""
 "a - applicera stycket och alla följande i filen\n"
 "d - applicera inte stycket eller något av de följande i filen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta ändrat läge från arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta borttagning från arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta tillägg från arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta stycket från arbetskatalogen [y,n,q,a,d%s,?]? "
 
@@ -351,19 +351,19 @@ msgstr ""
 "a - förkasta stycket och alla följande i filen\n"
 "d - förkasta inte stycket eller något av de följande i filen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta ändrat läge från indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta borttagning från indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta tillägg från indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Kasta stycket från indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
@@ -380,19 +380,19 @@ msgstr ""
 "a - förkasta stycket och alla följande i filen\n"
 "d - förkasta inte stycket eller något av de följande i filen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera ändrat läge på indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera borttagning på indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera tillägg på indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera stycket på indexet och arbetskatalogen [y,n,q,a,d%s,?]? "
 
@@ -409,19 +409,19 @@ msgstr ""
 "a - applicera stycket och alla följande i filen\n"
 "d - applicera inte stycket eller något av de följande i filen\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera ändrat läge på arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera borttagning på arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera tillägg på arbetskatalogen [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "Applicera stycket på arbetskatalogen [y,n,q,a,d%s,?]? "
 
@@ -497,8 +497,6 @@ msgstr ""
 "Ta bort \"%c\" rader genom att radera dem.\n"
 "Rader som börjar med %c kommer att tas bort.\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -514,20 +512,12 @@ msgstr "kunde inte tolka styckehuvud"
 msgid "'git apply --cached' failed"
 msgstr "\"git apply --cached\" misslyckades"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
@@ -1374,6 +1364,12 @@ msgstr "läs .gitattributes i arbetskatalogen"
 msgid "report archived files on stderr"
 msgstr "rapportera arkiverade filer på standard fel"
 
+msgid "time"
+msgstr "tid"
+
+msgid "set modification time of archive entries"
+msgstr "välj modifieringstid för arkivposter"
+
 msgid "set compression level"
 msgstr "välj komprimeringsgrad"
 
@@ -1414,6 +1410,13 @@ msgstr "Argumentet stöd inte för formatet \"%s\": -%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%-*s är inte ett giltigt namn på attribut"
 
+msgid "unable to add additional attribute"
+msgstr "Kunde inte lägga till ytterligare attribut"
+
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "ignorerar överlång attributrad %d"
+
 #, c-format
 msgid "%s not allowed: %s:%d"
 msgstr "%s inte tillåtet: %s:%d"
@@ -1425,6 +1428,18 @@ msgstr ""
 "Negativa mönster ignoreras i git-attribut\n"
 "Använd '\\!' för att inleda med ett utropstecken."
 
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "kan inte utföra fstat på gitattributes-filen \"%s\""
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "ignorerar allt för stor gitattributes-fil \"%s\""
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "ignorerar allt för stor gitattributes-objekt \"%s\""
+
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
 msgstr "Felaktigt citerat innehåll i filen \"%s\": %s"
@@ -1702,11 +1717,11 @@ msgstr "undermodulen \"%s\": kan inte hitta undermodulen"
 
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
-"Du kan försöka uppdatera undermodulerna med \"git checkout %s && git "
-"submodule update --init\""
+"Du kan försöka uppdatera undermodulerna med \"git checkout --no-recurse-"
+"submodules %s && git submodule update --init\""
 
 #, c-format
 msgid "submodule '%s': cannot create branch '%s'"
@@ -1741,6 +1756,13 @@ msgstr "ta bort \"%s\"\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "Oköade ändringar efter att ha uppdaterat indexet:"
 
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"inställningen add.interactive.useBuiltin har tagits bort!\n"
+"Se dess post i \"git help config\" för detaljer."
+
 msgid "Could not read the index"
 msgstr "Kunde inte läsa indexet"
 
@@ -2125,6 +2147,9 @@ msgstr "git am [<flaggor>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "kör interaktivt"
 
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "förbigå pre-applypatch- och applypatch-msg-krokar"
+
 msgid "historical option -- no-op"
 msgstr "historisk flagga -- no-op"
 
@@ -2265,32 +2290,27 @@ msgstr "git archive: protokollfel"
 msgid "git archive: expected a flush"
 msgstr "git archive: förväntade en tömning (flush)"
 
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<incheckning>]"
-
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<dålig> [<bra>...]] [--] "
-"[<sökvägar>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<dålig> [<bra>...]] [--]    [<sökvägar>...]"
 
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<incheckning>]"
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<incheckning>...]"
 
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<incheckning>...]"
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<incheckning>|<intervall>)...]"
 
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <filnamn>"
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<incheckning>]"
 
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<incheckning>|<intervall>)...]"
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <loggfil>"
 
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <kommando>..."
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <kommando>..."
 
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
@@ -2436,10 +2456,6 @@ msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
 msgstr ""
 "misslyckades checka ut \"%s\". Försök \"git bisect reset <giltig_gren>\"."
 
-# cogito-relaterat
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "kör inte \"bisect\" på träd där \"cg-seek\" använts"
-
 msgid "bad HEAD - strange symbolic ref"
 msgstr "felaktigt HEAD - konstig symbolisk referens"
 
@@ -2491,17 +2507,17 @@ msgid "bisect run failed: no command provided."
 msgstr "bisect-körning misslyckades: inget kommando gavs."
 
 #, c-format
-msgid "unable to verify '%s' on good revision"
-msgstr "kan inte bekräfta \"%s\" på bra revision"
+msgid "unable to verify %s on good revision"
+msgstr "kan inte bekräfta %s på bra revision"
 
 #, c-format
 msgid "bogus exit code %d for good revision"
 msgstr "falsk slutkod %d för bra revision"
 
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
 msgstr ""
-"\"bisect\"-körningen misslyckades: felkod %d från \"%s\" är < 0 eller >= 128"
+"\"bisect\"-körningen misslyckades: felkod %d från %s är < 0 eller >= 128"
 
 #, c-format
 msgid "cannot open file '%s' for writing"
@@ -2510,37 +2526,44 @@ msgstr "kan inte öppna \"%s\" för skrivning"
 msgid "bisect run cannot continue any more"
 msgstr "\"bisect\"-körningen kan inte fortsätta längre"
 
-#, c-format
 msgid "bisect run success"
 msgstr "\"bisect\"-körningen lyckades"
 
-#, c-format
 msgid "bisect found first bad commit"
 msgstr "bisect hittade första trasiga incheckning"
 
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
 msgstr ""
-"\"bisect\"-körningen misslyckades: \"git bisect--helper --bisect-state %s\" "
-"avslutades med felkoden %d"
+"\"bisect\"-körningen misslyckades: \"git bisect %s\" avslutades med felkoden "
+"%d"
 
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset kräver antingen inget argument eller en incheckning"
-
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms kräver noll eller ett argument"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "\"%s\" kräver antingen inget argument eller en incheckning"
 
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next kräver 0 argument"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "\"%s\" kräver noll eller ett argument"
 
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log kräver 0 argument"
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "\"%s\" kräver noll argument"
 
 msgid "no logfile given"
 msgstr "ingen loggfil angiven"
 
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "\"%s\" misslyckades: inget kommando gavs."
+
+msgid "need a command"
+msgstr "behöver ett kommando"
+
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "okänt kommando: \"%s\""
+
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<flaggor>] [<rev-flaggor>] [<rev>] [--] <fil>"
 
@@ -3109,6 +3132,9 @@ msgstr "git bundle list-heads <fil> [<refnamn>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <fil> [<refnamn>...]"
 
+msgid "need a <file> argument"
+msgstr "behöver ett <fil>-argument"
+
 msgid "do not show progress meter"
 msgstr "visa inte förloppsindikator"
 
@@ -3162,10 +3188,6 @@ msgstr "%s kräver ett argument"
 msgid "%s takes no arguments"
 msgstr "%s tar inget argument"
 
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "okänt kommando: \"%s\""
-
 msgid "only one batch option may be specified"
 msgstr "endast en buntflagga kan anges"
 
@@ -3300,11 +3322,17 @@ msgstr "<objekt> krävs med \"-%c\""
 msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "endast två argument krävs i <typ> <objekt>-läge, inte %d"
 
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <attr>...] [--] <sökväg>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <träd:igt>] [-a | --all | <attr>...] [--] "
+"<sökväg>..."
 
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <attr>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <träd:igt>] [-a | --all | <attr>...]"
 
 msgid "report all attributes set on file"
 msgstr "visa alla attribut som satts på filen"
@@ -3318,6 +3346,12 @@ msgstr "läs filnamn från standard in"
 msgid "terminate input and output records by a NUL character"
 msgstr "avsluta in- och utdataposter med NUL-tecken"
 
+msgid "<tree-ish>"
+msgstr "<träd-igt>"
+
+msgid "which tree-ish to check attributes at"
+msgstr "vilken träd-igt att kontrollera attribut på"
+
 msgid "suppress progress reporting"
 msgstr "undertryck förloppsrapportering"
 
@@ -3895,7 +3929,7 @@ msgstr ""
 "*          - välj alla poster\n"
 "           - (tomt) avsluta markering\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Vadå (%s)?\n"
 
@@ -4044,9 +4078,6 @@ msgstr "djup"
 msgid "create a shallow clone of that depth"
 msgstr "skapa en grund klon på detta djup"
 
-msgid "time"
-msgstr "tid"
-
 msgid "create a shallow clone since a specific time"
 msgstr "skapa en grund klon från en angiven tidpunkt"
 
@@ -4273,6 +4304,9 @@ msgstr "misslyckades initiera arkivet, hoppar över bunt-URI"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "misslyckades hämta objekt från bunt-URI \"%s\""
 
+msgid "failed to fetch advertised bundles"
+msgstr "misslyckades hämta annonserade buntar"
+
 msgid "remote transport reported error"
 msgstr "fjärrtransport rapporterade fel"
 
@@ -5507,29 +5541,6 @@ msgstr "inget <verktyg> angavs för --tool=<verktyg>"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "inget <kommando> angavs för --extcmd=<kommando>"
 
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <flaggor> <miljövariabel>"
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr "standard för git_env_*(...) att falla tillbaka på"
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr "var tyst, använd bara git_env_*() som resultatvärde"
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-"flaggan \"--default\" förväntar ett sanningsvärde med \"--type=bool\", inte "
-"\"%s\""
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not `"
-"%s`"
-msgstr ""
-"flaggan \"--default\" förväntar ett teckenlöst långt värde med \"--type=ulong"
-"\", inte \"%s\""
-
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<rev-list-flaggor>]"
 
@@ -5922,6 +5933,10 @@ msgstr "negativa djup stöds inte i --deepen"
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "--unshallow kan inte användas på ett komplett arkiv"
 
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "misslyckades hämta buntar från \"%s\""
+
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all tar inte namnet på ett arkiv som argument"
 
@@ -6945,12 +6960,19 @@ msgstr "användning: %s%s"
 msgid "'git help config' for more information"
 msgstr "\"git help config\" för mer information"
 
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] <krok-namn> [-- <krok-argument>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=<sökväg>] <krok-namn> [-- <krok-"
+"argument>]"
 
 msgid "silently ignore missing requested <hook-name>"
 msgstr "ignorera tyst om önskat <krok-namn> saknas"
 
+msgid "file to read into hooks' stdin"
+msgstr "misslyckades läsa till krokens standard in"
+
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "objekttyp stämmer inte överens vid %s"
@@ -7770,11 +7792,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<nyckel>]\n"
-"              [--symref] [<arkiv> [<referenser>...]]"
+"              [--symref] [<arkiv> [<mönster>...]]"
 
 msgid "do not print remote URL"
 msgstr "visa inte fjärr-URL"
@@ -8018,9 +8040,15 @@ msgstr "tillåt sammanslagning av orelaterade historier"
 msgid "perform multiple merges, one per line of input"
 msgstr "utför flera sammanslagningar, en per indatarad"
 
+msgid "specify a merge-base for the merge"
+msgstr "ange en sammanslagningsbas för sammanslagningen"
+
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge är inkompatibelt med andra flaggor"
 
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base är inkompatibel med --stdin"
+
 #, c-format
 msgid "malformed input line: '%s'."
 msgstr "felaktig indatarad: \"%s\"."
@@ -9896,6 +9924,10 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "kunde inte växla till %s"
 
+msgid "apply options and merge options cannot be used together"
+msgstr ""
+"appliceringsflaggor och sammanslagningsflaggor kan inte användas tillsammans"
+
 #, c-format
 msgid ""
 "unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and \"ask"
@@ -10124,9 +10156,19 @@ msgstr "Okänt läge: %s"
 msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy kräver --merge eller --interactive"
 
-msgid "apply options and merge options cannot be used together"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
 msgstr ""
-"appliceringsflaggor och sammanslagningsflaggor kan inte användas tillsammans"
+"argument för \"apply\" är inkompatibla med rebase.autosquash. Överväg att "
+"lägga till --no-autosquash"
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"argument för \"apply\" är inkompatibla med rebase.updateRefs. Överväg att "
+"lägga till --no-update-refs"
 
 #, c-format
 msgid "Unknown rebase backend: %s"
@@ -12594,10 +12636,6 @@ msgstr "\"%s\" är inte ett giltigt namn på undermodul"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <kommando>"
 
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s stöder inte --super-prefix"
-
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <orsak>] <namn> <ref>"
 
@@ -13327,6 +13365,10 @@ msgstr "endast användbart vid felsökning"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch stöds inte på denna plattform"
 
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "kunde inte tolka listnyckeln %s med värdet \"%s\""
+
 #, c-format
 msgid "bundle list at '%s' has no mode"
 msgstr "buntlistan på \"%s\" har inget läge"
@@ -13337,6 +13379,13 @@ msgstr "misslyckades skapa temporär fil"
 msgid "insufficient capabilities"
 msgstr "otillräckliga kapabiliteter"
 
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "filen hämtad från \"%s\" är inte en bunt"
+
+msgid "failed to store maximum creation token"
+msgstr "misslyckades lagra maximal skaparsymbol"
+
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
 msgstr "okänt buntlägre från URI:en \"%s\""
@@ -13353,6 +13402,13 @@ msgstr "kunde inte hämta bunt från URI:en \"%s\""
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "filen på URI:en \"%s\" är inte en bunt eller buntlista"
 
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: okänt argument: \"%s\""
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: förväntade \"flush\" efter argument"
+
 msgid "bundle-uri: got an empty line"
 msgstr "bunt-uri: fick en tom rad"
 
@@ -13384,6 +13440,13 @@ msgstr "Arkivet saknar dessa nödvändiga incheckningar:"
 msgid "need a repository to verify a bundle"
 msgstr "behöver ett arkiv för att bekräfta en bunt."
 
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"några förutsättande incheckningar finns i objektkatalogen, men är inte "
+"anslutna i arkivets historik"
+
 #, c-format
 msgid "The bundle contains this ref:"
 msgid_plural "The bundle contains these %<PRIuMAX> refs:"
@@ -14788,6 +14851,16 @@ msgstr "protokollfel: förväntade inte \"%s\""
 msgid "unknown object format '%s' specified by server"
 msgstr "okänt objektformat \"%s\" angavs av servern"
 
+#, c-format
+msgid "error on bundle-uri response line %d: %s"
+msgstr "fel på bundle-uri-svar rad %d: %s"
+
+msgid "expected flush after bundle-uri listing"
+msgstr "förväntade \"flush\" efter bundle-uri-listan"
+
+msgid "expected response end packet after ref listing"
+msgstr "förväntade svarsavslutningspaket efter ref-listan"
+
 #, c-format
 msgid "invalid ls-refs response: %s"
 msgstr "ogiltigt svar på ls-refs: %s"
@@ -14795,9 +14868,6 @@ msgstr "ogiltigt svar på ls-refs: %s"
 msgid "expected flush after ref listing"
 msgstr "förväntade \"flush\" efter ref-listan"
 
-msgid "expected response end packet after ref listing"
-msgstr "förväntade svarsavslutningspaket efter ref-listan"
-
 #, c-format
 msgid "protocol '%s' is not supported"
 msgstr "protokollet \"%s\" stöds inte"
@@ -15945,8 +16015,7 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
 "git [-v | --version] [-h |--help] [-C <sökväg>] [-c <namn>=<värde>]\n"
 "           [--exec-path[=<sökväg>]] [--html-path] [--man-path] [--info-"
@@ -15954,8 +16023,7 @@ msgstr ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<sökväg>] [--work-tree=<sökväg>] [--namespace=<namn>]\n"
-"           [--super-prefix=<sökväg>] [--config-env=<namn>=<miljövar>]\n"
-"           <kommando> [<flaggor>]"
+"           [--config-env=<namn>=<miljövar>] <kommando> [<flaggor>]"
 
 msgid ""
 "'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -15980,10 +16048,6 @@ msgstr "ingen katalog angavs för flaggan \"%s\"\n"
 msgid "no namespace given for --namespace\n"
 msgstr "ingen namnrymd angavs för --namespace\n"
 
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "inget prefix angavs för --super-prefix\n"
-
 #, c-format
 msgid "-c expects a configuration string\n"
 msgstr "-c förväntar en konfigurationssträng\n"
@@ -16096,8 +16160,13 @@ msgstr "gpg.ssh.defaultKeyCommand lyckades men gav inga nycklar: %s %s"
 msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand misslyckades: %s %s"
 
-msgid "gpg failed to sign the data"
-msgstr "gpg misslyckades signera data"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg misslyckades signera data:\n"
+"%s"
 
 msgid "user.signingKey needs to be set for ssh signing"
 msgstr "user.signingKey måste anges för ssh-signering"
@@ -17228,6 +17297,10 @@ msgstr "trasigt löst objekt \"%s\""
 msgid "garbage at end of loose object '%s'"
 msgstr "skräp i slutet av löst objekt \"%s\""
 
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "kan inte öppna lösa objekt %s"
+
 #, c-format
 msgid "unable to parse %s header"
 msgstr "kan inte tolka %s-huvud"
@@ -17244,17 +17317,13 @@ msgid "header for %s too long, exceeds %d bytes"
 msgstr "huvudet för %s är för långt, mer än %d byte"
 
 #, c-format
-msgid "failed to read object %s"
-msgstr "misslyckades läsa objektet %s"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "löst objekt %s (lagrat i %s) är trasigt"
 
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "ersättningen %s hittades inte för %s"
 
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "löst objekt %s (lagrat i %s) är trasigt"
-
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
 msgstr "packat objekt %s (lagrat i %s) är trasigt"
@@ -17267,9 +17336,6 @@ msgstr "kunde inte skriva filen %s"
 msgid "unable to set permission to '%s'"
 msgstr "kan inte sätta behörigheten till \"%s\""
 
-msgid "file write error"
-msgstr "fel vid skrivning av fil"
-
 msgid "error when closing loose object file"
 msgstr "fel vid stängning av fil för löst objekt"
 
@@ -17316,11 +17382,12 @@ msgstr "kunde inte skapa katalogen %s"
 msgid "cannot read object for %s"
 msgstr "kan inte läsa objekt för %s"
 
-msgid "corrupt commit"
-msgstr "trasik incheckning"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "objekt klarar inte fsck: %s"
 
-msgid "corrupt tag"
-msgstr "trasig tagg"
+msgid "refusing to create malformed object"
+msgstr "vägrar skapa ett felaktigt format objekt"
 
 #, c-format
 msgid "read error while indexing %s"
@@ -17581,10 +17648,6 @@ msgstr "ogiltigt XOR-offset i bitkarte-packindex"
 msgid "cannot fstat bitmap file"
 msgstr "kan inte utföra \"fstat\" på bitkartefil"
 
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "ignorerar extra bitkartefil: %s"
-
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "checksumman stämmer inte i MIDX och bitkarta"
 
@@ -17849,6 +17912,9 @@ msgstr "var mer tyst"
 msgid "use <n> digits to display object names"
 msgstr "använd <n> siffror för att visa objektnamn"
 
+msgid "prefixed path to initial superproject"
+msgstr "inledande sökväg till start-överprojekt"
+
 msgid "how to strip spaces and #comments from message"
 msgstr "hur blanksteg och #kommentarer ska tas bort från meddelande"
 
@@ -18350,6 +18416,14 @@ msgstr "bakom %d"
 msgid "ahead %d, behind %d"
 msgstr "före %d, bakom %d"
 
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) tar inte argument"
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "okänt %%(%.*s)-argument: %s"
+
 #, c-format
 msgid "expected format: %%(color:<color>)"
 msgstr "förväntat format: %%(color:<color>)"
@@ -18366,22 +18440,6 @@ msgstr "Heltalsvärde förväntades refname:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "Heltalsvärde förväntades refname:rstrip=%s"
 
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "okänt %%(%s)-argument: %s"
-
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) tar inte argument"
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) tar inte argument"
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) tar inte argument"
-
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
 msgstr "förväntade %%(trailers:key=<värde>)"
@@ -18398,10 +18456,6 @@ msgstr "positivt värde förväntat contents:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "positivt värde förväntat \"%s\" i %%(%s)"
 
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "okänd e-postalternativ: %s"
-
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
 msgstr "förväntat format: %%(align:<bredd>,<position>)"
@@ -18415,12 +18469,12 @@ msgid "unrecognized width:%s"
 msgstr "okänd bredd:%s"
 
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "positiv bredd förväntad med atomen %%(align)"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "okänt %%(%s)-argument: %s"
 
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) tar inte argument"
+msgid "positive width expected with the %%(align) atom"
+msgstr "positiv bredd förväntad med atomen %%(align)"
 
 #, c-format
 msgid "malformed field name: %.*s"
@@ -19655,6 +19709,22 @@ msgstr "git %s: misslyckades läsa indexet"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s: misslyckades uppdatera indexet"
 
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "\"%s\" är inte en giltig etikett"
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "\"%s\" är inte ett giltigt referensnamn"
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr "update-ref kräver ett fullständigt referensnamn, t.ex refs/heads/%s"
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "ogiltigt kommando \"%.*s\""
+
 #, c-format
 msgid "%s does not accept arguments: '%s'"
 msgstr "%s tar inte argument: \"%s\""
@@ -20453,6 +20523,16 @@ msgstr "ls-tree returnerade en oväntad returkod %d"
 msgid "failed to lstat '%s'"
 msgstr "misslyckades ta status (lstat) på \"%s\""
 
+msgid "no remote configured to get bundle URIs from"
+msgstr "ingen fjärr att hämta bunt-URI:er från inställd"
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "fjärren \"%s\" har ingen URL konfigurerad"
+
+msgid "could not get the bundle-uri list"
+msgstr "kunde inte hämta bundle-uri-listan"
+
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <flaggor> (control|prime|update)"
 
@@ -20806,6 +20886,12 @@ msgstr "Avbryter."
 msgid "failed to push all needed submodules"
 msgstr "kunde inte sända alla nödvändiga undermoduler"
 
+msgid "bundle-uri operation not supported by protocol"
+msgstr "bundle-uri-funktionen stöds inte av protokollet"
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr "kunde inte hämta bundle-uri-listan som servern annonserade"
+
 msgid "too-short tree object"
 msgstr "trädobjekt för kort"
 
@@ -21540,13 +21626,18 @@ msgstr "Ignorerade filer"
 
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"Det tog %.2f sekunder att räkna upp ospårade filer. \"status -uno\"\n"
-"kan gå snabbare, men du måste vara försiktig så du inte glömmer\n"
-"lägga till nya filer själv (se \"git help status\")."
+"Det tog %.2f sekunder att räkna upp ospårade filer,\n"
+"men resultaten cachelagrades och senare körningar kan bli snabbare."
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "Det tog %.2f sekunder att räkna upp ospårade filer."
+
+msgid "See 'git help status' for information on how to improve this."
+msgstr "Se \"git help status\" för information om hur du kan förbättra detta."
 
 # %s är nästa sträng eller tom.
 #, c-format
@@ -21689,274 +21780,6 @@ msgstr "Du måste köra kommandot från arbetskatalogens toppnivå."
 msgid "Unable to determine absolute path of git directory"
 msgstr "Kunde inte bestämma absolut sökväg till git-katalogen"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%12s %12s %s"
-
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "rörde %d sökväg\n"
-msgstr[1] "rörde %d sökvägar\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Om patchen kan appliceras rent kommer det redigerade stycket att\n"
-"köas omedelbart."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Om patchen kan appliceras rent kommer det redigerade stycket att\n"
-"läggas till i \"stash\" omedelbart."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Om patchen kan appliceras rent kommer det redigerade stycket att\n"
-"tas bort från kön omedelbart."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Om patchen kan appliceras rent kommer det redigerade stycket att\n"
-"markeras för applicering omedelbart."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Om patchen kan appliceras rent kommer det redigerade stycket att\n"
-"markeras för kasta omedelbart."
-
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr "misslyckades öppna styckeredigeringsfil för skrivning: %s"
-
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"---\n"
-"Ta bort \"%s\" rader genom att göra dem \" \"-rader (sammanhang).\n"
-"Ta bort \"%s\" rader genom att radera dem.\n"
-"Rader som börjar med %s kommer att tas bort.\n"
-
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr "misslyckades öppna styckesredigeringsfil för läsning: %s"
-
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - köa stycket\n"
-"n - köa inte stycket\n"
-"q - avsluta; köa inte stycket eller något av de följande\n"
-"a - köa stycket och alla följande i filen\n"
-"d - köa inte stycket eller något av de följande i filen"
-
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y - \"stash\":a stycket\n"
-"n - \"stash\":a inte stycket\n"
-"q - avsluta; \"stash\":a inte stycket eller något av de följande\n"
-"a - \"stash\":a stycket och alla följande i filen\n"
-"d - \"stash\":a inte stycket eller något av de följande i filen"
-
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - ta bort stycket från kön\n"
-"n - ta inte bort stycket från kön\n"
-"q - avsluta; ta inte bort stycket eller något av de följande från kön\n"
-"a - ta bort stycket och alla följande i filen från kön\n"
-"d - ta inte bort stycket eller något av de följande i filen från kön"
-
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - applicera stycket på indexet\n"
-"n - applicera inte stycket på indexet\n"
-"q - avsluta; applicera inte stycket eller något av de följande\n"
-"a - applicera stycket och alla följande i filen\n"
-"d - applicera inte stycket eller något av de följande i filen"
-
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - förkasta stycket från arbetskatalogen\n"
-"n - förkasta inte stycket från arbetskatalogen\n"
-"q - avsluta; förkasta inte stycket eller något av de följande\n"
-"a - förkasta stycket och alla följande i filen\n"
-"d - förkasta inte stycket eller något av de följande i filen"
-
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - förkasta stycket från indexet och arbetskatalogen\n"
-"n - förkasta inte stycket från indexet och arbetskatalogen\n"
-"q - avsluta; förkasta inte stycket eller något av de följande\n"
-"a - förkasta stycket och alla följande i filen\n"
-"d - förkasta inte stycket eller något av de följande i filen"
-
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - applicera stycket på indexet och arbetskatalogen\n"
-"n - applicera inte stycket på indexet och arbetskatalogen\n"
-"q - avsluta; applicera inte stycket eller något av de följande\n"
-"a - applicera stycket och alla följande i filen\n"
-"d - applicera inte stycket eller något av de följande i filen"
-
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - applicera stycket på arbetskatalogen\n"
-"n - applicera inte stycket på arbetskatalogen\n"
-"q - avsluta; applicera inte stycket eller något av de följande\n"
-"a - applicera stycket och alla följande i filen\n"
-"d - applicera inte stycket eller något av de följande i filen"
-
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g - välj ett stycke att gå till\n"
-"/ - sök efter stycke som motsvarar angivet reguljärt uttryck\n"
-"j - lämna stycket obestämt, se nästa obestämda stycke\n"
-"J - lämna stycket obestämt, se nästa stycke\n"
-"k - lämna stycket obestämt, se föregående obestämda stycke\n"
-"K - lämna stycket obestämt, se föregående stycke\n"
-"s - dela aktuellt stycke i mindre styckens\n"
-"e - redigera aktuellt stycke manuellt\n"
-"? - visa hjälp\n"
-
-msgid "The selected hunks do not apply to the index!\n"
-msgstr "Markerade stycken kan inte appliceras på indexet!\n"
-
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "ignorerar ej sammanslagen: %s\n"
-
-msgid "No other hunks to goto\n"
-msgstr "Inga andra stycken att gå till\n"
-
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "Ogiltigt siffervärde: \"%s\"\n"
-
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "Beklagar, det finns bara %d stycke.\n"
-msgstr[1] "Beklagar, det finns bara %d stycken.\n"
-
-msgid "No other hunks to search\n"
-msgstr "Inga andra stycken att söka efter\n"
-
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "Felaktigt format på reguljärt sökuttryck %s: %s\n"
-
-msgid "No hunk matches the given pattern\n"
-msgstr "Inga stycken motsvarar givet mönster\n"
-
-msgid "No previous hunk\n"
-msgstr "Inget föregående stycke\n"
-
-msgid "No next hunk\n"
-msgstr "Inget följande stycke\n"
-
-msgid "Sorry, cannot split this hunk\n"
-msgstr "Beklagar, kan inte dela stycket\n"
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "Dela i %d stycke.\n"
-msgstr[1] "Dela i %d stycken.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "Beklagar, kan inte redigera stycket\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        - visa sökvägar med ändringar\n"
-"update        - lägg arbetskatalogens tillstånd till köade ändringar\n"
-"revert        - återställ köade ändringar till HEAD-versionen\n"
-"patch         - välj och uppdatera valda stycken\n"
-"diff          - visa diff mellan HEAD och index\n"
-"add untracked - lägg till innehåll i ospårade filer till köade ändringar\n"
-
-msgid "missing --"
-msgstr "saknad --"
-
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "okänt läge för --patch: %s"
-
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "felaktigt argument %s, förväntar --"
-
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr "lokal zon skiljer sig från GMT med delar av minuter\n"
 
index 9afdc234b3ec7dbfcfd5226b2cd07076bb7ee5fe..a24a7ae9cb42a8bf1e98e7a6ae3bc5304cef5c10 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,8 +1,8 @@
 # Turkish translations for Git
 # Git Türkçe çevirileri
-# Copyright (C) 2020-2022 Emir SARI <emir_sari@icloud.com>
+# Copyright (C) 2020-2023 Emir SARI <emir_sari@icloud.com>
 # This file is distributed under the same license as the Git package.
-# Emir SARI <emir_sari@icloud.com>, 2020-2022
+# Emir SARI <emir_sari@icloud.com>, 2020-2023
 #
 # ######################################################### #
 #     Git Türkçe kavramlar dizini / Git Turkish Glossary    #
@@ -92,8 +92,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Git Turkish Localization Project\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-12-07 17:32+0300\n"
-"PO-Revision-Date: 2022-12-07 18:00+0300\n"
+"POT-Creation-Date: 2023-03-03 11:32+0300\n"
+"PO-Revision-Date: 2023-03-03 11:40+0300\n"
 "Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
 "Language-Team: Turkish (https://github.com/bitigchi/git-po/)\n"
 "Language: tr\n"
@@ -128,13 +128,13 @@ msgstr "'%s' hazırlanamadı"
 msgid "could not write index"
 msgstr "indeks yazılamadı"
 
-#, c-format, perl-format
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "%d yol güncellendi\n"
 msgstr[1] "%d yol güncellendi\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "not: %s artık izlenmiyor.\n"
 
@@ -148,7 +148,7 @@ msgstr "Geri al"
 msgid "Could not parse HEAD^{tree}"
 msgstr "HEAD^{tree} ayrıştırılamadı"
 
-#, c-format, perl-format
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "%d yol geri alındı\n"
@@ -161,7 +161,7 @@ msgstr "İzlenmeyen dosya yok.\n"
 msgid "Add untracked"
 msgstr "İzlenmeyenleri ekle"
 
-#, c-format, perl-format
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "%d yol eklendi\n"
@@ -255,19 +255,19 @@ msgstr "indeks yenilenemedi"
 msgid "Bye.\n"
 msgstr "Güle güle.\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "Kip değişimi hazırlansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "Silme hazırlansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "Ekleme hazırlansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Bu parça hazırlansın mı [y,n,q,a,d%s,?]? "
 
@@ -291,19 +291,19 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları hazırla\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini hazırlama\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "Kip değişimi zulalansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "Silme zulalansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "Ekleme zulalansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "Bu parça zulalansın mı [y,n,q,a,d%s,?]? "
 
@@ -327,19 +327,19 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları zulala\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini zulalama\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "Kip değişimi hazırlıktan çıkarılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "Silme hazırlıktan çıkarılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "Ekleme hazırlıktan çıkarılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "Bu parça hazırlıktan çıkarılsın mı [y,n,q,a,d%s,?]? "
 
@@ -363,19 +363,19 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları hazırlıktan çıkar\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini hazırlıktan çıkarma\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "Kip değişimi indekse uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "Silme indekse uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "Ekleme indekse uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "Bu parça indekse uygulansın mı [y,n,q,a,d%s,?]? "
 
@@ -399,19 +399,19 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları uygula\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini uygulama\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "Kip değişimi çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "Silme çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "Ekleme çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "Bu parça çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
@@ -435,20 +435,20 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları at\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini atma\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Kip değişimi indeksten ve çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Silme indeksten ve çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Ekleme indeksten ve çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Bu parça indeksten ve çalışma ağacından atılsın mı [y,n,q,a,d%s,?]? "
 
@@ -465,20 +465,20 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları at\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini atma\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr ""
 "Kip değişimi indekse ve çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Silme indekse ve çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Ekleme indekse ve çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "Bu parça indekse ve çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
@@ -495,19 +495,19 @@ msgstr ""
 "a - bu parçayı ve sonraki tüm parçaları uygula\n"
 "d - bu parçayı veya sonraki parçalardan herhangi birini uygulama\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr "Kip değişimi çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "Silme çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "Ekleme çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
-#, c-format, perl-format
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "Bu parça çalışma ağacına uygulansın mı [y,n,q,a,d%s,?]? "
 
@@ -583,8 +583,6 @@ msgstr ""
 "'%c' satır kaldırmak için onları silin.\n"
 "%c kaldırılacak.\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -600,20 +598,12 @@ msgstr "parça üstbilgisi ayrıştırılamadı"
 msgid "'git apply --cached' failed"
 msgstr "'git apply --cached' başarısız oldu"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""
@@ -1444,6 +1434,12 @@ msgstr "çalışma dizinindeki .gitattributes'u oku"
 msgid "report archived files on stderr"
 msgstr "arşivlenmiş dosyaları stderr'de raporla"
 
+msgid "time"
+msgstr "zaman"
+
+msgid "set modification time of archive entries"
+msgstr "arşiv girdilerinin değiştirilme zamanını ayarla"
+
 msgid "set compression level"
 msgstr "sıkıştırma düzeyini ayarla"
 
@@ -1484,6 +1480,13 @@ msgstr "'%s' biçimi için desteklenmeyen argüman: -%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%.*s geçerli bir öznitelik adı değil"
 
+msgid "unable to add additional attribute"
+msgstr "ek öznitelik eklenemiyor"
+
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "pek uzun öznitelik satırı %d yok sayılıyor"
+
 #, c-format
 msgid "%s not allowed: %s:%d"
 msgstr "%s izin verilmiyor: %s:%d"
@@ -1495,6 +1498,18 @@ msgstr ""
 "Negatif dizgiler git özniteliklerinde yok sayılır.\n"
 "Gerçek öncü ünlem için '\\!' kullanın."
 
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "fstat gitattributes dosyası '%s' bulunamıyor"
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "pek büyük gitattributes dosyası '%s' dosyası yok sayılıyor"
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "pek büyük gitattributes ikili nesnesi '%s' yok sayılıyor"
+
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
 msgstr "'%s' dosyasında hatalı tırnağa alınmış içerik: %s"
@@ -1771,11 +1786,11 @@ msgstr "'%s' altmodülü: altmodül bulunamıyor"
 
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
-"Altmodülleri güncellemeyi 'git checkout %s && git submodule update --init' "
-"kullanarak deneyebilirsiniz"
+"'git checkout --no-recurse-submodules %s && git submodule update --init' "
+"kullanarak altmodülleri güncellemeyi deneyebilirsiniz"
 
 #, c-format
 msgid "submodule '%s': cannot create branch '%s'"
@@ -1810,6 +1825,13 @@ msgstr "kaldır: '%s'\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "İndeksi yeniledikten sonra hazırlanmamış değişiklikler:"
 
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"add.interactive.useBuiltin ayarı kaldırıldı!\n"
+"Ayrıntılar için onun 'git help config' içindeki girdisine bakın."
+
 msgid "Could not read the index"
 msgstr "İndeks okunamadı"
 
@@ -2200,6 +2222,9 @@ msgstr "git am [<seçenekler>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "etkileşimli olarak çalıştır"
 
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "pre-applypatch ve applypatch-msg kancalarını atla"
+
 msgid "historical option -- no-op"
 msgstr "tarihi seçenek -- no-op"
 
@@ -2342,32 +2367,27 @@ msgstr "git archive: Protokol hatası"
 msgid "git archive: expected a flush"
 msgstr "git archive: Floş bekleniyordu"
 
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<işleme>]"
-
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<terim> --term-{old,good}"
-"=<terim>] [--no-checkout] [--first-parent] [<kötü> [<iyi>...]] [--] "
-"[<yollar>...]"
+"git bisect start [--term-{new,bad}=<terim> --term-{old,good}=<terim>]    [--"
+"no-checkout] [--first-parent] [<kötü> [<iyi>...]] [--]    [<yol-blrtç>...]"
 
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<rev>]"
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<rev>...]"
 
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<rev>...]"
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<rev>|<erim>)...]"
 
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <dosyaadı>"
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<işleme>]"
 
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<rev>|<erim>)...]"
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <günlük-dosyası>"
 
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <komut>..."
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <komut>..."
 
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
@@ -2511,9 +2531,6 @@ msgstr "hatalı HEAD - Bana bir HEAD gerek"
 msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
 msgstr "'%s' çıkış yapımı başarısız. 'git bisect start <geçerli-dal>' deneyin."
 
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "cg-seek yapılmış bir ağaçta ikili arama yapılmayacak"
-
 msgid "bad HEAD - strange symbolic ref"
 msgstr "hatalı HEAD - tuhaf sembolik başvuru"
 
@@ -2565,17 +2582,16 @@ msgid "bisect run failed: no command provided."
 msgstr "ikili arama başarısız: Komut verilmedi."
 
 #, c-format
-msgid "unable to verify '%s' on good revision"
-msgstr "'%s', iyi revizyonda doğrulanamadı"
+msgid "unable to verify %s on good revision"
+msgstr "%s, iyi revizyonda doğrulanamıyor"
 
 #, c-format
 msgid "bogus exit code %d for good revision"
 msgstr "iyi revizyon için anlamsız %d çıkış kodu"
 
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
-msgstr ""
-"bisect çalıştırılamadı: çıkış kodu %d, '%s' konumundan, < 0 veya >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
+msgstr "bisect çalıştırılamadı: çıkış kodu %d, %s konumundan, < 0 veya >= 128"
 
 #, c-format
 msgid "cannot open file '%s' for writing"
@@ -2584,37 +2600,42 @@ msgstr "'%s' dosyası yazma için açılamadı"
 msgid "bisect run cannot continue any more"
 msgstr "ikili arama artık çalışmayı sürdüremiyor"
 
-#, c-format
 msgid "bisect run success"
 msgstr "ikili arama başarılı"
 
-#, c-format
 msgid "bisect found first bad commit"
 msgstr "ikili arama ilk hatalı işlemeyi buldu"
 
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
-msgstr ""
-"ikili arama çalıştırılamadı: 'git bisect--helper --bisect-state %s', %d hata "
-"koduyla çıktı"
-
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset bir argüman veya işleme gerektirmiyor"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
+msgstr "ikili arama çalıştırılamadı: 'git bisect %s', %d hata koduyla çıktı"
 
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms 0 veya 1 argüman gerektiriyor"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "'%s', bir argüman veya işleme gerektirmiyor"
 
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next 0 argüman gerektiriyor"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "'%s', 0 veya 1 argümanı gerektiriyor"
 
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log 0 argüman gerektiriyor"
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "'%s', 0 argüman gerektiriyor"
 
 msgid "no logfile given"
 msgstr "hiçbir günlük dosyası verilmedi"
 
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "'%s' başarısız: Komut verilmedi."
+
+msgid "need a command"
+msgstr "bir komut gerekli"
+
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "bilinmeyen komut: '%s'"
+
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<seçenekler>] [<rev-sçnk>] [<rev>] [--] <dosya>"
 
@@ -2744,7 +2765,7 @@ msgstr[0] "%s dosyasında yalnızca %lu satır var"
 msgstr[1] "%s dosyasında yalnızca %lu satır var"
 
 msgid "Blaming lines"
-msgstr "Genel bakış satırları"
+msgstr "Satırlara bakılıyor"
 
 msgid "git branch [<options>] [-r | -a] [--merged] [--no-merged]"
 msgstr "git branch [<seçenekler>] [-r | -a] [--merged] [--no-merged]"
@@ -3181,6 +3202,9 @@ msgstr "git bundle list-heads <dosya> [<başvuru-adı>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <dosya> [<başvuru-adı>...]"
 
+msgid "need a <file> argument"
+msgstr "bir <dosya> argümanı gerekiyor"
+
 msgid "do not show progress meter"
 msgstr "ilerleme çubuğunu gösterme"
 
@@ -3234,10 +3258,6 @@ msgstr "%s, argümanlar gerektiriyor"
 msgid "%s takes no arguments"
 msgstr "%s, bir argüman almıyor"
 
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "bilinmeyen komut: '%s'"
-
 msgid "only one batch option may be specified"
 msgstr "yalnızca bir toplu iş seçeneği belirtilebilir"
 
@@ -3373,11 +3393,18 @@ msgstr "<nesne>, '-%c' ile gerekiyor"
 msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "<tür> <nesne> kipinde yalnızca iki argümana izin veriliyor, %d değil"
 
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <öznitelik>...] [--] <yol-adı>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <ağacımsı>] [-a | --all | <öznitelik>...] [--] <yol-"
+"adı>..."
 
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <öznitelik>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <ağacımsı>] [-a | --all | "
+"<öznitelik>...]"
 
 msgid "report all attributes set on file"
 msgstr "tüm dosya özniteliklerini bildir"
@@ -3391,6 +3418,12 @@ msgstr "dosya adlarını stdin'den oku"
 msgid "terminate input and output records by a NUL character"
 msgstr "girdi ve çıktı kayıtlarını bir NUL karakteri ile sonlandır"
 
+msgid "<tree-ish>"
+msgstr "<ağacımsı>"
+
+msgid "which tree-ish to check attributes at"
+msgstr "özniteliklerin hangi ağacımsıda denetleneceği"
+
 msgid "suppress progress reporting"
 msgstr "ilerleme bildirimini gizle"
 
@@ -3967,7 +4000,7 @@ msgstr ""
 "*          - tüm ögeleri seç\n"
 "           - (boş) seçimi bitir\n"
 
-#, c-format, perl-format
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "Pardon (%s)?\n"
 
@@ -4116,9 +4149,6 @@ msgstr "derinlik"
 msgid "create a shallow clone of that depth"
 msgstr "verilen derinlikte sığ bir depo oluştur"
 
-msgid "time"
-msgstr "zaman"
-
 msgid "create a shallow clone since a specific time"
 msgstr "verilen zamandan sonrasını içeren bir sığ depo oluştur"
 
@@ -4346,6 +4376,9 @@ msgstr "depo ilklendirilemedi, demet URI'si atlanıyor"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "'%s' demet URI'sinden nesneler getirilemedi"
 
+msgid "failed to fetch advertised bundles"
+msgstr "tanıtılan demetler alınamadı"
+
 msgid "remote transport reported error"
 msgstr "uzak konum taşıması hata bildirdi"
 
@@ -5589,29 +5622,6 @@ msgstr "--tool=<araç> için bir <araç> verilmedi"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "--extcmd=<komut> için bir <komut> verilmedi"
 
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <seçenekler> <ortam-dğşkn>"
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr "git_env_*(...)'ın geri çekileceği öntanımlı"
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr "sessiz ol, yalnızca git_env_*() değerini çıkış kodu olarak kullan"
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-"--default seçeneği, --type=bool ile birlikte bir Boole değeri bekliyor, '%s' "
-"değil"
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not "
-"`%s`"
-msgstr ""
-"--default seçeneği, --type=ulong ile birlikte bir imzalanmamış uzun değer "
-"bekliyor, '%s' değil"
-
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<revizyon-listesi-seçenekleri>]"
 
@@ -6009,6 +6019,10 @@ msgstr "--deepen içinde negatif derinlik desteklenmiyor"
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "tam bir depo üzerinde --unshallow bir anlam ifade etmiyor"
 
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "'%s' konumundan demetler getirilemedi"
+
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all bir depo argümanı almıyor"
 
@@ -7028,12 +7042,19 @@ msgstr "kullanım: %s%s"
 msgid "'git help config' for more information"
 msgstr "ek bilgi için: 'git help config'"
 
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] <kanca-adı> [-- <kanca-argümanları>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=<yol>] <kanca-adı> [-- <kanca-"
+"argümanları>]"
 
 msgid "silently ignore missing requested <hook-name>"
 msgstr "istenen eksik <kanca-adı> sessizce yok sayılıyor"
 
+msgid "file to read into hooks' stdin"
+msgstr "kancaların stdin'ine okunacak dosya"
+
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "%s konumunda nesne türü uyuşmazlığı"
@@ -7856,11 +7877,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<yürütülebilir>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<anahtar>]\n"
-"              [--symref] [<depo> [<başvurular>...]]"
+"              [--symref] [<depo> [<dizgiler>...]]"
 
 msgid "do not print remote URL"
 msgstr "uzak konum URL'sini yazdırma"
@@ -8104,9 +8125,15 @@ msgstr "birbiriyle ilişkisi olmayan geçmişlerin birleştirilmesine izin ver"
 msgid "perform multiple merges, one per line of input"
 msgstr "girdi satırı başına bir adet çoklu birleştirmeler gerçekleştir"
 
+msgid "specify a merge-base for the merge"
+msgstr "birleştirme için bir birleştirme temeli belirtilmeli"
+
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge, tüm diğer seçeneklerle uyumsuz"
 
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base, --stdin ile uyumsuz"
+
 #, c-format
 msgid "malformed input line: '%s'."
 msgstr "hatalı oluşturulmuş girdi satırı: '%s'."
@@ -9985,6 +10012,9 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "şuraya geçilemedi: %s"
 
+msgid "apply options and merge options cannot be used together"
+msgstr "uygulama seçenekleri ve birleştirme seçenekleri birlikte kullanılamaz"
+
 #, c-format
 msgid ""
 "unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
@@ -10220,8 +10250,19 @@ msgstr "Bilinmeyen kip: %s"
 msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy, --merge veya --interactive gerektiriyor"
 
-msgid "apply options and merge options cannot be used together"
-msgstr "uygulama seçenekleri ve birleştirme seçenekleri birlikte kullanılamaz"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
+msgstr ""
+"uygulama seçenekleri, rebase.autosquash ile uyumlu değil. --no-autosquash "
+"eklemeyi düşünün"
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr ""
+"uygulama seçenekleri, rebase.updateRefs ile uyumlu değil. --no-update-refs "
+"eklemeyi düşünün"
 
 #, c-format
 msgid "Unknown rebase backend: %s"
@@ -12698,10 +12739,6 @@ msgstr "'%s' geçerli bir altmodül adı değil"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <komut>"
 
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s, --super-prefix desteklemiyor"
-
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <neden>] <ad> <başvuru>"
 
@@ -13425,6 +13462,10 @@ msgstr "yalnızca hata ayıklama için yararlı"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch, bu platformda desteklenmiyor"
 
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "demet liste anahtarı %s ile '%s' değeri ayrıştırılamıyor"
+
 #, c-format
 msgid "bundle list at '%s' has no mode"
 msgstr "'%s' konumundaki demet listesinin kipi yok"
@@ -13435,6 +13476,13 @@ msgstr "geçici dosya oluşturulamadı"
 msgid "insufficient capabilities"
 msgstr "yetersiz yetenekler"
 
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "'%s' konumundan indirilen dosya bir demet değil"
+
+msgid "failed to store maximum creation token"
+msgstr "en büyük oluşturma jetonu depolanamadı"
+
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
 msgstr "'%s' URI'sinden tanımlanamayan demet kipi"
@@ -13451,6 +13499,13 @@ msgstr "'%s' URI'sinden demet indirilemedi"
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "'%s' URI'sindeki dosya bir demet veya demet listesi değil"
 
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: beklenmedik argüman: '%s'"
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: argümanlardan sonra floş bekleniyordu"
+
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri: boş bir satır alındı"
 
@@ -13482,6 +13537,13 @@ msgstr "Depo aşağıdaki önkoşul işlemelere iye değil:"
 msgid "need a repository to verify a bundle"
 msgstr "bir demeti doğrulamak için bir depo gerekiyor"
 
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"nesne deposunda bazı önkoşul işlemeleri var; ancak deponun geçmişine bağlı "
+"değiller"
+
 #, c-format
 msgid "The bundle contains this ref:"
 msgid_plural "The bundle contains these %<PRIuMAX> refs:"
@@ -14881,6 +14943,16 @@ msgstr "protokol hatası: beklenmedik '%s'"
 msgid "unknown object format '%s' specified by server"
 msgstr "sunucu tarafından bilinmeyen nesne biçimi '%s' belirtildi"
 
+#, c-format
+msgid "error on bundle-uri response line %d: %s"
+msgstr "bundle-uri %d. yanıt satırında hata: %s"
+
+msgid "expected flush after bundle-uri listing"
+msgstr "bundle-uri listelemesinden sonra floş bekleniyordu"
+
+msgid "expected response end packet after ref listing"
+msgstr "başvuru listelemesinden sonra yanıt sonu paketi bekleniyordu"
+
 #, c-format
 msgid "invalid ls-refs response: %s"
 msgstr "geçersiz ls-refs yanıtı: %s"
@@ -14888,9 +14960,6 @@ msgstr "geçersiz ls-refs yanıtı: %s"
 msgid "expected flush after ref listing"
 msgstr "başvuru listelemesinden sonra floş bekleniyordu"
 
-msgid "expected response end packet after ref listing"
-msgstr "başvuru listelemesinden sonra yanıt sonu paketi bekleniyordu"
-
 #, c-format
 msgid "protocol '%s' is not supported"
 msgstr "'%s' protokolü desteklenmiyor"
@@ -16041,16 +16110,14 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
 "git [-v | --version] [-h | --help] [-C <yol>] [-c <ad>=<değer>]\n"
 "           [--exec-path[=<yol>]] [--html-path] [--man-path] [--info-path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<yol>] [--work-tree=<yol>] [--namespace=<ad>]\n"
-"           [--super-prefix=<yol>] [--config-env=<ad>=<çevredeğişkeni>]\n"
-"           <komut> [<argümanlar>]"
+"           [--config-env=<ad>=<çevre-değişkeni>] <komut> [<argümanlar>]"
 
 msgid ""
 "'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -16075,10 +16142,6 @@ msgstr "'%s' seçeneği için bir dizin verilmedi\n"
 msgid "no namespace given for --namespace\n"
 msgstr "--namespace için ad alanı verilmedi\n"
 
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "--super-prefix için önek verilmedi\n"
-
 #, c-format
 msgid "-c expects a configuration string\n"
 msgstr "-c bir yapılandırma dizisi bekliyor\n"
@@ -16194,8 +16257,13 @@ msgstr ""
 msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand başarısız oldu: %s %s"
 
-msgid "gpg failed to sign the data"
-msgstr "gpg veriyi imzalayamadı"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg veriyi imzalayamadı:\n"
+"%s"
 
 msgid "user.signingKey needs to be set for ssh signing"
 msgstr "user.signingKey'in ssh imzalaması için ayarlanması gerekiyor"
@@ -17335,6 +17403,10 @@ msgstr "hasarlı gevşek nesne '%s'"
 msgid "garbage at end of loose object '%s'"
 msgstr "gevşek nesne '%s' sonunda anlamsız veri"
 
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "gevşek nesne %s açılamıyor"
+
 #, c-format
 msgid "unable to parse %s header"
 msgstr "%s üstbilgisi ayrıştırılamıyor"
@@ -17351,17 +17423,13 @@ msgid "header for %s too long, exceeds %d bytes"
 msgstr "%s üstbilgisi pek uzun, %d bayt'ı aşıyor"
 
 #, c-format
-msgid "failed to read object %s"
-msgstr "%s nesnesi okunamadı"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "%s gevşek nesnesi (%s içinde depolanıyor) hasarlı"
 
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "%s yedeği %s için bulunamadı"
 
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "%s gevşek nesnesi (%s içinde depolanıyor) hasarlı"
-
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
 msgstr "paketlenmiş nesne %s (%s içinde depolanıyor) hasarlı"
@@ -17374,9 +17442,6 @@ msgstr "%s dosyası yazılamıyor"
 msgid "unable to set permission to '%s'"
 msgstr "'%s' ögesine izin ayarlanamıyor"
 
-msgid "file write error"
-msgstr "dosya yazım hatası"
-
 msgid "error when closing loose object file"
 msgstr "gevşek nesne dosyası kapatılırken hata"
 
@@ -17422,11 +17487,12 @@ msgstr "%s dizini oluşturulamıyor"
 msgid "cannot read object for %s"
 msgstr "%s için nesne okunamıyor"
 
-msgid "corrupt commit"
-msgstr "hasarlı işleme"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "nesne fsck'yi başarısız ediyor: %s"
 
-msgid "corrupt tag"
-msgstr "hasarlı etiket"
+msgid "refusing to create malformed object"
+msgstr "hatalı oluşturulmuş nesne oluşturma reddediliyor"
 
 #, c-format
 msgid "read error while indexing %s"
@@ -17690,10 +17756,6 @@ msgstr "biteşlem paket indeksinde geçersi XOR ofseti"
 msgid "cannot fstat bitmap file"
 msgstr "biteşlem dosyası fstat yapılamıyor"
 
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "ek biteşlem dosyası yok sayılıyor: '%s'"
-
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "sağlama toplamı, MIDX ve biteşlem içinde uymuyor"
 
@@ -17956,6 +18018,9 @@ msgstr "daha sessiz ol"
 msgid "use <n> digits to display object names"
 msgstr "nesne adlarını görüntülemek için <n> basamak kullan"
 
+msgid "prefixed path to initial superproject"
+msgstr "yol, ilk üst projeye öneklendi"
+
 msgid "how to strip spaces and #comments from message"
 msgstr "iletiden boşlukları ve #yorumları çıkart"
 
@@ -18447,6 +18512,14 @@ msgstr "%d arkasında"
 msgid "ahead %d, behind %d"
 msgstr "%d önünde, %d arkasında"
 
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) argüman almıyor"
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "tanımlanamayan %%(%.*s) argümanı: %s"
+
 #, c-format
 msgid "expected format: %%(color:<color>)"
 msgstr "beklenen biçim: %%(color:<renk>)"
@@ -18463,22 +18536,6 @@ msgstr "Tamsayı değeri şunu bekliyordu: refname:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "Tamsayı değeri şunu bekliyordu: refname:rstrip=%s"
 
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "tanımlanamayan %%(%s) argümanı: %s"
-
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) argüman almıyor"
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) argüman almıyor"
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) argüman almıyor"
-
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
 msgstr "%%(trailers:key=<değer>) bekleniyordu"
@@ -18495,10 +18552,6 @@ msgstr "pozitif değer şunu bekliyordu: contents:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "pozitif değer şurada '%s' bekliyordu: %%(%s)"
 
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "tanımlanamayan e-posta seçeneği: %s"
-
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
 msgstr "beklenen biçim: %%(align:<genişlik>,<konum>)"
@@ -18512,12 +18565,12 @@ msgid "unrecognized width:%s"
 msgstr "tanımlanamayan genişlik:%s"
 
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "pozitif genişlik %%(align) ögeciği ile birlikte bekleniyordu"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "tanımlanamayan %%(%s) argümanı: %s"
 
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) argüman almıyor"
+msgid "positive width expected with the %%(align) atom"
+msgstr "pozitif genişlik %%(align) ögeciği ile birlikte bekleniyordu"
 
 #, c-format
 msgid "malformed field name: %.*s"
@@ -19754,6 +19807,23 @@ msgstr "git %s: indeks okunamadı"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s: indeks yenilenemedi"
 
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "'%s', geçerli bir etiket değil"
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "'%s', geçerli bir başvuru adı değil"
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+"update-ref, tümüyle kalifiye bir başvuru adı gerektiriyor; örn. refs/heads/%s"
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "geçersiz komut %.*s"
+
 #, c-format
 msgid "%s does not accept arguments: '%s'"
 msgstr "%s argüman kabul etmiyor: '%s'"
@@ -20549,6 +20619,16 @@ msgstr "ls-tree beklenmedik bir biçimde %d kodu ile çıktı"
 msgid "failed to lstat '%s'"
 msgstr "'%s', lstat yapılamadı"
 
+msgid "no remote configured to get bundle URIs from"
+msgstr "demet URI'lerini almak için bir uzak konum yapılandırılmamış"
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "'%s' uzak konumunun yapılandırılmış bir URL'si yok"
+
+msgid "could not get the bundle-uri list"
+msgstr "bundle-uri listesi alınamadı"
+
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <seçenekler> (control|prime|update)"
 
@@ -20900,6 +20980,12 @@ msgstr "İptal ediliyor."
 msgid "failed to push all needed submodules"
 msgstr "gereken tüm altmodüller itilemedi"
 
+msgid "bundle-uri operation not supported by protocol"
+msgstr "bundle-uri işlemi protokol tarafından desteklenmiyor"
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr "sunucu tarafından tanıtılan bundle-uri listesi alınamadı"
+
 msgid "too-short tree object"
 msgstr "ağaç nesnesi çok kısa"
 
@@ -21629,13 +21715,18 @@ msgstr "Yok sayılan dosyalar"
 
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"İzlenmeyen dosyaların ortaya dökülmesi %.2f saniye sürdü. 'status -uno'\n"
-"bunu hızlandırabilir; ancak yeni dosyaları eklemeyi unutmamanız\n"
-"konusunda dikkatli olmalısınız (ek bilgi için 'git help status')."
+"İzlenmeyen dosyaları ortaya dökme %.2f saniye sürdü;\n"
+"ancak sonuçlar önbelleğe alındı ve sonrakiler daha hızlı olabilir."
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "İzlenmeyen dosyaları ortaya dökme %.2f saniye sürdü."
+
+msgid "See 'git help status' for information on how to improve this."
+msgstr "Bunu iyileştirme üzerine bilgi için 'git help status'a bakın."
 
 #, c-format
 msgid "Untracked files not listed%s"
@@ -21650,7 +21741,8 @@ msgstr "Değişiklik yok"
 #, c-format
 msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
 msgstr ""
-"İşlemeye eklenen değişiklik yok (\"git add\" ve/veya \"git commit -a\" kullanın)\n"
+"İşlemeye eklenen değişiklik yok (\"git add\" ve/veya \"git commit -a\" "
+"kullanın)\n"
 
 #, c-format
 msgid "no changes added to commit\n"
@@ -21778,275 +21870,6 @@ msgstr "Bu komutu çalışma ağacının en üst düzeyinden çalıştırmanız
 msgid "Unable to determine absolute path of git directory"
 msgstr "Git dizininin kesin yolu algılanamıyor"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%12s %12s %s"
-
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "%d yola dokunuldu\n"
-msgstr[1] "%d yola dokunuldu\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Eğer yama sorunsuzca uygulanırsa düzenlenen parça derhal hazırlama\n"
-"için imlenecektir."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Eğer yama sorunsuzca uygulanırsa düzenlenen parça derhal zulalama\n"
-"için imlenecektir."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Eğer yama sorunsuzca uygulanırsa, düzenlenen parça derhal hazırlıktan\n"
-"çıkarılma için imlenecektir."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Eğer yama sorunsuzca uygulanırsa düzenlenen parça derhal uygulama\n"
-"için imlenecektir."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Eğer yama sorunsuzca uygulanırsa düzenlenen parça derhal ıskartaya\n"
-"çıkarım için imlenecektir."
-
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr "parça düzenleme dosyası yazım için açılamadı: %s"
-
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"---\n"
-"'%s' satır kaldırmak için onları ' ' satır yapın (bağlam).\n"
-"'%s' satır kaldırmak için onları silin.\n"
-"%s ile başlayan satırlar kaldırılacaktır.\n"
-
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr "parça düzenleme dosyası okuma için açılamadı: %s"
-
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı hazırla\n"
-"n - bu parçayı hazırlama\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini hazırlama\n"
-"a - bu parçayı ve sonraki tüm parçaları hazırla\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini hazırlama"
-
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı zulala\n"
-"n - bu parçayı zulalama\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini zulalama\n"
-"a - bu parçayı ve sonraki tüm parçaları zulala\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini zulalama"
-
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı hazırlıktan çıkar\n"
-"n - bu parçayı hazırlıktan çıkarma\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini hazırlıktan çıkarma\n"
-"a - bu parçayı ve sonraki tüm parçaları hazırlıktan çıkar\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini hazırlıktan çıkarma"
-
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı indekse uygula\n"
-"n - bu parçayı indekse uygulama\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini uygulama\n"
-"a - bu parçayı ve sonraki tüm parçaları uygula\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini uygulama"
-
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı çalışma ağacından at\n"
-"n - bu parçayı çalışma ağacından atma\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini atma\n"
-"a - bu parçayı ve sonraki tüm parçaları at\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini atma"
-
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı çalışma ağacından ve indeksten at\n"
-"n - bu parçayı çalışma ağacından ve indeksten atma\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini atma\n"
-"a - bu parçayı ve sonraki tüm parçaları at\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini atma"
-
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı indekse ve çalışma ağacına uygula\n"
-"n - bu parçayı indekse ve çalışma ağacına uygulama\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini uygulama\n"
-"a - bu parçayı ve sonraki tüm parçaları uygula\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini uygulama"
-
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - bu parçayı çalışma ağacına uygula\n"
-"n - bu parçayı çalışma ağacına uygulama\n"
-"q - çık; bu parçayı veya kalanlardan herhangi birini uygulama\n"
-"a - bu parçayı ve sonraki tüm parçaları uygula\n"
-"d - bu parçayı veya sonraki parçalardan herhangi birini uygulama"
-
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g - gidilecek bir parça seç\n"
-"/ - verilen düzenli ifade ile eşleşen bir parça ara\n"
-"j - bu parça için sonra karar ver, bir sonraki karar verilmemiş parçayı gör\n"
-"J - bu parça için sonra karar ver, bir sonraki parçayı gör\n"
-"k - bu parça için sonra karar ver, bir önceki karar verilmemiş parçayı gör\n"
-"K - bu parça için sonra karar ver, bir önceki parçayı gör\n"
-"s - geçerli parçayı daha ufak parçalara böl\n"
-"e - geçerli parçayı el ile düzenle\n"
-"? - yardımı yazdır\n"
-
-msgid "The selected hunks do not apply to the index!\n"
-msgstr "Seçili parçalar indekse uygulanamıyor!\n"
-
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "birleştirilmeyenler yok sayılıyor: %s\n"
-
-msgid "No other hunks to goto\n"
-msgstr "Gidilecek başka parça yok\n"
-
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "Geçersiz sayı: '%s'\n"
-
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "Üzgünüm, yalnızca %d parça kullanılabilir.\n"
-msgstr[1] "Üzgünüm, yalnızca %d parça kullanılabilir.\n"
-
-msgid "No other hunks to search\n"
-msgstr "Aranacak başka parça yok\n"
-
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "Hatalı oluşturulmuş arama düzenli ifadesi %s: %s\n"
-
-msgid "No hunk matches the given pattern\n"
-msgstr "Verilen dizgi ile hiçbir parça eşleşmiyor\n"
-
-msgid "No previous hunk\n"
-msgstr "Öncesinde parça yok\n"
-
-msgid "No next hunk\n"
-msgstr "Sonrasında parça yok\n"
-
-msgid "Sorry, cannot split this hunk\n"
-msgstr "Üzgünüm, bu parça bölünemiyor\n"
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "%d parçaya bölündü.\n"
-msgstr[1] "%d parçaya bölündü.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "Üzgünüm, bu parça düzenlenemiyor\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        - değişiklik içeren yolları göster\n"
-"update        - çalışma ağacı durumunu hazırlanan değişiklik setine ekle\n"
-"revert        - hazırlanan değişiklik setini HEAD sürümüne geri al\n"
-"patch         - parçaları seç ve seçici olarak güncelle\n"
-"diff          - HEAD ve indeks arasındaki diff'i (ayrımları) görüntüle\n"
-"add untracked - izlenmeyen dosyaların içeriğini hazırlanan değişiklik setine "
-"ekle\n"
-
-msgid "missing --"
-msgstr "-- eksik"
-
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "bilinmeyen --patch kipi: %s"
-
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "geçersiz argüman %s, -- bekleniyor"
-
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr "yerel dilim GMT'den bir dakikadan az bir aralıkla ayrımlı\n"
 
index 1a0026a7dc4f8250084620b64ef7b5357bf839ed..2b88f9b78146c7097d193af0092db9d33443916d 100644 (file)
 #   upstream                         |  上游
 #   upstream branch                  |  上游分支
 #   working tree                     |  工作区
-# Fangyi Zhou <me@fangyi.io>, 2021-2022.
+# Fangyi Zhou <me@fangyi.io>, 2021-2023.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: Git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-12-01 14:04+0000\n"
-"PO-Revision-Date: 2022-12-01 14:17+0000\n"
+"POT-Creation-Date: 2023-03-07 23:37+0000\n"
+"PO-Revision-Date: 2023-03-07 23:40+0000\n"
 "Last-Translator: Fangyi Zhou <me@fangyi.io>\n"
 "Language-Team: GitHub <https://github.com/fangyi-zhou/git-po/>\n"
 "Language: zh_CN\n"
@@ -165,19 +165,19 @@ msgstr "嗯(%s)?"
 msgid "could not read index"
 msgstr "不能读取索引"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "binary"
 msgstr "二进制"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "nothing"
 msgstr "无"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "unchanged"
 msgstr "没有修改"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Update"
 msgstr "更新"
 
@@ -190,15 +190,15 @@ msgstr "不能暂存 '%s'"
 msgid "could not write index"
 msgstr "不能写入索引"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "updated %d path\n"
 msgid_plural "updated %d paths\n"
 msgstr[0] "更新了 %d 个路径\n"
 msgstr[1] "更新了 %d 个路径\n"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "note: %s is untracked now.\n"
 msgstr "说明:%s 现已成为未跟踪的。\n"
 
@@ -207,7 +207,7 @@ msgstr "说明:%s 现已成为未跟踪的。\n"
 msgid "make_cache_entry failed for path '%s'"
 msgstr "对路径 '%s' 的 make_cache_entry 操作失败"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Revert"
 msgstr "还原"
 
@@ -215,24 +215,24 @@ msgstr "还原"
 msgid "Could not parse HEAD^{tree}"
 msgstr "不能解析 HEAD^{tree}"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "reverted %d path\n"
 msgid_plural "reverted %d paths\n"
 msgstr[0] "还原了 %d 个路径\n"
 msgstr[1] "还原了 %d 个路径\n"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 #, c-format
 msgid "No untracked files.\n"
 msgstr "没有未跟踪的文件。\n"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Add untracked"
 msgstr "添加未跟踪的"
 
-#: add-interactive.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-interactive.c
+#, c-format
 msgid "added %d path\n"
 msgid_plural "added %d paths\n"
 msgstr[0] "增加了 %d 个路径\n"
@@ -243,21 +243,21 @@ msgstr[1] "增加了 %d 个路径\n"
 msgid "ignoring unmerged: %s"
 msgstr "忽略未合入的:%s"
 
-#: add-interactive.c add-patch.c git-add--interactive.perl
+#: add-interactive.c add-patch.c
 #, c-format
 msgid "Only binary files changed.\n"
 msgstr "只有二进制文件被修改。\n"
 
-#: add-interactive.c add-patch.c git-add--interactive.perl
+#: add-interactive.c add-patch.c
 #, c-format
 msgid "No changes.\n"
 msgstr "没有修改。\n"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Patch update"
 msgstr "补丁更新"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "Review diff"
 msgstr "检视 diff"
 
@@ -325,25 +325,25 @@ msgstr "选择一个编号条目"
 msgid "(empty) select nothing"
 msgstr "(空)不选择任何内容"
 
-#: add-interactive.c builtin/clean.c git-add--interactive.perl
+#: add-interactive.c builtin/clean.c
 msgid "*** Commands ***"
 msgstr "*** 命令 ***"
 
-#: add-interactive.c builtin/clean.c git-add--interactive.perl
+#: add-interactive.c builtin/clean.c
 msgid "What now"
 msgstr "请选择"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "staged"
 msgstr "缓存"
 
-#: add-interactive.c git-add--interactive.perl
+#: add-interactive.c
 msgid "unstaged"
 msgstr "未缓存"
 
 #: add-interactive.c apply.c builtin/am.c builtin/bugreport.c builtin/clone.c
-#: builtin/diagnose.c builtin/fetch.c builtin/merge.c builtin/pull.c
-#: builtin/submodule--helper.c git-add--interactive.perl
+#: builtin/diagnose.c builtin/fetch.c builtin/hook.c builtin/merge.c
+#: builtin/pull.c builtin/submodule--helper.c
 msgid "path"
 msgstr "路径"
 
@@ -351,28 +351,28 @@ msgstr "路径"
 msgid "could not refresh index"
 msgstr "不能刷新索引"
 
-#: add-interactive.c builtin/clean.c git-add--interactive.perl
+#: add-interactive.c builtin/clean.c
 #, c-format
 msgid "Bye.\n"
 msgstr "再见。\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage mode change [y,n,q,a,d%s,?]? "
 msgstr "暂存模式变更 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage deletion [y,n,q,a,d%s,?]? "
 msgstr "暂存删除动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage addition [y,n,q,a,d%s,?]? "
 msgstr "暂存添加动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stage this hunk [y,n,q,a,d%s,?]? "
 msgstr "暂存该块 [y,n,q,a,d%s,?]? "
 
@@ -396,23 +396,23 @@ msgstr ""
 "a - 暂存该块和本文件中后面的全部块\n"
 "d - 不暂存该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash mode change [y,n,q,a,d%s,?]? "
 msgstr "贮藏模式变更 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash deletion [y,n,q,a,d%s,?]? "
 msgstr "贮藏删除动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash addition [y,n,q,a,d%s,?]? "
 msgstr "贮藏添加动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Stash this hunk [y,n,q,a,d%s,?]? "
 msgstr "贮藏该块 [y,n,q,a,d%s,?]? "
 
@@ -436,23 +436,23 @@ msgstr ""
 "a - 贮藏该块和本文件中后面的全部块\n"
 "d - 不贮藏该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage mode change [y,n,q,a,d%s,?]? "
 msgstr "取消暂存模式变更 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage deletion [y,n,q,a,d%s,?]? "
 msgstr "取消暂存删除动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage addition [y,n,q,a,d%s,?]? "
 msgstr "取消暂存添加动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
 msgstr "取消暂存该块 [y,n,q,a,d%s,?]? "
 
@@ -476,23 +476,23 @@ msgstr ""
 "a - 取消暂存该块和本文件中后面的全部块\n"
 "d - 不要取消暂存该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
 msgstr "将模式变更应用到索引 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
 msgstr "将删除操作应用到索引 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply addition to index [y,n,q,a,d%s,?]? "
 msgstr "将添加操作应用到索引 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
 msgstr "将该块应用到索引 [y,n,q,a,d%s,?]? "
 
@@ -516,23 +516,23 @@ msgstr ""
 "a - 应用该块和本文件中后面的全部块\n"
 "d - 不要应用该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
 msgstr "从工作区中丢弃模式变更 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
 msgstr "从工作区中丢弃删除动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
 msgstr "从工作区中丢弃添加动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
 msgstr "从工作区中丢弃该块 [y,n,q,a,d%s,?]? "
 
@@ -556,23 +556,23 @@ msgstr ""
 "a - 丢弃该块和本文件中后面的全部块\n"
 "d - 不要丢弃该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "从索引和工作区中丢弃模式变更 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "从索引和工作区中丢弃删除动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "从索引和工作区中丢弃添加动作 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
 msgstr "从索引和工作区中丢弃该块 [y,n,q,a,d%s,?]? "
 
@@ -590,23 +590,23 @@ msgstr ""
 "a - 丢弃该块和本文件中后面的全部块\n"
 "d - 不要丢弃该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "将模式变更应用到索引和工作区 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "将删除操作应用到索引和工作区 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "将添加操作应用到索引和工作区 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
 msgstr "将该块应用到索引和工作区 [y,n,q,a,d%s,?]? "
 
@@ -624,23 +624,23 @@ msgstr ""
 "a - 应用该块和本文件中后面的全部块\n"
 "d - 不要应用该块和本文件中后面的全部块\n"
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
 msgstr "将模式变更应用到工作区 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
 msgstr "将删除操作应用到工作区 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
 msgstr "将添加操作应用到工作区 [y,n,q,a,d%s,?]? "
 
-#: add-patch.c git-add--interactive.perl
-#, c-format, perl-format
+#: add-patch.c
+#, c-format
 msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
 msgstr "将该块应用到工作区 [y,n,q,a,d%s,?]? "
 
@@ -708,7 +708,7 @@ msgstr ""
 "\t不是结尾于:\n"
 "%.*s"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "Manual hunk edit mode -- see bottom for a quick guide.\n"
 msgstr "手动块编辑模式 -- 查看底部的快速指南。\n"
 
@@ -725,9 +725,7 @@ msgstr ""
 "要删除 '%c' 开始的行,删除它们。\n"
 "以 %c 开始的行将被删除。\n"
 
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: 'it' refers to the patch mentioned in the previous messages.
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid ""
 "If it does not apply cleanly, you will be given an opportunity to\n"
 "edit again.  If all lines of the hunk are removed, then the edit is\n"
@@ -744,21 +742,13 @@ msgstr "无法解析数据块头信息"
 msgid "'git apply --cached' failed"
 msgstr "'git apply --cached' 失败"
 
-#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
 #. The program will only accept that input at this point.
 #. Consider translating (saying "no" discards!) as
 #. (saying "n" for "no" discards!) if the translation
 #. of the word "no" does not start with n.
 #.
-#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
-#. TRANSLATORS: do not translate [y/n]
-#. The program will only accept that input
-#. at this point.
-#. Consider translating (saying "no" discards!) as
-#. (saying "n" for "no" discards!) if the translation
-#. of the word "no" does not start with n.
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr "您的编辑块不能被应用。重新编辑(选择 \"no\" 丢弃!) [y/n]? "
@@ -767,11 +757,11 @@ msgstr "您的编辑块不能被应用。重新编辑(选择 \"no\" 丢弃!
 msgid "The selected hunks do not apply to the index!"
 msgstr "选中的块不能应用到索引!"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "Apply them to the worktree anyway? "
 msgstr "无论如何都要应用到工作区么?"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "Nothing was applied.\n"
 msgstr "未应用。\n"
 
@@ -809,11 +799,11 @@ msgstr "没有下一个块"
 msgid "No other hunks to goto"
 msgstr "没有其它可供跳转的块"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "go to which hunk (<ret> to see more)? "
 msgstr "跳转到哪个块(<回车> 查看更多)? "
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "go to which hunk? "
 msgstr "跳转到哪个块?"
 
@@ -833,7 +823,7 @@ msgstr[1] "对不起,只有 %d 个可用块。"
 msgid "No other hunks to search"
 msgstr "没有其它可供查找的块"
 
-#: add-patch.c git-add--interactive.perl
+#: add-patch.c
 msgid "search for regex? "
 msgstr "使用正则表达式搜索?"
 
@@ -1413,7 +1403,7 @@ msgstr "不能为新建文件 %s 创建后端存储"
 msgid "unable to add cache entry for %s"
 msgstr "无法为 %s 添加缓存条目"
 
-#: apply.c builtin/bisect--helper.c builtin/gc.c
+#: apply.c builtin/bisect.c builtin/gc.c
 #, c-format
 msgid "failed to write to '%s'"
 msgstr "无法写入 '%s'"
@@ -1748,7 +1738,7 @@ msgstr "格式"
 msgid "archive format"
 msgstr "归档格式"
 
-#: archive.c builtin/log.c
+#: archive.c builtin/log.c parse-options.h
 msgid "prefix"
 msgstr "前缀"
 
@@ -1782,6 +1772,15 @@ msgstr "读取工作区中的 .gitattributes"
 msgid "report archived files on stderr"
 msgstr "在标准错误上报告归档文件"
 
+#: archive.c builtin/clone.c builtin/fetch.c builtin/pack-objects.c
+#: builtin/pull.c
+msgid "time"
+msgstr "时间"
+
+#: archive.c
+msgid "set modification time of archive entries"
+msgstr "设置归档条目的修改时间"
+
 #: archive.c
 msgid "set compression level"
 msgstr "设置压缩级别"
@@ -1837,6 +1836,15 @@ msgstr "参数不支持此格式 '%s':-%d"
 msgid "%.*s is not a valid attribute name"
 msgstr "%.*s 不是一个有效的属性名"
 
+#: attr.c
+msgid "unable to add additional attribute"
+msgstr "不能添加额外属性"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "忽略过长的属性行 %d"
+
 #: attr.c
 #, c-format
 msgid "%s not allowed: %s:%d"
@@ -1850,6 +1858,21 @@ msgstr ""
 "负值模版在 git attributes 中被忽略\n"
 "当字符串确实要以感叹号开始时,使用 '\\!'。"
 
+#: attr.c
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "无法 fstat gitattributes 文件 '%s'"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "忽略过大的 gitattributes 文件 '%s'"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "忽略过大的 gitattributes 数据对象 '%s'"
+
 #: bisect.c
 #, c-format
 msgid "Badly quoted content in file '%s': %s"
@@ -1982,8 +2005,8 @@ msgid "--reverse and --first-parent together require specified latest commit"
 msgstr "--reverse 和 --first-parent 共用,需要指定最新的提交"
 
 #: blame.c builtin/commit.c builtin/log.c builtin/merge.c
-#: builtin/pack-objects.c builtin/shortlog.c bundle.c midx.c pack-bitmap.c
-#: ref-filter.c remote.c sequencer.c submodule.c
+#: builtin/pack-objects.c builtin/shortlog.c midx.c pack-bitmap.c ref-filter.c
+#: remote.c sequencer.c submodule.c
 msgid "revision walk setup failed"
 msgstr "版本遍历初始化失败"
 
@@ -2161,10 +2184,11 @@ msgstr "子模组 '%s':无法找到子模组"
 #: branch.c
 #, c-format
 msgid ""
-"You may try updating the submodules using 'git checkout %s && git submodule "
-"update --init'"
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
 msgstr ""
-"你可以用 'git checkout %s && git submodule update --init' 来尝试更新子模组"
+"你可以用 'git checkout --no-recurse-submodules %s && git submodule update --"
+"init' 来尝试更新子模组"
 
 #: branch.c
 #, c-format
@@ -2208,6 +2232,14 @@ msgstr "删除 '%s'\n"
 msgid "Unstaged changes after refreshing the index:"
 msgstr "刷新索引之后尚未被暂存的变更:"
 
+#: builtin/add.c
+msgid ""
+"the add.interactive.useBuiltin setting has been removed!\n"
+"See its entry in 'git help config' for details."
+msgstr ""
+"设置 add.interactive.useBuiltin 已经被移除!\n"
+"查看 'git help config' 中的相关条目以获取更多信息。"
+
 #: builtin/add.c builtin/rev-parse.c
 msgid "Could not read the index"
 msgstr "不能读取索引"
@@ -2659,7 +2691,7 @@ msgid ""
 "Not rewinding to ORIG_HEAD"
 msgstr "您好像在上一次 'am' 失败后移动了 HEAD。未回退至 ORIG_HEAD"
 
-#: builtin/am.c builtin/bisect--helper.c worktree.c
+#: builtin/am.c builtin/bisect.c worktree.c
 #, c-format
 msgid "failed to read '%s'"
 msgstr "无法读取 '%s'"
@@ -2681,6 +2713,10 @@ msgstr "git am [<选项>] (--continue | --skip | --abort)"
 msgid "run interactively"
 msgstr "以交互式方式运行"
 
+#: builtin/am.c
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "绕过 pre-applypatch 和 applypatch-msg 钩子"
+
 #: builtin/am.c
 msgid "historical option -- no-op"
 msgstr "老的参数 —— 无作用"
@@ -2870,110 +2906,105 @@ msgstr "git archive:协议错误"
 msgid "git archive: expected a flush"
 msgstr "git archive:应有一个 flush 包"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr "git bisect--helper --bisect-reset [<提交>]"
-
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<term> --term-{old,good}"
-"=<term>] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] "
-"[<paths>...]"
+"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]    [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--]    [<pathspec>...]"
 msgstr ""
-"git bisect--helper --bisect-start [--term-{new,bad}=<术语> --term-{old,good}"
-"=<术语>] [--no-checkout] [--first-parent] [<坏> [<好>...]] [--] [<路径>...]"
+"git bisect start [--term-{new,bad}=<术语> --term-{old,good}=<术语>]    [--no-"
+"checkout] [--first-parent] [<坏> [<好>...]] [--]    [<路径规格>...]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
-msgstr "git bisect--helper --bisect-state (bad|new) [<版本>]"
+#: builtin/bisect.c
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "git bisect (good|bad) [<版本>...]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
-msgstr "git bisect--helper --bisect-state (good|old) [<版本>...]"
+#: builtin/bisect.c
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<版本>|<范围>)...]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-replay <filename>"
-msgstr "git bisect--helper --bisect-replay <文件>"
+#: builtin/bisect.c
+msgid "git bisect reset [<commit>]"
+msgstr "git bisect reset [<提交>]"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
-msgstr "git bisect--helper --bisect-skip [(<版本>|<范围>)...]"
+#: builtin/bisect.c
+msgid "git bisect replay <logfile>"
+msgstr "git bisect replay <日志文件>"
 
-#: builtin/bisect--helper.c
-msgid "git bisect--helper --bisect-run <cmd>..."
-msgstr "git bisect--helper --bisect-run <命令>..."
+#: builtin/bisect.c
+msgid "git bisect run <cmd>..."
+msgstr "git bisect run <命令>..."
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot open file '%s' in mode '%s'"
 msgstr "不能以 '%2$s' 模式打开文件 '%1$s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "could not write to file '%s'"
 msgstr "不能写入文件 '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot open file '%s' for reading"
 msgstr "不能打开文件 '%s' 来读取"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s' is not a valid term"
 msgstr "'%s' 不是一个有效的术语"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "can't use the builtin command '%s' as a term"
 msgstr "不能使用内置命令 '%s' 作为术语"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "can't change the meaning of the term '%s'"
 msgstr "不能修改术语 '%s' 的含义"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "please use two different terms"
 msgstr "请使用两个不同的术语"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "We are not bisecting.\n"
 msgstr "我们没有在二分查找。\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s' is not a valid commit"
 msgstr "'%s' 不是一个有效的提交"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "could not check out original HEAD '%s'. Try 'git bisect reset <commit>'."
 msgstr "不能检出原始 HEAD '%s'。尝试 'git bisect reset <提交>'。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Bad bisect_write argument: %s"
 msgstr "坏的 bisect_write 参数:%s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "couldn't get the oid of the rev '%s'"
 msgstr "无法获取版本 '%s' 的对象 ID"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "couldn't open the file '%s'"
 msgstr "无法打开文件 '%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Invalid command: you're currently in a %s/%s bisect"
 msgstr "无效的命令:您当前正处于一个 %s/%s 二分查找中"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "You need to give me at least one %s and %s revision.\n"
@@ -2982,7 +3013,7 @@ msgstr ""
 "您需要给我至少一个 %s 和一个 %s 版本。\n"
 "为此您可以用 \"git bisect %s\" 和 \"git bisect %s\"。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "You need to start by \"git bisect start\".\n"
@@ -2993,7 +3024,7 @@ msgstr ""
 "然后需要提供我至少一个 %s 和一个 %s 版本。\n"
 "为此您可以用 \"git bisect %s\" 和 \"git bisect %s\" 命令。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "bisecting only with a %s commit"
 msgstr "在只有一个 %s 提交的情况下二分查找"
@@ -3002,37 +3033,37 @@ msgstr "在只有一个 %s 提交的情况下二分查找"
 #. translation. The program will only accept English input
 #. at this point.
 #.
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "Are you sure [Y/n]? "
 msgstr "您确认么[Y/n]? "
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "status: waiting for both good and bad commits\n"
 msgstr "状态:正在等待好的和坏的提交\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "status: waiting for bad commit, %d good commit known\n"
 msgid_plural "status: waiting for bad commit, %d good commits known\n"
 msgstr[0] "状态:正在等待坏的提交,已知 %d 个好的提交\n"
 msgstr[1] "状态:正在等待坏的提交,已知 %d 个好的提交\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "status: waiting for good commit(s), bad commit known\n"
 msgstr "状态:正在等待好的提交,已知坏的提交\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "no terms defined"
 msgstr "未定义术语"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "Your current terms are %s for the old state\n"
 "and %s for the new state.\n"
 msgstr "您当前针对旧状态的术语是 %s,对新状态的术语是 %s。\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid ""
 "invalid argument %s for 'git bisect terms'.\n"
@@ -3041,52 +3072,48 @@ msgstr ""
 "命令 'git bisect terms' 的参数 %s 无效。\n"
 "支持的选项有:--term-good|--term-old 和 --term-bad|--term-new。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "revision walk setup failed\n"
 msgstr "版本遍历设置失败\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "could not open '%s' for appending"
 msgstr "无法打开 '%s' 进行追加"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "'' is not a valid term"
 msgstr "'' 不是一个有效的术语"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "unrecognized option: '%s'"
 msgstr "未识别的选项:'%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s' does not appear to be a valid revision"
 msgstr "'%s' 看起来不是一个有效的版本"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bad HEAD - I need a HEAD"
 msgstr "坏的 HEAD - 我需要一个 HEAD"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
 msgstr "检出 '%s' 失败。尝试 'git bisect start <有效分支>'。"
 
-#: builtin/bisect--helper.c
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "不会在做了 cg-seek 的树上做二分查找"
-
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bad HEAD - strange symbolic ref"
 msgstr "坏的 HEAD - 奇怪的符号引用"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "invalid ref: '%s'"
 msgstr "无效的引用:'%s'"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "You need to start by \"git bisect start\"\n"
 msgstr "您需要执行 \"git bisect start\" 来开始\n"
 
@@ -3094,113 +3121,122 @@ msgstr "您需要执行 \"git bisect start\" 来开始\n"
 #. translation. The program will only accept English input
 #. at this point.
 #.
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "Do you want me to do it for you [Y/n]? "
 msgstr "您想让我为您这样做么[Y/n]? "
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "Please call `--bisect-state` with at least one argument"
 msgstr "请使用至少一个参数调用 `--bisect-state`"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'git bisect %s' can take only one argument."
 msgstr "'git bisect %s' 只能带一个参数。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Bad rev input: %s"
 msgstr "坏的版本输入:%s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "Bad rev input (not a commit): %s"
 msgstr "坏的版本输入(不是提交):%s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "We are not bisecting."
 msgstr "我们没有在二分查找。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "'%s'?? what are you talking about?"
 msgstr "'%s'?? 您在说什么?"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot read file '%s' for replaying"
 msgstr "不能读取文件 '%s' 来重放"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "running %s\n"
 msgstr "正在执行 %s\n"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bisect run failed: no command provided."
 msgstr "二分查找运行失败:没有提供命令。"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
-msgid "unable to verify '%s' on good revision"
-msgstr "无法在好版本中验证 '%s'"
+msgid "unable to verify %s on good revision"
+msgstr "无法在好版本中验证 %s"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "bogus exit code %d for good revision"
 msgstr "好版本返回错误的退出码 %d"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
-msgid "bisect run failed: exit code %d from '%s' is < 0 or >= 128"
-msgstr "二分查找运行失败:命令 '%2$s' 的退出码 %1$d < 0 或 >= 128"
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
+msgstr "二分查找运行失败:命令 %2$s 的退出码 %1$d < 0 或 >= 128"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
 msgid "cannot open file '%s' for writing"
 msgstr "无法打开文件 '%s' 进行写入"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "bisect run cannot continue any more"
 msgstr "二分查找不能继续运行"
 
-#: builtin/bisect--helper.c
-#, c-format
+#: builtin/bisect.c
 msgid "bisect run success"
 msgstr "二分查找运行成功"
 
-#: builtin/bisect--helper.c
-#, c-format
+#: builtin/bisect.c
 msgid "bisect found first bad commit"
 msgstr "二分查找找到了第一个坏的提交"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 #, c-format
-msgid ""
-"bisect run failed: 'git bisect--helper --bisect-state %s' exited with error "
-"code %d"
-msgstr "二分查找运行失败:'git bisect--helper --bisect-state %s' 退出码为 %d"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
+msgstr "二分查找运行失败:'git bisect %s' 退出码为 %d"
 
-#: builtin/bisect--helper.c
-msgid "--bisect-reset requires either no argument or a commit"
-msgstr "--bisect-reset 无需参数或者需要一个提交"
-
-#: builtin/bisect--helper.c
-msgid "--bisect-terms requires 0 or 1 argument"
-msgstr "--bisect-terms 需要 0 或 1 个参数"
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "'%s' 无需参数或者需要一个提交"
 
-#: builtin/bisect--helper.c
-msgid "--bisect-next requires 0 arguments"
-msgstr "--bisect-next 需要 0 个参数"
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "'%s' 无需参数或者需要一个参数"
 
-#: builtin/bisect--helper.c
-msgid "--bisect-log requires 0 arguments"
-msgstr "--bisect-log 需要 0 个参数"
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "'%s' 无需参数"
 
-#: builtin/bisect--helper.c
+#: builtin/bisect.c
 msgid "no logfile given"
 msgstr "未提供日志文件"
 
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "'%s' 运行失败:没有提供命令。"
+
+#: builtin/bisect.c
+msgid "need a command"
+msgstr "需要一个命令"
+
+#: builtin/bisect.c builtin/cat-file.c
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "未知命令:'%s'"
+
 #: builtin/blame.c
 msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
 msgstr "git blame [<选项>] [<版本选项>] [<版本>] [--] <文件>"
@@ -3912,6 +3948,10 @@ msgstr "git bundle list-heads <文件> [<引用名>...]"
 msgid "git bundle unbundle [--progress] <file> [<refname>...]"
 msgstr "git bundle unbundle [--progress] <文件> [<引用名>...]"
 
+#: builtin/bundle.c
+msgid "need a <file> argument"
+msgstr "需要一个 <文件> 参数"
+
 #: builtin/bundle.c builtin/pack-objects.c
 msgid "do not show progress meter"
 msgstr "不显示进度表"
@@ -3981,11 +4021,6 @@ msgstr "%s 需要参数"
 msgid "%s takes no arguments"
 msgstr "%s 不需要参数"
 
-#: builtin/cat-file.c
-#, c-format
-msgid "unknown command: '%s'"
-msgstr "未知命令:'%s'"
-
 #: builtin/cat-file.c
 msgid "only one batch option may be specified"
 msgstr "只能指定一个批处理选项"
@@ -4155,12 +4190,17 @@ msgid "only two arguments allowed in <type> <object> mode, not %d"
 msgstr "<类型> <对象> 模式只允许两个参数,而不是 %d 个"
 
 #: builtin/check-attr.c
-msgid "git check-attr [-a | --all | <attr>...] [--] <pathname>..."
-msgstr "git check-attr [-a | --all | <属性>...] [--] <路径名>..."
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <树对象>] [-a | --all | <属性>...] [--] <路径名>..."
 
 #: builtin/check-attr.c
-msgid "git check-attr --stdin [-z] [-a | --all | <attr>...]"
-msgstr "git check-attr --stdin [-z] [-a | --all | <属性>...]"
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <树对象>] [-a | --all | <属性>...]"
 
 #: builtin/check-attr.c
 msgid "report all attributes set on file"
@@ -4178,6 +4218,14 @@ msgstr "从标准输入读出文件名"
 msgid "terminate input and output records by a NUL character"
 msgstr "输入和输出的记录使用 NUL 字符终结"
 
+#: builtin/check-attr.c
+msgid "<tree-ish>"
+msgstr "<树对象>"
+
+#: builtin/check-attr.c
+msgid "which tree-ish to check attributes at"
+msgstr "要用哪一个树对象来检查属性"
+
 #: builtin/check-ignore.c builtin/checkout.c builtin/gc.c builtin/worktree.c
 msgid "suppress progress reporting"
 msgstr "不显示进度报告"
@@ -4849,7 +4897,7 @@ msgstr "拒绝删除当前工作目录\n"
 msgid "Would refuse to remove current working directory\n"
 msgstr "将拒绝删除当前工作目录\n"
 
-#: builtin/clean.c git-add--interactive.perl
+#: builtin/clean.c
 #, c-format
 msgid ""
 "Prompt help:\n"
@@ -4862,7 +4910,7 @@ msgstr ""
 "foo        - 通过唯一前缀选择一个选项\n"
 "           - (空)什么也不选择\n"
 
-#: builtin/clean.c git-add--interactive.perl
+#: builtin/clean.c
 #, c-format
 msgid ""
 "Prompt help:\n"
@@ -4883,8 +4931,8 @@ msgstr ""
 "*          - 选择所有选项\n"
 "           - (空)结束选择\n"
 
-#: builtin/clean.c git-add--interactive.perl
-#, c-format, perl-format
+#: builtin/clean.c
+#, c-format
 msgid "Huh (%s)?\n"
 msgstr "嗯(%s)?\n"
 
@@ -5073,10 +5121,6 @@ msgstr "深度"
 msgid "create a shallow clone of that depth"
 msgstr "创建一个指定深度的浅克隆"
 
-#: builtin/clone.c builtin/fetch.c builtin/pack-objects.c builtin/pull.c
-msgid "time"
-msgstr "时间"
-
 #: builtin/clone.c
 msgid "create a shallow clone since a specific time"
 msgstr "从一个特定时间创建一个浅克隆"
@@ -5364,6 +5408,10 @@ msgstr "无法初始化仓库,跳过归档包 URI"
 msgid "failed to fetch objects from bundle URI '%s'"
 msgstr "无法从归档包 URI '%s' 获取对象"
 
+#: builtin/clone.c
+msgid "failed to fetch advertised bundles"
+msgstr "无法获取公布的归档包"
+
 #: builtin/clone.c
 msgid "remote transport reported error"
 msgstr "远程传输报告错误"
@@ -5733,7 +5781,7 @@ msgid ""
 "in the current commit message"
 msgstr "无法选择一个未被当前提交说明使用的注释字符"
 
-#: builtin/commit.c
+#: builtin/commit.c builtin/merge-tree.c
 #, c-format
 msgid "could not lookup commit %s"
 msgstr "不能查询提交 %s"
@@ -6035,7 +6083,7 @@ msgstr "日期"
 msgid "override date for commit"
 msgstr "提交时覆盖日期"
 
-#: builtin/commit.c parse-options.h ref-filter.h
+#: builtin/commit.c builtin/merge-tree.c parse-options.h ref-filter.h
 msgid "commit"
 msgstr "提交"
 
@@ -6186,7 +6234,7 @@ msgstr ""
 msgid "git config [<options>]"
 msgstr "git config [<选项>]"
 
-#: builtin/config.c builtin/env--helper.c
+#: builtin/config.c
 #, c-format
 msgid "unrecognized --type argument, %s"
 msgstr "未能识别的 --type 参数,%s"
@@ -6295,11 +6343,11 @@ msgstr "获得颜色设置:配置 [stdout-is-tty]"
 msgid "Type"
 msgstr "类型"
 
-#: builtin/config.c builtin/env--helper.c builtin/hash-object.c
+#: builtin/config.c builtin/hash-object.c
 msgid "type"
 msgstr "类型"
 
-#: builtin/config.c builtin/env--helper.c
+#: builtin/config.c
 msgid "value is given this type"
 msgstr "取值为该类型"
 
@@ -6351,7 +6399,7 @@ msgstr "显示配置的来源(文件、标准输入、数据对象,或命令
 msgid "show scope of config (worktree, local, global, system, command)"
 msgstr "显示配置的作用域(工作区、本地、全局、系统、命令)"
 
-#: builtin/config.c builtin/env--helper.c
+#: builtin/config.c
 msgid "value"
 msgstr "取值"
 
@@ -6886,30 +6934,6 @@ msgstr "没有为 --tool=<工具> 参数提供 <工具>"
 msgid "no <cmd> given for --extcmd=<cmd>"
 msgstr "没有为 --extcmd=<命令> 参数提供 <命令>"
 
-#: builtin/env--helper.c
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr "git env--helper --type=[bool|ulong] <选项> <环境变量>"
-
-#: builtin/env--helper.c
-msgid "default for git_env_*(...) to fall back on"
-msgstr "git_env_*(...) 的默认值"
-
-#: builtin/env--helper.c
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr "安静模式,只使用 git_env_*() 的值作为退出码"
-
-#: builtin/env--helper.c
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr "选项 `--default' 和 `--type=bool` 期望一个布尔值,不是 `%s`"
-
-#: builtin/env--helper.c
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not "
-"`%s`"
-msgstr "选项 `--default' 和 `--type=ulong` 期望一个无符号长整型,不是 `%s`"
-
 #: builtin/fast-export.c
 msgid "git fast-export [<rev-list-opts>]"
 msgstr "git fast-export [<rev-list 选项>]"
@@ -7403,6 +7427,11 @@ msgstr "--deepen 不支持负数深度"
 msgid "--unshallow on a complete repository does not make sense"
 msgstr "对于一个完整的仓库,参数 --unshallow 没有意义"
 
+#: builtin/fetch.c
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "无法从 '%s' 获取归档包"
+
 #: builtin/fetch.c
 msgid "fetch --all does not take a repository argument"
 msgstr "fetch --all 不能带一个仓库参数"
@@ -8694,13 +8723,21 @@ msgid "'git help config' for more information"
 msgstr "'git help config' 获取更多信息"
 
 #: builtin/hook.c
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
-msgstr "git hook run [--ignore-missing] <钩子名称> [-- <钩子参数>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"git hook run [--ignore-missing] [--to-stdin=<路径>] <钩子名称> [-- <钩子参数"
+">]"
 
 #: builtin/hook.c
 msgid "silently ignore missing requested <hook-name>"
 msgstr "静默地忽略缺失的 <钩子名称>"
 
+#: builtin/hook.c
+msgid "file to read into hooks' stdin"
+msgstr "读取至钩子标准输入的文件"
+
 #: builtin/index-pack.c
 #, c-format
 msgid "object type mismatch at %s"
@@ -9749,11 +9786,11 @@ msgstr ""
 msgid ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
-"              [--symref] [<repository> [<refs>...]]"
+"              [--symref] [<repository> [<patterns>...]]"
 msgstr ""
 "git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<可执行文件>]\n"
 "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<键>]\n"
-"              [--symref] [<仓库> [<引用>...]]"
+"              [--symref] [<仓库> [<模式>...]]"
 
 #: builtin/ls-remote.c
 msgid "do not print remote URL"
@@ -10072,10 +10109,18 @@ msgstr "允许合并不相关的历史"
 msgid "perform multiple merges, one per line of input"
 msgstr "实施多个合并,每输入行一个"
 
+#: builtin/merge-tree.c
+msgid "specify a merge-base for the merge"
+msgstr "指定用于合并的合并基线"
+
 #: builtin/merge-tree.c
 msgid "--trivial-merge is incompatible with all other options"
 msgstr "--trivial-merge 与其他所有选项不兼容"
 
+#: builtin/merge-tree.c
+msgid "--merge-base is incompatible with --stdin"
+msgstr "--merge-base 与 --stdin 不兼容"
+
 #: builtin/merge-tree.c builtin/notes.c
 #, c-format
 msgid "malformed input line: '%s'."
@@ -12088,7 +12133,7 @@ msgstr "需要远端支持原子事务"
 msgid "--delete doesn't make sense without any refs"
 msgstr "--delete 未接任何引用没有意义"
 
-#: builtin/push.c
+#: builtin/push.c t/helper/test-bundle-uri.c
 #, c-format
 msgid "bad repository '%s'"
 msgstr "坏的仓库 '%s'"
@@ -12357,6 +12402,10 @@ msgstr ""
 msgid "could not switch to %s"
 msgstr "无法切换到 %s"
 
+#: builtin/rebase.c
+msgid "apply options and merge options cannot be used together"
+msgstr "应用选项和合并选项不能同时使用"
+
 #: builtin/rebase.c
 #, c-format
 msgid ""
@@ -12636,8 +12685,16 @@ msgid "--strategy requires --merge or --interactive"
 msgstr "--strategy 需要 --merge 或 --interactive"
 
 #: builtin/rebase.c
-msgid "apply options and merge options cannot be used together"
-msgstr "应用选项和合并选项不能同时使用"
+msgid ""
+"apply options are incompatible with rebase.autosquash.  Consider adding --no-"
+"autosquash"
+msgstr "应用的选项与 rebase.autosquash 不兼容。考虑加上 --no-autosquash"
+
+#: builtin/rebase.c
+msgid ""
+"apply options are incompatible with rebase.updateRefs.  Consider adding --no-"
+"update-refs"
+msgstr "应用的选项与 rebase.updateRefs 不兼容。考虑加上 --no-update-refs"
 
 #: builtin/rebase.c
 #, c-format
@@ -15680,11 +15737,6 @@ msgstr "'%s' 不是一个有效的子模组名称"
 msgid "git submodule--helper <command>"
 msgstr "git submodule--helper <命令>"
 
-#: builtin/submodule--helper.c git.c
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s 不支持 --super-prefix"
-
 #: builtin/symbolic-ref.c
 msgid "git symbolic-ref [-m <reason>] <name> <ref>"
 msgstr "git symbolic-ref [-m <理由>] <名称> <引用>"
@@ -16588,6 +16640,11 @@ msgstr "只对调试有用"
 msgid "core.fsyncMethod = batch is unsupported on this platform"
 msgstr "core.fsyncMethod = batch 不支持本平台"
 
+#: bundle-uri.c
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "不能解析归档包列表键 %s 的值 '%s'"
+
 #: bundle-uri.c
 #, c-format
 msgid "bundle list at '%s' has no mode"
@@ -16601,6 +16658,15 @@ msgstr "无法创建临时文件"
 msgid "insufficient capabilities"
 msgstr "缺乏能力"
 
+#: bundle-uri.c
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "下载自 '%s' 的文件不是归档包"
+
+#: bundle-uri.c
+msgid "failed to store maximum creation token"
+msgstr "无法储存最大的创建令牌"
+
 #: bundle-uri.c
 #, c-format
 msgid "unrecognized bundle mode from URI '%s'"
@@ -16621,6 +16687,15 @@ msgstr "无法从 URI '%s' 下载归档包"
 msgid "file at URI '%s' is not a bundle or bundle list"
 msgstr "位于 URI '%s' 的文件不是归档包或归档包列表"
 
+#: bundle-uri.c
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: 意外的参数:'%s'"
+
+#: bundle-uri.c
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: 在参数之后应有一个 flush"
+
 #: bundle-uri.c
 msgid "bundle-uri: got an empty line"
 msgstr "bundle-uri: 获得了空行"
@@ -16661,6 +16736,12 @@ msgstr "仓库中缺少这些必备的提交:"
 msgid "need a repository to verify a bundle"
 msgstr "需要一个仓库来校验一个归档包"
 
+#: bundle.c
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr "一些前置提交存在于对象储存中,但未连接于本仓库的历史"
+
 #: bundle.c
 #, c-format
 msgid "The bundle contains this ref:"
@@ -18439,17 +18520,26 @@ msgstr "服务器给出未知的对象格式 '%s'"
 
 #: connect.c
 #, c-format
-msgid "invalid ls-refs response: %s"
-msgstr "无效的 ls-refs 响应:%s"
+msgid "error on bundle-uri response line %d: %s"
+msgstr "于 bundle-uri 响应行 %d 发生错误:%s"
 
 #: connect.c
-msgid "expected flush after ref listing"
-msgstr "在引用列表之后应该有一个 flush 包"
+msgid "expected flush after bundle-uri listing"
+msgstr "在 bundle-uri 列表之后应该有一个 flush 包"
 
 #: connect.c
 msgid "expected response end packet after ref listing"
 msgstr "在引用列表之后应该有响应结束包"
 
+#: connect.c
+#, c-format
+msgid "invalid ls-refs response: %s"
+msgstr "无效的 ls-refs 响应:%s"
+
+#: connect.c
+msgid "expected flush after ref listing"
+msgstr "在引用列表之后应该有一个 flush 包"
+
 #: connect.c
 #, c-format
 msgid "protocol '%s' is not supported"
@@ -19861,16 +19951,14 @@ msgid ""
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-"           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
-"           <command> [<args>]"
+"           [--config-env=<name>=<envvar>] <command> [<args>]"
 msgstr ""
-"git [-v | --version] [--help] [-C <路径>] [-c <名称>=<取值>]\n"
+"git [-v | --version] [-h | --help] [-C <路径>] [-c <名称>=<取值>]\n"
 "           [--exec-path[=<路径>]] [--html-path] [--man-path] [--info-path]\n"
 "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
 "bare]\n"
 "           [--git-dir=<路径>] [--work-tree=<路径>] [--namespace=<名称>]\n"
-"           [--super-prefix=<路径>] [--config-env=<名称>=<环境变量>]\n"
-"           <命令> [<参数>]"
+"           [--config-env=<名称>=<环境变量>] <命令> [<参数>]"
 
 #: git.c
 msgid ""
@@ -19899,11 +19987,6 @@ msgstr "没有为 '%s' 选项提供目录\n"
 msgid "no namespace given for --namespace\n"
 msgstr "没有为 --namespace 提供命名空间\n"
 
-#: git.c
-#, c-format
-msgid "no prefix given for --super-prefix\n"
-msgstr "没有为 --super-prefix 提供前缀\n"
-
 #: git.c
 #, c-format
 msgid "-c expects a configuration string\n"
@@ -20038,8 +20121,13 @@ msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
 msgstr "gpg.ssh.defaultKeyCommand 失败:%s %s"
 
 #: gpg-interface.c
-msgid "gpg failed to sign the data"
-msgstr "gpg 无法为数据签名"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"gpg 无法为数据签名:\n"
+"%s"
 
 #: gpg-interface.c
 msgid "user.signingKey needs to be set for ssh signing"
@@ -21384,6 +21472,11 @@ msgstr "损坏的松散对象 '%s'"
 msgid "garbage at end of loose object '%s'"
 msgstr "松散对象 '%s' 后面有垃圾数据"
 
+#: object-file.c
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "无法打开松散对象 %s"
+
 #: object-file.c
 #, c-format
 msgid "unable to parse %s header"
@@ -21405,19 +21498,14 @@ msgstr "%s 的头部太长,超出了 %d 字节"
 
 #: object-file.c
 #, c-format
-msgid "failed to read object %s"
-msgstr "æ\97 æ³\95读å\8f\96对象 %s"
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "æ\9d¾æ\95£å¯¹è±¡ %sï¼\88ä¿\9då­\98å\9c¨ %sï¼\89å·²æ\8d\9få\9d\8f"
 
 #: object-file.c
 #, c-format
 msgid "replacement %s not found for %s"
 msgstr "找不到 %2$s 的替代 %1$s"
 
-#: object-file.c
-#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr "松散对象 %s(保存在 %s)已损坏"
-
 #: object-file.c
 #, c-format
 msgid "packed object %s (stored in %s) is corrupt"
@@ -21433,10 +21521,6 @@ msgstr "无法写文件 %s"
 msgid "unable to set permission to '%s'"
 msgstr "无法为 '%s' 设置权限"
 
-#: object-file.c
-msgid "file write error"
-msgstr "文件写错误"
-
 #: object-file.c
 msgid "error when closing loose object file"
 msgstr "关闭松散对象文件时出错"
@@ -21495,12 +21579,13 @@ msgid "cannot read object for %s"
 msgstr "不能读取对象 %s"
 
 #: object-file.c
-msgid "corrupt commit"
-msgstr "损坏的提交"
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "对象 fsck 失败:%s"
 
 #: object-file.c
-msgid "corrupt tag"
-msgstr "æ\8d\9få\9d\8fç\9a\84æ \87ç­¾"
+msgid "refusing to create malformed object"
+msgstr "æ\8b\92ç»\9då\88\9b建格å¼\8fé\94\99误ç\9a\84对象"
 
 #: object-file.c
 #, c-format
@@ -21810,11 +21895,6 @@ msgstr "位图包索引中 XOR 偏移值无效"
 msgid "cannot fstat bitmap file"
 msgstr "不能对位图文件调用 fstat"
 
-#: pack-bitmap.c
-#, c-format
-msgid "ignoring extra bitmap file: '%s'"
-msgstr "忽略额外的位图文件:'%s'"
-
 #: pack-bitmap.c
 msgid "checksum doesn't match in MIDX and bitmap"
 msgstr "MIDX 和位图中的校验码不匹配"
@@ -22141,6 +22221,10 @@ msgstr "更加安静"
 msgid "use <n> digits to display object names"
 msgstr "用 <n> 位数字显示对象名"
 
+#: parse-options.h
+msgid "prefixed path to initial superproject"
+msgstr "用来初始化父项目的前缀路径"
+
 #: parse-options.h
 msgid "how to strip spaces and #comments from message"
 msgstr "设置如何删除提交说明里的空格和#注释"
@@ -22723,6 +22807,16 @@ msgstr "落后 %d"
 msgid "ahead %d, behind %d"
 msgstr "领先 %d,落后 %d"
 
+#: ref-filter.c
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) 不带参数"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "未能识别的 %%(%.*s) 参数:%s"
+
 #: ref-filter.c
 #, c-format
 msgid "expected format: %%(color:<color>)"
@@ -22743,26 +22837,6 @@ msgstr "期望整数值 refname:lstrip=%s"
 msgid "Integer value expected refname:rstrip=%s"
 msgstr "期望整数值 refname:rstrip=%s"
 
-#: ref-filter.c
-#, c-format
-msgid "unrecognized %%(%s) argument: %s"
-msgstr "未能识别的 %%(%s) 参数:%s"
-
-#: ref-filter.c
-#, c-format
-msgid "%%(objecttype) does not take arguments"
-msgstr "%%(objecttype) 不带参数"
-
-#: ref-filter.c
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr "%%(deltabase) 不带参数"
-
-#: ref-filter.c
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "%%(body) 不带参数"
-
 #: ref-filter.c
 #, c-format
 msgid "expected %%(trailers:key=<value>)"
@@ -22783,11 +22857,6 @@ msgstr "期望一个正数 contents:lines=%s"
 msgid "positive value expected '%s' in %%(%s)"
 msgstr "期望 %%(%2$s) 中的 '%1$s' 是一个正数"
 
-#: ref-filter.c
-#, c-format
-msgid "unrecognized email option: %s"
-msgstr "未识别的邮件选项:%s"
-
 #: ref-filter.c
 #, c-format
 msgid "expected format: %%(align:<width>,<position>)"
@@ -22805,13 +22874,13 @@ msgstr "未能识别的宽度:%s"
 
 #: ref-filter.c
 #, c-format
-msgid "positive width expected with the %%(align) atom"
-msgstr "元素 %%(align) 需要一个正数的宽度"
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "未能识别的 %%(%s) 参数:%s"
 
 #: ref-filter.c
 #, c-format
-msgid "%%(rest) does not take arguments"
-msgstr "%%(rest) 不带参数"
+msgid "positive width expected with the %%(align) atom"
+msgstr "元素 %%(align) 需要一个正数的宽度"
 
 #: ref-filter.c
 #, c-format
@@ -24315,6 +24384,26 @@ msgstr "git %s:无法读取索引"
 msgid "git %s: failed to refresh the index"
 msgstr "git %s:无法刷新索引"
 
+#: sequencer.c
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "'%s' 不是一个有效的标签"
+
+#: sequencer.c
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "'%s' 不是一个有效的引用名"
+
+#: sequencer.c
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr "update-ref 需要一个完整的引用名,例如:refs/heads/%s"
+
+#: sequencer.c
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "无效命令 '%.*s'"
+
 #: sequencer.c
 #, c-format
 msgid "%s does not accept arguments: '%s'"
@@ -25274,6 +25363,19 @@ msgstr "ls-tree 返回未知返回值 %d"
 msgid "failed to lstat '%s'"
 msgstr "无法执行 lstat '%s'"
 
+#: t/helper/test-bundle-uri.c
+msgid "no remote configured to get bundle URIs from"
+msgstr "没有远程被设置为可以获取归档包 URI"
+
+#: t/helper/test-bundle-uri.c
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr "远程 '%s' 没有设置 URL"
+
+#: t/helper/test-bundle-uri.c
+msgid "could not get the bundle-uri list"
+msgstr "无法获取 bundle-uri 列表"
+
 #: t/helper/test-cache-tree.c
 msgid "test-tool cache-tree <options> (control|prime|update)"
 msgstr "test-tool cache-tree <选项> (control|prime|update)"
@@ -25710,6 +25812,14 @@ msgstr "正在终止。"
 msgid "failed to push all needed submodules"
 msgstr "不能推送全部需要的子模组"
 
+#: transport.c
+msgid "bundle-uri operation not supported by protocol"
+msgstr "协议不支持 bundle-uri 操作"
+
+#: transport.c
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr "无法获取服务器公布的 bundle-uri 列表"
+
 #: tree-walk.c
 msgid "too-short tree object"
 msgstr "太短的树对象"
@@ -26627,12 +26737,20 @@ msgstr "忽略的文件"
 #: wt-status.c
 #, c-format
 msgid ""
-"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
-"may speed it up, but you have to be careful not to forget to add\n"
-"new files yourself (see 'git help status')."
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
 msgstr ""
-"耗费了 %.2f 秒以枚举未跟踪的文件。'status -uno' 也许能提高速度,\n"
-"但您需要小心不要忘了添加新文件(参见 'git help status')。"
+"枚举未追踪的文件花了 %.2f 秒,\n"
+"结果已被缓存,后续的执行会更快。"
+
+#: wt-status.c
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "枚举未追踪的文件花了 %.2f 秒。"
+
+#: wt-status.c
+msgid "See 'git help status' for information on how to improve this."
+msgstr "参见 'git help status' 来获取如何改善的信息。"
 
 #: wt-status.c
 #, c-format
@@ -26805,300 +26923,6 @@ msgstr "您需要在工作区的顶级目录中运行这个命令。"
 msgid "Unable to determine absolute path of git directory"
 msgstr "不能确定 git 目录的绝对路径"
 
-#. TRANSLATORS: you can adjust this to align "git add -i" status menu
-#: git-add--interactive.perl
-#, perl-format
-msgid "%12s %12s %s"
-msgstr "%12s %12s %s"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "touched %d path\n"
-msgid_plural "touched %d paths\n"
-msgstr[0] "触碰了 %d 个路径\n"
-msgstr[1] "触碰了 %d 个路径\n"
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr "如果补丁能干净地应用,编辑块将立即标记为暂存。"
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr "如果补丁能干净地应用,编辑块将立即标记为贮藏。"
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr "如果补丁能干净地应用,编辑块将立即标记为未暂存。"
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr "如果补丁能干净地应用,编辑块将立即标记为应用。"
-
-#: git-add--interactive.perl
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr "如果补丁能干净地应用,编辑块将立即标记为丢弃。"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "failed to open hunk edit file for writing: %s"
-msgstr "无法为写入打开块编辑文件:%s"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid ""
-"---\n"
-"To remove '%s' lines, make them ' ' lines (context).\n"
-"To remove '%s' lines, delete them.\n"
-"Lines starting with %s will be removed.\n"
-msgstr ""
-"---\n"
-"要删除 '%s' 开始的行,使其成为 ' ' 开始的行(上下文)。\n"
-"要删除 '%s' 开始的行,删除它们。\n"
-"以 %s 开始的行将被删除。\n"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "failed to open hunk edit file for reading: %s"
-msgstr "无法读取块编辑文件:%s"
-
-#: git-add--interactive.perl
-msgid ""
-"y - stage this hunk\n"
-"n - do not stage this hunk\n"
-"q - quit; do not stage this hunk or any of the remaining ones\n"
-"a - stage this hunk and all later hunks in the file\n"
-"d - do not stage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 暂存该块\n"
-"n - 不要暂存该块\n"
-"q - 退出。不暂存该块及后面的全部块\n"
-"a - 暂存该块和本文件中后面的全部块\n"
-"d - 不暂存该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - stash this hunk\n"
-"n - do not stash this hunk\n"
-"q - quit; do not stash this hunk or any of the remaining ones\n"
-"a - stash this hunk and all later hunks in the file\n"
-"d - do not stash this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 贮藏该块\n"
-"n - 不要贮藏该块\n"
-"q - 退出。不贮藏该块及后面的全部块\n"
-"a - 贮藏该块和本文件中后面的全部块\n"
-"d - 不贮藏该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - unstage this hunk\n"
-"n - do not unstage this hunk\n"
-"q - quit; do not unstage this hunk or any of the remaining ones\n"
-"a - unstage this hunk and all later hunks in the file\n"
-"d - do not unstage this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 不暂存该块\n"
-"n - 不要不暂存该块\n"
-"q - 退出。不要不暂存该块及后面的全部块\n"
-"a - 不暂存该块和本文件中后面的全部块\n"
-"d - 不要不暂存该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - apply this hunk to index\n"
-"n - do not apply this hunk to index\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 在索引中应用该块\n"
-"n - 不要在索引中应用该块\n"
-"q - 退出。不要应用该块及后面的全部块\n"
-"a - 应用该块和本文件中后面的全部块\n"
-"d - 不要应用该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - discard this hunk from worktree\n"
-"n - do not discard this hunk from worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 在工作区中丢弃该块\n"
-"n - 不要在工作区中丢弃该块\n"
-"q - 退出。不要丢弃该块及后面的全部块\n"
-"a - 丢弃该块和本文件中后面的全部块\n"
-"d - 不要丢弃该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - discard this hunk from index and worktree\n"
-"n - do not discard this hunk from index and worktree\n"
-"q - quit; do not discard this hunk or any of the remaining ones\n"
-"a - discard this hunk and all later hunks in the file\n"
-"d - do not discard this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 在索引和工作区中丢弃该块\n"
-"n - 不要在索引和工作区中丢弃该块\n"
-"q - 退出。不要丢弃该块及后面的全部块\n"
-"a - 丢弃该块和本文件中后面的全部块\n"
-"d - 不要丢弃该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - apply this hunk to index and worktree\n"
-"n - do not apply this hunk to index and worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 在索引和工作区中应用该块\n"
-"n - 不要在索引和工作区中应用该块\n"
-"q - 退出。不要应用该块及后面的全部块\n"
-"a - 应用该块和本文件中后面的全部块\n"
-"d - 不要应用该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"y - apply this hunk to worktree\n"
-"n - do not apply this hunk to worktree\n"
-"q - quit; do not apply this hunk or any of the remaining ones\n"
-"a - apply this hunk and all later hunks in the file\n"
-"d - do not apply this hunk or any of the later hunks in the file"
-msgstr ""
-"y - 在工作区中应用该块\n"
-"n - 不要在工作区中应用该块\n"
-"q - 退出。不要应用该块及后面的全部块\n"
-"a - 应用该块和本文件中后面的全部块\n"
-"d - 不要应用该块和本文件中后面的全部块"
-
-#: git-add--interactive.perl
-msgid ""
-"g - select a hunk to go to\n"
-"/ - search for a hunk matching the given regex\n"
-"j - leave this hunk undecided, see next undecided hunk\n"
-"J - leave this hunk undecided, see next hunk\n"
-"k - leave this hunk undecided, see previous undecided hunk\n"
-"K - leave this hunk undecided, see previous hunk\n"
-"s - split the current hunk into smaller hunks\n"
-"e - manually edit the current hunk\n"
-"? - print help\n"
-msgstr ""
-"g - 选择跳转到一个块\n"
-"/ - 查找和给定正则表达式匹配的块\n"
-"j - 维持该块未决状态,查看下一个未决块\n"
-"J - 维持该块未决状态,查看下一个块\n"
-"k - 维持该块未决状态,查看上一个未决块\n"
-"K - 维持该块未决状态,查看上一个块\n"
-"s - 拆分当前块为更小的块\n"
-"e - 手动编辑当前块\n"
-"? - 显示帮助\n"
-
-#: git-add--interactive.perl
-msgid "The selected hunks do not apply to the index!\n"
-msgstr "选中的块不能应用到索引!\n"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "ignoring unmerged: %s\n"
-msgstr "忽略未合入的:%s\n"
-
-#: git-add--interactive.perl
-msgid "No other hunks to goto\n"
-msgstr "没有其它可供跳转的块\n"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Invalid number: '%s'\n"
-msgstr "无效数字:'%s'\n"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Sorry, only %d hunk available.\n"
-msgid_plural "Sorry, only %d hunks available.\n"
-msgstr[0] "对不起,只有 %d 个可用块。\n"
-msgstr[1] "对不起,只有 %d 个可用块。\n"
-
-#: git-add--interactive.perl
-msgid "No other hunks to search\n"
-msgstr "没有其它可供查找的块\n"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Malformed search regexp %s: %s\n"
-msgstr "错误的正则表达式 %s:%s\n"
-
-#: git-add--interactive.perl
-msgid "No hunk matches the given pattern\n"
-msgstr "没有和给定模式相匹配的块\n"
-
-#: git-add--interactive.perl
-msgid "No previous hunk\n"
-msgstr "没有前一个块\n"
-
-#: git-add--interactive.perl
-msgid "No next hunk\n"
-msgstr "没有下一个块\n"
-
-#: git-add--interactive.perl
-msgid "Sorry, cannot split this hunk\n"
-msgstr "对不起,不能拆分这个块\n"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "拆分为 %d 块。\n"
-msgstr[1] "拆分为 %d 块。\n"
-
-#: git-add--interactive.perl
-msgid "Sorry, cannot edit this hunk\n"
-msgstr "对不起,不能编辑这个块\n"
-
-#. TRANSLATORS: please do not translate the command names
-#. 'status', 'update', 'revert', etc.
-#: git-add--interactive.perl
-msgid ""
-"status        - show paths with changes\n"
-"update        - add working tree state to the staged set of changes\n"
-"revert        - revert staged set of changes back to the HEAD version\n"
-"patch         - pick hunks and update selectively\n"
-"diff          - view diff between HEAD and index\n"
-"add untracked - add contents of untracked files to the staged set of "
-"changes\n"
-msgstr ""
-"status        - 显示含变更的路径\n"
-"update        - 添加工作区状态至暂存列表\n"
-"revert        - 还原修改的暂存集至 HEAD 版本\n"
-"patch         - 挑选块并且有选择地更新\n"
-"diff          - 显示 HEAD 和索引间差异\n"
-"add untracked - 添加未跟踪文件的内容至暂存列表\n"
-
-#: git-add--interactive.perl
-msgid "missing --"
-msgstr "缺失 --"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "unknown --patch mode: %s"
-msgstr "未知的 --patch 模式:%s"
-
-#: git-add--interactive.perl
-#, perl-format
-msgid "invalid argument %s, expecting --"
-msgstr "无效的参数 %s,期望是 --"
-
 #: git-send-email.perl
 msgid "local zone differs from GMT by a non-minute interval\n"
 msgstr "本地时间和 GMT 有不到一分钟间隔\n"
index 1e1e21878c833d54b165b0aa6d9720eb16536a94..05b557d09616de55ac4be5a03e1df02c6df65317 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -1,6 +1,8 @@
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "commit.h"
+#include "hex.h"
 #include "utf8.h"
 #include "diff.h"
 #include "revision.h"
@@ -1857,7 +1859,8 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
        return consumed + 1;
 }
 
-static size_t userformat_want_item(struct strbuf *sb, const char *placeholder,
+static size_t userformat_want_item(struct strbuf *sb UNUSED,
+                                  const char *placeholder,
                                   void *context)
 {
        struct userformat_want *w = context;
index f34e24c53a4925aec51cd62117654fdd5f7f980e..921dd6e0cae3dde8a0e2520d607fdeabad8a759a 100644 (file)
--- a/pretty.h
+++ b/pretty.h
@@ -1,11 +1,11 @@
 #ifndef PRETTY_H
 #define PRETTY_H
 
-#include "cache.h"
 #include "date.h"
 #include "string-list.h"
 
 struct commit;
+struct repository;
 struct strbuf;
 struct process_trailer_options;
 
@@ -153,6 +153,8 @@ int commit_format_is_empty(enum cmit_fmt);
 /* Make subject of commit message suitable for filename */
 void format_sanitized_subject(struct strbuf *sb, const char *msg, size_t len);
 
+int has_non_ascii(const char *text);
+
 /*
  * Set values of fields in "struct process_trailer_options"
  * according to trailers arguments.
index d31b48e725083654222842049e121a35fe8d511b..dc2476be53a30a6e9c682d934f620422dd855ada 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "prio-queue.h"
 
 static inline int compare(struct prio_queue *queue, int i, int j)
index 0cdd875d37f166bedbbeb5f0e889046674ed58be..9b33a2df32557302500fbe8c736c100a2d1b2ba4 100644 (file)
@@ -59,7 +59,7 @@ void progress_test_force_update(void)
 }
 
 
-static void progress_interval(int signum)
+static void progress_interval(int signum UNUSED)
 {
        progress_update = 1;
 }
index faa7612941cc2a70bf24f9dff2c02f2c5a2c0428..1db566982ec6c10afb94837d22a4c7f39b1f36bf 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "object-store.h"
 #include "promisor-remote.h"
 #include "config.h"
index bbde91810ac6667a1ee624d112ad26cf23776b1e..874bc815b4f7d59797bb840fb188e47304579ee2 100644 (file)
@@ -1,9 +1,11 @@
 #include "git-compat-util.h"
 #include "protocol-caps.h"
 #include "gettext.h"
+#include "hex.h"
 #include "pkt-line.h"
 #include "strvec.h"
 #include "hash.h"
+#include "hex.h"
 #include "object.h"
 #include "object-store.h"
 #include "string-list.h"
index 261520b472c9c2bbac57ea94460dcabeefb3a91b..d2813f6a40547035daaff40fcd0bc296c0832cca 100644 (file)
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "object-store.h"
 #include "packfile.h"
 #include "progress.h"
diff --git a/quote.c b/quote.c
index 26719d21d1e7555d92289b26402a73030e330606..7ccb5a06cd161c46ad2deeacc19de7bec99731a2 100644 (file)
--- a/quote.c
+++ b/quote.c
@@ -1,5 +1,7 @@
 #include "cache.h"
+#include "alloc.h"
 #include "quote.h"
+#include "strbuf.h"
 #include "strvec.h"
 
 int quote_path_fully = 1;
index 8255ab4349c009bec7c2c7200365d2bd9b018c16..4bd65ab7496ebf8c6f0ca9420ff16e8532cce71d 100644 (file)
@@ -383,11 +383,14 @@ static void output_pair_header(struct diff_options *diffopt,
        const char *color_new = diff_get_color_opt(diffopt, DIFF_FILE_NEW);
        const char *color_commit = diff_get_color_opt(diffopt, DIFF_COMMIT);
        const char *color;
+       int abbrev = diffopt->abbrev;
+
+       if (abbrev < 0)
+               abbrev = DEFAULT_ABBREV;
 
        if (!dashes->len)
                strbuf_addchars(dashes, '-',
-                               strlen(find_unique_abbrev(oid,
-                                                         DEFAULT_ABBREV)));
+                               strlen(find_unique_abbrev(oid, abbrev)));
 
        if (!b_util) {
                color = color_old;
@@ -409,7 +412,7 @@ static void output_pair_header(struct diff_options *diffopt,
                strbuf_addf(buf, "%*s:  %s ", patch_no_width, "-", dashes->buf);
        else
                strbuf_addf(buf, "%*d:  %s ", patch_no_width, a_util->i + 1,
-                           find_unique_abbrev(&a_util->oid, DEFAULT_ABBREV));
+                           find_unique_abbrev(&a_util->oid, abbrev));
 
        if (status == '!')
                strbuf_addf(buf, "%s%s", color_reset, color);
@@ -421,7 +424,7 @@ static void output_pair_header(struct diff_options *diffopt,
                strbuf_addf(buf, " %*s:  %s", patch_no_width, "-", dashes->buf);
        else
                strbuf_addf(buf, " %*d:  %s", patch_no_width, b_util->i + 1,
-                           find_unique_abbrev(&b_util->oid, DEFAULT_ABBREV));
+                           find_unique_abbrev(&b_util->oid, abbrev));
 
        commit = lookup_commit_reference(the_repository, oid);
        if (commit) {
index aba63ebeb3be784a1fba95e13070e8bd847315c1..c9dab2a66b9140d1ad0c207ee6fa65ff842dc0e7 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "refs.h"
 #include "tag.h"
 #include "commit.h"
@@ -48,7 +49,9 @@ static int add_one_ref(const char *path, const struct object_id *oid,
  * The traversal will have already marked us as SEEN, so we
  * only need to handle any progress reporting here.
  */
-static void mark_object(struct object *obj, const char *name, void *data)
+static void mark_object(struct object *obj UNUSED,
+                       const char *name UNUSED,
+                       void *data)
 {
        update_progress(data);
 }
@@ -152,7 +155,8 @@ static int add_recent_loose(const struct object_id *oid,
 }
 
 static int add_recent_packed(const struct object_id *oid,
-                            struct packed_git *p, uint32_t pos,
+                            struct packed_git *p,
+                            uint32_t pos,
                             void *data)
 {
        struct object *obj;
@@ -202,10 +206,10 @@ int add_unseen_recent_objects_to_traversal(struct rev_info *revs,
 
 static int mark_object_seen(const struct object_id *oid,
                             enum object_type type,
-                            int exclude,
-                            uint32_t name_hash,
-                            struct packed_git *found_pack,
-                            off_t found_offset)
+                            int exclude UNUSED,
+                            uint32_t name_hash UNUSED,
+                            struct packed_git *found_pack UNUSED,
+                            off_t found_offset UNUSED)
 {
        struct object *obj = lookup_object_by_type(the_repository, oid, type);
        if (!obj)
index 7bd12afb38ca300e2177f1e46a9982ea3de80a58..1bcf6732718770923f62046a31563c770c0ad706 100644 (file)
@@ -4,9 +4,11 @@
  * Copyright (C) Linus Torvalds, 2005
  */
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "hex.h"
 #include "tempfile.h"
 #include "lockfile.h"
 #include "cache-tree.h"
@@ -488,11 +490,11 @@ int ie_modified(struct index_state *istate,
        return 0;
 }
 
-int base_name_compare(const char *name1, int len1, int mode1,
-                     const char *name2, int len2, int mode2)
+int base_name_compare(const char *name1, size_t len1, int mode1,
+                     const char *name2, size_t len2, int mode2)
 {
        unsigned char c1, c2;
-       int len = len1 < len2 ? len1 : len2;
+       size_t len = len1 < len2 ? len1 : len2;
        int cmp;
 
        cmp = memcmp(name1, name2, len);
@@ -517,11 +519,12 @@ int base_name_compare(const char *name1, int len1, int mode1,
  * This is used by routines that want to traverse the git namespace
  * but then handle conflicting entries together when possible.
  */
-int df_name_compare(const char *name1, int len1, int mode1,
-                   const char *name2, int len2, int mode2)
+int df_name_compare(const char *name1, size_t len1, int mode1,
+                   const char *name2, size_t len2, int mode2)
 {
-       int len = len1 < len2 ? len1 : len2, cmp;
        unsigned char c1, c2;
+       size_t len = len1 < len2 ? len1 : len2;
+       int cmp;
 
        cmp = memcmp(name1, name2, len);
        if (cmp)
index 6775cddb28434d0780cb483357476f4783e1f596..17a570f1ff97fab8e789d2960ae54894b1c42a80 100644 (file)
--- a/rebase.c
+++ b/rebase.c
@@ -1,3 +1,4 @@
+#include "git-compat-util.h"
 #include "rebase.h"
 #include "config.h"
 #include "gettext.h"
index f8203c6b05254b624cf98e6d4590d07064cbb101..ed802778da7208377d9054f2de1805f91be39509 100644 (file)
@@ -1,5 +1,6 @@
-#include "builtin.h"
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "refs.h"
 #include "wildmatch.h"
@@ -13,7 +14,6 @@
 #include "ref-filter.h"
 #include "revision.h"
 #include "utf8.h"
-#include "git-compat-util.h"
 #include "version.h"
 #include "trailer.h"
 #include "wt-status.h"
@@ -282,7 +282,8 @@ static int refname_atom_parser_internal(struct refname_atom *atom, const char *a
        return 0;
 }
 
-static int remote_ref_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int remote_ref_atom_parser(struct ref_format *format UNUSED,
+                                 struct used_atom *atom,
                                  const char *arg, struct strbuf *err)
 {
        struct string_list params = STRING_LIST_INIT_DUP;
@@ -329,7 +330,8 @@ static int remote_ref_atom_parser(struct ref_format *format, struct used_atom *a
        return 0;
 }
 
-static int objecttype_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int objecttype_atom_parser(struct ref_format *format UNUSED,
+                                 struct used_atom *atom,
                                  const char *arg, struct strbuf *err)
 {
        if (arg)
@@ -341,7 +343,8 @@ static int objecttype_atom_parser(struct ref_format *format, struct used_atom *a
        return 0;
 }
 
-static int objectsize_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int objectsize_atom_parser(struct ref_format *format UNUSED,
+                                 struct used_atom *atom,
                                  const char *arg, struct strbuf *err)
 {
        if (!arg) {
@@ -361,7 +364,8 @@ static int objectsize_atom_parser(struct ref_format *format, struct used_atom *a
        return 0;
 }
 
-static int deltabase_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int deltabase_atom_parser(struct ref_format *format UNUSED,
+                                struct used_atom *atom,
                                 const char *arg, struct strbuf *err)
 {
        if (arg)
@@ -373,7 +377,8 @@ static int deltabase_atom_parser(struct ref_format *format, struct used_atom *at
        return 0;
 }
 
-static int body_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int body_atom_parser(struct ref_format *format UNUSED,
+                           struct used_atom *atom,
                            const char *arg, struct strbuf *err)
 {
        if (arg)
@@ -382,7 +387,8 @@ static int body_atom_parser(struct ref_format *format, struct used_atom *atom,
        return 0;
 }
 
-static int subject_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int subject_atom_parser(struct ref_format *format UNUSED,
+                              struct used_atom *atom,
                               const char *arg, struct strbuf *err)
 {
        if (!arg)
@@ -394,7 +400,8 @@ static int subject_atom_parser(struct ref_format *format, struct used_atom *atom
        return 0;
 }
 
-static int trailers_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int trailers_atom_parser(struct ref_format *format UNUSED,
+                               struct used_atom *atom,
                                const char *arg, struct strbuf *err)
 {
        atom->u.contents.trailer_opts.no_divider = 1;
@@ -448,8 +455,9 @@ static int contents_atom_parser(struct ref_format *format, struct used_atom *ato
        return 0;
 }
 
-static int raw_atom_parser(struct ref_format *format, struct used_atom *atom,
-                               const char *arg, struct strbuf *err)
+static int raw_atom_parser(struct ref_format *format UNUSED,
+                          struct used_atom *atom,
+                          const char *arg, struct strbuf *err)
 {
        if (!arg)
                atom->u.raw_data.option = RAW_BARE;
@@ -460,7 +468,8 @@ static int raw_atom_parser(struct ref_format *format, struct used_atom *atom,
        return 0;
 }
 
-static int oid_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int oid_atom_parser(struct ref_format *format UNUSED,
+                          struct used_atom *atom,
                           const char *arg, struct strbuf *err)
 {
        if (!arg)
@@ -479,7 +488,8 @@ static int oid_atom_parser(struct ref_format *format, struct used_atom *atom,
        return 0;
 }
 
-static int person_email_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int person_email_atom_parser(struct ref_format *format UNUSED,
+                                   struct used_atom *atom,
                                    const char *arg, struct strbuf *err)
 {
        if (!arg)
@@ -493,7 +503,8 @@ static int person_email_atom_parser(struct ref_format *format, struct used_atom
        return 0;
 }
 
-static int refname_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int refname_atom_parser(struct ref_format *format UNUSED,
+                              struct used_atom *atom,
                               const char *arg, struct strbuf *err)
 {
        return refname_atom_parser_internal(&atom->u.refname, arg, atom->name, err);
@@ -510,7 +521,8 @@ static align_type parse_align_position(const char *s)
        return -1;
 }
 
-static int align_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int align_atom_parser(struct ref_format *format UNUSED,
+                            struct used_atom *atom,
                             const char *arg, struct strbuf *err)
 {
        struct align *align = &atom->u.align;
@@ -562,7 +574,8 @@ static int align_atom_parser(struct ref_format *format, struct used_atom *atom,
        return 0;
 }
 
-static int if_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int if_atom_parser(struct ref_format *format UNUSED,
+                         struct used_atom *atom,
                          const char *arg, struct strbuf *err)
 {
        if (!arg) {
@@ -577,7 +590,8 @@ static int if_atom_parser(struct ref_format *format, struct used_atom *atom,
        return 0;
 }
 
-static int rest_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int rest_atom_parser(struct ref_format *format,
+                           struct used_atom *atom UNUSED,
                            const char *arg, struct strbuf *err)
 {
        if (arg)
@@ -586,7 +600,8 @@ static int rest_atom_parser(struct ref_format *format, struct used_atom *atom,
        return 0;
 }
 
-static int head_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int head_atom_parser(struct ref_format *format UNUSED,
+                           struct used_atom *atom,
                            const char *arg, struct strbuf *err)
 {
        if (arg)
@@ -791,7 +806,7 @@ static void quote_formatting(struct strbuf *s, const char *str, ssize_t len, int
 }
 
 static int append_atom(struct atom_value *v, struct ref_formatting_state *state,
-                      struct strbuf *unused_err)
+                      struct strbuf *err UNUSED)
 {
        /*
         * Quote formatting is only done when the stack has a single
@@ -841,7 +856,7 @@ static void end_align_handler(struct ref_formatting_stack **stack)
 }
 
 static int align_atom_handler(struct atom_value *atomv, struct ref_formatting_state *state,
-                             struct strbuf *unused_err)
+                             struct strbuf *err UNUSED)
 {
        struct ref_formatting_stack *new_stack;
 
@@ -888,7 +903,7 @@ static void if_then_else_handler(struct ref_formatting_stack **stack)
 }
 
 static int if_atom_handler(struct atom_value *atomv, struct ref_formatting_state *state,
-                          struct strbuf *unused_err)
+                          struct strbuf *err UNUSED)
 {
        struct ref_formatting_stack *new_stack;
        struct if_then_else *if_then_else = xcalloc(1,
@@ -915,7 +930,8 @@ static int is_empty(struct strbuf *buf)
        return cur == end;
  }
 
-static int then_atom_handler(struct atom_value *atomv, struct ref_formatting_state *state,
+static int then_atom_handler(struct atom_value *atomv UNUSED,
+                            struct ref_formatting_state *state,
                             struct strbuf *err)
 {
        struct ref_formatting_stack *cur = state->stack;
@@ -952,7 +968,8 @@ static int then_atom_handler(struct atom_value *atomv, struct ref_formatting_sta
        return 0;
 }
 
-static int else_atom_handler(struct atom_value *atomv, struct ref_formatting_state *state,
+static int else_atom_handler(struct atom_value *atomv UNUSED,
+                            struct ref_formatting_state *state,
                             struct strbuf *err)
 {
        struct ref_formatting_stack *prev = state->stack;
@@ -973,7 +990,8 @@ static int else_atom_handler(struct atom_value *atomv, struct ref_formatting_sta
        return 0;
 }
 
-static int end_atom_handler(struct atom_value *atomv, struct ref_formatting_state *state,
+static int end_atom_handler(struct atom_value *atomv UNUSED,
+                           struct ref_formatting_state *state,
                            struct strbuf *err)
 {
        struct ref_formatting_stack *current = state->stack;
@@ -1822,7 +1840,7 @@ static void lazy_init_worktree_map(void)
        populate_worktree_map(&(ref_to_worktree_map.map), ref_to_worktree_map.worktrees);
 }
 
-static char *get_worktree_path(const struct used_atom *atom, const struct ref_array_item *ref)
+static char *get_worktree_path(const struct ref_array_item *ref)
 {
        struct hashmap_entry entry, *e;
        struct ref_to_worktree_entry *lookup_result;
@@ -1881,7 +1899,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err)
                        refname = get_refname(atom, ref);
                else if (atom_type == ATOM_WORKTREEPATH) {
                        if (ref->kind == FILTER_REFS_BRANCHES)
-                               v->s = get_worktree_path(atom, ref);
+                               v->s = get_worktree_path(ref);
                        else
                                v->s = xstrdup("");
                        continue;
index aa0eea4ecf591edd0620dc47db0e0bfc3e5c4208..daa6d02017489d5b6454790503afaa0b6079a08e 100644 (file)
@@ -4,7 +4,6 @@
 #include "oid-array.h"
 #include "refs.h"
 #include "commit.h"
-#include "parse-options.h"
 
 /* Quoting styles */
 #define QUOTE_NONE 0
@@ -24,6 +23,7 @@
 
 struct atom_value;
 struct ref_sorting;
+struct option;
 
 enum ref_sorting_order {
        REF_SORTING_REVERSE = 1<<0,
index 8a4d8fa3bd5589fca43e97b05982a830af8bd27a..4ba1a10c82cdd3920a1c2818de29a18e1ea153ca 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "commit.h"
 #include "refs.h"
 #include "diff.h"
index 8076f10d9fbc0dd5588582f5bfec105416037233..4d93a269571980772c49cb25d37749a033482b4f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef REFLOG_WALK_H
 #define REFLOG_WALK_H
 
-#include "cache.h"
-
 struct commit;
 struct reflog_walk_info;
 struct date_mode;
diff --git a/refs.c b/refs.c
index e31dbcda5990b8f2e7143547ce134b7218041fd2..53240bcc07bc1ec37f98afaf1a4d42a8a481138d 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -2,9 +2,11 @@
  * The backend-independent part of the reference module.
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "hashmap.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "iterator.h"
 #include "refs.h"
@@ -1310,65 +1312,68 @@ int update_ref(const char *msg, const char *refname,
                               old_oid, flags, onerr);
 }
 
+/*
+ * Check that the string refname matches a rule of the form
+ * "{prefix}%.*s{suffix}". So "foo/bar/baz" would match the rule
+ * "foo/%.*s/baz", and return the string "bar".
+ */
+static const char *match_parse_rule(const char *refname, const char *rule,
+                                   size_t *len)
+{
+       /*
+        * Check that rule matches refname up to the first percent in the rule.
+        * We can bail immediately if not, but otherwise we leave "rule" at the
+        * %-placeholder, and "refname" at the start of the potential matched
+        * name.
+        */
+       while (*rule != '%') {
+               if (!*rule)
+                       BUG("rev-parse rule did not have percent");
+               if (*refname++ != *rule++)
+                       return NULL;
+       }
+
+       /*
+        * Check that our "%" is the expected placeholder. This assumes there
+        * are no other percents (placeholder or quoted) in the string, but
+        * that is sufficient for our rev-parse rules.
+        */
+       if (!skip_prefix(rule, "%.*s", &rule))
+               return NULL;
+
+       /*
+        * And now check that our suffix (if any) matches.
+        */
+       if (!strip_suffix(refname, rule, len))
+               return NULL;
+
+       return refname; /* len set by strip_suffix() */
+}
+
 char *refs_shorten_unambiguous_ref(struct ref_store *refs,
                                   const char *refname, int strict)
 {
        int i;
-       static char **scanf_fmts;
-       static int nr_rules;
-       char *short_name;
        struct strbuf resolved_buf = STRBUF_INIT;
 
-       if (!nr_rules) {
-               /*
-                * Pre-generate scanf formats from ref_rev_parse_rules[].
-                * Generate a format suitable for scanf from a
-                * ref_rev_parse_rules rule by interpolating "%s" at the
-                * location of the "%.*s".
-                */
-               size_t total_len = 0;
-               size_t offset = 0;
-
-               /* the rule list is NULL terminated, count them first */
-               for (nr_rules = 0; ref_rev_parse_rules[nr_rules]; nr_rules++)
-                       /* -2 for strlen("%.*s") - strlen("%s"); +1 for NUL */
-                       total_len += strlen(ref_rev_parse_rules[nr_rules]) - 2 + 1;
-
-               scanf_fmts = xmalloc(st_add(st_mult(sizeof(char *), nr_rules), total_len));
-
-               offset = 0;
-               for (i = 0; i < nr_rules; i++) {
-                       assert(offset < total_len);
-                       scanf_fmts[i] = (char *)&scanf_fmts[nr_rules] + offset;
-                       offset += xsnprintf(scanf_fmts[i], total_len - offset,
-                                           ref_rev_parse_rules[i], 2, "%s") + 1;
-               }
-       }
-
-       /* bail out if there are no rules */
-       if (!nr_rules)
-               return xstrdup(refname);
-
-       /* buffer for scanf result, at most refname must fit */
-       short_name = xstrdup(refname);
-
        /* skip first rule, it will always match */
-       for (i = nr_rules - 1; i > 0 ; --i) {
+       for (i = NUM_REV_PARSE_RULES - 1; i > 0 ; --i) {
                int j;
                int rules_to_fail = i;
-               int short_name_len;
+               const char *short_name;
+               size_t short_name_len;
 
-               if (1 != sscanf(refname, scanf_fmts[i], short_name))
+               short_name = match_parse_rule(refname, ref_rev_parse_rules[i],
+                                             &short_name_len);
+               if (!short_name)
                        continue;
 
-               short_name_len = strlen(short_name);
-
                /*
                 * in strict mode, all (except the matched one) rules
                 * must fail to resolve to a valid non-ambiguous ref
                 */
                if (strict)
-                       rules_to_fail = nr_rules;
+                       rules_to_fail = NUM_REV_PARSE_RULES;
 
                /*
                 * check if the short name resolves to a valid ref,
@@ -1388,7 +1393,8 @@ char *refs_shorten_unambiguous_ref(struct ref_store *refs,
                         */
                        strbuf_reset(&resolved_buf);
                        strbuf_addf(&resolved_buf, rule,
-                                   short_name_len, short_name);
+                                   cast_size_t_to_int(short_name_len),
+                                   short_name);
                        if (refs_ref_exists(refs, resolved_buf.buf))
                                break;
                }
@@ -1399,12 +1405,11 @@ char *refs_shorten_unambiguous_ref(struct ref_store *refs,
                 */
                if (j == rules_to_fail) {
                        strbuf_release(&resolved_buf);
-                       return short_name;
+                       return xmemdupz(short_name, short_name_len);
                }
        }
 
        strbuf_release(&resolved_buf);
-       free(short_name);
        return xstrdup(refname);
 }
 
index eed8bc94b04f68125bb84eddfc26381ad86d3157..adc34c836fce48f34e811af27c04e79aa50e617b 100644 (file)
@@ -1,4 +1,5 @@
-
+#include "git-compat-util.h"
+#include "hex.h"
 #include "refs-internal.h"
 #include "trace.h"
 
index b89954355debd64056e045a5f433647ca8ba0160..31bc5c45ee693f43358335436be74cbad31db7a9 100644 (file)
@@ -1,9 +1,11 @@
 #include "../cache.h"
 #include "../config.h"
+#include "../hex.h"
 #include "../refs.h"
 #include "refs-internal.h"
 #include "ref-cache.h"
 #include "packed-backend.h"
+#include "../ident.h"
 #include "../iterator.h"
 #include "../dir-iterator.h"
 #include "../lockfile.h"
index 6f5a0709fba65e80081fdb04563019e1f1e15400..b665d0f7d9b2792a05d79d8613b17b684dd7f318 100644 (file)
@@ -1,5 +1,7 @@
-#include "../cache.h"
+#include "../git-compat-util.h"
+#include "../alloc.h"
 #include "../config.h"
+#include "../hex.h"
 #include "../refs.h"
 #include "refs-internal.h"
 #include "packed-backend.h"
index 32afd8a40b0faf22d1ef2de5bb2a2990fa6eebb3..dc1ca49c85f7cd4be86d88dda0ba31f3f965e6bb 100644 (file)
@@ -1,4 +1,5 @@
-#include "../cache.h"
+#include "../git-compat-util.h"
+#include "../alloc.h"
 #include "../refs.h"
 #include "refs-internal.h"
 #include "ref-cache.h"
index 69f93b0e2ac9fa9ec2778b783fa98792030c327e..a85d113123c99b55e1e7047d334c7608843eb2d6 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef REFS_REFS_INTERNAL_H
 #define REFS_REFS_INTERNAL_H
 
-#include "cache.h"
 #include "refs.h"
 #include "iterator.h"
 
index 63e3112104a949e28e0cae1c8beaee0c27c099f1..28d90911aa5ed383afac90f6a444891cad7877ac 100644 (file)
--- a/refspec.c
+++ b/refspec.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "strvec.h"
 #include "refs.h"
 #include "refspec.h"
index a76b6405eb2fc443ff22b93b1598892d02508e20..bf5a0b186fe658abab4be1be610fef8b6fd0d2d4 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "remote.h"
 #include "connect.h"
 #include "strbuf.h"
@@ -472,10 +474,11 @@ static struct discovery *discover_refs(const char *service, int for_push)
 
        /*
         * NEEDSWORK: If we are trying to use protocol v2 and we are planning
-        * to perform a push, then fallback to v0 since the client doesn't know
-        * how to push yet using v2.
+        * to perform any operation that doesn't involve upload-pack (i.e., a
+        * fetch, ls-remote, etc), then fallback to v0 since we don't know how
+        * to do anything else (like push or remote archive) via v2.
         */
-       if (version == protocol_v2 && !strcmp("git-receive-pack", service))
+       if (version == protocol_v2 && strcmp("git-upload-pack", service))
                version = protocol_v0;
 
        /* Add the extra Git-Protocol header */
index 60869beebe7364a594cd45938d4ed97dcdd28840..641b083d90d6a4cf56886dd188273204fc11bf47 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "remote.h"
 #include "urlmatch.h"
 #include "refs.h"
@@ -15,6 +17,7 @@
 #include "commit-reach.h"
 #include "advice.h"
 #include "connect.h"
+#include "parse-options.h"
 
 enum map_direction { FROM_SRC, FROM_DST };
 
index 1ebbe42792ec67230b62dbbe4cb8ed9646576858..73638cefeb102d6dd9a6777645156a2034594240 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -1,11 +1,10 @@
 #ifndef REMOTE_H
 #define REMOTE_H
 
-#include "cache.h"
-#include "parse-options.h"
 #include "hashmap.h"
 #include "refspec.h"
 
+struct option;
 struct transport_ls_refs_options;
 
 /**
index 320be2522d80a87fdb1569a97c5e24b77fd4a525..0cf056c4fbf99c61b9bea72b3dde5550fe23b470 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "oidmap.h"
 #include "object-store.h"
 #include "replace-object.h"
index 3fbc32eb7b7ef7bf9119f83aa7e3a4b6c20104b3..500482b02b38ce30ee51a005d00ca00e76033f19 100644 (file)
@@ -5,6 +5,14 @@
 #include "repository.h"
 #include "object-store.h"
 
+/*
+ * Do replace refs need to be checked this run?  This variable is
+ * initialized to true unless --no-replace-object is used or
+ * $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
+ * commands that do not want replace references to be active.
+ */
+extern int read_replace_refs;
+
 struct replace_object {
        struct oidmap_entry original;
        struct object_id replacement;
index 3dbd3f0e2ec33df0753780f4d84605b16ebdc2b3..0a6c0b381fe13b50fb14b5b6e31ca06c0d44f695 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "repository.h"
 #include "midx.h"
index e8c67ffe16542425b3660b88f2dcf339a473369e..15a8afc5fb5b31b12bc3495663f9f3ca2f399c7e 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef REPOSITORY_H
 #define REPOSITORY_H
 
-#include "git-compat-util.h"
 #include "path.h"
 
 struct config_set;
index 876ab435da949c8359c315636225d9fd7fd962ab..a67abaab0776ee24c44d195e4d1a8f49acff5bdb 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "string-list.h"
 #include "rerere.h"
diff --git a/reset.c b/reset.c
index 5ded23611f3f7316e2327872a54474ce6e4f6200..58b3829ff7384c23446fe21faa50508d827ad90f 100644 (file)
--- a/reset.c
+++ b/reset.c
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "cache-tree.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "refs.h"
 #include "reset.h"
index 21f5f572c22ec7054da6bc20fef26ee2a59a19d5..8b1ecf07fcc6969aa571b8e5a570c9f08c6774f8 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "tag.h"
 #include "blob.h"
@@ -35,6 +37,7 @@
 #include "json-writer.h"
 #include "list-objects-filter-options.h"
 #include "resolve-undo.h"
+#include "parse-options.h"
 
 volatile show_early_output_fn_t show_early_output;
 
@@ -1574,7 +1577,8 @@ void exclude_hidden_refs(struct ref_exclusions *exclusions, const char *section)
 {
        struct exclude_hidden_refs_cb cb;
 
-       if (strcmp(section, "receive") && strcmp(section, "uploadpack"))
+       if (strcmp(section, "fetch") && strcmp(section, "receive") &&
+                       strcmp(section, "uploadpack"))
                die(_("unsupported section for hidden refs: %s"), section);
 
        if (exclusions->hidden_refs_configured)
@@ -3440,8 +3444,8 @@ void reset_revision_walk(void)
 }
 
 static int mark_uninteresting(const struct object_id *oid,
-                             struct packed_git *pack,
-                             uint32_t pos,
+                             struct packed_git *pack UNUSED,
+                             uint32_t pos UNUSED,
                              void *cb)
 {
        struct rev_info *revs = cb;
@@ -4159,7 +4163,7 @@ static struct commit *get_revision_1(struct rev_info *revs)
  * Return true for entries that have not yet been shown.  (This is an
  * object_array_each_func_t.)
  */
-static int entry_unshown(struct object_array_entry *entry, void *cb_data_unused)
+static int entry_unshown(struct object_array_entry *entry, void *cb_data UNUSED)
 {
        return !(entry->item->flags & SHOWN);
 }
index 30febad09a1e3493ed9b89cd57486134cc120f14..649f817f399f4f8fd58eebc728c13dd2fdd8a4e3 100644 (file)
@@ -2,12 +2,12 @@
 #define REVISION_H
 
 #include "commit.h"
-#include "parse-options.h"
 #include "grep.h"
 #include "notes.h"
 #include "pretty.h"
 #include "diff.h"
 #include "commit-slab-decl.h"
+#include "ident.h"
 #include "list-objects-filter-options.h"
 
 /**
@@ -61,6 +61,8 @@ struct string_list;
 struct saved_parents;
 struct bloom_key;
 struct bloom_filter_settings;
+struct option;
+struct parse_opt_ctx_t;
 define_shared_commit_slab(revision_sources, char *);
 
 struct rev_cmdline_info {
index 50cc011654e1734cf79c4b073f130d909ecbf07f..ba617655b23835325639df50409ee6d776810304 100644 (file)
@@ -341,19 +341,19 @@ static void child_close_pair(int fd[2])
        child_close(fd[1]);
 }
 
-static void child_error_fn(const char *err, va_list params)
+static void child_error_fn(const char *err UNUSED, va_list params UNUSED)
 {
        const char msg[] = "error() should not be called in child\n";
        xwrite(2, msg, sizeof(msg) - 1);
 }
 
-static void child_warn_fn(const char *err, va_list params)
+static void child_warn_fn(const char *err UNUSED, va_list params UNUSED)
 {
        const char msg[] = "warn() should not be called in child\n";
        xwrite(2, msg, sizeof(msg) - 1);
 }
 
-static void NORETURN child_die_fn(const char *err, va_list params)
+static void NORETURN child_die_fn(const char *err UNUSED, va_list params UNUSED)
 {
        const char msg[] = "die() should not be called in child\n";
        xwrite(2, msg, sizeof(msg) - 1);
@@ -1586,6 +1586,14 @@ static int pp_start_one(struct parallel_processes *pp,
        if (i == opts->processes)
                BUG("bookkeeping is hard");
 
+       /*
+        * By default, do not inherit stdin from the parent process - otherwise,
+        * all children would share stdin! Users may overwrite this to provide
+        * something to the child's stdin by having their 'get_next_task'
+        * callback assign 0 to .no_stdin and an appropriate integer to .in.
+        */
+       pp->children[i].process.no_stdin = 1;
+
        code = opts->get_next_task(&pp->children[i].process,
                                   opts->ungroup ? NULL : &pp->children[i].err,
                                   opts->data,
@@ -1601,7 +1609,6 @@ static int pp_start_one(struct parallel_processes *pp,
                pp->children[i].process.err = -1;
                pp->children[i].process.stdout_to_stderr = 1;
        }
-       pp->children[i].process.no_stdin = 1;
 
        if (start_command(&pp->children[i].process)) {
                if (opts->start_failure)
@@ -1632,9 +1639,7 @@ static void pp_buffer_stderr(struct parallel_processes *pp,
                             const struct run_process_parallel_opts *opts,
                             int output_timeout)
 {
-       int i;
-
-       while ((i = poll(pp->pfd, opts->processes, output_timeout) < 0)) {
+       while (poll(pp->pfd, opts->processes, output_timeout) < 0) {
                if (errno == EINTR)
                        continue;
                pp_cleanup(pp, opts);
index f2e19838c9c342b3b9d6df5e9bf24d0add0d47d1..0d0519116260cb851bb50df0f375b0c5e8e6dc64 100644 (file)
@@ -1,6 +1,7 @@
-#include "builtin.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "commit.h"
+#include "hex.h"
 #include "refs.h"
 #include "object-store.h"
 #include "pkt-line.h"
@@ -16,6 +17,7 @@
 #include "gpg-interface.h"
 #include "cache.h"
 #include "shallow.h"
+#include "parse-options.h"
 
 int option_parse_push_signed(const struct option *opt,
                             const char *arg, int unset)
index 3e4a197289714197b6ba391aa1bb26652eaaf836..3be23d7ca20510179664fcc58c4a6856e0cbd776 100644 (file)
@@ -1,5 +1,7 @@
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "dir.h"
 #include "object-store.h"
@@ -263,10 +265,6 @@ static int git_sequencer_config(const char *k, const char *v, void *cb)
        if (opts->action == REPLAY_REVERT && !strcmp(k, "revert.reference"))
                opts->commit_use_reference = git_config_bool(k, v);
 
-       status = git_gpg_config(k, v, NULL);
-       if (status)
-               return status;
-
        return git_diff_basic_config(k, v, NULL);
 }
 
@@ -351,10 +349,25 @@ static const char *gpg_sign_opt_quoted(struct replay_opts *opts)
        return buf.buf;
 }
 
+void replay_opts_release(struct replay_opts *opts)
+{
+       free(opts->gpg_sign);
+       free(opts->reflog_action);
+       free(opts->default_strategy);
+       free(opts->strategy);
+       for (size_t i = 0; i < opts->xopts_nr; i++)
+               free(opts->xopts[i]);
+       free(opts->xopts);
+       strbuf_release(&opts->current_fixups);
+       if (opts->revs)
+               release_revisions(opts->revs);
+       free(opts->revs);
+}
+
 int sequencer_remove_state(struct replay_opts *opts)
 {
        struct strbuf buf = STRBUF_INIT;
-       int i, ret = 0;
+       int ret = 0;
 
        if (is_rebase_i(opts) &&
            strbuf_read_file(&buf, rebase_path_refs_to_delete(), 0) > 0) {
@@ -373,15 +386,6 @@ int sequencer_remove_state(struct replay_opts *opts)
                }
        }
 
-       free(opts->gpg_sign);
-       free(opts->reflog_action);
-       free(opts->default_strategy);
-       free(opts->strategy);
-       for (i = 0; i < opts->xopts_nr; i++)
-               free(opts->xopts[i]);
-       free(opts->xopts);
-       strbuf_release(&opts->current_fixups);
-
        strbuf_reset(&buf);
        strbuf_addstr(&buf, get_dir(opts));
        if (remove_dir_recursively(&buf, 0))
@@ -2271,8 +2275,10 @@ static int do_pick_commit(struct repository *r,
                reword = 1;
        else if (is_fixup(command)) {
                if (update_squash_messages(r, command, commit,
-                                          opts, item->flags))
-                       return -1;
+                                          opts, item->flags)) {
+                       res = -1;
+                       goto leave;
+               }
                flags |= AMEND_MSG;
                if (!final_fixup)
                        msg_file = rebase_path_squash_msg();
@@ -2282,9 +2288,11 @@ static int do_pick_commit(struct repository *r,
                } else {
                        const char *dest = git_path_squash_msg(r);
                        unlink(dest);
-                       if (copy_file(dest, rebase_path_squash_msg(), 0666))
-                               return error(_("could not rename '%s' to '%s'"),
-                                            rebase_path_squash_msg(), dest);
+                       if (copy_file(dest, rebase_path_squash_msg(), 0666)) {
+                               res = error(_("could not rename '%s' to '%s'"),
+                                           rebase_path_squash_msg(), dest);
+                               goto leave;
+                       }
                        unlink(git_path_merge_msg(r));
                        msg_file = dest;
                        flags |= EDIT_MSG;
@@ -2322,7 +2330,6 @@ static int do_pick_commit(struct repository *r,
                free_commit_list(common);
                free_commit_list(remotes);
        }
-       strbuf_release(&msgbuf);
 
        /*
         * If the merge was clean or if it failed due to conflict, we write
@@ -2396,6 +2403,7 @@ fast_forward_edit:
 leave:
        free_message(commit, &msg);
        free(author);
+       strbuf_release(&msgbuf);
        update_abort_safety_file();
 
        return res;
@@ -2469,12 +2477,39 @@ static int is_command(enum todo_command command, const char **bol)
 {
        const char *str = todo_command_info[command].str;
        const char nick = todo_command_info[command].c;
-       const char *p = *bol + 1;
+       const char *p = *bol;
 
-       return skip_prefix(*bol, str, bol) ||
-               ((nick && **bol == nick) &&
-                (*p == ' ' || *p == '\t' || *p == '\n' || *p == '\r' || !*p) &&
-                (*bol = p));
+       return (skip_prefix(p, str, &p) || (nick && *p++ == nick)) &&
+               (*p == ' ' || *p == '\t' || *p == '\n' || *p == '\r' || !*p) &&
+               (*bol = p);
+}
+
+static int check_label_or_ref_arg(enum todo_command command, const char *arg)
+{
+       switch (command) {
+       case TODO_LABEL:
+               /*
+                * '#' is not a valid label as the merge command uses it to
+                * separate merge parents from the commit subject.
+                */
+               if (!strcmp(arg, "#") ||
+                   check_refname_format(arg, REFNAME_ALLOW_ONELEVEL))
+                       return error(_("'%s' is not a valid label"), arg);
+               break;
+
+       case TODO_UPDATE_REF:
+               if (check_refname_format(arg, REFNAME_ALLOW_ONELEVEL))
+                       return error(_("'%s' is not a valid refname"), arg);
+               if (check_refname_format(arg, 0))
+                       return error(_("update-ref requires a fully qualified "
+                                      "refname e.g. refs/heads/%s"), arg);
+               break;
+
+       default:
+               BUG("unexpected todo_command");
+       }
+
+       return 0;
 }
 
 static int parse_insn_line(struct repository *r, struct todo_item *item,
@@ -2503,7 +2538,8 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
                        break;
                }
        if (i >= TODO_COMMENT)
-               return -1;
+               return error(_("invalid command '%.*s'"),
+                            (int)strcspn(bol, " \t\r\n"), bol);
 
        /* Eat up extra spaces/ tabs before object name */
        padding = strspn(bol, " \t");
@@ -2525,19 +2561,26 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
 
        if (item->command == TODO_EXEC || item->command == TODO_LABEL ||
            item->command == TODO_RESET || item->command == TODO_UPDATE_REF) {
+               int ret = 0;
+
                item->commit = NULL;
                item->arg_offset = bol - buf;
                item->arg_len = (int)(eol - bol);
-               return 0;
+               if (item->command == TODO_LABEL ||
+                   item->command == TODO_UPDATE_REF) {
+                       saved = *eol;
+                       *eol = '\0';
+                       ret = check_label_or_ref_arg(item->command, bol);
+                       *eol = saved;
+               }
+               return ret;
        }
 
        if (item->command == TODO_FIXUP) {
-               if (skip_prefix(bol, "-C", &bol) &&
-                  (*bol == ' ' || *bol == '\t')) {
+               if (skip_prefix(bol, "-C", &bol)) {
                        bol += strspn(bol, " \t");
                        item->flags |= TODO_REPLACE_FIXUP_MSG;
-               } else if (skip_prefix(bol, "-c", &bol) &&
-                                 (*bol == ' ' || *bol == '\t')) {
+               } else if (skip_prefix(bol, "-c", &bol)) {
                        bol += strspn(bol, " \t");
                        item->flags |= TODO_EDIT_FIXUP_MSG;
                }
@@ -2876,13 +2919,18 @@ static int populate_opts_cb(const char *key, const char *value, void *data)
 void parse_strategy_opts(struct replay_opts *opts, char *raw_opts)
 {
        int i;
+       int count;
        char *strategy_opts_string = raw_opts;
 
        if (*strategy_opts_string == ' ')
                strategy_opts_string++;
 
-       opts->xopts_nr = split_cmdline(strategy_opts_string,
-                                      (const char ***)&opts->xopts);
+       count = split_cmdline(strategy_opts_string,
+                             (const char ***)&opts->xopts);
+       if (count < 0)
+               die(_("could not split '%s': %s"), strategy_opts_string,
+                           split_cmdline_strerror(count));
+       opts->xopts_nr = count;
        for (i = 0; i < opts->xopts_nr; i++) {
                const char *arg = opts->xopts[i];
 
@@ -4834,8 +4882,7 @@ cleanup_head_ref:
                if (!stat(rebase_path_rewritten_list(), &st) &&
                                st.st_size > 0) {
                        struct child_process child = CHILD_PROCESS_INIT;
-                       const char *post_rewrite_hook =
-                               find_hook("post-rewrite");
+                       struct run_hooks_opt hook_opt = RUN_HOOKS_OPT_INIT;
 
                        child.in = open(rebase_path_rewritten_list(), O_RDONLY);
                        child.git_cmd = 1;
@@ -4845,18 +4892,9 @@ cleanup_head_ref:
                        /* we don't care if this copying failed */
                        run_command(&child);
 
-                       if (post_rewrite_hook) {
-                               struct child_process hook = CHILD_PROCESS_INIT;
-
-                               hook.in = open(rebase_path_rewritten_list(),
-                                       O_RDONLY);
-                               hook.stdout_to_stderr = 1;
-                               hook.trace2_hook_name = "post-rewrite";
-                               strvec_push(&hook.args, post_rewrite_hook);
-                               strvec_push(&hook.args, "rebase");
-                               /* we don't care if this hook failed */
-                               run_command(&hook);
-                       }
+                       hook_opt.path_to_stdin = rebase_path_rewritten_list();
+                       strvec_push(&hook_opt.args, "rebase");
+                       run_hooks_opt("post-rewrite", &hook_opt);
                }
                apply_autostash(rebase_path_autostash());
 
index 888c18aad7188e48985eb5c994b13853dc30c137..33dbaf5b66d8bd803de8b0dfdc7d25300ed62ede 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef SEQUENCER_H
 #define SEQUENCER_H
 
-#include "cache.h"
 #include "strbuf.h"
 #include "wt-status.h"
 
 struct commit;
+struct index_state;
 struct repository;
 
 const char *git_path_commit_editmsg(void);
@@ -158,6 +158,7 @@ int sequencer_pick_revisions(struct repository *repo,
 int sequencer_continue(struct repository *repo, struct replay_opts *opts);
 int sequencer_rollback(struct repository *repo, struct replay_opts *opts);
 int sequencer_skip(struct repository *repo, struct replay_opts *opts);
+void replay_opts_release(struct replay_opts *opts);
 int sequencer_remove_state(struct replay_opts *opts);
 
 #define TODO_LIST_KEEP_EMPTY (1U << 0)
diff --git a/serve.c b/serve.c
index cbf4a143cfea9bd450d5d033b1ec051025af8a1f..5329c91011f2919fc24bcc3039c264a0c9e2c877 100644 (file)
--- a/serve.c
+++ b/serve.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "repository.h"
 #include "config.h"
 #include "pkt-line.h"
@@ -8,17 +8,18 @@
 #include "serve.h"
 #include "upload-pack.h"
 #include "bundle-uri.h"
+#include "trace2.h"
 
 static int advertise_sid = -1;
 static int client_hash_algo = GIT_HASH_SHA1;
 
-static int always_advertise(struct repository *r,
-                           struct strbuf *value)
+static int always_advertise(struct repository *r UNUSED,
+                           struct strbuf *value UNUSED)
 {
        return 1;
 }
 
-static int agent_advertise(struct repository *r,
+static int agent_advertise(struct repository *r UNUSED,
                           struct strbuf *value)
 {
        if (value)
@@ -34,7 +35,7 @@ static int object_format_advertise(struct repository *r,
        return 1;
 }
 
-static void object_format_receive(struct repository *r,
+static void object_format_receive(struct repository *r UNUSED,
                                  const char *algo_name)
 {
        if (!algo_name)
@@ -48,7 +49,7 @@ static void object_format_receive(struct repository *r,
 static int session_id_advertise(struct repository *r, struct strbuf *value)
 {
        if (advertise_sid == -1 &&
-           git_config_get_bool("transfer.advertisesid", &advertise_sid))
+           repo_config_get_bool(r, "transfer.advertisesid", &advertise_sid))
                advertise_sid = 0;
        if (!advertise_sid)
                return 0;
@@ -57,7 +58,7 @@ static int session_id_advertise(struct repository *r, struct strbuf *value)
        return 1;
 }
 
-static void session_id_receive(struct repository *r,
+static void session_id_receive(struct repository *r UNUSED,
                               const char *client_sid)
 {
        if (!client_sid)
index 0ec6c0c16546a7a2ebb45a8e8a03e3270cedf214..40436892023f29f1008d6954fd8b7e5d272610a1 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "dir.h"
+#include "hex.h"
 #include "repository.h"
 #include "refs.h"
 #include "object.h"
index 5c300e812e0a11960dba743773720246e1a84cf1..9b675a046ee699189f54e31cf9a4e8bfc6d304a6 100644 (file)
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "sha1dc_git.h"
+#include "hex.h"
 
 #ifdef DC_SHA1_EXTERNAL
 /*
index 17f9bcdb5f38270c4f5910a2e1c930432ba350e5..1cbb05ba0e45637f1b0655b9b1dbd51ac4da8117 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "repository.h"
 #include "tempfile.h"
 #include "lockfile.h"
index aba6ff5829405647070c5b2a475318e2fd76282d..e9ca7e4bc80451a74dc10fb6d4e1a0b190dc4dcc 100644 (file)
--- a/shallow.h
+++ b/shallow.h
@@ -6,6 +6,8 @@
 #include "repository.h"
 #include "strbuf.h"
 
+struct oid_array;
+
 void set_alternate_shallow_file(struct repository *r, const char *path, int override);
 int register_shallow(struct repository *r, const struct object_id *oid);
 int unregister_shallow(const struct object_id *oid);
diff --git a/shell.c b/shell.c
index af0d7c734f8347082ab094cf1fc8898cbf26b64d..5c67e7bd97e2c825d79c3503267b5b41cd83bb8a 100644 (file)
--- a/shell.c
+++ b/shell.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "quote.h"
 #include "exec-cmd.h"
 #include "strbuf.h"
index 022677b6abaf918f51804a8fcbf18776aa3f2be5..ee778c0580b6d9eb47ebc0d5f1ea7a9d7637a96c 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "sigchain.h"
 
 #define SIGCHAIN_MAX_SIGNALS 32
index 147a13386a445b7278b87c5072d7d5c308a35b8f..63216b3e57f87f0a44749c9350f12d8cb6b45785 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "alloc.h"
 #include "repository.h"
 #include "sparse-index.h"
 #include "tree.h"
index 5d0f04763ea2d201a3bbe417bd1951aea23a8436..95ecfa531954e92947bd13175b760d680f18d0be 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "alloc.h"
 #include "split-index.h"
 #include "ewah/ewok.h"
 
diff --git a/statinfo.h b/statinfo.h
new file mode 100644 (file)
index 0000000..e49e305
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef STATINFO_H
+#define STATINFO_H
+
+/*
+ * The "cache_time" is just the low 32 bits of the
+ * time. It doesn't matter if it overflows - we only
+ * check it for equality in the 32 bits we save.
+ */
+struct cache_time {
+       uint32_t sec;
+       uint32_t nsec;
+};
+
+struct stat_data {
+       struct cache_time sd_ctime;
+       struct cache_time sd_mtime;
+       unsigned int sd_dev;
+       unsigned int sd_ino;
+       unsigned int sd_uid;
+       unsigned int sd_gid;
+       unsigned int sd_size;
+};
+
+#endif
index c383f41a3c5ccc6c6228c4ed4f9631529633f878..1c57ac6574fecf3dfe19dc38e426cb99d54e58f1 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
+#include "hex.h"
 #include "refs.h"
 #include "string-list.h"
 #include "utf8.h"
index 42bacaec55b6ca6bf885797c1c76fc6e964ddfbd..db473f273e1f77c45f2a5b0cf7a70b106bc19d02 100644 (file)
@@ -1,5 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "string-list.h"
+#include "alloc.h"
 
 void string_list_init_nodup(struct string_list *list)
 {
index 61a76ce6cb920f33744e82111c800da8439ed975..17d54b6c3bc500f7c8f927a702e1ec26ba66b7a1 100644 (file)
--- a/strvec.c
+++ b/strvec.c
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "strvec.h"
+#include "alloc.h"
+#include "hex.h"
 #include "strbuf.h"
 
 const char *empty_strvec[] = { NULL };
index 6d4232294dbee7ad2928b0ac12e1860dcf04a12d..1daf5a975254b9b9ea286c5486f4d07f3874bb26 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Generic implementation of background process infrastructure.
  */
+#include "git-compat-util.h"
 #include "sub-process.h"
 #include "sigchain.h"
 #include "pkt-line.h"
index e85f21fa1a7c2bc59f032b5b2a2cffd6cab771a5..6a61638a8ace0b760e1254bcbea14061c3843a25 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SUBPROCESS_H
 #define SUBPROCESS_H
 
-#include "git-compat-util.h"
 #include "hashmap.h"
 #include "run-command.h"
 
index 4dc61b3a78a2916d737edf613af0f9c0e03d39c8..89a7bf0a93dd176d0d6f8e92bc84287484483428 100644 (file)
@@ -1,5 +1,7 @@
 #include "cache.h"
+#include "alloc.h"
 #include "dir.h"
+#include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "submodule-config.h"
index 28a8ca6bf46845906cb4bc2071a594a383eefc72..c2045875bbb4caa271e30d8318e8af353c525e37 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef SUBMODULE_CONFIG_CACHE_H
 #define SUBMODULE_CONFIG_CACHE_H
 
-#include "cache.h"
 #include "config.h"
 #include "hashmap.h"
 #include "submodule.h"
index 3a0dfc417c05b627a5100f518768a1b32ee22339..2a057c35b749a564e793a0f80c553744f5189746 100644 (file)
@@ -1,5 +1,5 @@
-
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "repository.h"
 #include "config.h"
 #include "submodule-config.h"
@@ -7,6 +7,7 @@
 #include "dir.h"
 #include "diff.h"
 #include "commit.h"
+#include "hex.h"
 #include "revision.h"
 #include "run-command.h"
 #include "diffcore.h"
@@ -1739,7 +1740,7 @@ static int get_next_submodule(struct child_process *cp, struct strbuf *err,
        return 0;
 }
 
-static int fetch_start_failure(struct strbuf *err,
+static int fetch_start_failure(struct strbuf *err UNUSED,
                               void *cb, void *task_cb)
 {
        struct submodule_parallel_fetch *spf = cb;
@@ -1760,7 +1761,7 @@ static int commit_missing_in_sub(const struct object_id *oid, void *data)
        return type != OBJ_COMMIT;
 }
 
-static int fetch_finish(int retvalue, struct strbuf *err,
+static int fetch_finish(int retvalue, struct strbuf *err UNUSED,
                        void *cb, void *task_cb)
 {
        struct submodule_parallel_fetch *spf = cb;
index 2c2b2522402d087bee89ae8c08be99449c893057..88fa50495734adbdb358103371dfe655a2b468e3 100644 (file)
@@ -140,9 +140,7 @@ aggregate-results-and-cleanup: $(T)
        $(MAKE) clean
 
 aggregate-results:
-       for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \
-               echo "$$f"; \
-       done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
+       @'$(SHELL_PATH_SQ)' ./aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 valgrind:
        $(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
index 979b2d4833d983ef50a71c3a9394bd9c8b6e4051..29576c37488593d79978a50d405e107b25dbcc7c 100644 (file)
--- a/t/README
+++ b/t/README
@@ -449,10 +449,6 @@ the --sparse command-line argument.
 GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path
 by overriding the minimum number of cache entries required per thread.
 
-GIT_TEST_ADD_I_USE_BUILTIN=<boolean>, when false, disables the
-built-in version of git add -i. See 'add.interactive.useBuiltin' in
-git-config(1).
-
 GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
 of the index for the whole test suite by bypassing the default number of
 cache entries and thread minimums. Setting this to 1 will make the
index 7f2b83bdc8181f6d653f40bf99a40bf8e7cc03f5..6e3bcc4aec7cb922b9fc9ed4469c79b1699c76cc 100755 (executable)
@@ -8,7 +8,7 @@ broken=0
 total=0
 missing_prereq=
 
-while read file
+for file in "$1"/t*-*.counts
 do
        while read type value
        do
index 6c900ca668467dcdbc92c6544ad173565c3a5f08..127f134a2a6e4709b4bed08419b88961354a05e7 100644 (file)
@@ -1,5 +1,6 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "bloom.h"
+#include "hex.h"
 #include "test-tool.h"
 #include "commit.h"
 
index 9159a173015cd6efca2f686745cf765e9bdfe58f..615e648e555474fc6284dbea51675cb76fcbb0d5 100644 (file)
@@ -1,6 +1,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "tree.h"
 #include "cache-tree.h"
 #include "parse-options.h"
index e6c1b1e22bb36da604af3238341f6b7b14753796..597027a96e96c923ff630567a8de2f8c47dad3b2 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 
 /*
  * Usage: test-tool crontab <file> -l|<input>
index 92c4c2313e78a305dd0da1e7a853e58e325d2f84..534ca66441cd686f93b36f998bc4eb867d388f4b 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 
 static int rc;
 
@@ -11,9 +10,14 @@ static void report_error(const char *class, int ch)
 
 static int is_in(const char *s, int ch)
 {
-       /* We can't find NUL using strchr.  It's classless anyway. */
+       /*
+        * We can't find NUL using strchr. Accept it as the first
+        * character in the spec -- there are no empty classes.
+        */
        if (ch == '\0')
-               return 0;
+               return ch == *s;
+       if (*s == '\0')
+               s++;
        return !!strchr(s, ch);
 }
 
@@ -28,6 +32,20 @@ static int is_in(const char *s, int ch)
 #define DIGIT "0123456789"
 #define LOWER "abcdefghijklmnopqrstuvwxyz"
 #define UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+#define PUNCT "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
+#define ASCII \
+       "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" \
+       "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" \
+       "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" \
+       "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" \
+       "\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" \
+       "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" \
+       "\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" \
+       "\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+#define CNTRL \
+       "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" \
+       "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" \
+       "\x7f"
 
 int cmd__ctype(int argc, const char **argv)
 {
@@ -38,6 +56,13 @@ int cmd__ctype(int argc, const char **argv)
        TEST_CLASS(is_glob_special, "*?[\\");
        TEST_CLASS(is_regex_special, "$()*+.?[\\^{|");
        TEST_CLASS(is_pathspec_magic, "!\"#%&',-/:;<=>@_`~");
+       TEST_CLASS(isascii, ASCII);
+       TEST_CLASS(islower, LOWER);
+       TEST_CLASS(isupper, UPPER);
+       TEST_CLASS(iscntrl, CNTRL);
+       TEST_CLASS(ispunct, PUNCT);
+       TEST_CLASS(isxdigit, DIGIT "abcdefABCDEF");
+       TEST_CLASS(isprint, LOWER UPPER DIGIT PUNCT " ");
 
        return rc;
 }
index 659b6bfa81df6d0bcffb8d0a975492d54d79d6bc..6b297bd75361407fbba7cb6dcab0190d5ef5a1b2 100644 (file)
@@ -15,7 +15,7 @@ static const char *error_name(int error_number)
 
 /*
  * usage:
- * tool-test dir-iterator [--follow-symlinks] [--pedantic] directory_path
+ * tool-test dir-iterator [--pedantic] directory_path
  */
 int cmd__dir_iterator(int argc, const char **argv)
 {
@@ -24,9 +24,7 @@ int cmd__dir_iterator(int argc, const char **argv)
        int iter_status;
 
        for (++argv, --argc; *argv && starts_with(*argv, "--"); ++argv, --argc) {
-               if (strcmp(*argv, "--follow-symlinks") == 0)
-                       flags |= DIR_ITERATOR_FOLLOW_SYMLINKS;
-               else if (strcmp(*argv, "--pedantic") == 0)
+               if (strcmp(*argv, "--pedantic") == 0)
                        flags |= DIR_ITERATOR_PEDANTIC;
                else
                        die("invalid option '%s'", *argv);
index 454f17b1a0c1cceadffd6293db43790dcf42972a..92dfc1aa8c4a9e37e4c26c419ea8fcf640399182 100644 (file)
@@ -1,6 +1,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "tree.h"
 #include "cache-tree.h"
 
index 0ea97b8407296a3615ab786e9458ff9bbf638000..813d0a38fae206587438c609cf0282f9f3c6a6aa 100644 (file)
@@ -1,6 +1,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "split-index.h"
 #include "ewah/ewok.h"
 
index 6d53683f13b04c2c89680408f3e348cf97043ffd..af953fabe871cc1bc0d4a3999942a9113a6f1f2a 100644 (file)
@@ -2,6 +2,7 @@
 #include "test-tool.h"
 #include "cache.h"
 #include "dir.h"
+#include "hex.h"
 
 static int compare_untracked(const void *a_, const void *b_)
 {
index b9d1200eb988e19f3f0a2c0aeed941a6eb44b9bb..7c7fc8efc13d458df6745fb44804c8f92b4a9a9c 100644 (file)
@@ -1,5 +1,5 @@
 #include "test-tool.h"
-#include "cache.h"
+#include "git-compat-util.h"
 #include "object.h"
 #include "decorate.h"
 
index efc82dd80c5b5711ecb4947b3c082433845e1e50..b1edb92a03252817c5a0a388e75f83c8ce67a2d0 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "cache-tree.h"
 #include "commit.h"
+#include "hex.h"
 #include "lockfile.h"
 #include "merge-ort.h"
 #include "refs.h"
index 8ca988d6216e7895d8afea772e110b7eeaa875d1..47af843b6816005f2370fb130bc9f2bde873c029 100644 (file)
@@ -17,15 +17,16 @@ int cmd__genzeros(int argc, const char **argv)
 
        /* Writing out individual NUL bytes is slow... */
        while (count < 0)
-               if (write(1, zeros, ARRAY_SIZE(zeros)) < 0)
-                       return -1;
+               if (xwrite(1, zeros, ARRAY_SIZE(zeros)) < 0)
+                       die_errno("write error");
 
        while (count > 0) {
-               n = write(1, zeros, count < ARRAY_SIZE(zeros) ?
-                         count : ARRAY_SIZE(zeros));
+               n = xwrite(1, zeros,
+                          count < ARRAY_SIZE(zeros)
+                          ? count : ARRAY_SIZE(zeros));
 
                if (n < 0)
-                       return -1;
+                       die_errno("write error");
 
                count -= n;
        }
index 5860dab0ffac976bc3e6d0ef2da2153566477018..016248106a76bec6b2c85d535f2edeb4350ea8a8 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 
 int cmd_hash_impl(int ac, const char **av, int algo)
 {
index 8c3edacc0007df7ddb52f2f65d00e44b95edeb5a..86887f53203c0d7c1c7b9dd5b71ae78cb156b390 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "json-writer.h"
 
 static const char *expect_obj1 = "{\"a\":\"abc\",\"b\":42,\"c\":true}";
index 4079fdee06776c8179fbc15283141f3890ff013e..04bc2563f3e5b96fcd12867f7b5743571046971e 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "tree.h"
 
 int cmd__match_trees(int ac, const char **av)
index d1324d086a24c0575e6beadaeef2ce1e8b6a80f0..0906993ad59bfcd0a4f3e20f8c1a1a0bff737a59 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "oid-array.h"
 
 static int print_oid(const struct object_id *oid, void *data)
index 0acf99931ee176982d61078dc0e2d882377c05fd..883d40efd45edc16fe486d2ad5228590451b8071 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "oidmap.h"
 #include "strbuf.h"
 
index d48a409f4e4fb377a7cbc4684fa05737ea32f2c1..0b82431a70fe99cb59e1729fae49eacd4920878e 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "oidtree.h"
 
 static enum cb_next print_oid(const struct object_id *oid, void *data)
index f7b79daf4c03843c5003100b63666f8dbdbfd1d5..f68b3761b68ca7bc2d6465f6a89a9f5a879215b7 100644 (file)
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "test-tool.h"
+#include "hex.h"
 #include "strbuf.h"
 #include "object-store.h"
 #include "packfile.h"
index b3e08cef4b3f86ba95509f1d66345f7ca6016ea3..71d2131fbad00f763eca42d50a779f8885887043 100644 (file)
@@ -6,7 +6,7 @@
 int cmd__parse_pathspec_file(int argc, const char **argv)
 {
        struct pathspec pathspec;
-       const char *pathspec_from_file = NULL;
+       char *pathspec_from_file = NULL;
        int pathspec_file_nul = 0, i;
 
        static const char *const usage[] = {
@@ -29,5 +29,6 @@ int cmd__parse_pathspec_file(int argc, const char **argv)
                printf("%s\n", pathspec.items[i].original);
 
        clear_pathspec(&pathspec);
+       free(pathspec_from_file);
        return 0;
 }
index 3f102cfddd3f4b6fe85391a8a2fc3a11b9b509c7..da17fd37eb1dc487eb12b1ca9aab3a443c2599fb 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "test-tool.h"
 #include "repository.h"
 #include "object-store.h"
index 5258fdddba0eb36829c04216fbb71b1a196810d0..5d0b2a2e10fa66e16dd954f97ba7561b106fce50 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "grep.h"
 
 int cmd__pcre2_config(int argc, const char **argv)
index 133b5e6f4ae5fdbd90f6594223df60f918a036f4..4915412e074691f6ddf3396d0ca45dd6b03588ad 100644 (file)
@@ -1,8 +1,7 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "prio-queue.h"
 
-static int intcmp(const void *va, const void *vb, void *data)
+static int intcmp(const void *va, const void *vb, void *data UNUSED)
 {
        const int *a = va, *b = vb;
        return *a - *b;
index a4b305f4947fd21da757807a4e85c1c62987867f..7e12d4f9aa2d00f2dbb8a46d8795bced622d4794 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "connect.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "pkt-line.h"
 #include "sigchain.h"
index 2f65c7f6a55bc146ea69ea9ef85d45a1f6172ac3..de8f26639d411710e1c745173091622df2cf0837 100644 (file)
@@ -1,8 +1,9 @@
 #include "test-tool.h"
-#include "cache.h"
+#include "alloc.h"
 #include "commit.h"
 #include "commit-reach.h"
 #include "config.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "ref-filter.h"
 #include "string-list.h"
index 27072ba94d76005b6f49e04f60f2e697efd0e073..0a883cdf26b0871657e6dc3c778ae2ca9f323cef 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "midx.h"
 #include "repository.h"
 #include "object-store.h"
index ae8a5648daf5c1385afe43f327bf9a5a3d98e1f1..1745b088b7c2b924b006bf90e02ae4677b0cc30d 100644 (file)
@@ -1,5 +1,6 @@
 #include "test-tool.h"
 #include "cache.h"
+#include "hex.h"
 #include "refs.h"
 #include "worktree.h"
 #include "object-store.h"
index 56f0e3c1bef293dd505e28af4b48dfce11490b3c..10a6dfc2160f6628db768db3fc7968fa62971815 100644 (file)
@@ -3,6 +3,7 @@
 #include "commit-graph.h"
 #include "commit.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "object.h"
 #include "repository.h"
index 3ecb830f4a8cd196f20ff0c371108c8f5579f3cd..b0d041ec5ffb9d4a3fa718920355386b50f9b2a3 100644 (file)
@@ -9,8 +9,6 @@
  */
 
 #include "test-tool.h"
-#include "git-compat-util.h"
-#include "cache.h"
 #include "run-command.h"
 #include "strvec.h"
 #include "strbuf.h"
@@ -24,7 +22,7 @@ static int number_callbacks;
 static int parallel_next(struct child_process *cp,
                         struct strbuf *err,
                         void *cb,
-                        void **task_cb)
+                        void **task_cb UNUSED)
 {
        struct child_process *d = cb;
        if (number_callbacks >= 4)
@@ -40,10 +38,10 @@ static int parallel_next(struct child_process *cp,
        return 1;
 }
 
-static int no_job(struct child_process *cp,
+static int no_job(struct child_process *cp UNUSED,
                  struct strbuf *err,
-                 void *cb,
-                 void **task_cb)
+                 void *cb UNUSED,
+                 void **task_cb UNUSED)
 {
        if (err)
                strbuf_addstr(err, "no further jobs available\n");
@@ -52,10 +50,10 @@ static int no_job(struct child_process *cp,
        return 0;
 }
 
-static int task_finished(int result,
+static int task_finished(int result UNUSED,
                         struct strbuf *err,
-                        void *pp_cb,
-                        void *pp_task_cb)
+                        void *pp_cb UNUSED,
+                        void *pp_task_cb UNUSED)
 {
        if (err)
                strbuf_addstr(err, "asking for a quick stop\n");
index d013bccddaebd9c7fb0eb4b4c4e1be0643f82260..d1cf7377b7c60e0259f747a334983563b6c86715 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "sigchain.h"
 
 #define X(f) \
index 28365ff85b69bbda4ca47b5284b2cbd7bebea9e9..3d1436da59872fcfe7551a5586c7720893221ddb 100644 (file)
@@ -3,13 +3,14 @@
  */
 
 #include "test-tool.h"
-#include "cache.h"
+#include "gettext.h"
 #include "strbuf.h"
 #include "simple-ipc.h"
 #include "parse-options.h"
 #include "thread-utils.h"
 #include "strvec.h"
 #include "run-command.h"
+#include "trace2.h"
 
 #ifndef SUPPORTS_SIMPLE_IPC
 int cmd__simple_ipc(int argc, const char **argv)
index dc1c14bde3741715f9dee0768f061e31ba2d7330..a3848a8b66859e58c3d43065208a4292e63fabec 100644 (file)
@@ -1,4 +1,5 @@
 #include "test-tool.h"
+#include "cache.h"
 #include "submodule-config.h"
 
 static void die_usage(const char **argv, const char *msg)
index 2c103d1824cfc7f035aea4a6453c9706f9b4491e..a95bb4da9b174e547b41eb2c57dee9fd9273c5ea 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 
 int cmd__wildmatch(int argc, const char **argv)
 {
index 8d1e408bb58f5e097f242d5c1fd2c7bb036deb6e..a8f5d3274a5a6007ca9acb3317752c6c1c7982a0 100644 (file)
@@ -105,10 +105,46 @@ index $file1..$file2 100644
  }
 EOF
 
+       cat >expect_diffstat <<EOF
+ file1 => file2 | 21 ++++++++++-----------
+ 1 file changed, 10 insertions(+), 11 deletions(-)
+EOF
+
        STRATEGY=$1
 
+       test_expect_success "$STRATEGY diff from attributes" '
+               echo "file* diff=driver" >.gitattributes &&
+               git config diff.driver.algorithm "$STRATEGY" &&
+               test_must_fail git diff --no-index file1 file2 > output &&
+               cat expect &&
+               cat output &&
+               test_cmp expect output
+       '
+
+       test_expect_success "$STRATEGY diff from attributes has valid diffstat" '
+               echo "file* diff=driver" >.gitattributes &&
+               git config diff.driver.algorithm "$STRATEGY" &&
+               test_must_fail git diff --stat --no-index file1 file2 > output &&
+               test_cmp expect_diffstat output
+       '
+
        test_expect_success "$STRATEGY diff" '
-               test_must_fail git diff --no-index "--$STRATEGY" file1 file2 > output &&
+               test_must_fail git diff --no-index "--diff-algorithm=$STRATEGY" file1 file2 > output &&
+               test_cmp expect output
+       '
+
+       test_expect_success "$STRATEGY diff command line precedence before attributes" '
+               echo "file* diff=driver" >.gitattributes &&
+               git config diff.driver.algorithm myers &&
+               test_must_fail git diff --no-index "--diff-algorithm=$STRATEGY" file1 file2 > output &&
+               test_cmp expect output
+       '
+
+       test_expect_success "$STRATEGY diff attributes precedence before config" '
+               git config diff.algorithm default &&
+               echo "file* diff=driver" >.gitattributes &&
+               git config diff.driver.algorithm "$STRATEGY" &&
+               test_must_fail git diff --no-index file1 file2 > output &&
                test_cmp expect output
        '
 
index 2c49569f6757b04eb6639439749ff786682c0d8b..6805229dcb9528e75399aefc46735e8cd14f4b4c 100644 (file)
@@ -25,6 +25,7 @@
 #    LIB_HTTPD_DAV               enable DAV
 #    LIB_HTTPD_SVN               enable SVN at given location (e.g. "svn")
 #    LIB_HTTPD_SSL               enable SSL
+#    LIB_HTTPD_PROXY             enable proxy
 #
 # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>
 #
@@ -99,16 +100,19 @@ then
 fi
 
 HTTPD_VERSION=$($LIB_HTTPD_PATH -v | \
-       sed -n 's/^Server version: Apache\/\([0-9]*\)\..*$/\1/p; q')
+       sed -n 's/^Server version: Apache\/\([0-9.]*\).*$/\1/p; q')
+HTTPD_VERSION_MAJOR=$(echo $HTTPD_VERSION | cut -d. -f1)
+HTTPD_VERSION_MINOR=$(echo $HTTPD_VERSION | cut -d. -f2)
 
-if test -n "$HTTPD_VERSION"
+if test -n "$HTTPD_VERSION_MAJOR"
 then
        if test -z "$LIB_HTTPD_MODULE_PATH"
        then
-               if ! test $HTTPD_VERSION -ge 2
+               if ! test "$HTTPD_VERSION_MAJOR" -eq 2 ||
+                  ! test "$HTTPD_VERSION_MINOR" -ge 4
                then
                        test_skip_or_die GIT_TEST_HTTPD \
-                               "at least Apache version 2 is required"
+                               "at least Apache version 2.4 is required"
                fi
                if ! test -d "$DEFAULT_HTTPD_MODULE_PATH"
                then
@@ -130,6 +134,7 @@ install_script () {
 prepare_httpd() {
        mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH"
        cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH"
+       cp "$TEST_PATH"/proxy-passwd "$HTTPD_ROOT_PATH"
        install_script incomplete-length-upload-pack-v2-http.sh
        install_script incomplete-body-upload-pack-v2-http.sh
        install_script error-no-report.sh
@@ -174,6 +179,11 @@ prepare_httpd() {
                        export LIB_HTTPD_SVN LIB_HTTPD_SVNPATH
                fi
        fi
+
+       if test -n "$LIB_HTTPD_PROXY"
+       then
+               HTTPD_PARA="$HTTPD_PARA -DPROXY"
+       fi
 }
 
 enable_http2 () {
@@ -218,8 +228,12 @@ test_http_push_nonff () {
                git commit -a -m path2 --amend &&
 
                test_must_fail git push -v origin >output 2>&1 &&
-               (cd "$REMOTE_REPO" &&
-                test $HEAD = $(git rev-parse --verify HEAD))
+               (
+                       cd "$REMOTE_REPO" &&
+                       echo "$HEAD" >expect &&
+                       git rev-parse --verify HEAD >actual &&
+                       test_cmp expect actual
+               )
        '
 
        test_expect_success 'non-fast-forward push show ref status' '
@@ -281,11 +295,11 @@ expect_askpass() {
                none)
                        ;;
                pass)
-                       echo "askpass: Password for 'http://$2@$dest': "
+                       echo "askpass: Password for '$HTTPD_PROTO://$2@$dest': "
                        ;;
                both)
-                       echo "askpass: Username for 'http://$dest': "
-                       echo "askpass: Password for 'http://$2@$dest': "
+                       echo "askpass: Username for '$HTTPD_PROTO://$dest': "
+                       echo "askpass: Password for '$HTTPD_PROTO://$2@$dest': "
                        ;;
                *)
                        false
index 76335cdb24d7d7a3b74799aaeae8cadc99f77656..f43a25c1f100d04d4b556b36a4b7f4d56ac89324 100644 (file)
@@ -31,20 +31,9 @@ ErrorLog error.log
 
 <IfDefine HTTP2>
 LoadModule http2_module modules/mod_http2.so
-Protocols h2c
+Protocols h2 h2c
 </IfDefine>
 
-<IfVersion < 2.4>
-LockFile accept.lock
-</IfVersion>
-
-<IfVersion < 2.1>
-<IfModule !mod_auth.c>
-       LoadModule auth_module modules/mod_auth.so
-</IfModule>
-</IfVersion>
-
-<IfVersion >= 2.1>
 <IfModule !mod_auth_basic.c>
        LoadModule auth_basic_module modules/mod_auth_basic.so
 </IfModule>
@@ -57,9 +46,23 @@ LockFile accept.lock
 <IfModule !mod_authz_host.c>
        LoadModule authz_host_module modules/mod_authz_host.so
 </IfModule>
-</IfVersion>
 
-<IfVersion >= 2.4>
+<IfDefine PROXY>
+<IfModule !mod_proxy.c>
+       LoadModule proxy_module modules/mod_proxy.so
+</IfModule>
+<IfModule !mod_proxy_http.c>
+       LoadModule proxy_http_module modules/mod_proxy_http.so
+</IfModule>
+ProxyRequests On
+<Proxy "*">
+       AuthType Basic
+       AuthName "proxy-auth"
+       AuthUserFile proxy-passwd
+       Require valid-user
+</Proxy>
+</IfDefine>
+
 <IfModule !mod_authn_core.c>
        LoadModule authn_core_module modules/mod_authn_core.so
 </IfModule>
@@ -83,7 +86,6 @@ LockFile accept.lock
        LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
 </IfModule>
 </IfDefine>
-</IfVersion>
 
 PassEnv GIT_VALGRIND
 PassEnv GIT_VALGRIND_OPTIONS
@@ -123,6 +125,10 @@ Alias /auth/dumb/ www/auth/dumb/
        Header set Set-Cookie name=value
 </LocationMatch>
 <LocationMatch /smart_headers/>
+       <RequireAll>
+               Require expr %{HTTP:x-magic-one} == 'abra'
+               Require expr %{HTTP:x-magic-two} == 'cadabra'
+       </RequireAll>
        SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
        SetEnv GIT_HTTP_EXPORT_ALL
 </LocationMatch>
@@ -211,18 +217,6 @@ RewriteRule ^/intern-redir/(.*)/foo$ /smart/$1 [PT]
 RewriteRule ^/redir-objects/(.*/info/refs)$ /dumb/$1 [PT]
 RewriteRule ^/redir-objects/(.*/objects/.*)$ /dumb/$1 [R=301]
 
-# Apache 2.2 does not understand <RequireAll>, so we use RewriteCond.
-# And as RewriteCond does not allow testing for non-matches, we match
-# the desired case first (one has abra, two has cadabra), and let it
-# pass by marking the RewriteRule as [L], "last rule, do not process
-# any other matching RewriteRules after this"), and then have another
-# RewriteRule that matches all other cases and lets them fail via '[F]',
-# "fail the request".
-RewriteCond %{HTTP:x-magic-one} =abra
-RewriteCond %{HTTP:x-magic-two} =cadabra
-RewriteRule ^/smart_headers/.* - [L]
-RewriteRule ^/smart_headers/.* - [F]
-
 <IfDefine SSL>
 LoadModule ssl_module modules/mod_ssl.so
 
@@ -231,7 +225,6 @@ SSLCertificateKeyFile httpd.pem
 SSLRandomSeed startup file:/dev/urandom 512
 SSLRandomSeed connect file:/dev/urandom 512
 SSLSessionCache none
-SSLMutex file:ssl_mutex
 SSLEngine On
 </IfDefine>
 
diff --git a/t/lib-httpd/proxy-passwd b/t/lib-httpd/proxy-passwd
new file mode 100644 (file)
index 0000000..77c2513
--- /dev/null
@@ -0,0 +1 @@
+proxuser:2x7tAukjAED5M
index 6dab2579cbf9658c3ac2bd55c8a66333d67eda47..812e8253f0eea30c2411fd06ba518351a8253f9a 100644 (file)
@@ -1,7 +1,7 @@
 RANDFILE                = $ENV::RANDFILE_PATH
 
 [ req ]
-default_bits            = 1024
+default_bits            = 2048
 distinguished_name      = req_distinguished_name
 prompt                  = no
 [ req_distinguished_name ]
index cfd76bf987bd902503cfcacd3e8ac1b9c4deb09c..89ca1f7805547eec1f4ee8e90c1afefc30b35da6 100644 (file)
@@ -29,8 +29,12 @@ set_and_save_state () {
 
 # verify_state <path> <expected-worktree-content> <expected-index-content>
 verify_state () {
-       test "$(cat "$1")" = "$2" &&
-       test "$(git show :"$1")" = "$3"
+       echo "$2" >expect &&
+       test_cmp expect "$1" &&
+
+       echo "$3" >expect &&
+       git show :"$1" >actual &&
+       test_cmp expect actual
 }
 
 # verify_saved_state <path>
@@ -46,5 +50,6 @@ save_head () {
 }
 
 verify_saved_head () {
-       test "$(cat _head)" = "$(git rev-parse HEAD)"
+       git rev-parse HEAD >actual &&
+       test_cmp _head actual
 }
index b57541356bd03d139334a144339b01a92be2c70a..7ca5b918f0445cbb3097e531883861f5574e29a1 100644 (file)
@@ -60,7 +60,7 @@ set_fake_editor () {
                ">")
                        echo >> "$1";;
                bad)
-                       action="badcmd";;
+                       action="pickled";;
                fakesha)
                        test \& != "$action" || action=pick
                        echo "$action XXXXXXX False commit" >> "$1"
@@ -211,6 +211,9 @@ check_reworded_commits () {
 # usage: set_replace_editor <file>
 #
 # Replace the todo file with the exact contents of the given file.
+# N.B. sets GIT_SEQUENCE_EDITOR rather than EDITOR so it can be
+# combined with set_fake_editor to reword commits and replace the
+# todo list
 set_replace_editor () {
        cat >script <<-\EOF &&
        cat FILENAME >"$1"
@@ -219,6 +222,7 @@ set_replace_editor () {
        cat "$1"
        EOF
 
-       sed -e "s/FILENAME/$1/g" <script | write_script fake-editor.sh &&
-       test_set_editor "$(pwd)/fake-editor.sh"
+       sed -e "s/FILENAME/$1/g" script |
+               write_script fake-sequence-editor.sh &&
+       test_set_sequence_editor "$(pwd)/fake-sequence-editor.sh"
 }
index 2d31fcfda1f338973cfc868b7f01ae925b39d326..dee14992c52d5d24075c9b048dfe1e47c620b29e 100644 (file)
@@ -168,20 +168,16 @@ replace_gitfile_with_git_dir () {
 # Note that this only supports submodules at the root level of the
 # superproject, with the default name, i.e. same as its path.
 test_git_directory_is_unchanged () {
-       (
-               cd ".git/modules/$1" &&
-               # does core.worktree point at the right place?
-               test "$(git config core.worktree)" = "../../../$1" &&
-               # remove it temporarily before comparing, as
-               # "$1/.git/config" lacks it...
-               git config --unset core.worktree
-       ) &&
+       # does core.worktree point at the right place?
+       echo "../../../$1" >expect &&
+       git -C ".git/modules/$1" config core.worktree >actual &&
+       test_cmp expect actual &&
+       # remove it temporarily before comparing, as
+       # "$1/.git/config" lacks it...
+       git -C ".git/modules/$1" config --unset core.worktree &&
        diff -r ".git/modules/$1" "$1/.git" &&
-       (
-               # ... and then restore.
-               cd ".git/modules/$1" &&
-               git config core.worktree "../../../$1"
-       )
+       # ... and then restore.
+       git -C ".git/modules/$1" config core.worktree "../../../$1"
 }
 
 test_git_directory_exists () {
@@ -189,7 +185,9 @@ test_git_directory_exists () {
        if test -f sub1/.git
        then
                # does core.worktree point at the right place?
-               test "$(git -C .git/modules/$1 config core.worktree)" = "../../../$1"
+               echo "../../../$1" >expect &&
+               git -C ".git/modules/$1" config core.worktree >actual &&
+               test_cmp expect actual
        fi
 }
 
index d479303efa03df6f818496f1cdcafe390bee0126..30a6edca1d29fcef63cfc155685600c63553f636 100755 (executable)
@@ -598,9 +598,14 @@ test_expect_success 'invalid default branch name' '
 test_expect_success 'branch -m with the initial branch' '
        git init rename-initial &&
        git -C rename-initial branch -m renamed &&
-       test renamed = $(git -C rename-initial symbolic-ref --short HEAD) &&
+       echo renamed >expect &&
+       git -C rename-initial symbolic-ref --short HEAD >actual &&
+       test_cmp expect actual &&
+
        git -C rename-initial branch -m renamed again &&
-       test again = $(git -C rename-initial symbolic-ref --short HEAD)
+       echo again >expect &&
+       git -C rename-initial symbolic-ref --short HEAD >actual &&
+       test_cmp expect actual
 '
 
 test_done
index 26eaca095a26a6a654364bdd8acf208af30b2d00..e013d38f485cc8b06c1afb51579ed6a4d322dfaa 100755 (executable)
@@ -33,7 +33,9 @@ test_expect_success 'bad setup: invalid .git file path' '
 
 test_expect_success 'final setup + check rev-parse --git-dir' '
        echo "gitdir: $REAL" >.git &&
-       test "$REAL" = "$(git rev-parse --git-dir)"
+       echo "$REAL" >expect &&
+       git rev-parse --git-dir >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'check hash-object' '
index f9bbb91f64e35d284a4ac79a6b2ecaa1d2913455..575805513a3d7f6d27fee7ceefcb75e71753f1f9 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='Test am with auto.crlf'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >patchfile <<\EOF
index a94ac1eae377c023ae3e02eaae393db6e8d232d3..2f57c8669cb5af3dd6fc79bfca4b486f50fa4d19 100755 (executable)
@@ -70,7 +70,8 @@ create_NNO_MIX_files () {
                                cp CRLF        ${pfx}_CRLF.txt &&
                                cp CRLF_mix_LF ${pfx}_CRLF_mix_LF.txt &&
                                cp LF_mix_CR   ${pfx}_LF_mix_CR.txt &&
-                               cp CRLF_nul    ${pfx}_CRLF_nul.txt
+                               cp CRLF_nul    ${pfx}_CRLF_nul.txt ||
+                               return 1
                        done
                done
        done
@@ -101,7 +102,8 @@ commit_check_warn () {
        do
                fname=${pfx}_$f.txt &&
                cp $f $fname &&
-               git -c core.autocrlf=$crlf add $fname 2>"${pfx}_$f.err"
+               git -c core.autocrlf=$crlf add $fname 2>"${pfx}_$f.err" ||
+               return 1
        done &&
        git commit -m "core.autocrlf $crlf" &&
        check_warning "$lfname" ${pfx}_LF.err &&
@@ -121,15 +123,19 @@ commit_chk_wrnNNO () {
        lfmixcr=$1 ; shift
        crlfnul=$1 ; shift
        pfx=NNO_attr_${attr}_aeol_${aeol}_${crlf}
-       #Commit files on top of existing file
-       create_gitattributes "$attr" $aeol &&
-       for f in LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
-       do
-               fname=${pfx}_$f.txt &&
-               cp $f $fname &&
-               printf Z >>"$fname" &&
-               git -c core.autocrlf=$crlf add $fname 2>"${pfx}_$f.err"
-       done
+
+       test_expect_success 'setup commit NNO files' '
+               #Commit files on top of existing file
+               create_gitattributes "$attr" $aeol &&
+               for f in LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
+               do
+                       fname=${pfx}_$f.txt &&
+                       cp $f $fname &&
+                       printf Z >>"$fname" &&
+                       git -c core.autocrlf=$crlf add $fname 2>"${pfx}_$f.err" ||
+                       return 1
+               done
+       '
 
        test_expect_success "commit NNO files crlf=$crlf attr=$attr LF" '
                check_warning "$lfwarn" ${pfx}_LF.err
@@ -163,15 +169,19 @@ commit_MIX_chkwrn () {
        lfmixcr=$1 ; shift
        crlfnul=$1 ; shift
        pfx=MIX_attr_${attr}_aeol_${aeol}_${crlf}
-       #Commit file with CLRF_mix_LF on top of existing file
-       create_gitattributes "$attr" $aeol &&
-       for f in LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
-       do
-               fname=${pfx}_$f.txt &&
-               cp CRLF_mix_LF $fname &&
-               printf Z >>"$fname" &&
-               git -c core.autocrlf=$crlf add $fname 2>"${pfx}_$f.err"
-       done
+
+       test_expect_success 'setup commit file with mixed EOL' '
+               #Commit file with CLRF_mix_LF on top of existing file
+               create_gitattributes "$attr" $aeol &&
+               for f in LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
+               do
+                       fname=${pfx}_$f.txt &&
+                       cp CRLF_mix_LF $fname &&
+                       printf Z >>"$fname" &&
+                       git -c core.autocrlf=$crlf add $fname 2>"${pfx}_$f.err" ||
+                       return 1
+               done
+       '
 
        test_expect_success "commit file with mixed EOL onto LF crlf=$crlf attr=$attr" '
                check_warning "$lfwarn" ${pfx}_LF.err
@@ -289,17 +299,17 @@ checkout_files () {
        lfmixcrlf=$1 ; shift
        lfmixcr=$1 ; shift
        crlfnul=$1 ; shift
-       create_gitattributes "$attr" $ident $aeol &&
-       git config core.autocrlf $crlf &&
+       test_expect_success "setup config for checkout attr=$attr ident=$ident aeol=$aeol core.autocrlf=$crlf" '
+               create_gitattributes "$attr" $ident $aeol &&
+               git config core.autocrlf $crlf
+       '
        pfx=eol_${ceol}_crlf_${crlf}_attr_${attr}_ &&
        for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul
        do
-               rm crlf_false_attr__$f.txt &&
-               if test -z "$ceol"; then
-                       git checkout -- crlf_false_attr__$f.txt
-               else
-                       git -c core.eol=$ceol checkout -- crlf_false_attr__$f.txt
-               fi
+               test_expect_success "setup $f checkout ${ceol:+ with -c core.eol=$ceol}"  '
+                       rm -f crlf_false_attr__$f.txt &&
+                       git ${ceol:+-c core.eol=$ceol} checkout -- crlf_false_attr__$f.txt
+               '
        done
 
        test_expect_success "ls-files --eol attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol" '
index 6bada3702257649551558884237f71bea3fdadc2..c3eb1158ef9ae2eb10f3f7a6d5c882e41f3c576a 100755 (executable)
@@ -15,12 +15,22 @@ test_expect_success SYMLINKS setup '
 
 test_expect_success SYMLINKS 'update-index --add beyond symlinks' '
        test_must_fail git update-index --add c/d &&
-       ! ( git ls-files | grep c/d )
+       cat >expect <<-\EOF &&
+       a
+       b/d
+       EOF
+       git ls-files >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success SYMLINKS 'add beyond symlinks' '
        test_must_fail git add c/d &&
-       ! ( git ls-files | grep c/d )
+       cat >expect <<-\EOF &&
+       a
+       b/d
+       EOF
+       git ls-files >actual &&
+       test_cmp expect actual
 '
 
 test_done
index 68e29c904a62c9ef51d6a1bfc3449795d50ac10f..0afa3d0d312ca6d1788b76d3b0dfcba04f8397e7 100755 (executable)
@@ -10,20 +10,27 @@ TEST_PASSES_SANITIZE_LEAK=true
 
 norm_path() {
        expected=$(test-tool path-utils print_path "$2")
-       test_expect_success $3 "normalize path: $1 => $2" \
-       "test \"\$(test-tool path-utils normalize_path_copy '$1')\" = '$expected'"
+       test_expect_success $3 "normalize path: $1 => $2" "
+               echo '$expected' >expect &&
+               test-tool path-utils normalize_path_copy '$1' >actual &&
+               test_cmp expect actual
+       "
 }
 
 relative_path() {
        expected=$(test-tool path-utils print_path "$3")
-       test_expect_success $4 "relative path: $1 $2 => $3" \
-       "test \"\$(test-tool path-utils relative_path '$1' '$2')\" = '$expected'"
+       test_expect_success $4 "relative path: $1 $2 => $3" "
+               echo '$expected' >expect &&
+               test-tool path-utils relative_path '$1' '$2' >actual &&
+               test_cmp expect actual
+       "
 }
 
 test_submodule_relative_url() {
        test_expect_success "test_submodule_relative_url: $1 $2 $3 => $4" "
-               actual=\$(test-tool submodule resolve-relative-url '$1' '$2' '$3') &&
-               test \"\$actual\" = '$4'
+               echo '$4' >expect &&
+               test-tool submodule resolve-relative-url '$1' '$2' '$3' >actual &&
+               test_cmp expect actual
        "
 }
 
@@ -64,9 +71,11 @@ ancestor() {
                expected=$(($expected-$rootslash+$rootoff))
                ;;
        esac
-       test_expect_success $4 "longest ancestor: $1 $2 => $expected" \
-       "actual=\$(test-tool path-utils longest_ancestor_length '$1' '$2') &&
-        test \"\$actual\" = '$expected'"
+       test_expect_success $4 "longest ancestor: $1 $2 => $expected" "
+               echo '$expected' >expect &&
+               test-tool path-utils longest_ancestor_length '$1' '$2' >actual &&
+               test_cmp expect actual
+       "
 }
 
 # Some absolute path tests should be skipped on Windows due to path mangling
@@ -166,8 +175,10 @@ ancestor D:/Users/me C:/ -1 MINGW
 ancestor //server/share/my-directory //server/share/ 14 MINGW
 
 test_expect_success 'strip_path_suffix' '
-       test c:/msysgit = $(test-tool path-utils strip_path_suffix \
-               c:/msysgit/libexec//git-core libexec/git-core)
+       echo c:/msysgit >expect &&
+       test-tool path-utils strip_path_suffix \
+               c:/msysgit/libexec//git-core libexec/git-core >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'absolute path rejects the empty string' '
@@ -188,35 +199,61 @@ test_expect_success 'real path rejects the empty string' '
 '
 
 test_expect_success POSIX 'real path works on absolute paths 1' '
+       echo / >expect &&
+       test-tool path-utils real_path "/" >actual &&
+       test_cmp expect actual &&
+
        nopath="hopefully-absent-path" &&
-       test "/" = "$(test-tool path-utils real_path "/")" &&
-       test "/$nopath" = "$(test-tool path-utils real_path "/$nopath")"
+       echo "/$nopath" >expect &&
+       test-tool path-utils real_path "/$nopath" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'real path works on absolute paths 2' '
-       nopath="hopefully-absent-path" &&
        # Find an existing top-level directory for the remaining tests:
        d=$(pwd -P | sed -e "s|^\([^/]*/[^/]*\)/.*|\1|") &&
-       test "$d" = "$(test-tool path-utils real_path "$d")" &&
-       test "$d/$nopath" = "$(test-tool path-utils real_path "$d/$nopath")"
+       echo "$d" >expect &&
+       test-tool path-utils real_path "$d" >actual &&
+       test_cmp expect actual &&
+
+       nopath="hopefully-absent-path" &&
+       echo "$d/$nopath" >expect &&
+       test-tool path-utils real_path "$d/$nopath" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success POSIX 'real path removes extra leading slashes' '
+       echo "/" >expect &&
+       test-tool path-utils real_path "///" >actual &&
+       test_cmp expect actual &&
+
        nopath="hopefully-absent-path" &&
-       test "/" = "$(test-tool path-utils real_path "///")" &&
-       test "/$nopath" = "$(test-tool path-utils real_path "///$nopath")" &&
+       echo "/$nopath" >expect &&
+       test-tool path-utils real_path "///$nopath" >actual &&
+       test_cmp expect actual &&
+
        # Find an existing top-level directory for the remaining tests:
        d=$(pwd -P | sed -e "s|^\([^/]*/[^/]*\)/.*|\1|") &&
-       test "$d" = "$(test-tool path-utils real_path "//$d")" &&
-       test "$d/$nopath" = "$(test-tool path-utils real_path "//$d/$nopath")"
+       echo "$d" >expect &&
+       test-tool path-utils real_path "//$d" >actual &&
+       test_cmp expect actual &&
+
+       echo "$d/$nopath" >expect &&
+       test-tool path-utils real_path "//$d/$nopath" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'real path removes other extra slashes' '
-       nopath="hopefully-absent-path" &&
        # Find an existing top-level directory for the remaining tests:
        d=$(pwd -P | sed -e "s|^\([^/]*/[^/]*\)/.*|\1|") &&
-       test "$d" = "$(test-tool path-utils real_path "$d///")" &&
-       test "$d/$nopath" = "$(test-tool path-utils real_path "$d///$nopath")"
+       echo "$d" >expect &&
+       test-tool path-utils real_path "$d///" >actual &&
+       test_cmp expect actual &&
+
+       nopath="hopefully-absent-path" &&
+       echo "$d/$nopath" >expect &&
+       test-tool path-utils real_path "$d///$nopath" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success SYMLINKS 'real path works on symlinks' '
@@ -227,19 +264,29 @@ test_expect_success SYMLINKS 'real path works on symlinks' '
        mkdir third &&
        dir="$(cd .git && pwd -P)" &&
        dir2=third/../second/other/.git &&
-       test "$dir" = "$(test-tool path-utils real_path $dir2)" &&
+       echo "$dir" >expect &&
+       test-tool path-utils real_path $dir2 >actual &&
+       test_cmp expect actual &&
        file="$dir"/index &&
-       test "$file" = "$(test-tool path-utils real_path $dir2/index)" &&
+       echo "$file" >expect &&
+       test-tool path-utils real_path $dir2/index >actual &&
+       test_cmp expect actual &&
        basename=blub &&
-       test "$dir/$basename" = "$(cd .git && test-tool path-utils real_path "$basename")" &&
+       echo "$dir/$basename" >expect &&
+       test-tool -C .git path-utils real_path "$basename" >actual &&
+       test_cmp expect actual &&
        ln -s ../first/file .git/syml &&
        sym="$(cd first && pwd -P)"/file &&
-       test "$sym" = "$(test-tool path-utils real_path "$dir2/syml")"
+       echo "$sym" >expect &&
+       test-tool path-utils real_path "$dir2/syml" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success SYMLINKS 'prefix_path works with absolute paths to work tree symlinks' '
        ln -s target symlink &&
-       test "$(test-tool path-utils prefix_path prefix "$(pwd)/symlink")" = "symlink"
+       echo "symlink" >expect &&
+       test-tool path-utils prefix_path prefix "$(pwd)/symlink" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'prefix_path works with only absolute path to work tree' '
@@ -255,7 +302,10 @@ test_expect_success 'prefix_path rejects absolute path to dir with same beginnin
 test_expect_success SYMLINKS 'prefix_path works with absolute path to a symlink to work tree having  same beginning as work tree' '
        git init repo &&
        ln -s repo repolink &&
-       test "a" = "$(cd repo && test-tool path-utils prefix_path prefix "$(pwd)/../repolink/a")"
+       echo "a" >expect &&
+       repo_path="$(cd repo && pwd)" &&
+       test-tool -C repo path-utils prefix_path prefix "$repo_path/../repolink/a" >actual &&
+       test_cmp expect actual
 '
 
 relative_path /foo/a/b/c/      /foo/a/b/       c/
index 63a1a45cd30921a5b0d28b8d5db63046aeb2a3ea..7d0a0da8c01b8b69a9d9ca607c55145d96e59ad1 100755 (executable)
@@ -106,11 +106,7 @@ test_expect_success SYMLINKS 'setup dirs with symlinks' '
        ln -s d dir4/a/e &&
        ln -s ../b dir4/a/f &&
 
-       mkdir -p dir5/a/b &&
-       mkdir -p dir5/a/c &&
-       ln -s ../c dir5/a/b/d &&
-       ln -s ../ dir5/a/b/e &&
-       ln -s ../../ dir5/a/b/f
+       ln -s dir4 dir5
 '
 
 test_expect_success SYMLINKS 'dir-iterator should not follow symlinks by default' '
@@ -129,21 +125,10 @@ test_expect_success SYMLINKS 'dir-iterator should not follow symlinks by default
        test_cmp expected-no-follow-sorted-output actual-no-follow-sorted-output
 '
 
-test_expect_success SYMLINKS 'dir-iterator should follow symlinks w/ follow flag' '
-       cat >expected-follow-sorted-output <<-EOF &&
-       [d] (a) [a] ./dir4/a
-       [d] (a/f) [f] ./dir4/a/f
-       [d] (a/f/c) [c] ./dir4/a/f/c
-       [d] (b) [b] ./dir4/b
-       [d] (b/c) [c] ./dir4/b/c
-       [f] (a/d) [d] ./dir4/a/d
-       [f] (a/e) [e] ./dir4/a/e
-       EOF
-
-       test-tool dir-iterator --follow-symlinks ./dir4 >out &&
-       sort out >actual-follow-sorted-output &&
+test_expect_success SYMLINKS 'dir-iterator does not resolve top-level symlinks' '
+       test_must_fail test-tool dir-iterator ./dir5 >out &&
 
-       test_cmp expected-follow-sorted-output actual-follow-sorted-output
+       grep "ENOTDIR" out
 '
 
 test_done
index a16cc3d298357be89e58514db83c1d3f04b3ad4d..70a3223f2199b06833166863e58489ba0f632e59 100755 (executable)
@@ -12,7 +12,9 @@ test_expect_success 'branch -d @{-1}' '
        test_commit A &&
        git checkout -b junk &&
        git checkout - &&
-       test "$(git symbolic-ref HEAD)" = refs/heads/main &&
+       echo refs/heads/main >expect &&
+       git symbolic-ref HEAD >actual &&
+       test_cmp expect actual &&
        git branch -d @{-1} &&
        test_must_fail git rev-parse --verify refs/heads/junk
 '
@@ -21,7 +23,9 @@ test_expect_success 'branch -d @{-12} when there is not enough switches yet' '
        git reflog expire --expire=now &&
        git checkout -b junk2 &&
        git checkout - &&
-       test "$(git symbolic-ref HEAD)" = refs/heads/main &&
+       echo refs/heads/main >expect &&
+       git symbolic-ref HEAD >actual &&
+       test_cmp expect actual &&
        test_must_fail git branch -d @{-12} &&
        git rev-parse --verify refs/heads/main
 '
index 3485c0534e6d39be9ef6f285fa2ec80400dc47cd..c66d91e82d8bc737bc6b909c9427f163aef5dfea 100755 (executable)
@@ -35,6 +35,16 @@ test_expect_success 'setup helper scripts' '
        test -z "$pass" || echo password=$pass
        EOF
 
+       write_script git-credential-verbatim-with-expiry <<-\EOF &&
+       user=$1; shift
+       pass=$1; shift
+       pexpiry=$1; shift
+       . ./dump
+       test -z "$user" || echo username=$user
+       test -z "$pass" || echo password=$pass
+       test -z "$pexpiry" || echo password_expiry_utc=$pexpiry
+       EOF
+
        PATH="$PWD:$PATH"
 '
 
@@ -109,6 +119,43 @@ test_expect_success 'credential_fill continues through partial response' '
        EOF
 '
 
+test_expect_success 'credential_fill populates password_expiry_utc' '
+       check fill "verbatim-with-expiry one two 9999999999" <<-\EOF
+       protocol=http
+       host=example.com
+       --
+       protocol=http
+       host=example.com
+       username=one
+       password=two
+       password_expiry_utc=9999999999
+       --
+       verbatim-with-expiry: get
+       verbatim-with-expiry: protocol=http
+       verbatim-with-expiry: host=example.com
+       EOF
+'
+
+test_expect_success 'credential_fill ignores expired password' '
+       check fill "verbatim-with-expiry one two 5" "verbatim three four" <<-\EOF
+       protocol=http
+       host=example.com
+       --
+       protocol=http
+       host=example.com
+       username=three
+       password=four
+       --
+       verbatim-with-expiry: get
+       verbatim-with-expiry: protocol=http
+       verbatim-with-expiry: host=example.com
+       verbatim: get
+       verbatim: protocol=http
+       verbatim: host=example.com
+       verbatim: username=one
+       EOF
+'
+
 test_expect_success 'credential_fill passes along metadata' '
        check fill "verbatim one two" <<-\EOF
        protocol=ftp
@@ -149,6 +196,24 @@ test_expect_success 'credential_approve calls all helpers' '
        EOF
 '
 
+test_expect_success 'credential_approve stores password expiry' '
+       check approve useless <<-\EOF
+       protocol=http
+       host=example.com
+       username=foo
+       password=bar
+       password_expiry_utc=9999999999
+       --
+       --
+       useless: store
+       useless: protocol=http
+       useless: host=example.com
+       useless: username=foo
+       useless: password=bar
+       useless: password_expiry_utc=9999999999
+       EOF
+'
+
 test_expect_success 'do not bother storing password-less credential' '
        check approve useless <<-\EOF
        protocol=http
@@ -159,6 +224,17 @@ test_expect_success 'do not bother storing password-less credential' '
        EOF
 '
 
+test_expect_success 'credential_approve does not store expired password' '
+       check approve useless <<-\EOF
+       protocol=http
+       host=example.com
+       username=foo
+       password=bar
+       password_expiry_utc=5
+       --
+       --
+       EOF
+'
 
 test_expect_success 'credential_reject calls all helpers' '
        check reject useless "verbatim one two" <<-\EOF
@@ -181,6 +257,24 @@ test_expect_success 'credential_reject calls all helpers' '
        EOF
 '
 
+test_expect_success 'credential_reject erases credential regardless of expiry' '
+       check reject useless <<-\EOF
+       protocol=http
+       host=example.com
+       username=foo
+       password=bar
+       password_expiry_utc=5
+       --
+       --
+       useless: erase
+       useless: protocol=http
+       useless: host=example.com
+       useless: username=foo
+       useless: password=bar
+       useless: password_expiry_utc=5
+       EOF
+'
+
 test_expect_success 'usernames can be preserved' '
        check fill "verbatim \"\" three" <<-\EOF
        protocol=http
index 58d6da7feb17b4b6f24af8c136ce4b50bbaf05e6..1b6437ec0794e887e1d14452c516c487d0bb007f 100755 (executable)
@@ -9,6 +9,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Remove a default ACL from the test dir if possible.
index 7cf80bf66a6d2e1adea5c269c91923652c29e232..70389fa2ebbfa47ad410ca5c30bb294b6cf0753f 100755 (executable)
@@ -5,6 +5,7 @@
 
 test_description='Test repository version check'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index c69ae41306c90d33b2ac253a25961ae76fec81e7..31b89dd9693afc95f30e0bb9e11dc704fda24b41 100755 (executable)
@@ -9,6 +9,7 @@ test_description='Test repository with default ACL'
 # => this must come before . ./test-lib.sh
 umask 077
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We need an arbitrary other user give permission to using ACLs. root
index d708acdb819536083cc0f8bc5e41d2196d90aee3..c7745e1bf69e910c2d66a61bb8bef36b45473a56 100755 (executable)
@@ -33,7 +33,8 @@ test_expect_success 'symbolic-ref refuses non-ref for HEAD' '
 reset_to_sane
 
 test_expect_success 'symbolic-ref refuses bare sha1' '
-       test_must_fail git symbolic-ref HEAD $(git rev-parse HEAD)
+       rev=$(git rev-parse HEAD) &&
+       test_must_fail git symbolic-ref HEAD "$rev"
 '
 
 reset_to_sane
@@ -189,4 +190,38 @@ test_expect_success 'symbolic-ref pointing at another' '
        test_cmp expect actual
 '
 
+test_expect_success 'symbolic-ref --short handles complex utf8 case' '
+       name="测试-加-增加-加-增加" &&
+       git symbolic-ref TEST_SYMREF "refs/heads/$name" &&
+       # In the real world, we saw problems with this case only
+       # when the locale includes UTF-8. Set it here to try to make things as
+       # hard as possible for us to pass, but in practice we should do the
+       # right thing regardless (and of course some platforms may not even
+       # have this locale).
+       LC_ALL=en_US.UTF-8 git symbolic-ref --short TEST_SYMREF >actual &&
+       echo "$name" >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'symbolic-ref --short handles name with suffix' '
+       git symbolic-ref TEST_SYMREF "refs/remotes/origin/HEAD" &&
+       git symbolic-ref --short TEST_SYMREF >actual &&
+       echo "origin" >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'symbolic-ref --short handles almost-matching name' '
+       git symbolic-ref TEST_SYMREF "refs/headsXfoo" &&
+       git symbolic-ref --short TEST_SYMREF >actual &&
+       echo "headsXfoo" >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'symbolic-ref --short handles name with percent' '
+       git symbolic-ref TEST_SYMREF "refs/heads/%foo" &&
+       git symbolic-ref --short TEST_SYMREF >actual &&
+       echo "%foo" >expect &&
+       test_cmp expect actual
+'
+
 test_done
index 41ba1f1d7fca94e9504e0c198b2e1f7885c41185..9469c79a585f051177a4c9223c0e0f9fd37124dd 100755 (executable)
@@ -5,6 +5,7 @@ test_description='packed-refs entries are covered by loose refs'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index aa59954f6c52faa2a4b5ba3fa32fdd2a2b4b0b85..6c45965b1e4bef9652a1bc876f28605ad213b261 100755 (executable)
@@ -7,6 +7,7 @@ test_description='Test prune and reflog expiration'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_have () {
index 27731722a5b6b26bad0b1929c274414239cc449e..b32ca798f9ff9fb60796dfefd41ad391e229dbf5 100755 (executable)
@@ -5,6 +5,7 @@ test_description='reference transaction hooks'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index fdb886dfe431f36dfc4ef6bcf24abf6827c2243d..bca46378b256f824708a0fb5bcb0afe3f1de1056 100755 (executable)
@@ -1023,4 +1023,34 @@ test_expect_success 'fsck error on gitattributes with excessive size' '
        test_cmp expected actual
 '
 
+test_expect_success 'fsck detects problems in worktree index' '
+       test_when_finished "git worktree remove -f wt" &&
+       git worktree add wt &&
+
+       echo "this will be removed to break the worktree index" >wt/file &&
+       git -C wt add file &&
+       blob=$(git -C wt rev-parse :file) &&
+       remove_object $blob &&
+
+       test_must_fail git fsck --name-objects >actual 2>&1 &&
+       cat >expect <<-EOF &&
+       missing blob $blob (.git/worktrees/wt/index:file)
+       EOF
+       test_cmp expect actual
+'
+
+test_expect_success 'fsck reports problems in main index without filename' '
+       test_when_finished "rm -f .git/index && git read-tree HEAD" &&
+       echo "this object will be removed to break the main index" >file &&
+       git add file &&
+       blob=$(git rev-parse :file) &&
+       remove_object $blob &&
+
+       test_must_fail git fsck --name-objects >actual 2>&1 &&
+       cat >expect <<-EOF &&
+       missing blob $blob (:file)
+       EOF
+       test_cmp expect actual
+'
+
 test_done
index 9ac270abab66f9777c565eb7335263b97ae0cab8..3413da40e4ae0c197b42cb92e9a75983a27bdeb3 100755 (executable)
@@ -14,6 +14,8 @@ so.
 These tests _might_ catch such overruns in normal use, but should be run with
 ASan or valgrind for more confidence.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # the general idea for tags and commits is to build up the "base" file
index 0fafcf9dde385f2c2bac7fbd846098908a72f09b..c1679e31d8afca409323484d588bf63b264f45f2 100755 (executable)
@@ -6,8 +6,12 @@ TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_prefix() {
-       test_expect_success "$1" \
-       "test '$2' = \"\$(git rev-parse --show-prefix)\""
+       local expect="$2" &&
+       test_expect_success "$1: git rev-parse --show-prefix is '$2'" '
+               echo "$expect" >expect &&
+               git rev-parse --show-prefix >actual &&
+               test_cmp expect actual
+       '
 }
 
 test_fail() {
index c34714ffe3fbe5545da1d05b9a74cfc6113e43dd..549eb315a9037845e1dedea14ccb16b943714649 100755 (executable)
@@ -183,6 +183,11 @@ test_expect_success '@{u} error message when no upstream' '
        test_cmp expect actual
 '
 
+test_expect_success '@{u} silent error when no upstream' '
+       test_must_fail git rev-parse --verify --quiet @{u} 2>actual &&
+       test_must_be_empty actual
+'
+
 test_expect_success 'branch@{u} error message with misspelt branch' '
        cat >expect <<-EOF &&
        fatal: no such branch: ${SQ}no-such-branch${SQ}
index 2ef3579fa7c23db5055c41e68438d39871bcf6e9..3506f627b6cf20f11e4cfd78b309e9e9acc07148 100755 (executable)
@@ -177,4 +177,22 @@ test_expect_success 'git hook run a hook with a bad shebang' '
        test_cmp expect actual
 '
 
+test_expect_success 'stdin to hooks' '
+       write_script .git/hooks/test-hook <<-\EOF &&
+       echo BEGIN stdin
+       cat
+       echo END stdin
+       EOF
+
+       cat >expect <<-EOF &&
+       BEGIN stdin
+       hello
+       END stdin
+       EOF
+
+       echo hello >input &&
+       git hook run --to-stdin=input test-hook 2>actual &&
+       test_cmp expect actual
+'
+
 test_done
index 112682a45a1df3d5c19eab03ec79c1202d2cab71..67d18cfa104b867bfdd2004df0bc8c9e305cfdc9 100755 (executable)
@@ -22,8 +22,10 @@ test_expect_success \
 git checkout-index symlink &&
 test -f symlink'
 
-test_expect_success \
-'the file must be the blob we added during the setup' '
-test "$(git hash-object -t blob symlink)" = $l'
+test_expect_success 'the file must be the blob we added during the setup' '
+       echo "$l" >expect &&
+       git hash-object -t blob symlink >actual &&
+       test_cmp expect actual
+'
 
 test_done
index 9425aae6395838b3d0fd57b8cf8fe228d1db335f..fb0e13881cd8a290dd272c6dc16c3f097f49cb39 100755 (executable)
@@ -9,11 +9,12 @@ TEST_PASSES_SANITIZE_LEAK=true
 
 test_expect_success 'setup' '
        mkdir parent &&
-       (cd parent &&
-        git init &&
-        echo content >file &&
-        git add file &&
-        git commit -m base
+       (
+               cd parent &&
+               git init &&
+               echo content >file &&
+               git add file &&
+               git commit -m base
        ) &&
        git fetch parent main:origin
 '
index a5822e41af28112d44f8a2076804a5dd7d197904..747eb5563eca8f1df4374f179a08019221ba1fac 100755 (executable)
@@ -4,12 +4,6 @@ test_description='git checkout --patch'
 
 . ./lib-patch-mode.sh
 
-if ! test_have_prereq ADD_I_USE_BUILTIN && ! test_have_prereq PERL
-then
-       skip_all='skipping interactive add tests, PERL not set'
-       test_done
-fi
-
 test_expect_success 'setup' '
        mkdir dir &&
        echo parent > dir/foo &&
index 713c3fa6038632bff43ef8344be2d4a6a73cb32e..034f62c13c5949cd4b8dbadf14013f7ce980db31 100755 (executable)
@@ -50,10 +50,13 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
 
 test_expect_success SYMLINKS 'the symlink remained' '
 
-       test_when_finished "rm a/b" &&
        test -h a/b
 '
 
+test_expect_success 'cleanup after previous symlink tests' '
+       rm a/b
+'
+
 test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing entries' '
        git checkout -f start &&
        mkdir dir &&
@@ -66,4 +69,15 @@ test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing
        test_path_is_file untracked/f
 '
 
+test_expect_success 'checkout --overwrite-ignore should succeed if only ignored files in the way' '
+       git checkout -b df_conflict &&
+       test_commit contents some_dir &&
+       git checkout start &&
+       mkdir some_dir &&
+       echo autogenerated information >some_dir/ignore &&
+       echo ignore >.git/info/exclude &&
+       git checkout --overwrite-ignore df_conflict &&
+       ! test_path_is_dir some_dir
+'
+
 test_done
index 5a7caf958c346620f6daffcc78ceaa75e03afe8f..e247a4735bbc26b01fecd600ed3e529bea16f464 100755 (executable)
@@ -146,4 +146,33 @@ test_expect_success 'tracking info copied with autoSetupMerge=inherit' '
        test_cmp_config "" --default "" branch.main2.merge
 '
 
+test_expect_success 'switch back when temporarily detached and checked out elsewhere ' '
+       test_when_finished "
+               git worktree remove wt1 ||:
+               git worktree remove wt2 ||:
+               git checkout - ||:
+               git branch -D shared ||:
+       " &&
+       git checkout -b shared &&
+       test_commit shared-first &&
+       HASH1=$(git rev-parse --verify HEAD) &&
+       test_commit shared-second &&
+       test_commit shared-third &&
+       HASH2=$(git rev-parse --verify HEAD) &&
+       git worktree add wt1 -f shared &&
+       git -C wt1 bisect start &&
+       git -C wt1 bisect good $HASH1 &&
+       git -C wt1 bisect bad $HASH2 &&
+       git worktree add wt2 -f shared &&
+       git -C wt2 bisect start &&
+       git -C wt2 bisect good $HASH1 &&
+       git -C wt2 bisect bad $HASH2 &&
+       # we test in both worktrees to ensure that works
+       # as expected with "first" and "next" worktrees
+       test_must_fail git -C wt1 switch shared &&
+       git -C wt1 switch --ignore-other-worktrees shared &&
+       test_must_fail git -C wt2 switch shared &&
+       git -C wt2 switch --ignore-other-worktrees shared
+'
+
 test_done
index 7c43ddf1d99714ac5744b37dfb1badb6e0c785fc..c5d19dd973d7f4ea7a3a496d7df92a5c74fa667d 100755 (executable)
@@ -137,4 +137,20 @@ test_expect_success 'restore --staged invalidates cache tree for deletions' '
        test_must_fail git rev-parse HEAD:new1
 '
 
+test_expect_success 'restore with merge options rejects --staged' '
+       for opts in \
+               "--staged --ours" \
+               "--staged --theirs" \
+               "--staged --merge" \
+               "--staged --conflict=diff3" \
+               "--staged --worktree --ours" \
+               "--staged --worktree --theirs" \
+               "--staged --worktree --merge" \
+               "--staged --worktree --conflict=zdiff3"
+       do
+               test_must_fail git restore $opts . 2>err &&
+               grep "cannot be used with --staged" err || return
+       done
+'
+
 test_done
index 3d28c7f06b2c8717e31fae23d37fda0acc008a48..568a47ec4268778052534d93a168361744215efa 100755 (executable)
@@ -5,6 +5,7 @@ test_description='prune $GIT_DIR/worktrees'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success initialize '
index 79e0fce2d90fb9e947a76052c32e41d20519e6bd..9ad9be0c2089335b67fcb08f00ade4b46ab5637c 100755 (executable)
@@ -5,6 +5,7 @@ test_description='test git worktree list'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index 5c44453e1c13322e1fcf30d2facac3c2942a274e..8970780efccd85f54c1e1bd830f841d34ce90ce8 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='test git worktree repair'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index efb7450bf1e9c14fc5563564b5b4e6913bd7c97c..ef6fb53f7f1cf53f6cf8c3727bc0b957ea7d9484 100755 (executable)
@@ -54,6 +54,22 @@ test_expect_success 'git ls-files --format path v.s. -s' '
        test_cmp expect actual
 '
 
+test_expect_success 'git ls-files --format with relative path' '
+       cat >expect <<-\EOF &&
+       ../o1.txt
+       ../o2.txt
+       ../o3.txt
+       ../o4.txt
+       ../o5.txt
+       ../o6.txt
+       EOF
+       mkdir sub &&
+       cd sub &&
+       git ls-files --format="%(path)" ":/" >../actual &&
+       cd .. &&
+       test_cmp expect actual
+'
+
 test_expect_success 'git ls-files --format with -m' '
        echo change >o1.txt &&
        cat >expect <<-\EOF &&
index 5a169b68d6af4d3db62e88dcdc4fb765ee5232a6..5a8a48287c18bfb3518a90677c02a13bb1ac23f3 100755 (executable)
@@ -245,9 +245,13 @@ test_expect_success 'git branch -M baz bam should succeed within a worktree in w
        (
                cd bazdir &&
                git branch -M baz bam &&
-               test $(git rev-parse --abbrev-ref HEAD) = bam
+               echo bam >expect &&
+               git rev-parse --abbrev-ref HEAD >actual &&
+               test_cmp expect actual
        ) &&
-       test $(git rev-parse --abbrev-ref HEAD) = bam &&
+       echo bam >expect &&
+       git rev-parse --abbrev-ref HEAD >actual &&
+       test_cmp expect actual &&
        rm -r bazdir &&
        git worktree prune
 '
index 84dd0cd26d02cb3a3151f1529544ef1f70e052ae..b5f4d6a653045dafa7c2317036196866f78b9ca5 100755 (executable)
@@ -33,6 +33,26 @@ test_expect_success 'setup' '
        u3 sha256:736c4bc
        u4 sha256:673e77d
 
+       # topic (abbrev=10)
+       t1_abbrev sha1:4de457d2c0
+       t2_abbrev sha1:fccce22f8c
+       t3_abbrev sha1:147e64ef53
+       t4_abbrev sha1:a63e992599
+       t1_abbrev sha256:b89f8b9092
+       t2_abbrev sha256:5f12aadf34
+       t3_abbrev sha256:ea8b273a6c
+       t4_abbrev sha256:14b73361fc
+
+       # unmodified (abbrev=10)
+       u1_abbrev sha1:35b9b25f76
+       u2_abbrev sha1:de345ab3de
+       u3_abbrev sha1:9af6654000
+       u4_abbrev sha1:2901f773f3
+       u1_abbrev sha256:e3731be242
+       u2_abbrev sha256:14fadf8cee
+       u3_abbrev sha256:736c4bcb44
+       u4_abbrev sha256:673e77d589
+
        # reordered
        r1 sha1:aca177a
        r2 sha1:14ad629
@@ -153,6 +173,18 @@ test_expect_success 'simple A B C (unmodified)' '
        test_cmp expect actual
 '
 
+test_expect_success 'simple A..B A..C (unmodified) with --abbrev' '
+       git range-diff --no-color --abbrev=10 main..topic main..unmodified \
+               >actual &&
+       cat >expect <<-EOF &&
+       1:  $(test_oid t1_abbrev) = 1:  $(test_oid u1_abbrev) s/5/A/
+       2:  $(test_oid t2_abbrev) = 2:  $(test_oid u2_abbrev) s/4/A/
+       3:  $(test_oid t3_abbrev) = 3:  $(test_oid u3_abbrev) s/11/B/
+       4:  $(test_oid t4_abbrev) = 4:  $(test_oid u4_abbrev) s/12/B/
+       EOF
+       test_cmp expect actual
+'
+
 test_expect_success 'A^! and A^-<n> (unmodified)' '
        git range-diff --no-color topic^! unmodified^-1 >actual &&
        cat >expect <<-EOF &&
index 577f32dc71ff2ccf0f34c01b060fd82b87c566f9..07a0ff93defebe395fe49344834b2fc627c7f81d 100755 (executable)
@@ -12,6 +12,7 @@ semantic is still the same.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'enable reflogs' '
index d5a8ee39fc478d3d3ab2ab71ec780efd76140d20..3ce918fdb8062fc5f720bb890ad58a2676547218 100755 (executable)
@@ -388,6 +388,20 @@ test_expect_success 'switch to branch checked out here' '
        git rebase main main
 '
 
+test_expect_success 'switch to branch checked out elsewhere fails' '
+       test_when_finished "
+               git worktree remove wt1 &&
+               git worktree remove wt2 &&
+               git branch -d shared
+       " &&
+       git worktree add wt1 -b shared &&
+       git worktree add wt2 -f shared &&
+       # we test in both worktrees to ensure that works
+       # as expected with "first" and "next" worktrees
+       test_must_fail git -C wt1 rebase shared shared &&
+       test_must_fail git -C wt2 rebase shared shared
+'
+
 test_expect_success 'switch to branch not checked out' '
        git checkout main &&
        git branch other &&
index 462cefd25df3efd51b06023523530b3d97d3d3a9..ff0afad63e2c5b1c03495046961eb27e2a593ed0 100755 (executable)
@@ -1449,14 +1449,15 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = ig
 
 test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = warn' '
        cat >expect <<-EOF &&
-       error: invalid line 1: badcmd $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
+       error: invalid command '\''pickled'\''
+       error: invalid line 1: pickled $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
        Warning: some commits may have been dropped accidentally.
        Dropped commits (newer to older):
         - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
         - $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
        To avoid this message, use "drop" to explicitly remove a commit.
        EOF
-       head -n4 expect >expect.2 &&
+       head -n5 expect >expect.2 &&
        tail -n1 expect >>expect.2 &&
        tail -n4 expect.2 >expect.3 &&
        test_config rebase.missingCommitsCheck warn &&
@@ -1467,7 +1468,7 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = wa
                        git rebase -i --root &&
                cp .git/rebase-merge/git-rebase-todo.backup orig &&
                FAKE_LINES="2 3 4" git rebase --edit-todo 2>actual.2 &&
-               head -n6 actual.2 >actual &&
+               head -n7 actual.2 >actual &&
                test_cmp expect actual &&
                cp orig .git/rebase-merge/git-rebase-todo &&
                FAKE_LINES="1 2 3 4" git rebase --edit-todo 2>actual.2 &&
@@ -1483,7 +1484,8 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = wa
 
 test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = error' '
        cat >expect <<-EOF &&
-       error: invalid line 1: badcmd $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
+       error: invalid command '\''pickled'\''
+       error: invalid line 1: pickled $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
        Warning: some commits may have been dropped accidentally.
        Dropped commits (newer to older):
         - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
@@ -1583,7 +1585,7 @@ test_expect_success 'static check of bad command' '
                set_fake_editor &&
                test_must_fail env FAKE_LINES="1 2 3 bad 4 5" \
                git rebase -i --root 2>actual &&
-               test_i18ngrep "badcmd $(git rev-list --oneline -1 primary~1)" \
+               test_i18ngrep "pickled $(git rev-list --oneline -1 primary~1)" \
                                actual &&
                test_i18ngrep "You can fix this with .git rebase --edit-todo.." \
                                actual &&
@@ -2072,6 +2074,7 @@ test_expect_success '--update-refs: --edit-todo with no update-ref lines' '
 '
 
 test_expect_success '--update-refs: check failed ref update' '
+       test_when_finished "test_might_fail git rebase --abort" &&
        git checkout -B update-refs-error no-conflict-branch &&
        git branch -f base HEAD~4 &&
        git branch -f first HEAD~3 &&
@@ -2123,6 +2126,28 @@ test_expect_success '--update-refs: check failed ref update' '
        test_cmp expect err.trimmed
 '
 
+test_expect_success 'bad labels and refs rejected when parsing todo list' '
+       test_when_finished "test_might_fail git rebase --abort" &&
+       cat >todo <<-\EOF &&
+       exec >execed
+       label #
+       label :invalid
+       update-ref :bad
+       update-ref topic
+       EOF
+       rm -f execed &&
+       (
+               set_replace_editor todo &&
+               test_must_fail git rebase -i HEAD 2>err
+       ) &&
+       grep "'\''#'\'' is not a valid label" err &&
+       grep "'\'':invalid'\'' is not a valid label" err &&
+       grep "'\'':bad'\'' is not a valid refname" err &&
+       grep "update-ref requires a fully qualified refname e.g. refs/heads/topic" \
+               err &&
+       test_path_is_missing execed
+'
+
 # This must be the last test in this file
 test_expect_success '$EDITOR and friends are unchanged' '
        test_editor_unchanged
index 2524331861869d6b9ee9f80082c09d2ed089e8fe..8979bc340734f860f56c49a4380366dca1d46ee8 100755 (executable)
@@ -5,6 +5,7 @@ test_description='rebase should handle arbitrary git message'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
index 58371d8a5477f47d53384a84ad0dae14457128d9..e75b3d0e07cb13b5d8b4fd3b83b07c35eeddce49 100755 (executable)
@@ -7,6 +7,7 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 log_with_names () {
index ea501f2b42b8cc43394192d11051992605bfb619..f8c4ed78c9ef7ffd0fa970525bf3cab47842b55a 100755 (executable)
@@ -5,6 +5,7 @@ test_description='git rebase --onto A...B'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-rebase.sh"
 
index 7181f176b8136504b4a9bc5e962cf358b00ffbba..6c61f240cf9874bbdb0190739b66a1c0ed99289f 100755 (executable)
@@ -5,6 +5,7 @@ test_description='git rebase - test patch id computation'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 scramble () {
index 4859bb8f722314df2fdb67aa51a4419009ce22ec..2fab703d615485020f0692bdc2d39748ba0f72d4 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='git rebase interactive with rewording'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
index 63acc1ea4dab43e5fc1f9eb26b031f49e3d9a432..a16428bdf54ab9157dfefb7cc9797e4c5dd86e1e 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='rebase topology tests with merges'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
index 70e81363569c32659b79a97b064b0d5711109bc6..4bfc779bb875fe9989bf67833eb5c5477095d72c 100755 (executable)
@@ -8,6 +8,7 @@ test_description='git rebase --fork-point test'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # A---B---D---E    (main)
index 5086e14c02207184bd7c048ee2bc2419ad4d1b34..7f1a5dd3deb10bef921654ef767a7cd53347bfd8 100755 (executable)
@@ -8,6 +8,7 @@ test_description='ensure rebase fast-forwards commits when possible'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 94671d3c4650463525006090702210eda76594e0..c3184c9ade95861d9e30164dee9c6ba81f3616f3 100755 (executable)
@@ -40,6 +40,24 @@ test_expect_success 'setup' '
        EOF
 '
 
+test_expect_success 'bad -X <strategy-option> arguments: unclosed quote' '
+       cat >expect <<-\EOF &&
+       fatal: could not split '\''--bad'\'': unclosed quote
+       EOF
+       test_expect_code 128 git rebase -X"bad argument\"" side main >out 2>actual &&
+       test_must_be_empty out &&
+       test_cmp expect actual
+'
+
+test_expect_success 'bad -X <strategy-option> arguments: bad escape' '
+       cat >expect <<-\EOF &&
+       fatal: could not split '\''--bad'\'': cmdline ends with \
+       EOF
+       test_expect_code 128 git rebase -X"bad escape \\" side main >out 2>actual &&
+       test_must_be_empty out &&
+       test_cmp expect actual
+'
+
 test_expect_success '--ignore-whitespace works with apply backend' '
        test_must_fail git rebase --apply main side &&
        git rebase --abort &&
index c023fefd681ba62b8296925b2051cffe365e63ac..dd3b301fa7ab2bbd48297bc26d1b21b8b00fa82b 100755 (executable)
@@ -14,6 +14,7 @@ to the "fixup" command that works with "fixup!", "fixup -C" works with
 "amend!" upon --autosquash.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
@@ -50,6 +51,7 @@ test_expect_success 'setup' '
        body
        EOF
 
+       test_commit initial &&
        test_commit A A &&
        test_commit B B &&
        get_author HEAD >expected-author &&
@@ -208,4 +210,29 @@ test_expect_success 'fixup -C works upon --autosquash with amend!' '
                actual-squash-message
 '
 
+test_expect_success 'fixup -[Cc]<commit> works' '
+       test_when_finished "test_might_fail git rebase --abort" &&
+       cat >todo <<-\EOF &&
+       pick A
+       fixup -CA1
+       pick B
+       fixup -cA2
+       EOF
+       (
+               set_replace_editor todo &&
+               FAKE_COMMIT_MESSAGE="edited and fixed up" \
+                       git rebase -i initial initial
+       ) &&
+       git log --pretty=format:%B initial.. >actual &&
+       cat >expect <<-EOF &&
+       edited and fixed up
+       $EMPTY
+       new subject
+       $EMPTY
+       new
+       body
+       EOF
+       test_cmp expect actual
+'
+
 test_done
index b92a3ce46b8cc044e44adfa9cc807c2d2ddb4af2..c614c4f2e4ba285ba7ffc6b7b4384b69f0b9a851 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='rebase behavior when on-disk files are broken'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up conflicting branches' '
index 1f4cfc37449186c52a36cbe19f2631df759643e3..2f3e3e2416921c28b27b75dc9f76c20b40401d4d 100755 (executable)
@@ -13,6 +13,7 @@ test_description='test cherry-pick and revert with renames
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 5495eacfec11a904ba24d69439cb1b98b5a353ec..1b2c0d6aca64e05a85ffd6568be17bb5897a297e 100755 (executable)
@@ -11,6 +11,7 @@ test_description='cherry picking and reverting a merge
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 95fe4feaeee98f6432b39ee3a4817f05da5d649b..76d393dc8a307ebef13dfab5e4eb3d88a7a7cd69 100755 (executable)
@@ -5,6 +5,7 @@ test_description='test cherry-picking (and reverting) a root commit'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 7e11bd4a4c5c41c9e326244f598bdc9bb4e4e3ba..b71bad17b853c566caac5828c19453da9c862647 100755 (executable)
@@ -5,6 +5,7 @@ test_description='test cherry-picking with --ff option'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 84a587daf3af0356244c58c6472e202875679200..dd5d92ef302124aeb9d6fe02642489875a9e1b22 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='Test cherry-pick -x and -s'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 pristine_detach () {
index 51afbd7b24a10c247520ba2f9be702da57f83afd..82dd768944fa5d566f32d7076ad2e36bd0f53cf7 100755 (executable)
@@ -106,24 +106,32 @@ test_expect_success '.gitignore test setup' '
 
 test_expect_success '.gitignore is honored' '
        git add . &&
-       ! (git ls-files | grep "\\.ig")
+       git ls-files >files &&
+       sed -n "/\\.ig/p" <files >actual &&
+       test_must_be_empty actual
 '
 
 test_expect_success 'error out when attempting to add ignored ones without -f' '
        test_must_fail git add a.?? &&
-       ! (git ls-files | grep "\\.ig")
+       git ls-files >files &&
+       sed -n "/\\.ig/p" <files >actual &&
+       test_must_be_empty actual
 '
 
 test_expect_success 'error out when attempting to add ignored ones without -f' '
        test_must_fail git add d.?? &&
-       ! (git ls-files | grep "\\.ig")
+       git ls-files >files &&
+       sed -n "/\\.ig/p" <files >actual &&
+       test_must_be_empty actual
 '
 
 test_expect_success 'error out when attempting to add ignored ones but add others' '
        touch a.if &&
        test_must_fail git add a.?? &&
-       ! (git ls-files | grep "\\.ig") &&
-       (git ls-files | grep a.if)
+       git ls-files >files &&
+       sed -n "/\\.ig/p" <files >actual &&
+       test_must_be_empty actual &&
+       grep a.if files
 '
 
 test_expect_success 'add ignored ones with -f' '
index 5841f280fb2d4c3185e0a42b9d9a894d72cc4e79..b8aaece860d8854e6215cbc1f80e59f4c1d413c6 100755 (executable)
@@ -7,7 +7,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
-if test_have_prereq !ADD_I_USE_BUILTIN,!PERL
+if test_have_prereq !PERL
 then
        skip_all='skipping add -i (scripted) tests, perl not available'
        test_done
@@ -46,6 +46,21 @@ force_color () {
        )
 }
 
+test_expect_success 'warn about add.interactive.useBuiltin' '
+       cat >expect <<-\EOF &&
+       warning: the add.interactive.useBuiltin setting has been removed!
+       See its entry in '\''git help config'\'' for details.
+       No changes.
+       EOF
+
+       for v in = =true =false
+       do
+               git -c "add.interactive.useBuiltin$v" add -p >out 2>actual &&
+               test_must_be_empty out &&
+               test_cmp expect actual || return 1
+       done
+'
+
 test_expect_success 'setup (initial)' '
        echo content >file &&
        git add file &&
@@ -296,9 +311,11 @@ test_expect_success FILEMODE 'stage mode and hunk' '
        echo content >>file &&
        chmod +x file &&
        printf "y\\ny\\n" | git add -p &&
-       git diff --cached file | grep "new mode" &&
-       git diff --cached file | grep "+content" &&
-       test -z "$(git diff file)"
+       git diff --cached file >out &&
+       grep "new mode" out &&
+       grep "+content" out &&
+       git diff file >out &&
+       test_must_be_empty out
 '
 
 # end of tests disabled when filemode is not usable
@@ -547,15 +564,7 @@ test_expect_success 'split hunk "add -p (edit)"' '
        ! grep "^+15" actual
 '
 
-test_expect_success 'setup ADD_I_USE_BUILTIN check' '
-       result=success &&
-       if ! test_have_prereq ADD_I_USE_BUILTIN
-       then
-               result=failure
-       fi
-'
-
-test_expect_$result 'split hunk "add -p (no, yes, edit)"' '
+test_expect_success 'split hunk "add -p (no, yes, edit)"' '
        test_write_lines 5 10 20 21 30 31 40 50 60 >test &&
        git reset &&
        # test sequence is s(plit), n(o), y(es), e(dit)
@@ -579,7 +588,7 @@ test_expect_success 'split hunk with incomplete line at end' '
        test_must_fail git grep --cached before
 '
 
-test_expect_$result 'edit, adding lines to the first hunk' '
+test_expect_success 'edit, adding lines to the first hunk' '
        test_write_lines 10 11 20 30 40 50 51 60 >test &&
        git reset &&
        tr _ " " >patch <<-EOF &&
@@ -1068,4 +1077,25 @@ test_expect_success 'show help from add--helper' '
        test_cmp expect actual
 '
 
+test_expect_success 'reset -p with unmerged files' '
+       test_when_finished "git checkout --force main" &&
+       test_commit one conflict &&
+       git checkout -B side HEAD^ &&
+       test_commit two conflict &&
+       test_must_fail git merge one &&
+
+       # this is a noop with only an unmerged entry
+       git reset -p &&
+
+       # add files that sort before and after unmerged entry
+       echo a >a &&
+       echo z >z &&
+       git add a z &&
+
+       # confirm that we can reset those files
+       printf "%s\n" y y | git reset -p &&
+       git diff-index --cached --diff-filter=u HEAD >staged &&
+       test_must_be_empty staged
+'
+
 test_done
index e3cf0ffbe59c449b218cafedd74bd3cf07e82ff1..d3e428ff46eb5c99d98a8fe27b54cf98d6d2a936 100755 (executable)
@@ -4,6 +4,7 @@
 
 test_description='git mktag: tag object verify test'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 ###########################################################
index dfcf3a0aaae3e2a72f6f41023b01c639a99c2f44..5de1d190759f958f8c3c0319f7b4cca34f39d83c 100755 (executable)
@@ -616,4 +616,46 @@ test_expect_success 'diff -I<regex>: detect malformed regex' '
        test_i18ngrep "invalid regex given to -I: " error
 '
 
+# check_prefix <patch> <src> <dst>
+# check only lines with paths to avoid dependency on exact oid/contents
+check_prefix () {
+       grep -E '^(diff|---|\+\+\+) ' "$1" >actual.paths &&
+       cat >expect <<-EOF &&
+       diff --git $2 $3
+       --- $2
+       +++ $3
+       EOF
+       test_cmp expect actual.paths
+}
+
+test_expect_success 'diff-files does not respect diff.noprefix' '
+       git -c diff.noprefix diff-files -p >actual &&
+       check_prefix actual a/file0 b/file0
+'
+
+test_expect_success 'diff-files respects --no-prefix' '
+       git diff-files -p --no-prefix >actual &&
+       check_prefix actual file0 file0
+'
+
+test_expect_success 'diff respects diff.noprefix' '
+       git -c diff.noprefix diff >actual &&
+       check_prefix actual file0 file0
+'
+
+test_expect_success 'diff --default-prefix overrides diff.noprefix' '
+       git -c diff.noprefix diff --default-prefix >actual &&
+       check_prefix actual a/file0 b/file0
+'
+
+test_expect_success 'diff respects diff.mnemonicprefix' '
+       git -c diff.mnemonicprefix diff >actual &&
+       check_prefix actual i/file0 w/file0
+'
+
+test_expect_success 'diff --default-prefix overrides diff.mnemonicprefix' '
+       git -c diff.mnemonicprefix diff --default-prefix >actual &&
+       check_prefix actual a/file0 b/file0
+'
+
 test_done
index 012f155e10ae9f9e1fcbd3472cd9a789bae919ec..8c3d06622ae29457bfc32c8ecee17e1cd2c2143c 100755 (executable)
@@ -59,6 +59,10 @@ test_expect_success setup '
        test_tick &&
        git commit -m "patchid 3" &&
 
+       git checkout -b empty main &&
+       test_tick &&
+       git commit --allow-empty -m "empty commit" &&
+
        git checkout main
 '
 
@@ -128,6 +132,12 @@ test_expect_success 'replay did not screw up the log message' '
        grep "^Side .* with .* backslash-n" actual
 '
 
+test_expect_success 'format-patch empty commit' '
+       git format-patch --stdout main..empty >empty &&
+       grep "^From " empty >from &&
+       test_line_count = 1 from
+'
+
 test_expect_success 'extra headers' '
        git config format.headers "To: R E Cipient <rcipient@example.com>
 " &&
@@ -2281,6 +2291,24 @@ test_expect_success 'format-patch --attach cover-letter only is non-multipart' '
        test_line_count = 1 output
 '
 
+test_expect_success 'format-patch with format.attach' '
+       test_when_finished "rm -fr patches" &&
+       separator=attachment-separator &&
+       test_config format.attach "$separator" &&
+       filename=$(git format-patch -o patches -1) &&
+       grep "^Content-Type: multipart/.*$separator" "$filename"
+'
+
+test_expect_success 'format-patch with format.attach=disabled' '
+       test_when_finished "rm -fr patches" &&
+       separator=attachment-separator &&
+       test_config_global format.attach "$separator" &&
+       test_config format.attach "" &&
+       filename=$(git format-patch -o patches -1) &&
+       # The output should not even declare content type for text/plain.
+       ! grep "^Content-Type: multipart/" "$filename"
+'
+
 test_expect_success '-c format.mboxrd format-patch' '
        sp=" " &&
        cat >msg <<-INPUT_END &&
@@ -2368,4 +2396,20 @@ test_expect_success 'interdiff: solo-patch' '
        test_cmp expect actual
 '
 
+test_expect_success 'format-patch does not respect diff.noprefix' '
+       git -c diff.noprefix format-patch -1 --stdout >actual &&
+       grep "^--- a/blorp" actual
+'
+
+test_expect_success 'format-patch respects format.noprefix' '
+       git -c format.noprefix format-patch -1 --stdout >actual &&
+       grep "^--- blorp" actual
+'
+
+test_expect_success 'format-patch --default-prefix overrides format.noprefix' '
+       git -c format.noprefix \
+               format-patch -1 --default-prefix --stdout >actual &&
+       grep "^--- a/blorp" actual
+'
+
 test_done
diff --git a/t/t4018/java-class-brace-on-separate-line b/t/t4018/java-class-brace-on-separate-line
new file mode 100644 (file)
index 0000000..8795acd
--- /dev/null
@@ -0,0 +1,6 @@
+class RIGHT
+{
+    static int ONE;
+    static int TWO;
+    static int ChangeMe;
+}
diff --git a/t/t4018/java-class-space-before-type-parameters b/t/t4018/java-class-space-before-type-parameters
new file mode 100644 (file)
index 0000000..0bdef1d
--- /dev/null
@@ -0,0 +1,6 @@
+class RIGHT <TYPE, PARAMS, AFTER, SPACE> {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private A ChangeMe;
+}
diff --git a/t/t4018/java-class-type-parameters b/t/t4018/java-class-type-parameters
new file mode 100644 (file)
index 0000000..579aa7a
--- /dev/null
@@ -0,0 +1,6 @@
+class RIGHT<A, B> {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private A ChangeMe;
+}
diff --git a/t/t4018/java-class-type-parameters-implements b/t/t4018/java-class-type-parameters-implements
new file mode 100644 (file)
index 0000000..b8038b1
--- /dev/null
@@ -0,0 +1,6 @@
+class RIGHT<A, B> implements List<A> {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private A ChangeMe;
+}
diff --git a/t/t4018/java-interface-type-parameters b/t/t4018/java-interface-type-parameters
new file mode 100644 (file)
index 0000000..a4baa1a
--- /dev/null
@@ -0,0 +1,6 @@
+interface RIGHT<A, B> {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    public B foo(A ChangeMe);
+}
diff --git a/t/t4018/java-interface-type-parameters-extends b/t/t4018/java-interface-type-parameters-extends
new file mode 100644 (file)
index 0000000..31d7fb3
--- /dev/null
@@ -0,0 +1,6 @@
+interface RIGHT<A, B> extends Function<A, B> {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    public B foo(A ChangeMe);
+}
diff --git a/t/t4018/java-non-sealed b/t/t4018/java-non-sealed
new file mode 100644 (file)
index 0000000..069087c
--- /dev/null
@@ -0,0 +1,8 @@
+public abstract sealed class SealedClass {
+    public static non-sealed class RIGHT extends SealedClass {
+        static int ONE;
+        static int TWO;
+        static int THREE;
+        private int ChangeMe;
+    }
+}
diff --git a/t/t4018/java-record b/t/t4018/java-record
new file mode 100644 (file)
index 0000000..97aa819
--- /dev/null
@@ -0,0 +1,6 @@
+public record RIGHT(int comp1, double comp2, String comp3) {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    static int ChangeMe;
+}
diff --git a/t/t4018/java-record-space-before-components b/t/t4018/java-record-space-before-components
new file mode 100644 (file)
index 0000000..9827f22
--- /dev/null
@@ -0,0 +1,6 @@
+public record RIGHT (String components, String after, String space) {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    static int ChangeMe;
+}
diff --git a/t/t4018/java-record-type-parameters b/t/t4018/java-record-type-parameters
new file mode 100644 (file)
index 0000000..f62a035
--- /dev/null
@@ -0,0 +1,6 @@
+public record RIGHT<A, N extends Number>(A comp1, N comp2, int comp3) {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    static int ChangeMe;
+}
diff --git a/t/t4018/java-sealed b/t/t4018/java-sealed
new file mode 100644 (file)
index 0000000..785fbc6
--- /dev/null
@@ -0,0 +1,7 @@
+public abstract sealed class Sealed { // RIGHT
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    public final class ChangeMe extends Sealed {
+    }
+}
diff --git a/t/t4018/java-sealed-permits b/t/t4018/java-sealed-permits
new file mode 100644 (file)
index 0000000..18dd489
--- /dev/null
@@ -0,0 +1,6 @@
+public abstract sealed class RIGHT permits PermittedA, PermittedB {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private int ChangeMe;
+}
diff --git a/t/t4018/java-sealed-type-parameters b/t/t4018/java-sealed-type-parameters
new file mode 100644 (file)
index 0000000..e6530c4
--- /dev/null
@@ -0,0 +1,6 @@
+public abstract sealed class RIGHT<A, B> {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private int ChangeMe;
+}
diff --git a/t/t4018/java-sealed-type-parameters-implements-permits b/t/t4018/java-sealed-type-parameters-implements-permits
new file mode 100644 (file)
index 0000000..bd6e6d3
--- /dev/null
@@ -0,0 +1,6 @@
+public abstract sealed class RIGHT<A, B> implements List<A> permits PermittedA, PermittedB {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private int ChangeMe;
+}
diff --git a/t/t4018/java-sealed-type-parameters-permits b/t/t4018/java-sealed-type-parameters-permits
new file mode 100644 (file)
index 0000000..25a0da6
--- /dev/null
@@ -0,0 +1,6 @@
+public abstract sealed class RIGHT<A, B> permits PermittedA, PermittedB {
+    static int ONE;
+    static int TWO;
+    static int THREE;
+    private int ChangeMe;
+}
index d0f3edef54acf6247a034041eb234c73f67d5762..65ac7df2d745c4f7a698baf23cc71c2a80221c3e 100755 (executable)
@@ -45,4 +45,85 @@ test_expect_success 'apply --index symlink patch' '
 
 '
 
+test_expect_success 'symlink setup' '
+       ln -s .git symlink &&
+       git add symlink &&
+       git commit -m "add symlink"
+'
+
+test_expect_success SYMLINKS 'symlink escape when creating new files' '
+       test_when_finished "git reset --hard && git clean -dfx" &&
+
+       cat >patch <<-EOF &&
+       diff --git a/symlink b/renamed-symlink
+       similarity index 100%
+       rename from symlink
+       rename to renamed-symlink
+       --
+       diff --git /dev/null b/renamed-symlink/create-me
+       new file mode 100644
+       index 0000000..039727e
+       --- /dev/null
+       +++ b/renamed-symlink/create-me
+       @@ -0,0 +1,1 @@
+       +busted
+       EOF
+
+       test_must_fail git apply patch 2>stderr &&
+       cat >expected_stderr <<-EOF &&
+       error: affected file ${SQ}renamed-symlink/create-me${SQ} is beyond a symbolic link
+       EOF
+       test_cmp expected_stderr stderr &&
+       ! test_path_exists .git/create-me
+'
+
+test_expect_success SYMLINKS 'symlink escape when modifying file' '
+       test_when_finished "git reset --hard && git clean -dfx" &&
+       touch .git/modify-me &&
+
+       cat >patch <<-EOF &&
+       diff --git a/symlink b/renamed-symlink
+       similarity index 100%
+       rename from symlink
+       rename to renamed-symlink
+       --
+       diff --git a/renamed-symlink/modify-me b/renamed-symlink/modify-me
+       index 1111111..2222222 100644
+       --- a/renamed-symlink/modify-me
+       +++ b/renamed-symlink/modify-me
+       @@ -0,0 +1,1 @@
+       +busted
+       EOF
+
+       test_must_fail git apply patch 2>stderr &&
+       cat >expected_stderr <<-EOF &&
+       error: renamed-symlink/modify-me: No such file or directory
+       EOF
+       test_cmp expected_stderr stderr &&
+       test_must_be_empty .git/modify-me
+'
+
+test_expect_success SYMLINKS 'symlink escape when deleting file' '
+       test_when_finished "git reset --hard && git clean -dfx && rm .git/delete-me" &&
+       touch .git/delete-me &&
+
+       cat >patch <<-EOF &&
+       diff --git a/symlink b/renamed-symlink
+       similarity index 100%
+       rename from symlink
+       rename to renamed-symlink
+       --
+       diff --git a/renamed-symlink/delete-me b/renamed-symlink/delete-me
+       deleted file mode 100644
+       index 1111111..0000000 100644
+       EOF
+
+       test_must_fail git apply patch 2>stderr &&
+       cat >expected_stderr <<-EOF &&
+       error: renamed-symlink/delete-me: No such file or directory
+       EOF
+       test_cmp expected_stderr stderr &&
+       test_path_is_file .git/delete-me
+'
+
 test_done
index 4c68245acad30534d7e3e1f6e980e683d8b5aafd..9f2edba1f833a7127589f9c4883b91bf99bc00b1 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test subject preservation with format-patch | am'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 make_patches() {
index 54be7da1611212143d843d175bf48f73bb83b417..45f1d4f95e5d5af7cff901639b5ecaf541846968 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='git am with corrupt input'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 make_mbox_with_nul () {
index 2369c4e17ad8d4ee6645ddc6f87b87896603dec8..1015273bc827aeeef1e75edbf6c819e04719bde6 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='test format=flowed support of git am'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index aed8f4de3d670143753bfbce1dd40c5664abd8c6..f26d7fd2dbd35ce40534a5d76f9903361f4b7904 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='am --interactive tests'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up patches to apply' '
index d473048138466322e505f4b3b249e89f19101b0b..918a2fc7c69432c26e3135460d62f9b27f0e3dbd 100755 (executable)
@@ -105,6 +105,18 @@ check_added() {
        '
 }
 
+check_mtime() {
+       dir=$1
+       path_in_archive=$2
+       mtime=$3
+
+       test_expect_success " validate mtime of $path_in_archive" '
+               test-tool chmtime --get $dir/$path_in_archive >actual.mtime &&
+               echo $mtime >expect.mtime &&
+               test_cmp expect.mtime actual.mtime
+       '
+}
+
 test_expect_success 'setup' '
        test_oid_cache <<-EOF
        obj sha1:19f9c8273ec45a8938e6999cb59b3ff66739902a
@@ -174,6 +186,13 @@ test_expect_success 'git archive' '
 
 check_tar b
 
+test_expect_success 'git archive --mtime' '
+       git archive --mtime=2002-02-02T02:02:02-0200 HEAD >with_mtime.tar
+'
+
+check_tar with_mtime
+check_mtime with_mtime a/a 1012622522
+
 test_expect_success 'git archive --prefix=prefix/' '
        git archive --prefix=prefix/ HEAD >with_prefix.tar
 '
@@ -402,11 +421,11 @@ test_expect_success GZIP 'extract tgz file (external gzip)' '
 
 test_expect_success 'archive and :(glob)' '
        git archive -v HEAD -- ":(glob)**/sh" >/dev/null 2>actual &&
-       cat >expect <<EOF &&
-a/
-a/bin/
-a/bin/sh
-EOF
+       cat >expect <<-\EOF &&
+       a/
+       a/bin/
+       a/bin/sh
+       EOF
        test_cmp expect actual
 '
 
index 2f6eef5e3720452df49c4810bd9f4f63dc1167fb..04d300eeda760033c0e72beb2aee1235c664c457 100755 (executable)
@@ -3,6 +3,7 @@
 test_description='git archive attribute tests'
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 SUBSTFORMAT='%H (%h)%n'
index ae508e21623fb4af7b55c1c8afe27556b24bb232..9f2c6da80e8cd97c12eb5452e940a9022b2e3a84 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test corner cases of git-archive'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # the 10knuls.tar file is used to test for an empty git generated tar
index 59e9e77223b3e25d07d2dd7052e7674221c8a78d..f89809be53cf335295e91b91af42de0c1ccf2b5b 100755 (executable)
@@ -4,6 +4,8 @@
 #
 
 test_description='pack index with 64-bit offsets and object CRC'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index 51973f4a512bf914ee0fb50d5472d050f241a2ed..846c5ca7d341ccb1705e4bded2c910c430337f3f 100755 (executable)
@@ -6,6 +6,8 @@
 test_description='git-pack-object with missing base
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Create A-B chain
index 9d8e249ae8b7f38c4c941bd76ef904cdfe1b3d27..230cb3871223e1f28482c841093cb7a0e6873754 100755 (executable)
@@ -14,6 +14,7 @@ what currently happens. If that changes, these tests should be revisited.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'disable reflogs' '
index 5b707d911b5818f29ed75650256b096bd680168a..b26d476c646fdb63a9569d98bc9d2792dd6f3426 100755 (executable)
@@ -5,6 +5,7 @@ test_description='git pack-objects using object filtering'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Test blob:none filter.
index b5f9b1092229d3d8c1879d41c5c3f02f4ad04923..499d5d4c78590ae16879d8dbd386259d847efb76 100755 (executable)
@@ -1015,4 +1015,20 @@ test_expect_success 'complains when run outside of a repository' '
        grep "not a git repository" err
 '
 
+test_expect_success 'repack with delta islands' '
+       git init repo &&
+       test_when_finished "rm -fr repo" &&
+       (
+               cd repo &&
+
+               test_commit first &&
+               git repack &&
+               test_commit second &&
+               git repack &&
+
+               git multi-pack-index write &&
+               git -c repack.useDeltaIslands=true multi-pack-index repack
+       )
+'
+
 test_done
index 2cc7fd7a4765b2ba8057591df7588150d453a44a..5eb28f0512d447dcea6a16fe27b0a3272514de42 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='test for no lazy fetch with the commit-graph'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup: prepare a repository with a commit' '
index 978f240cdaceb4e7593adcf89136e9de9b558aa1..cfaae547398e0e54cfc5b8f6403d2502ac826782 100755 (executable)
@@ -7,6 +7,7 @@ test_description='Test the post-checkout hook.'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 11f03239a0628c4a50ef13758647f6c85e35e552..1686ac13aa628584297fcfd961356ae5291c57e7 100755 (executable)
@@ -5,6 +5,7 @@ test_description='forced push to replace commit we do not have'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index dcbeb42082791ba0bb2683e9f78b545250d380fc..d6a994663383c32da26d1654527f938873589e2b 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='remote push rejects are reported by client'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index b160f8b7fb7e1f9973361cf3ed86d769d5610206..7b3ff21b984ff4fcfbd4a64a3eecceabf694e27b 100755 (executable)
@@ -5,6 +5,7 @@ test_description='test quickfetch from local'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 88d3c56750accc7376614f0fda48d85ddf298cc6..0b8ab4afdbe9a0bd0aa304770b6db8f6d303ec9b 100755 (executable)
@@ -4,6 +4,7 @@ test_description='fetch/receive strict mode'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup and inject "corrupt or missing" object' '
index e6149295b187429575aa6fe56e2e206900d30341..c6a6957c5001e9480cbd26ccba5fd26c54126ece 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='check environment showed to remote side of transports'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up "remote" push situation' '
index c0b745e33b8a52b6c2defda1fa04ef1b8c202841..dc44da9c7978ab37e503614cb7524e8c6ba81632 100755 (executable)
@@ -806,6 +806,14 @@ test_expect_success 'fetch.writeCommitGraph with submodules' '
        )
 '
 
+# fetches from first configured url
+test_expect_success 'fetch from multiple configured URLs in single remote' '
+       git init url1 &&
+       git remote add multipleurls url1 &&
+       git remote set-url --add multipleurls url2 &&
+       git fetch multipleurls
+'
+
 # configured prune tests
 
 set_config_tristate () {
@@ -1163,6 +1171,15 @@ test_expect_success '--no-show-forced-updates' '
        )
 '
 
+for section in fetch transfer
+do
+       test_expect_success "$section.hideRefs affects connectivity check" '
+               GIT_TRACE="$PWD"/trace git -c $section.hideRefs=refs -c \
+                       $section.hideRefs="!refs/tags/" fetch &&
+               grep "git rev-list .*--exclude-hidden=fetch" trace
+       '
+done
+
 setup_negotiation_tip () {
        SERVER="$1"
        URL="$2"
index 511ba3bd454808943c73298c7c8f44a0b5bb9c7a..98f034aa77bb243492ea1232549f7d1ec195a152 100755 (executable)
@@ -58,6 +58,13 @@ test_expect_success 'git fetch --all' '
         test_cmp expect output)
 '
 
+test_expect_success 'git fetch --all --no-write-fetch-head' '
+       (cd test &&
+       rm -f .git/FETCH_HEAD &&
+       git fetch --all --no-write-fetch-head &&
+       test_path_is_missing .git/FETCH_HEAD)
+'
+
 test_expect_success 'git fetch --all should continue if a remote has errors' '
        (git clone one test2 &&
         cd test2 &&
@@ -197,4 +204,9 @@ test_expect_success 'parallel' '
        test_i18ngrep "could not fetch .two.*128" err
 '
 
+test_expect_success 'git fetch --multiple --jobs=0 picks a default' '
+       (cd test &&
+        git fetch --multiple --jobs=0)
+'
+
 test_done
index 98a27a2948b5f6c1b1c318b43c5fab3505f1426e..19ebefa5aceb1afd3916f903971013e985836329 100755 (executable)
@@ -401,6 +401,11 @@ test_expect_success 'push with ambiguity' '
 
 '
 
+test_expect_success 'push with onelevel ref' '
+       mk_test testrepo heads/main &&
+       test_must_fail git push testrepo HEAD:refs/onelevel
+'
+
 test_expect_success 'push with colon-less refspec (1)' '
 
        mk_test testrepo heads/frotz tags/frotz &&
@@ -898,6 +903,13 @@ test_expect_success 'push --delete refuses empty string' '
        test_must_fail git push testrepo --delete ""
 '
 
+test_expect_success 'push --delete onelevel refspecs' '
+       mk_test testrepo heads/main &&
+       git -C testrepo update-ref refs/onelevel refs/heads/main &&
+       git push testrepo --delete refs/onelevel &&
+       test_must_fail git -C testrepo rev-parse --verify refs/onelevel
+'
+
 test_expect_success 'warn on push to HEAD of non-bare repository' '
        mk_test testrepo heads/main &&
        (
index bcff460d0a2ba2b6b9965e7bff58bc26033231ab..cc5496e28fd0bcbf32badb583272c464ec88fae8 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='pulling from symlinked subdir'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # The scenario we are building:
@@ -78,7 +79,9 @@ test_expect_success SYMLINKS 'pushing from symlinked subdir' '
                git commit -m push ./file &&
                git push
        ) &&
-       test push = $(git show HEAD:subdir/file)
+       echo push >expect &&
+       git show HEAD:subdir/file >actual &&
+       test_cmp expect actual
 '
 
 test_done
index fdb429205643b8ccb03529795f5b6f6aef63d93a..c9acc076353a6ae784ced36a4927cda352950521 100755 (executable)
@@ -4,6 +4,7 @@ test_description='push with --set-upstream'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
index b9546ef8e5e5cd3a734228c4d65ffdb59f568684..dcdbe26a08e1e3db99338a740e10011981b292af 100755 (executable)
@@ -167,6 +167,19 @@ test_expect_success "fetch --recurse-submodules recurses into submodules" '
        verify_fetch_result actual.err
 '
 
+test_expect_success "fetch --recurse-submodules honors --no-write-fetch-head" '
+       (
+               cd downstream &&
+               git submodule foreach --recursive \
+               sh -c "cd \"\$(git rev-parse --git-dir)\" && rm -f FETCH_HEAD" &&
+
+               git fetch --recurse-submodules --no-write-fetch-head &&
+
+               git submodule foreach --recursive \
+               sh -c "cd \"\$(git rev-parse --git-dir)\" && ! test -f FETCH_HEAD"
+       )
+'
+
 test_expect_success "submodule.recurse option triggers recursive fetch" '
        add_submodule_commits &&
        (
index e2770e4541f94d60dba1ae8698abf3496a6a50e9..98ece27c6a0819093cd54ce19916456ce2136dae 100755 (executable)
@@ -4,6 +4,7 @@ test_description='test fetching of oddly-named refs'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # afterwards we will have:
index ce85fd30ad195eecd061ad0ec734542daf2d7c59..0247137cb36474c22f6ce5ed045379fa43f1a3ea 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='detect some push errors early (before contacting remote)'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup commits' '
index fbad2d5ff5e9e3a7d23a9117b48edf0c9a2b59d8..d0211cd8bef450e0149dccd037b0f9e1607ef421 100755 (executable)
@@ -36,28 +36,6 @@ test_expect_success 'setup remote repository' '
 
 setup_askpass_helper
 
-cat >exp <<EOF
-GET  /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
-POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
-EOF
-test_expect_success 'no empty path components' '
-       # Clear the log, so that it does not affect the "used receive-pack
-       # service" test which reads the log too.
-       test_when_finished ">\"\$HTTPD_ROOT_PATH\"/access.log" &&
-
-       # In the URL, add a trailing slash, and see if git appends yet another
-       # slash.
-       cd "$ROOT_PATH" &&
-       git clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&
-
-       # NEEDSWORK: If the overspecification of the expected result is reduced, we
-       # might be able to run this test in all protocol versions.
-       if test "$GIT_TEST_PROTOCOL_VERSION" = 0
-       then
-               check_access_log exp
-       fi
-'
-
 test_expect_success 'clone remote repository' '
        rm -rf test_repo_clone &&
        git clone $HTTPD_URL/smart/test_repo.git test_repo_clone &&
@@ -67,6 +45,10 @@ test_expect_success 'clone remote repository' '
 '
 
 test_expect_success 'push to remote repository (standard)' '
+       # Clear the log, so that the "used receive-pack service" test below
+       # sees just what we did here.
+       >"$HTTPD_ROOT_PATH"/access.log &&
+
        cd "$ROOT_PATH"/test_repo_clone &&
        : >path2 &&
        git add path2 &&
@@ -80,6 +62,15 @@ test_expect_success 'push to remote repository (standard)' '
         test $HEAD = $(git rev-parse --verify HEAD))
 '
 
+test_expect_success 'used receive-pack service' '
+       cat >exp <<-\EOF &&
+       GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
+       POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
+       EOF
+
+       check_access_log exp
+'
+
 test_expect_success 'push to remote repository (standard) with sending Accept-Language' '
        cat >exp <<-\EOF &&
        => Send header: Accept-Language: ko-KR, *;q=0.9
@@ -141,28 +132,6 @@ test_expect_success 'rejected update prints status' '
 '
 rm -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/hooks/update"
 
-cat >exp <<EOF
-GET  /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
-POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
-GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
-GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
-GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
-GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
-GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
-EOF
-test_expect_success 'used receive-pack service' '
-       # NEEDSWORK: If the overspecification of the expected result is reduced, we
-       # might be able to run this test in all protocol versions.
-       if test "$GIT_TEST_PROTOCOL_VERSION" = 0
-       then
-               check_access_log exp
-       fi
-'
-
 test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
        "$ROOT_PATH"/test_repo_clone main               success
 
index 0b0e987fdb73fcd7d8f54c393ee7deb15a4b5b8c..eed3c9d81abaffa8886b44f26224111b369735ce 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='check receive input limits'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Let's run tests with different unpack limits: 1 and 10000
index 1876fb34e51a09f8b3d7f6d82d174044c9a16c84..9f899b8c7d7bcc63ba5fe97c513748eeba436edb 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='check quarantine of objects during push'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create picky dest repo' '
index bc0719a4fc929540570c2d3d0e98bdd5febadea2..0908534f2561f4bc68319f4dc4ffc464ba4e4a90 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-: ${HTTP_PROTO:=HTTP}
+: ${HTTP_PROTO:=HTTP/1.1}
 test_description="test smart fetching over http via http-backend ($HTTP_PROTO)"
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
@@ -33,35 +33,71 @@ test_expect_success 'create http-accessible bare repository' '
 setup_askpass_helper
 
 test_expect_success 'clone http repository' '
-       cat >exp <<-\EOF &&
-       > GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
-       > Accept: */*
-       > Accept-Encoding: ENCODINGS
-       > Accept-Language: ko-KR, *;q=0.9
-       > Pragma: no-cache
-       < HTTP/1.1 200 OK
-       < Pragma: no-cache
-       < Cache-Control: no-cache, max-age=0, must-revalidate
-       < Content-Type: application/x-git-upload-pack-advertisement
-       > POST /smart/repo.git/git-upload-pack HTTP/1.1
-       > Accept-Encoding: ENCODINGS
-       > Content-Type: application/x-git-upload-pack-request
-       > Accept: application/x-git-upload-pack-result
-       > Accept-Language: ko-KR, *;q=0.9
-       > Content-Length: xxx
-       < HTTP/1.1 200 OK
-       < Pragma: no-cache
-       < Cache-Control: no-cache, max-age=0, must-revalidate
-       < Content-Type: application/x-git-upload-pack-result
+       if test_have_prereq HTTP2 && test "$HTTPD_PROTO" = "https"
+       then
+               # ALPN lets us immediately use HTTP/2; likewise, POSTs with
+               # bodies can use it because they do not need to upgrade
+               INITIAL_PROTO=HTTP/2
+       else
+               # either we are not using HTTP/2, or the initial
+               # request is sent via HTTP/1.1 and asks for upgrade
+               INITIAL_PROTO=HTTP/1.1
+       fi &&
+
+       cat >exp.raw <<-EOF &&
+       > GET /smart/repo.git/info/refs?service=git-upload-pack $INITIAL_PROTO
+       > accept: */*
+       > accept-encoding: ENCODINGS
+       > accept-language: ko-KR, *;q=0.9
+       > pragma: no-cache
+       {V2} > git-protocol: version=2
+       < $HTTP_PROTO 200 OK
+       < pragma: no-cache
+       < cache-control: no-cache, max-age=0, must-revalidate
+       < content-type: application/x-git-upload-pack-advertisement
+       > POST /smart/repo.git/git-upload-pack $INITIAL_PROTO
+       > accept-encoding: ENCODINGS
+       > content-type: application/x-git-upload-pack-request
+       > accept: application/x-git-upload-pack-result
+       > accept-language: ko-KR, *;q=0.9
+       {V2} > git-protocol: version=2
+       > content-length: xxx
+       < $INITIAL_PROTO 200 OK
+       < pragma: no-cache
+       < cache-control: no-cache, max-age=0, must-revalidate
+       < content-type: application/x-git-upload-pack-result
+       {V2} > POST /smart/repo.git/git-upload-pack $INITIAL_PROTO
+       {V2} > accept-encoding: ENCODINGS
+       {V2} > content-type: application/x-git-upload-pack-request
+       {V2} > accept: application/x-git-upload-pack-result
+       {V2} > accept-language: ko-KR, *;q=0.9
+       {V2} > git-protocol: version=2
+       {V2} > content-length: xxx
+       {V2} < $INITIAL_PROTO 200 OK
+       {V2} < pragma: no-cache
+       {V2} < cache-control: no-cache, max-age=0, must-revalidate
+       {V2} < content-type: application/x-git-upload-pack-result
        EOF
 
-       GIT_TRACE_CURL=true GIT_TEST_PROTOCOL_VERSION=0 LANGUAGE="ko_KR.UTF-8" \
+       if test "$GIT_TEST_PROTOCOL_VERSION" = 0
+       then
+               sed "/^{V2}/d" <exp.raw >exp
+       else
+               sed "s/^{V2} //" <exp.raw >exp
+       fi &&
+
+       GIT_TRACE_CURL=true LANGUAGE="ko_KR.UTF-8" \
                git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&
        test_cmp file clone/file &&
        tr '\''\015'\'' Q <err |
+       perl -pe '\''
+               s/(Send|Recv) header: ([A-Za-z0-9-]+):/
+               "$1 header: " . lc($2) . ":"
+               /e;
+       '\'' |
        sed -e "
                s/Q\$//
-               /^[*] /d
+               /^[^<=]/d
                /^== Info:/d
                /^=> Send header, /d
                /^=> Send header:$/d
@@ -71,6 +107,8 @@ test_expect_success 'clone http repository' '
                s/= Recv header://
                /^<= Recv data/d
                /^=> Send data/d
+               /^<= Recv SSL data/d
+               /^=> Send SSL data/d
                /^$/d
                /^< $/d
 
@@ -78,36 +116,35 @@ test_expect_success 'clone http repository' '
                        s/^/> /
                }
 
-               /^> User-Agent: /d
-               /^> Host: /d
+               /^< HTTP/ {
+                       s/200$/200 OK/
+               }
+               /^< HTTP\\/1.1 101/d
+               /^[><] connection: /d
+               /^[><] upgrade: /d
+               /^> http2-settings: /d
+
+               /^> user-agent: /d
+               /^> host: /d
                /^> POST /,$ {
                        /^> Accept: [*]\\/[*]/d
                }
-               s/^> Content-Length: .*/> Content-Length: xxx/
+               s/^> content-length: .*/> content-length: xxx/
                /^> 00..want /d
                /^> 00.*done/d
 
-               /^< Server: /d
-               /^< Expires: /d
-               /^< Date: /d
-               /^< Content-Length: /d
-               /^< Transfer-Encoding: /d
+               /^< server: /d
+               /^< expires: /d
+               /^< date: /d
+               /^< content-length: /d
+               /^< transfer-encoding: /d
        " >actual &&
 
-       # NEEDSWORK: If the overspecification of the expected result is reduced, we
-       # might be able to run this test in all protocol versions.
-       if test "$GIT_TEST_PROTOCOL_VERSION" = 0
-       then
-               sed -e "s/^> Accept-Encoding: .*/> Accept-Encoding: ENCODINGS/" \
-                               actual >actual.smudged &&
-               test_cmp exp actual.smudged &&
-
-               grep "Accept-Encoding:.*gzip" actual >actual.gzip &&
-               test_line_count = 2 actual.gzip &&
+       sed -e "s/^> accept-encoding: .*/> accept-encoding: ENCODINGS/" \
+                       actual >actual.smudged &&
+       test_cmp exp actual.smudged &&
 
-               grep "Accept-Language: ko-KR, *" actual >actual.language &&
-               test_line_count = 2 actual.language
-       fi
+       grep "accept-encoding:.*gzip" actual >actual.gzip
 '
 
 test_expect_success 'fetch changes via http' '
@@ -119,19 +156,9 @@ test_expect_success 'fetch changes via http' '
 '
 
 test_expect_success 'used upload-pack service' '
-       cat >exp <<-\EOF &&
-       GET  /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
-       POST /smart/repo.git/git-upload-pack HTTP/1.1 200
-       GET  /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
-       POST /smart/repo.git/git-upload-pack HTTP/1.1 200
-       EOF
-
-       # NEEDSWORK: If the overspecification of the expected result is reduced, we
-       # might be able to run this test in all protocol versions.
-       if test "$GIT_TEST_PROTOCOL_VERSION" = 0
-       then
-               check_access_log exp
-       fi
+       strip_access_log >log &&
+       grep "GET  /smart/repo.git/info/refs?service=git-upload-pack HTTP/[0-9.]* 200" log &&
+       grep "POST /smart/repo.git/git-upload-pack HTTP/[0-9.]* 200" log
 '
 
 test_expect_success 'follow redirects (301)' '
@@ -280,21 +307,23 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
        127.0.0.1       FALSE   /smart_cookies/ FALSE   0       othername       othervalue
        EOF
        sort >expect_cookies.txt <<-\EOF &&
-
        127.0.0.1       FALSE   /smart_cookies/ FALSE   0       othername       othervalue
+       127.0.0.1       FALSE   /smart_cookies/repo.git/        FALSE   0       name    value
        127.0.0.1       FALSE   /smart_cookies/repo.git/info/   FALSE   0       name    value
        EOF
        git config http.cookiefile cookies.txt &&
        git config http.savecookies true &&
-       git ls-remote $HTTPD_URL/smart_cookies/repo.git main &&
 
-       # NEEDSWORK: If the overspecification of the expected result is reduced, we
-       # might be able to run this test in all protocol versions.
-       if test "$GIT_TEST_PROTOCOL_VERSION" = 0
-       then
-               tail -3 cookies.txt | sort >cookies_tail.txt &&
-               test_cmp expect_cookies.txt cookies_tail.txt
-       fi
+       test_when_finished "
+               git --git-dir=\"\$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" \
+                       tag -d cookie-tag
+       " &&
+       git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
+               tag -m "foo" cookie-tag &&
+       git fetch $HTTPD_URL/smart_cookies/repo.git cookie-tag &&
+
+       grep "^[^#]" cookies.txt | sort >cookies_stripped.txt &&
+       test_cmp expect_cookies.txt cookies_stripped.txt
 '
 
 test_expect_success 'transfer.hiderefs works over smart-http' '
@@ -666,4 +695,13 @@ test_expect_success 'push warns or fails when using username:password' '
        test_line_count -ge 1 warnings
 '
 
+test_expect_success 'no empty path components' '
+       # In the URL, add a trailing slash, and see if git appends yet another
+       # slash.
+       git clone $HTTPD_URL/smart/repo.git/ clone-with-slash &&
+
+       strip_access_log >log &&
+       ! grep "//" log
+'
+
 test_done
index 9155f31fa2cb58db4e09814f451ee87b63c5dfdc..afd56926c5371b90eaf42d5823541f6f93788ba1 100755 (executable)
@@ -285,6 +285,8 @@ test_expect_success 'clone HTTP bundle' '
 '
 
 test_expect_success 'clone bundle list (HTTP, no heuristic)' '
+       test_when_finished rm -f trace*.txt &&
+
        cp clone-from/bundle-*.bundle "$HTTPD_DOCUMENT_ROOT_PATH/" &&
        cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
        [bundle]
@@ -304,12 +306,26 @@ test_expect_success 'clone bundle list (HTTP, no heuristic)' '
                uri = $HTTPD_URL/bundle-4.bundle
        EOF
 
-       git clone --bundle-uri="$HTTPD_URL/bundle-list" \
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone.txt" \
+               git clone --bundle-uri="$HTTPD_URL/bundle-list" \
                clone-from clone-list-http  2>err &&
        ! grep "Repository lacks these prerequisite commits" err &&
 
        git -C clone-from for-each-ref --format="%(objectname)" >oids &&
-       git -C clone-list-http cat-file --batch-check <oids
+       git -C clone-list-http cat-file --batch-check <oids &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-1.bundle
+       $HTTPD_URL/bundle-2.bundle
+       $HTTPD_URL/bundle-3.bundle
+       $HTTPD_URL/bundle-4.bundle
+       $HTTPD_URL/bundle-list
+       EOF
+
+       # Sort the list, since the order is not well-defined
+       # without a heuristic.
+       test_remote_https_urls <trace-clone.txt | sort >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'clone bundle list (HTTP, any mode)' '
@@ -350,6 +366,658 @@ test_expect_success 'clone bundle list (HTTP, any mode)' '
        test_cmp expect actual
 '
 
+test_expect_success 'clone bundle list (http, creationToken)' '
+       test_when_finished rm -f trace*.txt &&
+
+       cp clone-from/bundle-*.bundle "$HTTPD_DOCUMENT_ROOT_PATH/" &&
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone.txt" git \
+               clone --bundle-uri="$HTTPD_URL/bundle-list" \
+               "$HTTPD_URL/smart/fetch.git" clone-list-http-2 &&
+
+       git -C clone-from for-each-ref --format="%(objectname)" >oids &&
+       git -C clone-list-http-2 cat-file --batch-check <oids &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-4.bundle
+       $HTTPD_URL/bundle-3.bundle
+       $HTTPD_URL/bundle-2.bundle
+       $HTTPD_URL/bundle-1.bundle
+       EOF
+
+       test_remote_https_urls <trace-clone.txt >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'clone incomplete bundle list (http, creationToken)' '
+       test_when_finished rm -f trace*.txt &&
+
+       cp clone-from/bundle-*.bundle "$HTTPD_DOCUMENT_ROOT_PATH/" &&
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+       EOF
+
+       GIT_TRACE2_EVENT=$(pwd)/trace-clone.txt \
+       git clone --bundle-uri="$HTTPD_URL/bundle-list" \
+               --single-branch --branch=base --no-tags \
+               "$HTTPD_URL/smart/fetch.git" clone-token-http &&
+
+       test_cmp_config -C clone-token-http "$HTTPD_URL/bundle-list" fetch.bundleuri &&
+       test_cmp_config -C clone-token-http 1 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-1.bundle
+       EOF
+
+       test_remote_https_urls <trace-clone.txt >actual &&
+       test_cmp expect actual &&
+
+       # We now have only one bundle ref.
+       git -C clone-token-http for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-\EOF &&
+       refs/bundles/base
+       EOF
+       test_cmp expect refs &&
+
+       # Add remaining bundles, exercising the "deepening" strategy
+       # for downloading via the creationToken heurisitc.
+       cat >>"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace1.txt" \
+               git -C clone-token-http fetch origin --no-tags \
+               refs/heads/merge:refs/heads/merge &&
+       test_cmp_config -C clone-token-http 4 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-4.bundle
+       $HTTPD_URL/bundle-3.bundle
+       $HTTPD_URL/bundle-2.bundle
+       EOF
+
+       test_remote_https_urls <trace1.txt >actual &&
+       test_cmp expect actual &&
+
+       # We now have all bundle refs.
+       git -C clone-token-http for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+
+       cat >expect <<-\EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       refs/bundles/merge
+       refs/bundles/right
+       EOF
+       test_cmp expect refs
+'
+
+test_expect_success 'http clone with bundle.heuristic creates fetch.bundleURI' '
+       test_when_finished rm -rf fetch-http-4 trace*.txt &&
+
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone.txt" \
+       git clone --single-branch --branch=base \
+               --bundle-uri="$HTTPD_URL/bundle-list" \
+               "$HTTPD_URL/smart/fetch.git" fetch-http-4 &&
+
+       test_cmp_config -C fetch-http-4 "$HTTPD_URL/bundle-list" fetch.bundleuri &&
+       test_cmp_config -C fetch-http-4 1 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-1.bundle
+       EOF
+
+       test_remote_https_urls <trace-clone.txt >actual &&
+       test_cmp expect actual &&
+
+       # only received base ref from bundle-1
+       git -C fetch-http-4 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-\EOF &&
+       refs/bundles/base
+       EOF
+       test_cmp expect refs &&
+
+       cat >>"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+       EOF
+
+       # Fetch the objects for bundle-2 _and_ bundle-3.
+       GIT_TRACE2_EVENT="$(pwd)/trace1.txt" \
+               git -C fetch-http-4 fetch origin --no-tags \
+               refs/heads/left:refs/heads/left \
+               refs/heads/right:refs/heads/right &&
+       test_cmp_config -C fetch-http-4 2 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-2.bundle
+       EOF
+
+       test_remote_https_urls <trace1.txt >actual &&
+       test_cmp expect actual &&
+
+       # received left from bundle-2
+       git -C fetch-http-4 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-\EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       EOF
+       test_cmp expect refs &&
+
+       # No-op fetch
+       GIT_TRACE2_EVENT="$(pwd)/trace1b.txt" \
+               git -C fetch-http-4 fetch origin --no-tags \
+               refs/heads/left:refs/heads/left \
+               refs/heads/right:refs/heads/right &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       EOF
+       test_remote_https_urls <trace1b.txt >actual &&
+       test_cmp expect actual &&
+
+       cat >>"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+       EOF
+
+       # This fetch should skip bundle-3.bundle, since its objects are
+       # already local (we have the requisite commits for bundle-4.bundle).
+       GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
+               git -C fetch-http-4 fetch origin --no-tags \
+               refs/heads/merge:refs/heads/merge &&
+       test_cmp_config -C fetch-http-4 4 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-4.bundle
+       EOF
+
+       test_remote_https_urls <trace2.txt >actual &&
+       test_cmp expect actual &&
+
+       # received merge ref from bundle-4, but right is missing
+       # because we did not download bundle-3.
+       git -C fetch-http-4 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+
+       cat >expect <<-\EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       refs/bundles/merge
+       EOF
+       test_cmp expect refs &&
+
+       # No-op fetch
+       GIT_TRACE2_EVENT="$(pwd)/trace2b.txt" \
+               git -C fetch-http-4 fetch origin &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       EOF
+       test_remote_https_urls <trace2b.txt >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'creationToken heuristic with failed downloads (clone)' '
+       test_when_finished rm -rf download-* trace*.txt &&
+
+       # Case 1: base bundle does not exist, nothing can unbundle
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = fake.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone-1.txt" \
+       git clone --single-branch --branch=base \
+               --bundle-uri="$HTTPD_URL/bundle-list" \
+               "$HTTPD_URL/smart/fetch.git" download-1 &&
+
+       # Bundle failure does not set these configs.
+       test_must_fail git -C download-1 config fetch.bundleuri &&
+       test_must_fail git -C download-1 config fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-4.bundle
+       $HTTPD_URL/bundle-3.bundle
+       $HTTPD_URL/bundle-2.bundle
+       $HTTPD_URL/fake.bundle
+       EOF
+       test_remote_https_urls <trace-clone-1.txt >actual &&
+       test_cmp expect actual &&
+
+       # All bundles failed to unbundle
+       git -C download-1 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       test_must_be_empty refs &&
+
+       # Case 2: middle bundle does not exist, only two bundles can unbundle
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = fake.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone-2.txt" \
+       git clone --single-branch --branch=base \
+               --bundle-uri="$HTTPD_URL/bundle-list" \
+               "$HTTPD_URL/smart/fetch.git" download-2 &&
+
+       # Bundle failure does not set these configs.
+       test_must_fail git -C download-2 config fetch.bundleuri &&
+       test_must_fail git -C download-2 config fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-4.bundle
+       $HTTPD_URL/bundle-3.bundle
+       $HTTPD_URL/fake.bundle
+       $HTTPD_URL/bundle-1.bundle
+       EOF
+       test_remote_https_urls <trace-clone-2.txt >actual &&
+       test_cmp expect actual &&
+
+       # bundle-1 and bundle-3 could unbundle, but bundle-4 could not
+       git -C download-2 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-EOF &&
+       refs/bundles/base
+       refs/bundles/right
+       EOF
+       test_cmp expect refs &&
+
+       # Case 3: top bundle does not exist, rest unbundle fine.
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = fake.bundle
+               creationToken = 4
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone-3.txt" \
+       git clone --single-branch --branch=base \
+               --bundle-uri="$HTTPD_URL/bundle-list" \
+               "$HTTPD_URL/smart/fetch.git" download-3 &&
+
+       # As long as we have continguous successful downloads,
+       # we _do_ set these configs.
+       test_cmp_config -C download-3 "$HTTPD_URL/bundle-list" fetch.bundleuri &&
+       test_cmp_config -C download-3 3 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/fake.bundle
+       $HTTPD_URL/bundle-3.bundle
+       $HTTPD_URL/bundle-2.bundle
+       $HTTPD_URL/bundle-1.bundle
+       EOF
+       test_remote_https_urls <trace-clone-3.txt >actual &&
+       test_cmp expect actual &&
+
+       # fake.bundle did not unbundle, but the others did.
+       git -C download-3 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       refs/bundles/right
+       EOF
+       test_cmp expect refs
+'
+
+# Expand the bundle list to include other interesting shapes, specifically
+# interesting for use when fetching from a previous state.
+#
+# ---------------- bundle-7
+#       7
+#     _/|\_
+# ---/--|--\------ bundle-6
+#   5   |   6
+# --|---|---|----- bundle-4
+#   |   4   |
+#   |  / \  /
+# --|-|---|/------ bundle-3 (the client will be caught up to this point.)
+#   \ |   3
+# ---\|---|------- bundle-2
+#     2   |
+# ----|---|------- bundle-1
+#      \ /
+#       1
+#       |
+# (previous commits)
+test_expect_success 'expand incremental bundle list' '
+       (
+               cd clone-from &&
+               git checkout -b lefter left &&
+               test_commit 5 &&
+               git checkout -b righter right &&
+               test_commit 6 &&
+               git checkout -b top lefter &&
+               git merge -m "7" merge righter &&
+
+               git bundle create bundle-6.bundle lefter righter --not left right &&
+               git bundle create bundle-7.bundle top --not lefter merge righter &&
+
+               cp bundle-*.bundle "$HTTPD_DOCUMENT_ROOT_PATH/"
+       ) &&
+       git -C "$HTTPD_DOCUMENT_ROOT_PATH/fetch.git" fetch origin +refs/heads/*:refs/heads/*
+'
+
+test_expect_success 'creationToken heuristic with failed downloads (fetch)' '
+       test_when_finished rm -rf download-* trace*.txt &&
+
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+       EOF
+
+       git clone --single-branch --branch=left \
+               --bundle-uri="$HTTPD_URL/bundle-list" \
+               "$HTTPD_URL/smart/fetch.git" fetch-base &&
+       test_cmp_config -C fetch-base "$HTTPD_URL/bundle-list" fetch.bundleURI &&
+       test_cmp_config -C fetch-base 3 fetch.bundleCreationToken &&
+
+       # Case 1: all bundles exist: successful unbundling of all bundles
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+
+       [bundle "bundle-6"]
+               uri = bundle-6.bundle
+               creationToken = 6
+
+       [bundle "bundle-7"]
+               uri = bundle-7.bundle
+               creationToken = 7
+       EOF
+
+       cp -r fetch-base fetch-1 &&
+       GIT_TRACE2_EVENT="$(pwd)/trace-fetch-1.txt" \
+               git -C fetch-1 fetch origin &&
+       test_cmp_config -C fetch-1 7 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-7.bundle
+       $HTTPD_URL/bundle-6.bundle
+       $HTTPD_URL/bundle-4.bundle
+       EOF
+       test_remote_https_urls <trace-fetch-1.txt >actual &&
+       test_cmp expect actual &&
+
+       # Check which bundles have unbundled by refs
+       git -C fetch-1 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       refs/bundles/lefter
+       refs/bundles/merge
+       refs/bundles/right
+       refs/bundles/righter
+       refs/bundles/top
+       EOF
+       test_cmp expect refs &&
+
+       # Case 2: middle bundle does not exist, only bundle-4 can unbundle
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+
+       [bundle "bundle-6"]
+               uri = fake.bundle
+               creationToken = 6
+
+       [bundle "bundle-7"]
+               uri = bundle-7.bundle
+               creationToken = 7
+       EOF
+
+       cp -r fetch-base fetch-2 &&
+       GIT_TRACE2_EVENT="$(pwd)/trace-fetch-2.txt" \
+               git -C fetch-2 fetch origin &&
+
+       # Since bundle-7 fails to unbundle, do not update creation token.
+       test_cmp_config -C fetch-2 3 fetch.bundlecreationtoken &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/bundle-7.bundle
+       $HTTPD_URL/fake.bundle
+       $HTTPD_URL/bundle-4.bundle
+       EOF
+       test_remote_https_urls <trace-fetch-2.txt >actual &&
+       test_cmp expect actual &&
+
+       # Check which bundles have unbundled by refs
+       git -C fetch-2 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       refs/bundles/merge
+       refs/bundles/right
+       EOF
+       test_cmp expect refs &&
+
+       # Case 3: top bundle does not exist, rest unbundle fine.
+       cat >"$HTTPD_DOCUMENT_ROOT_PATH/bundle-list" <<-EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "bundle-1"]
+               uri = bundle-1.bundle
+               creationToken = 1
+
+       [bundle "bundle-2"]
+               uri = bundle-2.bundle
+               creationToken = 2
+
+       [bundle "bundle-3"]
+               uri = bundle-3.bundle
+               creationToken = 3
+
+       [bundle "bundle-4"]
+               uri = bundle-4.bundle
+               creationToken = 4
+
+       [bundle "bundle-6"]
+               uri = bundle-6.bundle
+               creationToken = 6
+
+       [bundle "bundle-7"]
+               uri = fake.bundle
+               creationToken = 7
+       EOF
+
+       cp -r fetch-base fetch-3 &&
+       GIT_TRACE2_EVENT="$(pwd)/trace-fetch-3.txt" \
+               git -C fetch-3 fetch origin &&
+
+       # As long as we have continguous successful downloads,
+       # we _do_ set the maximum creation token.
+       test_cmp_config -C fetch-3 6 fetch.bundlecreationtoken &&
+
+       # NOTE: the fetch skips bundle-4 since bundle-6 successfully
+       # unbundles itself and bundle-7 failed to download.
+       cat >expect <<-EOF &&
+       $HTTPD_URL/bundle-list
+       $HTTPD_URL/fake.bundle
+       $HTTPD_URL/bundle-6.bundle
+       EOF
+       test_remote_https_urls <trace-fetch-3.txt >actual &&
+       test_cmp expect actual &&
+
+       # Check which bundles have unbundled by refs
+       git -C fetch-3 for-each-ref --format="%(refname)" "refs/bundles/*" >refs &&
+       cat >expect <<-EOF &&
+       refs/bundles/base
+       refs/bundles/left
+       refs/bundles/lefter
+       refs/bundles/right
+       refs/bundles/righter
+       EOF
+       test_cmp expect refs
+'
+
 # Do not add tests here unless they use the HTTP server, as they will
 # not run unless the HTTP dependencies exist.
 
index 9eece71c2c2c28f00630e62e8a7a6495d23c3219..54aa9d3bffa1a7b7a04f3cc435556b13a14cf8e1 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
 
 HTTP_PROTO=HTTP/2
+LIB_HTTPD_SSL=1
 . ./t5551-http-fetch-smart.sh
index d30cf4f5b8398e1cf98c86221dd42208d64fd014..f75068de64851faf86d7ae270c1b88bb9d08df16 100755 (executable)
@@ -4,6 +4,7 @@ test_description='test git-http-backend-noserver'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
index 9c57d843152dd5861603316650a0f7f440711c52..e1d3b8caed07394fcdf02db4d31d4f038d3474b2 100755 (executable)
@@ -4,6 +4,7 @@ test_description='test git-http-backend'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-httpd.sh
 
index b68ec22d3fdb0bab650b39642a61a11a6579fcb5..7ee9858a78b6fb9a473d777f280a9d450fd49830 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test git-http-backend respects CONTENT_LENGTH'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_lazy_prereq GZIP 'gzip --version'
diff --git a/t/t5564-http-proxy.sh b/t/t5564-http-proxy.sh
new file mode 100755 (executable)
index 0000000..9da5134
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+test_description="test fetching through http proxy"
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-httpd.sh
+
+LIB_HTTPD_PROXY=1
+start_httpd
+
+test_expect_success 'setup repository' '
+       test_commit foo &&
+       git init --bare "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+       git push --mirror "$HTTPD_DOCUMENT_ROOT_PATH/repo.git"
+'
+
+setup_askpass_helper
+
+# sanity check that our test setup is correctly using proxy
+test_expect_success 'proxy requires password' '
+       test_config_global http.proxy $HTTPD_DEST &&
+       test_must_fail git clone $HTTPD_URL/smart/repo.git 2>err &&
+       grep "error.*407" err
+'
+
+test_expect_success 'clone through proxy with auth' '
+       test_when_finished "rm -rf clone" &&
+       test_config_global http.proxy http://proxuser:proxpass@$HTTPD_DEST &&
+       GIT_TRACE_CURL=$PWD/trace git clone $HTTPD_URL/smart/repo.git clone &&
+       grep -i "Proxy-Authorization: Basic <redacted>" trace
+'
+
+test_expect_success 'clone can prompt for proxy password' '
+       test_when_finished "rm -rf clone" &&
+       test_config_global http.proxy http://proxuser@$HTTPD_DEST &&
+       set_askpass nobody proxpass &&
+       GIT_TRACE_CURL=$PWD/trace git clone $HTTPD_URL/smart/repo.git clone &&
+       expect_askpass pass proxuser
+'
+
+test_done
index a53dd8550d0b8cbe40f49ece0381fb554ba87062..1221ac05978e2c5cff0675f7e46e488361908098 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='pull signature verification tests'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
index 1928ea1dd7cb9b42e7b6f6db6216c1545bb77a9e..b7d5551262c7b715fbeea48f0260906f35a64a10 100755 (executable)
@@ -831,6 +831,52 @@ test_expect_success 'auto-discover multiple bundles from HTTP clone' '
        grep -f pattern trace.txt
 '
 
+test_expect_success 'auto-discover multiple bundles from HTTP clone: creationToken heuristic' '
+       test_when_finished rm -rf "$HTTPD_DOCUMENT_ROOT_PATH/repo4.git" &&
+       test_when_finished rm -rf clone-heuristic trace*.txt &&
+
+       test_commit -C src newest &&
+       git -C src bundle create "$HTTPD_DOCUMENT_ROOT_PATH/newest.bundle" HEAD~1..HEAD &&
+       git clone --bare --no-local src "$HTTPD_DOCUMENT_ROOT_PATH/repo4.git" &&
+
+       cat >>"$HTTPD_DOCUMENT_ROOT_PATH/repo4.git/config" <<-EOF &&
+       [uploadPack]
+               advertiseBundleURIs = true
+
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+
+       [bundle "everything"]
+               uri = $HTTPD_URL/everything.bundle
+               creationtoken = 1
+
+       [bundle "new"]
+               uri = $HTTPD_URL/new.bundle
+               creationtoken = 2
+
+       [bundle "newest"]
+               uri = $HTTPD_URL/newest.bundle
+               creationtoken = 3
+       EOF
+
+       GIT_TRACE2_EVENT="$(pwd)/trace-clone.txt" \
+               git -c protocol.version=2 \
+                   -c transfer.bundleURI=true clone \
+               "$HTTPD_URL/smart/repo4.git" clone-heuristic &&
+
+       cat >expect <<-EOF &&
+       $HTTPD_URL/newest.bundle
+       $HTTPD_URL/new.bundle
+       $HTTPD_URL/everything.bundle
+       EOF
+
+       # We should fetch all bundles in the expected order.
+       test_remote_https_urls <trace-clone.txt >actual &&
+       test_cmp expect actual
+'
+
 # DO NOT add non-httpd-specific tests here, because the last part of this
 # test script is only executed when httpd is available and enabled.
 
index 2734e37e8804cd6944301e1d836af517fb1172b5..83e3c97861ddc50eb9e6b1a78e68d693224c3fc9 100755 (executable)
@@ -7,6 +7,7 @@ test_description='test clone --reference'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 base_dir=$(pwd)
@@ -344,4 +345,20 @@ test_expect_success SYMLINKS 'clone repo with symlinked or unknown files at obje
        test_must_be_empty T--shared.objects-symlinks.raw
 '
 
+test_expect_success SYMLINKS 'clone repo with symlinked objects directory' '
+       test_when_finished "rm -fr sensitive malicious" &&
+
+       mkdir -p sensitive &&
+       echo "secret" >sensitive/file &&
+
+       git init malicious &&
+       rm -fr malicious/.git/objects &&
+       ln -s "$(pwd)/sensitive" ./malicious/.git/objects &&
+
+       test_must_fail git clone --local malicious clone 2>err &&
+
+       test_path_is_missing clone &&
+       grep "failed to start iterator over" err
+'
+
 test_done
index 38b850c10ef8cddeb790ed276209bb5019439eae..1d7b1abda1a4870971efb8408c11a4dde2e7564e 100755 (executable)
@@ -15,8 +15,12 @@ test_expect_success 'preparing origin repository' '
        : >file && git add . && git commit -m1 &&
        git clone --bare . a.git &&
        git clone --bare . x &&
-       test "$(cd a.git && git config --bool core.bare)" = true &&
-       test "$(cd x && git config --bool core.bare)" = true &&
+       echo true >expect &&
+       git -C a.git config --bool core.bare >actual &&
+       test_cmp expect actual &&
+       echo true >expect &&
+       git -C x config --bool core.bare >actual &&
+       test_cmp expect actual &&
        git bundle create b1.bundle --all &&
        git bundle create b2.bundle main &&
        mkdir dir &&
@@ -29,7 +33,9 @@ test_expect_success 'preparing origin repository' '
 test_expect_success 'local clone without .git suffix' '
        git clone -l -s a b &&
        (cd b &&
-       test "$(git config --bool core.bare)" = false &&
+       echo false >expect &&
+       git config --bool core.bare >actual &&
+       test_cmp expect actual &&
        git fetch)
 '
 
index cf221e92c4d97e852f1bdefbf61f6caded87aff2..27f9f7763895ec98761800d2a3e4ad2adf33aeb9 100755 (executable)
@@ -4,6 +4,7 @@ test_description='basic clone options'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index 895f46bb9118bbf15d32f594ce79f0e638d25b6a..7708cbafa982ef3a5579f8bde075fcad40e29e40 100755 (executable)
@@ -4,6 +4,8 @@
 #
 
 test_description='test transitive info/alternate entries'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'preparing first repository' '
diff --git a/t/t5619-clone-local-ambiguous-transport.sh b/t/t5619-clone-local-ambiguous-transport.sh
new file mode 100755 (executable)
index 0000000..cce62bf
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+test_description='test local clone with ambiguous transport'
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY/lib-httpd.sh"
+
+if ! test_have_prereq SYMLINKS
+then
+       skip_all='skipping test, symlink support unavailable'
+       test_done
+fi
+
+start_httpd
+
+REPO="$HTTPD_DOCUMENT_ROOT_PATH/sub.git"
+URI="$HTTPD_URL/dumb/sub.git"
+
+test_expect_success 'setup' '
+       mkdir -p sensitive &&
+       echo "secret" >sensitive/secret &&
+
+       git init --bare "$REPO" &&
+       test_commit_bulk -C "$REPO" --ref=main 1 &&
+
+       git -C "$REPO" update-ref HEAD main &&
+       git -C "$REPO" update-server-info &&
+
+       git init malicious &&
+       (
+               cd malicious &&
+
+               git submodule add "$URI" &&
+
+               mkdir -p repo/refs &&
+               touch repo/refs/.gitkeep &&
+               printf "ref: refs/heads/a" >repo/HEAD &&
+               ln -s "$(cd .. && pwd)/sensitive" repo/objects &&
+
+               mkdir -p "$HTTPD_URL/dumb" &&
+               ln -s "../../../.git/modules/sub/../../../repo/" "$URI" &&
+
+               git add . &&
+               git commit -m "initial commit"
+       ) &&
+
+       # Delete all of the references in our malicious submodule to
+       # avoid the client attempting to checkout any objects (which
+       # will be missing, and thus will cause the clone to fail before
+       # we can trigger the exploit).
+       git -C "$REPO" for-each-ref --format="delete %(refname)" >in &&
+       git -C "$REPO" update-ref --stdin <in &&
+       git -C "$REPO" update-server-info
+'
+
+test_expect_success 'ambiguous transport does not lead to arbitrary file-inclusion' '
+       git clone malicious clone &&
+       test_must_fail git -C clone submodule update --init 2>err &&
+
+       test_path_is_missing clone/.git/modules/sub/objects/secret &&
+       # We would actually expect "transport .file. not allowed" here,
+       # but due to quirks of the URL detection in Git, we mis-parse
+       # the absolute path as a bogus URL and die before that step.
+       #
+       # This works for now, and if we ever fix the URL detection, it
+       # is OK to change this to detect the transport error.
+       grep "protocol .* is not supported" err
+'
+
+test_done
index e4db7513f42192895e33e7eec431c73bec0007d8..71aabe30b7d76a5663529fa050a5f99a7e580d73 100755 (executable)
@@ -728,6 +728,33 @@ test_expect_success 'file:// --negotiate-only with protocol v0' '
        test_i18ngrep "negotiate-only requires protocol v2" err
 '
 
+test_expect_success 'push with custom path does not request v2' '
+       rm -f env.trace &&
+       git -C client push \
+               --receive-pack="env >../env.trace; git-receive-pack" \
+               origin HEAD:refs/heads/custom-push-test &&
+       test_path_is_file env.trace &&
+       ! grep ^GIT_PROTOCOL env.trace
+'
+
+test_expect_success 'fetch with custom path does request v2' '
+       rm -f env.trace &&
+       git -C client fetch \
+               --upload-pack="env >../env.trace; git-upload-pack" \
+               origin HEAD &&
+       grep ^GIT_PROTOCOL=version=2 env.trace
+'
+
+test_expect_success 'archive with custom path does not request v2' '
+       rm -f env.trace &&
+       git -C client archive \
+               --exec="env >../env.trace; git-upload-archive" \
+               --remote=origin \
+               HEAD >/dev/null &&
+       test_path_is_file env.trace &&
+       ! grep ^GIT_PROTOCOL env.trace
+'
+
 # Test protocol v2 with 'http://' transport
 #
 . "$TEST_DIRECTORY"/lib-httpd.sh
index ed38c76c29059d3f5363116db1b8231c31b0dc5a..b8a722ec27e73aeeb259e938417017607f64b5ee 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='session ID in capabilities'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 REPO="$(pwd)/repo"
index 7b4f930e532a90f7aec76e1047b4bec79f855f21..81bdf58b94443415083cd1dca427e08564f9af53 100755 (executable)
@@ -250,4 +250,41 @@ test_expect_success 'parse config format edge cases: empty key or value' '
        test_cmp_config_output expect actual
 '
 
+test_expect_success 'parse config format: creationToken heuristic' '
+       cat >expect <<-\EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+       [bundle "one"]
+               uri = http://example.com/bundle.bdl
+               creationToken = 123456
+       [bundle "two"]
+               uri = https://example.com/bundle.bdl
+               creationToken = 12345678901234567890
+       [bundle "three"]
+               uri = file:///usr/share/git/bundle.bdl
+               creationToken = 1
+       EOF
+
+       test-tool bundle-uri parse-config expect >actual 2>err &&
+       test_must_be_empty err &&
+       test_cmp_config_output expect actual
+'
+
+test_expect_success 'parse config format edge cases: creationToken heuristic' '
+       cat >expect <<-\EOF &&
+       [bundle]
+               version = 1
+               mode = all
+               heuristic = creationToken
+       [bundle "one"]
+               uri = http://example.com/bundle.bdl
+               creationToken = bogus
+       EOF
+
+       test-tool bundle-uri parse-config expect >actual 2>err &&
+       grep "could not parse bundle list key creationToken with value '\''bogus'\''" err
+'
+
 test_done
index c1ef99b85c293e8a8bfc0872e3511fe8b7029213..862610256fb082a9ed62547cc51dc0a3cb754c48 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test disabling of local paths in clone/fetch'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-proto-disable.sh"
 
index 3f084ee306517b2bc991365f6f15b76627e1d125..2e975dc70ec2c8cdb8b92cada469439a99c1d544 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test disabling of git-over-ssh in clone/fetch'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-proto-disable.sh"
 
index bad02cf5b83dbc014c23cc8ac66135e0cf095138..b2e422cf0f7eaa43411fdb6f2bb769ee7294a322 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='git rev-list should notice bad commits'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Note:
index c9bedd29cba4aac6b7db1aa8f1698fc5eac11b15..16b8bd1d090eae0449e409cd8313ffd45f769208 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='--all includes detached HEADs'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
index aabf590dda61d1ea1b7c70e79bbfa00819ea235e..67d523d40571b89b50cc5ca655ec77198c1a3ae3 100755 (executable)
@@ -187,7 +187,7 @@ test_expect_success 'rev-parse --exclude=ref with --remotes=glob' '
        compare rev-parse "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
 '
 
-for section in receive uploadpack
+for section in fetch receive uploadpack
 do
        test_expect_success "rev-parse --exclude-hidden=$section with --all" '
                compare "-c transfer.hideRefs=refs/remotes/ rev-parse" "--branches --tags" "--exclude-hidden=$section --all"
index 3a1cf30b1d737e3bc5cb34039822b7d45ab99445..dface8bcfe2641ee07ee36309d1c333224879283 100755 (executable)
@@ -10,6 +10,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-bundle.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
 
 for cmd in create verify list-heads unbundle
 do
@@ -566,4 +567,82 @@ test_expect_success 'cloning from filtered bundle has useful error' '
        grep "cannot clone from filtered bundle" err
 '
 
+test_expect_success 'verify catches unreachable, broken prerequisites' '
+       test_when_finished rm -rf clone-from clone-to &&
+       git init clone-from &&
+       (
+               cd clone-from &&
+               git checkout -b base &&
+               test_commit A &&
+               git checkout -b tip &&
+               git commit --allow-empty -m "will drop by shallow" &&
+               git commit --allow-empty -m "will keep by shallow" &&
+               git commit --allow-empty -m "for bundle, not clone" &&
+               git bundle create tip.bundle tip~1..tip &&
+               git reset --hard HEAD~1 &&
+               git checkout base
+       ) &&
+       BAD_OID=$(git -C clone-from rev-parse tip~1) &&
+       TIP_OID=$(git -C clone-from rev-parse tip) &&
+       git clone --depth=1 --no-single-branch \
+               "file://$(pwd)/clone-from" clone-to &&
+       (
+               cd clone-to &&
+
+               # Set up broken history by removing shallow markers
+               git update-ref -d refs/remotes/origin/tip &&
+               rm .git/shallow &&
+
+               # Verify should fail
+               test_must_fail git bundle verify \
+                       ../clone-from/tip.bundle 2>err &&
+               grep "some prerequisite commits .* are not connected" err &&
+               test_line_count = 1 err &&
+
+               # Unbundling should fail
+               test_must_fail git bundle unbundle \
+                       ../clone-from/tip.bundle 2>err &&
+               grep "some prerequisite commits .* are not connected" err &&
+               test_line_count = 1 err
+       )
+'
+
+test_expect_success 'bundle progress includes write phase' '
+       GIT_PROGRESS_DELAY=0 \
+               git bundle create --progress out.bundle --all 2>err &&
+       grep 'Writing' err
+'
+
+test_expect_success TTY 'create --quiet disables all bundle progress' '
+       test_terminal env GIT_PROGRESS_DELAY=0 \
+               git bundle create --quiet out.bundle --all 2>err &&
+       test_must_be_empty err
+'
+
+test_expect_success 'read bundle over stdin' '
+       git bundle create some.bundle HEAD &&
+
+       git bundle verify - <some.bundle 2>err &&
+       grep "<stdin> is okay" err &&
+
+       git bundle list-heads some.bundle >expect &&
+       git bundle list-heads - <some.bundle >actual &&
+       test_cmp expect actual &&
+
+       git bundle unbundle some.bundle >expect &&
+       git bundle unbundle - <some.bundle >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'send a bundle to standard output' '
+       git bundle create - --all HEAD >bundle-one &&
+       mkdir -p down &&
+       git -C down bundle create - --all HEAD >bundle-two &&
+       git bundle verify bundle-one &&
+       git bundle verify bundle-two &&
+       git ls-remote bundle-one >expect &&
+       git ls-remote bundle-two >actual &&
+       test_cmp expect actual
+'
+
 test_done
index 32b2b09413898f400e19de2e536532027556a310..1a9d37e63862f03877fe3d02b94ec8428e7ea01a 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='git rev-list --exclude-hidden test'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
@@ -21,7 +22,7 @@ test_expect_success 'invalid section' '
        test_cmp expected err
 '
 
-for section in receive uploadpack
+for section in fetch receive uploadpack
 do
        test_expect_success "$section: passed multiple times" '
                echo "fatal: --exclude-hidden= passed more than once" >expected &&
index 3ba4fdf6153b69bce18bef335970742701b2dd34..fb01bd6abce2c815b6f50f75e27e2c8f567cf09c 100755 (executable)
@@ -122,6 +122,29 @@ test_expect_success 'bisect start without -- takes unknown arg as pathspec' '
        grep bar ".git/BISECT_NAMES"
 '
 
+test_expect_success 'bisect reset: back in a branch checked out also elsewhere' '
+       echo "shared" > branch.expect &&
+       test_bisect_reset() {
+               git -C $1 bisect start &&
+               git -C $1 bisect good $HASH1 &&
+               git -C $1 bisect bad $HASH3 &&
+               git -C $1 bisect reset &&
+               git -C $1 branch --show-current > branch.output &&
+               cmp branch.expect branch.output
+       } &&
+       test_when_finished "
+               git worktree remove wt1 &&
+               git worktree remove wt2 &&
+               git branch -d shared
+       " &&
+       git worktree add wt1 -b shared &&
+       git worktree add wt2 -f shared &&
+       # we test in both worktrees to ensure that works
+       # as expected with "first" and "next" worktrees
+       test_bisect_reset wt1 &&
+       test_bisect_reset wt2
+'
+
 test_expect_success 'bisect reset: back in the main branch' '
        git bisect reset &&
        echo "* main" > branch.expect &&
index 9a35e783a757b6fe9800ce475e65e73b880708c7..c9afcef2018b052a81600487c33846e2917c982f 100755 (executable)
@@ -657,4 +657,10 @@ test_expect_success 'setup: describe commits with disjoint bases 2' '
 
 check_describe -C disjoint2 "B-3-gHASH" HEAD
 
+test_expect_success 'setup misleading taggerdates' '
+       GIT_COMMITTER_DATE="2006-12-12 12:31" git tag -a -m "another tag" newer-tag-older-commit unique-file~1
+'
+
+check_describe newer-tag-older-commit~1 --contains unique-file~2
+
 test_done
index cada952f9aee35fe795af5cd99af222f1a8b599f..9fdafeb1e907f4381f2b1e74c6c00771d188d136 100755 (executable)
@@ -293,11 +293,7 @@ test_expect_success 'add with all negative' '
        test_cmp expect actual
 '
 
-test_lazy_prereq ADD_I_USE_BUILTIN_OR_PERL '
-       test_have_prereq ADD_I_USE_BUILTIN || test_have_prereq PERL
-'
-
-test_expect_success ADD_I_USE_BUILTIN_OR_PERL 'add -p with all negative' '
+test_expect_success 'add -p with all negative' '
        H=$(git rev-parse HEAD) &&
        git reset --hard $H &&
        git clean -f &&
index 52cf0c87690be83e758b97c12b0ab00fa77613a2..0cbec57cdabc48b7cd952a6fbf5458391b44a645 100755 (executable)
@@ -5,6 +5,7 @@ test_description='unpack-trees error messages'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
index 10662456aeef411141e60245391c50dad2545bfe..3968b47ed53b7e55eab26fdf8e34aa1472a1bf78 100755 (executable)
@@ -28,6 +28,7 @@ test_description='check pruning of dependent objects'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We care about reachability, so we do not want to use
index 36eb86a4b19f3c758b2830fe5157a1667069321a..20913b371344264a6dc9c84b58c3b6de3b46e226 100755 (executable)
@@ -200,4 +200,14 @@ test_expect_success GPGSSH 'verifying a forged tag with --format should fail sil
        test_must_be_empty actual-forged
 '
 
+test_expect_success GPGSSH 'rev-list --format=%G' '
+       test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
+       git rev-list -1 --format="%G? %H" sixth-signed >actual &&
+       cat >expect <<-EOF &&
+       commit $(git rev-parse sixth-signed^0)
+       G $(git rev-parse sixth-signed^0)
+       EOF
+       test_cmp expect actual
+'
+
 test_done
index fc2a6cf5c7a49a7971e23213d4d324799c2f92c9..9b46da7aaa7e59c08bf799262a21056fe7417d86 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='git reset --patch'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-patch-mode.sh
 
 test_expect_success PERL 'setup' '
index ecb85c3b823275efc68fb64643a4304a3cbf28b2..a0b67a0b843b3411de060ca9f4e507e59d516dd2 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='git reset should work on unborn branch'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index 523efbecde1dff517ffebf3c04cfcf74ea280f15..af5ea406db3bf5748d3cf1a1ae16abd3b6fd9363 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='reset --pathspec-from-file'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
index a07e8b86de2014fd24bcb4692a744f147ef07787..d82a3210a1db48288c54ce3c06d430546da70f48 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='git clean -i basic tests'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
index ebeca12a71115f60d10fa3ffa4725b1c7080f6f0..2b3c363078bc06219c8b5c16b02f331b447f5102 100755 (executable)
@@ -5,6 +5,7 @@
 
 test_description='Test rebasing, stashing, etc. with submodules'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
@@ -55,12 +56,15 @@ chmod a+x fake-editor.sh
 
 test_expect_success 'interactive rebase with a dirty submodule' '
 
-       test submodule = $(git diff --name-only) &&
+       echo submodule >expect &&
+       git diff --name-only >actual &&
+       test_cmp expect actual &&
        HEAD=$(git rev-parse HEAD) &&
        GIT_EDITOR="\"$(pwd)/fake-editor.sh\"" EDITOR_TEXT="pick $HEAD" \
                git rebase -i HEAD^ &&
-       test submodule = $(git diff --name-only)
-
+       echo submodule >expect &&
+       git diff --name-only >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'rebase with dirty file and submodule fails' '
@@ -82,11 +86,19 @@ test_expect_success 'stash with a dirty submodule' '
        CURRENT=$(cd submodule && git rev-parse HEAD) &&
        git stash &&
        test new != $(cat file) &&
-       test submodule = $(git diff --name-only) &&
-       test $CURRENT = $(cd submodule && git rev-parse HEAD) &&
+       echo submodule >expect &&
+       git diff --name-only >actual &&
+       test_cmp expect actual &&
+
+       echo "$CURRENT" >expect &&
+       git -C submodule rev-parse HEAD >actual &&
+       test_cmp expect actual &&
+
        git stash apply &&
        test new = $(cat file) &&
-       test $CURRENT = $(cd submodule && git rev-parse HEAD)
+       echo "$CURRENT" >expect &&
+       git -C submodule rev-parse HEAD >actual &&
+       test_cmp expect actual
 
 '
 
index ea92ef52a5eb9c593039614a6e42fa308a68b852..ff09443a0a4b0a5a4fdf1e14adc7e5d964a14dd6 100755 (executable)
@@ -11,6 +11,7 @@ These tests exercise the "git submodule sync" subcommand.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 374ed481e9c64b9813a11b57c80f7b6f22c791e1..574a6fc526ea0c22ed2ca9df925854235632bb42 100755 (executable)
@@ -13,6 +13,7 @@ TEST_NO_CREATE_REPO=1
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index 3ebd98598144c95165cc75870e6d586407add1c8..7cf72b9a07671c671c5ed7bbe275125ee7c142e6 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='check handling of disallowed .gitmodule urls'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index ba1f569bcbbdc613c768bd34e7de6e560b809c9d..0d0c3f2c683122dbf611cd0ac57bce86166acab3 100755 (executable)
@@ -12,6 +12,8 @@ Such as:
 
   - symlinked .gitmodules, etc
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-pack.sh
 
index 07ca46fb0d539c62c7dcbe066b8c95e550d0b3a3..d1255228d5ffaa2b7b7333000e3e39468ee94bb1 100755 (executable)
@@ -102,7 +102,9 @@ test_expect_success 'setup: commit-msg hook that always fails' '
 '
 
 commit_msg_is () {
-       test "$(git log --pretty=format:%s%b -1)" = "$1"
+       printf "%s" "$1" >expect &&
+       git log --pretty=format:%s%b -1 >actual &&
+       test_cmp expect actual
 }
 
 test_expect_success 'with failing hook' '
index bc7a31ba3e7fc4c0611c23f60470fcb392cdd424..48f86cb3678140ba1b0f914da8ebb442abd754b8 100755 (executable)
@@ -387,4 +387,48 @@ test_expect_success GPG 'verify-commit verifies multiply signed commits' '
        ! grep "BAD signature from" actual
 '
 
+test_expect_success 'custom `gpg.program`' '
+       write_script fake-gpg <<-\EOF &&
+       args="$*"
+
+       # skip uninteresting options
+       while case "$1" in
+       --status-fd=*|--keyid-format=*) ;; # skip
+       *) break;;
+       esac; do shift; done
+
+       case "$1" in
+       -bsau)
+               test -z "$LET_GPG_PROGRAM_FAIL" || {
+                       echo "zOMG signing failed!" >&2
+                       exit 1
+               }
+               cat >sign.file
+               echo "[GNUPG:] SIG_CREATED $args" >&2
+               echo "-----BEGIN PGP MESSAGE-----"
+               echo "$args"
+               echo "-----END PGP MESSAGE-----"
+               ;;
+       --verify)
+               cat "$2" >verify.file
+               exit 0
+               ;;
+       *)
+               echo "Unhandled args: $*" >&2
+               exit 1
+               ;;
+       esac
+       EOF
+
+       test_config gpg.program "$(pwd)/fake-gpg" &&
+       git commit -S --allow-empty -m signed-commit &&
+       test_path_exists sign.file &&
+       git show --show-signature &&
+       test_path_exists verify.file &&
+
+       test_must_fail env LET_GPG_PROGRAM_FAIL=1 \
+       git commit -S --allow-empty -m must-fail 2>err &&
+       grep zOMG err
+'
+
 test_done
index f2ce14e9071c0a3b071f53186c2d311103883443..2d38a16480e82c0441075e0e54ffe8454b413cb2 100755 (executable)
@@ -10,7 +10,8 @@ test_expect_success 'race to create orphan commit' '
        test_must_fail env EDITOR=./hare-editor git commit --allow-empty -m tortoise -e &&
        git show -s --pretty=format:%s >subject &&
        grep hare subject &&
-       test -z "$(git show -s --pretty=format:%P)"
+       git show -s --pretty=format:%P >out &&
+       test_must_be_empty out
 '
 
 test_expect_success 'race to create non-orphan commit' '
index 61330f71b1749c92a79153a3fce4f1834bfed248..f5c90cc22a1bba33368634c3679d2ea26cbc36bf 100755 (executable)
@@ -4,6 +4,7 @@ test_description='merge signature verification tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
index b7ac4f598a85c47b360b50726ca3d7b04840ff96..ebb267855fe06a0cfb3fa9a4d1cc21157f832d1d 100755 (executable)
@@ -5,6 +5,7 @@ test_description='git repack works correctly'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 fsha1=
index 8eded6ab274fafe636151b7903bae3351a27df5c..39d6d713ecbe05e9638f8f6ee3f79ff49628b2cf 100755 (executable)
@@ -1001,7 +1001,9 @@ test_expect_success 'log --committer does not search in timestamp' '
 test_expect_success 'grep with CE_VALID file' '
        git update-index --assume-unchanged t/t &&
        rm t/t &&
-       test "$(git grep test)" = "t/t:test" &&
+       echo "t/t:test" >expect &&
+       git grep test >actual &&
+       test_cmp expect actual &&
        git update-index --no-assume-unchanged t/t &&
        git checkout t/t
 '
index 3cab0b9720a6544ade5caf91a3f678ad577cc3b0..bca496c40e0a22011465083d6b36aa32e48e86b5 100755 (executable)
@@ -3,7 +3,6 @@
 # Copyright (c) 2006 Eric Wong
 test_description='git svn commit-diff clobber'
 
-TEST_FAILS_SANITIZE_LEAK=true
 . ./lib-git-svn.sh
 
 test_expect_success 'initialize repo' '
index 1465156072e32a75fb759784e65f9f7e2ca4c84a..c8e6c0733f41cf90a41941a3ad3550efb7ea56f1 100755 (executable)
@@ -5,7 +5,6 @@
 
 test_description='concurrent git svn dcommit'
 
-TEST_FAILS_SANITIZE_LEAK=true
 . ./lib-git-svn.sh
 
 
index b105d6d9d57722bc7101e45b6726aef3da6b7d5c..ccc8212d732e22170ed74ada1510a72a71d7aaf7 100755 (executable)
@@ -13,37 +13,36 @@ skip_all_if_no_Test_More
 
 # set up test repository
 
-test_expect_success \
-    'set up test repository' \
-    'echo "test file 1" > file1 &&
-     echo "test file 2" > file2 &&
-     mkdir directory1 &&
-     echo "in directory1" >> directory1/file &&
-     mkdir directory2 &&
-     echo "in directory2" >> directory2/file &&
-     git add . &&
-     git commit -m "first commit" &&
-
-     echo "new file in subdir 2" > directory2/file2 &&
-     git add . &&
-     git commit -m "commit in directory2" &&
-
-     echo "changed file 1" > file1 &&
-     git commit -a -m "second commit" &&
-
-     git config --add color.test.slot1 green &&
-     git config --add test.string value &&
-     git config --add test.dupstring value1 &&
-     git config --add test.dupstring value2 &&
-     git config --add test.booltrue true &&
-     git config --add test.boolfalse no &&
-     git config --add test.boolother other &&
-     git config --add test.int 2k &&
-     git config --add test.path "~/foo" &&
-     git config --add test.pathexpanded "$HOME/foo" &&
-     git config --add test.pathmulti foo &&
-     git config --add test.pathmulti bar
-     '
+test_expect_success 'set up test repository' '
+       echo "test file 1" >file1 &&
+       echo "test file 2" >file2 &&
+       mkdir directory1 &&
+       echo "in directory1" >>directory1/file &&
+       mkdir directory2 &&
+       echo "in directory2" >>directory2/file &&
+       git add . &&
+       git commit -m "first commit" &&
+
+       echo "new file in subdir 2" >directory2/file2 &&
+       git add . &&
+       git commit -m "commit in directory2" &&
+
+       echo "changed file 1" >file1 &&
+       git commit -a -m "second commit" &&
+
+       git config --add color.test.slot1 green &&
+       git config --add test.string value &&
+       git config --add test.dupstring value1 &&
+       git config --add test.dupstring value2 &&
+       git config --add test.booltrue true &&
+       git config --add test.boolfalse no &&
+       git config --add test.boolother other &&
+       git config --add test.int 2k &&
+       git config --add test.path "~/foo" &&
+       git config --add test.pathexpanded "$HOME/foo" &&
+       git config --add test.pathmulti foo &&
+       git config --add test.pathmulti bar
+'
 
 test_expect_success 'set up bare repository' '
        git init --bare bare.git
index d459fae6551bd7b5812f8b76a5faae8ebd4075df..d667dda654e2de7f32d5f7d065f6eac59ca9fdbf 100755 (executable)
@@ -13,10 +13,10 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . "$GIT_BUILD_DIR/contrib/completion/git-prompt.sh"
 
 actual="$TRASH_DIRECTORY/actual"
-c_red='\\[\\e[31m\\]'
-c_green='\\[\\e[32m\\]'
-c_lblue='\\[\\e[1;34m\\]'
-c_clear='\\[\\e[0m\\]'
+c_red='\001\e[31m\002'
+c_green='\001\e[32m\002'
+c_lblue='\001\e[1;34m\002'
+c_clear='\001\e[0m\002'
 
 test_expect_success 'setup for prompt tests' '
        git init otherrepo &&
index 75b8ee95e7f2454732c0aa27070292ac7a8f9985..999d46fafe783134aa921c6316f3f6b0a58c5d7f 100644 (file)
@@ -32,6 +32,14 @@ test_set_editor () {
        export EDITOR
 }
 
+# Like test_set_editor but sets GIT_SEQUENCE_EDITOR instead of EDITOR
+test_set_sequence_editor () {
+       FAKE_SEQUENCE_EDITOR="$1"
+       export FAKE_SEQUENCE_EDITOR
+       GIT_SEQUENCE_EDITOR='"$FAKE_SEQUENCE_EDITOR"'
+       export GIT_SEQUENCE_EDITOR
+}
+
 test_decode_color () {
        awk '
                function name(n) {
@@ -1767,6 +1775,14 @@ test_region () {
        return 0
 }
 
+# Given a GIT_TRACE2_EVENT log over stdin, writes to stdout a list of URLs
+# sent to git-remote-https child processes.
+test_remote_https_urls() {
+       grep -e '"event":"child_start".*"argv":\["git-remote-https",".*"\]' |
+               sed -e 's/{"event":"child_start".*"argv":\["git-remote-https","//g' \
+                   -e 's/"\]}//g'
+}
+
 # Print the destination of symlink(s) provided as arguments. Basically
 # the same as the readlink command, but it's not available everywhere.
 test_readlink () {
index 01e88781dd28582bf2e13f17cf6e3d804fd0603d..62136caee5a961f1eb4569f2a92a2feef97fb18c 100644 (file)
@@ -645,12 +645,6 @@ u200c=$(printf '\342\200\214')
 
 export _x05 _x35 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
 
-# Each test should start with something like this, after copyright notices:
-#
-# test_description='Description of this test...
-# This test checks if command xyzzy does the right thing...
-# '
-# . ./test-lib.sh
 test "x$TERM" != "xdumb" && (
                test -t 1 &&
                tput bold >/dev/null 2>&1 &&
@@ -1937,10 +1931,6 @@ test_lazy_prereq SHA1 '
        esac
 '
 
-test_lazy_prereq ADD_I_USE_BUILTIN '
-       test_bool_env GIT_TEST_ADD_I_USE_BUILTIN true
-'
-
 # Ensure that no test accidentally triggers a Git command
 # that runs the actual maintenance scheduler, affecting a user's
 # system permanently.
diff --git a/tag.c b/tag.c
index dfbcd7fcc244ac2500d41655afac3136758bb331..18b718cca666e1ecdd8520e6fc3e3e5ff9031df2 100644 (file)
--- a/tag.c
+++ b/tag.c
@@ -6,6 +6,7 @@
 #include "blob.h"
 #include "alloc.h"
 #include "gpg-interface.h"
+#include "hex.h"
 #include "packfile.h"
 
 const char *tag_type = "tag";
index 532984569132de11f6f05b561f817817523a3468..1f89ffab4c32bc02b5d955851401628a5b9a540e 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "thread-utils.h"
 
 #if defined(hpux) || defined(__hpux) || defined(_hpux)
diff --git a/trace.c b/trace.c
index 794a087c21e100e147665181a592bc811b3c1265..efa4e2d8e08fcbcd3bf3dfa7c8364a7c06def5e4 100644 (file)
--- a/trace.c
+++ b/trace.c
@@ -291,10 +291,9 @@ static const char *quote_crnl(const char *path)
        return new_path.buf;
 }
 
-/* FIXME: move prefix to startup_info struct and get rid of this arg */
-void trace_repo_setup(const char *prefix)
+void trace_repo_setup(void)
 {
-       const char *git_work_tree;
+       const char *git_work_tree, *prefix = startup_info->prefix;
        char *cwd;
 
        if (!trace_want(&trace_setup_key))
@@ -305,7 +304,7 @@ void trace_repo_setup(const char *prefix)
        if (!(git_work_tree = get_git_work_tree()))
                git_work_tree = "(null)";
 
-       if (!prefix)
+       if (!startup_info->prefix)
                prefix = "(null)";
 
        trace_printf_key(&trace_setup_key, "setup: git_dir: %s\n", quote_crnl(get_git_dir()));
diff --git a/trace.h b/trace.h
index 4e771f86ac289ada2f5b97eb4013ef313fbb3cbf..d304d55aa1d706dc3f65bbf15c7b2506bc0e9499 100644 (file)
--- a/trace.h
+++ b/trace.h
@@ -1,7 +1,6 @@
 #ifndef TRACE_H
 #define TRACE_H
 
-#include "git-compat-util.h"
 #include "strbuf.h"
 
 /**
@@ -93,7 +92,7 @@ extern struct trace_key trace_default_key;
 extern struct trace_key trace_perf_key;
 extern struct trace_key trace_setup_key;
 
-void trace_repo_setup(const char *prefix);
+void trace_repo_setup(void);
 
 /**
  * Checks whether the trace key is enabled. Used to prevent expensive
index 279bddf53b4804c9a8f51b453c59f184976cc31e..e8ba62c0c3dc8293bd973f7d5c39d024f5eb85f7 100644 (file)
--- a/trace2.c
+++ b/trace2.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "json-writer.h"
 #include "quote.h"
@@ -6,6 +6,7 @@
 #include "sigchain.h"
 #include "thread-utils.h"
 #include "version.h"
+#include "trace.h"
 #include "trace2/tr2_cfg.h"
 #include "trace2/tr2_cmd_name.h"
 #include "trace2/tr2_ctr.h"
index 483ca7c308fa216055c1a6de293a1bfbf9de0bb2..b342d3b1a3c033bf539037bb5035ae57af119d6d 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "thread-utils.h"
 #include "trace2/tr2_tgt.h"
 #include "trace2/tr2_tls.h"
index dc6e75ef13151fe011c738f8e3dbe706e24c4773..5f1ce6f85cf9cd748517f94f02ab47976febf50d 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "trace2/tr2_tbuf.h"
 #include "trace2/tr2_sid.h"
 
index a380dcf9105e8d7b0022b34508ca384923b2fcd6..069786cb9274f6ab25324386730962503b834525 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "dir.h"
 #include "tr2_sysenv.h"
index 2498482d9ad82a29b2e734b0d726599d594a20c6..c3b3822ed7e4af449adeb0af9b5e512cefdd4779 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "tr2_tbuf.h"
 
 void tr2_tbuf_local_time(struct tr2_tbuf *tb)
index 16f6332755e0d6497643a32d046459b262c01294..9e7aab6d510e1205a15ba6cccb552c670ea8b689 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "json-writer.h"
 #include "run-command.h"
index fbbef68dfc01a546240384fbf12582ccb9d64c54..8672c2c2d04c33d70a730119c196649534439446 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "run-command.h"
 #include "quote.h"
index adae8032639016a90cca56175e5cd59ea21d4e27..3f2b2d53118f0820db816d1350413a9f06e7e58d 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "run-command.h"
 #include "quote.h"
index 04900bb4c3a88cb43e5a79f7d6554e2236e52db8..9f46ae12f50f3ac9530db2d53879b03742f769fe 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "thread-utils.h"
+#include "trace.h"
 #include "trace2/tr2_tls.h"
 
 /*
index 786762dfd26ffc477dec6317178a51435615ea05..31d0e4d1bd1220ea0c9d9b204223766235d81e07 100644 (file)
@@ -1,8 +1,9 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "thread-utils.h"
 #include "trace2/tr2_tgt.h"
 #include "trace2/tr2_tls.h"
 #include "trace2/tr2_tmr.h"
+#include "trace.h"
 
 #define MY_MAX(a, b) ((a) > (b) ? (a) : (b))
 #define MY_MIN(a, b) ((a) < (b) ? (a) : (b))
index 0fd5b142a377056d1e45f8dfd1ff6ae7a9c40097..72c3fed5c6e89c758c761eff4c9bb80158b88fa7 100644 (file)
--- a/trailer.c
+++ b/trailer.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "alloc.h"
 #include "config.h"
 #include "string-list.h"
 #include "run-command.h"
index 3ea7c2bb5ad8c462ae0f54c9466af210bc27d0c2..82ac63e260949fc518f358ccf70e69218dbee047 100644 (file)
@@ -4,6 +4,7 @@
 #include "run-command.h"
 #include "commit.h"
 #include "diff.h"
+#include "hex.h"
 #include "revision.h"
 #include "remote.h"
 #include "string-list.h"
index 77a61a9d7bb06a5cfc7992c6fc4f9f3aa8a8ada5..fa9bc3be0850648b28c4ede889d956326fc9fe45 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
+#include "hex.h"
 #include "transport.h"
 #include "hook.h"
 #include "pkt-line.h"
@@ -10,6 +12,7 @@
 #include "walker.h"
 #include "bundle.h"
 #include "dir.h"
+#include "gettext.h"
 #include "refs.h"
 #include "refspec.h"
 #include "branch.h"
@@ -276,8 +279,12 @@ static int connect_setup(struct transport *transport, int for_push)
        }
 
        data->conn = git_connect(data->fd, transport->url,
-                                for_push ? data->options.receivepack :
-                                data->options.uploadpack,
+                                for_push ?
+                                       "git-receive-pack" :
+                                       "git-upload-pack",
+                                for_push ?
+                                       data->options.receivepack :
+                                       data->options.uploadpack,
                                 flags);
 
        return 0;
@@ -911,7 +918,7 @@ static int connect_git(struct transport *transport, const char *name,
 {
        struct git_transport_data *data = transport->data;
        data->conn = git_connect(data->fd, transport->url,
-                                executable, 0);
+                                name, executable, 0);
        fd[0] = data->fd[0];
        fd[1] = data->fd[1];
        return 0;
index 74f4d710e8f0f28410fae49a6b9c31bf1045e0ca..0e2f5ceb71db51ac846c500efe99ced9a5244855 100644 (file)
@@ -1,6 +1,8 @@
 #include "cache.h"
 #include "tree-walk.h"
+#include "alloc.h"
 #include "dir.h"
+#include "hex.h"
 #include "object-store.h"
 #include "tree.h"
 #include "pathspec.h"
index 6305d531503f25cd0b2632914d9aa7ddea55ff8e..25fe27e352961f3747ea5d4391cff1b242a127b6 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef TREE_WALK_H
 #define TREE_WALK_H
 
-#include "cache.h"
+#include "hash.h"
+
+struct index_state;
 
 #define MAX_TRAVERSE_TREES 8
 
diff --git a/tree.c b/tree.c
index 410e3b477e557f55ad6843e1106567a3fd155557..76a6534f67841026c675a36a55bcb62889d187ca 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "cache-tree.h"
+#include "hex.h"
 #include "tree.h"
 #include "object-store.h"
 #include "blob.h"
index 97c851b27df4a7ea2bc33362a9d2f9dce38c0522..e15fb0455bbd9d6b5fa113ec9bb5cea4f6b6d375 100644 (file)
@@ -94,7 +94,7 @@ static const struct interval zero_width[] = {
 { 0x0E47, 0x0E4E },
 { 0x0EB1, 0x0EB1 },
 { 0x0EB4, 0x0EBC },
-{ 0x0EC8, 0x0ECD },
+{ 0x0EC8, 0x0ECE },
 { 0x0F18, 0x0F19 },
 { 0x0F35, 0x0F35 },
 { 0x0F37, 0x0F37 },
@@ -228,6 +228,7 @@ static const struct interval zero_width[] = {
 { 0x10AE5, 0x10AE6 },
 { 0x10D24, 0x10D27 },
 { 0x10EAB, 0x10EAC },
+{ 0x10EFD, 0x10EFF },
 { 0x10F46, 0x10F50 },
 { 0x10F82, 0x10F85 },
 { 0x11001, 0x11001 },
@@ -252,6 +253,7 @@ static const struct interval zero_width[] = {
 { 0x11234, 0x11234 },
 { 0x11236, 0x11237 },
 { 0x1123E, 0x1123E },
+{ 0x11241, 0x11241 },
 { 0x112DF, 0x112DF },
 { 0x112E3, 0x112EA },
 { 0x11300, 0x11301 },
@@ -313,7 +315,12 @@ static const struct interval zero_width[] = {
 { 0x11D95, 0x11D95 },
 { 0x11D97, 0x11D97 },
 { 0x11EF3, 0x11EF4 },
-{ 0x13430, 0x13438 },
+{ 0x11F00, 0x11F01 },
+{ 0x11F36, 0x11F3A },
+{ 0x11F40, 0x11F40 },
+{ 0x11F42, 0x11F42 },
+{ 0x13430, 0x13440 },
+{ 0x13447, 0x13455 },
 { 0x16AF0, 0x16AF4 },
 { 0x16B30, 0x16B36 },
 { 0x16F4F, 0x16F4F },
@@ -339,9 +346,11 @@ static const struct interval zero_width[] = {
 { 0x1E01B, 0x1E021 },
 { 0x1E023, 0x1E024 },
 { 0x1E026, 0x1E02A },
+{ 0x1E08F, 0x1E08F },
 { 0x1E130, 0x1E136 },
 { 0x1E2AE, 0x1E2AE },
 { 0x1E2EC, 0x1E2EF },
+{ 0x1E4EC, 0x1E4EF },
 { 0x1E8D0, 0x1E8D6 },
 { 0x1E944, 0x1E94A },
 { 0xE0001, 0xE0001 },
@@ -417,7 +426,9 @@ static const struct interval double_width[] = {
 { 0x1AFF5, 0x1AFFB },
 { 0x1AFFD, 0x1AFFE },
 { 0x1B000, 0x1B122 },
+{ 0x1B132, 0x1B132 },
 { 0x1B150, 0x1B152 },
+{ 0x1B155, 0x1B155 },
 { 0x1B164, 0x1B167 },
 { 0x1B170, 0x1B2FB },
 { 0x1F004, 0x1F004 },
@@ -451,7 +462,7 @@ static const struct interval double_width[] = {
 { 0x1F6CC, 0x1F6CC },
 { 0x1F6D0, 0x1F6D2 },
 { 0x1F6D5, 0x1F6D7 },
-{ 0x1F6DD, 0x1F6DF },
+{ 0x1F6DC, 0x1F6DF },
 { 0x1F6EB, 0x1F6EC },
 { 0x1F6F4, 0x1F6FC },
 { 0x1F7E0, 0x1F7EB },
@@ -459,15 +470,13 @@ static const struct interval double_width[] = {
 { 0x1F90C, 0x1F93A },
 { 0x1F93C, 0x1F945 },
 { 0x1F947, 0x1F9FF },
-{ 0x1FA70, 0x1FA74 },
-{ 0x1FA78, 0x1FA7C },
-{ 0x1FA80, 0x1FA86 },
-{ 0x1FA90, 0x1FAAC },
-{ 0x1FAB0, 0x1FABA },
-{ 0x1FAC0, 0x1FAC5 },
-{ 0x1FAD0, 0x1FAD9 },
-{ 0x1FAE0, 0x1FAE7 },
-{ 0x1FAF0, 0x1FAF6 },
+{ 0x1FA70, 0x1FA7C },
+{ 0x1FA80, 0x1FA88 },
+{ 0x1FA90, 0x1FABD },
+{ 0x1FABF, 0x1FAC5 },
+{ 0x1FACE, 0x1FADB },
+{ 0x1FAE0, 0x1FAE8 },
+{ 0x1FAF0, 0x1FAF8 },
 { 0x20000, 0x2FFFD },
 { 0x30000, 0x3FFFD }
 };
index e0be1badb58dee8af8e28c4a4486bf0fdba18a9c..79800d80636fc57fa8cc2696e33013c1c29e86b3 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "strbuf.h"
 #include "unix-socket.h"
 
 #define DEFAULT_UNIX_STREAM_LISTEN_BACKLOG (5)
index efa2a207abcd42021fcae682da1d7e5afbc856fa..22ac2373e0788d9a0c7f377b86a756e5ef4ee518 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "lockfile.h"
 #include "unix-socket.h"
 #include "unix-stream-server.h"
index 3d05e45a279b0b0231da5d9a5829c76818af18bd..a75fb9f05b4775e8135436a8f915b1a310cad5b6 100644 (file)
@@ -3,6 +3,7 @@
 #include "repository.h"
 #include "config.h"
 #include "dir.h"
+#include "hex.h"
 #include "tree.h"
 #include "tree-walk.h"
 #include "cache-tree.h"
@@ -66,8 +67,8 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_WARNING_TYPES] = {
 };
 
 #define ERRORMSG(o,type) \
-       ( ((o) && (o)->msgs[(type)]) \
-         ? ((o)->msgs[(type)])      \
+       ( ((o) && (o)->internal.msgs[(type)]) \
+         ? ((o)->internal.msgs[(type)])      \
          : (unpack_plumbing_errors[(type)]) )
 
 static const char *super_prefixed(const char *path, const char *super_prefix)
@@ -108,10 +109,10 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
                                  const char *cmd)
 {
        int i;
-       const char **msgs = opts->msgs;
+       const char **msgs = opts->internal.msgs;
        const char *msg;
 
-       strvec_init(&opts->msgs_to_free);
+       strvec_init(&opts->internal.msgs_to_free);
 
        if (!strcmp(cmd, "checkout"))
                msg = advice_enabled(ADVICE_COMMIT_BEFORE_MERGE)
@@ -129,7 +130,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
                          "Please commit your changes or stash them before you %s.")
                      : _("Your local changes to the following files would be overwritten by %s:\n%%s");
        msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =
-               strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd);
+               strvec_pushf(&opts->internal.msgs_to_free, msg, cmd, cmd);
 
        msgs[ERROR_NOT_UPTODATE_DIR] =
                _("Updating the following directories would lose untracked files in them:\n%s");
@@ -153,7 +154,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
                          "Please move or remove them before you %s.")
                      : _("The following untracked working tree files would be removed by %s:\n%%s");
        msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] =
-               strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd);
+               strvec_pushf(&opts->internal.msgs_to_free, msg, cmd, cmd);
 
        if (!strcmp(cmd, "checkout"))
                msg = advice_enabled(ADVICE_COMMIT_BEFORE_MERGE)
@@ -171,7 +172,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
                          "Please move or remove them before you %s.")
                      : _("The following untracked working tree files would be overwritten by %s:\n%%s");
        msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] =
-               strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd);
+               strvec_pushf(&opts->internal.msgs_to_free, msg, cmd, cmd);
 
        /*
         * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we
@@ -189,16 +190,16 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
        msgs[WARNING_SPARSE_ORPHANED_NOT_OVERWRITTEN] =
                _("The following paths were already present and thus not updated despite sparse patterns:\n%s");
 
-       opts->show_all_errors = 1;
+       opts->internal.show_all_errors = 1;
        /* rejected paths may not have a static buffer */
-       for (i = 0; i < ARRAY_SIZE(opts->unpack_rejects); i++)
-               opts->unpack_rejects[i].strdup_strings = 1;
+       for (i = 0; i < ARRAY_SIZE(opts->internal.unpack_rejects); i++)
+               opts->internal.unpack_rejects[i].strdup_strings = 1;
 }
 
 void clear_unpack_trees_porcelain(struct unpack_trees_options *opts)
 {
-       strvec_clear(&opts->msgs_to_free);
-       memset(opts->msgs, 0, sizeof(opts->msgs));
+       strvec_clear(&opts->internal.msgs_to_free);
+       memset(opts->internal.msgs, 0, sizeof(opts->internal.msgs));
 }
 
 static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
@@ -210,7 +211,7 @@ static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
                set |= CE_WT_REMOVE;
 
        ce->ce_flags = (ce->ce_flags & ~clear) | set;
-       return add_index_entry(&o->result, ce,
+       return add_index_entry(&o->internal.result, ce,
                               ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
 }
 
@@ -218,7 +219,7 @@ static void add_entry(struct unpack_trees_options *o,
                      const struct cache_entry *ce,
                      unsigned int set, unsigned int clear)
 {
-       do_add_entry(o, dup_cache_entry(ce, &o->result), set, clear);
+       do_add_entry(o, dup_cache_entry(ce, &o->internal.result), set, clear);
 }
 
 /*
@@ -233,7 +234,7 @@ static int add_rejected_path(struct unpack_trees_options *o,
        if (o->quiet)
                return -1;
 
-       if (!o->show_all_errors)
+       if (!o->internal.show_all_errors)
                return error(ERRORMSG(o, e), super_prefixed(path,
                                                            o->super_prefix));
 
@@ -241,7 +242,7 @@ static int add_rejected_path(struct unpack_trees_options *o,
         * Otherwise, insert in a list for future display by
         * display_(error|warning)_msgs()
         */
-       string_list_append(&o->unpack_rejects[e], path);
+       string_list_append(&o->internal.unpack_rejects[e], path);
        return -1;
 }
 
@@ -253,7 +254,7 @@ static void display_error_msgs(struct unpack_trees_options *o)
        int e;
        unsigned error_displayed = 0;
        for (e = 0; e < NB_UNPACK_TREES_ERROR_TYPES; e++) {
-               struct string_list *rejects = &o->unpack_rejects[e];
+               struct string_list *rejects = &o->internal.unpack_rejects[e];
 
                if (rejects->nr > 0) {
                        int i;
@@ -281,7 +282,7 @@ static void display_warning_msgs(struct unpack_trees_options *o)
        unsigned warning_displayed = 0;
        for (e = NB_UNPACK_TREES_ERROR_TYPES + 1;
             e < NB_UNPACK_TREES_WARNING_TYPES; e++) {
-               struct string_list *rejects = &o->unpack_rejects[e];
+               struct string_list *rejects = &o->internal.unpack_rejects[e];
 
                if (rejects->nr > 0) {
                        int i;
@@ -600,13 +601,14 @@ static void mark_ce_used(struct cache_entry *ce, struct unpack_trees_options *o)
 {
        ce->ce_flags |= CE_UNPACKED;
 
-       if (o->cache_bottom < o->src_index->cache_nr &&
-           o->src_index->cache[o->cache_bottom] == ce) {
-               int bottom = o->cache_bottom;
+       if (o->internal.cache_bottom < o->src_index->cache_nr &&
+           o->src_index->cache[o->internal.cache_bottom] == ce) {
+               int bottom = o->internal.cache_bottom;
+
                while (bottom < o->src_index->cache_nr &&
                       o->src_index->cache[bottom]->ce_flags & CE_UNPACKED)
                        bottom++;
-               o->cache_bottom = bottom;
+               o->internal.cache_bottom = bottom;
        }
 }
 
@@ -652,7 +654,7 @@ static void mark_ce_used_same_name(struct cache_entry *ce,
 static struct cache_entry *next_cache_entry(struct unpack_trees_options *o)
 {
        const struct index_state *index = o->src_index;
-       int pos = o->cache_bottom;
+       int pos = o->internal.cache_bottom;
 
        while (pos < index->cache_nr) {
                struct cache_entry *ce = index->cache[pos];
@@ -711,7 +713,7 @@ static void restore_cache_bottom(struct traverse_info *info, int bottom)
 
        if (o->diff_index_cached)
                return;
-       o->cache_bottom = bottom;
+       o->internal.cache_bottom = bottom;
 }
 
 static int switch_cache_bottom(struct traverse_info *info)
@@ -721,13 +723,13 @@ static int switch_cache_bottom(struct traverse_info *info)
 
        if (o->diff_index_cached)
                return 0;
-       ret = o->cache_bottom;
+       ret = o->internal.cache_bottom;
        pos = find_cache_pos(info->prev, info->name, info->namelen);
 
        if (pos < -1)
-               o->cache_bottom = -2 - pos;
+               o->internal.cache_bottom = -2 - pos;
        else if (pos < 0)
-               o->cache_bottom = o->src_index->cache_nr;
+               o->internal.cache_bottom = o->src_index->cache_nr;
        return ret;
 }
 
@@ -838,7 +840,7 @@ static int traverse_by_cache_tree(int pos, int nr_entries, int nr_names,
                mark_ce_used(src[0], o);
        }
        free(tree_ce);
-       if (o->debug_unpack)
+       if (o->internal.debug_unpack)
                printf("Unpacked %d entries from %s to %s using cache-tree\n",
                       nr_entries,
                       o->src_index->cache[pos]->name,
@@ -873,9 +875,9 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
                 * save and restore cache_bottom anyway to not miss
                 * unprocessed entries before 'pos'.
                 */
-               bottom = o->cache_bottom;
+               bottom = o->internal.cache_bottom;
                ret = traverse_by_cache_tree(pos, nr_entries, n, info);
-               o->cache_bottom = bottom;
+               o->internal.cache_bottom = bottom;
                return ret;
        }
 
@@ -1212,8 +1214,8 @@ static int unpack_single_entry(int n, unsigned long mask,
                 * cache entry from the index aware logic.
                 */
                src[i + o->merge] = create_ce_entry(info, names + i, stage,
-                                                   &o->result, o->merge,
-                                                   bit & dirmask);
+                                                   &o->internal.result,
+                                                   o->merge, bit & dirmask);
        }
 
        if (o->merge) {
@@ -1237,7 +1239,7 @@ static int unpack_single_entry(int n, unsigned long mask,
 
 static int unpack_failed(struct unpack_trees_options *o, const char *message)
 {
-       discard_index(&o->result);
+       discard_index(&o->internal.result);
        if (!o->quiet && !o->exiting_early) {
                if (message)
                        return error("%s", message);
@@ -1260,7 +1262,7 @@ static int find_cache_pos(struct traverse_info *info,
        struct index_state *index = o->src_index;
        int pfxlen = info->pathlen;
 
-       for (pos = o->cache_bottom; pos < index->cache_nr; pos++) {
+       for (pos = o->internal.cache_bottom; pos < index->cache_nr; pos++) {
                const struct cache_entry *ce = index->cache[pos];
                const char *ce_name, *ce_slash;
                int cmp, ce_len;
@@ -1271,8 +1273,8 @@ static int find_cache_pos(struct traverse_info *info,
                         * we can never match it; don't check it
                         * again.
                         */
-                       if (pos == o->cache_bottom)
-                               ++o->cache_bottom;
+                       if (pos == o->internal.cache_bottom)
+                               ++o->internal.cache_bottom;
                        continue;
                }
                if (!ce_in_traverse_path(ce, info)) {
@@ -1450,7 +1452,7 @@ static int unpack_sparse_callback(int n, unsigned long mask, unsigned long dirma
         */
        if (!is_null_oid(&names[0].oid)) {
                src[0] = create_ce_entry(info, &names[0], 0,
-                                       &o->result, 1,
+                                       &o->internal.result, 1,
                                        dirmask & (1ul << 0));
                src[0]->ce_flags |= (CE_SKIP_WORKTREE | CE_NEW_SKIP_WORKTREE);
        }
@@ -1487,7 +1489,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
        while (!p->mode)
                p++;
 
-       if (o->debug_unpack)
+       if (o->internal.debug_unpack)
                debug_unpack_callback(n, mask, dirmask, names, info);
 
        /* Are we supposed to look at the index too? */
@@ -1560,7 +1562,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
                                 * in 'mark_ce_used()'
                                 */
                                if (!src[0] || !S_ISSPARSEDIR(src[0]->ce_mode))
-                                       o->cache_bottom += matches;
+                                       o->internal.cache_bottom += matches;
                                return mask;
                        }
                }
@@ -1809,7 +1811,7 @@ static void populate_from_existing_patterns(struct unpack_trees_options *o,
        if (get_sparse_checkout_patterns(pl) < 0)
                o->skip_sparse_checkout = 1;
        else
-               o->pl = pl;
+               o->internal.pl = pl;
 }
 
 static void update_sparsity_for_prefix(const char *prefix,
@@ -1871,8 +1873,12 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
 
        if (len > MAX_UNPACK_TREES)
                die("unpack_trees takes at most %d trees", MAX_UNPACK_TREES);
-       if (o->dir)
-               BUG("o->dir is for internal use only");
+       if (o->internal.dir)
+               BUG("o->internal.dir is for internal use only");
+       if (o->internal.pl)
+               BUG("o->internal.pl is for internal use only");
+       if (o->df_conflict_entry)
+               BUG("o->df_conflict_entry is an output only field");
 
        trace_performance_enter();
        trace2_region_enter("unpack_trees", "unpack_trees", the_repository);
@@ -1889,9 +1895,9 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                BUG("UNPACK_RESET_OVERWRITE_UNTRACKED incompatible with preserved ignored files");
 
        if (!o->preserve_ignored) {
-               o->dir = &dir;
-               o->dir->flags |= DIR_SHOW_IGNORED;
-               setup_standard_excludes(o->dir);
+               o->internal.dir = &dir;
+               o->internal.dir->flags |= DIR_SHOW_IGNORED;
+               setup_standard_excludes(o->internal.dir);
        }
 
        if (o->prefix)
@@ -1899,49 +1905,50 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
 
        if (!core_apply_sparse_checkout || !o->update)
                o->skip_sparse_checkout = 1;
-       if (!o->skip_sparse_checkout && !o->pl) {
+       if (!o->skip_sparse_checkout) {
                memset(&pl, 0, sizeof(pl));
                free_pattern_list = 1;
                populate_from_existing_patterns(o, &pl);
        }
 
-       index_state_init(&o->result, o->src_index->repo);
-       o->result.initialized = 1;
-       o->result.timestamp.sec = o->src_index->timestamp.sec;
-       o->result.timestamp.nsec = o->src_index->timestamp.nsec;
-       o->result.version = o->src_index->version;
+       index_state_init(&o->internal.result, o->src_index->repo);
+       o->internal.result.initialized = 1;
+       o->internal.result.timestamp.sec = o->src_index->timestamp.sec;
+       o->internal.result.timestamp.nsec = o->src_index->timestamp.nsec;
+       o->internal.result.version = o->src_index->version;
        if (!o->src_index->split_index) {
-               o->result.split_index = NULL;
+               o->internal.result.split_index = NULL;
        } else if (o->src_index == o->dst_index) {
                /*
                 * o->dst_index (and thus o->src_index) will be discarded
-                * and overwritten with o->result at the end of this function,
-                * so just use src_index's split_index to avoid having to
-                * create a new one.
+                * and overwritten with o->internal.result at the end of
+                * this function, so just use src_index's split_index to
+                * avoid having to create a new one.
                 */
-               o->result.split_index = o->src_index->split_index;
-               o->result.split_index->refcount++;
+               o->internal.result.split_index = o->src_index->split_index;
+               o->internal.result.split_index->refcount++;
        } else {
-               o->result.split_index = init_split_index(&o->result);
+               o->internal.result.split_index =
+                       init_split_index(&o->internal.result);
        }
-       oidcpy(&o->result.oid, &o->src_index->oid);
-       o->merge_size = len;
+       oidcpy(&o->internal.result.oid, &o->src_index->oid);
+       o->internal.merge_size = len;
        mark_all_ce_unused(o->src_index);
 
-       o->result.fsmonitor_last_update =
+       o->internal.result.fsmonitor_last_update =
                xstrdup_or_null(o->src_index->fsmonitor_last_update);
-       o->result.fsmonitor_has_run_once = o->src_index->fsmonitor_has_run_once;
+       o->internal.result.fsmonitor_has_run_once = o->src_index->fsmonitor_has_run_once;
 
        if (!o->src_index->initialized &&
            !repo->settings.command_requires_full_index &&
-           is_sparse_index_allowed(&o->result, 0))
-               o->result.sparse_index = 1;
+           is_sparse_index_allowed(&o->internal.result, 0))
+               o->internal.result.sparse_index = 1;
 
        /*
         * Sparse checkout loop #1: set NEW_SKIP_WORKTREE on existing entries
         */
        if (!o->skip_sparse_checkout)
-               mark_new_skip_worktree(o->pl, o->src_index, 0,
+               mark_new_skip_worktree(o->internal.pl, o->src_index, 0,
                                       CE_NEW_SKIP_WORKTREE, o->verbose_update);
 
        if (!dfc)
@@ -1955,7 +1962,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                setup_traverse_info(&info, prefix);
                info.fn = unpack_callback;
                info.data = o;
-               info.show_all_errors = o->show_all_errors;
+               info.show_all_errors = o->internal.show_all_errors;
                info.pathspec = o->pathspec;
 
                if (o->prefix) {
@@ -1996,7 +2003,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
        }
        mark_all_ce_unused(o->src_index);
 
-       if (o->trivial_merges_only && o->nontrivial_merge) {
+       if (o->trivial_merges_only && o->internal.nontrivial_merge) {
                ret = unpack_failed(o, "Merge requires file-level merging");
                goto done;
        }
@@ -2007,13 +2014,13 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                 * If they will have NEW_SKIP_WORKTREE, also set CE_SKIP_WORKTREE
                 * so apply_sparse_checkout() won't attempt to remove it from worktree
                 */
-               mark_new_skip_worktree(o->pl, &o->result,
+               mark_new_skip_worktree(o->internal.pl, &o->internal.result,
                                       CE_ADDED, CE_SKIP_WORKTREE | CE_NEW_SKIP_WORKTREE,
                                       o->verbose_update);
 
                ret = 0;
-               for (i = 0; i < o->result.cache_nr; i++) {
-                       struct cache_entry *ce = o->result.cache[i];
+               for (i = 0; i < o->internal.result.cache_nr; i++) {
+                       struct cache_entry *ce = o->internal.result.cache[i];
 
                        /*
                         * Entries marked with CE_ADDED in merged_entry() do not have
@@ -2027,7 +2034,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                            verify_absent(ce, WARNING_SPARSE_ORPHANED_NOT_OVERWRITTEN, o))
                                ret = 1;
 
-                       if (apply_sparse_checkout(&o->result, ce, o))
+                       if (apply_sparse_checkout(&o->internal.result, ce, o))
                                ret = 1;
                }
                if (ret == 1) {
@@ -2035,46 +2042,47 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                         * Inability to sparsify or de-sparsify individual
                         * paths is not an error, but just a warning.
                         */
-                       if (o->show_all_errors)
+                       if (o->internal.show_all_errors)
                                display_warning_msgs(o);
                        ret = 0;
                }
        }
 
-       ret = check_updates(o, &o->result) ? (-2) : 0;
+       ret = check_updates(o, &o->internal.result) ? (-2) : 0;
        if (o->dst_index) {
-               move_index_extensions(&o->result, o->src_index);
+               move_index_extensions(&o->internal.result, o->src_index);
                if (!ret) {
                        if (git_env_bool("GIT_TEST_CHECK_CACHE_TREE", 0))
-                               cache_tree_verify(the_repository, &o->result);
+                               cache_tree_verify(the_repository,
+                                                 &o->internal.result);
                        if (!o->skip_cache_tree_update &&
-                           !cache_tree_fully_valid(o->result.cache_tree))
-                               cache_tree_update(&o->result,
+                           !cache_tree_fully_valid(o->internal.result.cache_tree))
+                               cache_tree_update(&o->internal.result,
                                                  WRITE_TREE_SILENT |
                                                  WRITE_TREE_REPAIR);
                }
 
-               o->result.updated_workdir = 1;
+               o->internal.result.updated_workdir = 1;
                discard_index(o->dst_index);
-               *o->dst_index = o->result;
+               *o->dst_index = o->internal.result;
        } else {
-               discard_index(&o->result);
+               discard_index(&o->internal.result);
        }
        o->src_index = NULL;
 
 done:
        if (free_pattern_list)
                clear_pattern_list(&pl);
-       if (o->dir) {
-               dir_clear(o->dir);
-               o->dir = NULL;
+       if (o->internal.dir) {
+               dir_clear(o->internal.dir);
+               o->internal.dir = NULL;
        }
        trace2_region_leave("unpack_trees", "unpack_trees", the_repository);
        trace_performance_leave("unpack_trees");
        return ret;
 
 return_failed:
-       if (o->show_all_errors)
+       if (o->internal.show_all_errors)
                display_error_msgs(o);
        mark_all_ce_unused(o->src_index);
        ret = unpack_failed(o, NULL);
@@ -2089,16 +2097,17 @@ return_failed:
  *
  * CE_NEW_SKIP_WORKTREE is used internally.
  */
-enum update_sparsity_result update_sparsity(struct unpack_trees_options *o)
+enum update_sparsity_result update_sparsity(struct unpack_trees_options *o,
+                                           struct pattern_list *pl)
 {
        enum update_sparsity_result ret = UPDATE_SPARSITY_SUCCESS;
-       struct pattern_list pl;
        int i;
        unsigned old_show_all_errors;
        int free_pattern_list = 0;
 
-       old_show_all_errors = o->show_all_errors;
-       o->show_all_errors = 1;
+       old_show_all_errors = o->internal.show_all_errors;
+       o->internal.show_all_errors = 1;
+       index_state_init(&o->internal.result, o->src_index->repo);
 
        /* Sanity checks */
        if (!o->update || o->index_only || o->skip_sparse_checkout)
@@ -2109,20 +2118,19 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o)
        trace_performance_enter();
 
        /* If we weren't given patterns, use the recorded ones */
-       if (!o->pl) {
-               memset(&pl, 0, sizeof(pl));
+       if (!pl) {
                free_pattern_list = 1;
-               populate_from_existing_patterns(o, &pl);
-               if (o->skip_sparse_checkout)
-                       goto skip_sparse_checkout;
+               pl = xcalloc(1, sizeof(*pl));
+               populate_from_existing_patterns(o, pl);
        }
+       o->internal.pl = pl;
 
        /* Expand sparse directories as needed */
-       expand_index(o->src_index, o->pl);
+       expand_index(o->src_index, o->internal.pl);
 
        /* Set NEW_SKIP_WORKTREE on existing entries. */
        mark_all_ce_unused(o->src_index);
-       mark_new_skip_worktree(o->pl, o->src_index, 0,
+       mark_new_skip_worktree(o->internal.pl, o->src_index, 0,
                               CE_NEW_SKIP_WORKTREE, o->verbose_update);
 
        /* Then loop over entries and update/remove as needed */
@@ -2142,14 +2150,16 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o)
                        ret = UPDATE_SPARSITY_WARNINGS;
        }
 
-skip_sparse_checkout:
        if (check_updates(o, o->src_index))
                ret = UPDATE_SPARSITY_WORKTREE_UPDATE_FAILURES;
 
        display_warning_msgs(o);
-       o->show_all_errors = old_show_all_errors;
-       if (free_pattern_list)
-               clear_pattern_list(&pl);
+       o->internal.show_all_errors = old_show_all_errors;
+       if (free_pattern_list) {
+               clear_pattern_list(pl);
+               free(pl);
+               o->internal.pl = NULL;
+       }
        trace_performance_leave("update_sparsity");
        return ret;
 }
@@ -2244,15 +2254,15 @@ static int verify_uptodate_sparse(const struct cache_entry *ce,
 }
 
 /*
- * TODO: We should actually invalidate o->result, not src_index [1].
+ * TODO: We should actually invalidate o->internal.result, not src_index [1].
  * But since cache tree and untracked cache both are not copied to
- * o->result until unpacking is complete, we invalidate them on
+ * o->internal.result until unpacking is complete, we invalidate them on
  * src_index instead with the assumption that they will be copied to
  * dst_index at the end.
  *
  * [1] src_index->cache_tree is also used in unpack_callback() so if
- * we invalidate o->result, we need to update it to use
- * o->result.cache_tree as well.
+ * we invalidate o->internal.result, we need to update it to use
+ * o->internal.result.cache_tree as well.
  */
 static void invalidate_ce_path(const struct cache_entry *ce,
                               struct unpack_trees_options *o)
@@ -2336,8 +2346,8 @@ static int verify_clean_subdirectory(const struct cache_entry *ce,
        pathbuf = xstrfmt("%.*s/", namelen, ce->name);
 
        memset(&d, 0, sizeof(d));
-       if (o->dir)
-               d.exclude_per_dir = o->dir->exclude_per_dir;
+       if (o->internal.dir)
+               setup_standard_excludes(&d);
        i = read_directory(&d, o->src_index, pathbuf, namelen+1, NULL);
        dir_clear(&d);
        free(pathbuf);
@@ -2391,8 +2401,8 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
        if (ignore_case && icase_exists(o, name, len, st))
                return 0;
 
-       if (o->dir &&
-           is_excluded(o->dir, o->src_index, name, &dtype))
+       if (o->internal.dir &&
+           is_excluded(o->internal.dir, o->src_index, name, &dtype))
                /*
                 * ce->name is explicitly excluded, so it is Ok to
                 * overwrite it.
@@ -2420,7 +2430,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
         * delete this path, which is in a subdirectory that
         * is being replaced with a blob.
         */
-       result = index_file_exists(&o->result, name, len, 0);
+       result = index_file_exists(&o->internal.result, name, len, 0);
        if (result) {
                if (result->ce_flags & CE_REMOVE)
                        return 0;
@@ -2521,7 +2531,7 @@ static int merged_entry(const struct cache_entry *ce,
                        struct unpack_trees_options *o)
 {
        int update = CE_UPDATE;
-       struct cache_entry *merge = dup_cache_entry(ce, &o->result);
+       struct cache_entry *merge = dup_cache_entry(ce, &o->internal.result);
 
        if (!old) {
                /*
@@ -2616,7 +2626,7 @@ static int merged_sparse_dir(const struct cache_entry * const *src, int n,
        setup_traverse_info(&info, src[0]->name);
        info.fn = unpack_sparse_callback;
        info.data = o;
-       info.show_all_errors = o->show_all_errors;
+       info.show_all_errors = o->internal.show_all_errors;
        info.pathspec = o->pathspec;
 
        /* Get the tree descriptors of the sparse directory in each of the merging trees */
@@ -2834,7 +2844,7 @@ int threeway_merge(const struct cache_entry * const *stages,
                        return -1;
        }
 
-       o->nontrivial_merge = 1;
+       o->internal.nontrivial_merge = 1;
 
        /* #2, #3, #4, #6, #7, #9, #10, #11. */
        count = 0;
@@ -2875,9 +2885,9 @@ int twoway_merge(const struct cache_entry * const *src,
        const struct cache_entry *oldtree = src[1];
        const struct cache_entry *newtree = src[2];
 
-       if (o->merge_size != 2)
+       if (o->internal.merge_size != 2)
                return error("Cannot do a twoway merge of %d trees",
-                            o->merge_size);
+                            o->internal.merge_size);
 
        if (oldtree == o->df_conflict_entry)
                oldtree = NULL;
@@ -2957,9 +2967,9 @@ int bind_merge(const struct cache_entry * const *src,
        const struct cache_entry *old = src[0];
        const struct cache_entry *a = src[1];
 
-       if (o->merge_size != 1)
+       if (o->internal.merge_size != 1)
                return error("Cannot do a bind merge of %d trees",
-                            o->merge_size);
+                            o->internal.merge_size);
        if (a && old)
                return o->quiet ? -1 :
                        error(ERRORMSG(o, ERROR_BIND_OVERLAP),
@@ -2983,9 +2993,9 @@ int oneway_merge(const struct cache_entry * const *src,
        const struct cache_entry *old = src[0];
        const struct cache_entry *a = src[1];
 
-       if (o->merge_size != 1)
+       if (o->internal.merge_size != 1)
                return error("Cannot do a oneway merge of %d trees",
-                            o->merge_size);
+                            o->internal.merge_size);
 
        if (!a || a == o->df_conflict_entry)
                return deleted_entry(old, old, o);
@@ -3020,8 +3030,8 @@ int stash_worktree_untracked_merge(const struct cache_entry * const *src,
        const struct cache_entry *worktree = src[1];
        const struct cache_entry *untracked = src[2];
 
-       if (o->merge_size != 2)
-               BUG("invalid merge_size: %d", o->merge_size);
+       if (o->internal.merge_size != 2)
+               BUG("invalid merge_size: %d", o->internal.merge_size);
 
        if (worktree && untracked)
                return error(_("worktree and untracked commit have duplicate entries: %s"),
index 3a7b3e5f0077938f1e28de5f41a691191c098744..61c06eb7c506e7753fd291a8a32539d2fc21496b 100644 (file)
@@ -59,47 +59,54 @@ struct unpack_trees_options {
                     preserve_ignored,
                     clone,
                     index_only,
-                    nontrivial_merge,
                     trivial_merges_only,
                     verbose_update,
                     aggressive,
                     skip_unmerged,
                     initial_checkout,
                     diff_index_cached,
-                    debug_unpack,
                     skip_sparse_checkout,
                     quiet,
                     exiting_early,
-                    show_all_errors,
                     dry_run,
                     skip_cache_tree_update;
        enum unpack_trees_reset_type reset;
        const char *prefix;
        const char *super_prefix;
-       int cache_bottom;
        struct pathspec *pathspec;
        merge_fn_t fn;
-       const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];
-       struct strvec msgs_to_free;
-       /*
-        * Store error messages in an array, each case
-        * corresponding to a error message type
-        */
-       struct string_list unpack_rejects[NB_UNPACK_TREES_WARNING_TYPES];
 
        int head_idx;
-       int merge_size;
 
-       struct cache_entry *df_conflict_entry;
+       struct cache_entry *df_conflict_entry; /* output only */
        void *unpack_data;
 
        struct index_state *dst_index;
        struct index_state *src_index;
-       struct index_state result;
 
-       struct pattern_list *pl; /* for internal use */
-       struct dir_struct *dir; /* for internal use only */
        struct checkout_metadata meta;
+
+       struct unpack_trees_options_internal {
+               unsigned int nontrivial_merge,
+                            show_all_errors,
+                            debug_unpack; /* used by read-tree debugging */
+
+               int merge_size; /* used by read-tree debugging */
+               int cache_bottom;
+               const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];
+               struct strvec msgs_to_free;
+
+               /*
+                * Store error messages in an array, each case
+                * corresponding to a error message type
+                */
+               struct string_list unpack_rejects[NB_UNPACK_TREES_WARNING_TYPES];
+
+               struct index_state result;
+
+               struct pattern_list *pl;
+               struct dir_struct *dir;
+       } internal;
 };
 
 int unpack_trees(unsigned n, struct tree_desc *t,
@@ -112,7 +119,8 @@ enum update_sparsity_result {
        UPDATE_SPARSITY_WORKTREE_UPDATE_FAILURES = -2
 };
 
-enum update_sparsity_result update_sparsity(struct unpack_trees_options *options);
+enum update_sparsity_result update_sparsity(struct unpack_trees_options *options,
+                                           struct pattern_list *pl);
 
 int verify_uptodate(const struct cache_entry *ce,
                    struct unpack_trees_options *o);
index 551f22ffa5d63ceabbf5909ee1926b8471722920..41b9362cf1b2c69d33a6d96f64c02b85205404b0 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "refs.h"
 #include "pkt-line.h"
 #include "sideband.h"
@@ -1699,7 +1700,7 @@ enum fetch_state {
        FETCH_DONE,
 };
 
-int upload_pack_v2(struct repository *r, struct packet_reader *request)
+int upload_pack_v2(struct repository *r UNUSED, struct packet_reader *request)
 {
        enum fetch_state state = FETCH_PROCESS_ARGS;
        struct upload_pack_data data;
@@ -1775,26 +1776,26 @@ int upload_pack_advertise(struct repository *r,
 
                strbuf_addstr(value, "shallow wait-for-done");
 
-               if (!repo_config_get_bool(the_repository,
+               if (!repo_config_get_bool(r,
                                         "uploadpack.allowfilter",
                                         &allow_filter_value) &&
                    allow_filter_value)
                        strbuf_addstr(value, " filter");
 
-               if (!repo_config_get_bool(the_repository,
+               if (!repo_config_get_bool(r,
                                         "uploadpack.allowrefinwant",
                                         &allow_ref_in_want) &&
                    allow_ref_in_want)
                        strbuf_addstr(value, " ref-in-want");
 
                if (git_env_bool("GIT_TEST_SIDEBAND_ALL", 0) ||
-                   (!repo_config_get_bool(the_repository,
+                   (!repo_config_get_bool(r,
                                           "uploadpack.allowsidebandall",
                                           &allow_sideband_all_value) &&
                     allow_sideband_all_value))
                        strbuf_addstr(value, " sideband-all");
 
-               if (!repo_config_get_string(the_repository,
+               if (!repo_config_get_string(r,
                                            "uploadpack.blobpackfileuri",
                                            &str) &&
                    str) {
diff --git a/url.c b/url.c
index e04bd60b6bead493e3236949b5b4a837c729c146..2e1a9f6feec96b055a9415748eb721937461c07f 100644 (file)
--- a/url.c
+++ b/url.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "hex.h"
+#include "strbuf.h"
 #include "url.h"
 
 int is_urlschemechar(int first_flag, int ch)
index 620a648efc5e81ac8b233153ae504ba145d6ee8f..eba0bdd77fe75bc4c0f836d88f9b7e8c4b91c995 100644 (file)
@@ -1,4 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
+#include "hex.h"
+#include "strbuf.h"
 #include "urlmatch.h"
 
 #define URL_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
index d71b82feb74704b1c6b3027f84d2d478403d6e42..09203fbc35453e50836e82987dc6e73466aefb27 100644 (file)
@@ -1,7 +1,9 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "config.h"
 #include "userdiff.h"
 #include "attr.h"
+#include "strbuf.h"
 
 static struct userdiff_driver *drivers;
 static int ndrivers;
@@ -170,8 +172,8 @@ PATTERNS("html",
         "[^<>= \t]+"),
 PATTERNS("java",
         "!^[ \t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
-        /* Class, enum, and interface declarations */
-        "^[ \t]*(([a-z]+[ \t]+)*(class|enum|interface)[ \t]+[A-Za-z][A-Za-z0-9_$]*[ \t]+.*)$\n"
+        /* Class, enum, interface, and record declarations */
+        "^[ \t]*(([a-z-]+[ \t]+)*(class|enum|interface|record)[ \t]+.*)$\n"
         /* Method definitions; note that constructor signatures are not */
         /* matched because they are indistinguishable from method calls. */
         "^[ \t]*(([A-Za-z_<>&][][?&<>.,A-Za-z_0-9]*[ \t]+)+[A-Za-z_][A-Za-z_0-9]*[ \t]*\\([^;]*)$",
@@ -293,7 +295,7 @@ PATTERNS("scheme",
         "|([^][)(}{[ \t])+"),
 PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",
         "\\\\[a-zA-Z@]+|\\\\.|[a-zA-Z0-9\x80-\xff]+"),
-{ "default", NULL, -1, { NULL, 0 } },
+{ "default", NULL, NULL, -1, { NULL, 0 } },
 };
 #undef PATTERNS
 #undef IPATTERN
@@ -394,6 +396,8 @@ int userdiff_config(const char *k, const char *v)
                return parse_bool(&drv->textconv_want_cache, k, v);
        if (!strcmp(type, "wordregex"))
                return git_config_string(&drv->word_regex, k, v);
+       if (!strcmp(type, "algorithm"))
+               return git_config_string(&drv->algorithm, k, v);
 
        return 0;
 }
index aee91bc77e6d592021d8597da7fce0123c779a32..24419db6973f5cd9bdfc6b9f300d5ce472c15cfd 100644 (file)
@@ -14,6 +14,7 @@ struct userdiff_funcname {
 struct userdiff_driver {
        const char *name;
        const char *external;
+       const char *algorithm;
        int binary;
        struct userdiff_funcname funcname;
        const char *word_regex;
index 99d0e0eae047410660f0bf3b0d3f487d45c1134d..c046936378903fbc5f6cf31abb2c0cc0bcf41933 100644 (file)
--- a/walker.c
+++ b/walker.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "hex.h"
 #include "walker.h"
 #include "repository.h"
 #include "object-store.h"
index 7e5a7ea1eaa9d9d49219537b70256f1d947633ea..42e38e3459049385ff2d6040fede7c757b0d35bb 100644 (file)
@@ -9,7 +9,7 @@
 **  work differently than '*', and to fix the character-class code.
 */
 
-#include "cache.h"
+#include "git-compat-util.h"
 #include "wildmatch.h"
 
 typedef unsigned char uchar;
index aa43c6411914308798a58e4e3a0a5c55d1eede8f..e10594ef3369ba420f61f1e51faa2a177233c77a 100644 (file)
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "repository.h"
 #include "refs.h"
 #include "strbuf.h"
@@ -403,44 +404,43 @@ int is_worktree_being_bisected(const struct worktree *wt,
  * bisect). New commands that do similar things should update this
  * function as well.
  */
-const struct worktree *find_shared_symref(struct worktree **worktrees,
-                                         const char *symref,
-                                         const char *target)
+int is_shared_symref(const struct worktree *wt, const char *symref,
+                    const char *target)
 {
-       const struct worktree *existing = NULL;
-       int i = 0;
+       const char *symref_target;
+       struct ref_store *refs;
+       int flags;
 
-       for (i = 0; worktrees[i]; i++) {
-               struct worktree *wt = worktrees[i];
-               const char *symref_target;
-               struct ref_store *refs;
-               int flags;
+       if (wt->is_bare)
+               return 0;
 
-               if (wt->is_bare)
-                       continue;
+       if (wt->is_detached && !strcmp(symref, "HEAD")) {
+               if (is_worktree_being_rebased(wt, target))
+                       return 1;
+               if (is_worktree_being_bisected(wt, target))
+                       return 1;
+       }
 
-               if (wt->is_detached && !strcmp(symref, "HEAD")) {
-                       if (is_worktree_being_rebased(wt, target)) {
-                               existing = wt;
-                               break;
-                       }
-                       if (is_worktree_being_bisected(wt, target)) {
-                               existing = wt;
-                               break;
-                       }
-               }
+       refs = get_worktree_ref_store(wt);
+       symref_target = refs_resolve_ref_unsafe(refs, symref, 0,
+                                               NULL, &flags);
+       if ((flags & REF_ISSYMREF) &&
+           symref_target && !strcmp(symref_target, target))
+               return 1;
 
-               refs = get_worktree_ref_store(wt);
-               symref_target = refs_resolve_ref_unsafe(refs, symref, 0,
-                                                       NULL, &flags);
-               if ((flags & REF_ISSYMREF) &&
-                   symref_target && !strcmp(symref_target, target)) {
-                       existing = wt;
-                       break;
-               }
-       }
+       return 0;
+}
 
-       return existing;
+const struct worktree *find_shared_symref(struct worktree **worktrees,
+                                         const char *symref,
+                                         const char *target)
+{
+
+       for (int i = 0; worktrees[i]; i++)
+               if (is_shared_symref(worktrees[i], symref, target))
+                       return worktrees[i];
+
+       return NULL;
 }
 
 int submodule_uses_worktrees(const char *path)
index 9dcea6fc8c1b4fcc387818967d2de99713bfb50b..ce45b66de9e82d4d619b6f74e0e77c8bd5ab3f53 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef WORKTREE_H
 #define WORKTREE_H
 
-#include "cache.h"
 #include "refs.h"
 
 struct strbuf;
@@ -149,6 +148,12 @@ const struct worktree *find_shared_symref(struct worktree **worktrees,
                                          const char *symref,
                                          const char *target);
 
+/*
+ * Returns true if a symref points to a ref in a worktree.
+ */
+int is_shared_symref(const struct worktree *wt,
+                    const char *symref, const char *target);
+
 /*
  * Similar to head_ref() for all HEADs _except_ one from the current
  * worktree, which is covered by head_ref().
index 3162241a570cb60393607f06a8a12963b71afb78..90525bd26fd954e52b4d138020388db7e6291956 100644 (file)
@@ -4,6 +4,7 @@
 #include "dir.h"
 #include "commit.h"
 #include "diff.h"
+#include "hex.h"
 #include "revision.h"
 #include "diffcore.h"
 #include "quote.h"
index e87950de32e5602765de26953ce7ec812ef30925..5baf6ceb9473887765dc709ff5ff54da00a26559 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include "hex.h"
 #include "object-store.h"
 #include "xdiff-interface.h"
 #include "xdiff/xtypes.h"
index 4301a7eef274bb7796ad758d686f61b7c5b35395..3750794afe90c8c7d7951cdd187945c895115781 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef XDIFF_INTERFACE_H
 #define XDIFF_INTERFACE_H
 
-#include "cache.h"
+#include "hash.h"
 #include "xdiff/xdiff.h"
 
 /*