aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yml23
-rw-r--r--.gitignore1
-rw-r--r--.mailmap1
-rw-r--r--Documentation/CodingGuidelines2
-rw-r--r--Documentation/MyFirstContribution.txt32
-rw-r--r--Documentation/MyFirstObjectWalk.txt28
-rw-r--r--Documentation/RelNotes/2.42.0.txt193
-rw-r--r--Documentation/RelNotes/2.43.0.txt157
-rw-r--r--Documentation/SubmittingPatches141
-rw-r--r--Documentation/config/core.txt6
-rw-r--r--Documentation/config/rebase.txt6
-rw-r--r--Documentation/diff-options.txt8
-rw-r--r--Documentation/fsck-msgids.txt7
-rw-r--r--Documentation/git-bisect.txt11
-rw-r--r--Documentation/git-for-each-ref.txt56
-rw-r--r--Documentation/git-format-patch.txt22
-rw-r--r--Documentation/git-hash-object.txt5
-rw-r--r--Documentation/git-notes.txt38
-rw-r--r--Documentation/git-pack-objects.txt4
-rw-r--r--Documentation/git-push.txt2
-rw-r--r--Documentation/git-rev-parse.txt10
-rw-r--r--Documentation/git-revert.txt10
-rw-r--r--Documentation/git-show-ref.txt4
-rw-r--r--Documentation/git-submodule.txt31
-rw-r--r--Documentation/git-var.txt23
-rw-r--r--Documentation/git.txt4
-rw-r--r--Documentation/gitattributes.txt5
-rw-r--r--Documentation/gitcredentials.txt11
-rw-r--r--Documentation/gitformat-pack.txt36
-rw-r--r--Documentation/gitignore.txt10
-rw-r--r--Documentation/gitmodules.txt6
-rw-r--r--Documentation/object-format-disclaimer.txt15
-rw-r--r--Documentation/pretty-formats.txt47
-rw-r--r--Documentation/rev-list-options.txt9
-rw-r--r--Documentation/scalar.txt8
-rw-r--r--Documentation/technical/api-merge.txt4
-rw-r--r--Documentation/user-manual.txt18
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--Makefile24
l---------RelNotes2
-rw-r--r--abspath.c36
-rw-r--r--abspath.h21
-rw-r--r--add-interactive.c16
-rw-r--r--add-patch.c17
-rw-r--r--advice.c5
-rw-r--r--alias.c4
-rw-r--r--alloc.h75
-rw-r--r--apply.c19
-rw-r--r--archive-tar.c8
-rw-r--r--archive-zip.c3
-rw-r--r--archive.c4
-rw-r--r--attr.c78
-rw-r--r--attr.h9
-rw-r--r--bisect.c3
-rw-r--r--blame.c10
-rw-r--r--blame.h1
-rw-r--r--branch.c5
-rw-r--r--builtin.h3
-rw-r--r--builtin/add.c118
-rw-r--r--builtin/am.c25
-rw-r--r--builtin/apply.c1
-rw-r--r--builtin/archive.c1
-rw-r--r--builtin/bisect.c3
-rw-r--r--builtin/blame.c8
-rw-r--r--builtin/branch.c46
-rw-r--r--builtin/bugreport.c1
-rw-r--r--builtin/bundle.c41
-rw-r--r--builtin/cat-file.c46
-rw-r--r--builtin/check-attr.c4
-rw-r--r--builtin/check-ignore.c1
-rw-r--r--builtin/check-mailmap.c1
-rw-r--r--builtin/check-ref-format.c3
-rw-r--r--builtin/checkout--worker.c2
-rw-r--r--builtin/checkout-index.c19
-rw-r--r--builtin/checkout.c23
-rw-r--r--builtin/clean.c12
-rw-r--r--builtin/clone.c23
-rw-r--r--builtin/column.c4
-rw-r--r--builtin/commit-graph.c6
-rw-r--r--builtin/commit-tree.c5
-rw-r--r--builtin/commit.c39
-rw-r--r--builtin/config.c75
-rw-r--r--builtin/count-objects.c8
-rw-r--r--builtin/credential-cache--daemon.c1
-rw-r--r--builtin/credential-cache.c2
-rw-r--r--builtin/credential-store.c19
-rw-r--r--builtin/describe.c32
-rw-r--r--builtin/diff-files.c17
-rw-r--r--builtin/diff-index.c10
-rw-r--r--builtin/diff-tree.c9
-rw-r--r--builtin/diff.c84
-rw-r--r--builtin/difftool.c13
-rw-r--r--builtin/fast-export.c39
-rw-r--r--builtin/fast-import.c6
-rw-r--r--builtin/fetch-pack.c1
-rw-r--r--builtin/fetch.c30
-rw-r--r--builtin/fmt-merge-msg.c1
-rw-r--r--builtin/for-each-ref.c9
-rw-r--r--builtin/for-each-repo.c3
-rw-r--r--builtin/fsck.c28
-rw-r--r--builtin/fsmonitor--daemon.c16
-rw-r--r--builtin/gc.c305
-rw-r--r--builtin/get-tar-commit-id.c4
-rw-r--r--builtin/grep.c29
-rw-r--r--builtin/hash-object.c3
-rw-r--r--builtin/help.c8
-rw-r--r--builtin/hook.c1
-rw-r--r--builtin/index-pack.c22
-rw-r--r--builtin/init-db.c475
-rw-r--r--builtin/interpret-trailers.c22
-rw-r--r--builtin/log.c109
-rw-r--r--builtin/ls-files.c252
-rw-r--r--builtin/ls-remote.c2
-rw-r--r--builtin/ls-tree.c137
-rw-r--r--builtin/mailinfo.c3
-rw-r--r--builtin/mailsplit.c1
-rw-r--r--builtin/merge-base.c1
-rw-r--r--builtin/merge-file.c1
-rw-r--r--builtin/merge-index.c2
-rw-r--r--builtin/merge-ours.c1
-rw-r--r--builtin/merge-recursive.c1
-rw-r--r--builtin/merge-tree.c6
-rw-r--r--builtin/merge.c67
-rw-r--r--builtin/mktag.c11
-rw-r--r--builtin/mktree.c4
-rw-r--r--builtin/multi-pack-index.c5
-rw-r--r--builtin/mv.c9
-rw-r--r--builtin/name-rev.c10
-rw-r--r--builtin/notes.c175
-rw-r--r--builtin/pack-objects.c68
-rw-r--r--builtin/pack-redundant.c2
-rw-r--r--builtin/patch-id.c7
-rw-r--r--builtin/prune.c7
-rw-r--r--builtin/pull.c11
-rw-r--r--builtin/push.c37
-rw-r--r--builtin/range-diff.c2
-rw-r--r--builtin/read-tree.c11
-rw-r--r--builtin/rebase.c9
-rw-r--r--builtin/receive-pack.c33
-rw-r--r--builtin/reflog.c9
-rw-r--r--builtin/remote.c23
-rw-r--r--builtin/repack.c116
-rw-r--r--builtin/replace.c11
-rw-r--r--builtin/rerere.c2
-rw-r--r--builtin/reset.c37
-rw-r--r--builtin/rev-list.c5
-rw-r--r--builtin/rev-parse.c9
-rw-r--r--builtin/revert.c2
-rw-r--r--builtin/rm.c3
-rw-r--r--builtin/send-pack.c5
-rw-r--r--builtin/shortlog.c2
-rw-r--r--builtin/show-branch.c34
-rw-r--r--builtin/show-index.c1
-rw-r--r--builtin/show-ref.c3
-rw-r--r--builtin/sparse-checkout.c1
-rw-r--r--builtin/stash.c27
-rw-r--r--builtin/stripspace.c7
-rw-r--r--builtin/submodule--helper.c18
-rw-r--r--builtin/symbolic-ref.c2
-rw-r--r--builtin/tag.c32
-rw-r--r--builtin/unpack-file.c3
-rw-r--r--builtin/unpack-objects.c12
-rw-r--r--builtin/update-index.c9
-rw-r--r--builtin/update-ref.c17
-rw-r--r--builtin/update-server-info.c3
-rw-r--r--builtin/upload-archive.c2
-rw-r--r--builtin/upload-pack.c2
-rw-r--r--builtin/var.c174
-rw-r--r--builtin/verify-commit.c5
-rw-r--r--builtin/verify-pack.c2
-rw-r--r--builtin/verify-tag.c3
-rw-r--r--builtin/worktree.c25
-rw-r--r--builtin/write-tree.c1
-rw-r--r--bulk-checkin.c5
-rw-r--r--bundle-uri.c17
-rw-r--r--bundle.c6
-rw-r--r--cache-tree.c6
-rw-r--r--chunk-format.c1
-rw-r--r--ci/config/README14
-rwxr-xr-xci/config/allow-ref.sample27
-rwxr-xr-xci/lib.sh2
-rw-r--r--color.c8
-rw-r--r--color.h6
-rw-r--r--combine-diff.c3
-rw-r--r--commit-graph.c165
-rw-r--r--commit-graph.h2
-rw-r--r--commit-reach.c1
-rw-r--r--commit.c4
-rw-r--r--compat/fsmonitor/fsm-health-darwin.c2
-rw-r--r--compat/fsmonitor/fsm-health-win32.c4
-rw-r--r--compat/fsmonitor/fsm-ipc-darwin.c3
-rw-r--r--compat/fsmonitor/fsm-listen-darwin.c3
-rw-r--r--compat/fsmonitor/fsm-listen-win32.c4
-rw-r--r--compat/fsmonitor/fsm-path-utils-darwin.c4
-rw-r--r--compat/fsmonitor/fsm-path-utils-win32.c5
-rw-r--r--compat/fsmonitor/fsm-settings-darwin.c2
-rw-r--r--compat/fsmonitor/fsm-settings-win32.c4
-rw-r--r--compat/mingw.c9
-rw-r--r--compat/mingw.h7
-rw-r--r--compat/precompose_utf8.c3
-rw-r--r--compat/sha1-chunked.c3
-rw-r--r--compat/simple-ipc/ipc-win32.c2
-rw-r--r--compat/terminal.c11
-rw-r--r--compat/win32/headless.c115
-rw-r--r--compat/win32/trace2_win32_process_info.c6
-rw-r--r--config.c564
-rw-r--r--config.h80
-rw-r--r--config.mak.uname3
-rw-r--r--configure.ac11
-rw-r--r--connect.c5
-rw-r--r--connected.c2
-rw-r--r--contrib/buildsystems/CMakeLists.txt11
-rw-r--r--contrib/buildsystems/Generators/Vcxproj.pm4
-rwxr-xr-xcontrib/buildsystems/engine.pl1
-rw-r--r--contrib/coccinelle/config_fn_ctx.pending.cocci144
-rw-r--r--contrib/coccinelle/git_config_number.cocci27
-rw-r--r--contrib/completion/git-completion.bash61
-rw-r--r--contrib/credential/libsecret/git-credential-libsecret.c95
-rw-r--r--contrib/credential/wincred/git-credential-wincred.c20
-rwxr-xr-xcontrib/subtree/git-subtree.sh10
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh2
-rw-r--r--convert.c34
-rw-r--r--copy.c1
-rw-r--r--credential.c5
-rw-r--r--csum-file.c3
-rw-r--r--ctype.c36
-rw-r--r--daemon.c63
-rw-r--r--decorate.c1
-rw-r--r--delta-islands.c5
-rw-r--r--diagnose.c2
-rw-r--r--diff-lib.c13
-rw-r--r--diff-no-index.c2
-rw-r--r--diff.c78
-rw-r--r--diff.h19
-rw-r--r--diffcore-break.c4
-rw-r--r--diffcore-order.c1
-rw-r--r--diffcore-pickaxe.c1
-rw-r--r--diffcore-rename.c3
-rw-r--r--dir-iterator.c1
-rw-r--r--dir.c12
-rw-r--r--dir.h5
-rw-r--r--editor.c1
-rw-r--r--entry.c7
-rw-r--r--environment.c9
-rw-r--r--environment.h6
-rw-r--r--ewah/bitmap.c1
-rw-r--r--ewah/ewah_bitmap.c1
-rw-r--r--exec-cmd.c3
-rw-r--r--fetch-pack.c16
-rw-r--r--fmt-merge-msg.c20
-rw-r--r--fmt-merge-msg.h3
-rw-r--r--fsck.c45
-rw-r--r--fsck.h5
-rw-r--r--fsmonitor-ipc.c4
-rw-r--r--fsmonitor-ll.h52
-rw-r--r--fsmonitor.c2
-rw-r--r--fsmonitor.h49
-rw-r--r--git-compat-util.h292
-rw-r--r--git-gui/Makefile21
-rw-r--r--git-gui/README.md2
-rwxr-xr-xgit-gui/git-gui.sh309
-rw-r--r--git-gui/lib/choose_repository.tcl27
-rw-r--r--git-gui/lib/shortcut.tcl31
-rwxr-xr-xgit-send-email.perl32
-rwxr-xr-xgit-svn.perl20
-rw-r--r--git.c1
-rw-r--r--gpg-interface.c13
-rw-r--r--grep.c22
-rw-r--r--grep.h4
-rw-r--r--hash-ll.h37
-rw-r--r--hash-lookup.c3
-rw-r--r--hashmap.h21
-rw-r--r--help.c10
-rw-r--r--hex.c2
-rw-r--r--hex.h10
-rw-r--r--hook.c1
-rw-r--r--http-backend.c7
-rw-r--r--http-push.c4
-rw-r--r--http-walker.c2
-rw-r--r--http.c26
-rw-r--r--ident.c5
-rw-r--r--ident.h4
-rw-r--r--imap-send.c52
-rw-r--r--khash.h3
-rw-r--r--kwset.c36
-rw-r--r--kwset.h2
-rw-r--r--line-log.c2
-rw-r--r--list-objects-filter-options.c1
-rw-r--r--list-objects-filter-options.h1
-rw-r--r--list-objects-filter.c3
-rw-r--r--list-objects.c12
-rw-r--r--log-tree.c76
-rw-r--r--log-tree.h19
-rw-r--r--ls-refs.c8
-rw-r--r--mailinfo.c5
-rw-r--r--mailmap.c2
-rw-r--r--match-trees.c3
-rw-r--r--merge-blobs.c4
-rw-r--r--merge-ll.c (renamed from ll-merge.c)44
-rw-r--r--merge-ll.h (renamed from ll-merge.h)0
-rw-r--r--merge-ort-wrappers.c3
-rw-r--r--merge-ort.c9
-rw-r--r--merge-recursive.c10
-rw-r--r--merge.c5
-rw-r--r--merge.h17
-rw-r--r--midx.c45
-rw-r--r--name-hash.c5
-rw-r--r--name-hash.h16
-rw-r--r--negotiator/noop.c12
-rw-r--r--notes-cache.c3
-rw-r--r--notes-merge.c6
-rw-r--r--notes-utils.c4
-rw-r--r--notes.c6
-rw-r--r--object-file.c13
-rw-r--r--object-name.c20
-rw-r--r--object-name.h9
-rw-r--r--object-store-ll.h533
-rw-r--r--object-store.h528
-rw-r--r--object.c3
-rw-r--r--oid-array.c1
-rw-r--r--oidmap.h1
-rw-r--r--oidtree.c1
-rw-r--r--oss-fuzz/fuzz-pack-idx.c2
-rw-r--r--pack-bitmap-write.c4
-rw-r--r--pack-bitmap.c20
-rw-r--r--pack-check.c2
-rw-r--r--pack-mtimes.c3
-rw-r--r--pack-objects.c1
-rw-r--r--pack-objects.h2
-rw-r--r--pack-revindex.c3
-rw-r--r--pack-write.c3
-rw-r--r--packfile.c23
-rw-r--r--pager.c5
-rw-r--r--parallel-checkout.c5
-rw-r--r--parse-options-cb.c4
-rw-r--r--parse-options.c75
-rw-r--r--parse-options.h6
-rw-r--r--patch-ids.c1
-rw-r--r--path.c23
-rw-r--r--path.h5
-rw-r--r--pathspec.c4
-rw-r--r--pkt-line.c13
-rw-r--r--pkt-line.h2
-rw-r--r--po/ca.po548
-rw-r--r--po/de.po532
-rw-r--r--po/fr.po519
-rw-r--r--po/id.po608
-rw-r--r--po/ru.po2853
-rw-r--r--po/sv.po493
-rw-r--r--po/tr.po490
-rw-r--r--po/uk.po7016
-rw-r--r--po/zh_CN.po566
-rw-r--r--po/zh_TW.po603
-rw-r--r--preload-index.c4
-rw-r--r--preload-index.h15
-rw-r--r--pretty.c179
-rw-r--r--prio-queue.c1
-rw-r--r--promisor-remote.c6
-rw-r--r--protocol-caps.c2
-rw-r--r--prune-packed.c2
-rw-r--r--quote.c1
-rw-r--r--range-diff.c12
-rw-r--r--reachable.c2
-rw-r--r--read-cache-ll.h (renamed from cache.h)148
-rw-r--r--read-cache.c348
-rw-r--r--read-cache.h45
-rw-r--r--rebase-interactive.c16
-rw-r--r--ref-filter.c488
-rw-r--r--ref-filter.h12
-rw-r--r--reflog-walk.c2
-rw-r--r--reflog.c2
-rw-r--r--refs.c93
-rw-r--r--refs.h29
-rw-r--r--refs/debug.c5
-rw-r--r--refs/files-backend.c8
-rw-r--r--refs/packed-backend.c207
-rw-r--r--refs/refs-internal.h7
-rw-r--r--refspec.c1
-rw-r--r--remote-curl.c4
-rw-r--r--remote.c20
-rw-r--r--remote.h4
-rw-r--r--replace-object.c2
-rw-r--r--replace-object.h2
-rw-r--r--repository.c6
-rw-r--r--repository.h8
-rw-r--r--rerere.c12
-rw-r--r--resolve-undo.c4
-rw-r--r--revision.c100
-rw-r--r--revision.h7
-rw-r--r--run-command.c4
-rw-r--r--run-command.h4
-rw-r--r--sane-ctype.h66
-rw-r--r--scalar.c74
-rw-r--r--send-pack.c3
-rw-r--r--sequencer.c368
-rw-r--r--serve.c1
-rw-r--r--server-info.c5
-rw-r--r--setup.c546
-rw-r--r--setup.h44
-rw-r--r--sha1/openssl.h49
-rw-r--r--sha256/gcrypt.h13
-rw-r--r--sha256/openssl.h49
-rw-r--r--shallow.c8
-rw-r--r--sigchain.c1
-rw-r--r--sparse-index.c9
-rw-r--r--sparse-index.h2
-rw-r--r--split-index.c4
-rw-r--r--statinfo.c87
-rw-r--r--statinfo.h51
-rw-r--r--strbuf.c197
-rw-r--r--strbuf.h150
-rw-r--r--streaming.c3
-rw-r--r--string-list.c1
-rw-r--r--strvec.c1
-rw-r--r--submodule-config.c35
-rw-r--r--submodule-config.h3
-rw-r--r--submodule.c7
-rw-r--r--t/.gitattributes1
-rw-r--r--t/README6
-rw-r--r--t/annotate-tests.sh9
-rw-r--r--t/helper/test-cache-tree.c2
-rw-r--r--t/helper/test-config.c24
-rw-r--r--t/helper/test-delta.c1
-rw-r--r--t/helper/test-dump-cache-tree.c2
-rw-r--r--t/helper/test-dump-fsmonitor.c2
-rw-r--r--t/helper/test-dump-split-index.c5
-rw-r--r--t/helper/test-dump-untracked-cache.c2
-rw-r--r--t/helper/test-fast-rebase.c3
-rw-r--r--t/helper/test-fsmonitor-client.c3
-rw-r--r--t/helper/test-hash-speed.c2
-rw-r--r--t/helper/test-index-version.c2
-rw-r--r--t/helper/test-lazy-init-name-hash.c3
-rw-r--r--t/helper/test-oid-array.c2
-rw-r--r--t/helper/test-pack-mtimes.c2
-rw-r--r--t/helper/test-parse-options.c2
-rw-r--r--t/helper/test-partial-clone.c2
-rw-r--r--t/helper/test-path-utils.c2
-rw-r--r--t/helper/test-reach.c3
-rw-r--r--t/helper/test-read-cache.c3
-rw-r--r--t/helper/test-read-graph.c2
-rw-r--r--t/helper/test-read-midx.c2
-rw-r--r--t/helper/test-ref-store.c20
-rw-r--r--t/helper/test-repository.c2
-rw-r--r--t/helper/test-revision-walking.c1
-rw-r--r--t/helper/test-scrap-cache-tree.c2
-rw-r--r--t/helper/test-sha1.c2
-rw-r--r--t/helper/test-sha256.c2
-rw-r--r--t/helper/test-strcmp-offset.c2
-rw-r--r--t/helper/test-trace2.c6
-rw-r--r--t/helper/test-userdiff.c4
-rw-r--r--t/helper/test-wildmatch.c1
-rw-r--r--t/helper/test-write-cache.c2
-rwxr-xr-xt/lib-commit-graph.sh34
-rw-r--r--t/lib-credential.sh77
-rw-r--r--t/lib-gpg.sh22
-rw-r--r--t/lib-rebase.sh25
-rwxr-xr-xt/perf/p2000-sparse-operations.sh1
-rwxr-xr-xt/t0007-git-var.sh109
-rwxr-xr-xt/t0040-parse-options.sh45
-rwxr-xr-xt/t0041-usage.sh1
-rwxr-xr-xt/t0091-bugreport.sh67
-rwxr-xr-xt/t0301-credential-cache.sh1
-rwxr-xr-xt/t0303-credential-external.sh2
-rwxr-xr-xt/t1092-sparse-checkout-compatibility.sh72
-rwxr-xr-xt/t1300-config.sh27
-rwxr-xr-xt/t1301-shared-repo.sh22
-rwxr-xr-xt/t1419-exclude-refs.sh122
-rwxr-xr-xt/t1450-fsck.sh14
-rwxr-xr-xt/t1502-rev-parse-parseopt.sh131
-rw-r--r--t/t1502/.gitattributes1
-rw-r--r--t/t1502/optionspec-neg8
-rw-r--r--t/t1502/optionspec-neg.help12
-rwxr-xr-xt/t1502/optionspec.help36
-rwxr-xr-xt/t2004-checkout-cache-temp.sh20
-rwxr-xr-xt/t2200-add-update.sh11
-rwxr-xr-xt/t2400-worktree-add.sh17
-rwxr-xr-xt/t2407-worktree-heads.sh10
-rwxr-xr-xt/t3101-ls-tree-dirname.sh8
-rwxr-xr-xt/t3200-branch.sh14
-rwxr-xr-xt/t3202-show-branch.sh25
-rwxr-xr-xt/t3203-branch-output.sh16
-rwxr-xr-xt/t3301-notes.sh169
-rwxr-xr-xt/t3321-notes-stripspace.sh578
-rwxr-xr-xt/t3400-rebase.sh2
-rwxr-xr-xt/t3402-rebase-merge.sh1
-rwxr-xr-xt/t3404-rebase-interactive.sh79
-rwxr-xr-xt/t3418-rebase-continue.sh76
-rwxr-xr-xt/t3430-rebase-merges.sh41
-rwxr-xr-xt/t3437-rebase-fixup-options.sh15
-rwxr-xr-xt/t3501-revert-cherry-pick.sh23
-rwxr-xr-xt/t4002-diff-basic.sh2
-rwxr-xr-xt/t4014-format-patch.sh36
-rwxr-xr-xt/t4015-diff-whitespace.sh39
-rwxr-xr-xt/t4017-diff-retval.sh5
-rwxr-xr-xt/t4040-whitespace-status.sh3
-rwxr-xr-xt/t4141-apply-too-large.sh2
-rwxr-xr-xt/t4203-mailmap.sh4
-rwxr-xr-xt/t4205-log-pretty-formats.sh49
-rwxr-xr-xt/t4207-log-decoration-colors.sh44
-rwxr-xr-xt/t5318-commit-graph.sh406
-rwxr-xr-xt/t5319-multi-pack-index.sh12
-rwxr-xr-xt/t5324-split-commit-graph.sh3
-rwxr-xr-xt/t5328-commit-graph-64bit-time.sh54
-rwxr-xr-xt/t5329-pack-objects-cruft.sh54
-rwxr-xr-xt/t5351-unpack-large-objects.sh6
-rwxr-xr-xt/t5407-post-rewrite-hook.sh48
-rwxr-xr-xt/t5510-fetch.sh46
-rwxr-xr-xt/t5516-fetch-push.sh11
-rwxr-xr-xt/t5546-receive-limits.sh35
-rwxr-xr-xt/t5571-pre-push-hook.sh1
-rwxr-xr-xt/t5583-push-branches.sh1
-rwxr-xr-xt/t5606-clone-options.sh10
-rwxr-xr-xt/t5616-partial-clone.sh10
-rwxr-xr-xt/t6017-rev-list-stdin.sh51
-rwxr-xr-xt/t6020-bundle-misc.sh6
-rwxr-xr-xt/t6120-describe.sh8
-rwxr-xr-xt/t6135-pathspec-with-attrs.sh46
-rwxr-xr-xt/t6300-for-each-ref.sh377
-rwxr-xr-xt/t6302-for-each-ref-filter.sh2
-rwxr-xr-xt/t6406-merge-attr.sh23
-rwxr-xr-xt/t6700-tree-depth.sh93
-rwxr-xr-xt/t7001-mv.sh7
-rwxr-xr-xt/t7102-reset.sh10
-rwxr-xr-xt/t7508-status.sh48
-rwxr-xr-xt/t7510-signed-commit.sh7
-rwxr-xr-xt/t7512-status-help.sh22
-rwxr-xr-xt/t7516-commit-races.sh2
-rwxr-xr-xt/t7518-ident-corner-cases.sh11
-rwxr-xr-xt/t7700-repack.sh36
-rwxr-xr-xt/t7701-repack-unpack-unreachable.sh15
-rwxr-xr-xt/t7900-maintenance.sh28
-rwxr-xr-xt/t9001-send-email.sh10
-rwxr-xr-xt/t9211-scalar-clone.sh12
-rwxr-xr-xt/t9902-completion.sh12
-rw-r--r--t/test-lib-functions.sh42
-rw-r--r--t/test-lib.sh1
-rw-r--r--tag.c3
-rw-r--r--tempfile.c2
-rw-r--r--tmp-objdir.c3
-rw-r--r--trace.c1
-rw-r--r--trace2.c5
-rw-r--r--trace2.h11
-rw-r--r--trace2/tr2_cfg.c17
-rw-r--r--trace2/tr2_ctr.c15
-rw-r--r--trace2/tr2_sysenv.c4
-rw-r--r--trace2/tr2_tgt.h4
-rw-r--r--trace2/tr2_tgt_event.c27
-rw-r--r--trace2/tr2_tgt_normal.c24
-rw-r--r--trace2/tr2_tgt_perf.c4
-rw-r--r--trace2/tr2_tls.c1
-rw-r--r--trailer.c3
-rw-r--r--transport-helper.c2
-rw-r--r--transport.c4
-rw-r--r--tree-diff.c26
-rw-r--r--tree-walk.c59
-rw-r--r--tree-walk.h4
-rw-r--r--tree.c13
-rw-r--r--tree.h1
-rw-r--r--unpack-trees.c15
-rw-r--r--unpack-trees.h4
-rw-r--r--upload-pack.c73
-rw-r--r--urlmatch.c7
-rw-r--r--urlmatch.h8
-rw-r--r--usage.c1
-rw-r--r--userdiff.c1
-rw-r--r--versioncmp.c1
-rw-r--r--walker.c3
-rw-r--r--worktree.c11
-rw-r--r--wrapper.c32
-rw-r--r--wrapper.h112
-rw-r--r--write-or-die.c1
-rw-r--r--wt-status.c38
-rw-r--r--xdiff-interface.c8
-rw-r--r--xdiff-interface.h4
574 files changed, 19985 insertions, 11475 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 079645b776..dcf7d78f1d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -5,9 +5,23 @@ on: [push, pull_request]
env:
DEVELOPER: 1
+# If more than one workflow run is triggered for the very same commit hash
+# (which happens when multiple branches pointing to the same commit), only
+# the first one is allowed to run, the second will be kept in the "queued"
+# state. This allows a successful completion of the first run to be reused
+# in the second run via the `skip-if-redundant` logic in the `config` job.
+#
+# The only caveat is that if a workflow run is triggered for the same commit
+# hash that another run is already being held, that latter run will be
+# canceled. For more details about the `concurrency` attribute, see:
+# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
+concurrency:
+ group: ${{ github.sha }}
+
jobs:
ci-config:
name: config
+ if: vars.CI_BRANCHES == '' || contains(vars.CI_BRANCHES, github.ref_name)
runs-on: ubuntu-latest
outputs:
enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
@@ -30,10 +44,13 @@ jobs:
name: check whether CI is enabled for ref
run: |
enabled=yes
- if test -x config-repo/ci/config/allow-ref &&
- ! config-repo/ci/config/allow-ref '${{ github.ref }}'
+ if test -x config-repo/ci/config/allow-ref
then
- enabled=no
+ echo "::warning::ci/config/allow-ref is deprecated; use CI_BRANCHES instead"
+ if ! config-repo/ci/config/allow-ref '${{ github.ref }}'
+ then
+ enabled=no
+ fi
fi
skip_concurrent=yes
diff --git a/.gitignore b/.gitignore
index e875c59054..5e56e471b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -222,6 +222,7 @@
/TAGS
/cscope*
/compile_commands.json
+/.cache/
*.hcc
*.obj
*.lib
diff --git a/.mailmap b/.mailmap
index 733e047aa8..dc31d70b8c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -80,6 +80,7 @@ Frank Lichtenheld <frank@lichtenheld.de> <flichtenheld@astaro.com>
Fredrik Kuivinen <frekui@gmail.com> <freku045@student.liu.se>
Frédéric Heitzmann <frederic.heitzmann@gmail.com>
Garry Dolley <gdolley@ucla.edu> <gdolley@arpnetworks.com>
+Glen Choo <glencbz@gmail.com> <chooglen@google.com>
Greg Price <price@mit.edu> <price@MIT.EDU>
Greg Price <price@mit.edu> <price@ksplice.com>
Heiko Voigt <hvoigt@hvoigt.net> <git-list@hvoigt.net>
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index ad0e1905a5..65af8d82ce 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -448,7 +448,7 @@ For C programs:
- The first #include in C files, except in platform specific compat/
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",
+ approved headers currently include "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.
diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index 56130e4bec..62d11a5cd7 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -1256,6 +1256,38 @@ index 88f126184c..38da593a60 100644
[[now-what]]
== My Patch Got Emailed - Now What?
+Please give reviewers enough time to process your initial patch before
+sending an updated version. That is, resist the temptation to send a new
+version immediately, because others may have already started reviewing
+your initial version.
+
+While waiting for review comments, you may find mistakes in your initial
+patch, or perhaps realize a different and better way to achieve the goal
+of the patch. In this case you may communicate your findings to other
+reviewers as follows:
+
+ - If the mistakes you found are minor, send a reply to your patch as if
+ you were a reviewer and mention that you will fix them in an
+ updated version.
+
+ - On the other hand, if you think you want to change the course so
+ drastically that reviews on the initial patch would be a waste of
+ time (for everyone involved), retract the patch immediately with
+ a reply like "I am working on a much better approach, so please
+ ignore this patch and wait for the updated version."
+
+Now, the above is a good practice if you sent your initial patch
+prematurely without polish. But a better approach of course is to avoid
+sending your patch prematurely in the first place.
+
+Please be considerate of the time needed by reviewers to examine each
+new version of your patch. Rather than seeing the initial version right
+now (followed by several "oops, I like this version better than the
+previous one" patches over 2 days), reviewers would strongly prefer if a
+single polished version came 2 days later instead, and that version with
+fewer mistakes were the only one they would need to review.
+
+
[[reviewing]]
=== Responding to Reviews
diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index eee513e86f..c68cdb11b9 100644
--- a/Documentation/MyFirstObjectWalk.txt
+++ b/Documentation/MyFirstObjectWalk.txt
@@ -41,6 +41,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:
*/
#include "builtin.h"
+#include "trace.h"
int cmd_walken(int argc, const char **argv, const char *prefix)
{
@@ -49,12 +50,13 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
}
----
-NOTE: `trace_printf()` differs from `printf()` in that it can be turned on or
-off at runtime. For the purposes of this tutorial, we will write `walken` as
-though it is intended for use as a "plumbing" command: that is, a command which
-is used primarily in scripts, rather than interactively by humans (a "porcelain"
-command). So we will send our debug output to `trace_printf()` instead. When
-running, enable trace output by setting the environment variable `GIT_TRACE`.
+NOTE: `trace_printf()`, defined in `trace.h`, differs from `printf()` in
+that it can be turned on or off at runtime. For the purposes of this
+tutorial, we will write `walken` as though it is intended for use as
+a "plumbing" command: that is, a command which is used primarily in
+scripts, rather than interactively by humans (a "porcelain" command).
+So we will send our debug output to `trace_printf()` instead.
+When running, enable trace output by setting the environment variable `GIT_TRACE`.
Add usage text and `-h` handling, like all subcommands should consistently do
(our test suite will notice and complain if you fail to do so).
@@ -124,7 +126,7 @@ parameters provided by the user over the CLI.
`nr` represents the number of `rev_cmdline_entry` present in the array.
-`alloc` is used by the `ALLOC_GROW` macro. Check `cache.h` - this variable is
+`alloc` is used by the `ALLOC_GROW` macro. Check `alloc.h` - this variable is
used to track the allocated size of the list.
Per entry, we find:
@@ -341,6 +343,10 @@ the walk loop below the `prepare_revision_walk()` call within your
`walken_commit_walk()`:
----
+#include "pretty.h"
+
+...
+
static void walken_commit_walk(struct rev_info *rev)
{
struct commit *commit;
@@ -754,6 +760,10 @@ reachable objects are walked in order to populate the list.
First, add the `struct oidset` and related items we will use to iterate it:
----
+#include "oidset.h"
+
+...
+
static void walken_object_walk(
...
@@ -805,6 +815,10 @@ just walks of commits. First, we'll make our handlers chattier - modify
go:
----
+#include "hex.h"
+
+...
+
static void walken_show_commit(struct commit *cmt, void *buf)
{
trace_printf("commit: %s\n", oid_to_hex(&cmt->object.oid));
diff --git a/Documentation/RelNotes/2.42.0.txt b/Documentation/RelNotes/2.42.0.txt
index 85e078839c..0f1897ad5f 100644
--- a/Documentation/RelNotes/2.42.0.txt
+++ b/Documentation/RelNotes/2.42.0.txt
@@ -13,6 +13,37 @@ UI, Workflows & Features
enumerates extra objects to be used as anchoring points to keep
otherwise unreachable objects in cruft packs.
+ * Add more "git var" for toolsmiths to learn various locations Git is
+ configured with either via the configuration or hard-coded defaults.
+
+ * 'git notes append' was taught '--separator' to specify string to insert
+ between paragraphs.
+
+ * The "git for-each-ref" family of commands learned placeholders
+ related to GPG signature verification.
+
+ * "git diff --no-index" learned to read from named pipes as if they
+ were regular files, to allow "git diff <(process) <(substitution)"
+ some shells support.
+
+ * Help newbies by suggesting that there are cases where force-pushing
+ is a valid and sensible thing to update a branch at a remote
+ repository, rather than reconciling with merge/rebase.
+
+ * "git blame --contents=file" has been taught to work in a bare
+ repository.
+
+ * "git branch -f X" to repoint the branch X said that X was "checked
+ out" in another worktree, even when branch X was not and instead
+ being bisected or rebased. The message was reworded to say the
+ branch was "in use".
+
+ * Tone down the warning on SHA-256 repositories being an experimental
+ curiosity. We do not have support for them to interoperate with
+ traditional SHA-1 repositories, but at this point, we do not plan
+ to make breaking changes to SHA-256 repositories and there is no
+ longer need for such a strongly phrased warning.
+
Performance, Internal Implementation, Development Support etc.
@@ -31,6 +62,42 @@ Performance, Internal Implementation, Development Support etc.
* "git worktree" learned to work better with sparse index feature.
+ * When the external merge driver is killed by a signal, its output
+ should not be trusted as a resolution with conflicts that is
+ proposed by the driver, but the code did.
+
+ * The set-up code for the get_revision() API now allows feeding
+ options like --all and --not in the --stdin mode.
+
+ * Move functions that are not about pure string manipulation out of
+ strbuf.[ch]
+
+ * "imap-send" codepaths got cleaned up to get rid of unused
+ parameters.
+
+ * Enumerating refs in the packed-refs file, while excluding refs that
+ match certain patterns, has been optimized.
+
+ * Mark-up unused parameters in the code so that we can eventually
+ enable -Wunused-parameter by default.
+
+ * Instead of inventing a custom counter variables for debugging,
+ use existing trace2 facility in the fsync customization codepath.
+
+ * "git branch --list --format=<format>" and friends are taught
+ a new "%(describe)" placeholder.
+
+ * Clarify how to choose the starting point for a new topic in
+ developer guidance document.
+
+ * The implementation of "get_sha1_hex()" that reads a hexadecimal
+ string that spells a full object name has been extended to cope
+ with any hash function used in the repository, but the "sha1" in
+ its name survived. Rename it to get_hash_hex(), a name that is
+ more consistent within its friends like get_hash_hex_algop().
+
+ * Command line parser fix, and a small parse-options API update.
+
Fixes since v2.41
-----------------
@@ -117,6 +184,110 @@ Fixes since v2.41
between the way the code enumerates packfiles in the repository.
(merge 73320e49ad tb/collect-pack-filenames-fix later to maint).
+ * We create .pack and then .idx, we consider only packfiles that have
+ .idx usable (those with only .pack are not ready yet), so we should
+ remove .idx before removing .pack for consistency.
+ (merge 0dd1324a73 ds/remove-idx-before-pack later to maint).
+
+ * Partially revert a sanity check that the rest of the config code
+ was not ready, to avoid triggering it in a corner case.
+ (merge a53f43f900 gc/config-partial-submodule-kvi-fix later to maint).
+
+ * "git apply" punts when it is fed too large a patch input; the error
+ message it gives when it happens has been clarified.
+ (merge 42612e18d2 pw/apply-too-large later to maint).
+
+ * During a cherry-pick or revert session that works on multiple
+ commits, "git status" did not give correct information, which has
+ been corrected.
+ (merge a096a889f4 jk/cherry-pick-revert-status later to maint).
+
+ * A few places failed to differentiate the case where the index is
+ truly empty (nothing added) and we haven't yet read from the
+ on-disk index file, which have been corrected.
+ (merge 2ee045eea1 js/empty-index-fixes later to maint).
+
+ * "git bugreport" tests did not test what it wanted to test, which
+ has been corrected.
+ (merge 1aa92b8500 ma/t0091-fixup later to maint).
+
+ * Code snippets in a tutorial document no longer compiled after
+ recent header shuffling, which have been corrected.
+ (merge bbd7c7b7c0 vd/adjust-mfow-doc-to-updated-headers later to maint).
+
+ * "git ls-files '(attr:X)D/'" that triggers the common prefix
+ optimization codepath failed to read from "D/.gitattributes",
+ which has been corrected.
+ (merge f4a8fde057 jc/pathspec-match-with-common-prefix later to maint).
+
+ * "git fsck --no-progress" still spewed noise from the commit-graph
+ subsystem, which has been corrected.
+ (merge 9281cd07f0 tb/fsck-no-progress later to maint).
+
+ * Various offset computation in the code that accesses the packfiles
+ and other data in the object layer has been hardened against
+ arithmetic overflow, especially on 32-bit systems.
+ (merge 9a25cad7e0 tb/object-access-overflow-protection later to maint).
+
+ * Names of MinGW header files are spelled in mixed case in some
+ source files, but the build host can be using case sensitive
+ filesystem with header files with their name spelled in all
+ lowercase.
+ (merge 4a53d0d0bc mh/mingw-case-sensitive-build later to maint).
+
+ * Update message mark-up for i18n in "git bundle".
+ (merge bbb6acd998 dk/bundle-i18n-more later to maint).
+
+ * "git tag --list --points-at X" showed tags that directly refers to
+ object X, but did not list a tag that points at such a tag, which
+ has been corrected.
+
+ * "./configure --with-expat=no" did not work as a way to refuse use
+ of the expat library on a system with the library installed, which
+ has been corrected.
+ (merge fb8f7269c2 ah/autoconf-fixes later to maint).
+
+ * When the user edits "rebase -i" todo file so that it starts with a
+ "fixup", which would make it invalid, the command truncated the
+ rest of the file before giving an error and returning the control
+ back to the user. Stop truncating to make it easier to correct
+ such a malformed todo file.
+ (merge 9645a087c2 ah/sequencer-rewrite-todo-fix later to maint).
+
+ * Rewrite the description of giving a custom command to the
+ submodule.<name>.update configuration variable.
+ (merge 7cebc5bd78 pv/doc-submodule-update-settings later to maint).
+
+ * Adjust to OpenSSL 3+, which deprecates its SHA-1 functions based on
+ its traditional API, by using its EVP API instead.
+ (merge bda9c12073 ew/hash-with-openssl-evp later to maint).
+
+ * Exclude "." from the set of characters to be removed from the
+ beginning and the end of the human-readable name.
+ (merge 1c04cb0744 bc/ident-dot-is-no-longer-crud-letter later to maint).
+
+ * "git bisect visualize" stopped running "gitk" on Git for Windows
+ when the command was reimplemented in C around Git 2.34 timeframe.
+ This has been corrected.
+ (merge fff1594fa7 ma/locate-in-path-for-windows later to maint).
+
+ * "git rebase -i" with a series of squash/fixup, when one of the
+ steps stopped in conflicts and ended up getting skipped, did not
+ handle the accumulated commit log messages, which has been
+ corrected.
+ (merge 6ce7afe163 pw/rebase-skip-commit-message-fix later to maint).
+
+ * Adjust to newer Term::ReadLine to prevent it from breaking
+ the interactive prompt code in send-email.
+ (merge c016726c2d jk/send-email-with-new-readline later to maint).
+
+ * Windows updates.
+ (merge 0050f8e401 ds/maintenance-on-windows-fix later to maint).
+
+ * Correct use of lstat() that assumed a failing call would not
+ clobber the statbuf.
+ (merge 72695d8214 st/mv-lstat-fix later to maint).
+
* Other code cleanup, docfix, build fix, etc.
(merge 51f9d2e563 sa/doc-ls-remote later to maint).
(merge c6d26a9dda jk/format-patch-message-id-unleak later to maint).
@@ -134,3 +305,25 @@ Fixes since v2.41
(merge 6c26da8404 mh/credential-erase-improvements later to maint).
(merge 78e56cff69 tz/lib-gpg-prereq-fix later to maint).
(merge 80d32e84b5 rj/leakfixes later to maint).
+ (merge 0a868031ed pb/complete-diff-options later to maint).
+ (merge d4f28279ad jc/doc-hash-object-types later to maint).
+ (merge 1876a5ae15 ks/t4205-test-describe-with-abbrev-fix later to maint).
+ (merge 6e6a529b57 jk/fsck-indices-in-worktrees later to maint).
+ (merge 3e81b896f7 rs/packet-length-simplify later to maint).
+ (merge 4c9cb51fe7 mh/doc-credential-helpers later to maint).
+ (merge 3437f549dd jr/gitignore-doc-example-markup later to maint).
+ (merge 947ebd62a0 jc/am-parseopt-fix later to maint).
+ (merge e12cb98e1e jc/branch-parseopt-fix later to maint).
+ (merge d6f598e443 jc/gitignore-doc-pattern-markup later to maint).
+ (merge a2dad4868b jc/transport-parseopt-fix later to maint).
+ (merge 68cbb20e73 jc/parse-options-show-branch later to maint).
+ (merge 3821eb6c3d jc/parse-options-reset later to maint).
+ (merge c48af99a3e bb/trace2-comment-fix later to maint).
+ (merge c95ae3ff9c rs/describe-parseopt-fix later to maint).
+ (merge 36f76d2a25 rs/pack-objects-parseopt-fix later to maint).
+ (merge 30c8c55cbf jc/tree-walk-drop-base-offset later to maint).
+ (merge d089a06421 rs/bundle-parseopt-cleanup later to maint).
+ (merge 823839bda1 ew/sha256-gcrypt-leak-fixes later to maint).
+ (merge a5c01603b3 bc/ignore-clangd-cache later to maint).
+ (merge 12009a182b js/allow-t4000-to-be-indented-with-spaces later to maint).
+ (merge b3dcd24b8a jc/send-email-pre-process-fix later to maint).
diff --git a/Documentation/RelNotes/2.43.0.txt b/Documentation/RelNotes/2.43.0.txt
new file mode 100644
index 0000000000..7ed39b4700
--- /dev/null
+++ b/Documentation/RelNotes/2.43.0.txt
@@ -0,0 +1,157 @@
+Git v2.43 Release Notes
+=======================
+
+Backward Compatibility Notes
+
+ * The "--rfc" option of "git format-patch" used to be a valid way to
+ override an earlier "--subject-prefix=<something>" on the command
+ line and replace it with "[RFC PATCH]", but from this release, it
+ merely prefixes the string "RFC " in front of the given subject
+ prefix. If you are negatively affected by this change, please use
+ "--subject-prefix=PATCH --rfc" as a replacement.
+
+
+UI, Workflows & Features
+
+ * A message written in olden time prevented a branch from getting
+ checked out saying it is already checked out elsewhere, but these
+ days, we treat a branch that is being bisected or rebased just like
+ a branch that is checked out and protect it. Rephrase the message
+ to say that the branch is in use.
+
+ * Hourly and other schedule of "git maintenance" jobs are randomly
+ distributed now.
+
+ * "git cmd -h" learned to signal which options can be negated by
+ listing such options like "--[no-]opt".
+
+ * The way authentication related data other than passwords (e.g.
+ oath token and password expiration data) are stored in libsecret
+ keyrings has been rethought.
+
+ * Update two credential helpers to correctly match which credential
+ to erase; they dropped not the ones with stale password.
+
+ * Git GUI updates.
+
+ * "git format-patch" learns a way to feed cover letter description,
+ that (1) can be used on detached HEAD where there is no branch
+ description available, and (2) also can override the branch
+ description if there is one.
+
+ * Use of --max-pack-size to allow multiple packfiles to be created is
+ now supported even when we are sending unreachable objects to cruft
+ packs.
+
+ * "git format-patch --rfc --subject-prefix=<foo>" used to ignore the
+ "--subject-prefix" option and used "[RFC PATCH]"; now we will add
+ "RFC" prefix to whatever subject prefix is specified.
+
+ * "git log --format" has been taught the %(decorate) placeholder.
+
+ * The default log message created by "git revert", when reverting a
+ commit that records a revert, has been tweaked, to encourage people
+ describe complex "revert of revert of revert" situation better in
+ their own words.
+
+
+Performance, Internal Implementation, Development Support etc.
+
+ * "git check-attr" has been taught to work better with sparse-index.
+
+ * It may be tempting to leave the help text NULL for a command line
+ option that is either hidden or too obvious, but "git subcmd -h"
+ and "git subcmd --help-all" would have segfaulted if done so. Now
+ the help text is optional.
+
+ * Tests that are known to pass with LSan are now marked as such.
+ (merge 5fafe8c95f tb/mark-more-tests-as-leak-free later to maint).
+
+ * Flakey "git p4" tests, as well as "git svn" tests, are now skipped
+ in the (rather expensive) sanitizer CI job.
+ (merge 6ba913629f js/ci-san-skip-p4-and-svn-tests later to maint).
+
+ * Tests with LSan from time to time seem to emit harmless message
+ that makes our tests unnecessarily flakey; we work it around by
+ filtering the uninteresting output.
+ (merge 370ef7e40d jk/test-lsan-denoise-output later to maint).
+
+ * Unused parameters to functions are marked as such, and/or removed,
+ in order to bring us closer to -Wunused-parameter clean.
+
+
+Fixes since v2.42
+-----------------
+
+ * Overly long label names used in the sequencer machinery are now
+ chopped to fit under filesystem limitation.
+ (merge ac300bda10 mp/rebase-label-length-limit later to maint).
+
+ * Scalar updates.
+ (merge f9a547d3a7 ds/scalar-updates later to maint).
+
+ * Tweak GitHub Actions CI so that pushing the same commit to multiple
+ branch tips at the same time will not waste building and testing
+ the same thing twice.
+ (merge 99fe06cbfd jc/ci-skip-same-commit later to maint).
+
+ * The commit-graph verification code that detects mixture of zero and
+ non-zero generation numbers has been updated.
+ (merge db6044d762 tb/commit-graph-verify-fix later to maint).
+
+ * "git diff -w --exit-code" with various options did not work
+ correctly, which is being addressed.
+ (merge a64f8b2595 jc/diff-exit-code-with-w-fixes later to maint).
+
+ * transfer.unpackLimit ought to be used as a fallback, but overrode
+ fetch.unpackLimit and receive.unpackLimit instead.
+ (merge f3d33f8cfe ts/unpacklimit-config-fix later to maint).
+
+ * The use of API between two calls to require_clean_work_tree() from
+ the sequencer code has been cleaned up for consistency.
+ (merge a9b5955e07 ob/sequencer-empty-hint-fix later to maint).
+
+ * "git diff --no-such-option" and other corner cases around the exit
+ status of the "diff" command has been corrected.
+ (merge 5cc6b2d70b jk/diff-result-code-cleanup later to maint).
+
+ * "git for-each-ref --sort='contents:size'" sorts the refs according
+ to size numerically, giving a ref that points at a blob twelve-byte
+ (12) long before showing a blob hundred-byte (100) long.
+ (merge 6d79cd8474 ks/ref-filter-sort-numerically later to maint).
+
+ * We now limit depth of the tree objects and maximum length of
+ pathnames recorded in tree objects.
+ (merge 4d5693ba05 jk/tree-name-and-depth-limit later to maint).
+
+ * Various fixes to the behaviour of "rebase -i" when the command got
+ interrupted by conflicting changes.
+ (merge 203573b024 pw/rebase-i-after-failure later to maint).
+
+ * References from description of the `--patch` option in various
+ manual pages have been simplified and improved.
+ (merge 11422f23e3 so/diff-doc-for-patch-update later to maint).
+
+ * "git grep -e A --no-or -e B" is accepted, even though the negation
+ of "or" did not mean anything, which has been tightened.
+ (merge aae8558b10 rs/grep-no-no-or later to maint).
+
+ * The completion script (in contrib/) has been taught to treat the
+ "-t" option to "git checkout" and "git switch" just like the
+ "--track" option, to complete remote-tracking branches.
+ (merge 9f892830d6 js/complete-checkout-t later to maint).
+
+ * Other code cleanup, docfix, build fix, etc.
+ (merge fd3ba590d8 ws/git-push-doc-grammofix later to maint).
+ (merge 5f33a843de ds/upload-pack-error-sequence-fix later to maint).
+ (merge beaa1d952b jk/function-pointer-mismatches-fix later to maint).
+ (merge b46d806ea5 ob/t9001-indent-fix later to maint).
+ (merge fdc9914c28 ja/worktree-orphan later to maint).
+ (merge c2cbefc510 jc/mv-d-to-d-error-message-fix later to maint).
+ (merge d0fc552bfc ch/t6300-verify-commit-test-cleanup later to maint).
+ (merge aa4b83dd5e ws/git-svn-retire-faketerm later to maint).
+ (merge edf80d23f1 jk/ci-retire-allow-ref later to maint).
+ (merge 256a94ef6c bc/more-git-var later to maint).
+ (merge 82af2c639c ob/sequencer-reword-error-message later to maint).
+ (merge 2a63c79dae rs/grep-parseopt-simplify later to maint).
+ (merge 078c42531e rs/name-rev-use-opt-hidden-bool later to maint).
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index b218e27357..973d7a81d4 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -3,45 +3,101 @@ Submitting Patches
== Guidelines
-Here are some guidelines for people who want to contribute their code to this
-software. There is also a link:MyFirstContribution.html[step-by-step tutorial]
+Here are some guidelines for contributing back to this
+project. There is also a link:MyFirstContribution.html[step-by-step tutorial]
available which covers many of these same guidelines.
-[[base-branch]]
-=== Decide what to base your work on.
-
-In general, always base your work on the oldest branch that your
-change is relevant to.
-
-* A bugfix should be based on `maint` in general. If the bug is not
- present in `maint`, base it on `master`. For a bug that's not yet
- in `master`, find the topic that introduces the regression, and
- base your work on the tip of the topic.
-
-* A new feature should be based on `master` in general. If the new
- feature depends on other topics that are in `next`, but not in
- `master`, fork a branch from the tip of `master`, merge these topics
- to the branch, and work on that branch. You can remind yourself of
- how you prepared the base with `git log --first-parent master..`.
-
-* Corrections and enhancements to a topic not yet in `master` should
- be based on the tip of that topic. If the topic has not been merged
- to `next`, it's alright to add a note to squash minor corrections
- into the series.
-
-* In the exceptional case that a new feature depends on several topics
- not in `master`, start working on `next` or `seen` privately and
- send out patches only for discussion. Once your new feature starts
- to stabilize, you would have to rebase it (see the "depends on other
- topics" above).
-
-* Some parts of the system have dedicated maintainers with their own
- repositories (see the section "Subsystems" below). Changes to
- these parts should be based on their trees.
-
-To find the tip of a topic branch, run `git log --first-parent
-master..seen` and look for the merge commit. The second parent of this
-commit is the tip of the topic branch.
+[[choose-starting-point]]
+=== Choose a starting point.
+
+As a preliminary step, you must first choose a starting point for your
+work. Typically this means choosing a branch, although technically
+speaking it is actually a particular commit (typically the HEAD, or tip,
+of the branch).
+
+There are several important branches to be aware of. Namely, there are
+four integration branches as discussed in linkgit:gitworkflows[7]:
+
+* maint
+* master
+* next
+* seen
+
+The branches lower on the list are typically descendants of the ones
+that come before it. For example, `maint` is an "older" branch than
+`master` because `master` usually has patches (commits) on top of
+`maint`.
+
+There are also "topic" branches, which contain work from other
+contributors. Topic branches are created by the Git maintainer (in
+their fork) to organize the current set of incoming contributions on
+the mailing list, and are itemized in the regular "What's cooking in
+git.git" announcements. To find the tip of a topic branch, run `git log
+--first-parent master..seen` and look for the merge commit. The second
+parent of this commit is the tip of the topic branch.
+
+There is one guiding principle for choosing the right starting point: in
+general, always base your work on the oldest integration branch that
+your change is relevant to (see "Merge upwards" in
+linkgit:gitworkflows[7]). What this principle means is that for the
+vast majority of cases, the starting point for new work should be the
+latest HEAD commit of `maint` or `master` based on the following cases:
+
+* If you are fixing bugs in the released version, use `maint` as the
+ starting point (which may mean you have to fix things without using
+ new API features on the cutting edge that recently appeared in
+ `master` but were not available in the released version).
+
+* Otherwise (such as if you are adding new features) use `master`.
+
+
+NOTE: In exceptional cases, a bug that was introduced in an old
+version may have to be fixed for users of releases that are much older
+than the recent releases. `git describe --contains X` may describe
+`X` as `v2.30.0-rc2-gXXXXXX` for the commit `X` that introduced the
+bug, and the bug may be so high-impact that we may need to issue a new
+maintenance release for Git 2.30.x series, when "Git 2.41.0" is the
+current release. In such a case, you may want to use the tip of the
+maintenance branch for the 2.30.x series, which may be available in the
+`maint-2.30` branch in https://github.com/gitster/git[the maintainer's
+"broken out" repo].
+
+This also means that `next` or `seen` are inappropriate starting points
+for your work, if you want your work to have a realistic chance of
+graduating to `master`. They are simply not designed to be used as a
+base for new work; they are only there to make sure that topics in
+flight work well together. This is why both `next` and `seen` are
+frequently re-integrated with incoming patches on the mailing list and
+force-pushed to replace previous versions of themselves. A topic that is
+literally built on top of `next` cannot be merged to `master` without
+dragging in all the other topics in `next`, some of which may not be
+ready.
+
+For example, if you are making tree-wide changes, while somebody else is
+also making their own tree-wide changes, your work may have severe
+overlap with the other person's work. This situation may tempt you to
+use `next` as your starting point (because it would have the other
+person's work included in it), but doing so would mean you'll not only
+depend on the other person's work, but all the other random things from
+other contributors that are already integrated into `next`. And as soon
+as `next` is updated with a new version, all of your work will need to
+be rebased anyway in order for them to be cleanly applied by the
+maintainer.
+
+Under truly exceptional circumstances where you absolutely must depend
+on a select few topic branches that are already in `next` but not in
+`master`, you may want to create your own custom base-branch by forking
+`master` and merging the required topic branches to it. You could then
+work on top of this base-branch. But keep in mind that this base-branch
+would only be known privately to you. So when you are ready to send
+your patches to the list, be sure to communicate how you created it in
+your cover letter. This critical piece of information would allow
+others to recreate your base-branch on their end in order for them to
+try out your work.
+
+Finally, note that some parts of the system have dedicated maintainers
+with their own separate source code repositories (see the section
+"Subsystems" below).
[[separate-commits]]
=== Make separate commits for logically separate changes.
@@ -317,10 +373,13 @@ Please make sure your patch does not add commented out debugging code,
or include any extra files which do not relate to what your patch
is trying to achieve. Make sure to review
your patch after generating it, to ensure accuracy. Before
-sending out, please make sure it cleanly applies to the base you
-have chosen in the "Decide what to base your work on" section,
-and unless it targets the `master` branch (which is the default),
-mark your patches as such.
+sending out, please make sure it cleanly applies to the starting point you
+have chosen in the "Choose a starting point" section.
+
+NOTE: From the perspective of those reviewing your patch, the `master`
+branch is the default expected starting point. So if you have chosen a
+different starting point, please communicate this choice in your cover
+letter.
[[send-patches]]
diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
index dfbdaf00b8..0e8c2832bf 100644
--- a/Documentation/config/core.txt
+++ b/Documentation/config/core.txt
@@ -736,3 +736,9 @@ core.abbrev::
If set to "no", no abbreviation is made and the object names
are shown in their full length.
The minimum length is 4.
+
+core.maxTreeDepth::
+ The maximum depth Git is willing to recurse while traversing a
+ tree (e.g., "a/b/cde/f" has a depth of 4). This is a fail-safe
+ to allow Git to abort cleanly, and should not generally need to
+ be adjusted. The default is 4096.
diff --git a/Documentation/config/rebase.txt b/Documentation/config/rebase.txt
index afaf6dad99..9c248accec 100644
--- a/Documentation/config/rebase.txt
+++ b/Documentation/config/rebase.txt
@@ -77,3 +77,9 @@ rebase.rebaseMerges::
equivalent to `--no-rebase-merges`. Passing `--rebase-merges` on the
command line, with or without an argument, overrides any
`rebase.rebaseMerges` configuration.
+
+rebase.maxLabelLength::
+ When generating label names from commit subjects, truncate the names to
+ this length. By default, the names are truncated to a little less than
+ `NAME_MAX` (to allow e.g. `.lock` files to be written for the
+ corresponding loose refs).
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9f33f88771..c07488b123 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -22,13 +22,7 @@ ifndef::git-format-patch[]
-p::
-u::
--patch::
- Generate patch (see section titled
-ifdef::git-log[]
-<<generate_patch_text_with_p, "Generating patch text with -p">>).
-endif::git-log[]
-ifndef::git-log[]
-"Generating patch text with -p").
-endif::git-log[]
+ Generate patch (see <<generate_patch_text_with_p>>).
ifdef::git-diff[]
This is the default.
endif::git-diff[]
diff --git a/Documentation/fsck-msgids.txt b/Documentation/fsck-msgids.txt
index 12eae8a222..09b0aecbf8 100644
--- a/Documentation/fsck-msgids.txt
+++ b/Documentation/fsck-msgids.txt
@@ -103,6 +103,13 @@
`hasDotgit`::
(WARN) A tree contains an entry named `.git`.
+`largePathname`::
+ (WARN) A tree contains an entry with a very long path name. If
+ the value of `fsck.largePathname` contains a colon, that value
+ is used as the maximum allowable length (e.g., "warn:10" would
+ complain about any path component of 11 or more bytes). The
+ default value is 4096.
+
`mailmapSymlink`::
(INFO) `.mailmap` is a symlink.
diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index fbb39fbdf5..7872dba3ae 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -204,9 +204,14 @@ as an alternative to `visualize`):
$ git bisect visualize
------------
-If the `DISPLAY` environment variable is not set, 'git log' is used
-instead. You can also give command-line options such as `-p` and
-`--stat`.
+Git detects a graphical environment through various environment variables:
+`DISPLAY`, which is set in X Window System environments on Unix systems.
+`SESSIONNAME`, which is set under Cygwin in interactive desktop sessions.
+`MSYSTEM`, which is set under Msys2 and Git for Windows.
+`SECURITYSESSIONID`, which may be set on macOS in interactive desktop sessions.
+
+If none of these environment variables is set, 'git log' is used instead.
+You can also give command-line options such as `-p` and `--stat`.
------------
$ git bisect visualize --stat
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index 1e215d4e73..11b2bc3121 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -14,6 +14,7 @@ SYNOPSIS
[--points-at=<object>]
[--merged[=<object>]] [--no-merged[=<object>]]
[--contains[=<object>]] [--no-contains[=<object>]]
+ [--exclude=<pattern> ...]
DESCRIPTION
-----------
@@ -102,6 +103,11 @@ OPTIONS
Do not print a newline after formatted refs where the format expands
to the empty string.
+--exclude=<pattern>::
+ If one or more patterns are given, only refs which do not match
+ any excluded pattern(s) are shown. Matching is done using the
+ same rules as `<pattern>` above.
+
FIELD NAMES
-----------
@@ -221,6 +227,33 @@ symref::
`:lstrip` and `:rstrip` options in the same way as `refname`
above.
+signature::
+ The GPG signature of a commit.
+
+signature:grade::
+ Show "G" for a good (valid) signature, "B" for a bad
+ signature, "U" for a good signature with unknown validity, "X"
+ for a good signature that has expired, "Y" for a good
+ signature made by an expired key, "R" for a good signature
+ made by a revoked key, "E" if the signature cannot be
+ checked (e.g. missing key) and "N" for no signature.
+
+signature:signer::
+ The signer of the GPG signature of a commit.
+
+signature:key::
+ The key of the GPG signature of a commit.
+
+signature:fingerprint::
+ The fingerprint of the GPG signature of a commit.
+
+signature:primarykeyfingerprint::
+ The primary key fingerprint of the GPG signature of a commit.
+
+signature:trustlevel::
+ The trust level of the GPG signature of a commit. Possible
+ outputs are `ultimate`, `fully`, `marginal`, `never` and `undefined`.
+
worktreepath::
The absolute path to the worktree in which the ref is checked
out, if it is checked out in any linked worktree. Empty string
@@ -231,6 +264,29 @@ ahead-behind:<committish>::
commits ahead and behind, respectively, when comparing the output
ref to the `<committish>` specified in the format.
+describe[:options]::
+ A human-readable name, like linkgit:git-describe[1];
+ empty string for undescribable commits. The `describe` string may
+ be followed by a colon and one or more comma-separated options.
++
+--
+tags=<bool-value>;;
+ Instead of only considering annotated tags, consider
+ lightweight tags as well; see the corresponding option in
+ linkgit:git-describe[1] for details.
+abbrev=<number>;;
+ Use at least <number> hexadecimal digits; see the corresponding
+ option in linkgit:git-describe[1] for details.
+match=<pattern>;;
+ Only consider tags matching the given `glob(7)` pattern,
+ excluding the "refs/tags/" prefix; see the corresponding option
+ in linkgit:git-describe[1] for details.
+exclude=<pattern>;;
+ Do not consider tags matching the given `glob(7)` pattern,
+ excluding the "refs/tags/" prefix; see the corresponding option
+ in linkgit:git-describe[1] for details.
+--
+
In addition to the above, for commit and tag objects, the header
field names (`tree`, `parent`, `object`, `type`, and `tag`) can
be used to specify the value in the header field.
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 373b46fc0d..711823a7f4 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -215,11 +215,21 @@ is greater than 100 bytes, then the mode will be `message`, otherwise
If `<mode>` is `none`, both the cover letter subject and body will be
populated with placeholder text.
+--description-file=<file>::
+ Use the contents of <file> instead of the branch's description
+ for generating the cover letter.
+
--subject-prefix=<subject prefix>::
Instead of the standard '[PATCH]' prefix in the subject
- line, instead use '[<subject prefix>]'. This
- allows for useful naming of a patch series, and can be
- combined with the `--numbered` option.
+ line, instead use '[<subject prefix>]'. This can be used
+ to name a patch series, and can be combined with the
+ `--numbered` option.
++
+The configuration variable `format.subjectPrefix` may also be used
+to configure a subject prefix to apply to a given repository for
+all patches. This is often useful on mailing lists which receive
+patches for several repositories and can be used to disambiguate
+the patches (with a value of e.g. "PATCH my-project").
--filename-max-length=<n>::
Instead of the standard 64 bytes, chomp the generated output
@@ -229,9 +239,9 @@ populated with placeholder text.
variable, or 64 if unconfigured.
--rfc::
- Alias for `--subject-prefix="RFC PATCH"`. RFC means "Request For
- Comments"; use this when sending an experimental patch for
- discussion rather than application.
+ Prepends "RFC" to the subject prefix (producing "RFC PATCH" by
+ default). RFC means "Request For Comments"; use this when sending
+ an experimental patch for discussion rather than application.
-v <n>::
--reroll-count=<n>::
diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt
index 472b5bb995..8577f7a7d4 100644
--- a/Documentation/git-hash-object.txt
+++ b/Documentation/git-hash-object.txt
@@ -3,7 +3,7 @@ git-hash-object(1)
NAME
----
-git-hash-object - Compute object ID and optionally creates a blob from a file
+git-hash-object - Compute object ID and optionally create an object from a file
SYNOPSIS
@@ -25,7 +25,8 @@ OPTIONS
-------
-t <type>::
- Specify the type (default: "blob").
+ Specify the type of object to be created (default: "blob"). Possible
+ values are `commit`, `tree`, `blob`, and `tag`.
-w::
Actually write the object into the object database.
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index efbc10f0f5..f8310e56a8 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -9,10 +9,10 @@ SYNOPSIS
--------
[verse]
'git notes' [list [<object>]]
-'git notes' add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
+'git notes' add [-f] [--allow-empty] [--[no-]separator | --separator=<paragraph-break>] [--[no-]stripspace] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
'git notes' copy [-f] ( --stdin | <from-object> [<to-object>] )
-'git notes' append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
-'git notes' edit [--allow-empty] [<object>]
+'git notes' append [--allow-empty] [--[no-]separator | --separator=<paragraph-break>] [--[no-]stripspace] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
+'git notes' edit [--allow-empty] [<object>] [--[no-]stripspace]
'git notes' show [<object>]
'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
'git notes' merge --commit [-v | -q]
@@ -65,7 +65,9 @@ add::
However, if you're using `add` interactively (using an editor
to supply the notes contents), then - instead of aborting -
the existing notes will be opened in the editor (like the `edit`
- subcommand).
+ subcommand). If you specify multiple `-m` and `-F`, a blank
+ line will be inserted between the messages. Use the `--separator`
+ option to insert other delimiters.
copy::
Copy the notes for the first object onto the second object (defaults to
@@ -85,8 +87,12 @@ corresponding <to-object>. (The optional `<rest>` is ignored so that
the command can read the input given to the `post-rewrite` hook.)
append::
- Append to the notes of an existing object (defaults to HEAD).
- Creates a new notes object if needed.
+ Append new message(s) given by `-m` or `-F` options to an
+ existing note, or add them as a new note if one does not
+ exist, for the object (defaults to HEAD). When appending to
+ an existing note, a blank line is added before each new
+ message as an inter-paragraph separator. The separator can
+ be customized with the `--separator` option.
edit::
Edit the notes for a given object (defaults to HEAD).
@@ -136,6 +142,7 @@ OPTIONS
are concatenated as separate paragraphs.
Lines starting with `#` and empty lines other than a
single line between paragraphs will be stripped out.
+ If you wish to keep them verbatim, use `--no-stripspace`.
-F <file>::
--file=<file>::
@@ -143,12 +150,16 @@ OPTIONS
read the note message from the standard input.
Lines starting with `#` and empty lines other than a
single line between paragraphs will be stripped out.
+ If you wish to keep them verbatim, use `--no-stripspace`.
-C <object>::
--reuse-message=<object>::
Take the given blob object (for example, another note) as the
note message. (Use `git notes copy <object>` instead to
- copy notes between objects.)
+ copy notes between objects.). By default, message will be
+ copied verbatim, but if you wish to strip out the lines
+ starting with `#` and empty lines other than a single line
+ between paragraphs, use with`--stripspace` option.
-c <object>::
--reedit-message=<object>::
@@ -159,6 +170,19 @@ OPTIONS
Allow an empty note object to be stored. The default behavior is
to automatically remove empty notes.
+--[no-]separator, --separator=<paragraph-break>::
+ Specify a string used as a custom inter-paragraph separator
+ (a newline is added at the end as needed). If `--no-separator`, no
+ separators will be added between paragraphs. Defaults to a blank
+ line.
+
+--[no-]stripspace::
+ Strip leading and trailing whitespace from the note message.
+ Also strip out empty lines other than a single line between
+ paragraphs. Lines starting with `#` will be stripped out
+ in non-editor cases like `-m`, `-F` and `-C`, but not in
+ editor case like `git notes edit`, `-c`, etc.
+
--ref <ref>::
Manipulate the notes tree in <ref>. This overrides
`GIT_NOTES_REF` and the "core.notesRef" configuration. The ref
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index a9995a932c..dea7eacb0f 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -116,9 +116,7 @@ unreachable object whose mtime is newer than the `--cruft-expiration`).
+
Incompatible with `--unpack-unreachable`, `--keep-unreachable`,
`--pack-loose-unreachable`, `--stdin-packs`, as well as any other
-options which imply `--revs`. Also incompatible with `--max-pack-size`;
-when this option is set, the maximum pack size is not inferred from
-`pack.packSizeLimit`.
+options which imply `--revs`.
--cruft-expiration=<approxidate>::
If specified, objects are eliminated from the cruft pack if they
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 297927d866..5b4edaf4a8 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -37,7 +37,7 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
and if it is not found, honors `push.default` configuration to decide
what to push (See linkgit:git-config[1] for the meaning of `push.default`).
-When neither the command-line nor the configuration specify what to
+When neither the command-line nor the configuration specifies what to
push, the default behavior is used, which corresponds to the `simple`
value for `push.default`: the current branch is pushed to the
corresponding upstream branch, but as a safety measure, the push is
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index f26a7591e3..6a4968f68a 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -398,7 +398,7 @@ some-command [<options>] <args>...
some-command does foo and bar!
--
-h,help show the help
+h,help! show the help
foo some nifty option --foo
bar= some cool option --bar with an argument
@@ -424,10 +424,10 @@ usage: some-command [<options>] <args>...
some-command does foo and bar!
-h, --help show the help
- --foo some nifty option --foo
- --bar ... some cool option --bar with an argument
- --baz <arg> another cool option --baz with a named argument
- --qux[=<path>] qux may take a path argument but has meaning by itself
+ --[no-]foo some nifty option --foo
+ --[no-]bar ... some cool option --bar with an argument
+ --[no-]baz <arg> another cool option --baz with a named argument
+ --[no-]qux[=<path>] qux may take a path argument but has meaning by itself
An option group Header
-C[...] option C with an optional argument
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index d2e10d3dce..cbe0208834 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -142,6 +142,16 @@ EXAMPLES
changes. The revert only modifies the working tree and the
index.
+DISCUSSION
+----------
+
+While git creates a basic commit message automatically, it is
+_strongly_ recommended to explain why the original commit is being
+reverted.
+In addition, repeatedly reverting reverts will result in increasingly
+unwieldy subject lines, for example 'Reapply "Reapply "<original subject>""'.
+Please consider rewording these to be shorter and more unique.
+
CONFIGURATION
-------------
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 44c7387d78..2fe274b8fa 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -47,7 +47,7 @@ OPTIONS
-d::
--dereference::
- Dereference tags into object IDs as well. They will be shown with `{caret}{}`
+ Dereference tags into object IDs as well. They will be shown with `^{}`
appended.
-s::
@@ -78,7 +78,7 @@ OPTIONS
Make `git show-ref` act as a filter that reads refs from stdin of the
form `^(?:<anything>\s)?<refname>(?:\^{})?$`
and performs the following actions on each:
- (1) strip `{caret}{}` at the end of line if any;
+ (1) strip `^{}` at the end of line if any;
(2) ignore if pattern is provided and does not head-match refname;
(3) warn if refname is not a well-formed refname and skip;
(4) ignore if refname is a ref that exists in the local repository;
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 4d3ab6b9f9..695730609a 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -95,7 +95,7 @@ too (and can also report changes to a submodule's work tree).
init [--] [<path>...]::
Initialize the submodules recorded in the index (which were
added and committed elsewhere) by setting `submodule.$name.url`
- in .git/config. It uses the same setting from `.gitmodules` as
+ in `.git/config`, using the same setting from `.gitmodules` as
a template. If the URL is relative, it will be resolved using
the default remote. If there is no default remote, the current
repository will be assumed to be upstream.
@@ -105,9 +105,12 @@ If no path is specified and submodule.active has been configured, submodules
configured to be active will be initialized, otherwise all submodules are
initialized.
+
-When present, it will also copy the value of `submodule.$name.update`.
-This command does not alter existing information in .git/config.
-You can then customize the submodule clone URLs in .git/config
+It will also copy the value of `submodule.$name.update`, if present in
+the `.gitmodules` file, to `.git/config`, but (1) this command does not
+alter existing information in `.git/config`, and (2) `submodule.$name.update`
+that is set to a custom command is *not* copied for security reasons.
++
+You can then customize the submodule clone URLs in `.git/config`
for your local setup and proceed to `git submodule update`;
you can also just use `git submodule update --init` without
the explicit 'init' step if you do not intend to customize
@@ -143,6 +146,8 @@ the submodules. The "updating" can be done in several ways depending
on command line options and the value of `submodule.<name>.update`
configuration variable. The command line option takes precedence over
the configuration variable. If neither is given, a 'checkout' is performed.
+(note: what is in `.gitmodules` file is irrelevant at this point;
+see `git submodule init` above for how `.gitmodules` is used).
The 'update' procedures supported both from the command line as well as
through the `submodule.<name>.update` configuration are:
@@ -160,16 +165,18 @@ checked out in the submodule.
merge;; the commit recorded in the superproject will be merged
into the current branch in the submodule.
-The following 'update' procedures are only available via the
-`submodule.<name>.update` configuration variable:
+The following update procedures have additional limitations:
- custom command;; arbitrary shell command that takes a single
- argument (the sha1 of the commit recorded in the
- superproject) is executed. When `submodule.<name>.update`
- is set to '!command', the remainder after the exclamation mark
- is the custom command.
+ custom command;; mechanism for running arbitrary commands with the
+ commit ID as an argument. Specifically, if the
+ `submodule.<name>.update` configuration variable is set to
+ `!custom command`, the object name of the commit recorded in the
+ superproject for the submodule is appended to the `custom command`
+ string and executed. Note that this mechanism is not supported in
+ the `.gitmodules` file or on the command line.
- none;; the submodule is not updated.
+ none;; the submodule is not updated. This update procedure is not
+ allowed on the command line.
If the submodule is not yet initialized, and you just want to use the
setting as stored in `.gitmodules`, you can automatically initialize the
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
index f40202b8e3..c38fb3968b 100644
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -71,6 +71,29 @@ endif::git-default-pager[]
GIT_DEFAULT_BRANCH::
The name of the first branch created in newly initialized repositories.
+GIT_SHELL_PATH::
+ The path of the binary providing the POSIX shell for commands which use the shell.
+
+GIT_ATTR_SYSTEM::
+ The path to the system linkgit:gitattributes[5] file, if one is enabled.
+
+GIT_ATTR_GLOBAL::
+ The path to the global (per-user) linkgit:gitattributes[5] file.
+
+GIT_CONFIG_SYSTEM::
+ The path to the system configuration file, if one is enabled.
+
+GIT_CONFIG_GLOBAL::
+ The path to the global (per-user) configuration files, if any.
+
+Most path values contain only one value. However, some can contain multiple
+values, which are separated by newlines, and are listed in order from highest to
+lowest priority. Callers should be prepared for any such path value to contain
+multiple items.
+
+Note that paths are printed even if they do not exist, but not if they are
+disabled by other environment variables.
+
SEE ALSO
--------
linkgit:git-commit-tree[1]
diff --git a/Documentation/git.txt b/Documentation/git.txt
index f0cafa2290..11228956cd 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -553,8 +553,8 @@ double-quotes and respecting backslash escapes. E.g., the value
If this variable is set, the default hash algorithm for new
repositories will be set to this value. This value is
ignored when cloning and the setting of the remote repository
- is always used. The default is "sha1". THIS VARIABLE IS
- EXPERIMENTAL! See `--object-format` in linkgit:git-init[1].
+ is always used. The default is "sha1".
+ See `--object-format` in linkgit:git-init[1].
Git Commits
~~~~~~~~~~~
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 02a3ec83e4..6deb89a296 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -1132,7 +1132,10 @@ size (see below).
The merge driver is expected to leave the result of the merge in
the file named with `%A` by overwriting it, and exit with zero
status if it managed to merge them cleanly, or non-zero if there
-were conflicts.
+were conflicts. When the driver crashes (e.g. killed by SEGV),
+it is expected to exit with non-zero status that are higher than
+128, and in such a case, the merge results in a failure (which is
+different from producing a conflict).
The `merge.*.recursive` variable specifies what other merge
driver to use when the merge driver is called for an internal
diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt
index 65d652dc40..71dd19731a 100644
--- a/Documentation/gitcredentials.txt
+++ b/Documentation/gitcredentials.txt
@@ -104,6 +104,17 @@ $ git help credential-foo
$ git config --global credential.helper foo
-------------------------------------------
+=== Available helpers
+
+The community maintains a comprehensive list of Git credential helpers at
+https://git-scm.com/doc/credential-helpers.
+
+=== OAuth
+
+An alternative to inputting passwords or personal access tokens is to use an
+OAuth credential helper. Initial authentication opens a browser window to the
+host. Subsequent authentication happens in the background. Many popular Git
+hosts support OAuth.
CREDENTIAL CONTEXTS
-------------------
diff --git a/Documentation/gitformat-pack.txt b/Documentation/gitformat-pack.txt
index 0c1be2dbe8..870e00f298 100644
--- a/Documentation/gitformat-pack.txt
+++ b/Documentation/gitformat-pack.txt
@@ -588,51 +588,17 @@ later on.
It is linkgit:git-gc[1] that is typically responsible for removing expired
unreachable objects.
-=== Caution for mixed-version environments
-
-Repositories that have cruft packs in them will continue to work with any older
-version of Git. Note, however, that previous versions of Git which do not
-understand the `.mtimes` file will use the cruft pack's mtime as the mtime for
-all of the objects in it. In other words, do not expect older (pre-cruft pack)
-versions of Git to interpret or even read the contents of the `.mtimes` file.
-
-Note that having mixed versions of Git GC-ing the same repository can lead to
-unreachable objects never being completely pruned. This can happen under the
-following circumstances:
-
- - An older version of Git running GC explodes the contents of an existing
- cruft pack loose, using the cruft pack's mtime.
- - A newer version running GC collects those loose objects into a cruft pack,
- where the .mtime file reflects the loose object's actual mtimes, but the
- cruft pack mtime is "now".
-
-Repeating this process will lead to unreachable objects not getting pruned as a
-result of repeatedly resetting the objects' mtimes to the present time.
-
-If you are GC-ing repositories in a mixed version environment, consider omitting
-the `--cruft` option when using linkgit:git-repack[1] and linkgit:git-gc[1], and
-setting the `gc.cruftPacks` configuration to "false" until all writers
-understand cruft packs.
-
=== Alternatives
Notable alternatives to this design include:
- - The location of the per-object mtime data, and
- - Storing unreachable objects in multiple cruft packs.
+ - The location of the per-object mtime data.
On the location of mtime data, a new auxiliary file tied to the pack was chosen
to avoid complicating the `.idx` format. If the `.idx` format were ever to gain
support for optional chunks of data, it may make sense to consolidate the
`.mtimes` format into the `.idx` itself.
-Storing unreachable objects among multiple cruft packs (e.g., creating a new
-cruft pack during each repacking operation including only unreachable objects
-which aren't already stored in an earlier cruft pack) is significantly more
-complicated to construct, and so aren't pursued here. The obvious drawback to
-the current implementation is that the entire cruft pack must be re-written from
-scratch.
-
GIT
---
Part of the linkgit:git[1] suite
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 4c17f2356c..5e0964ef41 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -88,7 +88,7 @@ PATTERN FORMAT
Put a backslash ("`\`") in front of the first "`!`" for patterns
that begin with a literal "`!`", for example, "`\!important!.txt`".
- - The slash '/' is used as the directory separator. Separators may
+ - The slash "`/`" is used as the directory separator. Separators may
occur at the beginning, middle or end of the `.gitignore` search pattern.
- If there is a separator at the beginning or middle (or both) of the
@@ -174,10 +174,10 @@ EXAMPLES
is not relevant if there is already a middle slash in
the pattern.
- - The pattern "foo/*", matches "foo/test.json"
- (a regular file), "foo/bar" (a directory), but it does not match
- "foo/bar/hello.c" (a regular file), as the asterisk in the
- pattern does not match "bar/hello.c" which has a slash in it.
+ - The pattern `foo/*`, matches `foo/test.json`
+ (a regular file), `foo/bar` (a directory), but it does not match
+ `foo/bar/hello.c` (a regular file), as the asterisk in the
+ pattern does not match `bar/hello.c` which has a slash in it.
--------------------------------------------------------------
$ git status
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index dcee09b500..d9bec8b187 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -43,9 +43,9 @@ submodule.<name>.update::
command in the superproject. This is only used by `git
submodule init` to initialize the configuration variable of
the same name. Allowed values here are 'checkout', 'rebase',
- 'merge' or 'none'. See description of 'update' command in
- linkgit:git-submodule[1] for their meaning. For security
- reasons, the '!command' form is not accepted here.
+ 'merge' or 'none', but not '!command' (for security reasons).
+ See the description of the 'update' command in
+ linkgit:git-submodule[1] for more details.
submodule.<name>.branch::
A remote branch name for tracking updates in the upstream submodule.
diff --git a/Documentation/object-format-disclaimer.txt b/Documentation/object-format-disclaimer.txt
index 4cb106f0d1..e561e6668c 100644
--- a/Documentation/object-format-disclaimer.txt
+++ b/Documentation/object-format-disclaimer.txt
@@ -1,6 +1,9 @@
-THIS OPTION IS EXPERIMENTAL! SHA-256 support is experimental and still
-in an early stage. A SHA-256 repository will in general not be able to
-share work with "regular" SHA-1 repositories. It should be assumed
-that, e.g., Git internal file formats in relation to SHA-256
-repositories may change in backwards-incompatible ways. Only use
-`--object-format=sha256` for testing purposes.
+Note: At present, there is no interoperability between SHA-256
+repositories and SHA-1 repositories.
+
+Historically, we warned that SHA-256 repositories may later need
+backward incompatible changes when we introduce such interoperability
+features. Today, we only expect compatible changes. Furthermore, if such
+changes prove to be necessary, it can be expected that SHA-256 repositories
+created with today's Git will be usable by future versions of Git
+without data loss.
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 3b71334459..d38b4ab566 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -122,7 +122,9 @@ The placeholders are:
- Placeholders that expand to a single literal character:
'%n':: newline
'%%':: a raw '%'
-'%x00':: print a byte from a hex code
+'%x00':: '%x' followed by two hexadecimal digits is replaced with a
+ byte with the hexadecimal digits' value (we will call this
+ "literal formatting code" in the rest of this document).
- Placeholders that affect formatting of later placeholders:
'%Cred':: switch color to red
@@ -222,13 +224,30 @@ The placeholders are:
linkgit:git-rev-list[1])
'%d':: ref names, like the --decorate option of linkgit:git-log[1]
'%D':: ref names without the " (", ")" wrapping.
-'%(describe[:options])':: human-readable name, like
- linkgit:git-describe[1]; empty string for
- undescribable commits. The `describe` string
- may be followed by a colon and zero or more
- comma-separated options. Descriptions can be
- inconsistent when tags are added or removed at
- the same time.
+'%(decorate[:<options>])'::
+ref names with custom decorations. The `decorate` string may be followed by a
+colon and zero or more comma-separated options. Option values may contain
+literal formatting codes. These must be used for commas (`%x2C`) and closing
+parentheses (`%x29`), due to their role in the option syntax.
++
+** 'prefix=<value>': Shown before the list of ref names. Defaults to "{nbsp}`(`".
+** 'suffix=<value>': Shown after the list of ref names. Defaults to "`)`".
+** 'separator=<value>': Shown between ref names. Defaults to "`,`{nbsp}".
+** 'pointer=<value>': Shown between HEAD and the branch it points to, if any.
+ Defaults to "{nbsp}`->`{nbsp}".
+** 'tag=<value>': Shown before tag names. Defaults to "`tag:`{nbsp}".
+
++
+For example, to produce decorations with no wrapping
+or tag annotations, and spaces as separators:
++
+`%(decorate:prefix=,suffix=,tag=,separator= )`
+
+'%(describe[:<options>])'::
+human-readable name, like linkgit:git-describe[1]; empty string for
+undescribable commits. The `describe` string may be followed by a colon and
+zero or more comma-separated options. Descriptions can be inconsistent when
+tags are added or removed at the same time.
+
** 'tags[=<bool-value>]': Instead of only considering annotated tags,
consider lightweight tags as well.
@@ -281,13 +300,11 @@ endif::git-rev-list[]
'%gE':: reflog identity email (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
'%gs':: reflog subject
-'%(trailers[:options])':: display the trailers of the body as
- interpreted by
- linkgit:git-interpret-trailers[1]. The
- `trailers` string may be followed by a colon
- and zero or more comma-separated options.
- If any option is provided multiple times the
- last occurrence wins.
+'%(trailers[:<options>])'::
+display the trailers of the body as interpreted by
+linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by
+a colon and zero or more comma-separated options. If any option is provided
+multiple times, the last occurrence wins.
+
** 'key=<key>': only show trailers with specified <key>. Matching is done
case-insensitively and trailing colon is optional. If option is
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 3000888a90..a4a0cb93b2 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -236,10 +236,11 @@ ifndef::git-rev-list[]
endif::git-rev-list[]
--stdin::
- In addition to the '<commit>' listed on the command
- line, read them from the standard input. If a `--` separator is
- seen, stop reading commits and start reading paths to limit the
- result.
+ In addition to getting arguments from the command line, read
+ them from standard input as well. This accepts commits and
+ pseudo-options like `--all` and `--glob=`. When a `--` separator
+ is seen, the following input is treated as paths and used to
+ limit the result.
ifdef::git-rev-list[]
--quiet::
diff --git a/Documentation/scalar.txt b/Documentation/scalar.txt
index f33436c7f6..361f51a647 100644
--- a/Documentation/scalar.txt
+++ b/Documentation/scalar.txt
@@ -8,7 +8,8 @@ scalar - A tool for managing large Git repositories
SYNOPSIS
--------
[verse]
-scalar clone [--single-branch] [--branch <main-branch>] [--full-clone] <url> [<enlistment>]
+scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]
+ [--[no-]src] <url> [<enlistment>]
scalar list
scalar register [<enlistment>]
scalar unregister [<enlistment>]
@@ -80,6 +81,11 @@ remote-tracking branch for the branch this option was used for the initial
cloning. If the HEAD at the remote did not point at any branch when
`--single-branch` clone was made, no remote-tracking branch is created.
+--[no-]src::
+ By default, `scalar clone` places the cloned repository within a
+ `<entlistment>/src` directory. Use `--no-src` to place the cloned
+ repository directly in the `<enlistment>` directory.
+
--[no-]full-clone::
A sparse-checkout is initialized by default. This behavior can be
turned off via `--full-clone`.
diff --git a/Documentation/technical/api-merge.txt b/Documentation/technical/api-merge.txt
index 487d4d83ff..c2ba01828c 100644
--- a/Documentation/technical/api-merge.txt
+++ b/Documentation/technical/api-merge.txt
@@ -28,9 +28,9 @@ and `diff.c` for examples.
* `struct ll_merge_options`
-Check ll-merge.h for details.
+Check merge-ll.h for details.
Low-level (single file) merge
-----------------------------
-Check ll-merge.h for details.
+Check merge-ll.h for details.
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index aa385137ad..4281396093 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -4129,13 +4129,11 @@ Note that terminology has changed since that revision. For example, the
README in that revision uses the word "changeset" to describe what we
now call a <<def_commit_object,commit>>.
-Also, we do not call it "cache" any more, but rather "index"; however, the
-file is still called `cache.h`. Remark: Not much reason to change it now,
-especially since there is no good single name for it anyway, because it is
-basically _the_ header file which is included by _all_ of Git's C sources.
+Also, we do not call it "cache" any more, but rather "index"; however,
+the file is still called `read-cache.h`.
If you grasp the ideas in that initial commit, you should check out a
-more recent version and skim `cache.h`, `object.h` and `commit.h`.
+more recent version and skim `read-cache-ll.h`, `object.h` and `commit.h`.
In the early days, Git (in the tradition of UNIX) was a bunch of programs
which were extremely simple, and which you used in scripts, piping the
@@ -4146,11 +4144,11 @@ many of these parts have become builtins, and some of the core has been
and to avoid code duplication.
By now, you know what the index is (and find the corresponding data
-structures in `cache.h`), and that there are just a couple of object types
-(blobs, trees, commits and tags) which inherit their common structure from
-`struct object`, which is their first member (and thus, you can cast e.g.
-`(struct object *)commit` to achieve the _same_ as `&commit->object`, i.e.
-get at the object name and flags).
+structures in `read-cache-ll.h`), and that there are just a couple of
+object types (blobs, trees, commits and tags) which inherit their
+common structure from `struct object`, which is their first member
+(and thus, you can cast e.g. `(struct object *)commit` to achieve the
+_same_ as `&commit->object`, i.e. get at the object name and flags).
Now is a good point to take a break to let this information sink in.
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 07e72c28b8..9f0307d364 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v2.41.GIT
+DEF_VER=v2.42.GIT
LF='
'
diff --git a/Makefile b/Makefile
index e440728c24..5776309365 100644
--- a/Makefile
+++ b/Makefile
@@ -1051,7 +1051,6 @@ LIB_OBJS += linear-assignment.o
LIB_OBJS += list-objects-filter-options.o
LIB_OBJS += list-objects-filter.o
LIB_OBJS += list-objects.o
-LIB_OBJS += ll-merge.o
LIB_OBJS += lockfile.o
LIB_OBJS += log-tree.o
LIB_OBJS += ls-refs.o
@@ -1060,6 +1059,7 @@ LIB_OBJS += mailmap.o
LIB_OBJS += match-trees.o
LIB_OBJS += mem-pool.o
LIB_OBJS += merge-blobs.o
+LIB_OBJS += merge-ll.o
LIB_OBJS += merge-ort.o
LIB_OBJS += merge-ort-wrappers.o
LIB_OBJS += merge-recursive.o
@@ -1142,6 +1142,7 @@ LIB_OBJS += sigchain.o
LIB_OBJS += sparse-index.o
LIB_OBJS += split-index.o
LIB_OBJS += stable-qsort.o
+LIB_OBJS += statinfo.o
LIB_OBJS += strbuf.o
LIB_OBJS += streaming.o
LIB_OBJS += string-list.o
@@ -1951,7 +1952,7 @@ endif
BASIC_CFLAGS += \
-DSHA1DC_NO_STANDARD_INCLUDES \
-DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 \
- -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" \
+ -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"git-compat-util.h\"" \
-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\""
endif
endif
@@ -2742,8 +2743,8 @@ exec-cmd.sp exec-cmd.s exec-cmd.o: EXTRA_CPPFLAGS = \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DFALLBACK_RUNTIME_PREFIX="$(prefix_SQ)"'
-builtin/init-db.sp builtin/init-db.s builtin/init-db.o: GIT-PREFIX
-builtin/init-db.sp builtin/init-db.s builtin/init-db.o: EXTRA_CPPFLAGS = \
+setup.sp setup.s setup.o: GIT-PREFIX
+setup.sp setup.s setup.o: EXTRA_CPPFLAGS = \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
config.sp config.s config.o: GIT-PREFIX
@@ -2778,6 +2779,13 @@ compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
compat/nedmalloc/nedmalloc.sp: SP_EXTRA_FLAGS += -Wno-non-pointer-null
endif
+headless-git.o: compat/win32/headless.c GIT-CFLAGS
+ $(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
+ -fno-stack-protector -o $@ -c -Wall -Wwrite-strings $<
+
+headless-git$X: headless-git.o git.res GIT-LDFLAGS
+ $(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -mwindows -o $@ $< git.res
+
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
@@ -3215,6 +3223,12 @@ $(SP_OBJ): %.sp: %.c %.o
sparse: $(SP_OBJ)
EXCEPT_HDRS := $(GENERATED_H) unicode-width.h compat/% xdiff/%
+ifndef OPENSSL_SHA1
+ EXCEPT_HDRS += sha1/openssl.h
+endif
+ifndef OPENSSL_SHA256
+ EXCEPT_HDRS += sha256/openssl.h
+endif
ifndef NETTLE_SHA256
EXCEPT_HDRS += sha256/nettle.h
endif
@@ -3651,6 +3665,7 @@ clean: profile-clean coverage-clean cocciclean
$(RM) po/git.pot po/git-core.pot
$(RM) git.res
$(RM) $(OBJECTS)
+ $(RM) headless-git.o
$(RM) $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(REFTABLE_TEST_LIB)
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS)
$(RM) $(TEST_PROGRAMS)
@@ -3679,6 +3694,7 @@ endif
$(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PERL-HEADER GIT-PYTHON-VARS
ifdef MSVC
$(RM) $(patsubst %.o,%.o.pdb,$(OBJECTS))
+ $(RM) headless-git.o.pdb
$(RM) $(patsubst %.exe,%.pdb,$(OTHER_PROGRAMS))
$(RM) $(patsubst %.exe,%.iobj,$(OTHER_PROGRAMS))
$(RM) $(patsubst %.exe,%.ipdb,$(OTHER_PROGRAMS))
diff --git a/RelNotes b/RelNotes
index 0527f30c2d..278cea33c4 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.42.0.txt \ No newline at end of file
+Documentation/RelNotes/2.43.0.txt \ No newline at end of file
diff --git a/abspath.c b/abspath.c
index d032f5dce5..1202cde23d 100644
--- a/abspath.c
+++ b/abspath.c
@@ -289,3 +289,39 @@ char *prefix_filename_except_for_dash(const char *pfx, const char *arg)
return xstrdup(arg);
return prefix_filename(pfx, arg);
}
+
+void strbuf_add_absolute_path(struct strbuf *sb, const char *path)
+{
+ if (!*path)
+ die("The empty string is not a valid path");
+ if (!is_absolute_path(path)) {
+ struct stat cwd_stat, pwd_stat;
+ size_t orig_len = sb->len;
+ char *cwd = xgetcwd();
+ char *pwd = getenv("PWD");
+ if (pwd && strcmp(pwd, cwd) &&
+ !stat(cwd, &cwd_stat) &&
+ (cwd_stat.st_dev || cwd_stat.st_ino) &&
+ !stat(pwd, &pwd_stat) &&
+ pwd_stat.st_dev == cwd_stat.st_dev &&
+ pwd_stat.st_ino == cwd_stat.st_ino)
+ strbuf_addstr(sb, pwd);
+ else
+ strbuf_addstr(sb, cwd);
+ if (sb->len > orig_len && !is_dir_sep(sb->buf[sb->len - 1]))
+ strbuf_addch(sb, '/');
+ free(cwd);
+ }
+ strbuf_addstr(sb, path);
+}
+
+void strbuf_add_real_path(struct strbuf *sb, const char *path)
+{
+ if (sb->len) {
+ struct strbuf resolved = STRBUF_INIT;
+ strbuf_realpath(&resolved, path, 1);
+ strbuf_addbuf(sb, &resolved);
+ strbuf_release(&resolved);
+ } else
+ strbuf_realpath(sb, path, 1);
+}
diff --git a/abspath.h b/abspath.h
index 7cd3de5e9d..4653080d5e 100644
--- a/abspath.h
+++ b/abspath.h
@@ -30,4 +30,25 @@ static inline int is_absolute_path(const char *path)
return is_dir_sep(path[0]) || has_dos_drive_prefix(path);
}
+/**
+ * Add a path to a buffer, converting a relative path to an
+ * absolute one in the process. Symbolic links are not
+ * resolved.
+ */
+void strbuf_add_absolute_path(struct strbuf *sb, const char *path);
+
+/**
+ * Canonize `path` (make it absolute, resolve symlinks, remove extra
+ * slashes) and append it to `sb`. Die with an informative error
+ * message if there is a problem.
+ *
+ * The directory part of `path` (i.e., everything up to the last
+ * dir_sep) must denote a valid, existing directory, but the last
+ * component need not exist.
+ *
+ * Callers that don't mind links should use the more lightweight
+ * strbuf_add_absolute_path() instead.
+ */
+void strbuf_add_real_path(struct strbuf *sb, const char *path);
+
#endif /* ABSPATH_H */
diff --git a/add-interactive.c b/add-interactive.c
index de877ca052..6bf87e7ae7 100644
--- a/add-interactive.c
+++ b/add-interactive.c
@@ -1,10 +1,14 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "add-interactive.h"
#include "color.h"
#include "config.h"
#include "diffcore.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
+#include "preload-index.h"
+#include "read-cache-ll.h"
+#include "repository.h"
#include "revision.h"
#include "refs.h"
#include "string-list.h"
@@ -565,7 +569,7 @@ static int get_modified_files(struct repository *r,
copy_pathspec(&rev.prune_data, ps);
if (s.mode == FROM_INDEX)
- run_diff_index(&rev, 1);
+ run_diff_index(&rev, DIFF_INDEX_CACHED);
else {
rev.diffopt.flags.ignore_dirty_submodules = 1;
run_diff_files(&rev, 0);
@@ -1017,9 +1021,9 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,
return res;
}
-static int run_help(struct add_i_state *s, const struct pathspec *unused_ps,
- struct prefix_item_list *unused_files,
- struct list_and_choose_options *unused_opts)
+static int run_help(struct add_i_state *s, const struct pathspec *ps UNUSED,
+ struct prefix_item_list *files UNUSED,
+ struct list_and_choose_options *opts UNUSED)
{
color_fprintf_ln(stdout, s->help_color, "status - %s",
_("show paths with changes"));
@@ -1070,7 +1074,7 @@ struct print_command_item_data {
const char *color, *reset;
};
-static void print_command_item(int i, int selected,
+static void print_command_item(int i, int selected UNUSED,
struct string_list_item *item,
void *print_command_item_data)
{
diff --git a/add-patch.c b/add-patch.c
index 8d770d203f..bfe19876cd 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1,11 +1,12 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "add-interactive.h"
#include "advice.h"
-#include "alloc.h"
#include "editor.h"
#include "environment.h"
#include "gettext.h"
#include "object-name.h"
+#include "read-cache-ll.h"
+#include "repository.h"
#include "strbuf.h"
#include "run-command.h"
#include "strvec.h"
@@ -1105,10 +1106,11 @@ static int edit_hunk_manually(struct add_p_state *s, struct hunk *hunk)
size_t i;
strbuf_reset(&s->buf);
- strbuf_commented_addf(&s->buf, _("Manual hunk edit mode -- see bottom for "
- "a quick guide.\n"));
+ strbuf_commented_addf(&s->buf, comment_line_char,
+ _("Manual hunk edit mode -- see bottom for "
+ "a quick guide.\n"));
render_hunk(s, hunk, 0, 0, &s->buf);
- strbuf_commented_addf(&s->buf,
+ strbuf_commented_addf(&s->buf, comment_line_char,
_("---\n"
"To remove '%c' lines, make them ' ' lines "
"(context).\n"
@@ -1117,12 +1119,13 @@ static int edit_hunk_manually(struct add_p_state *s, struct hunk *hunk)
s->mode->is_reverse ? '+' : '-',
s->mode->is_reverse ? '-' : '+',
comment_line_char);
- strbuf_commented_addf(&s->buf, "%s", _(s->mode->edit_hunk_hint));
+ strbuf_commented_addf(&s->buf, comment_line_char, "%s",
+ _(s->mode->edit_hunk_hint));
/*
* TRANSLATORS: 'it' refers to the patch mentioned in the previous
* messages.
*/
- strbuf_commented_addf(&s->buf,
+ strbuf_commented_addf(&s->buf, comment_line_char,
_("If it does not apply cleanly, you will be "
"given an opportunity to\n"
"edit again. If all lines of the hunk are "
diff --git a/advice.c b/advice.c
index e5a9bb9b44..50c79443ba 100644
--- a/advice.c
+++ b/advice.c
@@ -191,9 +191,10 @@ int error_resolve_conflict(const char *me)
error(_("Pulling is not possible because you have unmerged files."));
else if (!strcmp(me, "revert"))
error(_("Reverting is not possible because you have unmerged files."));
+ else if (!strcmp(me, "rebase"))
+ error(_("Rebasing is not possible because you have unmerged files."));
else
- error(_("It is not possible to %s because you have unmerged files."),
- me);
+ BUG("Unhandled conflict reason '%s'", me);
if (advice_enabled(ADVICE_RESOLVE_CONFLICT))
/*
diff --git a/alias.c b/alias.c
index 54a1a23d2c..5a238f2e30 100644
--- a/alias.c
+++ b/alias.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "alias.h"
-#include "alloc.h"
#include "config.h"
#include "gettext.h"
#include "strbuf.h"
@@ -12,7 +11,8 @@ struct config_alias_data {
struct string_list *list;
};
-static int config_alias_cb(const char *key, const char *value, void *d)
+static int config_alias_cb(const char *key, const char *value,
+ const struct config_context *ctx UNUSED, void *d)
{
struct config_alias_data *data = d;
const char *p;
diff --git a/alloc.h b/alloc.h
index 4312db4bd0..3f4a0ad310 100644
--- a/alloc.h
+++ b/alloc.h
@@ -17,79 +17,4 @@ 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 6212ab3a1b..3d69fec836 100644
--- a/apply.c
+++ b/apply.c
@@ -7,12 +7,11 @@
*
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "base85.h"
#include "config.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "blob.h"
#include "delta.h"
#include "diff.h"
@@ -21,19 +20,22 @@
#include "gettext.h"
#include "hex.h"
#include "xdiff-interface.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "lockfile.h"
+#include "name-hash.h"
#include "object-name.h"
#include "object-file.h"
#include "parse-options.h"
+#include "path.h"
#include "quote.h"
+#include "read-cache.h"
#include "rerere.h"
#include "apply.h"
#include "entry.h"
#include "setup.h"
#include "symlinks.h"
+#include "wildmatch.h"
#include "ws.h"
-#include "wrapper.h"
struct gitdiff_data {
struct strbuf *root;
@@ -410,9 +412,10 @@ static void say_patch_name(FILE *output, const char *fmt, struct patch *patch)
static int read_patch_file(struct strbuf *sb, int fd)
{
- if (strbuf_read(sb, fd, 0) < 0 || sb->len >= MAX_APPLY_SIZE)
- return error_errno("git apply: failed to read");
-
+ if (strbuf_read(sb, fd, 0) < 0)
+ return error_errno(_("failed to read patch"));
+ else if (sb->len >= MAX_APPLY_SIZE)
+ return error(_("patch too large"));
/*
* Make sure that we have some slop in the buffer
* so that we can do speculative "memcmp" etc, and
diff --git a/archive-tar.c b/archive-tar.c
index 4cd81d8161..0726996839 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -2,14 +2,13 @@
* Copyright (c) 2005, 2006 Rene Scharfe
*/
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "gettext.h"
#include "git-zlib.h"
#include "hex.h"
#include "tar.h"
#include "archive.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "streaming.h"
#include "run-command.h"
#include "write-or-die.h"
@@ -411,14 +410,15 @@ static int tar_filter_config(const char *var, const char *value,
return 0;
}
-static int git_tar_config(const char *var, const char *value, void *cb)
+static int git_tar_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "tar.umask")) {
if (value && !strcmp(value, "user")) {
tar_umask = umask(0);
umask(tar_umask);
} else {
- tar_umask = git_config_int(var, value);
+ tar_umask = git_config_int(var, value, ctx->kvi);
}
return 0;
}
diff --git a/archive-zip.c b/archive-zip.c
index d0d065a312..7229e3e454 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -9,7 +9,7 @@
#include "hex.h"
#include "streaming.h"
#include "utf8.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "userdiff.h"
#include "write-or-die.h"
#include "xdiff-interface.h"
@@ -617,6 +617,7 @@ static void dos_time(timestamp_t *timestamp, int *dos_date, int *dos_time)
}
static int archive_zip_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *data UNUSED)
{
return userdiff_config(var, value);
diff --git a/archive.c b/archive.c
index 2ea9cbef92..ca11db185b 100644
--- a/archive.c
+++ b/archive.c
@@ -1,15 +1,15 @@
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "convert.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
+#include "path.h"
#include "pretty.h"
#include "setup.h"
#include "refs.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
#include "tree.h"
#include "tree-walk.h"
diff --git a/attr.c b/attr.c
index d45d34058d..71c84fbcf8 100644
--- a/attr.c
+++ b/attr.c
@@ -6,18 +6,19 @@
* an insanely large number of attributes.
*/
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "config.h"
#include "environment.h"
#include "exec-cmd.h"
#include "attr.h"
#include "dir.h"
#include "gettext.h"
+#include "path.h"
#include "utf8.h"
#include "quote.h"
+#include "read-cache-ll.h"
#include "revision.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "setup.h"
#include "thread-utils.h"
#include "tree-walk.h"
@@ -806,35 +807,56 @@ static struct attr_stack *read_attr_from_blob(struct index_state *istate,
static struct attr_stack *read_attr_from_index(struct index_state *istate,
const char *path, unsigned flags)
{
+ struct attr_stack *stack = NULL;
char *buf;
unsigned long size;
+ int sparse_dir_pos = -1;
if (!istate)
return NULL;
/*
- * The .gitattributes file only applies to files within its
- * parent directory. In the case of cone-mode sparse-checkout,
- * the .gitattributes file is sparse if and only if all paths
- * within that directory are also sparse. Thus, don't load the
- * .gitattributes file since it will not matter.
- *
- * In the case of a sparse index, it is critical that we don't go
- * looking for a .gitattributes file, as doing so would cause the
- * index to expand.
+ * When handling sparse-checkouts, .gitattributes files
+ * may reside within a sparse directory. We distinguish
+ * whether a path exists directly in the index or not by
+ * evaluating if 'pos' is negative.
+ * If 'pos' is negative, the path is not directly present
+ * in the index and is likely within a sparse directory.
+ * For paths not in the index, The absolute value of 'pos'
+ * minus 1 gives us the position where the path would be
+ * inserted in lexicographic order within the index.
+ * We then subtract another 1 from this value
+ * (sparse_dir_pos = -pos - 2) to find the position of the
+ * last index entry which is lexicographically smaller than
+ * the path. This would be the sparse directory containing
+ * the path. By identifying the sparse directory containing
+ * the path, we can correctly read the attributes specified
+ * in the .gitattributes file from the tree object of the
+ * sparse directory.
*/
- if (!path_in_cone_mode_sparse_checkout(path, istate))
- return NULL;
+ if (!path_in_cone_mode_sparse_checkout(path, istate)) {
+ int pos = index_name_pos_sparse(istate, path, strlen(path));
- buf = read_blob_data_from_index(istate, path, &size);
- if (!buf)
- return NULL;
- if (size >= ATTR_MAX_FILE_SIZE) {
- warning(_("ignoring overly large gitattributes blob '%s'"), path);
- return NULL;
+ if (pos < 0)
+ sparse_dir_pos = -pos - 2;
}
- return read_attr_from_buf(buf, path, flags);
+ if (sparse_dir_pos >= 0 &&
+ S_ISSPARSEDIR(istate->cache[sparse_dir_pos]->ce_mode) &&
+ !strncmp(istate->cache[sparse_dir_pos]->name, path, ce_namelen(istate->cache[sparse_dir_pos]))) {
+ const char *relative_path = path + ce_namelen(istate->cache[sparse_dir_pos]);
+ stack = read_attr_from_blob(istate, &istate->cache[sparse_dir_pos]->oid, relative_path, flags);
+ } else {
+ buf = read_blob_data_from_index(istate, path, &size);
+ if (!buf)
+ return NULL;
+ if (size >= ATTR_MAX_FILE_SIZE) {
+ warning(_("ignoring overly large gitattributes blob '%s'"), path);
+ return NULL;
+ }
+ stack = read_attr_from_buf(buf, path, flags);
+ }
+ return stack;
}
static struct attr_stack *read_attr(struct index_state *istate,
@@ -870,7 +892,7 @@ static struct attr_stack *read_attr(struct index_state *istate,
return res;
}
-static const char *git_etc_gitattributes(void)
+const char *git_attr_system_file(void)
{
static const char *system_wide;
if (!system_wide)
@@ -878,7 +900,7 @@ static const char *git_etc_gitattributes(void)
return system_wide;
}
-static const char *get_home_gitattributes(void)
+const char *git_attr_global_file(void)
{
if (!git_attributes_file)
git_attributes_file = xdg_config_home("attributes");
@@ -886,7 +908,7 @@ static const char *get_home_gitattributes(void)
return git_attributes_file;
}
-static int git_attr_system(void)
+int git_attr_system_is_enabled(void)
{
return !git_env_bool("GIT_ATTR_NOSYSTEM", 0);
}
@@ -920,14 +942,14 @@ static void bootstrap_attr_stack(struct index_state *istate,
push_stack(stack, e, NULL, 0);
/* system-wide frame */
- if (git_attr_system()) {
- e = read_attr_from_file(git_etc_gitattributes(), flags);
+ if (git_attr_system_is_enabled()) {
+ e = read_attr_from_file(git_attr_system_file(), flags);
push_stack(stack, e, NULL, 0);
}
/* home directory */
- if (get_home_gitattributes()) {
- e = read_attr_from_file(get_home_gitattributes(), flags);
+ if (git_attr_global_file()) {
+ e = read_attr_from_file(git_attr_global_file(), flags);
push_stack(stack, e, NULL, 0);
}
diff --git a/attr.h b/attr.h
index 676bd17ce2..2b745df405 100644
--- a/attr.h
+++ b/attr.h
@@ -227,4 +227,13 @@ void git_attr_set_direction(enum git_attr_direction new_direction);
void attr_start(void);
+/* Return the system gitattributes file. */
+const char *git_attr_system_file(void);
+
+/* Return the global gitattributes file, if any. */
+const char *git_attr_global_file(void);
+
+/* Return whether the system gitattributes file is enabled and should be used. */
+int git_attr_system_is_enabled(void);
+
#endif /* ATTR_H */
diff --git a/bisect.c b/bisect.c
index 8d5f8e5885..1be8e0a271 100644
--- a/bisect.c
+++ b/bisect.c
@@ -18,7 +18,8 @@
#include "commit-slab.h"
#include "commit-reach.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "dir.h"
static struct oid_array good_revs;
diff --git a/blame.c b/blame.c
index b830654062..141756975b 100644
--- a/blame.c
+++ b/blame.c
@@ -1,6 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "refs.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "cache-tree.h"
#include "mergesort.h"
#include "convert.h"
@@ -8,6 +8,8 @@
#include "diffcore.h"
#include "gettext.h"
#include "hex.h"
+#include "path.h"
+#include "read-cache.h"
#include "setup.h"
#include "tag.h"
#include "trace2.h"
@@ -2804,7 +2806,9 @@ void setup_scoreboard(struct blame_scoreboard *sb,
parent_oid = &head_oid;
}
- setup_work_tree();
+ if (!sb->contents_from)
+ setup_work_tree();
+
sb->final = fake_working_tree_commit(sb->repo,
&sb->revs->diffopt,
sb->path, sb->contents_from,
diff --git a/blame.h b/blame.h
index b60d1d81e3..31ddc85f19 100644
--- a/blame.h
+++ b/blame.h
@@ -2,6 +2,7 @@
#define BLAME_H
#include "commit.h"
+#include "oidset.h"
#include "xdiff-interface.h"
#include "revision.h"
#include "prio-queue.h"
diff --git a/branch.c b/branch.c
index d88f50a48a..06f7af9dd4 100644
--- a/branch.c
+++ b/branch.c
@@ -6,6 +6,7 @@
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
+#include "path.h"
#include "refs.h"
#include "refspec.h"
#include "remote.h"
@@ -470,7 +471,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref, int force)
if ((path = branch_checked_out(ref->buf)))
die(_("cannot force update the branch '%s' "
- "checked out at '%s'"),
+ "used by worktree at '%s'"),
ref->buf + strlen("refs/heads/"), path);
return 1;
@@ -837,7 +838,7 @@ void die_if_checked_out(const char *branch, int ignore_current_worktree)
if (is_shared_symref(worktrees[i], "HEAD", branch)) {
skip_prefix(branch, "refs/heads/", &branch);
- die(_("'%s' is already checked out at '%s'"),
+ die(_("'%s' is already used by worktree at '%s'"),
branch, worktrees[i]->path);
}
}
diff --git a/builtin.h b/builtin.h
index cb0db67681..d560baa661 100644
--- a/builtin.h
+++ b/builtin.h
@@ -2,9 +2,6 @@
#define BUILTIN_H
#include "git-compat-util.h"
-#include "strbuf.h"
-#include "cache.h"
-#include "commit.h"
/*
* builtin API
diff --git a/builtin/add.c b/builtin/add.c
index 6137e7b4ad..c27254a5cd 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -4,10 +4,9 @@
* Copyright (C) 2006 Linus Torvalds
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "advice.h"
#include "config.h"
-#include "builtin.h"
#include "lockfile.h"
#include "editor.h"
#include "dir.h"
@@ -17,8 +16,12 @@
#include "cache-tree.h"
#include "run-command.h"
#include "parse-options.h"
+#include "path.h"
+#include "preload-index.h"
#include "diff.h"
#include "diffcore.h"
+#include "read-cache.h"
+#include "repository.h"
#include "revision.h"
#include "bulk-checkin.h"
#include "strvec.h"
@@ -36,11 +39,6 @@ static int pathspec_file_nul;
static int include_sparse;
static const char *pathspec_from_file;
-struct update_callback_data {
- int flags;
- int add_errors;
-};
-
static int chmod_pathspec(struct pathspec *pathspec, char flip, int show_only)
{
int i, ret = 0;
@@ -69,95 +67,6 @@ static int chmod_pathspec(struct pathspec *pathspec, char flip, int show_only)
return ret;
}
-static int fix_unmerged_status(struct diff_filepair *p,
- struct update_callback_data *data)
-{
- if (p->status != DIFF_STATUS_UNMERGED)
- return p->status;
- if (!(data->flags & ADD_CACHE_IGNORE_REMOVAL) && !p->two->mode)
- /*
- * This is not an explicit add request, and the
- * path is missing from the working tree (deleted)
- */
- return DIFF_STATUS_DELETED;
- else
- /*
- * Either an explicit add request, or path exists
- * in the working tree. An attempt to explicitly
- * add a path that does not exist in the working tree
- * will be caught as an error by the caller immediately.
- */
- return DIFF_STATUS_MODIFIED;
-}
-
-static void update_callback(struct diff_queue_struct *q,
- struct diff_options *opt UNUSED, void *cbdata)
-{
- int i;
- struct update_callback_data *data = cbdata;
-
- for (i = 0; i < q->nr; i++) {
- struct diff_filepair *p = q->queue[i];
- const char *path = p->one->path;
-
- if (!include_sparse && !path_in_sparse_checkout(path, &the_index))
- continue;
-
- switch (fix_unmerged_status(p, data)) {
- default:
- die(_("unexpected diff status %c"), p->status);
- case DIFF_STATUS_MODIFIED:
- case DIFF_STATUS_TYPE_CHANGED:
- if (add_file_to_index(&the_index, path, data->flags)) {
- if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
- die(_("updating files failed"));
- data->add_errors++;
- }
- break;
- case DIFF_STATUS_DELETED:
- if (data->flags & ADD_CACHE_IGNORE_REMOVAL)
- break;
- if (!(data->flags & ADD_CACHE_PRETEND))
- remove_file_from_index(&the_index, path);
- if (data->flags & (ADD_CACHE_PRETEND|ADD_CACHE_VERBOSE))
- printf(_("remove '%s'\n"), path);
- break;
- }
- }
-}
-
-int add_files_to_cache(const char *prefix,
- const struct pathspec *pathspec, int flags)
-{
- struct update_callback_data data;
- struct rev_info rev;
-
- memset(&data, 0, sizeof(data));
- data.flags = flags;
-
- repo_init_revisions(the_repository, &rev, prefix);
- setup_revisions(0, NULL, &rev, NULL);
- if (pathspec)
- copy_pathspec(&rev.prune_data, pathspec);
- rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;
- rev.diffopt.format_callback = update_callback;
- rev.diffopt.format_callback_data = &data;
- rev.diffopt.flags.override_submodule_config = 1;
- rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
-
- /*
- * Use an ODB transaction to optimize adding multiple objects.
- * This function is invoked from commands other than 'add', which
- * may not have their own transaction active.
- */
- begin_odb_transaction();
- run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
- end_odb_transaction();
-
- release_revisions(&rev);
- return !!data.add_errors;
-}
-
static int renormalize_tracked_files(const struct pathspec *pathspec, int flags)
{
int i, retval = 0;
@@ -285,8 +194,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
out = xopen(file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
rev.diffopt.file = xfdopen(out, "w");
rev.diffopt.close_file = 1;
- if (run_diff_files(&rev, 0))
- die(_("Could not write patch"));
+ run_diff_files(&rev, 0);
if (launch_editor(file, NULL, NULL))
die(_("editing patch failed"));
@@ -323,6 +231,8 @@ static char *chmod_arg;
static int ignore_removal_cb(const struct option *opt, const char *arg, int unset)
{
+ BUG_ON_OPT_ARG(arg);
+
/* if we are told to ignore, we are not adding removals */
*(int *)opt->value = !unset ? 0 : 1;
return 0;
@@ -357,7 +267,8 @@ static struct option builtin_add_options[] = {
OPT_END(),
};
-static int add_config(const char *var, const char *value, void *cb)
+static int add_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "add.ignoreerrors") ||
!strcmp(var, "add.ignore-errors")) {
@@ -365,7 +276,10 @@ static int add_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_color_default_config(var, value, cb);
+ if (git_color_config(var, value, cb) < 0)
+ return -1;
+
+ return git_default_config(var, value, ctx, cb);
}
static const char embedded_advice[] = N_(
@@ -640,7 +554,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
if (add_renormalize)
exit_status |= renormalize_tracked_files(&pathspec, flags);
else
- exit_status |= add_files_to_cache(prefix, &pathspec, flags);
+ exit_status |= add_files_to_cache(the_repository, prefix,
+ &pathspec, include_sparse,
+ flags);
if (add_new_files)
exit_status |= add_files(&dir, flags);
diff --git a/builtin/am.c b/builtin/am.c
index 5c83f2e003..202040b62e 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -4,11 +4,10 @@
* Based on git-am.sh by Junio C Hamano.
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "abspath.h"
#include "advice.h"
#include "config.h"
-#include "builtin.h"
#include "editor.h"
#include "environment.h"
#include "exec-cmd.h"
@@ -29,6 +28,7 @@
#include "unpack-trees.h"
#include "branch.h"
#include "object-name.h"
+#include "preload-index.h"
#include "sequencer.h"
#include "revision.h"
#include "merge-recursive.h"
@@ -41,9 +41,9 @@
#include "string-list.h"
#include "packfile.h"
#include "pager.h"
+#include "path.h"
#include "repository.h"
#include "pretty.h"
-#include "wrapper.h"
/**
* Returns the length of the first line of msg.
@@ -786,7 +786,7 @@ static int split_mail_conv(mail_conv_fn fn, struct am_state *state,
* A split_mail_conv() callback that converts an StGit patch to an RFC2822
* message suitable for parsing with git-mailinfo.
*/
-static int stgit_patch_to_mail(FILE *out, FILE *in, int keep_cr)
+static int stgit_patch_to_mail(FILE *out, FILE *in, int keep_cr UNUSED)
{
struct strbuf sb = STRBUF_INIT;
int subject_printed = 0;
@@ -869,7 +869,7 @@ static int split_mail_stgit_series(struct am_state *state, const char **paths,
* A split_patches_conv() callback that converts a mercurial patch to a RFC2822
* message suitable for parsing with git-mailinfo.
*/
-static int hg_patch_to_mail(FILE *out, FILE *in, int keep_cr)
+static int hg_patch_to_mail(FILE *out, FILE *in, int keep_cr UNUSED)
{
struct strbuf sb = STRBUF_INIT;
int rc = 0;
@@ -1283,7 +1283,7 @@ static int parse_mail(struct am_state *state, const char *mail)
strbuf_addstr(&msg, "\n\n");
strbuf_addbuf(&msg, &mi.log_message);
- strbuf_stripspace(&msg, 0);
+ strbuf_stripspace(&msg, '\0');
assert(!state->author_name);
state->author_name = strbuf_detach(&author_name, NULL);
@@ -1430,7 +1430,7 @@ static void write_index_patch(const struct am_state *state)
rev_info.diffopt.close_file = 1;
add_pending_object(&rev_info, &tree->object, "");
diff_setup_done(&rev_info.diffopt);
- run_diff_index(&rev_info, 1);
+ run_diff_index(&rev_info, DIFF_INDEX_CACHED);
release_revisions(&rev_info);
}
@@ -1593,7 +1593,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
rev_info.diffopt.filter |= diff_filter_bit('M');
add_pending_oid(&rev_info, "HEAD", &our_tree, 0);
diff_setup_done(&rev_info.diffopt);
- run_diff_index(&rev_info, 1);
+ run_diff_index(&rev_info, DIFF_INDEX_CACHED);
release_revisions(&rev_info);
}
@@ -2347,12 +2347,9 @@ int cmd_am(int argc, const char **argv, const char *prefix)
N_("pass -b flag to git-mailinfo"), KEEP_NON_PATCH),
OPT_BOOL('m', "message-id", &state.message_id,
N_("pass -m flag to git-mailinfo")),
- OPT_SET_INT_F(0, "keep-cr", &keep_cr,
- N_("pass --keep-cr flag to git-mailsplit for mbox format"),
- 1, PARSE_OPT_NONEG),
- OPT_SET_INT_F(0, "no-keep-cr", &keep_cr,
- N_("do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"),
- 0, PARSE_OPT_NONEG),
+ OPT_SET_INT(0, "keep-cr", &keep_cr,
+ N_("pass --keep-cr flag to git-mailsplit for mbox format"),
+ 1),
OPT_BOOL('c', "scissors", &state.scissors,
N_("strip everything before a scissors line")),
OPT_CALLBACK_F(0, "quoted-cr", &state.quoted_cr, N_("action"),
diff --git a/builtin/apply.c b/builtin/apply.c
index e3ff02a09e..c18b7ea5d3 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1,4 +1,3 @@
-#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
diff --git a/builtin/archive.c b/builtin/archive.c
index b0eaa3c14a..90761fdfee 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -2,7 +2,6 @@
* Copyright (c) 2006 Franck Bui-Huu
* Copyright (c) 2006 Rene Scharfe
*/
-#include "cache.h"
#include "builtin.h"
#include "archive.h"
#include "gettext.h"
diff --git a/builtin/bisect.c b/builtin/bisect.c
index 4812450c39..65478ef40f 100644
--- a/builtin/bisect.c
+++ b/builtin/bisect.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "copy.h"
#include "environment.h"
#include "gettext.h"
@@ -12,10 +11,10 @@
#include "strvec.h"
#include "run-command.h"
#include "oid-array.h"
+#include "path.h"
#include "prompt.h"
#include "quote.h"
#include "revision.h"
-#include "wrapper.h"
static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV")
diff --git a/builtin/blame.c b/builtin/blame.c
index 2df6039a6e..9c987d6567 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -6,7 +6,6 @@
*/
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "color.h"
#include "builtin.h"
@@ -29,7 +28,7 @@
#include "dir.h"
#include "progress.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pager.h"
#include "blame.h"
#include "refs.h"
@@ -694,7 +693,8 @@ static const char *add_prefix(const char *prefix, const char *path)
return prefix_path(prefix, prefix ? strlen(prefix) : 0, path);
}
-static int git_blame_config(const char *var, const char *value, void *cb)
+static int git_blame_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "blame.showroot")) {
show_root = git_config_bool(var, value);
@@ -767,7 +767,7 @@ static int git_blame_config(const char *var, const char *value, void *cb)
if (userdiff_config(var, value) < 0)
return -1;
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static int blame_copy_callback(const struct option *option, const char *arg, int unset)
diff --git a/builtin/branch.c b/builtin/branch.c
index 075e580d22..2ec190b14a 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -5,20 +5,20 @@
* Based on git-branch.sh by Junio C Hamano.
*/
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "color.h"
#include "editor.h"
#include "environment.h"
#include "refs.h"
#include "commit.h"
-#include "builtin.h"
#include "gettext.h"
#include "object-name.h"
#include "remote.h"
#include "parse-options.h"
#include "branch.h"
#include "diff.h"
+#include "path.h"
#include "revision.h"
#include "string-list.h"
#include "column.h"
@@ -28,7 +28,6 @@
#include "worktree.h"
#include "help.h"
#include "commit-reach.h"
-#include "wrapper.h"
static const char * const builtin_branch_usage[] = {
N_("git branch [<options>] [-r | -a] [--merged] [--no-merged]"),
@@ -83,7 +82,8 @@ static unsigned int colopts;
define_list_config_array(color_branch_slots);
-static int git_branch_config(const char *var, const char *value, void *cb)
+static int git_branch_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *slot_name;
@@ -117,7 +117,10 @@ static int git_branch_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_color_default_config(var, value, cb);
+ if (git_color_config(var, value, cb) < 0)
+ return -1;
+
+ return git_default_config(var, value, ctx, cb);
}
static const char *branch_get_color(enum color_branch ix)
@@ -258,7 +261,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
const char *path;
if ((path = branch_checked_out(name))) {
error(_("Cannot delete branch '%s' "
- "checked out at '%s'"),
+ "used by worktree at '%s'"),
bname.buf, path);
ret = 1;
continue;
@@ -366,17 +369,8 @@ static const char *quote_literal_for_format(const char *s)
static struct strbuf buf = STRBUF_INIT;
strbuf_reset(&buf);
- while (*s) {
- const char *ep = strchrnul(s, '%');
- if (s < ep)
- strbuf_add(&buf, s, ep - s);
- if (*ep == '%') {
- strbuf_addstr(&buf, "%%");
- s = ep + 1;
- } else {
- s = ep;
- }
- }
+ while (strbuf_expand_step(&buf, &s))
+ strbuf_addstr(&buf, "%%");
return buf.buf;
}
@@ -674,7 +668,7 @@ static int edit_branch_description(const char *branch_name)
exists = !read_branch_desc(&buf, branch_name);
if (!buf.len || buf.buf[buf.len-1] != '\n')
strbuf_addch(&buf, '\n');
- strbuf_commented_addf(&buf,
+ strbuf_commented_addf(&buf, comment_line_char,
_("Please edit the description for the branch\n"
" %s\n"
"Lines starting with '%c' will be stripped.\n"),
@@ -685,7 +679,7 @@ static int edit_branch_description(const char *branch_name)
strbuf_release(&buf);
return -1;
}
- strbuf_stripspace(&buf, 1);
+ strbuf_stripspace(&buf, comment_line_char);
strbuf_addf(&name, "branch.%s.description", branch_name);
if (buf.len || exists)
@@ -707,7 +701,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
int reflog = 0, quiet = 0, icase = 0, force = 0,
recurse_submodules_explicit = 0;
enum branch_track track;
- struct ref_filter filter;
+ struct ref_filter filter = REF_FILTER_INIT;
static struct ref_sorting *sorting;
struct string_list sorting_options = STRING_LIST_INIT_DUP;
struct ref_format format = REF_FORMAT_INIT;
@@ -726,8 +720,9 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
OPT_STRING('u', "set-upstream-to", &new_upstream, N_("upstream"), N_("change the upstream info")),
OPT_BOOL(0, "unset-upstream", &unset_upstream, N_("unset the upstream info")),
OPT__COLOR(&branch_use_color, N_("use colored output")),
- OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"),
- FILTER_REFS_REMOTES),
+ OPT_SET_INT_F('r', "remotes", &filter.kind, N_("act on remote-tracking branches"),
+ FILTER_REFS_REMOTES,
+ PARSE_OPT_NONEG),
OPT_CONTAINS(&filter.with_commit, N_("print only branches that contain the commit")),
OPT_NO_CONTAINS(&filter.no_commit, N_("print only branches that don't contain the commit")),
OPT_WITH(&filter.with_commit, N_("print only branches that contain the commit")),
@@ -735,8 +730,9 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
OPT__ABBREV(&filter.abbrev),
OPT_GROUP(N_("Specific git-branch actions:")),
- OPT_SET_INT('a', "all", &filter.kind, N_("list both remote-tracking and local branches"),
- FILTER_REFS_REMOTES | FILTER_REFS_BRANCHES),
+ OPT_SET_INT_F('a', "all", &filter.kind, N_("list both remote-tracking and local branches"),
+ FILTER_REFS_REMOTES | FILTER_REFS_BRANCHES,
+ PARSE_OPT_NONEG),
OPT_BIT('d', "delete", &delete, N_("delete fully merged branch"), 1),
OPT_BIT('D', NULL, &delete, N_("delete branch (even if not merged)"), 2),
OPT_BIT('m', "move", &rename, N_("move/rename a branch and its reflog"), 1),
@@ -765,7 +761,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
setup_ref_filter_porcelain_msg();
- memset(&filter, 0, sizeof(filter));
filter.kind = FILTER_REFS_BRANCHES;
filter.abbrev = -1;
@@ -861,6 +856,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
print_columns(&output, colopts, NULL);
string_list_clear(&output, 0);
ref_sorting_release(sorting);
+ ref_filter_clear(&filter);
return 0;
} else if (edit_description) {
const char *branch_name;
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index daf6c23657..d2ae5c305d 100644
--- a/builtin/bugreport.c
+++ b/builtin/bugreport.c
@@ -11,7 +11,6 @@
#include "diagnose.h"
#include "object-file.h"
#include "setup.h"
-#include "wrapper.h"
static void get_system_info(struct strbuf *sys_info)
{
diff --git a/builtin/bundle.c b/builtin/bundle.c
index 44113389d7..3ad11dc5d0 100644
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
@@ -6,7 +6,6 @@
#include "parse-options.h"
#include "pkt-line.h"
#include "repository.h"
-#include "cache.h"
#include "bundle.h"
/*
@@ -69,42 +68,36 @@ static int parse_options_cmd_bundle(int argc,
}
static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
- int all_progress_implied = 1;
- int progress = isatty(STDERR_FILENO);
- struct strvec pack_opts;
+ struct strvec pack_opts = STRVEC_INIT;
int version = -1;
int ret;
struct option options[] = {
- OPT_SET_INT('q', "quiet", &progress,
- N_("do not show progress meter"), 0),
- OPT_SET_INT(0, "progress", &progress,
- N_("show progress meter"), 1),
- 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_PASSTHRU_ARGV('q', "quiet", &pack_opts, NULL,
+ N_("do not show progress meter"),
+ PARSE_OPT_NOARG),
+ OPT_PASSTHRU_ARGV(0, "progress", &pack_opts, NULL,
+ N_("show progress meter"),
+ PARSE_OPT_NOARG),
+ OPT_PASSTHRU_ARGV(0, "all-progress", &pack_opts, NULL,
+ N_("historical; same as --progress"),
+ PARSE_OPT_NOARG | PARSE_OPT_HIDDEN),
+ OPT_PASSTHRU_ARGV(0, "all-progress-implied", &pack_opts, NULL,
+ N_("historical; does nothing"),
+ PARSE_OPT_NOARG | PARSE_OPT_HIDDEN),
OPT_INTEGER(0, "version", &version,
N_("specify bundle format version")),
OPT_END()
};
char *bundle_file;
+ if (isatty(STDERR_FILENO))
+ strvec_push(&pack_opts, "--progress");
+ strvec_push(&pack_opts, "--all-progress-implied");
+
argc = parse_options_cmd_bundle(argc, argv, prefix,
builtin_bundle_create_usage, options, &bundle_file);
/* bundle internals use argv[1] as further parameters */
- strvec_init(&pack_opts);
- if (progress == 0)
- strvec_push(&pack_opts, "--quiet");
- else if (progress == 1)
- strvec_push(&pack_opts, "--progress");
- else if (progress == 2)
- strvec_push(&pack_opts, "--all-progress");
- if (progress && all_progress_implied)
- strvec_push(&pack_opts, "--all-progress-implied");
-
if (!startup_info->have_repository)
die(_("Need a repository to create a bundle."));
ret = !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts, version);
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 7ff56d5a78..694c8538df 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -4,11 +4,9 @@
* Copyright (C) Linus Torvalds, 2005
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
-#include "alloc.h"
+#include "builtin.h"
#include "config.h"
#include "convert.h"
-#include "builtin.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
@@ -22,7 +20,7 @@
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "replace-object.h"
#include "promisor-remote.h"
#include "mailmap.h"
@@ -310,10 +308,8 @@ static int is_atom(const char *atom, const char *s, int slen)
}
static void expand_atom(struct strbuf *sb, const char *atom, int len,
- void *vdata)
+ struct expand_data *data)
{
- struct expand_data *data = vdata;
-
if (is_atom("objectname", atom, len)) {
if (!data->mark_query)
strbuf_addstr(sb, oid_to_hex(&data->oid));
@@ -347,19 +343,21 @@ static void expand_atom(struct strbuf *sb, const char *atom, int len,
die("unknown format element: %.*s", len, atom);
}
-static size_t expand_format(struct strbuf *sb, const char *start, void *data)
+static void expand_format(struct strbuf *sb, const char *start,
+ struct expand_data *data)
{
- const char *end;
-
- if (*start != '(')
- return 0;
- end = strchr(start + 1, ')');
- if (!end)
- die("format element '%s' does not end in ')'", start);
-
- expand_atom(sb, start + 1, end - start - 1, data);
-
- return end - start + 1;
+ while (strbuf_expand_step(sb, &start)) {
+ const char *end;
+
+ if (skip_prefix(start, "%", &start) || *start != '(')
+ strbuf_addch(sb, '%');
+ else if (!(end = strchr(start + 1, ')')))
+ die("format element '%s' does not end in ')'", start);
+ else {
+ expand_atom(sb, start + 1, end - start - 1, data);
+ start = end + 1;
+ }
+ }
}
static void batch_write(struct batch_options *opt, const void *data, int len)
@@ -496,7 +494,7 @@ static void batch_object_write(const char *obj_name,
if (!opt->format) {
print_default_format(scratch, data, opt);
} else {
- strbuf_expand(scratch, opt->format, expand_format, data);
+ expand_format(scratch, opt->format, data);
strbuf_addch(scratch, opt->output_delim);
}
@@ -774,9 +772,8 @@ static int batch_objects(struct batch_options *opt)
*/
memset(&data, 0, sizeof(data));
data.mark_query = 1;
- strbuf_expand(&output,
+ expand_format(&output,
opt->format ? opt->format : DEFAULT_FORMAT,
- expand_format,
&data);
data.mark_query = 0;
strbuf_release(&output);
@@ -873,12 +870,13 @@ static int batch_objects(struct batch_options *opt)
return retval;
}
-static int git_cat_file_config(const char *var, const char *value, void *cb)
+static int git_cat_file_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (userdiff_config(var, value) < 0)
return -1;
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static int batch_option_callback(const struct option *opt,
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index e27b86d150..c1da1d184e 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -1,6 +1,5 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "attr.h"
#include "environment.h"
@@ -123,6 +122,9 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, check_attr_options,
check_attr_usage, PARSE_OPT_KEEP_DASHDASH);
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+
if (repo_read_index(the_repository) < 0) {
die("invalid cache");
}
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index e4b78782a3..906cd96753 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -1,6 +1,5 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
diff --git a/builtin/check-mailmap.c b/builtin/check-mailmap.c
index 002d2941e9..b8a05b8e07 100644
--- a/builtin/check-mailmap.c
+++ b/builtin/check-mailmap.c
@@ -4,6 +4,7 @@
#include "ident.h"
#include "mailmap.h"
#include "parse-options.h"
+#include "strbuf.h"
#include "string-list.h"
#include "write-or-die.h"
diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c
index 57f0505070..5eb6bdc3f6 100644
--- a/builtin/check-ref-format.c
+++ b/builtin/check-ref-format.c
@@ -2,9 +2,8 @@
* GIT - The information manager from hell
*/
-#include "cache.h"
-#include "refs.h"
#include "builtin.h"
+#include "refs.h"
#include "setup.h"
#include "strbuf.h"
diff --git a/builtin/checkout--worker.c b/builtin/checkout--worker.c
index 2120dd1d30..6b62b5375b 100644
--- a/builtin/checkout--worker.c
+++ b/builtin/checkout--worker.c
@@ -1,11 +1,11 @@
#include "builtin.h"
-#include "alloc.h"
#include "config.h"
#include "entry.h"
#include "gettext.h"
#include "parallel-checkout.h"
#include "parse-options.h"
#include "pkt-line.h"
+#include "read-cache-ll.h"
static void packet_to_pc_item(const char *buffer, int len,
struct parallel_checkout_item *pc_item)
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 9375a05539..3b68b47615 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -16,13 +16,15 @@
#include "parse-options.h"
#include "entry.h"
#include "parallel-checkout.h"
+#include "read-cache-ll.h"
#include "setup.h"
+#include "sparse-index.h"
#define CHECKOUT_ALL 4
static int nul_term_line;
static int checkout_stage; /* default to checkout stage0 */
static int ignore_skip_worktree; /* default to 0 */
-static int to_tempfile;
+static int to_tempfile = -1;
static char topath[4][TEMPORARY_FILENAME_LENGTH + 1];
static struct checkout state = CHECKOUT_INIT;
@@ -191,15 +193,16 @@ static const char * const builtin_checkout_index_usage[] = {
static int option_parse_stage(const struct option *opt,
const char *arg, int unset)
{
+ int *stage = opt->value;
+
BUG_ON_OPT_NEG(unset);
if (!strcmp(arg, "all")) {
- to_tempfile = 1;
- checkout_stage = CHECKOUT_ALL;
+ *stage = CHECKOUT_ALL;
} else {
int ch = arg[0];
if ('1' <= ch && ch <= '3')
- checkout_stage = arg[0] - '0';
+ *stage = arg[0] - '0';
else
die(_("stage should be between 1 and 3 or all"));
}
@@ -237,7 +240,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
N_("write the content to temporary files")),
OPT_STRING(0, "prefix", &state.base_dir, N_("string"),
N_("when creating files, prepend <string>")),
- OPT_CALLBACK_F(0, "stage", NULL, "(1|2|3|all)",
+ OPT_CALLBACK_F(0, "stage", &checkout_stage, "(1|2|3|all)",
N_("copy out the files from named stage"),
PARSE_OPT_NONEG, option_parse_stage),
OPT_END()
@@ -267,6 +270,12 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
state.base_dir = "";
state.base_dir_len = strlen(state.base_dir);
+ if (to_tempfile < 0)
+ to_tempfile = (checkout_stage == CHECKOUT_ALL);
+ if (!to_tempfile && checkout_stage == CHECKOUT_ALL)
+ die(_("options '%s' and '%s' cannot be used together"),
+ "--stage=all", "--no-temp");
+
/*
* when --prefix is specified we do not want to update cache.
*/
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 715eeb5048..f53612f468 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -13,13 +13,16 @@
#include "gettext.h"
#include "hex.h"
#include "hook.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "lockfile.h"
#include "mem-pool.h"
#include "merge-recursive.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "parse-options.h"
+#include "path.h"
+#include "preload-index.h"
+#include "read-cache.h"
#include "refs.h"
#include "remote.h"
#include "resolve-undo.h"
@@ -861,7 +864,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
* entries in the index.
*/
- add_files_to_cache(NULL, NULL, 0);
+ add_files_to_cache(the_repository, NULL, NULL, 0, 0);
init_merge_options(&o, the_repository);
o.verbosity = 0;
work = write_in_core_index_as_tree(the_repository);
@@ -913,7 +916,7 @@ static void report_tracking(struct branch_info *new_branch_info)
struct strbuf sb = STRBUF_INIT;
struct branch *branch = branch_get(new_branch_info->name);
- if (!format_tracking_info(branch, &sb, AHEAD_BEHIND_FULL))
+ if (!format_tracking_info(branch, &sb, AHEAD_BEHIND_FULL, 1))
return;
fputs(sb.buf, stdout);
strbuf_release(&sb);
@@ -1186,7 +1189,8 @@ static int switch_branches(const struct checkout_opts *opts,
return ret || writeout_error;
}
-static int git_checkout_config(const char *var, const char *value, void *cb)
+static int git_checkout_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
struct checkout_opts *opts = cb;
@@ -1202,7 +1206,7 @@ static int git_checkout_config(const char *var, const char *value, void *cb)
if (starts_with(var, "submodule."))
return git_default_submodule_config(var, value, NULL);
- return git_xmerge_config(var, value, NULL);
+ return git_xmerge_config(var, value, ctx, NULL);
}
static void setup_new_branch_info_and_source_tree(
@@ -1689,8 +1693,13 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
}
if (opts->conflict_style) {
+ struct key_value_info kvi = KVI_INIT;
+ struct config_context ctx = {
+ .kvi = &kvi,
+ };
opts->merge = 1; /* implied */
- git_xmerge_config("merge.conflictstyle", opts->conflict_style, NULL);
+ git_xmerge_config("merge.conflictstyle", opts->conflict_style,
+ &ctx, NULL);
}
if (opts->force) {
opts->discard_changes = 1;
diff --git a/builtin/clean.c b/builtin/clean.c
index 78852d28ce..49c224e626 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -9,11 +9,12 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "abspath.h"
-#include "cache.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
#include "parse-options.h"
+#include "path.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
#include "string-list.h"
@@ -103,7 +104,8 @@ struct menu_stuff {
define_list_config_array(color_interactive_slots);
-static int git_clean_config(const char *var, const char *value, void *cb)
+static int git_clean_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *slot_name;
@@ -130,8 +132,10 @@ static int git_clean_config(const char *var, const char *value, void *cb)
return 0;
}
- /* inspect the color.ui config variable and others */
- return git_color_default_config(var, value, cb);
+ if (git_color_config(var, value, cb) < 0)
+ return -1;
+
+ return git_default_config(var, value, ctx, cb);
}
static const char *clean_get_color(enum color_clean ix)
diff --git a/builtin/clone.c b/builtin/clone.c
index 15f9912b4c..c6357af949 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -23,7 +23,7 @@
#include "refs.h"
#include "refspec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "tree.h"
#include "tree-walk.h"
#include "unpack-trees.h"
@@ -39,12 +39,12 @@
#include "setup.h"
#include "connected.h"
#include "packfile.h"
+#include "path.h"
#include "pkt-line.h"
#include "list-objects-filter-options.h"
#include "hook.h"
#include "bundle.h"
#include "bundle-uri.h"
-#include "wrapper.h"
/*
* Overall FIXMEs:
@@ -161,10 +161,7 @@ static struct option builtin_clone_options[] = {
N_("set config inside the new repository")),
OPT_STRING_LIST(0, "server-option", &server_options,
N_("server-specific"), N_("option to transmit")),
- OPT_SET_INT('4', "ipv4", &family, N_("use IPv4 addresses only"),
- TRANSPORT_FAMILY_IPV4),
- OPT_SET_INT('6', "ipv6", &family, N_("use IPv6 addresses only"),
- TRANSPORT_FAMILY_IPV6),
+ OPT_IPVERSION(&family),
OPT_PARSE_LIST_OBJECTS_FILTER(&filter_options),
OPT_BOOL(0, "also-filter-submodules", &option_filter_submodules,
N_("apply partial clone filters to submodules")),
@@ -790,7 +787,8 @@ static int checkout(int submodule_progress, int filter_submodules)
return err;
}
-static int git_clone_config(const char *k, const char *v, void *cb)
+static int git_clone_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(k, "clone.defaultremotename")) {
free(remote_name);
@@ -801,17 +799,19 @@ static int git_clone_config(const char *k, const char *v, void *cb)
if (!strcmp(k, "clone.filtersubmodules"))
config_filter_submodules = git_config_bool(k, v);
- return git_default_config(k, v, cb);
+ return git_default_config(k, v, ctx, cb);
}
-static int write_one_config(const char *key, const char *value, void *data)
+static int write_one_config(const char *key, const char *value,
+ const struct config_context *ctx,
+ void *data)
{
/*
* give git_clone_config a chance to write config values back to the
* environment, since git_config_set_multivar_gently only deals with
* config-file writes
*/
- int apply_failed = git_clone_config(key, value, data);
+ int apply_failed = git_clone_config(key, value, ctx, data);
if (apply_failed)
return apply_failed;
@@ -930,6 +930,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
int submodule_progress;
int filter_submodules = 0;
int hash_algo;
+ const int do_not_override_repo_unix_permissions = -1;
struct transport_ls_refs_options transport_ls_refs_options =
TRANSPORT_LS_REFS_OPTIONS_INIT;
@@ -1097,7 +1098,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
}
init_db(git_dir, real_git_dir, option_template, GIT_HASH_UNKNOWN, NULL,
- INIT_DB_QUIET);
+ do_not_override_repo_unix_permissions, INIT_DB_QUIET);
if (real_git_dir) {
free((char *)git_dir);
diff --git a/builtin/column.c b/builtin/column.c
index de623a16c2..a83be8bc99 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "strbuf.h"
@@ -13,7 +12,8 @@ static const char * const builtin_column_usage[] = {
};
static unsigned int colopts;
-static int column_config(const char *var, const char *value, void *cb)
+static int column_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED, void *cb)
{
return git_column_config(var, value, cb, &colopts);
}
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index dd732b3534..c88389df24 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -1,4 +1,5 @@
#include "builtin.h"
+#include "commit.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
@@ -8,7 +9,7 @@
#include "parse-options.h"
#include "repository.h"
#include "commit-graph.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "progress.h"
#include "replace-object.h"
#include "tag.h"
@@ -186,10 +187,11 @@ static int write_option_max_new_filters(const struct option *opt,
}
static int git_commit_graph_write_config(const char *var, const char *value,
+ const struct config_context *ctx,
void *cb UNUSED)
{
if (!strcmp(var, "commitgraph.maxnewfilters"))
- write_opts.max_new_filters = git_config_int(var, value);
+ write_opts.max_new_filters = git_config_int(var, value, ctx->kvi);
/*
* No need to fall-back to 'git_default_config', since this was already
* called in 'cmd_commit_graph()'.
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index d1d251c3de..02625e7176 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -3,16 +3,15 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "repository.h"
#include "commit.h"
#include "tree.h"
-#include "builtin.h"
#include "utf8.h"
#include "gpg-interface.h"
#include "parse-options.h"
diff --git a/builtin/commit.c b/builtin/commit.c
index 65a5c0e29d..7da5f92448 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -6,7 +6,7 @@
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "advice.h"
#include "config.h"
#include "lockfile.h"
@@ -15,7 +15,6 @@
#include "dir.h"
#include "editor.h"
#include "environment.h"
-#include "builtin.h"
#include "diff.h"
#include "diffcore.h"
#include "commit.h"
@@ -30,6 +29,9 @@
#include "utf8.h"
#include "object-name.h"
#include "parse-options.h"
+#include "path.h"
+#include "preload-index.h"
+#include "read-cache.h"
#include "string-list.h"
#include "rerere.h"
#include "unpack-trees.h"
@@ -38,6 +40,7 @@
#include "gpg-interface.h"
#include "column.h"
#include "sequencer.h"
+#include "sparse-index.h"
#include "mailmap.h"
#include "help.h"
#include "commit-reach.h"
@@ -447,7 +450,8 @@ static const char *prepare_index(const char **argv, const char *prefix,
if (all || (also && pathspec.nr)) {
repo_hold_locked_index(the_repository, &index_lock,
LOCK_DIE_ON_ERROR);
- add_files_to_cache(also ? prefix : NULL, &pathspec, 0);
+ add_files_to_cache(the_repository, also ? prefix : NULL,
+ &pathspec, 0, 0);
refresh_cache_or_die(refresh_flags);
cache_tree_update(&the_index, WRITE_TREE_SILENT);
if (write_locked_index(&the_index, &index_lock, 0))
@@ -893,7 +897,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
s->hints = 0;
if (clean_message_contents)
- strbuf_stripspace(&sb, 0);
+ strbuf_stripspace(&sb, '\0');
if (signoff)
append_signoff(&sb, ignore_non_trailer(sb.buf, sb.len), 0);
@@ -998,11 +1002,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
struct object_id oid;
const char *parent = "HEAD";
- if (!the_index.cache_nr) {
- discard_index(&the_index);
- if (repo_read_index(the_repository) < 0)
- die(_("Cannot read index"));
- }
+ if (!the_index.initialized && repo_read_index(the_repository) < 0)
+ die(_("Cannot read index"));
if (amend)
parent = "HEAD^1";
@@ -1406,7 +1407,8 @@ static int parse_status_slot(const char *slot)
return LOOKUP_CONFIG(color_status_slots, slot);
}
-static int git_status_config(const char *k, const char *v, void *cb)
+static int git_status_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
struct wt_status *s = cb;
const char *slot_name;
@@ -1415,7 +1417,8 @@ static int git_status_config(const char *k, const char *v, void *cb)
return git_column_config(k, v, "status", &s->colopts);
if (!strcmp(k, "status.submodulesummary")) {
int is_bool;
- s->submodule_summary = git_config_bool_or_int(k, v, &is_bool);
+ s->submodule_summary = git_config_bool_or_int(k, v, ctx->kvi,
+ &is_bool);
if (is_bool && s->submodule_summary)
s->submodule_summary = -1;
return 0;
@@ -1475,11 +1478,11 @@ static int git_status_config(const char *k, const char *v, void *cb)
}
if (!strcmp(k, "diff.renamelimit")) {
if (s->rename_limit == -1)
- s->rename_limit = git_config_int(k, v);
+ s->rename_limit = git_config_int(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "status.renamelimit")) {
- s->rename_limit = git_config_int(k, v);
+ s->rename_limit = git_config_int(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "diff.renames")) {
@@ -1491,7 +1494,7 @@ static int git_status_config(const char *k, const char *v, void *cb)
s->detect_rename = git_config_rename(k, v);
return 0;
}
- return git_diff_ui_config(k, v, NULL);
+ return git_diff_ui_config(k, v, ctx, NULL);
}
int cmd_status(int argc, const char **argv, const char *prefix)
@@ -1606,7 +1609,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
return 0;
}
-static int git_commit_config(const char *k, const char *v, void *cb)
+static int git_commit_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
struct wt_status *s = cb;
@@ -1624,11 +1628,12 @@ static int git_commit_config(const char *k, const char *v, void *cb)
}
if (!strcmp(k, "commit.verbose")) {
int is_bool;
- config_commit_verbose = git_config_bool_or_int(k, v, &is_bool);
+ config_commit_verbose = git_config_bool_or_int(k, v, ctx->kvi,
+ &is_bool);
return 0;
}
- return git_status_config(k, v, s);
+ return git_status_config(k, v, ctx, s);
}
int cmd_commit(int argc, const char **argv, const char *prefix)
diff --git a/builtin/config.c b/builtin/config.c
index d40fddb042..11a4d4ef14 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -1,6 +1,5 @@
#include "builtin.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "color.h"
#include "editor.h"
@@ -13,8 +12,8 @@
#include "path.h"
#include "quote.h"
#include "setup.h"
+#include "strbuf.h"
#include "worktree.h"
-#include "wrapper.h"
static const char *const builtin_config_usage[] = {
N_("git config [<options>]"),
@@ -194,37 +193,42 @@ static void check_argc(int argc, int min, int max)
usage_builtin_config();
}
-static void show_config_origin(struct strbuf *buf)
+static void show_config_origin(const struct key_value_info *kvi,
+ struct strbuf *buf)
{
const char term = end_nul ? '\0' : '\t';
- strbuf_addstr(buf, current_config_origin_type());
+ strbuf_addstr(buf, config_origin_type_name(kvi->origin_type));
strbuf_addch(buf, ':');
if (end_nul)
- strbuf_addstr(buf, current_config_name());
+ strbuf_addstr(buf, kvi->filename ? kvi->filename : "");
else
- quote_c_style(current_config_name(), buf, NULL, 0);
+ quote_c_style(kvi->filename ? kvi->filename : "", buf, NULL, 0);
strbuf_addch(buf, term);
}
-static void show_config_scope(struct strbuf *buf)
+static void show_config_scope(const struct key_value_info *kvi,
+ struct strbuf *buf)
{
const char term = end_nul ? '\0' : '\t';
- const char *scope = config_scope_name(current_config_scope());
+ const char *scope = config_scope_name(kvi->scope);
strbuf_addstr(buf, N_(scope));
strbuf_addch(buf, term);
}
static int show_all_config(const char *key_, const char *value_,
+ const struct config_context *ctx,
void *cb UNUSED)
{
+ const struct key_value_info *kvi = ctx->kvi;
+
if (show_origin || show_scope) {
struct strbuf buf = STRBUF_INIT;
if (show_scope)
- show_config_scope(&buf);
+ show_config_scope(kvi, &buf);
if (show_origin)
- show_config_origin(&buf);
+ show_config_origin(kvi, &buf);
/* Use fwrite as "buf" can contain \0's if "end_null" is set. */
fwrite(buf.buf, 1, buf.len, stdout);
strbuf_release(&buf);
@@ -242,12 +246,13 @@ struct strbuf_list {
int alloc;
};
-static int format_config(struct strbuf *buf, const char *key_, const char *value_)
+static int format_config(struct strbuf *buf, const char *key_,
+ const char *value_, const struct key_value_info *kvi)
{
if (show_scope)
- show_config_scope(buf);
+ show_config_scope(kvi, buf);
if (show_origin)
- show_config_origin(buf);
+ show_config_origin(kvi, buf);
if (show_keys)
strbuf_addstr(buf, key_);
if (!omit_values) {
@@ -256,13 +261,14 @@ static int format_config(struct strbuf *buf, const char *key_, const char *value
if (type == TYPE_INT)
strbuf_addf(buf, "%"PRId64,
- git_config_int64(key_, value_ ? value_ : ""));
+ git_config_int64(key_, value_ ? value_ : "", kvi));
else if (type == TYPE_BOOL)
strbuf_addstr(buf, git_config_bool(key_, value_) ?
"true" : "false");
else if (type == TYPE_BOOL_OR_INT) {
int is_bool, v;
- v = git_config_bool_or_int(key_, value_, &is_bool);
+ v = git_config_bool_or_int(key_, value_, kvi,
+ &is_bool);
if (is_bool)
strbuf_addstr(buf, v ? "true" : "false");
else
@@ -301,9 +307,11 @@ static int format_config(struct strbuf *buf, const char *key_, const char *value
return 0;
}
-static int collect_config(const char *key_, const char *value_, void *cb)
+static int collect_config(const char *key_, const char *value_,
+ const struct config_context *ctx, void *cb)
{
struct strbuf_list *values = cb;
+ const struct key_value_info *kvi = ctx->kvi;
if (!use_key_regexp && strcmp(key_, key))
return 0;
@@ -318,7 +326,7 @@ static int collect_config(const char *key_, const char *value_, void *cb)
ALLOC_GROW(values->items, values->nr + 1, values->alloc);
strbuf_init(&values->items[values->nr], 0);
- return format_config(&values->items[values->nr++], key_, value_);
+ return format_config(&values->items[values->nr++], key_, value_, kvi);
}
static int get_value(const char *key_, const char *regex_, unsigned flags)
@@ -380,11 +388,14 @@ static int get_value(const char *key_, const char *regex_, unsigned flags)
&config_options);
if (!values.nr && default_value) {
+ struct key_value_info kvi = KVI_INIT;
struct strbuf *item;
+
+ kvi_from_param(&kvi);
ALLOC_GROW(values.items, values.nr + 1, values.alloc);
item = &values.items[values.nr++];
strbuf_init(item, 0);
- if (format_config(item, key_, default_value) < 0)
+ if (format_config(item, key_, default_value, &kvi) < 0)
die(_("failed to format default config value: %s"),
default_value);
}
@@ -413,7 +424,8 @@ free_strings:
return ret;
}
-static char *normalize_value(const char *key, const char *value)
+static char *normalize_value(const char *key, const char *value,
+ struct key_value_info *kvi)
{
if (!value)
return NULL;
@@ -428,12 +440,12 @@ static char *normalize_value(const char *key, const char *value)
*/
return xstrdup(value);
if (type == TYPE_INT)
- return xstrfmt("%"PRId64, git_config_int64(key, value));
+ return xstrfmt("%"PRId64, git_config_int64(key, value, kvi));
if (type == TYPE_BOOL)
return xstrdup(git_config_bool(key, value) ? "true" : "false");
if (type == TYPE_BOOL_OR_INT) {
int is_bool, v;
- v = git_config_bool_or_int(key, value, &is_bool);
+ v = git_config_bool_or_int(key, value, kvi, &is_bool);
if (!is_bool)
return xstrfmt("%d", v);
else
@@ -470,6 +482,7 @@ static const char *get_colorbool_slot;
static char parsed_color[COLOR_MAXLEN];
static int git_get_color_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
if (!strcmp(var, get_color_slot)) {
@@ -503,6 +516,7 @@ static int get_colorbool_found;
static int get_diff_color_found;
static int get_color_ui_found;
static int git_get_colorbool_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *data UNUSED)
{
if (!strcmp(var, get_colorbool_slot))
@@ -559,13 +573,17 @@ static void check_write(void)
struct urlmatch_current_candidate_value {
char value_is_null;
struct strbuf value;
+ struct key_value_info kvi;
};
-static int urlmatch_collect_fn(const char *var, const char *value, void *cb)
+static int urlmatch_collect_fn(const char *var, const char *value,
+ const struct config_context *ctx,
+ void *cb)
{
struct string_list *values = cb;
struct string_list_item *item = string_list_insert(values, var);
struct urlmatch_current_candidate_value *matched = item->util;
+ const struct key_value_info *kvi = ctx->kvi;
if (!matched) {
matched = xmalloc(sizeof(*matched));
@@ -574,6 +592,7 @@ static int urlmatch_collect_fn(const char *var, const char *value, void *cb)
} else {
strbuf_reset(&matched->value);
}
+ matched->kvi = *kvi;
if (value) {
strbuf_addstr(&matched->value, value);
@@ -621,7 +640,8 @@ static int get_urlmatch(const char *var, const char *url)
struct strbuf buf = STRBUF_INIT;
format_config(&buf, item->string,
- matched->value_is_null ? NULL : matched->value.buf);
+ matched->value_is_null ? NULL : matched->value.buf,
+ &matched->kvi);
fwrite(buf.buf, 1, buf.len, stdout);
strbuf_release(&buf);
@@ -655,6 +675,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
char *value = NULL;
int flags = 0;
int ret = 0;
+ struct key_value_info default_kvi = KVI_INIT;
given_config_source.file = xstrdup_or_null(getenv(CONFIG_ENVIRONMENT));
@@ -872,7 +893,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
else if (actions == ACTION_SET) {
check_write();
check_argc(argc, 2, 2);
- value = normalize_value(argv[0], argv[1]);
+ value = normalize_value(argv[0], argv[1], &default_kvi);
ret = git_config_set_in_file_gently(given_config_source.file, argv[0], value);
if (ret == CONFIG_NOTHING_SET)
error(_("cannot overwrite multiple values with a single value\n"
@@ -881,7 +902,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
else if (actions == ACTION_SET_ALL) {
check_write();
check_argc(argc, 2, 3);
- value = normalize_value(argv[0], argv[1]);
+ value = normalize_value(argv[0], argv[1], &default_kvi);
ret = git_config_set_multivar_in_file_gently(given_config_source.file,
argv[0], value, argv[2],
flags);
@@ -889,7 +910,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
else if (actions == ACTION_ADD) {
check_write();
check_argc(argc, 2, 2);
- value = normalize_value(argv[0], argv[1]);
+ value = normalize_value(argv[0], argv[1], &default_kvi);
ret = git_config_set_multivar_in_file_gently(given_config_source.file,
argv[0], value,
CONFIG_REGEX_NONE,
@@ -898,7 +919,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
else if (actions == ACTION_REPLACE_ALL) {
check_write();
check_argc(argc, 2, 3);
- value = normalize_value(argv[0], argv[1]);
+ value = normalize_value(argv[0], argv[1], &default_kvi);
ret = git_config_set_multivar_in_file_gently(given_config_source.file,
argv[0], value, argv[2],
flags | CONFIG_FLAGS_MULTI_REPLACE);
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index f3d8f1bcbb..2d4bb5e8d0 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -4,17 +4,17 @@
* Copyright (c) 2006 Junio C Hamano
*/
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
+#include "path.h"
#include "repository.h"
-#include "builtin.h"
#include "parse-options.h"
#include "quote.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
static unsigned long garbage;
static off_t size_garbage;
@@ -82,7 +82,7 @@ static int count_cruft(const char *basename UNUSED, const char *path,
return 0;
}
-static int print_alternate(struct object_directory *odb, void *data)
+static int print_alternate(struct object_directory *odb, void *data UNUSED)
{
printf("alternate: ");
quote_c_style(odb->path, NULL, stdout, 0);
diff --git a/builtin/credential-cache--daemon.c b/builtin/credential-cache--daemon.c
index dc1cf2d25f..3a6a750a8e 100644
--- a/builtin/credential-cache--daemon.c
+++ b/builtin/credential-cache--daemon.c
@@ -1,6 +1,5 @@
#include "builtin.h"
#include "abspath.h"
-#include "alloc.h"
#include "gettext.h"
#include "object-file.h"
#include "parse-options.h"
diff --git a/builtin/credential-cache.c b/builtin/credential-cache.c
index 0ffacfdd83..43b9d0e5b1 100644
--- a/builtin/credential-cache.c
+++ b/builtin/credential-cache.c
@@ -2,7 +2,7 @@
#include "gettext.h"
#include "parse-options.h"
#include "path.h"
-#include "wrapper.h"
+#include "strbuf.h"
#include "write-or-die.h"
#ifndef NO_UNIX_SOCKETS
diff --git a/builtin/credential-store.c b/builtin/credential-store.c
index 0937230bce..4a492411bb 100644
--- a/builtin/credential-store.c
+++ b/builtin/credential-store.c
@@ -75,6 +75,25 @@ static void rewrite_credential_file(const char *fn, struct credential *c,
die_errno("unable to write credential store");
}
+static int is_rfc3986_unreserved(char ch)
+{
+ return isalnum(ch) ||
+ ch == '-' || ch == '_' || ch == '.' || ch == '~';
+}
+
+static int is_rfc3986_reserved_or_unreserved(char ch)
+{
+ if (is_rfc3986_unreserved(ch))
+ return 1;
+ switch (ch) {
+ case '!': case '*': case '\'': case '(': case ')': case ';':
+ case ':': case '@': case '&': case '=': case '+': case '$':
+ case ',': case '/': case '?': case '#': case '[': case ']':
+ return 1;
+ }
+ return 0;
+}
+
static void store_credential_file(const char *fn, struct credential *c)
{
struct strbuf buf = STRBUF_INIT;
diff --git a/builtin/describe.c b/builtin/describe.c
index 55b4baaa22..fb6b0508f3 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -1,5 +1,5 @@
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -9,21 +9,23 @@
#include "tag.h"
#include "blob.h"
#include "refs.h"
-#include "builtin.h"
#include "exec-cmd.h"
#include "object-name.h"
#include "parse-options.h"
+#include "read-cache-ll.h"
#include "revision.h"
#include "diff.h"
#include "hashmap.h"
#include "setup.h"
#include "strvec.h"
#include "run-command.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "list-objects.h"
#include "commit-slab.h"
+#include "wildmatch.h"
#define MAX_TAGS (FLAG_BITS - 1)
+#define DEFAULT_CANDIDATES 10
define_commit_slab(commit_names, struct commit_name *);
@@ -40,7 +42,7 @@ static int tags; /* Allow lightweight tags */
static int longformat;
static int first_parent;
static int abbrev = -1; /* unspecified */
-static int max_candidates = 10;
+static int max_candidates = DEFAULT_CANDIDATES;
static struct hashmap names;
static int have_util;
static struct string_list patterns = STRING_LIST_INIT_NODUP;
@@ -556,6 +558,17 @@ static void describe(const char *arg, int last_one)
strbuf_release(&sb);
}
+static int option_parse_exact_match(const struct option *opt, const char *arg,
+ int unset)
+{
+ int *val = opt->value;
+
+ BUG_ON_OPT_ARG(arg);
+
+ *val = unset ? DEFAULT_CANDIDATES : 0;
+ return 0;
+}
+
int cmd_describe(int argc, const char **argv, const char *prefix)
{
int contains = 0;
@@ -567,8 +580,9 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "long", &longformat, N_("always use long format")),
OPT_BOOL(0, "first-parent", &first_parent, N_("only follow first parent")),
OPT__ABBREV(&abbrev),
- OPT_SET_INT(0, "exact-match", &max_candidates,
- N_("only output exact matches"), 0),
+ OPT_CALLBACK_F(0, "exact-match", &max_candidates, NULL,
+ N_("only output exact matches"),
+ PARSE_OPT_NOARG, option_parse_exact_match),
OPT_INTEGER(0, "candidates", &max_candidates,
N_("consider <n> most recent tags (default: 10)")),
OPT_STRING_LIST(0, "match", &patterns, N_("pattern"),
@@ -656,7 +670,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
struct lock_file index_lock = LOCK_INIT;
struct rev_info revs;
struct strvec args = STRVEC_INIT;
- int fd, result;
+ int fd;
setup_work_tree();
prepare_repo_settings(the_repository);
@@ -673,9 +687,9 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
strvec_pushv(&args, diff_index_args);
if (setup_revisions(args.nr, args.v, &revs, NULL) != 1)
BUG("malformed internal diff-index command line");
- result = run_diff_index(&revs, 0);
+ run_diff_index(&revs, 0);
- if (!diff_result_code(&revs.diffopt, result))
+ if (!diff_result_code(&revs.diffopt))
suffix = NULL;
else
suffix = dirty;
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 360464e6ef..f38912cd40 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -3,13 +3,14 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "diff.h"
#include "diff-merges.h"
#include "commit.h"
+#include "preload-index.h"
+#include "repository.h"
#include "revision.h"
-#include "builtin.h"
#include "submodule.h"
static const char diff_files_usage[] =
@@ -79,14 +80,10 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
(rev.diffopt.output_format & DIFF_FORMAT_PATCH))
diff_merges_set_dense_combined_if_unset(&rev);
- if (repo_read_index_preload(the_repository, &rev.diffopt.pathspec, 0) < 0) {
- perror("repo_read_index_preload");
- result = -1;
- goto cleanup;
- }
- result = run_diff_files(&rev, options);
- result = diff_result_code(&rev.diffopt, result);
-cleanup:
+ if (repo_read_index_preload(the_repository, &rev.diffopt.pathspec, 0) < 0)
+ die_errno("repo_read_index_preload");
+ run_diff_files(&rev, options);
+ result = diff_result_code(&rev.diffopt);
release_revisions(&rev);
return result;
}
diff --git a/builtin/diff-index.c b/builtin/diff-index.c
index b9a19bb7d3..220f341ffa 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -1,11 +1,13 @@
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "diff.h"
#include "diff-merges.h"
#include "commit.h"
+#include "preload-index.h"
+#include "repository.h"
#include "revision.h"
-#include "builtin.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule.h"
static const char diff_cache_usage[] =
@@ -70,8 +72,8 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
perror("repo_read_index");
return -1;
}
- result = run_diff_index(&rev, option);
- result = diff_result_code(&rev.diffopt, result);
+ run_diff_index(&rev, option);
+ result = diff_result_code(&rev.diffopt);
release_revisions(&rev);
return result;
}
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index c0540317fb..86be634286 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -1,14 +1,15 @@
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "diff.h"
#include "commit.h"
#include "gettext.h"
#include "hex.h"
#include "log-tree.h"
-#include "builtin.h"
#include "submodule.h"
+#include "read-cache-ll.h"
#include "repository.h"
+#include "revision.h"
#include "tree.h"
static struct rev_info log_tree_opt;
@@ -98,7 +99,7 @@ static const char diff_tree_usage[] =
" --root include the initial commit as diff against /dev/null\n"
COMMON_DIFF_OPTIONS_HELP;
-static void diff_tree_tweak_rev(struct rev_info *rev, struct setup_revision_opt *opt)
+static void diff_tree_tweak_rev(struct rev_info *rev)
{
if (!rev->diffopt.output_format) {
if (rev->dense_combined_merges)
@@ -231,5 +232,5 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
diff_free(&opt->diffopt);
}
- return diff_result_code(&opt->diffopt, 0);
+ return diff_result_code(&opt->diffopt);
}
diff --git a/builtin/diff.c b/builtin/diff.c
index 7b64659fe7..0b313549c7 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -4,7 +4,7 @@
* Copyright (c) 2006 Junio C Hamano
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "ewah/ewok.h"
#include "lockfile.h"
@@ -16,9 +16,10 @@
#include "diff.h"
#include "diff-merges.h"
#include "diffcore.h"
+#include "preload-index.h"
+#include "read-cache-ll.h"
#include "revision.h"
#include "log-tree.h"
-#include "builtin.h"
#include "setup.h"
#include "submodule.h"
#include "oid-array.h"
@@ -76,9 +77,9 @@ static void stuff_change(struct diff_options *opt,
diff_queue(&diff_queued_diff, one, two);
}
-static int builtin_diff_b_f(struct rev_info *revs,
- int argc, const char **argv UNUSED,
- struct object_array_entry **blob)
+static void builtin_diff_b_f(struct rev_info *revs,
+ int argc, const char **argv UNUSED,
+ struct object_array_entry **blob)
{
/* Blob vs file in the working tree*/
struct stat st;
@@ -108,12 +109,11 @@ static int builtin_diff_b_f(struct rev_info *revs,
path);
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
- return 0;
}
-static int builtin_diff_blobs(struct rev_info *revs,
- int argc, const char **argv UNUSED,
- struct object_array_entry **blob)
+static void builtin_diff_blobs(struct rev_info *revs,
+ int argc, const char **argv UNUSED,
+ struct object_array_entry **blob)
{
const unsigned mode = canon_mode(S_IFREG | 0644);
@@ -133,11 +133,10 @@ static int builtin_diff_blobs(struct rev_info *revs,
blob_path(blob[0]), blob_path(blob[1]));
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
- return 0;
}
-static int builtin_diff_index(struct rev_info *revs,
- int argc, const char **argv)
+static void builtin_diff_index(struct rev_info *revs,
+ int argc, const char **argv)
{
unsigned int option = 0;
while (1 < argc) {
@@ -162,20 +161,18 @@ static int builtin_diff_index(struct rev_info *revs,
setup_work_tree();
if (repo_read_index_preload(the_repository,
&revs->diffopt.pathspec, 0) < 0) {
- perror("repo_read_index_preload");
- return -1;
+ die_errno("repo_read_index_preload");
}
} else if (repo_read_index(the_repository) < 0) {
- perror("repo_read_cache");
- return -1;
+ die_errno("repo_read_cache");
}
- return run_diff_index(revs, option);
+ run_diff_index(revs, option);
}
-static int builtin_diff_tree(struct rev_info *revs,
- int argc, const char **argv,
- struct object_array_entry *ent0,
- struct object_array_entry *ent1)
+static void builtin_diff_tree(struct rev_info *revs,
+ int argc, const char **argv,
+ struct object_array_entry *ent0,
+ struct object_array_entry *ent1)
{
const struct object_id *(oid[2]);
struct object_id mb_oid;
@@ -208,13 +205,12 @@ static int builtin_diff_tree(struct rev_info *revs,
}
diff_tree_oid(oid[0], oid[1], "", &revs->diffopt);
log_tree_diff_flush(revs);
- return 0;
}
-static int builtin_diff_combined(struct rev_info *revs,
- int argc, const char **argv UNUSED,
- struct object_array_entry *ent,
- int ents, int first_non_parent)
+static void builtin_diff_combined(struct rev_info *revs,
+ int argc, const char **argv UNUSED,
+ struct object_array_entry *ent,
+ int ents, int first_non_parent)
{
struct oid_array parents = OID_ARRAY_INIT;
int i;
@@ -235,7 +231,6 @@ static int builtin_diff_combined(struct rev_info *revs,
}
diff_tree_combined(&ent[first_non_parent].item->oid, &parents, revs);
oid_array_clear(&parents);
- return 0;
}
static void refresh_index_quietly(void)
@@ -253,7 +248,7 @@ static void refresh_index_quietly(void)
repo_update_index_if_able(the_repository, &lock_file);
}
-static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv)
+static void builtin_diff_files(struct rev_info *revs, int argc, const char **argv)
{
unsigned int options = 0;
@@ -268,8 +263,10 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
options |= DIFF_SILENT_ON_REMOVED;
else if (!strcmp(argv[1], "-h"))
usage(builtin_diff_usage);
- else
- return error(_("invalid option: %s"), argv[1]);
+ else {
+ error(_("invalid option: %s"), argv[1]);
+ usage(builtin_diff_usage);
+ }
argv++; argc--;
}
@@ -286,10 +283,9 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
setup_work_tree();
if (repo_read_index_preload(the_repository, &revs->diffopt.pathspec,
0) < 0) {
- perror("repo_read_index_preload");
- return -1;
+ die_errno("repo_read_index_preload");
}
- return run_diff_files(revs, options);
+ run_diff_files(revs, options);
}
struct symdiff {
@@ -403,7 +399,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
int blobs = 0, paths = 0;
struct object_array_entry *blob[2];
int nongit = 0, no_index = 0;
- int result = 0;
+ int result;
struct symdiff sdiff;
/*
@@ -582,17 +578,17 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
if (!ent.nr) {
switch (blobs) {
case 0:
- result = builtin_diff_files(&rev, argc, argv);
+ builtin_diff_files(&rev, argc, argv);
break;
case 1:
if (paths != 1)
usage(builtin_diff_usage);
- result = builtin_diff_b_f(&rev, argc, argv, blob);
+ builtin_diff_b_f(&rev, argc, argv, blob);
break;
case 2:
if (paths)
usage(builtin_diff_usage);
- result = builtin_diff_blobs(&rev, argc, argv, blob);
+ builtin_diff_blobs(&rev, argc, argv, blob);
break;
default:
usage(builtin_diff_usage);
@@ -601,18 +597,18 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
else if (blobs)
usage(builtin_diff_usage);
else if (ent.nr == 1)
- result = builtin_diff_index(&rev, argc, argv);
+ builtin_diff_index(&rev, argc, argv);
else if (ent.nr == 2) {
if (sdiff.warn)
warning(_("%s...%s: multiple merge bases, using %s"),
sdiff.left, sdiff.right, sdiff.base);
- result = builtin_diff_tree(&rev, argc, argv,
- &ent.objects[0], &ent.objects[1]);
+ builtin_diff_tree(&rev, argc, argv,
+ &ent.objects[0], &ent.objects[1]);
} else
- result = builtin_diff_combined(&rev, argc, argv,
- ent.objects, ent.nr,
- first_non_parent);
- result = diff_result_code(&rev.diffopt, result);
+ builtin_diff_combined(&rev, argc, argv,
+ ent.objects, ent.nr,
+ first_non_parent);
+ result = diff_result_code(&rev.diffopt);
if (1 < rev.diffopt.skip_stat_unmatch)
refresh_index_quietly();
release_revisions(&rev);
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 0049342f5c..0f5eae9cd4 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -12,26 +12,26 @@
* Copyright (C) 2016 Johannes Schindelin
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "abspath.h"
#include "config.h"
#include "copy.h"
-#include "builtin.h"
#include "run-command.h"
#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
+#include "read-cache-ll.h"
+#include "sparse-index.h"
#include "strvec.h"
#include "strbuf.h"
#include "lockfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "dir.h"
#include "entry.h"
#include "setup.h"
-#include "wrapper.h"
static int trust_exit_code;
@@ -40,14 +40,15 @@ static const char *const builtin_difftool_usage[] = {
NULL
};
-static int difftool_config(const char *var, const char *value, void *cb)
+static int difftool_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "difftool.trustexitcode")) {
trust_exit_code = git_config_bool(var, value);
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static int print_tool_help(void)
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 9a95f6a1a8..70aff515ac 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -4,14 +4,13 @@
* Copyright (C) 2007 Johannes E. Schindelin
*/
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "refspec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
#include "object.h"
#include "tag.h"
@@ -34,9 +33,9 @@ static const char *fast_export_usage[] = {
};
static int progress;
-static enum { SIGNED_TAG_ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = SIGNED_TAG_ABORT;
-static enum { TAG_FILTERING_ABORT, DROP, REWRITE } tag_of_filtered_mode = TAG_FILTERING_ABORT;
-static enum { REENCODE_ABORT, REENCODE_YES, REENCODE_NO } reencode_mode = REENCODE_ABORT;
+static enum signed_tag_mode { SIGNED_TAG_ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = SIGNED_TAG_ABORT;
+static enum tag_of_filtered_mode { TAG_FILTERING_ABORT, DROP, REWRITE } tag_of_filtered_mode = TAG_FILTERING_ABORT;
+static enum reencode_mode { REENCODE_ABORT, REENCODE_YES, REENCODE_NO } reencode_mode = REENCODE_ABORT;
static int fake_missing_tagger;
static int use_done_feature;
static int no_data;
@@ -54,16 +53,18 @@ static struct revision_sources revision_sources;
static int parse_opt_signed_tag_mode(const struct option *opt,
const char *arg, int unset)
{
+ enum signed_tag_mode *val = opt->value;
+
if (unset || !strcmp(arg, "abort"))
- signed_tag_mode = SIGNED_TAG_ABORT;
+ *val = SIGNED_TAG_ABORT;
else if (!strcmp(arg, "verbatim") || !strcmp(arg, "ignore"))
- signed_tag_mode = VERBATIM;
+ *val = VERBATIM;
else if (!strcmp(arg, "warn"))
- signed_tag_mode = WARN;
+ *val = WARN;
else if (!strcmp(arg, "warn-strip"))
- signed_tag_mode = WARN_STRIP;
+ *val = WARN_STRIP;
else if (!strcmp(arg, "strip"))
- signed_tag_mode = STRIP;
+ *val = STRIP;
else
return error("Unknown signed-tags mode: %s", arg);
return 0;
@@ -72,12 +73,14 @@ static int parse_opt_signed_tag_mode(const struct option *opt,
static int parse_opt_tag_of_filtered_mode(const struct option *opt,
const char *arg, int unset)
{
+ enum tag_of_filtered_mode *val = opt->value;
+
if (unset || !strcmp(arg, "abort"))
- tag_of_filtered_mode = TAG_FILTERING_ABORT;
+ *val = TAG_FILTERING_ABORT;
else if (!strcmp(arg, "drop"))
- tag_of_filtered_mode = DROP;
+ *val = DROP;
else if (!strcmp(arg, "rewrite"))
- tag_of_filtered_mode = REWRITE;
+ *val = REWRITE;
else
return error("Unknown tag-of-filtered mode: %s", arg);
return 0;
@@ -86,21 +89,23 @@ static int parse_opt_tag_of_filtered_mode(const struct option *opt,
static int parse_opt_reencode_mode(const struct option *opt,
const char *arg, int unset)
{
+ enum reencode_mode *val = opt->value;
+
if (unset) {
- reencode_mode = REENCODE_ABORT;
+ *val = REENCODE_ABORT;
return 0;
}
switch (git_parse_maybe_bool(arg)) {
case 0:
- reencode_mode = REENCODE_NO;
+ *val = REENCODE_NO;
break;
case 1:
- reencode_mode = REENCODE_YES;
+ *val = REENCODE_YES;
break;
default:
if (!strcasecmp(arg, "abort"))
- reencode_mode = REENCODE_ABORT;
+ *val = REENCODE_ABORT;
else
return error("Unknown reencoding mode: %s", arg);
}
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index bbd9b2b3e7..444f41cf8c 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -1,6 +1,5 @@
#include "builtin.h"
#include "abspath.h"
-#include "cache.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
@@ -13,6 +12,7 @@
#include "commit.h"
#include "delta.h"
#include "pack.h"
+#include "path.h"
#include "refs.h"
#include "csum-file.h"
#include "quote.h"
@@ -21,12 +21,11 @@
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "mem-pool.h"
#include "commit-reach.h"
#include "khash.h"
#include "date.h"
-#include "wrapper.h"
#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
@@ -1103,6 +1102,7 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark)
|| (pack_size + PACK_SIZE_THRESHOLD + len) < pack_size)
cycle_packfile();
+ the_hash_algo->init_fn(&checkpoint.ctx);
hashfile_checkpoint(pack_file, &checkpoint);
offset = checkpoint.offset;
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 3ba0fe5a39..44c05ee86c 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "alloc.h"
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e3871048cf..fd134ba74d 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1,7 +1,7 @@
/*
* "git fetch"
*/
-#include "cache.h"
+#include "builtin.h"
#include "advice.h"
#include "config.h"
#include "gettext.h"
@@ -11,11 +11,10 @@
#include "refs.h"
#include "refspec.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oidset.h"
#include "oid-array.h"
#include "commit.h"
-#include "builtin.h"
#include "string-list.h"
#include "remote.h"
#include "transport.h"
@@ -29,6 +28,7 @@
#include "utf8.h"
#include "packfile.h"
#include "pager.h"
+#include "path.h"
#include "pkt-line.h"
#include "list-objects-filter-options.h"
#include "commit-reach.h"
@@ -110,7 +110,8 @@ struct fetch_config {
int submodule_fetch_jobs;
};
-static int git_fetch_config(const char *k, const char *v, void *cb)
+static int git_fetch_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
struct fetch_config *fetch_config = cb;
@@ -136,7 +137,7 @@ static int git_fetch_config(const char *k, const char *v, void *cb)
}
if (!strcmp(k, "submodule.fetchjobs")) {
- fetch_config->submodule_fetch_jobs = parse_submodule_fetchjobs(k, v);
+ fetch_config->submodule_fetch_jobs = parse_submodule_fetchjobs(k, v, ctx->kvi);
return 0;
} else if (!strcmp(k, "fetch.recursesubmodules")) {
fetch_config->recurse_submodules = parse_fetch_recurse_submodules_arg(k, v);
@@ -144,7 +145,7 @@ static int git_fetch_config(const char *k, const char *v, void *cb)
}
if (!strcmp(k, "fetch.parallel")) {
- fetch_config->parallel = git_config_int(k, v);
+ fetch_config->parallel = git_config_int(k, v, ctx->kvi);
if (fetch_config->parallel < 0)
die(_("fetch.parallel cannot be negative"));
if (!fetch_config->parallel)
@@ -164,7 +165,7 @@ static int git_fetch_config(const char *k, const char *v, void *cb)
"fetch.output", v);
}
- return git_default_config(k, v, cb);
+ return git_default_config(k, v, ctx, cb);
}
static int parse_refmap_arg(const struct option *opt, const char *arg, int unset)
@@ -175,7 +176,7 @@ static int parse_refmap_arg(const struct option *opt, const char *arg, int unset
* "git fetch --refmap='' origin foo"
* can be used to tell the command not to store anywhere
*/
- refspec_append(&refmap, arg);
+ refspec_append(opt->value, arg);
return 0;
}
@@ -307,7 +308,7 @@ static void clear_item(struct refname_hash_entry *item)
static void add_already_queued_tags(const char *refname,
- const struct object_id *old_oid,
+ const struct object_id *old_oid UNUSED,
const struct object_id *new_oid,
void *cb_data)
{
@@ -1799,7 +1800,9 @@ struct remote_group_data {
struct string_list *list;
};
-static int get_remote_group(const char *key, const char *value, void *priv)
+static int get_remote_group(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *priv)
{
struct remote_group_data *g = priv;
@@ -2201,13 +2204,10 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
PARSE_OPT_HIDDEN, option_fetch_parse_recurse_submodules),
OPT_BOOL(0, "update-shallow", &update_shallow,
N_("accept refs that update .git/shallow")),
- OPT_CALLBACK_F(0, "refmap", NULL, N_("refmap"),
+ OPT_CALLBACK_F(0, "refmap", &refmap, N_("refmap"),
N_("specify fetch refmap"), PARSE_OPT_NONEG, parse_refmap_arg),
OPT_STRING_LIST('o', "server-option", &server_options, N_("server-specific"), N_("option to transmit")),
- OPT_SET_INT('4', "ipv4", &family, N_("use IPv4 addresses only"),
- TRANSPORT_FAMILY_IPV4),
- OPT_SET_INT('6', "ipv6", &family, N_("use IPv6 addresses only"),
- TRANSPORT_FAMILY_IPV6),
+ OPT_IPVERSION(&family),
OPT_STRING_LIST(0, "negotiation-tip", &negotiation_tip, N_("revision"),
N_("report that we have only objects reachable from this object")),
OPT_BOOL(0, "negotiate-only", &negotiate_only,
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index cc81241642..0f9855b680 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -3,7 +3,6 @@
#include "fmt-merge-msg.h"
#include "gettext.h"
#include "parse-options.h"
-#include "wrapper.h"
static const char * const fmt_merge_msg_usage[] = {
N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 695fc8f4a5..350bfa6e81 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -1,11 +1,11 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "refs.h"
#include "object.h"
#include "parse-options.h"
#include "ref-filter.h"
+#include "strbuf.h"
#include "strvec.h"
#include "commit-reach.h"
@@ -24,7 +24,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
struct string_list sorting_options = STRING_LIST_INIT_DUP;
int maxcount = 0, icase = 0, omit_empty = 0;
struct ref_array array;
- struct ref_filter filter;
+ struct ref_filter filter = REF_FILTER_INIT;
struct ref_format format = REF_FORMAT_INIT;
struct strbuf output = STRBUF_INIT;
struct strbuf err = STRBUF_INIT;
@@ -47,6 +47,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
OPT_INTEGER( 0 , "count", &maxcount, N_("show only <n> matched refs")),
OPT_STRING( 0 , "format", &format.format, N_("format"), N_("format to use for the output")),
OPT__COLOR(&format.use_color, N_("respect format colors")),
+ OPT_REF_FILTER_EXCLUDE(&filter),
OPT_REF_SORT(&sorting_options),
OPT_CALLBACK(0, "points-at", &filter.points_at,
N_("object"), N_("print only refs which points at the given object"),
@@ -61,7 +62,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
};
memset(&array, 0, sizeof(array));
- memset(&filter, 0, sizeof(filter));
format.format = "%(objectname) %(objecttype)\t%(refname)";
@@ -121,8 +121,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
strbuf_release(&err);
strbuf_release(&output);
ref_array_clear(&array);
- free_commit_list(filter.with_commit);
- free_commit_list(filter.no_commit);
+ ref_filter_clear(&filter);
ref_sorting_release(sorting);
strvec_clear(&vec);
return 0;
diff --git a/builtin/for-each-repo.c b/builtin/for-each-repo.c
index 37daf7bec1..28186b30f5 100644
--- a/builtin/for-each-repo.c
+++ b/builtin/for-each-repo.c
@@ -1,6 +1,5 @@
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
#include "gettext.h"
#include "parse-options.h"
#include "path.h"
diff --git a/builtin/fsck.c b/builtin/fsck.c
index d9aa4db828..611925905e 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
@@ -21,10 +20,13 @@
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
+#include "read-cache-ll.h"
#include "replace-object.h"
#include "resolve-undo.h"
#include "run-command.h"
+#include "sparse-index.h"
#include "worktree.h"
#include "pack-revindex.h"
#include "pack-bitmap.h"
@@ -90,11 +92,11 @@ static int objerror(struct object *obj, const char *err)
return -1;
}
-static int fsck_error_func(struct fsck_options *o,
+static int fsck_error_func(struct fsck_options *o UNUSED,
const struct object_id *oid,
enum object_type object_type,
enum fsck_msg_type msg_type,
- enum fsck_msg_id msg_id,
+ enum fsck_msg_id msg_id UNUSED,
const char *message)
{
switch (msg_type) {
@@ -119,7 +121,7 @@ static int fsck_error_func(struct fsck_options *o,
static struct object_array pending;
static int mark_object(struct object *obj, enum object_type type,
- void *data, struct fsck_options *options)
+ void *data, struct fsck_options *options UNUSED)
{
struct object *parent = data;
@@ -204,8 +206,8 @@ static int traverse_reachable(void)
return !!result;
}
-static int mark_used(struct object *obj, enum object_type object_type,
- void *data, struct fsck_options *options)
+static int mark_used(struct object *obj, enum object_type type UNUSED,
+ void *data UNUSED, struct fsck_options *options UNUSED)
{
if (!obj)
return 1;
@@ -808,7 +810,7 @@ static int fsck_resolve_undo(struct index_state *istate,
}
static void fsck_index(struct index_state *istate, const char *index_path,
- int is_main_index)
+ int is_current_worktree)
{
unsigned int i;
@@ -830,7 +832,7 @@ static void fsck_index(struct index_state *istate, const char *index_path,
obj->flags |= USED;
fsck_put_object_name(&fsck_walk_options, &obj->oid,
"%s:%s",
- is_main_index ? "" : index_path,
+ is_current_worktree ? "" : index_path,
istate->cache[i]->name);
mark_object_reachable(obj);
}
@@ -1072,6 +1074,10 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
commit_graph_verify.git_cmd = 1;
strvec_pushl(&commit_graph_verify.args, "commit-graph",
"verify", "--object-dir", odb->path, NULL);
+ if (show_progress)
+ strvec_push(&commit_graph_verify.args, "--progress");
+ else
+ strvec_push(&commit_graph_verify.args, "--no-progress");
if (run_command(&commit_graph_verify))
errors_found |= ERROR_COMMIT_GRAPH;
}
@@ -1086,6 +1092,10 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
midx_verify.git_cmd = 1;
strvec_pushl(&midx_verify.args, "multi-pack-index",
"verify", "--object-dir", odb->path, NULL);
+ if (show_progress)
+ strvec_push(&midx_verify.args, "--progress");
+ else
+ strvec_push(&midx_verify.args, "--no-progress");
if (run_command(&midx_verify))
errors_found |= ERROR_MULTI_PACK_INDEX;
}
diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c
index f6dd9a784c..7e99c4d61b 100644
--- a/builtin/fsmonitor--daemon.c
+++ b/builtin/fsmonitor--daemon.c
@@ -1,19 +1,20 @@
#include "builtin.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsmonitor-ipc.h"
#include "fsmonitor-path-utils.h"
+#include "fsmonitor-settings.h"
#include "compat/fsmonitor/fsm-health.h"
#include "compat/fsmonitor/fsm-listen.h"
#include "fsmonitor--daemon.h"
#include "simple-ipc.h"
#include "khash.h"
#include "pkt-line.h"
+#include "trace.h"
#include "trace2.h"
static const char * const builtin_fsmonitor__daemon_usage[] = {
@@ -37,10 +38,11 @@ static int fsmonitor__start_timeout_sec = 60;
#define FSMONITOR__ANNOUNCE_STARTUP "fsmonitor.announcestartup"
static int fsmonitor__announce_startup = 0;
-static int fsmonitor_config(const char *var, const char *value, void *cb)
+static int fsmonitor_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, FSMONITOR__IPC_THREADS)) {
- int i = git_config_int(var, value);
+ int i = git_config_int(var, value, ctx->kvi);
if (i < 1)
return error(_("value of '%s' out of range: %d"),
FSMONITOR__IPC_THREADS, i);
@@ -49,7 +51,7 @@ static int fsmonitor_config(const char *var, const char *value, void *cb)
}
if (!strcmp(var, FSMONITOR__START_TIMEOUT)) {
- int i = git_config_int(var, value);
+ int i = git_config_int(var, value, ctx->kvi);
if (i < 0)
return error(_("value of '%s' out of range: %d"),
FSMONITOR__START_TIMEOUT, i);
@@ -59,7 +61,7 @@ static int fsmonitor_config(const char *var, const char *value, void *cb)
if (!strcmp(var, FSMONITOR__ANNOUNCE_STARTUP)) {
int is_bool;
- int i = git_config_bool_or_int(var, value, &is_bool);
+ int i = git_config_bool_or_int(var, value, ctx->kvi, &is_bool);
if (i < 0)
return error(_("value of '%s' not bool or int: %d"),
var, i);
@@ -67,7 +69,7 @@ static int fsmonitor_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
/*
diff --git a/builtin/gc.c b/builtin/gc.c
index f3942188a6..b842349d86 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -27,9 +27,10 @@
#include "commit-graph.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pack.h"
#include "pack-objects.h"
+#include "path.h"
#include "blob.h"
#include "tree.h"
#include "promisor-remote.h"
@@ -40,7 +41,6 @@
#include "hook.h"
#include "setup.h"
#include "trace2.h"
-#include "wrapper.h"
#define FAILED_RUN "failed to run %s"
@@ -1403,7 +1403,7 @@ static void initialize_task_config(int schedule)
strbuf_release(&config_name);
}
-static int task_option_parse(const struct option *opt,
+static int task_option_parse(const struct option *opt UNUSED,
const char *arg, int unset)
{
int i, num_selected = 0;
@@ -1708,6 +1708,15 @@ static int get_schedule_cmd(const char **cmd, int *is_available)
return 1;
}
+static int get_random_minute(void)
+{
+ /* Use a static value when under tests. */
+ if (getenv("GIT_TEST_MAINT_SCHEDULER"))
+ return 13;
+
+ return git_rand() % 60;
+}
+
static int is_launchctl_available(void)
{
const char *cmd = "launchctl";
@@ -1820,6 +1829,7 @@ static int launchctl_schedule_plist(const char *exec_path, enum schedule_priorit
struct strbuf plist = STRBUF_INIT, plist2 = STRBUF_INIT;
struct stat st;
const char *cmd = "launchctl";
+ int minute = get_random_minute();
get_schedule_cmd(&cmd, NULL);
preamble = "<?xml version=\"1.0\"?>\n"
@@ -1845,29 +1855,30 @@ static int launchctl_schedule_plist(const char *exec_path, enum schedule_priorit
case SCHEDULE_HOURLY:
repeat = "<dict>\n"
"<key>Hour</key><integer>%d</integer>\n"
- "<key>Minute</key><integer>0</integer>\n"
+ "<key>Minute</key><integer>%d</integer>\n"
"</dict>\n";
for (i = 1; i <= 23; i++)
- strbuf_addf(&plist, repeat, i);
+ strbuf_addf(&plist, repeat, i, minute);
break;
case SCHEDULE_DAILY:
repeat = "<dict>\n"
"<key>Day</key><integer>%d</integer>\n"
"<key>Hour</key><integer>0</integer>\n"
- "<key>Minute</key><integer>0</integer>\n"
+ "<key>Minute</key><integer>%d</integer>\n"
"</dict>\n";
for (i = 1; i <= 6; i++)
- strbuf_addf(&plist, repeat, i);
+ strbuf_addf(&plist, repeat, i, minute);
break;
case SCHEDULE_WEEKLY:
- strbuf_addstr(&plist,
- "<dict>\n"
- "<key>Day</key><integer>0</integer>\n"
- "<key>Hour</key><integer>0</integer>\n"
- "<key>Minute</key><integer>0</integer>\n"
- "</dict>\n");
+ strbuf_addf(&plist,
+ "<dict>\n"
+ "<key>Day</key><integer>0</integer>\n"
+ "<key>Hour</key><integer>0</integer>\n"
+ "<key>Minute</key><integer>%d</integer>\n"
+ "</dict>\n",
+ minute);
break;
default:
@@ -1923,7 +1934,7 @@ static int launchctl_add_plists(void)
launchctl_schedule_plist(exec_path, SCHEDULE_WEEKLY);
}
-static int launchctl_update_schedule(int run_maintenance, int fd)
+static int launchctl_update_schedule(int run_maintenance, int fd UNUSED)
{
if (run_maintenance)
return launchctl_add_plists();
@@ -1984,6 +1995,7 @@ static int schtasks_schedule_task(const char *exec_path, enum schedule_priority
const char *frequency = get_frequency(schedule);
char *name = schtasks_task_name(frequency);
struct strbuf tfilename = STRBUF_INIT;
+ int minute = get_random_minute();
get_schedule_cmd(&cmd, NULL);
@@ -2004,7 +2016,7 @@ static int schtasks_schedule_task(const char *exec_path, enum schedule_priority
switch (schedule) {
case SCHEDULE_HOURLY:
fprintf(tfile->fp,
- "<StartBoundary>2020-01-01T01:00:00</StartBoundary>\n"
+ "<StartBoundary>2020-01-01T01:%02d:00</StartBoundary>\n"
"<Enabled>true</Enabled>\n"
"<ScheduleByDay>\n"
"<DaysInterval>1</DaysInterval>\n"
@@ -2013,12 +2025,13 @@ static int schtasks_schedule_task(const char *exec_path, enum schedule_priority
"<Interval>PT1H</Interval>\n"
"<Duration>PT23H</Duration>\n"
"<StopAtDurationEnd>false</StopAtDurationEnd>\n"
- "</Repetition>\n");
+ "</Repetition>\n",
+ minute);
break;
case SCHEDULE_DAILY:
fprintf(tfile->fp,
- "<StartBoundary>2020-01-01T00:00:00</StartBoundary>\n"
+ "<StartBoundary>2020-01-01T00:%02d:00</StartBoundary>\n"
"<Enabled>true</Enabled>\n"
"<ScheduleByWeek>\n"
"<DaysOfWeek>\n"
@@ -2030,19 +2043,21 @@ static int schtasks_schedule_task(const char *exec_path, enum schedule_priority
"<Saturday />\n"
"</DaysOfWeek>\n"
"<WeeksInterval>1</WeeksInterval>\n"
- "</ScheduleByWeek>\n");
+ "</ScheduleByWeek>\n",
+ minute);
break;
case SCHEDULE_WEEKLY:
fprintf(tfile->fp,
- "<StartBoundary>2020-01-01T00:00:00</StartBoundary>\n"
+ "<StartBoundary>2020-01-01T00:%02d:00</StartBoundary>\n"
"<Enabled>true</Enabled>\n"
"<ScheduleByWeek>\n"
"<DaysOfWeek>\n"
"<Sunday />\n"
"</DaysOfWeek>\n"
"<WeeksInterval>1</WeeksInterval>\n"
- "</ScheduleByWeek>\n");
+ "</ScheduleByWeek>\n",
+ minute);
break;
default:
@@ -2068,7 +2083,7 @@ static int schtasks_schedule_task(const char *exec_path, enum schedule_priority
"</Settings>\n"
"<Actions Context=\"Author\">\n"
"<Exec>\n"
- "<Command>\"%s\\git.exe\"</Command>\n"
+ "<Command>\"%s\\headless-git.exe\"</Command>\n"
"<Arguments>--exec-path=\"%s\" for-each-repo --config=maintenance.repo maintenance run --schedule=%s</Arguments>\n"
"</Exec>\n"
"</Actions>\n"
@@ -2100,7 +2115,7 @@ static int schtasks_schedule_tasks(void)
schtasks_schedule_task(exec_path, SCHEDULE_WEEKLY);
}
-static int schtasks_update_schedule(int run_maintenance, int fd)
+static int schtasks_update_schedule(int run_maintenance, int fd UNUSED)
{
if (run_maintenance)
return schtasks_schedule_tasks();
@@ -2159,6 +2174,7 @@ static int crontab_update_schedule(int run_maintenance, int fd)
FILE *cron_list, *cron_in;
struct strbuf line = STRBUF_INIT;
struct tempfile *tmpedit = NULL;
+ int minute = get_random_minute();
get_schedule_cmd(&cmd, NULL);
strvec_split(&crontab_list.args, cmd);
@@ -2213,11 +2229,11 @@ static int crontab_update_schedule(int run_maintenance, int fd)
"# replaced in the future by a Git command.\n\n");
strbuf_addf(&line_format,
- "%%s %%s * * %%s \"%s/git\" --exec-path=\"%s\" for-each-repo --config=maintenance.repo maintenance run --schedule=%%s\n",
+ "%%d %%s * * %%s \"%s/git\" --exec-path=\"%s\" for-each-repo --config=maintenance.repo maintenance run --schedule=%%s\n",
exec_path, exec_path);
- fprintf(cron_in, line_format.buf, "0", "1-23", "*", "hourly");
- fprintf(cron_in, line_format.buf, "0", "0", "1-6", "daily");
- fprintf(cron_in, line_format.buf, "0", "0", "0", "weekly");
+ fprintf(cron_in, line_format.buf, minute, "1-23", "*", "hourly");
+ fprintf(cron_in, line_format.buf, minute, "0", "1-6", "daily");
+ fprintf(cron_in, line_format.buf, minute, "0", "0", "weekly");
strbuf_release(&line_format);
fprintf(cron_in, "\n%s\n", END_LINE);
@@ -2276,77 +2292,54 @@ static char *xdg_config_home_systemd(const char *filename)
return xdg_config_home_for("systemd/user", filename);
}
-static int systemd_timer_enable_unit(int enable,
- enum schedule_priority schedule)
-{
- const char *cmd = "systemctl";
- struct child_process child = CHILD_PROCESS_INIT;
- const char *frequency = get_frequency(schedule);
-
- /*
- * Disabling the systemd unit while it is already disabled makes
- * systemctl print an error.
- * Let's ignore it since it means we already are in the expected state:
- * the unit is disabled.
- *
- * On the other hand, enabling a systemd unit which is already enabled
- * produces no error.
- */
- if (!enable)
- child.no_stderr = 1;
-
- get_schedule_cmd(&cmd, NULL);
- strvec_split(&child.args, cmd);
- strvec_pushl(&child.args, "--user", enable ? "enable" : "disable",
- "--now", NULL);
- strvec_pushf(&child.args, "git-maintenance@%s.timer", frequency);
-
- if (start_command(&child))
- return error(_("failed to start systemctl"));
- if (finish_command(&child))
- /*
- * Disabling an already disabled systemd unit makes
- * systemctl fail.
- * Let's ignore this failure.
- *
- * Enabling an enabled systemd unit doesn't fail.
- */
- if (enable)
- return error(_("failed to run systemctl"));
- return 0;
-}
+#define SYSTEMD_UNIT_FORMAT "git-maintenance@%s.%s"
-static int systemd_timer_delete_unit_templates(void)
+static int systemd_timer_delete_timer_file(enum schedule_priority priority)
{
int ret = 0;
- char *filename = xdg_config_home_systemd("git-maintenance@.timer");
- if (unlink(filename) && !is_missing_file_error(errno))
- ret = error_errno(_("failed to delete '%s'"), filename);
- FREE_AND_NULL(filename);
+ const char *frequency = get_frequency(priority);
+ char *local_timer_name = xstrfmt(SYSTEMD_UNIT_FORMAT, frequency, "timer");
+ char *filename = xdg_config_home_systemd(local_timer_name);
- filename = xdg_config_home_systemd("git-maintenance@.service");
if (unlink(filename) && !is_missing_file_error(errno))
ret = error_errno(_("failed to delete '%s'"), filename);
free(filename);
+ free(local_timer_name);
return ret;
}
-static int systemd_timer_delete_units(void)
+static int systemd_timer_delete_service_template(void)
{
- return systemd_timer_enable_unit(0, SCHEDULE_HOURLY) ||
- systemd_timer_enable_unit(0, SCHEDULE_DAILY) ||
- systemd_timer_enable_unit(0, SCHEDULE_WEEKLY) ||
- systemd_timer_delete_unit_templates();
+ int ret = 0;
+ char *local_service_name = xstrfmt(SYSTEMD_UNIT_FORMAT, "", "service");
+ char *filename = xdg_config_home_systemd(local_service_name);
+ if (unlink(filename) && !is_missing_file_error(errno))
+ ret = error_errno(_("failed to delete '%s'"), filename);
+
+ free(filename);
+ free(local_service_name);
+ return ret;
}
-static int systemd_timer_write_unit_templates(const char *exec_path)
+/*
+ * Write the schedule information into a git-maintenance@<schedule>.timer
+ * file using a custom minute. This timer file cannot use the templating
+ * system, so we generate a specific file for each.
+ */
+static int systemd_timer_write_timer_file(enum schedule_priority schedule,
+ int minute)
{
+ int res = -1;
char *filename;
FILE *file;
const char *unit;
+ char *schedule_pattern = NULL;
+ const char *frequency = get_frequency(schedule);
+ char *local_timer_name = xstrfmt(SYSTEMD_UNIT_FORMAT, frequency, "timer");
+
+ filename = xdg_config_home_systemd(local_timer_name);
- filename = xdg_config_home_systemd("git-maintenance@.timer");
if (safe_create_leading_directories(filename)) {
error(_("failed to create directories for '%s'"), filename);
goto error;
@@ -2355,6 +2348,23 @@ static int systemd_timer_write_unit_templates(const char *exec_path)
if (!file)
goto error;
+ switch (schedule) {
+ case SCHEDULE_HOURLY:
+ schedule_pattern = xstrfmt("*-*-* 1..23:%02d:00", minute);
+ break;
+
+ case SCHEDULE_DAILY:
+ schedule_pattern = xstrfmt("Tue..Sun *-*-* 0:%02d:00", minute);
+ break;
+
+ case SCHEDULE_WEEKLY:
+ schedule_pattern = xstrfmt("Mon 0:%02d:00", minute);
+ break;
+
+ default:
+ BUG("Unhandled schedule_priority");
+ }
+
unit = "# This file was created and is maintained by Git.\n"
"# Any edits made in this file might be replaced in the future\n"
"# by a Git command.\n"
@@ -2363,12 +2373,12 @@ static int systemd_timer_write_unit_templates(const char *exec_path)
"Description=Optimize Git repositories data\n"
"\n"
"[Timer]\n"
- "OnCalendar=%i\n"
+ "OnCalendar=%s\n"
"Persistent=true\n"
"\n"
"[Install]\n"
"WantedBy=timers.target\n";
- if (fputs(unit, file) == EOF) {
+ if (fprintf(file, unit, schedule_pattern) < 0) {
error(_("failed to write to '%s'"), filename);
fclose(file);
goto error;
@@ -2377,9 +2387,36 @@ static int systemd_timer_write_unit_templates(const char *exec_path)
error_errno(_("failed to flush '%s'"), filename);
goto error;
}
+
+ res = 0;
+
+error:
+ free(schedule_pattern);
+ free(local_timer_name);
free(filename);
+ return res;
+}
- filename = xdg_config_home_systemd("git-maintenance@.service");
+/*
+ * No matter the schedule, we use the same service and can make use of the
+ * templating system. When installing git-maintenance@<schedule>.timer,
+ * systemd will notice that git-maintenance@.service exists as a template
+ * and will use this file and insert the <schedule> into the template at
+ * the position of "%i".
+ */
+static int systemd_timer_write_service_template(const char *exec_path)
+{
+ int res = -1;
+ char *filename;
+ FILE *file;
+ const char *unit;
+ char *local_service_name = xstrfmt(SYSTEMD_UNIT_FORMAT, "", "service");
+
+ filename = xdg_config_home_systemd(local_service_name);
+ if (safe_create_leading_directories(filename)) {
+ error(_("failed to create directories for '%s'"), filename);
+ goto error;
+ }
file = fopen_or_warn(filename, "w");
if (!file)
goto error;
@@ -2412,29 +2449,114 @@ static int systemd_timer_write_unit_templates(const char *exec_path)
error_errno(_("failed to flush '%s'"), filename);
goto error;
}
+
+ res = 0;
+
+error:
+ free(local_service_name);
free(filename);
+ return res;
+}
+
+static int systemd_timer_enable_unit(int enable,
+ enum schedule_priority schedule,
+ int minute)
+{
+ const char *cmd = "systemctl";
+ struct child_process child = CHILD_PROCESS_INIT;
+ const char *frequency = get_frequency(schedule);
+
+ /*
+ * Disabling the systemd unit while it is already disabled makes
+ * systemctl print an error.
+ * Let's ignore it since it means we already are in the expected state:
+ * the unit is disabled.
+ *
+ * On the other hand, enabling a systemd unit which is already enabled
+ * produces no error.
+ */
+ if (!enable)
+ child.no_stderr = 1;
+ else if (systemd_timer_write_timer_file(schedule, minute))
+ return -1;
+
+ get_schedule_cmd(&cmd, NULL);
+ strvec_split(&child.args, cmd);
+ strvec_pushl(&child.args, "--user", enable ? "enable" : "disable",
+ "--now", NULL);
+ strvec_pushf(&child.args, SYSTEMD_UNIT_FORMAT, frequency, "timer");
+
+ if (start_command(&child))
+ return error(_("failed to start systemctl"));
+ if (finish_command(&child))
+ /*
+ * Disabling an already disabled systemd unit makes
+ * systemctl fail.
+ * Let's ignore this failure.
+ *
+ * Enabling an enabled systemd unit doesn't fail.
+ */
+ if (enable)
+ return error(_("failed to run systemctl"));
return 0;
+}
+
+/*
+ * A previous version of Git wrote the timer units as template files.
+ * Clean these up, if they exist.
+ */
+static void systemd_timer_delete_stale_timer_templates(void)
+{
+ char *timer_template_name = xstrfmt(SYSTEMD_UNIT_FORMAT, "", "timer");
+ char *filename = xdg_config_home_systemd(timer_template_name);
+
+ if (unlink(filename) && !is_missing_file_error(errno))
+ warning(_("failed to delete '%s'"), filename);
-error:
free(filename);
- systemd_timer_delete_unit_templates();
- return -1;
+ free(timer_template_name);
+}
+
+static int systemd_timer_delete_unit_files(void)
+{
+ systemd_timer_delete_stale_timer_templates();
+
+ /* Purposefully not short-circuited to make sure all are called. */
+ return systemd_timer_delete_timer_file(SCHEDULE_HOURLY) |
+ systemd_timer_delete_timer_file(SCHEDULE_DAILY) |
+ systemd_timer_delete_timer_file(SCHEDULE_WEEKLY) |
+ systemd_timer_delete_service_template();
+}
+
+static int systemd_timer_delete_units(void)
+{
+ int minute = get_random_minute();
+ /* Purposefully not short-circuited to make sure all are called. */
+ return systemd_timer_enable_unit(0, SCHEDULE_HOURLY, minute) |
+ systemd_timer_enable_unit(0, SCHEDULE_DAILY, minute) |
+ systemd_timer_enable_unit(0, SCHEDULE_WEEKLY, minute) |
+ systemd_timer_delete_unit_files();
}
static int systemd_timer_setup_units(void)
{
+ int minute = get_random_minute();
const char *exec_path = git_exec_path();
- int ret = systemd_timer_write_unit_templates(exec_path) ||
- systemd_timer_enable_unit(1, SCHEDULE_HOURLY) ||
- systemd_timer_enable_unit(1, SCHEDULE_DAILY) ||
- systemd_timer_enable_unit(1, SCHEDULE_WEEKLY);
+ int ret = systemd_timer_write_service_template(exec_path) ||
+ systemd_timer_enable_unit(1, SCHEDULE_HOURLY, minute) ||
+ systemd_timer_enable_unit(1, SCHEDULE_DAILY, minute) ||
+ systemd_timer_enable_unit(1, SCHEDULE_WEEKLY, minute);
+
if (ret)
systemd_timer_delete_units();
+ else
+ systemd_timer_delete_stale_timer_templates();
+
return ret;
}
-static int systemd_timer_update_schedule(int run_maintenance, int fd)
+static int systemd_timer_update_schedule(int run_maintenance, int fd UNUSED)
{
if (run_maintenance)
return systemd_timer_setup_units();
@@ -2606,9 +2728,12 @@ static int maintenance_start(int argc, const char **argv, const char *prefix)
opts.scheduler = resolve_scheduler(opts.scheduler);
validate_scheduler(opts.scheduler);
+ if (update_background_schedule(&opts, 1))
+ die(_("failed to set up maintenance schedule"));
+
if (maintenance_register(ARRAY_SIZE(register_args)-1, register_args, NULL))
warning(_("failed to add repo to global config"));
- return update_background_schedule(&opts, 1);
+ return 0;
}
static const char *const builtin_maintenance_stop_usage[] = {
diff --git a/builtin/get-tar-commit-id.c b/builtin/get-tar-commit-id.c
index 564cfcac4f..20d0dfe9cf 100644
--- a/builtin/get-tar-commit-id.c
+++ b/builtin/get-tar-commit-id.c
@@ -1,12 +1,10 @@
/*
* Copyright (c) 2005, 2006 Rene Scharfe
*/
-#include "cache.h"
+#include "builtin.h"
#include "commit.h"
#include "tar.h"
-#include "builtin.h"
#include "quote.h"
-#include "wrapper.h"
static const char builtin_get_tar_commit_id_usage[] =
"git get-tar-commit-id";
diff --git a/builtin/grep.c b/builtin/grep.c
index b86c754def..b71222330a 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -3,8 +3,7 @@
*
* Copyright (c) 2006 Junio C Hamano
*/
-#include "cache.h"
-#include "alloc.h"
+#include "builtin.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
@@ -14,7 +13,6 @@
#include "commit.h"
#include "tag.h"
#include "tree-walk.h"
-#include "builtin.h"
#include "parse-options.h"
#include "string-list.h"
#include "run-command.h"
@@ -28,9 +26,11 @@
#include "submodule-config.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
#include "pager.h"
+#include "path.h"
+#include "read-cache-ll.h"
#include "write-or-die.h"
static const char *grep_prefix;
@@ -290,14 +290,18 @@ static int wait_all(void)
return hit;
}
-static int grep_cmd_config(const char *var, const char *value, void *cb)
+static int grep_cmd_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
- int st = grep_config(var, value, cb);
- if (git_color_default_config(var, value, NULL) < 0)
+ int st = grep_config(var, value, ctx, cb);
+
+ if (git_color_config(var, value, cb) < 0)
+ st = -1;
+ else if (git_default_config(var, value, ctx, cb) < 0)
st = -1;
if (!strcmp(var, "grep.threads")) {
- num_threads = git_config_int(var, value);
+ num_threads = git_config_int(var, value, ctx->kvi);
if (num_threads < 0)
die(_("invalid number of threads specified (%d) for %s"),
num_threads, var);
@@ -639,7 +643,7 @@ static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec,
strbuf_addstr(&name, base->buf + tn_len);
match = tree_entry_interesting(repo->index,
&entry, &name,
- 0, pathspec);
+ pathspec);
strbuf_setlen(&name, name_base_len);
if (match == all_entries_not_interesting)
@@ -920,9 +924,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
N_("process binary files with textconv filters")),
OPT_SET_INT('r', "recursive", &opt.max_depth,
N_("search in subdirectories (default)"), -1),
- { OPTION_INTEGER, 0, "max-depth", &opt.max_depth, N_("depth"),
- N_("descend at most <depth> levels"), PARSE_OPT_NONEG,
- NULL, 1 },
+ OPT_INTEGER_F(0, "max-depth", &opt.max_depth,
+ N_("descend at most <n> levels"), PARSE_OPT_NONEG),
OPT_GROUP(""),
OPT_SET_INT('E', "extended-regexp", &opt.pattern_type_option,
N_("use extended POSIX regular expressions"),
@@ -986,7 +989,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
OPT_CALLBACK_F(0, "and", &opt, NULL,
N_("combine patterns specified with -e"),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, and_callback),
- OPT_BOOL(0, "or", &dummy, ""),
+ OPT_BOOL_F(0, "or", &dummy, "", PARSE_OPT_NONEG),
OPT_CALLBACK_F(0, "not", &opt, NULL, "",
PARSE_OPT_NOARG | PARSE_OPT_NONEG, not_callback),
OPT_CALLBACK_F('(', NULL, &opt, NULL, "",
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index a380121166..5ffec99dce 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -10,12 +10,13 @@
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "blob.h"
#include "quote.h"
#include "parse-options.h"
#include "exec-cmd.h"
#include "setup.h"
+#include "strbuf.h"
#include "write-or-die.h"
/*
diff --git a/builtin/help.c b/builtin/help.c
index d3cf4af3f6..dc1fbe2b98 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -1,9 +1,8 @@
/*
* Builtin help command
*/
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "pager.h"
@@ -398,7 +397,8 @@ static int add_man_viewer_info(const char *var, const char *value)
return 0;
}
-static int git_help_config(const char *var, const char *value, void *cb)
+static int git_help_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "help.format")) {
if (!value)
@@ -421,7 +421,7 @@ static int git_help_config(const char *var, const char *value, void *cb)
if (starts_with(var, "man."))
return add_man_viewer_info(var, value);
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static struct cmdnames main_cmds, other_cmds;
diff --git a/builtin/hook.c b/builtin/hook.c
index 88051795c7..09b51a6487 100644
--- a/builtin/hook.c
+++ b/builtin/hook.c
@@ -1,4 +1,3 @@
-#include "cache.h"
#include "builtin.h"
#include "config.h"
#include "gettext.h"
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index d0d8067510..dda94a9f46 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "alloc.h"
#include "config.h"
#include "delta.h"
#include "environment.h"
@@ -14,17 +13,17 @@
#include "progress.h"
#include "fsck.h"
#include "exec-cmd.h"
+#include "strbuf.h"
#include "streaming.h"
#include "thread-utils.h"
#include "packfile.h"
#include "pack-revindex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oid-array.h"
#include "replace-object.h"
#include "promisor-remote.h"
#include "setup.h"
-#include "wrapper.h"
static const char index_pack_usage[] =
"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--[no-]rev-index] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";
@@ -222,7 +221,8 @@ static void cleanup_thread(void)
}
static int mark_link(struct object *obj, enum object_type type,
- void *data, struct fsck_options *options)
+ void *data UNUSED,
+ struct fsck_options *options UNUSED)
{
if (!obj)
return -1;
@@ -1166,6 +1166,7 @@ static void parse_pack_objects(unsigned char *hash)
struct ofs_delta_entry *ofs_delta = ofs_deltas;
struct object_id ref_delta_oid;
struct stat st;
+ git_hash_ctx tmp_ctx;
if (verbose)
progress = start_progress(
@@ -1202,7 +1203,9 @@ static void parse_pack_objects(unsigned char *hash)
/* Check pack integrity */
flush();
- the_hash_algo->final_fn(hash, &input_ctx);
+ the_hash_algo->init_fn(&tmp_ctx);
+ the_hash_algo->clone_fn(&tmp_ctx, &input_ctx);
+ the_hash_algo->final_fn(hash, &tmp_ctx);
if (!hasheq(fill(the_hash_algo->rawsz), hash))
die(_("pack is corrupted (SHA1 mismatch)"));
use(the_hash_algo->rawsz);
@@ -1581,18 +1584,19 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
strbuf_release(&pack_name);
}
-static int git_index_pack_config(const char *k, const char *v, void *cb)
+static int git_index_pack_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
struct pack_idx_option *opts = cb;
if (!strcmp(k, "pack.indexversion")) {
- opts->version = git_config_int(k, v);
+ opts->version = git_config_int(k, v, ctx->kvi);
if (opts->version > 2)
die(_("bad pack.indexVersion=%"PRIu32), opts->version);
return 0;
}
if (!strcmp(k, "pack.threads")) {
- nr_threads = git_config_int(k, v);
+ nr_threads = git_config_int(k, v, ctx->kvi);
if (nr_threads < 0)
die(_("invalid number of threads specified (%d)"),
nr_threads);
@@ -1608,7 +1612,7 @@ static int git_index_pack_config(const char *k, const char *v, void *cb)
else
opts->flags &= ~WRITE_REV;
}
- return git_default_config(k, v, cb);
+ return git_default_config(k, v, ctx, cb);
}
static int cmp_uint32(const void *a_, const void *b_)
diff --git a/builtin/init-db.c b/builtin/init-db.c
index aef4036105..cb727c826f 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -3,484 +3,16 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "abspath.h"
#include "config.h"
-#include "copy.h"
#include "environment.h"
#include "gettext.h"
-#include "refs.h"
-#include "builtin.h"
-#include "exec-cmd.h"
#include "object-file.h"
#include "parse-options.h"
#include "path.h"
#include "setup.h"
-#include "worktree.h"
-#include "wrapper.h"
-
-#ifndef DEFAULT_GIT_TEMPLATE_DIR
-#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates"
-#endif
-
-#ifdef NO_TRUSTABLE_FILEMODE
-#define TEST_FILEMODE 0
-#else
-#define TEST_FILEMODE 1
-#endif
-
-#define GIT_DEFAULT_HASH_ENVIRONMENT "GIT_DEFAULT_HASH"
-
-static int init_is_bare_repository = 0;
-static int init_shared_repository = -1;
-
-static void copy_templates_1(struct strbuf *path, struct strbuf *template_path,
- DIR *dir)
-{
- size_t path_baselen = path->len;
- size_t template_baselen = template_path->len;
- struct dirent *de;
-
- /* Note: if ".git/hooks" file exists in the repository being
- * re-initialized, /etc/core-git/templates/hooks/update would
- * cause "git init" to fail here. I think this is sane but
- * it means that the set of templates we ship by default, along
- * with the way the namespace under .git/ is organized, should
- * be really carefully chosen.
- */
- safe_create_dir(path->buf, 1);
- while ((de = readdir(dir)) != NULL) {
- struct stat st_git, st_template;
- int exists = 0;
-
- strbuf_setlen(path, path_baselen);
- strbuf_setlen(template_path, template_baselen);
-
- if (de->d_name[0] == '.')
- continue;
- strbuf_addstr(path, de->d_name);
- strbuf_addstr(template_path, de->d_name);
- if (lstat(path->buf, &st_git)) {
- if (errno != ENOENT)
- die_errno(_("cannot stat '%s'"), path->buf);
- }
- else
- exists = 1;
-
- if (lstat(template_path->buf, &st_template))
- die_errno(_("cannot stat template '%s'"), template_path->buf);
-
- if (S_ISDIR(st_template.st_mode)) {
- DIR *subdir = opendir(template_path->buf);
- if (!subdir)
- die_errno(_("cannot opendir '%s'"), template_path->buf);
- strbuf_addch(path, '/');
- strbuf_addch(template_path, '/');
- copy_templates_1(path, template_path, subdir);
- closedir(subdir);
- }
- else if (exists)
- continue;
- else if (S_ISLNK(st_template.st_mode)) {
- struct strbuf lnk = STRBUF_INIT;
- if (strbuf_readlink(&lnk, template_path->buf,
- st_template.st_size) < 0)
- die_errno(_("cannot readlink '%s'"), template_path->buf);
- if (symlink(lnk.buf, path->buf))
- die_errno(_("cannot symlink '%s' '%s'"),
- lnk.buf, path->buf);
- strbuf_release(&lnk);
- }
- else if (S_ISREG(st_template.st_mode)) {
- if (copy_file(path->buf, template_path->buf, st_template.st_mode))
- die_errno(_("cannot copy '%s' to '%s'"),
- template_path->buf, path->buf);
- }
- else
- error(_("ignoring template %s"), template_path->buf);
- }
-}
-
-static void copy_templates(const char *template_dir, const char *init_template_dir)
-{
- struct strbuf path = STRBUF_INIT;
- struct strbuf template_path = STRBUF_INIT;
- size_t template_len;
- struct repository_format template_format = REPOSITORY_FORMAT_INIT;
- struct strbuf err = STRBUF_INIT;
- DIR *dir;
- char *to_free = NULL;
-
- if (!template_dir)
- template_dir = getenv(TEMPLATE_DIR_ENVIRONMENT);
- if (!template_dir)
- template_dir = init_template_dir;
- if (!template_dir)
- template_dir = to_free = system_path(DEFAULT_GIT_TEMPLATE_DIR);
- if (!template_dir[0]) {
- free(to_free);
- return;
- }
-
- strbuf_addstr(&template_path, template_dir);
- strbuf_complete(&template_path, '/');
- template_len = template_path.len;
-
- dir = opendir(template_path.buf);
- if (!dir) {
- warning(_("templates not found in %s"), template_dir);
- goto free_return;
- }
-
- /* Make sure that template is from the correct vintage */
- strbuf_addstr(&template_path, "config");
- read_repository_format(&template_format, template_path.buf);
- strbuf_setlen(&template_path, template_len);
-
- /*
- * No mention of version at all is OK, but anything else should be
- * verified.
- */
- if (template_format.version >= 0 &&
- verify_repository_format(&template_format, &err) < 0) {
- warning(_("not copying templates from '%s': %s"),
- template_dir, err.buf);
- strbuf_release(&err);
- goto close_free_return;
- }
-
- strbuf_addstr(&path, get_git_common_dir());
- strbuf_complete(&path, '/');
- copy_templates_1(&path, &template_path, dir);
-close_free_return:
- closedir(dir);
-free_return:
- free(to_free);
- strbuf_release(&path);
- strbuf_release(&template_path);
- clear_repository_format(&template_format);
-}
-
-/*
- * If the git_dir is not directly inside the working tree, then git will not
- * find it by default, and we need to set the worktree explicitly.
- */
-static int needs_work_tree_config(const char *git_dir, const char *work_tree)
-{
- if (!strcmp(work_tree, "/") && !strcmp(git_dir, "/.git"))
- return 0;
- if (skip_prefix(git_dir, work_tree, &git_dir) &&
- !strcmp(git_dir, "/.git"))
- return 0;
- return 1;
-}
-
-void initialize_repository_version(int hash_algo, int reinit)
-{
- char repo_version_string[10];
- int repo_version = GIT_REPO_VERSION;
-
- if (hash_algo != GIT_HASH_SHA1)
- repo_version = GIT_REPO_VERSION_READ;
-
- /* This forces creation of new config file */
- xsnprintf(repo_version_string, sizeof(repo_version_string),
- "%d", repo_version);
- git_config_set("core.repositoryformatversion", repo_version_string);
-
- if (hash_algo != GIT_HASH_SHA1)
- git_config_set("extensions.objectformat",
- hash_algos[hash_algo].name);
- else if (reinit)
- git_config_set_gently("extensions.objectformat", NULL);
-}
-
-static int create_default_files(const char *template_path,
- const char *original_git_dir,
- const char *initial_branch,
- const struct repository_format *fmt,
- int quiet)
-{
- struct stat st1;
- struct strbuf buf = STRBUF_INIT;
- char *path;
- char junk[2];
- int reinit;
- int filemode;
- struct strbuf err = STRBUF_INIT;
- const char *init_template_dir = NULL;
- const char *work_tree = get_git_work_tree();
-
- /*
- * First copy the templates -- we might have the default
- * config file there, in which case we would want to read
- * from it after installing.
- *
- * Before reading that config, we also need to clear out any cached
- * values (since we've just potentially changed what's available on
- * disk).
- */
- git_config_get_pathname("init.templatedir", &init_template_dir);
- copy_templates(template_path, init_template_dir);
- free((char *)init_template_dir);
- git_config_clear();
- reset_shared_repository();
- git_config(git_default_config, NULL);
-
- /*
- * We must make sure command-line options continue to override any
- * values we might have just re-read from the config.
- */
- is_bare_repository_cfg = init_is_bare_repository || !work_tree;
- if (init_shared_repository != -1)
- set_shared_repository(init_shared_repository);
-
- /*
- * We would have created the above under user's umask -- under
- * shared-repository settings, we would need to fix them up.
- */
- if (get_shared_repository()) {
- adjust_shared_perm(get_git_dir());
- }
-
- /*
- * We need to create a "refs" dir in any case so that older
- * versions of git can tell that this is a repository.
- */
- safe_create_dir(git_path("refs"), 1);
- adjust_shared_perm(git_path("refs"));
-
- if (refs_init_db(&err))
- die("failed to set up refs db: %s", err.buf);
-
- /*
- * Point the HEAD symref to the initial branch with if HEAD does
- * not yet exist.
- */
- path = git_path_buf(&buf, "HEAD");
- reinit = (!access(path, R_OK)
- || readlink(path, junk, sizeof(junk)-1) != -1);
- if (!reinit) {
- char *ref;
-
- if (!initial_branch)
- initial_branch = git_default_branch_name(quiet);
-
- ref = xstrfmt("refs/heads/%s", initial_branch);
- if (check_refname_format(ref, 0) < 0)
- die(_("invalid initial branch name: '%s'"),
- initial_branch);
-
- if (create_symref("HEAD", ref, NULL) < 0)
- exit(1);
- free(ref);
- }
-
- initialize_repository_version(fmt->hash_algo, 0);
-
- /* Check filemode trustability */
- path = git_path_buf(&buf, "config");
- filemode = TEST_FILEMODE;
- if (TEST_FILEMODE && !lstat(path, &st1)) {
- struct stat st2;
- filemode = (!chmod(path, st1.st_mode ^ S_IXUSR) &&
- !lstat(path, &st2) &&
- st1.st_mode != st2.st_mode &&
- !chmod(path, st1.st_mode));
- if (filemode && !reinit && (st1.st_mode & S_IXUSR))
- filemode = 0;
- }
- git_config_set("core.filemode", filemode ? "true" : "false");
-
- if (is_bare_repository())
- git_config_set("core.bare", "true");
- else {
- git_config_set("core.bare", "false");
- /* allow template config file to override the default */
- if (log_all_ref_updates == LOG_REFS_UNSET)
- git_config_set("core.logallrefupdates", "true");
- if (needs_work_tree_config(original_git_dir, work_tree))
- git_config_set("core.worktree", work_tree);
- }
-
- if (!reinit) {
- /* Check if symlink is supported in the work tree */
- path = git_path_buf(&buf, "tXXXXXX");
- if (!close(xmkstemp(path)) &&
- !unlink(path) &&
- !symlink("testing", path) &&
- !lstat(path, &st1) &&
- S_ISLNK(st1.st_mode))
- unlink(path); /* good */
- else
- git_config_set("core.symlinks", "false");
-
- /* Check if the filesystem is case-insensitive */
- path = git_path_buf(&buf, "CoNfIg");
- if (!access(path, F_OK))
- git_config_set("core.ignorecase", "true");
- probe_utf8_pathname_composition();
- }
-
- strbuf_release(&buf);
- return reinit;
-}
-
-static void create_object_directory(void)
-{
- struct strbuf path = STRBUF_INIT;
- size_t baselen;
-
- strbuf_addstr(&path, get_object_directory());
- baselen = path.len;
-
- safe_create_dir(path.buf, 1);
-
- strbuf_setlen(&path, baselen);
- strbuf_addstr(&path, "/pack");
- safe_create_dir(path.buf, 1);
-
- strbuf_setlen(&path, baselen);
- strbuf_addstr(&path, "/info");
- safe_create_dir(path.buf, 1);
-
- strbuf_release(&path);
-}
-
-static void separate_git_dir(const char *git_dir, const char *git_link)
-{
- struct stat st;
-
- if (!stat(git_link, &st)) {
- const char *src;
-
- if (S_ISREG(st.st_mode))
- src = read_gitfile(git_link);
- else if (S_ISDIR(st.st_mode))
- src = git_link;
- else
- die(_("unable to handle file type %d"), (int)st.st_mode);
-
- if (rename(src, git_dir))
- die_errno(_("unable to move %s to %s"), src, git_dir);
- repair_worktrees(NULL, NULL);
- }
-
- write_file(git_link, "gitdir: %s", git_dir);
-}
-
-static void validate_hash_algorithm(struct repository_format *repo_fmt, int hash)
-{
- const char *env = getenv(GIT_DEFAULT_HASH_ENVIRONMENT);
- /*
- * If we already have an initialized repo, don't allow the user to
- * specify a different algorithm, as that could cause corruption.
- * Otherwise, if the user has specified one on the command line, use it.
- */
- if (repo_fmt->version >= 0 && hash != GIT_HASH_UNKNOWN && hash != repo_fmt->hash_algo)
- die(_("attempt to reinitialize repository with different hash"));
- else if (hash != GIT_HASH_UNKNOWN)
- repo_fmt->hash_algo = hash;
- else if (env) {
- int env_algo = hash_algo_by_name(env);
- if (env_algo == GIT_HASH_UNKNOWN)
- die(_("unknown hash algorithm '%s'"), env);
- repo_fmt->hash_algo = env_algo;
- }
-}
-
-int init_db(const char *git_dir, const char *real_git_dir,
- const char *template_dir, int hash, const char *initial_branch,
- unsigned int flags)
-{
- int reinit;
- int exist_ok = flags & INIT_DB_EXIST_OK;
- char *original_git_dir = real_pathdup(git_dir, 1);
- struct repository_format repo_fmt = REPOSITORY_FORMAT_INIT;
-
- if (real_git_dir) {
- struct stat st;
-
- if (!exist_ok && !stat(git_dir, &st))
- die(_("%s already exists"), git_dir);
-
- if (!exist_ok && !stat(real_git_dir, &st))
- die(_("%s already exists"), real_git_dir);
-
- set_git_dir(real_git_dir, 1);
- git_dir = get_git_dir();
- separate_git_dir(git_dir, original_git_dir);
- }
- else {
- set_git_dir(git_dir, 1);
- git_dir = get_git_dir();
- }
- startup_info->have_repository = 1;
-
- /* Ensure `core.hidedotfiles` is processed */
- git_config(platform_core_config, NULL);
-
- safe_create_dir(git_dir, 0);
-
- init_is_bare_repository = is_bare_repository();
-
- /* Check to see if the repository version is right.
- * Note that a newly created repository does not have
- * config file, so this will not fail. What we are catching
- * is an attempt to reinitialize new repository with an old tool.
- */
- check_repository_format(&repo_fmt);
-
- validate_hash_algorithm(&repo_fmt, hash);
-
- reinit = create_default_files(template_dir, original_git_dir,
- initial_branch, &repo_fmt,
- flags & INIT_DB_QUIET);
- if (reinit && initial_branch)
- warning(_("re-init: ignored --initial-branch=%s"),
- initial_branch);
-
- create_object_directory();
-
- if (get_shared_repository()) {
- char buf[10];
- /* We do not spell "group" and such, so that
- * the configuration can be read by older version
- * of git. Note, we use octal numbers for new share modes,
- * and compatibility values for PERM_GROUP and
- * PERM_EVERYBODY.
- */
- if (get_shared_repository() < 0)
- /* force to the mode value */
- xsnprintf(buf, sizeof(buf), "0%o", -get_shared_repository());
- else if (get_shared_repository() == PERM_GROUP)
- xsnprintf(buf, sizeof(buf), "%d", OLD_PERM_GROUP);
- else if (get_shared_repository() == PERM_EVERYBODY)
- xsnprintf(buf, sizeof(buf), "%d", OLD_PERM_EVERYBODY);
- else
- BUG("invalid value for shared_repository");
- git_config_set("core.sharedrepository", buf);
- git_config_set("receive.denyNonFastforwards", "true");
- }
-
- if (!(flags & INIT_DB_QUIET)) {
- int len = strlen(git_dir);
-
- if (reinit)
- printf(get_shared_repository()
- ? _("Reinitialized existing shared Git repository in %s%s\n")
- : _("Reinitialized existing Git repository in %s%s\n"),
- git_dir, len && git_dir[len-1] != '/' ? "/" : "");
- else
- printf(get_shared_repository()
- ? _("Initialized empty shared Git repository in %s%s\n")
- : _("Initialized empty Git repository in %s%s\n"),
- git_dir, len && git_dir[len-1] != '/' ? "/" : "");
- }
-
- free(original_git_dir);
- return 0;
-}
+#include "strbuf.h"
static int guess_repository_type(const char *git_dir)
{
@@ -546,6 +78,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
const char *object_format = NULL;
const char *initial_branch = NULL;
int hash_algo = GIT_HASH_UNKNOWN;
+ int init_shared_repository = -1;
const struct option init_db_options[] = {
OPT_STRING(0, "template", &template_dir, N_("template-directory"),
N_("directory from which templates will be used")),
@@ -703,5 +236,5 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
flags |= INIT_DB_EXIST_OK;
return init_db(git_dir, real_git_dir, template_dir, hash_algo,
- initial_branch, flags);
+ initial_branch, init_shared_repository, flags);
}
diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c
index 107ac28f0e..a110e69f83 100644
--- a/builtin/interpret-trailers.c
+++ b/builtin/interpret-trailers.c
@@ -5,7 +5,6 @@
*
*/
-#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
@@ -25,21 +24,24 @@ static enum trailer_if_exists if_exists;
static enum trailer_if_missing if_missing;
static int option_parse_where(const struct option *opt,
- const char *arg, int unset)
+ const char *arg, int unset UNUSED)
{
- return trailer_set_where(&where, arg);
+ /* unset implies NULL arg, which is handled in our helper */
+ return trailer_set_where(opt->value, arg);
}
static int option_parse_if_exists(const struct option *opt,
- const char *arg, int unset)
+ const char *arg, int unset UNUSED)
{
- return trailer_set_if_exists(&if_exists, arg);
+ /* unset implies NULL arg, which is handled in our helper */
+ return trailer_set_if_exists(opt->value, arg);
}
static int option_parse_if_missing(const struct option *opt,
- const char *arg, int unset)
+ const char *arg, int unset UNUSED)
{
- return trailer_set_if_missing(&if_missing, arg);
+ /* unset implies NULL arg, which is handled in our helper */
+ return trailer_set_if_missing(opt->value, arg);
}
static void new_trailers_clear(struct list_head *trailers)
@@ -98,11 +100,11 @@ int cmd_interpret_trailers(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "in-place", &opts.in_place, N_("edit files in place")),
OPT_BOOL(0, "trim-empty", &opts.trim_empty, N_("trim empty trailers")),
- OPT_CALLBACK(0, "where", NULL, N_("action"),
+ OPT_CALLBACK(0, "where", &where, N_("action"),
N_("where to place the new trailer"), option_parse_where),
- OPT_CALLBACK(0, "if-exists", NULL, N_("action"),
+ OPT_CALLBACK(0, "if-exists", &if_exists, N_("action"),
N_("action if trailer already exists"), option_parse_if_exists),
- OPT_CALLBACK(0, "if-missing", NULL, N_("action"),
+ OPT_CALLBACK(0, "if-missing", &if_missing, N_("action"),
N_("action if trailer is missing"), option_parse_if_missing),
OPT_BOOL(0, "only-trailers", &opts.only_trailers, N_("output only the trailers")),
diff --git a/builtin/log.c b/builtin/log.c
index c85f13a5d5..b085417942 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -6,7 +6,6 @@
*/
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -14,7 +13,7 @@
#include "refs.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pager.h"
#include "color.h"
#include "commit.h"
@@ -119,16 +118,19 @@ static struct string_list decorate_refs_exclude = STRING_LIST_INIT_NODUP;
static struct string_list decorate_refs_exclude_config = STRING_LIST_INIT_NODUP;
static struct string_list decorate_refs_include = STRING_LIST_INIT_NODUP;
-static int clear_decorations_callback(const struct option *opt,
- const char *arg, int unset)
+static int clear_decorations_callback(const struct option *opt UNUSED,
+ const char *arg, int unset)
{
+ BUG_ON_OPT_NEG(unset);
+ BUG_ON_OPT_ARG(arg);
string_list_clear(&decorate_refs_include, 0);
string_list_clear(&decorate_refs_exclude, 0);
use_default_decoration_filter = 0;
return 0;
}
-static int decorate_callback(const struct option *opt, const char *arg, int unset)
+static int decorate_callback(const struct option *opt UNUSED, const char *arg,
+ int unset)
{
if (unset)
decoration_style = 0;
@@ -550,7 +552,7 @@ static int cmd_log_walk_no_free(struct rev_info *rev)
rev->diffopt.flags.check_failed) {
return 02;
}
- return diff_result_code(&rev->diffopt, 0);
+ return diff_result_code(&rev->diffopt);
}
static int cmd_log_walk(struct rev_info *rev)
@@ -564,7 +566,8 @@ static int cmd_log_walk(struct rev_info *rev)
return retval;
}
-static int git_log_config(const char *var, const char *value, void *cb)
+static int git_log_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *slot_name;
@@ -573,7 +576,7 @@ static int git_log_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "format.subjectprefix"))
return git_config_string(&fmt_patch_subject_prefix, var, value);
if (!strcmp(var, "format.filenamemaxlength")) {
- fmt_patch_name_max = git_config_int(var, value);
+ fmt_patch_name_max = git_config_int(var, value, ctx->kvi);
return 0;
}
if (!strcmp(var, "format.encodeemailheaders")) {
@@ -613,7 +616,7 @@ static int git_log_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_diff_ui_config(var, value, cb);
+ return git_diff_ui_config(var, value, ctx, cb);
}
int cmd_whatchanged(int argc, const char **argv, const char *prefix)
@@ -718,8 +721,7 @@ static int show_tree_object(const struct object_id *oid UNUSED,
return 0;
}
-static void show_setup_revisions_tweak(struct rev_info *rev,
- struct setup_revision_opt *opt)
+static void show_setup_revisions_tweak(struct rev_info *rev)
{
if (rev->first_parent_only)
diff_merges_default_to_first_parent(rev);
@@ -862,8 +864,7 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
return cmd_log_deinit(cmd_log_walk(&rev), &rev);
}
-static void log_setup_revisions_tweak(struct rev_info *rev,
- struct setup_revision_opt *opt)
+static void log_setup_revisions_tweak(struct rev_info *rev)
{
if (rev->diffopt.flags.default_follow_renames &&
diff_check_follow_pathspec(&rev->prune_data, 0))
@@ -979,7 +980,8 @@ static enum cover_from_description parse_cover_from_description(const char *arg)
die(_("%s: invalid cover from description mode"), arg);
}
-static int git_format_config(const char *var, const char *value, void *cb)
+static int git_format_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "format.headers")) {
if (!value)
@@ -1108,7 +1110,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "diff.noprefix"))
return 0;
- return git_log_config(var, value, cb);
+ return git_log_config(var, value, ctx, cb);
}
static const char *output_directory = NULL;
@@ -1254,7 +1256,15 @@ static void show_diffstat(struct rev_info *rev,
fprintf(rev->diffopt.file, "\n");
}
+static void read_desc_file(struct strbuf *buf, const char *desc_file)
+{
+ if (strbuf_read_file(buf, desc_file, 0) < 0)
+ die_errno(_("unable to read branch description file '%s'"),
+ desc_file);
+}
+
static void prepare_cover_text(struct pretty_print_context *pp,
+ const char *description_file,
const char *branch_name,
struct strbuf *sb,
const char *encoding,
@@ -1268,7 +1278,9 @@ static void prepare_cover_text(struct pretty_print_context *pp,
if (cover_from_description_mode == COVER_FROM_NONE)
goto do_pp;
- if (branch_name && *branch_name)
+ if (description_file && *description_file)
+ read_desc_file(&description_sb, description_file);
+ else if (branch_name && *branch_name)
read_branch_desc(&description_sb, branch_name);
if (!description_sb.len)
goto do_pp;
@@ -1314,6 +1326,7 @@ static void get_notes_args(struct strvec *arg, struct rev_info *rev)
static void make_cover_letter(struct rev_info *rev, int use_separate_file,
struct commit *origin,
int nr, struct commit **list,
+ const char *description_file,
const char *branch_name,
int quiet)
{
@@ -1353,7 +1366,8 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,
pp.rev = rev;
pp.print_email_subject = 1;
pp_user_info(&pp, NULL, &sb, committer, encoding);
- prepare_cover_text(&pp, branch_name, &sb, encoding, need_8bit_cte);
+ prepare_cover_text(&pp, description_file, branch_name, &sb,
+ encoding, need_8bit_cte);
fprintf(rev->diffopt.file, "%s\n", sb.buf);
strbuf_release(&sb);
@@ -1469,19 +1483,16 @@ static int subject_prefix = 0;
static int subject_prefix_callback(const struct option *opt, const char *arg,
int unset)
{
+ struct strbuf *sprefix;
+
BUG_ON_OPT_NEG(unset);
+ sprefix = opt->value;
subject_prefix = 1;
- ((struct rev_info *)opt->value)->subject_prefix = arg;
+ strbuf_reset(sprefix);
+ strbuf_addstr(sprefix, arg);
return 0;
}
-static int rfc_callback(const struct option *opt, const char *arg, int unset)
-{
- BUG_ON_OPT_NEG(unset);
- BUG_ON_OPT_ARG(arg);
- return subject_prefix_callback(opt, "RFC PATCH", unset);
-}
-
static int numbered_cmdline_opt = 0;
static int numbered_callback(const struct option *opt, const char *arg,
@@ -1556,7 +1567,8 @@ static int inline_callback(const struct option *opt, const char *arg, int unset)
return 0;
}
-static int header_callback(const struct option *opt, const char *arg, int unset)
+static int header_callback(const struct option *opt UNUSED, const char *arg,
+ int unset)
{
if (unset) {
string_list_clear(&extra_hdr, 0);
@@ -1568,24 +1580,6 @@ static int header_callback(const struct option *opt, const char *arg, int unset)
return 0;
}
-static int to_callback(const struct option *opt, const char *arg, int unset)
-{
- if (unset)
- string_list_clear(&extra_to, 0);
- else
- string_list_append(&extra_to, arg);
- return 0;
-}
-
-static int cc_callback(const struct option *opt, const char *arg, int unset)
-{
- if (unset)
- string_list_clear(&extra_cc, 0);
- else
- string_list_append(&extra_cc, arg);
- return 0;
-}
-
static int from_callback(const struct option *opt, const char *arg, int unset)
{
char **from = opt->value;
@@ -1894,6 +1888,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
int quiet = 0;
const char *reroll_count = NULL;
char *cover_from_description_arg = NULL;
+ char *description_file = NULL;
char *branch_name = NULL;
char *base_commit = NULL;
struct base_tree_info bases;
@@ -1908,6 +1903,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
struct strbuf rdiff_title = STRBUF_INIT;
struct strbuf sprefix = STRBUF_INIT;
int creation_factor = -1;
+ int rfc = 0;
const struct option builtin_format_patch_options[] = {
OPT_CALLBACK_F('n', "numbered", &numbered, NULL,
@@ -1931,13 +1927,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
N_("mark the series as Nth re-roll")),
OPT_INTEGER(0, "filename-max-length", &fmt_patch_name_max,
N_("max length of output filename")),
- OPT_CALLBACK_F(0, "rfc", &rev, NULL,
- N_("use [RFC PATCH] instead of [PATCH]"),
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, rfc_callback),
+ OPT_BOOL(0, "rfc", &rfc, N_("use [RFC PATCH] instead of [PATCH]")),
OPT_STRING(0, "cover-from-description", &cover_from_description_arg,
N_("cover-from-description-mode"),
N_("generate parts of a cover letter based on a branch's description")),
- OPT_CALLBACK_F(0, "subject-prefix", &rev, N_("prefix"),
+ OPT_FILENAME(0, "description-file", &description_file,
+ N_("use branch description from file")),
+ OPT_CALLBACK_F(0, "subject-prefix", &sprefix, N_("prefix"),
N_("use [<prefix>] instead of [PATCH]"),
PARSE_OPT_NONEG, subject_prefix_callback),
OPT_CALLBACK_F('o', "output-directory", &output_directory,
@@ -1958,8 +1954,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
OPT_GROUP(N_("Messaging")),
OPT_CALLBACK(0, "add-header", NULL, N_("header"),
N_("add email header"), header_callback),
- OPT_CALLBACK(0, "to", NULL, N_("email"), N_("add To: header"), to_callback),
- OPT_CALLBACK(0, "cc", NULL, N_("email"), N_("add Cc: header"), cc_callback),
+ OPT_STRING_LIST(0, "to", &extra_to, N_("email"), N_("add To: header")),
+ OPT_STRING_LIST(0, "cc", &extra_cc, N_("email"), N_("add Cc: header")),
OPT_CALLBACK_F(0, "from", &from, N_("ident"),
N_("set From address to <ident> (or committer ident if absent)"),
PARSE_OPT_OPTARG, from_callback),
@@ -2017,11 +2013,11 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.max_parents = 1;
rev.diffopt.flags.recursive = 1;
rev.diffopt.no_free = 1;
- rev.subject_prefix = fmt_patch_subject_prefix;
memset(&s_r_opt, 0, sizeof(s_r_opt));
s_r_opt.def = "HEAD";
s_r_opt.revarg_opt = REVARG_COMMITTISH;
+ strbuf_addstr(&sprefix, fmt_patch_subject_prefix);
if (format_no_prefix)
diff_set_noprefix(&rev.diffopt);
@@ -2049,13 +2045,16 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (cover_from_description_arg)
cover_from_description_mode = parse_cover_from_description(cover_from_description_arg);
+ if (rfc)
+ strbuf_insertstr(&sprefix, 0, "RFC ");
+
if (reroll_count) {
- strbuf_addf(&sprefix, "%s v%s",
- rev.subject_prefix, reroll_count);
+ strbuf_addf(&sprefix, " v%s", reroll_count);
rev.reroll_count = reroll_count;
- rev.subject_prefix = sprefix.buf;
}
+ rev.subject_prefix = sprefix.buf;
+
for (i = 0; i < extra_hdr.nr; i++) {
strbuf_addstr(&buf, extra_hdr.items[i].string);
strbuf_addch(&buf, '\n');
@@ -2322,7 +2321,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (thread)
gen_message_id(&rev, "cover");
make_cover_letter(&rev, !!output_directory,
- origin, nr, list, branch_name, quiet);
+ origin, nr, list, description_file, branch_name, quiet);
print_bases(&bases, rev.diffopt.file);
print_signature(rev.diffopt.file);
total++;
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 72012c0f0f..a0229c3277 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -5,13 +5,12 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "repository.h"
#include "config.h"
#include "convert.h"
#include "quote.h"
#include "dir.h"
-#include "builtin.h"
#include "gettext.h"
#include "object-name.h"
#include "strbuf.h"
@@ -20,9 +19,12 @@
#include "parse-options.h"
#include "resolve-undo.h"
#include "string-list.h"
+#include "path.h"
#include "pathspec.h"
+#include "read-cache.h"
#include "run-command.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule.h"
#include "submodule-config.h"
#include "object-store.h"
@@ -262,74 +264,57 @@ static void expand_objectsize(struct strbuf *line, const struct object_id *oid,
strbuf_addstr(line, "-");
}
}
-struct show_index_data {
- const char *pathname;
- struct index_state *istate;
- const struct cache_entry *ce;
-};
-
-static size_t expand_show_index(struct strbuf *sb, const char *start,
- void *context)
-{
- struct show_index_data *data = context;
- const char *end;
- const char *p;
- size_t len = strbuf_expand_literal_cb(sb, start, NULL);
- struct stat st;
-
- if (len)
- return len;
- if (*start != '(')
- die(_("bad ls-files format: element '%s' "
- "does not start with '('"), start);
-
- end = strchr(start + 1, ')');
- if (!end)
- die(_("bad ls-files format: element '%s' "
- "does not end in ')'"), start);
-
- len = end - start + 1;
- if (skip_prefix(start, "(objectmode)", &p))
- strbuf_addf(sb, "%06o", data->ce->ce_mode);
- else if (skip_prefix(start, "(objectname)", &p))
- strbuf_add_unique_abbrev(sb, &data->ce->oid, abbrev);
- else if (skip_prefix(start, "(objecttype)", &p))
- strbuf_addstr(sb, type_name(object_type(data->ce->ce_mode)));
- else if (skip_prefix(start, "(objectsize:padded)", &p))
- expand_objectsize(sb, &data->ce->oid, object_type(data->ce->ce_mode), 1);
- else if (skip_prefix(start, "(objectsize)", &p))
- expand_objectsize(sb, &data->ce->oid, object_type(data->ce->ce_mode), 0);
- else if (skip_prefix(start, "(stage)", &p))
- strbuf_addf(sb, "%d", ce_stage(data->ce));
- else if (skip_prefix(start, "(eolinfo:index)", &p))
- strbuf_addstr(sb, S_ISREG(data->ce->ce_mode) ?
- get_cached_convert_stats_ascii(data->istate,
- data->ce->name) : "");
- else if (skip_prefix(start, "(eolinfo:worktree)", &p))
- strbuf_addstr(sb, !lstat(data->pathname, &st) &&
- S_ISREG(st.st_mode) ?
- get_wt_convert_stats_ascii(data->pathname) : "");
- else if (skip_prefix(start, "(eolattr)", &p))
- strbuf_addstr(sb, get_convert_attr_ascii(data->istate,
- data->pathname));
- else if (skip_prefix(start, "(path)", &p))
- write_name_to_buf(sb, data->pathname);
- else
- die(_("bad ls-files format: %%%.*s"), (int)len, start);
-
- return len;
-}
static void show_ce_fmt(struct repository *repo, const struct cache_entry *ce,
const char *format, const char *fullname) {
- struct show_index_data data = {
- .pathname = fullname,
- .istate = repo->index,
- .ce = ce,
- };
struct strbuf sb = STRBUF_INIT;
- strbuf_expand(&sb, format, expand_show_index, &data);
+ while (strbuf_expand_step(&sb, &format)) {
+ const char *end;
+ size_t len;
+ struct stat st;
+
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(&sb, '%');
+ else if ((len = strbuf_expand_literal(&sb, format)))
+ format += len;
+ else if (*format != '(')
+ die(_("bad ls-files format: element '%s' "
+ "does not start with '('"), format);
+ else if (!(end = strchr(format + 1, ')')))
+ die(_("bad ls-files format: element '%s' "
+ "does not end in ')'"), format);
+ else if (skip_prefix(format, "(objectmode)", &format))
+ strbuf_addf(&sb, "%06o", ce->ce_mode);
+ else if (skip_prefix(format, "(objectname)", &format))
+ strbuf_add_unique_abbrev(&sb, &ce->oid, abbrev);
+ else if (skip_prefix(format, "(objecttype)", &format))
+ strbuf_addstr(&sb, type_name(object_type(ce->ce_mode)));
+ else if (skip_prefix(format, "(objectsize:padded)", &format))
+ expand_objectsize(&sb, &ce->oid,
+ object_type(ce->ce_mode), 1);
+ else if (skip_prefix(format, "(objectsize)", &format))
+ expand_objectsize(&sb, &ce->oid,
+ object_type(ce->ce_mode), 0);
+ else if (skip_prefix(format, "(stage)", &format))
+ strbuf_addf(&sb, "%d", ce_stage(ce));
+ else if (skip_prefix(format, "(eolinfo:index)", &format))
+ strbuf_addstr(&sb, S_ISREG(ce->ce_mode) ?
+ get_cached_convert_stats_ascii(repo->index,
+ ce->name) : "");
+ else if (skip_prefix(format, "(eolinfo:worktree)", &format))
+ strbuf_addstr(&sb, !lstat(fullname, &st) &&
+ S_ISREG(st.st_mode) ?
+ get_wt_convert_stats_ascii(fullname) : "");
+ else if (skip_prefix(format, "(eolattr)", &format))
+ strbuf_addstr(&sb, get_convert_attr_ascii(repo->index,
+ fullname));
+ else if (skip_prefix(format, "(path)", &format))
+ write_name_to_buf(&sb, fullname);
+ else
+ die(_("bad ls-files format: %%%.*s"),
+ (int)(end - format + 1), format);
+ }
strbuf_addch(&sb, line_terminator);
fwrite(sb.buf, sb.len, 1, stdout);
strbuf_release(&sb);
@@ -543,143 +528,6 @@ static int get_common_prefix_len(const char *common_prefix)
return common_prefix_len;
}
-static int read_one_entry_opt(struct index_state *istate,
- const struct object_id *oid,
- struct strbuf *base,
- const char *pathname,
- unsigned mode, int opt)
-{
- int len;
- struct cache_entry *ce;
-
- if (S_ISDIR(mode))
- return READ_TREE_RECURSIVE;
-
- len = strlen(pathname);
- ce = make_empty_cache_entry(istate, base->len + len);
-
- ce->ce_mode = create_ce_mode(mode);
- ce->ce_flags = create_ce_flags(1);
- ce->ce_namelen = base->len + len;
- memcpy(ce->name, base->buf, base->len);
- memcpy(ce->name + base->len, pathname, len+1);
- oidcpy(&ce->oid, oid);
- return add_index_entry(istate, ce, opt);
-}
-
-static int read_one_entry(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode,
- void *context)
-{
- struct index_state *istate = context;
- return read_one_entry_opt(istate, oid, base, pathname,
- mode,
- ADD_CACHE_OK_TO_ADD|ADD_CACHE_SKIP_DFCHECK);
-}
-
-/*
- * This is used when the caller knows there is no existing entries at
- * the stage that will conflict with the entry being added.
- */
-static int read_one_entry_quick(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode,
- void *context)
-{
- struct index_state *istate = context;
- return read_one_entry_opt(istate, oid, base, pathname,
- mode, ADD_CACHE_JUST_APPEND);
-}
-
-/*
- * Read the tree specified with --with-tree option
- * (typically, HEAD) into stage #1 and then
- * squash them down to stage #0. This is used for
- * --error-unmatch to list and check the path patterns
- * that were given from the command line. We are not
- * going to write this index out.
- */
-void overlay_tree_on_index(struct index_state *istate,
- const char *tree_name, const char *prefix)
-{
- struct tree *tree;
- struct object_id oid;
- struct pathspec pathspec;
- struct cache_entry *last_stage0 = NULL;
- int i;
- read_tree_fn_t fn = NULL;
- int err;
-
- if (repo_get_oid(the_repository, tree_name, &oid))
- die("tree-ish %s not found.", tree_name);
- tree = parse_tree_indirect(&oid);
- if (!tree)
- die("bad tree-ish %s", tree_name);
-
- /* Hoist the unmerged entries up to stage #3 to make room */
- /* TODO: audit for interaction with sparse-index. */
- ensure_full_index(istate);
- for (i = 0; i < istate->cache_nr; i++) {
- struct cache_entry *ce = istate->cache[i];
- if (!ce_stage(ce))
- continue;
- ce->ce_flags |= CE_STAGEMASK;
- }
-
- if (prefix) {
- static const char *(matchbuf[1]);
- matchbuf[0] = NULL;
- parse_pathspec(&pathspec, PATHSPEC_ALL_MAGIC,
- PATHSPEC_PREFER_CWD, prefix, matchbuf);
- } else
- memset(&pathspec, 0, sizeof(pathspec));
-
- /*
- * See if we have cache entry at the stage. If so,
- * do it the original slow way, otherwise, append and then
- * sort at the end.
- */
- for (i = 0; !fn && i < istate->cache_nr; i++) {
- const struct cache_entry *ce = istate->cache[i];
- if (ce_stage(ce) == 1)
- fn = read_one_entry;
- }
-
- if (!fn)
- fn = read_one_entry_quick;
- err = read_tree(the_repository, tree, &pathspec, fn, istate);
- clear_pathspec(&pathspec);
- if (err)
- die("unable to read tree entries %s", tree_name);
-
- /*
- * Sort the cache entry -- we need to nuke the cache tree, though.
- */
- if (fn == read_one_entry_quick) {
- cache_tree_free(&istate->cache_tree);
- QSORT(istate->cache, istate->cache_nr, cmp_cache_name_compare);
- }
-
- for (i = 0; i < istate->cache_nr; i++) {
- struct cache_entry *ce = istate->cache[i];
- switch (ce_stage(ce)) {
- case 0:
- last_stage0 = ce;
- /* fallthru */
- default:
- continue;
- case 1:
- /*
- * If there is stage #0 entry for this, we do not
- * need to show it. We use CE_UPDATE bit to mark
- * such an entry.
- */
- if (last_stage0 &&
- !strcmp(last_stage0->name, ce->name))
- ce->ce_flags |= CE_UPDATE;
- }
- }
-}
-
static const char * const ls_files_usage[] = {
N_("git ls-files [<options>] [<file>...]"),
NULL
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index cb6cb77e08..fc76575430 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "gettext.h"
#include "hex.h"
#include "transport.h"
@@ -8,6 +7,7 @@
#include "remote.h"
#include "refs.h"
#include "parse-options.h"
+#include "wildmatch.h"
static const char * const ls_remote_usage[] = {
N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 077977a461..209d2dc0d5 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -3,17 +3,17 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "blob.h"
#include "tree.h"
#include "commit.h"
+#include "path.h"
#include "quote.h"
-#include "builtin.h"
#include "parse-options.h"
#include "pathspec.h"
@@ -50,68 +50,10 @@ struct ls_tree_options {
LS_SHOW_TREES = 1 << 2,
} ls_options;
struct pathspec pathspec;
- int chomp_prefix;
- const char *ls_tree_prefix;
+ const char *prefix;
const char *format;
};
-struct show_tree_data {
- struct ls_tree_options *options;
- unsigned mode;
- enum object_type type;
- const struct object_id *oid;
- const char *pathname;
- struct strbuf *base;
-};
-
-static size_t expand_show_tree(struct strbuf *sb, const char *start,
- void *context)
-{
- struct show_tree_data *data = context;
- struct ls_tree_options *options = data->options;
- const char *end;
- const char *p;
- unsigned int errlen;
- size_t len = strbuf_expand_literal_cb(sb, start, NULL);
-
- if (len)
- return len;
- if (*start != '(')
- die(_("bad ls-tree format: element '%s' does not start with '('"), start);
-
- end = strchr(start + 1, ')');
- if (!end)
- die(_("bad ls-tree format: element '%s' does not end in ')'"), start);
-
- len = end - start + 1;
- if (skip_prefix(start, "(objectmode)", &p)) {
- strbuf_addf(sb, "%06o", data->mode);
- } else if (skip_prefix(start, "(objecttype)", &p)) {
- strbuf_addstr(sb, type_name(data->type));
- } else if (skip_prefix(start, "(objectsize:padded)", &p)) {
- expand_objectsize(sb, data->oid, data->type, 1);
- } else if (skip_prefix(start, "(objectsize)", &p)) {
- expand_objectsize(sb, data->oid, data->type, 0);
- } else if (skip_prefix(start, "(objectname)", &p)) {
- strbuf_add_unique_abbrev(sb, data->oid, options->abbrev);
- } else if (skip_prefix(start, "(path)", &p)) {
- const char *name = data->base->buf;
- const char *prefix = options->chomp_prefix ? options->ls_tree_prefix : NULL;
- struct strbuf sbuf = STRBUF_INIT;
- size_t baselen = data->base->len;
-
- strbuf_addstr(data->base, data->pathname);
- name = relative_path(data->base->buf, prefix, &sbuf);
- quote_c_style(name, sb, NULL, 0);
- strbuf_setlen(data->base, baselen);
- strbuf_release(&sbuf);
- } else {
- errlen = (unsigned long)len;
- die(_("bad ls-tree format: %%%.*s"), errlen, start);
- }
- return len;
-}
-
static int show_recursive(struct ls_tree_options *options, const char *base,
size_t baselen, const char *pathname)
{
@@ -150,14 +92,7 @@ static int show_tree_fmt(const struct object_id *oid, struct strbuf *base,
int recurse = 0;
struct strbuf sb = STRBUF_INIT;
enum object_type type = object_type(mode);
- struct show_tree_data cb_data = {
- .options = options,
- .mode = mode,
- .type = type,
- .oid = oid,
- .pathname = pathname,
- .base = base,
- };
+ const char *format = options->format;
if (type == OBJ_TREE && show_recursive(options, base->buf, base->len, pathname))
recurse = READ_TREE_RECURSIVE;
@@ -166,7 +101,45 @@ static int show_tree_fmt(const struct object_id *oid, struct strbuf *base,
if (type == OBJ_BLOB && (options->ls_options & LS_TREE_ONLY))
return 0;
- strbuf_expand(&sb, options->format, expand_show_tree, &cb_data);
+ while (strbuf_expand_step(&sb, &format)) {
+ const char *end;
+ size_t len;
+
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(&sb, '%');
+ else if ((len = strbuf_expand_literal(&sb, format)))
+ format += len;
+ else if (*format != '(')
+ die(_("bad ls-tree format: element '%s' "
+ "does not start with '('"), format);
+ else if (!(end = strchr(format + 1, ')')))
+ die(_("bad ls-tree format: element '%s' "
+ "does not end in ')'"), format);
+ else if (skip_prefix(format, "(objectmode)", &format))
+ strbuf_addf(&sb, "%06o", mode);
+ else if (skip_prefix(format, "(objecttype)", &format))
+ strbuf_addstr(&sb, type_name(type));
+ else if (skip_prefix(format, "(objectsize:padded)", &format))
+ expand_objectsize(&sb, oid, type, 1);
+ else if (skip_prefix(format, "(objectsize)", &format))
+ expand_objectsize(&sb, oid, type, 0);
+ else if (skip_prefix(format, "(objectname)", &format))
+ strbuf_add_unique_abbrev(&sb, oid, options->abbrev);
+ else if (skip_prefix(format, "(path)", &format)) {
+ const char *name;
+ const char *prefix = options->prefix;
+ struct strbuf sbuf = STRBUF_INIT;
+ size_t baselen = base->len;
+
+ strbuf_addstr(base, pathname);
+ name = relative_path(base->buf, prefix, &sbuf);
+ quote_c_style(name, &sb, NULL, 0);
+ strbuf_setlen(base, baselen);
+ strbuf_release(&sbuf);
+ } else
+ die(_("bad ls-tree format: %%%.*s"),
+ (int)(end - format + 1), format);
+ }
strbuf_addch(&sb, options->null_termination ? '\0' : '\n');
fwrite(sb.buf, sb.len, 1, stdout);
strbuf_release(&sb);
@@ -198,7 +171,7 @@ static void show_tree_common_default_long(struct ls_tree_options *options,
const char *pathname,
const size_t baselen)
{
- const char *prefix = options->chomp_prefix ? options->ls_tree_prefix : NULL;
+ const char *prefix = options->prefix;
strbuf_addstr(base, pathname);
@@ -268,7 +241,8 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
return recurse;
}
-static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
+static int show_tree_name_only(const struct object_id *oid UNUSED,
+ struct strbuf *base,
const char *pathname, unsigned mode,
void *context)
{
@@ -283,7 +257,7 @@ static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
if (early >= 0)
return early;
- prefix = options->chomp_prefix ? options->ls_tree_prefix : NULL;
+ prefix = options->prefix;
strbuf_addstr(base, pathname);
if (options->null_termination) {
struct strbuf sb = STRBUF_INIT;
@@ -370,6 +344,7 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)
struct object_id oid;
struct tree *tree;
int i, full_tree = 0;
+ int full_name = !prefix || !*prefix;
read_tree_fn_t fn = NULL;
enum ls_tree_cmdmode cmdmode = MODE_DEFAULT;
int null_termination = 0;
@@ -391,8 +366,7 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)
MODE_NAME_STATUS),
OPT_CMDMODE(0, "object-only", &cmdmode, N_("list only objects"),
MODE_OBJECT_ONLY),
- OPT_SET_INT(0, "full-name", &options.chomp_prefix,
- N_("use full path names"), 0),
+ OPT_BOOL(0, "full-name", &full_name, N_("use full path names")),
OPT_BOOL(0, "full-tree", &full_tree,
N_("list entire tree; not just current directory "
"(implies --full-name)")),
@@ -406,18 +380,15 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)
int ret;
git_config(git_default_config, NULL);
- options.ls_tree_prefix = prefix;
- if (prefix)
- options.chomp_prefix = strlen(prefix);
argc = parse_options(argc, argv, prefix, ls_tree_options,
ls_tree_usage, 0);
options.null_termination = null_termination;
- if (full_tree) {
- options.ls_tree_prefix = prefix = NULL;
- options.chomp_prefix = 0;
- }
+ if (full_tree)
+ prefix = NULL;
+ options.prefix = full_name ? NULL : prefix;
+
/*
* We wanted to detect conflicts between --name-only and
* --name-status, but once we're done with that subsequent
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index a032a1c388..53b55dd71c 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -2,9 +2,8 @@
* Another stupid program, this one parsing the headers of an
* email to figure out authorship and subject
*/
-#include "cache.h"
-#include "abspath.h"
#include "builtin.h"
+#include "abspath.h"
#include "environment.h"
#include "gettext.h"
#include "utf8.h"
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 0b6193a091..3af9ddb8ae 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -4,7 +4,6 @@
* It just splits a mbox into a list of files: "0001" "0002" ..
* so you can process them further from there.
*/
-#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "string-list.h"
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index 854019a32d..e68b7fe45d 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "commit.h"
#include "gettext.h"
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 781818d08f..d7eb4c6540 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -1,6 +1,5 @@
#include "builtin.h"
#include "abspath.h"
-#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "setup.h"
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index ab16e70f23..270d5f644a 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -1,8 +1,10 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "hex.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "run-command.h"
+#include "sparse-index.h"
static const char *pgm;
static int one_shot, quiet;
diff --git a/builtin/merge-ours.c b/builtin/merge-ours.c
index c2e519301e..932924e5d0 100644
--- a/builtin/merge-ours.c
+++ b/builtin/merge-ours.c
@@ -10,6 +10,7 @@
#include "git-compat-util.h"
#include "builtin.h"
#include "diff.h"
+#include "repository.h"
static const char builtin_merge_ours_usage[] =
"git merge-ours <base>... -- HEAD <remote>...";
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index b9e980384a..3366699657 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -1,4 +1,3 @@
-#include "cache.h"
#include "builtin.h"
#include "advice.h"
#include "commit.h"
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 4325897a80..0de42aecf4 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -9,7 +9,7 @@
#include "commit-reach.h"
#include "merge-ort.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "parse-options.h"
#include "repository.h"
#include "blob.h"
@@ -324,7 +324,9 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
* The successful merge rules are the same as for the three-way merge
* in git-read-tree.
*/
-static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *entry, struct traverse_info *info)
+static int threeway_callback(int n UNUSED, unsigned long mask,
+ unsigned long dirmask UNUSED,
+ struct name_entry *entry, struct traverse_info *info)
{
/* Same in both? */
if (same_entry(entry+1, entry+2) || both_empty(entry+1, entry+2)) {
diff --git a/builtin/merge.c b/builtin/merge.c
index 8da3e46abb..545da0c8a1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -7,10 +7,9 @@
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "abspath.h"
#include "advice.h"
-#include "alloc.h"
#include "config.h"
#include "editor.h"
#include "environment.h"
@@ -18,7 +17,6 @@
#include "hex.h"
#include "object-name.h"
#include "parse-options.h"
-#include "builtin.h"
#include "lockfile.h"
#include "run-command.h"
#include "hook.h"
@@ -28,6 +26,7 @@
#include "refspec.h"
#include "commit.h"
#include "diffcore.h"
+#include "path.h"
#include "revision.h"
#include "unpack-trees.h"
#include "cache-tree.h"
@@ -37,6 +36,7 @@
#include "color.h"
#include "rerere.h"
#include "help.h"
+#include "merge.h"
#include "merge-recursive.h"
#include "merge-ort-wrappers.h"
#include "resolve-undo.h"
@@ -52,7 +52,6 @@
#include "commit-reach.h"
#include "wt-status.h"
#include "commit-graph.h"
-#include "wrapper.h"
#define DEFAULT_TWOHEAD (1<<0)
#define DEFAULT_OCTOPUS (1<<1)
@@ -80,8 +79,7 @@ static int overwrite_ignore = 1;
static struct strbuf merge_msg = STRBUF_INIT;
static struct strategy **use_strategies;
static size_t use_strategies_nr, use_strategies_alloc;
-static const char **xopts;
-static size_t xopts_nr, xopts_alloc;
+static struct strvec xopts = STRVEC_INIT;
static const char *branch;
static char *branch_mergeoptions;
static int verbosity;
@@ -233,7 +231,7 @@ static void append_strategy(struct strategy *s)
use_strategies[use_strategies_nr++] = s;
}
-static int option_parse_strategy(const struct option *opt,
+static int option_parse_strategy(const struct option *opt UNUSED,
const char *name, int unset)
{
if (unset)
@@ -243,29 +241,9 @@ static int option_parse_strategy(const struct option *opt,
return 0;
}
-static int option_parse_x(const struct option *opt,
- const char *arg, int unset)
-{
- if (unset)
- return 0;
-
- ALLOC_GROW(xopts, xopts_nr + 1, xopts_alloc);
- xopts[xopts_nr++] = xstrdup(arg);
- return 0;
-}
-
-static int option_parse_n(const struct option *opt,
- const char *arg, int unset)
-{
- BUG_ON_OPT_ARG(arg);
- show_diffstat = unset;
- return 0;
-}
-
static struct option builtin_merge_options[] = {
- OPT_CALLBACK_F('n', NULL, NULL, NULL,
- N_("do not show a diffstat at the end of the merge"),
- PARSE_OPT_NOARG, option_parse_n),
+ OPT_SET_INT('n', NULL, &show_diffstat,
+ N_("do not show a diffstat at the end of the merge"), 0),
OPT_BOOL(0, "stat", &show_diffstat,
N_("show a diffstat at the end of the merge")),
OPT_BOOL(0, "summary", &show_diffstat, N_("(synonym to --stat)")),
@@ -286,10 +264,10 @@ static struct option builtin_merge_options[] = {
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
OPT_BOOL(0, "verify-signatures", &verify_signatures,
N_("verify that the named commit has a valid GPG signature")),
- OPT_CALLBACK('s', "strategy", &use_strategies, N_("strategy"),
+ OPT_CALLBACK('s', "strategy", NULL, N_("strategy"),
N_("merge strategy to use"), option_parse_strategy),
- OPT_CALLBACK('X', "strategy-option", &xopts, N_("option=value"),
- N_("option for selected merge strategy"), option_parse_x),
+ OPT_STRVEC('X', "strategy-option", &xopts, N_("option=value"),
+ N_("option for selected merge strategy")),
OPT_CALLBACK('m', "message", &merge_msg, N_("message"),
N_("merge commit message (for a non-fast-forward merge)"),
option_parse_message),
@@ -623,7 +601,8 @@ static void parse_branch_merge_options(char *bmo)
free(argv);
}
-static int git_merge_config(const char *k, const char *v, void *cb)
+static int git_merge_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
int status;
const char *str;
@@ -668,10 +647,10 @@ static int git_merge_config(const char *k, const char *v, void *cb)
return 0;
}
- status = fmt_merge_msg_config(k, v, cb);
+ status = fmt_merge_msg_config(k, v, ctx, cb);
if (status)
return status;
- return git_diff_ui_config(k, v, cb);
+ return git_diff_ui_config(k, v, ctx, cb);
}
static int read_tree_trivial(struct object_id *common, struct object_id *head,
@@ -749,9 +728,9 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
o.show_rename_progress =
show_progress == -1 ? isatty(2) : show_progress;
- for (x = 0; x < xopts_nr; x++)
- if (parse_merge_opt(&o, xopts[x]))
- die(_("unknown strategy option: -X%s"), xopts[x]);
+ for (x = 0; x < xopts.nr; x++)
+ if (parse_merge_opt(&o, xopts.v[x]))
+ die(_("unknown strategy option: -X%s"), xopts.v[x]);
o.branch1 = head_arg;
o.branch2 = merge_remote_util(remoteheads->item)->name;
@@ -777,7 +756,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
return clean ? 0 : 1;
} else {
return try_merge_command(the_repository,
- strategy, xopts_nr, xopts,
+ strategy, xopts.nr, xopts.v,
common, head_arg, remoteheads);
}
}
@@ -879,13 +858,15 @@ static void prepare_to_commit(struct commit_list *remoteheads)
strbuf_addch(&msg, '\n');
if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS) {
wt_status_append_cut_line(&msg);
- strbuf_commented_addf(&msg, "\n");
+ strbuf_commented_addf(&msg, comment_line_char, "\n");
}
- strbuf_commented_addf(&msg, _(merge_editor_comment));
+ strbuf_commented_addf(&msg, comment_line_char,
+ _(merge_editor_comment));
if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS)
- strbuf_commented_addf(&msg, _(scissors_editor_comment));
+ strbuf_commented_addf(&msg, comment_line_char,
+ _(scissors_editor_comment));
else
- strbuf_commented_addf(&msg,
+ strbuf_commented_addf(&msg, comment_line_char,
_(no_scissors_editor_comment), comment_line_char);
}
if (signoff)
diff --git a/builtin/mktag.c b/builtin/mktag.c
index 44fa56eff3..d8e0b5afc0 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -2,10 +2,11 @@
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
+#include "strbuf.h"
#include "tag.h"
#include "replace-object.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "fsck.h"
#include "config.h"
@@ -17,11 +18,11 @@ static int option_strict = 1;
static struct fsck_options fsck_options = FSCK_OPTIONS_STRICT;
-static int mktag_fsck_error_func(struct fsck_options *o,
- const struct object_id *oid,
- enum object_type object_type,
+static int mktag_fsck_error_func(struct fsck_options *o UNUSED,
+ const struct object_id *oid UNUSED,
+ enum object_type object_type UNUSED,
enum fsck_msg_type msg_type,
- enum fsck_msg_id msg_id,
+ enum fsck_msg_id msg_id UNUSED,
const char *message)
{
switch (msg_type) {
diff --git a/builtin/mktree.c b/builtin/mktree.c
index 09a7bd5c5c..9a22d4e277 100644
--- a/builtin/mktree.c
+++ b/builtin/mktree.c
@@ -4,13 +4,13 @@
* Copyright (c) Junio C Hamano, 2006, 2009
*/
#include "builtin.h"
-#include "alloc.h"
#include "gettext.h"
#include "hex.h"
#include "quote.h"
+#include "strbuf.h"
#include "tree.h"
#include "parse-options.h"
-#include "object-store.h"
+#include "object-store-ll.h"
static struct treeent {
unsigned mode;
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 1b5083f8b2..a72aebecaa 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -1,13 +1,13 @@
#include "builtin.h"
#include "abspath.h"
-#include "cache.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "midx.h"
+#include "strbuf.h"
#include "trace2.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#define BUILTIN_MIDX_WRITE_USAGE \
N_("git multi-pack-index [<options>] write [--preferred-pack=<pack>]" \
@@ -82,6 +82,7 @@ static struct option *add_common_options(struct option *prev)
}
static int git_multi_pack_index_write_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
if (!strcmp(var, "pack.writebitmaphashcache")) {
diff --git a/builtin/mv.c b/builtin/mv.c
index 665bd27448..c596515ad0 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -7,10 +7,10 @@
#include "builtin.h"
#include "abspath.h"
#include "advice.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
+#include "name-hash.h"
#include "object-file.h"
#include "pathspec.h"
#include "lockfile.h"
@@ -18,6 +18,7 @@
#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
#include "submodule.h"
@@ -183,7 +184,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
int src_dir_nr = 0, src_dir_alloc = 0;
struct strbuf a_src_dir = STRBUF_INIT;
enum update_mode *modes, dst_mode = 0;
- struct stat st;
+ struct stat st, dest_st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
struct lock_file lock_file = LOCK_INIT;
struct cache_entry *ce;
@@ -303,8 +304,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
goto act_on_entry;
}
if (S_ISDIR(st.st_mode)
- && lstat(dst, &st) == 0) {
- bad = _("cannot move directory over file");
+ && lstat(dst, &dest_st) == 0) {
+ bad = _("destination already exists");
goto act_on_entry;
}
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 4d15a23fc4..2dd1807c4e 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
@@ -15,6 +14,7 @@
#include "hash-lookup.h"
#include "commit-slab.h"
#include "commit-graph.h"
+#include "wildmatch.h"
/*
* One day. See the 'name a rev shortly after epoch' test in t6120 when
@@ -582,12 +582,8 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")),
OPT_BOOL(0, "always", &always,
N_("show abbreviated commit object as fallback")),
- {
- /* A Hidden OPT_BOOL */
- OPTION_SET_INT, 0, "peel-tag", &peel_tag, NULL,
- N_("dereference tags in the input (internal use)"),
- PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1,
- },
+ OPT_HIDDEN_BOOL(0, "peel-tag", &peel_tag,
+ N_("dereference tags in the input (internal use)")),
OPT_END(),
};
diff --git a/builtin/notes.c b/builtin/notes.c
index d5788352b6..9f38863dd5 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -7,15 +7,17 @@
* and builtin/tag.c by Kristian Høgsberg and Carlos Rica.
*/
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
+#include "alloc.h"
#include "editor.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "notes.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "repository.h"
#include "blob.h"
#include "pretty.h"
@@ -29,11 +31,12 @@
#include "worktree.h"
#include "write-or-die.h"
+static const char *separator = "\n";
static const char * const git_notes_usage[] = {
N_("git notes [--ref <notes-ref>] [list [<object>]]"),
- N_("git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+ N_("git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
N_("git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"),
- N_("git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+ N_("git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
N_("git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"),
N_("git notes [--ref <notes-ref>] show [<object>]"),
N_("git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"),
@@ -101,11 +104,26 @@ static const char * const git_notes_get_ref_usage[] = {
static const char note_template[] =
N_("Write/edit the notes for the following object:");
+enum notes_stripspace {
+ UNSPECIFIED = -1,
+ NO_STRIPSPACE = 0,
+ STRIPSPACE = 1,
+};
+
+struct note_msg {
+ enum notes_stripspace stripspace;
+ struct strbuf buf;
+};
+
struct note_data {
int given;
int use_editor;
+ int stripspace;
char *edit_path;
struct strbuf buf;
+ struct note_msg **messages;
+ size_t msg_nr;
+ size_t msg_alloc;
};
static void free_note_data(struct note_data *d)
@@ -115,6 +133,12 @@ static void free_note_data(struct note_data *d)
free(d->edit_path);
}
strbuf_release(&d->buf);
+
+ while (d->msg_nr--) {
+ strbuf_release(&d->messages[d->msg_nr]->buf);
+ free(d->messages[d->msg_nr]);
+ }
+ free(d->messages);
}
static int list_each_note(const struct object_id *object_oid,
@@ -157,7 +181,7 @@ static void write_commented_object(int fd, const struct object_id *object)
if (strbuf_read(&buf, show.out, 0) < 0)
die_errno(_("could not read 'show' output"));
- strbuf_add_commented_lines(&cbuf, buf.buf, buf.len);
+ strbuf_add_commented_lines(&cbuf, buf.buf, buf.len, comment_line_char);
write_or_die(fd, cbuf.buf, cbuf.len);
strbuf_release(&cbuf);
@@ -185,9 +209,10 @@ static void prepare_note_data(const struct object_id *object, struct note_data *
copy_obj_to_fd(fd, old_note);
strbuf_addch(&buf, '\n');
- strbuf_add_commented_lines(&buf, "\n", strlen("\n"));
- strbuf_add_commented_lines(&buf, _(note_template), strlen(_(note_template)));
- strbuf_add_commented_lines(&buf, "\n", strlen("\n"));
+ strbuf_add_commented_lines(&buf, "\n", strlen("\n"), comment_line_char);
+ strbuf_add_commented_lines(&buf, _(note_template), strlen(_(note_template)),
+ comment_line_char);
+ strbuf_add_commented_lines(&buf, "\n", strlen("\n"), comment_line_char);
write_or_die(fd, buf.buf, buf.len);
write_commented_object(fd, object);
@@ -199,7 +224,8 @@ static void prepare_note_data(const struct object_id *object, struct note_data *
if (launch_editor(d->edit_path, &d->buf, NULL)) {
die(_("please supply the note contents using either -m or -F option"));
}
- strbuf_stripspace(&d->buf, 1);
+ if (d->stripspace)
+ strbuf_stripspace(&d->buf, comment_line_char);
}
}
@@ -215,66 +241,102 @@ static void write_note_data(struct note_data *d, struct object_id *oid)
}
}
+static void append_separator(struct strbuf *message)
+{
+ size_t sep_len = 0;
+
+ if (!separator)
+ return;
+ else if ((sep_len = strlen(separator)) && separator[sep_len - 1] == '\n')
+ strbuf_addstr(message, separator);
+ else
+ strbuf_addf(message, "%s%s", separator, "\n");
+}
+
+static void concat_messages(struct note_data *d)
+{
+ struct strbuf msg = STRBUF_INIT;
+ size_t i;
+
+ for (i = 0; i < d->msg_nr ; i++) {
+ if (d->buf.len)
+ append_separator(&d->buf);
+ strbuf_add(&msg, d->messages[i]->buf.buf, d->messages[i]->buf.len);
+ strbuf_addbuf(&d->buf, &msg);
+ if ((d->stripspace == UNSPECIFIED &&
+ d->messages[i]->stripspace == STRIPSPACE) ||
+ d->stripspace == STRIPSPACE)
+ strbuf_stripspace(&d->buf, 0);
+ strbuf_reset(&msg);
+ }
+ strbuf_release(&msg);
+}
+
static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
{
struct note_data *d = opt->value;
+ struct note_msg *msg = xmalloc(sizeof(*msg));
BUG_ON_OPT_NEG(unset);
- strbuf_grow(&d->buf, strlen(arg) + 2);
- if (d->buf.len)
- strbuf_addch(&d->buf, '\n');
- strbuf_addstr(&d->buf, arg);
- strbuf_stripspace(&d->buf, 0);
-
- d->given = 1;
+ strbuf_init(&msg->buf, strlen(arg));
+ strbuf_addstr(&msg->buf, arg);
+ ALLOC_GROW_BY(d->messages, d->msg_nr, 1, d->msg_alloc);
+ d->messages[d->msg_nr - 1] = msg;
+ msg->stripspace = STRIPSPACE;
return 0;
}
static int parse_file_arg(const struct option *opt, const char *arg, int unset)
{
struct note_data *d = opt->value;
+ struct note_msg *msg = xmalloc(sizeof(*msg));
BUG_ON_OPT_NEG(unset);
- if (d->buf.len)
- strbuf_addch(&d->buf, '\n');
+ strbuf_init(&msg->buf , 0);
if (!strcmp(arg, "-")) {
- if (strbuf_read(&d->buf, 0, 1024) < 0)
+ if (strbuf_read(&msg->buf, 0, 1024) < 0)
die_errno(_("cannot read '%s'"), arg);
- } else if (strbuf_read_file(&d->buf, arg, 1024) < 0)
+ } else if (strbuf_read_file(&msg->buf, arg, 1024) < 0)
die_errno(_("could not open or read '%s'"), arg);
- strbuf_stripspace(&d->buf, 0);
- d->given = 1;
+ ALLOC_GROW_BY(d->messages, d->msg_nr, 1, d->msg_alloc);
+ d->messages[d->msg_nr - 1] = msg;
+ msg->stripspace = STRIPSPACE;
return 0;
}
static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
{
struct note_data *d = opt->value;
- char *buf;
+ struct note_msg *msg = xmalloc(sizeof(*msg));
+ char *value;
struct object_id object;
enum object_type type;
unsigned long len;
BUG_ON_OPT_NEG(unset);
- if (d->buf.len)
- strbuf_addch(&d->buf, '\n');
-
+ strbuf_init(&msg->buf, 0);
if (repo_get_oid(the_repository, arg, &object))
die(_("failed to resolve '%s' as a valid ref."), arg);
- if (!(buf = repo_read_object_file(the_repository, &object, &type, &len)))
+ if (!(value = repo_read_object_file(the_repository, &object, &type, &len)))
die(_("failed to read object '%s'."), arg);
if (type != OBJ_BLOB) {
- free(buf);
+ strbuf_release(&msg->buf);
+ free(value);
+ free(msg);
die(_("cannot read note data from non-blob object '%s'."), arg);
}
- strbuf_add(&d->buf, buf, len);
- free(buf);
- d->given = 1;
+ strbuf_add(&msg->buf, value, len);
+ free(value);
+
+ msg->buf.len = len;
+ ALLOC_GROW_BY(d->messages, d->msg_nr, 1, d->msg_alloc);
+ d->messages[d->msg_nr - 1] = msg;
+ msg->stripspace = NO_STRIPSPACE;
return 0;
}
@@ -286,6 +348,16 @@ static int parse_reedit_arg(const struct option *opt, const char *arg, int unset
return parse_reuse_arg(opt, arg, unset);
}
+static int parse_separator_arg(const struct option *opt, const char *arg,
+ int unset)
+{
+ if (unset)
+ *(const char **)opt->value = NULL;
+ else
+ *(const char **)opt->value = arg ? arg : "\n";
+ return 0;
+}
+
static int notes_copy_from_stdin(int force, const char *rewrite_cmd)
{
struct strbuf buf = STRBUF_INIT;
@@ -408,7 +480,8 @@ static int add(int argc, const char **argv, const char *prefix)
struct notes_tree *t;
struct object_id object, new_note;
const struct object_id *note;
- struct note_data d = { 0, 0, NULL, STRBUF_INIT };
+ struct note_data d = { .buf = STRBUF_INIT, .stripspace = UNSPECIFIED };
+
struct option options[] = {
OPT_CALLBACK_F('m', "message", &d, N_("message"),
N_("note contents as a string"), PARSE_OPT_NONEG,
@@ -425,6 +498,12 @@ static int add(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "allow-empty", &allow_empty,
N_("allow storing empty note")),
OPT__FORCE(&force, N_("replace existing notes"), PARSE_OPT_NOCOMPLETE),
+ OPT_CALLBACK_F(0, "separator", &separator,
+ N_("<paragraph-break>"),
+ N_("insert <paragraph-break> between paragraphs"),
+ PARSE_OPT_OPTARG, parse_separator_arg),
+ OPT_BOOL(0, "stripspace", &d.stripspace,
+ N_("remove unnecessary whitespace")),
OPT_END()
};
@@ -436,6 +515,10 @@ static int add(int argc, const char **argv, const char *prefix)
usage_with_options(git_notes_add_usage, options);
}
+ if (d.msg_nr)
+ concat_messages(&d);
+ d.given = !!d.buf.len;
+
object_ref = argc > 1 ? argv[1] : "HEAD";
if (repo_get_oid(the_repository, object_ref, &object))
@@ -574,7 +657,7 @@ static int append_edit(int argc, const char **argv, const char *prefix)
const struct object_id *note;
char *logmsg;
const char * const *usage;
- struct note_data d = { 0, 0, NULL, STRBUF_INIT };
+ struct note_data d = { .buf = STRBUF_INIT, .stripspace = UNSPECIFIED };
struct option options[] = {
OPT_CALLBACK_F('m', "message", &d, N_("message"),
N_("note contents as a string"), PARSE_OPT_NONEG,
@@ -590,6 +673,12 @@ static int append_edit(int argc, const char **argv, const char *prefix)
parse_reuse_arg),
OPT_BOOL(0, "allow-empty", &allow_empty,
N_("allow storing empty note")),
+ OPT_CALLBACK_F(0, "separator", &separator,
+ N_("<paragraph-break>"),
+ N_("insert <paragraph-break> between paragraphs"),
+ PARSE_OPT_OPTARG, parse_separator_arg),
+ OPT_BOOL(0, "stripspace", &d.stripspace,
+ N_("remove unnecessary whitespace")),
OPT_END()
};
int edit = !strcmp(argv[0], "edit");
@@ -603,6 +692,10 @@ static int append_edit(int argc, const char **argv, const char *prefix)
usage_with_options(usage, options);
}
+ if (d.msg_nr)
+ concat_messages(&d);
+ d.given = !!d.buf.len;
+
if (d.given && edit)
fprintf(stderr, _("The -m/-F/-c/-C options have been deprecated "
"for the 'edit' subcommand.\n"
@@ -622,15 +715,17 @@ static int append_edit(int argc, const char **argv, const char *prefix)
/* Append buf to previous note contents */
unsigned long size;
enum object_type type;
- char *prev_buf = repo_read_object_file(the_repository, note,
- &type, &size);
+ struct strbuf buf = STRBUF_INIT;
+ char *prev_buf = repo_read_object_file(the_repository, note, &type, &size);
- strbuf_grow(&d.buf, size + 1);
- if (d.buf.len && prev_buf && size)
- strbuf_insertstr(&d.buf, 0, "\n");
if (prev_buf && size)
- strbuf_insert(&d.buf, 0, prev_buf, size);
+ strbuf_add(&buf, prev_buf, size);
+ if (d.buf.len && prev_buf && size)
+ append_separator(&buf);
+ strbuf_insert(&d.buf, 0, buf.buf, buf.len);
+
free(prev_buf);
+ strbuf_release(&buf);
}
if (d.buf.len || allow_empty) {
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 3af2d84f58..6eb9756836 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
@@ -34,7 +33,7 @@
#include "list.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "replace-object.h"
#include "dir.h"
#include "midx.h"
@@ -43,7 +42,6 @@
#include "promisor-remote.h"
#include "pack-mtimes.h"
#include "parse-options.h"
-#include "wrapper.h"
/*
* Objects we are going to pack are collected in the `to_pack` structure.
@@ -3135,26 +3133,27 @@ static void prepare_pack(int window, int depth)
free(delta_list);
}
-static int git_pack_config(const char *k, const char *v, void *cb)
+static int git_pack_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(k, "pack.window")) {
- window = git_config_int(k, v);
+ window = git_config_int(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "pack.windowmemory")) {
- window_memory_limit = git_config_ulong(k, v);
+ window_memory_limit = git_config_ulong(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "pack.depth")) {
- depth = git_config_int(k, v);
+ depth = git_config_int(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "pack.deltacachesize")) {
- max_delta_cache_size = git_config_int(k, v);
+ max_delta_cache_size = git_config_int(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "pack.deltacachelimit")) {
- cache_max_small_delta_size = git_config_int(k, v);
+ cache_max_small_delta_size = git_config_int(k, v, ctx->kvi);
return 0;
}
if (!strcmp(k, "pack.writebitmaphashcache")) {
@@ -3180,7 +3179,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
return 0;
}
if (!strcmp(k, "pack.threads")) {
- delta_search_threads = git_config_int(k, v);
+ delta_search_threads = git_config_int(k, v, ctx->kvi);
if (delta_search_threads < 0)
die(_("invalid number of threads specified (%d)"),
delta_search_threads);
@@ -3191,7 +3190,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
return 0;
}
if (!strcmp(k, "pack.indexversion")) {
- pack_idx_opts.version = git_config_int(k, v);
+ pack_idx_opts.version = git_config_int(k, v, ctx->kvi);
if (pack_idx_opts.version > 2)
die(_("bad pack.indexVersion=%"PRIu32),
pack_idx_opts.version);
@@ -3227,7 +3226,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
ex->uri = xstrdup(pack_end + 1);
oidmap_put(&configured_exclusions, ex);
}
- return git_default_config(k, v, cb);
+ return git_default_config(k, v, ctx, cb);
}
/* Counters for trace2 output when in --stdin-packs mode. */
@@ -3604,7 +3603,6 @@ static void read_cruft_objects(void)
string_list_append(&discard_packs, buf.buf + 1);
else
string_list_append(&fresh_packs, buf.buf);
- strbuf_reset(&buf);
}
string_list_sort(&discard_packs);
@@ -3740,7 +3738,7 @@ static void show_object__ma_allow_promisor(struct object *obj, const char *name,
show_object(obj, name, data);
}
-static int option_parse_missing_action(const struct option *opt,
+static int option_parse_missing_action(const struct option *opt UNUSED,
const char *arg, int unset)
{
assert(arg);
@@ -4118,25 +4116,40 @@ static void add_extra_kept_packs(const struct string_list *names)
}
}
+static int option_parse_quiet(const struct option *opt, const char *arg,
+ int unset)
+{
+ int *val = opt->value;
+
+ BUG_ON_OPT_ARG(arg);
+
+ if (!unset)
+ *val = 0;
+ else if (!*val)
+ *val = 1;
+ return 0;
+}
+
static int option_parse_index_version(const struct option *opt,
const char *arg, int unset)
{
+ struct pack_idx_option *popts = opt->value;
char *c;
const char *val = arg;
BUG_ON_OPT_NEG(unset);
- pack_idx_opts.version = strtoul(val, &c, 10);
- if (pack_idx_opts.version > 2)
+ popts->version = strtoul(val, &c, 10);
+ if (popts->version > 2)
die(_("unsupported index version %s"), val);
if (*c == ',' && c[1])
- pack_idx_opts.off32_limit = strtoul(c+1, &c, 0);
- if (*c || pack_idx_opts.off32_limit & 0x80000000)
+ popts->off32_limit = strtoul(c+1, &c, 0);
+ if (*c || popts->off32_limit & 0x80000000)
die(_("bad index version '%s'"), val);
return 0;
}
-static int option_parse_unpack_unreachable(const struct option *opt,
+static int option_parse_unpack_unreachable(const struct option *opt UNUSED,
const char *arg, int unset)
{
if (unset) {
@@ -4151,7 +4164,7 @@ static int option_parse_unpack_unreachable(const struct option *opt,
return 0;
}
-static int option_parse_cruft_expiration(const struct option *opt,
+static int option_parse_cruft_expiration(const struct option *opt UNUSED,
const char *arg, int unset)
{
if (unset) {
@@ -4179,8 +4192,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
LIST_OBJECTS_FILTER_INIT;
struct option pack_objects_options[] = {
- OPT_SET_INT('q', "quiet", &progress,
- N_("do not show progress meter"), 0),
+ OPT_CALLBACK_F('q', "quiet", &progress, NULL,
+ N_("do not show progress meter"),
+ PARSE_OPT_NOARG, option_parse_quiet),
OPT_SET_INT(0, "progress", &progress,
N_("show progress meter"), 1),
OPT_SET_INT(0, "all-progress", &progress,
@@ -4188,7 +4202,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "all-progress-implied",
&all_progress_implied,
N_("similar to --all-progress when progress meter is shown")),
- OPT_CALLBACK_F(0, "index-version", NULL, N_("<version>[,<offset>]"),
+ OPT_CALLBACK_F(0, "index-version", &pack_idx_opts, N_("<version>[,<offset>]"),
N_("write the pack index file in the specified idx format version"),
PARSE_OPT_NONEG, option_parse_index_version),
OPT_MAGNITUDE(0, "max-pack-size", &pack_size_limit,
@@ -4256,8 +4270,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
N_("ignore this pack")),
OPT_INTEGER(0, "compression", &pack_compression_level,
N_("pack compression level")),
- OPT_SET_INT(0, "keep-true-parents", &grafts_replace_parents,
- N_("do not hide commits by grafts"), 0),
+ OPT_BOOL(0, "keep-true-parents", &grafts_keep_true_parents,
+ N_("do not hide commits by grafts")),
OPT_BOOL(0, "use-bitmap-index", &use_bitmap_index,
N_("use a bitmap index if available to speed up counting objects")),
OPT_SET_INT(0, "write-bitmap-index", &write_bitmap_index,
@@ -4371,7 +4385,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
if (!HAVE_THREADS && delta_search_threads != 1)
warning(_("no threads support, ignoring --threads"));
- if (!pack_to_stdout && !pack_size_limit && !cruft)
+ if (!pack_to_stdout && !pack_size_limit)
pack_size_limit = pack_size_limit_cfg;
if (pack_to_stdout && pack_size_limit)
die(_("--max-pack-size cannot be used to build a pack for transfer"));
@@ -4403,8 +4417,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
die(_("cannot use internal rev list with --cruft"));
if (stdin_packs)
die(_("cannot use --stdin-packs with --cruft"));
- if (pack_size_limit)
- die(_("cannot use --max-pack-size with --cruft"));
}
/*
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 43e9d12dfd..4c735ba069 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -11,7 +11,7 @@
#include "hex.h"
#include "repository.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#define BLKSIZE 512
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index 9d5585d3a7..3894d2b970 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -1,8 +1,8 @@
-#include "cache.h"
#include "builtin.h"
#include "config.h"
#include "diff.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "parse-options.h"
@@ -196,7 +196,8 @@ struct patch_id_opts {
int verbatim;
};
-static int git_patch_id_config(const char *var, const char *value, void *cb)
+static int git_patch_id_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
struct patch_id_opts *opts = cb;
@@ -209,7 +210,7 @@ static int git_patch_id_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
int cmd_patch_id(int argc, const char **argv, const char *prefix)
diff --git a/builtin/prune.c b/builtin/prune.c
index 2877201737..57fe31467f 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -1,19 +1,20 @@
-#include "cache.h"
+#include "builtin.h"
#include "commit.h"
#include "diff.h"
+#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "revision.h"
-#include "builtin.h"
#include "reachable.h"
#include "parse-options.h"
+#include "path.h"
#include "progress.h"
#include "prune-packed.h"
#include "replace-object.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "shallow.h"
static const char * const prune_usage[] = {
diff --git a/builtin/pull.c b/builtin/pull.c
index 0c7bac97b7..be2b2c9ebc 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -6,12 +6,12 @@
* Fetch one or more remote refs and merge it/them into the current HEAD.
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "advice.h"
#include "config.h"
-#include "builtin.h"
#include "gettext.h"
#include "hex.h"
+#include "merge.h"
#include "object-name.h"
#include "parse-options.h"
#include "exec-cmd.h"
@@ -19,6 +19,8 @@
#include "oid-array.h"
#include "remote.h"
#include "dir.h"
+#include "path.h"
+#include "read-cache-ll.h"
#include "rebase.h"
#include "refs.h"
#include "refspec.h"
@@ -361,7 +363,8 @@ static enum rebase_type config_get_rebase(int *rebase_unspecified)
/**
* Read config variables.
*/
-static int git_pull_config(const char *var, const char *value, void *cb)
+static int git_pull_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "rebase.autostash")) {
config_autostash = git_config_bool(var, value);
@@ -374,7 +377,7 @@ static int git_pull_config(const char *var, const char *value, void *cb)
check_trust_level = 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
/**
diff --git a/builtin/push.c b/builtin/push.c
index dbdf609daf..2e708383c2 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -1,7 +1,7 @@
/*
* "git push"
*/
-#include "cache.h"
+#include "builtin.h"
#include "advice.h"
#include "branch.h"
#include "config.h"
@@ -10,7 +10,6 @@
#include "refs.h"
#include "refspec.h"
#include "run-command.h"
-#include "builtin.h"
#include "remote.h"
#include "transport.h"
#include "parse-options.h"
@@ -302,21 +301,21 @@ static void setup_default_push_refspecs(int *flags, struct remote *remote)
static const char message_advice_pull_before_push[] =
N_("Updates were rejected because the tip of your current branch is behind\n"
- "its remote counterpart. Integrate the remote changes (e.g.\n"
- "'git pull ...') before pushing again.\n"
+ "its remote counterpart. If you want to integrate the remote changes,\n"
+ "use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details.");
static const char message_advice_checkout_pull_push[] =
N_("Updates were rejected because a pushed branch tip is behind its remote\n"
- "counterpart. Check out this branch and integrate the remote changes\n"
- "(e.g. 'git pull ...') before pushing again.\n"
+ "counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+ "before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details.");
static const char message_advice_ref_fetch_first[] =
- N_("Updates were rejected because the remote contains work that you do\n"
- "not have locally. This is usually caused by another repository pushing\n"
- "to the same ref. You may want to first integrate the remote changes\n"
- "(e.g., 'git pull ...') before pushing again.\n"
+ N_("Updates were rejected because the remote contains work that you do not\n"
+ "have locally. This is usually caused by another repository pushing to\n"
+ "the same ref. If you want to integrate the remote changes, use\n"
+ "'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details.");
static const char message_advice_ref_already_exists[] =
@@ -328,10 +327,10 @@ static const char message_advice_ref_needs_force[] =
"without using the '--force' option.\n");
static const char message_advice_ref_needs_update[] =
- N_("Updates were rejected because the tip of the remote-tracking\n"
- "branch has been updated since the last checkout. You may want\n"
- "to integrate those changes locally (e.g., 'git pull ...')\n"
- "before forcing an update.\n");
+ N_("Updates were rejected because the tip of the remote-tracking branch has\n"
+ "been updated since the last checkout. If you want to integrate the\n"
+ "remote changes, use 'git pull' before pushing again.\n"
+ "See the 'Note about fast-forwards' in 'git push --help' for details.");
static void advise_pull_before_push(void)
{
@@ -510,7 +509,8 @@ static void set_push_cert_flags(int *flags, int v)
}
-static int git_push_config(const char *k, const char *v, void *cb)
+static int git_push_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
const char *slot_name;
int *flags = cb;
@@ -577,7 +577,7 @@ static int git_push_config(const char *k, const char *v, void *cb)
return 0;
}
- return git_default_config(k, v, NULL);
+ return git_default_config(k, v, ctx, NULL);
}
int cmd_push(int argc, const char **argv, const char *prefix)
@@ -627,10 +627,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
PARSE_OPT_OPTARG, option_parse_push_signed),
OPT_BIT(0, "atomic", &flags, N_("request atomic transaction on remote side"), TRANSPORT_PUSH_ATOMIC),
OPT_STRING_LIST('o', "push-option", &push_options_cmdline, N_("server-specific"), N_("option to transmit")),
- OPT_SET_INT('4', "ipv4", &family, N_("use IPv4 addresses only"),
- TRANSPORT_FAMILY_IPV4),
- OPT_SET_INT('6', "ipv6", &family, N_("use IPv6 addresses only"),
- TRANSPORT_FAMILY_IPV6),
+ OPT_IPVERSION(&family),
OPT_END()
};
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index 04339a92ea..e455a4795c 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -1,10 +1,10 @@
-#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "object-name.h"
#include "parse-options.h"
#include "range-diff.h"
#include "config.h"
+#include "repository.h"
#include "revision.h"
static const char * const builtin_range_diff_usage[] = {
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 440f19b1b8..8196ca9dd8 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -5,7 +5,7 @@
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
@@ -17,11 +17,11 @@
#include "cache-tree.h"
#include "unpack-trees.h"
#include "dir.h"
-#include "builtin.h"
#include "parse-options.h"
#include "repository.h"
#include "resolve-undo.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule.h"
#include "submodule-config.h"
@@ -49,7 +49,7 @@ static const char * const read_tree_usage[] = {
NULL
};
-static int index_output_cb(const struct option *opt, const char *arg,
+static int index_output_cb(const struct option *opt UNUSED, const char *arg,
int unset)
{
BUG_ON_OPT_NEG(unset);
@@ -102,12 +102,13 @@ static int debug_merge(const struct cache_entry * const *stages,
return 0;
}
-static int git_read_tree_config(const char *var, const char *value, void *cb)
+static int git_read_tree_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "submodule.recurse"))
return git_default_submodule_config(var, value, cb);
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index ace1d5e8d1..50cb85751f 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -24,6 +24,7 @@
#include "object-file.h"
#include "object-name.h"
#include "parse-options.h"
+#include "path.h"
#include "commit.h"
#include "diff.h"
#include "wt-status.h"
@@ -36,7 +37,6 @@
#include "reset.h"
#include "trace2.h"
#include "hook.h"
-#include "wrapper.h"
static char const * const builtin_rebase_usage[] = {
N_("git rebase [-i] [options] [--exec <cmd>] "
@@ -209,7 +209,7 @@ static int edit_todo_file(unsigned flags)
if (strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)
return error_errno(_("could not read '%s'."), todo_file);
- strbuf_stripspace(&todo_list.buf, 1);
+ strbuf_stripspace(&todo_list.buf, comment_line_char);
res = edit_todo_list(the_repository, &todo_list, &new_todo, NULL, NULL, flags);
if (!res && todo_list_write_to_file(the_repository, &new_todo, todo_file,
NULL, NULL, -1, flags & ~(TODO_LIST_SHORTEN_IDS)))
@@ -772,7 +772,8 @@ static void parse_rebase_merges_value(struct rebase_options *options, const char
die(_("Unknown rebase-merges mode: %s"), value);
}
-static int rebase_config(const char *var, const char *value, void *data)
+static int rebase_config(const char *var, const char *value,
+ const struct config_context *ctx, void *data)
{
struct rebase_options *opts = data;
@@ -831,7 +832,7 @@ static int rebase_config(const char *var, const char *value, void *data)
return git_config_string(&opts->default_backend, var, value);
}
- return git_default_config(var, value, data);
+ return git_default_config(var, value, ctx, data);
}
static int checkout_up_to_date(struct rebase_options *options)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 1a31a58367..8c4f0cb90a 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -30,7 +30,8 @@
#include "oidset.h"
#include "packfile.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "protocol.h"
#include "commit-reach.h"
#include "server-info.h"
@@ -39,7 +40,6 @@
#include "worktree.h"
#include "shallow.h"
#include "parse-options.h"
-#include "wrapper.h"
static const char * const receive_pack_usage[] = {
N_("git receive-pack <git-dir>"),
@@ -90,7 +90,7 @@ static struct object_id push_cert_oid;
static struct signature_check sigcheck;
static const char *push_cert_nonce;
static const char *cert_nonce_seed;
-static struct string_list hidden_refs = STRING_LIST_INIT_DUP;
+static struct strvec hidden_refs = STRVEC_INIT;
static const char *NONCE_UNSOLICITED = "UNSOLICITED";
static const char *NONCE_BAD = "BAD";
@@ -139,7 +139,8 @@ static enum deny_action parse_deny_action(const char *var, const char *value)
return DENY_IGNORE;
}
-static int receive_pack_config(const char *var, const char *value, void *cb)
+static int receive_pack_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
int status = parse_hide_refs_config(var, value, "receive", &hidden_refs);
@@ -157,12 +158,12 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
}
if (strcmp(var, "receive.unpacklimit") == 0) {
- receive_unpack_limit = git_config_int(var, value);
+ receive_unpack_limit = git_config_int(var, value, ctx->kvi);
return 0;
}
if (strcmp(var, "transfer.unpacklimit") == 0) {
- transfer_unpack_limit = git_config_int(var, value);
+ transfer_unpack_limit = git_config_int(var, value, ctx->kvi);
return 0;
}
@@ -230,7 +231,7 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
return git_config_string(&cert_nonce_seed, var, value);
if (strcmp(var, "receive.certnonceslop") == 0) {
- nonce_stamp_slop_limit = git_config_ulong(var, value);
+ nonce_stamp_slop_limit = git_config_ulong(var, value, ctx->kvi);
return 0;
}
@@ -245,12 +246,12 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
}
if (strcmp(var, "receive.keepalive") == 0) {
- keepalive_in_sec = git_config_int(var, value);
+ keepalive_in_sec = git_config_int(var, value, ctx->kvi);
return 0;
}
if (strcmp(var, "receive.maxinputsize") == 0) {
- max_input_size = git_config_int64(var, value);
+ max_input_size = git_config_int64(var, value, ctx->kvi);
return 0;
}
@@ -266,7 +267,7 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static void show_ref(const char *path, const struct object_id *oid)
@@ -337,7 +338,9 @@ static void write_head_info(void)
{
static struct oidset seen = OIDSET_INIT;
- for_each_ref(show_ref_cb, &seen);
+ refs_for_each_fullref_in(get_main_ref_store(the_repository), "",
+ hidden_refs_to_excludes(&hidden_refs),
+ show_ref_cb, &seen);
for_each_alternate_ref(show_one_alternate_ref, &seen);
oidset_clear(&seen);
if (!sent_capabilities)
@@ -2524,10 +2527,10 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
if (cert_nonce_seed)
push_cert_nonce = prepare_push_cert_nonce(service_dir, time(NULL));
- if (0 <= transfer_unpack_limit)
- unpack_limit = transfer_unpack_limit;
- else if (0 <= receive_unpack_limit)
+ if (0 <= receive_unpack_limit)
unpack_limit = receive_unpack_limit;
+ else if (0 <= transfer_unpack_limit)
+ unpack_limit = transfer_unpack_limit;
switch (determine_protocol_version_server()) {
case protocol_v2:
@@ -2619,7 +2622,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
packet_flush(1);
oid_array_clear(&shallow);
oid_array_clear(&ref);
- string_list_clear(&hidden_refs, 0);
+ strvec_clear(&hidden_refs);
free((void *)push_cert_nonce);
return 0;
}
diff --git a/builtin/reflog.c b/builtin/reflog.c
index a1fa0c855f..df63a5892e 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -1,8 +1,10 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
+#include "repository.h"
#include "revision.h"
#include "reachable.h"
+#include "wildmatch.h"
#include "worktree.h"
#include "reflog.h"
#include "parse-options.h"
@@ -108,7 +110,8 @@ static struct reflog_expire_cfg *find_cfg_ent(const char *pattern, size_t len)
#define EXPIRE_TOTAL 01
#define EXPIRE_UNREACH 02
-static int reflog_expire_config(const char *var, const char *value, void *cb)
+static int reflog_expire_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *pattern, *key;
size_t pattern_len;
@@ -117,7 +120,7 @@ static int reflog_expire_config(const char *var, const char *value, void *cb)
struct reflog_expire_cfg *ent;
if (parse_config_key(var, "gc", &pattern, &pattern_len, &key) < 0)
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
if (!strcmp(key, "reflogexpire")) {
slot = EXPIRE_TOTAL;
@@ -128,7 +131,7 @@ static int reflog_expire_config(const char *var, const char *value, void *cb)
if (git_config_expiry_date(&expire, var, value))
return -1;
} else
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
if (!pattern) {
switch (slot) {
diff --git a/builtin/remote.c b/builtin/remote.c
index 1e0b137d97..d91bbe728d 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -2,6 +2,7 @@
#include "config.h"
#include "gettext.h"
#include "parse-options.h"
+#include "path.h"
#include "transport.h"
#include "remote.h"
#include "string-list.h"
@@ -10,7 +11,7 @@
#include "rebase.h"
#include "refs.h"
#include "refspec.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "strvec.h"
#include "commit-reach.h"
#include "progress.h"
@@ -167,10 +168,9 @@ static int add(int argc, const char **argv, const char *prefix)
struct option options[] = {
OPT_BOOL('f', "fetch", &fetch, N_("fetch the remote branches")),
OPT_SET_INT(0, "tags", &fetch_tags,
- N_("import all tags and associated objects when fetching"),
+ N_("import all tags and associated objects when fetching\n"
+ "or do not fetch any tag at all (--no-tags)"),
TAGS_SET),
- OPT_SET_INT(0, NULL, &fetch_tags,
- N_("or do not fetch any tag at all (--no-tags)"), TAGS_UNSET),
OPT_STRING_LIST('t', "track", &track, N_("branch"),
N_("branch(es) to track")),
OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")),
@@ -268,6 +268,7 @@ static const char *abbrev_ref(const char *name, const char *prefix)
#define abbrev_branch(name) abbrev_ref((name), "refs/heads/")
static int config_read_branches(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
void *data UNUSED)
{
const char *orig_key = key;
@@ -645,17 +646,19 @@ struct push_default_info
};
static int config_read_push_default(const char *key, const char *value,
- void *cb)
+ const struct config_context *ctx, void *cb)
{
+ const struct key_value_info *kvi = ctx->kvi;
+
struct push_default_info* info = cb;
if (strcmp(key, "remote.pushdefault") ||
!value || strcmp(value, info->old_name))
return 0;
- info->scope = current_config_scope();
+ info->scope = kvi->scope;
strbuf_reset(&info->origin);
- strbuf_addstr(&info->origin, current_config_name());
- info->linenr = current_config_line();
+ strbuf_addstr(&info->origin, config_origin_type_name(kvi->origin_type));
+ info->linenr = kvi->linenr;
return 0;
}
@@ -1494,7 +1497,9 @@ static int prune(int argc, const char **argv, const char *prefix)
return result;
}
-static int get_remote_default(const char *key, const char *value UNUSED, void *priv)
+static int get_remote_default(const char *key, const char *value UNUSED,
+ const struct config_context *ctx UNUSED,
+ void *priv)
{
if (strcmp(key, "remotes.default") == 0) {
int *found = priv;
diff --git a/builtin/repack.c b/builtin/repack.c
index 1e21a21ea8..6943c5ba11 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -1,11 +1,11 @@
#include "builtin.h"
-#include "alloc.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
+#include "path.h"
#include "run-command.h"
#include "server-info.h"
#include "sigchain.h"
@@ -15,7 +15,7 @@
#include "midx.h"
#include "packfile.h"
#include "prune-packed.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "promisor-remote.h"
#include "shallow.h"
#include "pack.h"
@@ -59,7 +59,8 @@ struct pack_objects_args {
int local;
};
-static int repack_config(const char *var, const char *value, void *cb)
+static int repack_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
struct pack_objects_args *cruft_po_args = cb;
if (!strcmp(var, "repack.usedeltabaseoffset")) {
@@ -91,7 +92,7 @@ static int repack_config(const char *var, const char *value, void *cb)
return git_config_string(&cruft_po_args->depth, var, value);
if (!strcmp(var, "repack.cruftthreads"))
return git_config_string(&cruft_po_args->threads, var, value);
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
/*
@@ -104,46 +105,38 @@ static void collect_pack_filenames(struct string_list *fname_nonkept_list,
struct string_list *fname_kept_list,
const struct string_list *extra_keep)
{
- DIR *dir;
- struct dirent *e;
- char *fname;
+ struct packed_git *p;
struct strbuf buf = STRBUF_INIT;
- if (!(dir = opendir(packdir)))
- return;
-
- while ((e = readdir(dir)) != NULL) {
- size_t len;
+ for (p = get_all_packs(the_repository); p; p = p->next) {
int i;
+ const char *base;
- if (!strip_suffix(e->d_name, ".idx", &len))
+ if (!p->pack_local)
continue;
- strbuf_reset(&buf);
- strbuf_add(&buf, e->d_name, len);
- strbuf_addstr(&buf, ".pack");
+ base = pack_basename(p);
for (i = 0; i < extra_keep->nr; i++)
- if (!fspathcmp(buf.buf, extra_keep->items[i].string))
+ if (!fspathcmp(base, extra_keep->items[i].string))
break;
- fname = xmemdupz(e->d_name, len);
+ strbuf_reset(&buf);
+ strbuf_addstr(&buf, base);
+ strbuf_strip_suffix(&buf, ".pack");
- if ((extra_keep->nr > 0 && i < extra_keep->nr) ||
- (file_exists(mkpath("%s/%s.keep", packdir, fname)))) {
- string_list_append_nodup(fname_kept_list, fname);
- } else {
+ if ((extra_keep->nr > 0 && i < extra_keep->nr) || p->pack_keep)
+ string_list_append(fname_kept_list, buf.buf);
+ else {
struct string_list_item *item;
- item = string_list_append_nodup(fname_nonkept_list,
- fname);
- if (file_exists(mkpath("%s/%s.mtimes", packdir, fname)))
+ item = string_list_append(fname_nonkept_list, buf.buf);
+ if (p->is_cruft)
item->util = (void*)(uintptr_t)CRUFT_PACK;
}
}
- closedir(dir);
- strbuf_release(&buf);
string_list_sort(fname_kept_list);
+ strbuf_release(&buf);
}
static void remove_redundant_pack(const char *dir_name, const char *base_name)
@@ -310,6 +303,8 @@ struct pack_geometry {
struct packed_git **pack;
uint32_t pack_nr, pack_alloc;
uint32_t split;
+
+ int split_factor;
};
static uint32_t geometry_pack_weight(struct packed_git *p)
@@ -331,17 +326,13 @@ static int geometry_cmp(const void *va, const void *vb)
return 0;
}
-static void init_pack_geometry(struct pack_geometry **geometry_p,
+static void init_pack_geometry(struct pack_geometry *geometry,
struct string_list *existing_kept_packs,
const struct pack_objects_args *args)
{
struct packed_git *p;
- struct pack_geometry *geometry;
struct strbuf buf = STRBUF_INIT;
- *geometry_p = xcalloc(1, sizeof(struct pack_geometry));
- geometry = *geometry_p;
-
for (p = get_all_packs(the_repository); p; p = p->next) {
if (args->local && !p->pack_local)
/*
@@ -387,7 +378,7 @@ static void init_pack_geometry(struct pack_geometry **geometry_p,
strbuf_release(&buf);
}
-static void split_pack_geometry(struct pack_geometry *geometry, int factor)
+static void split_pack_geometry(struct pack_geometry *geometry)
{
uint32_t i;
uint32_t split;
@@ -406,12 +397,14 @@ static void split_pack_geometry(struct pack_geometry *geometry, int factor)
struct packed_git *ours = geometry->pack[i];
struct packed_git *prev = geometry->pack[i - 1];
- if (unsigned_mult_overflows(factor, geometry_pack_weight(prev)))
+ if (unsigned_mult_overflows(geometry->split_factor,
+ geometry_pack_weight(prev)))
die(_("pack %s too large to consider in geometric "
"progression"),
prev->pack_name);
- if (geometry_pack_weight(ours) < factor * geometry_pack_weight(prev))
+ if (geometry_pack_weight(ours) <
+ geometry->split_factor * geometry_pack_weight(prev))
break;
}
@@ -446,10 +439,12 @@ static void split_pack_geometry(struct pack_geometry *geometry, int factor)
for (i = split; i < geometry->pack_nr; i++) {
struct packed_git *ours = geometry->pack[i];
- if (unsigned_mult_overflows(factor, total_size))
+ if (unsigned_mult_overflows(geometry->split_factor,
+ total_size))
die(_("pack %s too large to roll up"), ours->pack_name);
- if (geometry_pack_weight(ours) < factor * total_size) {
+ if (geometry_pack_weight(ours) <
+ geometry->split_factor * total_size) {
if (unsigned_add_overflows(total_size,
geometry_pack_weight(ours)))
die(_("pack %s too large to roll up"),
@@ -499,15 +494,12 @@ static struct packed_git *get_preferred_pack(struct pack_geometry *geometry)
return NULL;
}
-static void clear_pack_geometry(struct pack_geometry *geometry)
+static void free_pack_geometry(struct pack_geometry *geometry)
{
if (!geometry)
return;
free(geometry->pack);
- geometry->pack_nr = 0;
- geometry->pack_alloc = 0;
- geometry->split = 0;
}
struct midx_snapshot_ref_data {
@@ -584,7 +576,7 @@ static void midx_included_packs(struct string_list *include,
string_list_insert(include, xstrfmt("%s.idx", item->string));
for_each_string_list_item(item, names)
string_list_insert(include, xstrfmt("pack-%s.idx", item->string));
- if (geometry) {
+ if (geometry->split_factor) {
struct strbuf buf = STRBUF_INIT;
uint32_t i;
for (i = geometry->split; i < geometry->pack_nr; i++) {
@@ -728,7 +720,6 @@ static int write_cruft_pack(const struct pack_objects_args *args,
strvec_push(&cmd.args, "--honor-pack-keep");
strvec_push(&cmd.args, "--non-empty");
- strvec_push(&cmd.args, "--max-pack-size=0");
cmd.in = -1;
@@ -788,7 +779,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
struct string_list names = STRING_LIST_INIT_DUP;
struct string_list existing_nonkept_packs = STRING_LIST_INIT_DUP;
struct string_list existing_kept_packs = STRING_LIST_INIT_DUP;
- struct pack_geometry *geometry = NULL;
+ struct pack_geometry geometry = { 0 };
struct strbuf line = STRBUF_INIT;
struct tempfile *refs_snapshot = NULL;
int i, ext, ret;
@@ -802,7 +793,6 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
struct string_list keep_pack_list = STRING_LIST_INIT_NODUP;
struct pack_objects_args po_args = {NULL};
struct pack_objects_args cruft_po_args = {NULL};
- int geometric_factor = 0;
int write_midx = 0;
const char *cruft_expiration = NULL;
const char *expire_to = NULL;
@@ -851,7 +841,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
N_("repack objects in packs marked with .keep")),
OPT_STRING_LIST(0, "keep-pack", &keep_pack_list, N_("name"),
N_("do not repack this pack")),
- OPT_INTEGER('g', "geometric", &geometric_factor,
+ OPT_INTEGER('g', "geometric", &geometry.split_factor,
N_("find a geometric progression with factor <N>")),
OPT_BOOL('m', "write-midx", &write_midx,
N_("write a multi-pack index of the resulting packs")),
@@ -927,11 +917,11 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
collect_pack_filenames(&existing_nonkept_packs, &existing_kept_packs,
&keep_pack_list);
- if (geometric_factor) {
+ if (geometry.split_factor) {
if (pack_everything)
die(_("options '%s' and '%s' cannot be used together"), "--geometric", "-A/-a");
init_pack_geometry(&geometry, &existing_kept_packs, &po_args);
- split_pack_geometry(geometry, geometric_factor);
+ split_pack_geometry(&geometry);
}
prepare_pack_objects(&cmd, &po_args, packtmp);
@@ -945,7 +935,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
strvec_pushf(&cmd.args, "--keep-pack=%s",
keep_pack_list.items[i].string);
strvec_push(&cmd.args, "--non-empty");
- if (!geometry) {
+ if (!geometry.split_factor) {
/*
* We need to grab all reachable objects, including those that
* are reachable from reflogs and the index.
@@ -992,7 +982,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
strvec_push(&cmd.args, "--pack-loose-unreachable");
}
}
- } else if (geometry) {
+ } else if (geometry.split_factor) {
strvec_push(&cmd.args, "--stdin-packs");
strvec_push(&cmd.args, "--unpacked");
} else {
@@ -1000,7 +990,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
strvec_push(&cmd.args, "--incremental");
}
- if (geometry)
+ if (geometry.split_factor)
cmd.in = -1;
else
cmd.no_stdin = 1;
@@ -1009,17 +999,17 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
if (ret)
goto cleanup;
- if (geometry) {
+ if (geometry.split_factor) {
FILE *in = xfdopen(cmd.in, "w");
/*
* The resulting pack should contain all objects in packs that
* are going to be rolled up, but exclude objects in packs which
* are being left alone.
*/
- for (i = 0; i < geometry->split; i++)
- fprintf(in, "%s\n", pack_basename(geometry->pack[i]));
- for (i = geometry->split; i < geometry->pack_nr; i++)
- fprintf(in, "^%s\n", pack_basename(geometry->pack[i]));
+ for (i = 0; i < geometry.split; i++)
+ fprintf(in, "%s\n", pack_basename(geometry.pack[i]));
+ for (i = geometry.split; i < geometry.pack_nr; i++)
+ fprintf(in, "^%s\n", pack_basename(geometry.pack[i]));
fclose(in);
}
@@ -1057,6 +1047,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
cruft_po_args.depth = po_args.depth;
if (!cruft_po_args.threads)
cruft_po_args.threads = po_args.threads;
+ if (!cruft_po_args.max_pack_size)
+ cruft_po_args.max_pack_size = po_args.max_pack_size;
cruft_po_args.local = po_args.local;
cruft_po_args.quiet = po_args.quiet;
@@ -1162,9 +1154,9 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
if (write_midx) {
struct string_list include = STRING_LIST_INIT_NODUP;
midx_included_packs(&include, &existing_nonkept_packs,
- &existing_kept_packs, &names, geometry);
+ &existing_kept_packs, &names, &geometry);
- ret = write_midx_included_packs(&include, geometry,
+ ret = write_midx_included_packs(&include, &geometry,
refs_snapshot ? get_tempfile_path(refs_snapshot) : NULL,
show_progress, write_bitmaps > 0);
@@ -1187,12 +1179,12 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
remove_redundant_pack(packdir, item->string);
}
- if (geometry) {
+ if (geometry.split_factor) {
struct strbuf buf = STRBUF_INIT;
uint32_t i;
- for (i = 0; i < geometry->split; i++) {
- struct packed_git *p = geometry->pack[i];
+ for (i = 0; i < geometry.split; i++) {
+ struct packed_git *p = geometry.pack[i];
if (string_list_has_string(&names,
hash_to_hex(p->hash)))
continue;
@@ -1235,7 +1227,7 @@ cleanup:
string_list_clear(&names, 1);
string_list_clear(&existing_nonkept_packs, 0);
string_list_clear(&existing_kept_packs, 0);
- clear_pack_geometry(geometry);
+ free_pack_geometry(&geometry);
return ret;
}
diff --git a/builtin/replace.c b/builtin/replace.c
index abff800276..da59600ad2 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -8,22 +8,23 @@
* git-tag.sh and mktag.c by Linus Torvalds.
*/
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
#include "editor.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "parse-options.h"
+#include "path.h"
#include "run-command.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "replace-object.h"
#include "repository.h"
#include "tag.h"
+#include "wildmatch.h"
static const char * const git_replace_usage[] = {
N_("git replace [-f] <object> <replacement>"),
@@ -48,7 +49,7 @@ struct show_data {
static int show_reference(struct repository *r, const char *refname,
const struct object_id *oid,
- int flag, void *cb_data)
+ int flag UNUSED, void *cb_data)
{
struct show_data *data = cb_data;
@@ -408,7 +409,7 @@ struct check_mergetag_data {
const char **argv;
};
-static int check_one_mergetag(struct commit *commit,
+static int check_one_mergetag(struct commit *commit UNUSED,
struct commit_extra_header *extra,
void *data)
{
diff --git a/builtin/rerere.c b/builtin/rerere.c
index d4bd52797f..07a9d37275 100644
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
@@ -7,7 +6,6 @@
#include "repository.h"
#include "string-list.h"
#include "rerere.h"
-#include "wrapper.h"
#include "xdiff/xdiff.h"
#include "xdiff-interface.h"
#include "pathspec.h"
diff --git a/builtin/reset.c b/builtin/reset.c
index f99f32d580..4b018d20e3 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -13,6 +13,7 @@
#include "config.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "tag.h"
@@ -26,9 +27,11 @@
#include "branch.h"
#include "object-name.h"
#include "parse-options.h"
+#include "path.h"
#include "unpack-trees.h"
#include "cache-tree.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule.h"
#include "submodule-config.h"
#include "trace.h"
@@ -312,12 +315,13 @@ static int reset_refs(const char *rev, const struct object_id *oid)
return update_ref_status;
}
-static int git_reset_config(const char *var, const char *value, void *cb)
+static int git_reset_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "submodule.recurse"))
return git_default_submodule_config(var, value, cb);
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
int cmd_reset(int argc, const char **argv, const char *prefix)
@@ -334,18 +338,25 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
OPT__QUIET(&quiet, N_("be quiet, only report errors")),
OPT_BOOL(0, "no-refresh", &no_refresh,
N_("skip refreshing the index after reset")),
- OPT_SET_INT(0, "mixed", &reset_type,
- N_("reset HEAD and index"), MIXED),
- OPT_SET_INT(0, "soft", &reset_type, N_("reset only HEAD"), SOFT),
- OPT_SET_INT(0, "hard", &reset_type,
- N_("reset HEAD, index and working tree"), HARD),
- OPT_SET_INT(0, "merge", &reset_type,
- N_("reset HEAD, index and working tree"), MERGE),
- OPT_SET_INT(0, "keep", &reset_type,
- N_("reset HEAD but keep local changes"), KEEP),
+ OPT_SET_INT_F(0, "mixed", &reset_type,
+ N_("reset HEAD and index"),
+ MIXED, PARSE_OPT_NONEG),
+ OPT_SET_INT_F(0, "soft", &reset_type,
+ N_("reset only HEAD"),
+ SOFT, PARSE_OPT_NONEG),
+ OPT_SET_INT_F(0, "hard", &reset_type,
+ N_("reset HEAD, index and working tree"),
+ HARD, PARSE_OPT_NONEG),
+ OPT_SET_INT_F(0, "merge", &reset_type,
+ N_("reset HEAD, index and working tree"),
+ MERGE, PARSE_OPT_NONEG),
+ OPT_SET_INT_F(0, "keep", &reset_type,
+ N_("reset HEAD but keep local changes"),
+ KEEP, PARSE_OPT_NONEG),
OPT_CALLBACK_F(0, "recurse-submodules", NULL,
- "reset", "control recursive updating of submodules",
- PARSE_OPT_OPTARG, option_parse_recurse_submodules_worktree_updater),
+ "reset", "control recursive updating of submodules",
+ PARSE_OPT_OPTARG,
+ option_parse_recurse_submodules_worktree_updater),
OPT_BOOL('p', "patch", &patch_mode, N_("select hunks interactively")),
OPT_BOOL('N', "intent-to-add", &intent_to_add,
N_("record only the fact that removed paths will be added later")),
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 6dc8be492a..ff715d6918 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "commit.h"
#include "diff.h"
@@ -12,10 +12,9 @@
#include "object.h"
#include "object-name.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pack.h"
#include "pack-bitmap.h"
-#include "builtin.h"
#include "log-tree.h"
#include "graph.h"
#include "bisect.h"
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index d2eb239a08..fde8861ca4 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -4,20 +4,21 @@
* Copyright (C) Linus Torvalds, 2005
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "commit.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "refs.h"
#include "quote.h"
-#include "builtin.h"
#include "object-name.h"
#include "parse-options.h"
+#include "path.h"
#include "diff.h"
+#include "read-cache-ll.h"
#include "revision.h"
#include "setup.h"
#include "split-index.h"
@@ -224,7 +225,7 @@ static int anti_reference(const char *refname, const struct object_id *oid,
return 0;
}
-static int show_abbrev(const struct object_id *oid, void *cb_data)
+static int show_abbrev(const struct object_id *oid, void *cb_data UNUSED)
{
show_rev(NORMAL, oid, NULL);
return 0;
diff --git a/builtin/revert.c b/builtin/revert.c
index 0240ec8593..e6f9a1ad26 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -1,10 +1,10 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "builtin.h"
#include "parse-options.h"
#include "diff.h"
#include "gettext.h"
+#include "repository.h"
#include "revision.h"
#include "rerere.h"
#include "dir.h"
diff --git a/builtin/rm.c b/builtin/rm.c
index b4589c824c..dff819ae50 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -5,7 +5,6 @@
*/
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
-#include "alloc.h"
#include "advice.h"
#include "config.h"
#include "lockfile.h"
@@ -16,9 +15,11 @@
#include "tree-walk.h"
#include "object-name.h"
#include "parse-options.h"
+#include "read-cache.h"
#include "repository.h"
#include "string-list.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule.h"
#include "pathspec.h"
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 4784143004..cd6d9e4112 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -131,7 +131,8 @@ static void print_helper_status(struct ref *ref)
strbuf_release(&buf);
}
-static int send_pack_config(const char *k, const char *v, void *cb)
+static int send_pack_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(k, "push.gpgsign")) {
const char *value;
@@ -151,7 +152,7 @@ static int send_pack_config(const char *k, const char *v, void *cb)
}
}
}
- return git_default_config(k, v, cb);
+ return git_default_config(k, v, ctx, cb);
}
int cmd_send_pack(int argc, const char **argv, const char *prefix)
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 46f4e0832a..1307ed2b88 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -1,11 +1,11 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "string-list.h"
+#include "repository.h"
#include "revision.h"
#include "utf8.h"
#include "mailmap.h"
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 7ef4a642c1..b01ec761d2 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -6,7 +6,6 @@
#include "hex.h"
#include "pretty.h"
#include "refs.h"
-#include "builtin.h"
#include "color.h"
#include "strvec.h"
#include "object-name.h"
@@ -15,6 +14,7 @@
#include "dir.h"
#include "commit-slab.h"
#include "date.h"
+#include "wildmatch.h"
static const char* show_branch_usage[] = {
N_("git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
@@ -559,7 +559,8 @@ static void append_one_rev(const char *av)
die("bad sha1 reference %s", av);
}
-static int git_show_branch_config(const char *var, const char *value, void *cb)
+static int git_show_branch_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "showbranch.default")) {
if (!value)
@@ -579,7 +580,10 @@ static int git_show_branch_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_color_default_config(var, value, cb);
+ if (git_color_config(var, value, cb) < 0)
+ return -1;
+
+ return git_default_config(var, value, ctx, cb);
}
static int omit_in_dense(struct commit *commit, struct commit **rev, int n)
@@ -645,7 +649,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
int with_current_branch = 0;
int head_at = -1;
int topics = 0;
- int dense = 1;
+ int sparse = 0;
const char *reflog_base = NULL;
struct option builtin_show_branch_options[] = {
OPT_BOOL('a', "all", &all_heads,
@@ -667,17 +671,17 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
N_("show possible merge bases")),
OPT_BOOL(0, "independent", &independent,
N_("show refs unreachable from any other ref")),
- OPT_SET_INT(0, "topo-order", &sort_order,
- N_("show commits in topological order"),
- REV_SORT_IN_GRAPH_ORDER),
+ OPT_SET_INT_F(0, "topo-order", &sort_order,
+ N_("show commits in topological order"),
+ REV_SORT_IN_GRAPH_ORDER, PARSE_OPT_NONEG),
OPT_BOOL(0, "topics", &topics,
N_("show only commits not on the first branch")),
- OPT_SET_INT(0, "sparse", &dense,
- N_("show merges reachable from only one tip"), 0),
- OPT_SET_INT(0, "date-order", &sort_order,
- N_("topologically sort, maintaining date order "
- "where possible"),
- REV_SORT_BY_COMMIT_DATE),
+ OPT_SET_INT(0, "sparse", &sparse,
+ N_("show merges reachable from only one tip"), 1),
+ OPT_SET_INT_F(0, "date-order", &sort_order,
+ N_("topologically sort, maintaining date order "
+ "where possible"),
+ REV_SORT_BY_COMMIT_DATE, PARSE_OPT_NONEG),
OPT_CALLBACK_F('g', "reflog", &reflog_base, N_("<n>[,<base>]"),
N_("show <n> most recent ref-log entries starting at "
"base"),
@@ -936,7 +940,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
!is_merge_point &&
(this_flag & (1u << REV_SHIFT)))
continue;
- if (dense && is_merge &&
+ if (!sparse && is_merge &&
omit_in_dense(commit, rev, num_rev))
continue;
for (i = 0; i < num_rev; i++) {
diff --git a/builtin/show-index.c b/builtin/show-index.c
index d839e55335..540dc3dad1 100644
--- a/builtin/show-index.c
+++ b/builtin/show-index.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index a2243b4219..5110814f79 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -1,11 +1,10 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "object.h"
#include "tag.h"
#include "string-list.h"
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 40d420f06c..5c8ffb1f75 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -1,5 +1,4 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
diff --git a/builtin/stash.c b/builtin/stash.c
index a7e17ffe38..1ad496985a 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -4,6 +4,7 @@
#include "config.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "object-name.h"
#include "parse-options.h"
@@ -17,9 +18,12 @@
#include "run-command.h"
#include "dir.h"
#include "entry.h"
+#include "preload-index.h"
+#include "read-cache.h"
#include "rerere.h"
#include "revision.h"
#include "setup.h"
+#include "sparse-index.h"
#include "log-tree.h"
#include "diffcore.h"
#include "exec-cmd.h"
@@ -358,7 +362,7 @@ static int is_path_a_directory(const char *path)
}
static void add_diff_to_buf(struct diff_queue_struct *q,
- struct diff_options *options,
+ struct diff_options *options UNUSED,
void *data)
{
int i;
@@ -837,7 +841,8 @@ static int show_stat = 1;
static int show_patch;
static int show_include_untracked;
-static int git_stash_config(const char *var, const char *value, void *cb)
+static int git_stash_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "stash.showstat")) {
show_stat = git_config_bool(var, value);
@@ -851,7 +856,7 @@ static int git_stash_config(const char *var, const char *value, void *cb)
show_include_untracked = git_config_bool(var, value);
return 0;
}
- return git_diff_basic_config(var, value, cb);
+ return git_diff_basic_config(var, value, ctx, cb);
}
static void diff_include_untracked(const struct stash_info *info, struct diff_options *diff_opt)
@@ -968,7 +973,7 @@ static int show_stash(int argc, const char **argv, const char *prefix)
}
log_tree_diff_flush(&rev);
- ret = diff_result_code(&rev.diffopt, 0);
+ ret = diff_result_code(&rev.diffopt);
cleanup:
strvec_clear(&stash_args);
free_stash_info(&info);
@@ -1084,7 +1089,6 @@ static int get_untracked_files(const struct pathspec *ps, int include_untracked,
*/
static int check_changes_tracked_files(const struct pathspec *ps)
{
- int result;
struct rev_info rev;
struct object_id dummy;
int ret = 0;
@@ -1106,14 +1110,14 @@ static int check_changes_tracked_files(const struct pathspec *ps)
add_head_to_pending(&rev);
diff_setup_done(&rev.diffopt);
- result = run_diff_index(&rev, 1);
- if (diff_result_code(&rev.diffopt, result)) {
+ run_diff_index(&rev, DIFF_INDEX_CACHED);
+ if (diff_result_code(&rev.diffopt)) {
ret = 1;
goto done;
}
- result = run_diff_files(&rev, 0);
- if (diff_result_code(&rev.diffopt, result)) {
+ run_diff_files(&rev, 0);
+ if (diff_result_code(&rev.diffopt)) {
ret = 1;
goto done;
}
@@ -1304,10 +1308,7 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
add_pending_object(&rev, parse_object(the_repository, &info->b_commit),
"");
- if (run_diff_index(&rev, 0)) {
- ret = -1;
- goto done;
- }
+ run_diff_index(&rev, 0);
cp_upd_index.git_cmd = 1;
strvec_pushl(&cp_upd_index.args, "update-index",
diff --git a/builtin/stripspace.c b/builtin/stripspace.c
index 9451eb69ff..7b700a9fb1 100644
--- a/builtin/stripspace.c
+++ b/builtin/stripspace.c
@@ -1,6 +1,6 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "setup.h"
@@ -13,7 +13,7 @@ static void comment_lines(struct strbuf *buf)
size_t len;
msg = strbuf_detach(buf, &len);
- strbuf_add_commented_lines(buf, msg, len);
+ strbuf_add_commented_lines(buf, msg, len, comment_line_char);
free(msg);
}
@@ -58,7 +58,8 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix)
die_errno("could not read the input");
if (mode == STRIP_DEFAULT || mode == STRIP_COMMENTS)
- strbuf_stripspace(&buf, mode == STRIP_COMMENTS);
+ strbuf_stripspace(&buf,
+ mode == STRIP_COMMENTS ? comment_line_char : '\0');
else
comment_lines(&buf);
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 6a16208e8a..6f3bf33e61 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1,18 +1,20 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "abspath.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
-#include "cache.h"
#include "config.h"
#include "parse-options.h"
#include "quote.h"
+#include "path.h"
#include "pathspec.h"
+#include "preload-index.h"
#include "dir.h"
+#include "read-cache.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule.h"
#include "submodule-config.h"
#include "string-list.h"
@@ -26,7 +28,7 @@
#include "diff.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "advice.h"
#include "branch.h"
#include "list-objects-filter-options.h"
@@ -627,7 +629,6 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
char *displaypath;
struct strvec diff_files_args = STRVEC_INIT;
struct rev_info rev = REV_INFO_INIT;
- int diff_files_result;
struct strbuf buf = STRBUF_INIT;
const char *git_dir;
struct setup_revision_opt opt = {
@@ -667,9 +668,9 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
repo_init_revisions(the_repository, &rev, NULL);
rev.abbrev = 0;
setup_revisions(diff_files_args.nr, diff_files_args.v, &rev, &opt);
- diff_files_result = run_diff_files(&rev, 0);
+ run_diff_files(&rev, 0);
- if (!diff_result_code(&rev.diffopt, diff_files_result)) {
+ if (!diff_result_code(&rev.diffopt)) {
print_status(flags, ' ', path, ce_oid,
displaypath);
} else if (!(flags & OPT_CACHED)) {
@@ -1139,7 +1140,7 @@ static int compute_summary_module_list(struct object_id *head_oid,
}
if (diff_cmd == DIFF_INDEX)
- run_diff_index(&rev, info->cached);
+ run_diff_index(&rev, info->cached ? DIFF_INDEX_CACHED : 0);
else
run_diff_files(&rev, 0);
prepare_submodule_summary(info, &list);
@@ -2192,12 +2193,13 @@ static int update_clone_task_finished(int result,
}
static int git_update_clone_config(const char *var, const char *value,
+ const struct config_context *ctx,
void *cb)
{
int *max_jobs = cb;
if (!strcmp(var, "submodule.fetchjobs"))
- *max_jobs = parse_submodule_fetchjobs(var, value);
+ *max_jobs = parse_submodule_fetchjobs(var, value, ctx->kvi);
return 0;
}
diff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c
index 10198a74fa..c9defe4d2e 100644
--- a/builtin/symbolic-ref.c
+++ b/builtin/symbolic-ref.c
@@ -1,9 +1,9 @@
#include "builtin.h"
#include "config.h"
-#include "cache.h"
#include "gettext.h"
#include "refs.h"
#include "parse-options.h"
+#include "strbuf.h"
static const char * const git_symbolic_ref_usage[] = {
N_("git symbolic-ref [-m <reason>] <name> <ref>"),
diff --git a/builtin/tag.c b/builtin/tag.c
index 49b64c7a28..3918eacbb5 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -6,17 +6,17 @@
* Based on git-tag.sh and mktag.c by Linus Torvalds.
*/
-#include "cache.h"
+#include "builtin.h"
#include "advice.h"
#include "config.h"
-#include "builtin.h"
#include "editor.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "tag.h"
#include "run-command.h"
#include "parse-options.h"
@@ -121,7 +121,7 @@ static int for_each_tag_name(const char **argv, each_tag_name_fn fn,
return had_error;
}
-static int collect_tags(const char *name, const char *ref,
+static int collect_tags(const char *name UNUSED, const char *ref,
const struct object_id *oid, void *cb_data)
{
struct string_list *ref_list = cb_data;
@@ -155,7 +155,7 @@ static int delete_tags(const char **argv)
return result;
}
-static int verify_tag(const char *name, const char *ref,
+static int verify_tag(const char *name, const char *ref UNUSED,
const struct object_id *oid, void *cb_data)
{
int flags;
@@ -188,7 +188,8 @@ static const char tag_template_nocleanup[] =
"Lines starting with '%c' will be kept; you may remove them"
" yourself if you want to.\n");
-static int git_tag_config(const char *var, const char *value, void *cb)
+static int git_tag_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "tag.gpgsign")) {
config_sign_tag = git_config_bool(var, value);
@@ -209,7 +210,11 @@ static int git_tag_config(const char *var, const char *value, void *cb)
if (starts_with(var, "column."))
return git_column_config(var, value, "tag", &colopts);
- return git_color_default_config(var, value, cb);
+
+ if (git_color_config(var, value, cb) < 0)
+ return -1;
+
+ return git_default_config(var, value, ctx, cb);
}
static void write_tag_body(int fd, const struct object_id *oid)
@@ -309,9 +314,11 @@ static void create_tag(const struct object_id *object, const char *object_ref,
struct strbuf buf = STRBUF_INIT;
strbuf_addch(&buf, '\n');
if (opt->cleanup_mode == CLEANUP_ALL)
- strbuf_commented_addf(&buf, _(tag_template), tag, comment_line_char);
+ strbuf_commented_addf(&buf, comment_line_char,
+ _(tag_template), tag, comment_line_char);
else
- strbuf_commented_addf(&buf, _(tag_template_nocleanup), tag, comment_line_char);
+ strbuf_commented_addf(&buf, comment_line_char,
+ _(tag_template_nocleanup), tag, comment_line_char);
write_or_die(fd, buf.buf, buf.len);
strbuf_release(&buf);
}
@@ -325,7 +332,8 @@ static void create_tag(const struct object_id *object, const char *object_ref,
}
if (opt->cleanup_mode != CLEANUP_NONE)
- strbuf_stripspace(buf, opt->cleanup_mode == CLEANUP_ALL);
+ strbuf_stripspace(buf,
+ opt->cleanup_mode == CLEANUP_ALL ? comment_line_char : '\0');
if (!opt->message_given && !buf->len)
die(_("no tag message?"));
@@ -437,7 +445,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
struct msg_arg msg = { .buf = STRBUF_INIT };
struct ref_transaction *transaction;
struct strbuf err = STRBUF_INIT;
- struct ref_filter filter;
+ struct ref_filter filter = REF_FILTER_INIT;
struct ref_sorting *sorting;
struct string_list sorting_options = STRING_LIST_INIT_DUP;
struct ref_format format = REF_FORMAT_INIT;
@@ -496,7 +504,6 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
git_config(git_tag_config, &sorting_options);
memset(&opt, 0, sizeof(opt));
- memset(&filter, 0, sizeof(filter));
filter.lines = -1;
opt.sign = -1;
@@ -652,6 +659,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
cleanup:
ref_sorting_release(sorting);
+ ref_filter_clear(&filter);
strbuf_release(&buf);
strbuf_release(&ref);
strbuf_release(&reflog_msg);
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index b35a4b9dfe..c129e2bb6c 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -2,8 +2,7 @@
#include "config.h"
#include "hex.h"
#include "object-name.h"
-#include "object-store.h"
-#include "wrapper.h"
+#include "object-store-ll.h"
static char *create_temp_file(struct object_id *oid)
{
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 0b4fe803cc..fef7423448 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -1,18 +1,18 @@
#include "builtin.h"
-#include "cache.h"
#include "bulk-checkin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "git-zlib.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "object.h"
#include "delta.h"
#include "pack.h"
#include "blob.h"
#include "commit.h"
#include "replace-object.h"
+#include "strbuf.h"
#include "tag.h"
#include "tree.h"
#include "tree-walk.h"
@@ -215,7 +215,8 @@ static void write_cached_object(struct object *obj, struct obj_buffer *obj_buf)
* Verify its reachability and validity recursively and write it out.
*/
static int check_object(struct object *obj, enum object_type type,
- void *data, struct fsck_options *options)
+ void *data UNUSED,
+ struct fsck_options *options UNUSED)
{
struct obj_buffer *obj_buf;
@@ -608,6 +609,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
{
int i;
struct object_id oid;
+ git_hash_ctx tmp_ctx;
disable_replace_refs();
@@ -668,7 +670,9 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
the_hash_algo->init_fn(&ctx);
unpack_all();
the_hash_algo->update_fn(&ctx, buffer, offset);
- the_hash_algo->final_oid_fn(&oid, &ctx);
+ the_hash_algo->init_fn(&tmp_ctx);
+ the_hash_algo->clone_fn(&tmp_ctx, &ctx);
+ the_hash_algo->final_oid_fn(&oid, &tmp_ctx);
if (strict) {
write_rest();
if (fsck_finish(&fsck_options))
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 5fab9ad2ec..59acae3336 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -4,7 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "builtin.h"
#include "bulk-checkin.h"
#include "config.h"
#include "environment.h"
@@ -15,15 +15,16 @@
#include "quote.h"
#include "cache-tree.h"
#include "tree-walk.h"
-#include "builtin.h"
#include "object-file.h"
#include "refs.h"
#include "resolve-undo.h"
#include "parse-options.h"
#include "pathspec.h"
#include "dir.h"
+#include "read-cache.h"
#include "repository.h"
#include "setup.h"
+#include "sparse-index.h"
#include "split-index.h"
#include "symlinks.h"
#include "fsmonitor.h"
@@ -855,7 +856,7 @@ static int chmod_callback(const struct option *opt,
return 0;
}
-static int resolve_undo_clear_callback(const struct option *opt,
+static int resolve_undo_clear_callback(const struct option *opt UNUSED,
const char *arg, int unset)
{
BUG_ON_OPT_NEG(unset);
@@ -889,7 +890,7 @@ static int parse_new_style_cacheinfo(const char *arg,
}
static enum parse_opt_result cacheinfo_callback(
- struct parse_opt_ctx_t *ctx, const struct option *opt,
+ struct parse_opt_ctx_t *ctx, const struct option *opt UNUSED,
const char *arg, int unset)
{
struct object_id oid;
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 0c59b1c9ef..c0c4e65e6f 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -1,9 +1,8 @@
-#include "cache.h"
+#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "hash.h"
#include "refs.h"
-#include "builtin.h"
#include "object-name.h"
#include "parse-options.h"
#include "quote.h"
@@ -312,8 +311,8 @@ static void report_ok(const char *command)
fflush(stdout);
}
-static void parse_cmd_option(struct ref_transaction *transaction,
- const char *next, const char *end)
+static void parse_cmd_option(struct ref_transaction *transaction UNUSED,
+ const char *next, const char *end UNUSED)
{
const char *rest;
if (skip_prefix(next, "no-deref", &rest) && *rest == line_termination)
@@ -322,8 +321,8 @@ static void parse_cmd_option(struct ref_transaction *transaction,
die("option unknown: %s", next);
}
-static void parse_cmd_start(struct ref_transaction *transaction,
- const char *next, const char *end)
+static void parse_cmd_start(struct ref_transaction *transaction UNUSED,
+ const char *next, const char *end UNUSED)
{
if (*next != line_termination)
die("start: extra input: %s", next);
@@ -331,7 +330,7 @@ static void parse_cmd_start(struct ref_transaction *transaction,
}
static void parse_cmd_prepare(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
struct strbuf error = STRBUF_INIT;
if (*next != line_termination)
@@ -342,7 +341,7 @@ static void parse_cmd_prepare(struct ref_transaction *transaction,
}
static void parse_cmd_abort(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
struct strbuf error = STRBUF_INIT;
if (*next != line_termination)
@@ -353,7 +352,7 @@ static void parse_cmd_abort(struct ref_transaction *transaction,
}
static void parse_cmd_commit(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
struct strbuf error = STRBUF_INIT;
if (*next != line_termination)
diff --git a/builtin/update-server-info.c b/builtin/update-server-info.c
index 19dce3c065..1dc3971ede 100644
--- a/builtin/update-server-info.c
+++ b/builtin/update-server-info.c
@@ -1,6 +1,5 @@
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
#include "gettext.h"
#include "parse-options.h"
#include "server-info.h"
diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c
index 44ad400e18..1b09e5e1aa 100644
--- a/builtin/upload-archive.c
+++ b/builtin/upload-archive.c
@@ -1,9 +1,9 @@
/*
* Copyright (c) 2006 Franck Bui-Huu
*/
-#include "cache.h"
#include "builtin.h"
#include "archive.h"
+#include "path.h"
#include "pkt-line.h"
#include "sideband.h"
#include "repository.h"
diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c
index 81d2008e01..9b021ef026 100644
--- a/builtin/upload-pack.c
+++ b/builtin/upload-pack.c
@@ -1,9 +1,9 @@
-#include "cache.h"
#include "builtin.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "pkt-line.h"
#include "parse-options.h"
+#include "path.h"
#include "protocol.h"
#include "replace-object.h"
#include "upload-pack.h"
diff --git a/builtin/var.c b/builtin/var.c
index 2149998980..8cf7dd9e2e 100644
--- a/builtin/var.c
+++ b/builtin/var.c
@@ -4,60 +4,188 @@
* Copyright (C) Eric Biederman, 2005
*/
#include "builtin.h"
+#include "attr.h"
#include "config.h"
#include "editor.h"
#include "ident.h"
#include "pager.h"
#include "refs.h"
+#include "path.h"
+#include "strbuf.h"
static const char var_usage[] = "git var (-l | <variable>)";
-static const char *editor(int flag)
+static char *committer(int ident_flag)
{
- return git_editor();
+ return xstrdup_or_null(git_committer_info(ident_flag));
}
-static const char *sequence_editor(int flag)
+static char *author(int ident_flag)
{
- return git_sequence_editor();
+ return xstrdup_or_null(git_author_info(ident_flag));
}
-static const char *pager(int flag)
+static char *editor(int ident_flag UNUSED)
+{
+ return xstrdup_or_null(git_editor());
+}
+
+static char *sequence_editor(int ident_flag UNUSED)
+{
+ return xstrdup_or_null(git_sequence_editor());
+}
+
+static char *pager(int ident_flag UNUSED)
{
const char *pgm = git_pager(1);
if (!pgm)
pgm = "cat";
- return pgm;
+ return xstrdup(pgm);
+}
+
+static char *default_branch(int ident_flag UNUSED)
+{
+ return xstrdup_or_null(git_default_branch_name(1));
+}
+
+static char *shell_path(int ident_flag UNUSED)
+{
+ return xstrdup(SHELL_PATH);
}
-static const char *default_branch(int flag)
+static char *git_attr_val_system(int ident_flag UNUSED)
{
- return git_default_branch_name(1);
+ if (git_attr_system_is_enabled()) {
+ char *file = xstrdup(git_attr_system_file());
+ normalize_path_copy(file, file);
+ return file;
+ }
+ return NULL;
+}
+
+static char *git_attr_val_global(int ident_flag UNUSED)
+{
+ char *file = xstrdup_or_null(git_attr_global_file());
+ if (file) {
+ normalize_path_copy(file, file);
+ return file;
+ }
+ return NULL;
+}
+
+static char *git_config_val_system(int ident_flag UNUSED)
+{
+ if (git_config_system()) {
+ char *file = git_system_config();
+ normalize_path_copy(file, file);
+ return file;
+ }
+ return NULL;
+}
+
+static char *git_config_val_global(int ident_flag UNUSED)
+{
+ struct strbuf buf = STRBUF_INIT;
+ char *user, *xdg;
+ size_t unused;
+
+ git_global_config(&user, &xdg);
+ if (xdg && *xdg) {
+ normalize_path_copy(xdg, xdg);
+ strbuf_addf(&buf, "%s\n", xdg);
+ }
+ if (user && *user) {
+ normalize_path_copy(user, user);
+ strbuf_addf(&buf, "%s\n", user);
+ }
+ free(xdg);
+ free(user);
+ strbuf_trim_trailing_newline(&buf);
+ if (buf.len == 0) {
+ strbuf_release(&buf);
+ return NULL;
+ }
+ return strbuf_detach(&buf, &unused);
}
struct git_var {
const char *name;
- const char *(*read)(int);
+ char *(*read)(int);
+ int multivalued;
};
static struct git_var git_vars[] = {
- { "GIT_COMMITTER_IDENT", git_committer_info },
- { "GIT_AUTHOR_IDENT", git_author_info },
- { "GIT_EDITOR", editor },
- { "GIT_SEQUENCE_EDITOR", sequence_editor },
- { "GIT_PAGER", pager },
- { "GIT_DEFAULT_BRANCH", default_branch },
- { "", NULL },
+ {
+ .name = "GIT_COMMITTER_IDENT",
+ .read = committer,
+ },
+ {
+ .name = "GIT_AUTHOR_IDENT",
+ .read = author,
+ },
+ {
+ .name = "GIT_EDITOR",
+ .read = editor,
+ },
+ {
+ .name = "GIT_SEQUENCE_EDITOR",
+ .read = sequence_editor,
+ },
+ {
+ .name = "GIT_PAGER",
+ .read = pager,
+ },
+ {
+ .name = "GIT_DEFAULT_BRANCH",
+ .read = default_branch,
+ },
+ {
+ .name = "GIT_SHELL_PATH",
+ .read = shell_path,
+ },
+ {
+ .name = "GIT_ATTR_SYSTEM",
+ .read = git_attr_val_system,
+ },
+ {
+ .name = "GIT_ATTR_GLOBAL",
+ .read = git_attr_val_global,
+ },
+ {
+ .name = "GIT_CONFIG_SYSTEM",
+ .read = git_config_val_system,
+ },
+ {
+ .name = "GIT_CONFIG_GLOBAL",
+ .read = git_config_val_global,
+ .multivalued = 1,
+ },
+ {
+ .name = "",
+ .read = NULL,
+ },
};
static void list_vars(void)
{
struct git_var *ptr;
- const char *val;
+ char *val;
for (ptr = git_vars; ptr->read; ptr++)
- if ((val = ptr->read(0)))
- printf("%s=%s\n", ptr->name, val);
+ if ((val = ptr->read(0))) {
+ if (ptr->multivalued && *val) {
+ struct string_list list = STRING_LIST_INIT_DUP;
+ int i;
+
+ string_list_split(&list, val, '\n', -1);
+ for (i = 0; i < list.nr; i++)
+ printf("%s=%s\n", ptr->name, list.items[i].string);
+ string_list_clear(&list, 0);
+ } else {
+ printf("%s=%s\n", ptr->name, val);
+ }
+ free(val);
+ }
}
static const struct git_var *get_git_var(const char *var)
@@ -71,19 +199,20 @@ static const struct git_var *get_git_var(const char *var)
return NULL;
}
-static int show_config(const char *var, const char *value, void *cb)
+static int show_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (value)
printf("%s=%s\n", var, value);
else
printf("%s\n", var);
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
int cmd_var(int argc, const char **argv, const char *prefix UNUSED)
{
const struct git_var *git_var;
- const char *val;
+ char *val;
if (argc != 2)
usage(var_usage);
@@ -104,6 +233,7 @@ int cmd_var(int argc, const char **argv, const char *prefix UNUSED)
return 1;
printf("%s\n", val);
+ free(val);
return 0;
}
diff --git a/builtin/verify-commit.c b/builtin/verify-commit.c
index 5d99b82a64..9680b58701 100644
--- a/builtin/verify-commit.c
+++ b/builtin/verify-commit.c
@@ -5,12 +5,11 @@
*
* Based on git-verify-tag
*/
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
#include "gettext.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "repository.h"
#include "commit.h"
#include "run-command.h"
diff --git a/builtin/verify-pack.c b/builtin/verify-pack.c
index 190fd69540..011dddd2dc 100644
--- a/builtin/verify-pack.c
+++ b/builtin/verify-pack.c
@@ -1,9 +1,9 @@
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "run-command.h"
#include "parse-options.h"
+#include "strbuf.h"
#define VERIFY_PACK_VERBOSE 01
#define VERIFY_PACK_STAT_ONLY 02
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index c6019a0ad8..d8753270eb 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -5,9 +5,8 @@
*
* Based on git-verify-tag.sh
*/
-#include "cache.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
#include "gettext.h"
#include "tag.h"
#include "run-command.h"
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 5a9cf076ad..62b7e26f4b 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -1,10 +1,9 @@
-#include "cache.h"
+#include "builtin.h"
#include "abspath.h"
#include "advice.h"
#include "checkout.h"
#include "config.h"
#include "copy.h"
-#include "builtin.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
@@ -12,8 +11,10 @@
#include "object-file.h"
#include "object-name.h"
#include "parse-options.h"
+#include "path.h"
#include "strvec.h"
#include "branch.h"
+#include "read-cache-ll.h"
#include "refs.h"
#include "remote.h"
#include "repository.h"
@@ -23,7 +24,6 @@
#include "submodule.h"
#include "utf8.h"
#include "worktree.h"
-#include "wrapper.h"
#include "quote.h"
#define BUILTIN_WORKTREE_ADD_USAGE \
@@ -53,14 +53,14 @@
"(branch with no commits) for this repository, you can do so\n" \
"using the --orphan flag:\n" \
"\n" \
- " git worktree add --orphan -b %s %s\n")
+ " git worktree add --orphan -b %s %s\n")
#define WORKTREE_ADD_ORPHAN_NO_DASH_B_HINT_TEXT \
_("If you meant to create a worktree containing a new orphan branch\n" \
"(branch with no commits) for this repository, you can do so\n" \
"using the --orphan flag:\n" \
"\n" \
- " git worktree add --orphan %s\n")
+ " git worktree add --orphan %s\n")
static const char * const git_worktree_usage[] = {
BUILTIN_WORKTREE_ADD_USAGE,
@@ -128,14 +128,15 @@ static int verbose;
static int guess_remote;
static timestamp_t expire;
-static int git_worktree_config(const char *var, const char *value, void *cb)
+static int git_worktree_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "worktree.guessremote")) {
guess_remote = git_config_bool(var, value);
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static int delete_git_dir(const char *id)
@@ -627,10 +628,10 @@ static void print_preparing_worktree_line(int detach,
*
* Returns 0 on failure and non-zero on success.
*/
-static int first_valid_ref(const char *refname,
- const struct object_id *oid,
- int flags,
- void *cb_data)
+static int first_valid_ref(const char *refname UNUSED,
+ const struct object_id *oid UNUSED,
+ int flags UNUSED,
+ void *cb_data UNUSED)
{
return 1;
}
@@ -695,7 +696,7 @@ static int can_use_remote_refs(const struct add_opts *opts)
return 1;
} else if (!opts->force && remote_get(NULL)) {
die(_("No local or remote refs exist despite at least one remote\n"
- "present, stopping; use 'add -f' to overide or fetch a remote first"));
+ "present, stopping; use 'add -f' to override or fetch a remote first"));
}
return 0;
}
diff --git a/builtin/write-tree.c b/builtin/write-tree.c
index 84b83318c9..66e83d0ecb 100644
--- a/builtin/write-tree.c
+++ b/builtin/write-tree.c
@@ -5,7 +5,6 @@
*/
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
-#include "cache.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
diff --git a/bulk-checkin.c b/bulk-checkin.c
index d843279715..92b9c8598b 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -2,7 +2,6 @@
* Copyright (c) 2011, Google Inc.
*/
#include "git-compat-util.h"
-#include "alloc.h"
#include "bulk-checkin.h"
#include "environment.h"
#include "gettext.h"
@@ -16,8 +15,7 @@
#include "tmp-objdir.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
-#include "wrapper.h"
+#include "object-store-ll.h"
static int odb_transaction_nesting;
@@ -270,6 +268,7 @@ static int deflate_to_pack(struct bulk_checkin_packfile *state,
type, size);
the_hash_algo->init_fn(&ctx);
the_hash_algo->update_fn(&ctx, obuf, header_len);
+ the_hash_algo->init_fn(&checkpoint.ctx);
/* Note: idx is non-NULL when we are writing */
if ((flags & HASH_WRITE_OBJECT) != 0)
diff --git a/bundle-uri.c b/bundle-uri.c
index 2a2db1a1d3..8492fffd2f 100644
--- a/bundle-uri.c
+++ b/bundle-uri.c
@@ -4,7 +4,7 @@
#include "copy.h"
#include "environment.h"
#include "gettext.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "refs.h"
#include "run-command.h"
#include "hashmap.h"
@@ -20,7 +20,7 @@ static struct {
{ BUNDLE_HEURISTIC_CREATIONTOKEN, "creationToken" },
};
-static int compare_bundles(const void *hashmap_cmp_fn_data,
+static int compare_bundles(const void *hashmap_cmp_fn_data UNUSED,
const struct hashmap_entry *he1,
const struct hashmap_entry *he2,
const void *id)
@@ -45,7 +45,7 @@ void init_bundle_list(struct bundle_list *list)
}
static int clear_remote_bundle_info(struct remote_bundle_info *bundle,
- void *data)
+ void *data UNUSED)
{
FREE_AND_NULL(bundle->id);
FREE_AND_NULL(bundle->uri);
@@ -224,7 +224,9 @@ static int bundle_list_update(const char *key, const char *value,
return 0;
}
-static int config_to_bundle_list(const char *key, const char *value, void *data)
+static int config_to_bundle_list(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *data)
{
struct bundle_list *list = data;
return bundle_list_update(key, value, list);
@@ -253,6 +255,7 @@ int bundle_uri_parse_config_format(const char *uri,
}
result = git_config_from_file_with_options(config_to_bundle_list,
filename, list,
+ CONFIG_SCOPE_UNKNOWN,
&opts);
if (!result && list->mode == BUNDLE_MODE_NONE) {
@@ -776,7 +779,7 @@ static int unbundle_all_bundles(struct repository *r,
return 0;
}
-static int unlink_bundle(struct remote_bundle_info *info, void *data)
+static int unlink_bundle(struct remote_bundle_info *info, void *data UNUSED)
{
if (info->file)
unlink_or_warn(info->file);
@@ -871,7 +874,9 @@ cached:
return advertise_bundle_uri;
}
-static int config_to_packet_line(const char *key, const char *value, void *data)
+static int config_to_packet_line(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *data)
{
struct packet_reader *writer = data;
diff --git a/bundle.c b/bundle.c
index a5505368de..a9744da255 100644
--- a/bundle.c
+++ b/bundle.c
@@ -4,7 +4,7 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "repository.h"
#include "object.h"
#include "commit.h"
@@ -271,10 +271,10 @@ int verify_bundle(struct repository *r,
list_refs(r, 0, NULL);
}
- printf_ln("The bundle uses this hash algorithm: %s",
+ printf_ln(_("The bundle uses this hash algorithm: %s"),
header->hash_algo->name);
if (header->filter.choice)
- printf_ln("The bundle uses this filter: %s",
+ printf_ln(_("The bundle uses this filter: %s"),
list_objects_filter_spec(&header->filter));
}
cleanup:
diff --git a/cache-tree.c b/cache-tree.c
index ebfe649b33..641427ed41 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -1,5 +1,4 @@
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "environment.h"
#include "hex.h"
#include "lockfile.h"
@@ -8,7 +7,8 @@
#include "cache-tree.h"
#include "bulk-checkin.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "read-cache-ll.h"
#include "replace-object.h"
#include "promisor-remote.h"
#include "sparse-index.h"
diff --git a/chunk-format.c b/chunk-format.c
index e7d613c907..140dfa0dcc 100644
--- a/chunk-format.c
+++ b/chunk-format.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "chunk-format.h"
#include "csum-file.h"
#include "gettext.h"
diff --git a/ci/config/README b/ci/config/README
new file mode 100644
index 0000000000..8de3a04e32
--- /dev/null
+++ b/ci/config/README
@@ -0,0 +1,14 @@
+You can configure some aspects of the GitHub Actions-based CI on a
+per-repository basis by setting "variables" and "secrets" from with the
+GitHub web interface. These can be found at:
+
+ https://github.com/<user>/git/settings/secrets/actions
+
+The following variables can be used:
+
+ - CI_BRANCHES
+
+ By default, CI is run when any branch is pushed. If this variable is
+ non-empty, then only the branches it lists will run CI. Branch names
+ should be separated by spaces, and should use their shortened form
+ (e.g., "main", not "refs/heads/main").
diff --git a/ci/config/allow-ref.sample b/ci/config/allow-ref.sample
deleted file mode 100755
index af0e076f8a..0000000000
--- a/ci/config/allow-ref.sample
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# Sample script for enabling/disabling GitHub Actions CI runs on
-# particular refs. By default, CI is run for all branches pushed to
-# GitHub. You can override this by dropping the ".sample" from the script,
-# editing it, committing, and pushing the result to the "ci-config" branch of
-# your repository:
-#
-# git checkout -b ci-config
-# cp allow-ref.sample allow-ref
-# $EDITOR allow-ref
-# git add allow-ref
-# git commit -am "implement my ci preferences"
-# git push
-#
-# This script will then be run when any refs are pushed to that repository. It
-# gets the fully qualified refname as the first argument, and should exit with
-# success only for refs for which you want to run CI.
-
-case "$1" in
-# allow one-off tests by pushing to "for-ci" or "for-ci/mybranch"
-refs/heads/for-ci*) true ;;
-# always build your integration branch
-refs/heads/my-integration-branch) true ;;
-# don't build any other branches or tags
-*) false ;;
-esac
diff --git a/ci/lib.sh b/ci/lib.sh
index 369d462f13..6fbb5bade1 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -280,6 +280,8 @@ linux-leaks)
;;
linux-asan-ubsan)
export SANITIZE=address,undefined
+ export NO_SVN_TESTS=LetsSaveSomeTime
+ MAKEFLAGS="$MAKEFLAGS NO_PYTHON=YepBecauseP4FlakesTooOften"
;;
esac
diff --git a/color.c b/color.c
index 83abb11eda..b24b19566b 100644
--- a/color.c
+++ b/color.c
@@ -430,14 +430,6 @@ int git_color_config(const char *var, const char *value, void *cb UNUSED)
return 0;
}
-int git_color_default_config(const char *var, const char *value, void *cb)
-{
- if (git_color_config(var, value, cb) < 0)
- return -1;
-
- return git_default_config(var, value, cb);
-}
-
void color_print_strbuf(FILE *fp, const char *color, const struct strbuf *sb)
{
if (*color)
diff --git a/color.h b/color.h
index cfc8f841b2..bb28343be2 100644
--- a/color.h
+++ b/color.h
@@ -88,12 +88,8 @@ extern const int column_colors_ansi_max;
*/
extern int color_stdout_is_tty;
-/*
- * Use the first one if you need only color config; the second is a convenience
- * if you are just going to change to git_default_config, too.
- */
+/* Parse color config. */
int git_color_config(const char *var, const char *value, void *cb);
-int git_color_default_config(const char *var, const char *value, void *cb);
/*
* Parse a config option, which can be a boolean or one of
diff --git a/combine-diff.c b/combine-diff.c
index 1e3cd7fb17..f90f442482 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1,5 +1,5 @@
#include "git-compat-util.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
#include "convert.h"
#include "blob.h"
@@ -17,7 +17,6 @@
#include "userdiff.h"
#include "oid-array.h"
#include "revision.h"
-#include "wrapper.h"
static int compare_paths(const struct combine_diff_path *one,
const struct diff_filespec *two)
diff --git a/commit-graph.c b/commit-graph.c
index fd0ff8c7b8..5e8a3a5085 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -12,8 +12,9 @@
#include "hash-lookup.h"
#include "commit-graph.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oid-array.h"
+#include "path.h"
#include "alloc.h"
#include "hashmap.h"
#include "replace-object.h"
@@ -25,7 +26,6 @@
#include "trace2.h"
#include "tree.h"
#include "chunk-format.h"
-#include "wrapper.h"
void git_test_write_commit_graph_or_die(void)
{
@@ -128,6 +128,16 @@ timestamp_t commit_graph_generation(const struct commit *c)
return GENERATION_NUMBER_INFINITY;
}
+static timestamp_t commit_graph_generation_from_graph(const struct commit *c)
+{
+ struct commit_graph_data *data =
+ commit_graph_data_slab_peek(&commit_graph_data_slab, c);
+
+ if (!data || data->graph_pos == COMMIT_NOT_FROM_GRAPH)
+ return GENERATION_NUMBER_INFINITY;
+ return data->generation;
+}
+
static struct commit_graph_data *commit_graph_data_at(const struct commit *c)
{
unsigned int i, nth_slab;
@@ -480,7 +490,7 @@ static int add_graph_to_chain(struct commit_graph *g,
if (!cur_g ||
!oideq(&oids[n], &cur_g->oid) ||
- !hasheq(oids[n].hash, g->chunk_base_graphs + g->hash_len * n)) {
+ !hasheq(oids[n].hash, g->chunk_base_graphs + st_mult(g->hash_len, n))) {
warning(_("commit-graph chain does not match"));
return 0;
}
@@ -490,8 +500,15 @@ static int add_graph_to_chain(struct commit_graph *g,
g->base_graph = chain;
- if (chain)
+ if (chain) {
+ if (unsigned_add_overflows(chain->num_commits,
+ chain->num_commits_in_base)) {
+ warning(_("commit count in base graph too high: %"PRIuMAX),
+ (uintmax_t)chain->num_commits_in_base);
+ return 0;
+ }
g->num_commits_in_base = chain->num_commits + chain->num_commits_in_base;
+ }
return 1;
}
@@ -745,7 +762,7 @@ static void load_oid_from_graph(struct commit_graph *g,
lex_index = pos - g->num_commits_in_base;
- oidread(oid, g->chunk_oid_lookup + g->hash_len * lex_index);
+ oidread(oid, g->chunk_oid_lookup + st_mult(g->hash_len, lex_index));
}
static struct commit_list **insert_parent_or_die(struct repository *r,
@@ -781,7 +798,7 @@ static void fill_commit_graph_info(struct commit *item, struct commit_graph *g,
die(_("invalid commit position. commit-graph is likely corrupt"));
lex_index = pos - g->num_commits_in_base;
- commit_data = g->chunk_commit_data + GRAPH_DATA_WIDTH * lex_index;
+ commit_data = g->chunk_commit_data + st_mult(GRAPH_DATA_WIDTH, lex_index);
graph_data = commit_graph_data_at(item);
graph_data->graph_pos = pos;
@@ -791,14 +808,14 @@ static void fill_commit_graph_info(struct commit *item, struct commit_graph *g,
item->date = (timestamp_t)((date_high << 32) | date_low);
if (g->read_generation_data) {
- offset = (timestamp_t)get_be32(g->chunk_generation_data + sizeof(uint32_t) * lex_index);
+ offset = (timestamp_t)get_be32(g->chunk_generation_data + st_mult(sizeof(uint32_t), lex_index));
if (offset & CORRECTED_COMMIT_DATE_OFFSET_OVERFLOW) {
if (!g->chunk_generation_data_overflow)
die(_("commit-graph requires overflow generation data but has none"));
offset_pos = offset ^ CORRECTED_COMMIT_DATE_OFFSET_OVERFLOW;
- graph_data->generation = item->date + get_be64(g->chunk_generation_data_overflow + 8 * offset_pos);
+ graph_data->generation = item->date + get_be64(g->chunk_generation_data_overflow + st_mult(8, offset_pos));
} else
graph_data->generation = item->date + offset;
} else
@@ -829,7 +846,7 @@ static int fill_commit_in_graph(struct repository *r,
fill_commit_graph_info(item, g, pos);
lex_index = pos - g->num_commits_in_base;
- commit_data = g->chunk_commit_data + (g->hash_len + 16) * lex_index;
+ commit_data = g->chunk_commit_data + st_mult(g->hash_len + 16, lex_index);
item->object.parsed = 1;
@@ -851,7 +868,7 @@ static int fill_commit_in_graph(struct repository *r,
}
parent_data_ptr = (uint32_t*)(g->chunk_extra_edges +
- 4 * (uint64_t)(edge_value & GRAPH_EDGE_LAST_MASK));
+ st_mult(4, edge_value & GRAPH_EDGE_LAST_MASK));
do {
edge_value = get_be32(parent_data_ptr);
pptr = insert_parent_or_die(r, g,
@@ -971,7 +988,7 @@ static struct tree *load_tree_for_commit(struct repository *r,
g = g->base_graph;
commit_data = g->chunk_commit_data +
- GRAPH_DATA_WIDTH * (graph_pos - g->num_commits_in_base);
+ st_mult(GRAPH_DATA_WIDTH, graph_pos - g->num_commits_in_base);
oidread(&oid, commit_data);
set_commit_tree(c, lookup_tree(r, &oid));
@@ -1561,12 +1578,14 @@ static void compute_topological_levels(struct write_commit_graph_context *ctx)
stop_progress(&ctx->progress);
}
-static timestamp_t get_generation_from_graph_data(struct commit *c, void *data)
+static timestamp_t get_generation_from_graph_data(struct commit *c,
+ void *data UNUSED)
{
return commit_graph_data_at(c)->generation;
}
-static void set_generation_v2(struct commit *c, timestamp_t t, void *data)
+static void set_generation_v2(struct commit *c, timestamp_t t,
+ void *data UNUSED)
{
struct commit_graph_data *g = commit_graph_data_at(c);
g->generation = t;
@@ -1580,7 +1599,6 @@ static void compute_generation_numbers(struct write_commit_graph_context *ctx)
.commits = &ctx->commits,
.get_generation = get_generation_from_graph_data,
.set_generation = set_generation_v2,
- .data = ctx,
};
if (ctx->report_progress)
@@ -1609,7 +1627,7 @@ static void compute_generation_numbers(struct write_commit_graph_context *ctx)
}
static void set_generation_in_graph_data(struct commit *c, timestamp_t t,
- void *data)
+ void *data UNUSED)
{
commit_graph_data_at(c)->generation = t;
}
@@ -1951,35 +1969,35 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
add_chunk(cf, GRAPH_CHUNKID_OIDFANOUT, GRAPH_FANOUT_SIZE,
write_graph_chunk_fanout);
- add_chunk(cf, GRAPH_CHUNKID_OIDLOOKUP, hashsz * ctx->commits.nr,
+ add_chunk(cf, GRAPH_CHUNKID_OIDLOOKUP, st_mult(hashsz, ctx->commits.nr),
write_graph_chunk_oids);
- add_chunk(cf, GRAPH_CHUNKID_DATA, (hashsz + 16) * ctx->commits.nr,
+ add_chunk(cf, GRAPH_CHUNKID_DATA, st_mult(hashsz + 16, ctx->commits.nr),
write_graph_chunk_data);
if (ctx->write_generation_data)
add_chunk(cf, GRAPH_CHUNKID_GENERATION_DATA,
- sizeof(uint32_t) * ctx->commits.nr,
+ st_mult(sizeof(uint32_t), ctx->commits.nr),
write_graph_chunk_generation_data);
if (ctx->num_generation_data_overflows)
add_chunk(cf, GRAPH_CHUNKID_GENERATION_DATA_OVERFLOW,
- sizeof(timestamp_t) * ctx->num_generation_data_overflows,
+ st_mult(sizeof(timestamp_t), ctx->num_generation_data_overflows),
write_graph_chunk_generation_data_overflow);
if (ctx->num_extra_edges)
add_chunk(cf, GRAPH_CHUNKID_EXTRAEDGES,
- 4 * ctx->num_extra_edges,
+ st_mult(4, ctx->num_extra_edges),
write_graph_chunk_extra_edges);
if (ctx->changed_paths) {
add_chunk(cf, GRAPH_CHUNKID_BLOOMINDEXES,
- sizeof(uint32_t) * ctx->commits.nr,
+ st_mult(sizeof(uint32_t), ctx->commits.nr),
write_graph_chunk_bloom_indexes);
add_chunk(cf, GRAPH_CHUNKID_BLOOMDATA,
- sizeof(uint32_t) * 3
- + ctx->total_bloom_filter_data_size,
+ st_add(sizeof(uint32_t) * 3,
+ ctx->total_bloom_filter_data_size),
write_graph_chunk_bloom_data);
}
if (ctx->num_commit_graphs_after > 1)
add_chunk(cf, GRAPH_CHUNKID_BASE,
- hashsz * (ctx->num_commit_graphs_after - 1),
+ st_mult(hashsz, ctx->num_commit_graphs_after - 1),
write_graph_chunk_base);
hashwrite_be32(f, GRAPH_SIGNATURE);
@@ -1997,7 +2015,7 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
get_num_chunks(cf));
ctx->progress = start_delayed_progress(
progress_title.buf,
- get_num_chunks(cf) * ctx->commits.nr);
+ st_mult(get_num_chunks(cf), ctx->commits.nr));
}
write_chunkfile(cf, ctx);
@@ -2103,11 +2121,16 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx)
if (flags != COMMIT_GRAPH_SPLIT_MERGE_PROHIBITED &&
flags != COMMIT_GRAPH_SPLIT_REPLACE) {
- while (g && (g->num_commits <= size_mult * num_commits ||
+ while (g && (g->num_commits <= st_mult(size_mult, num_commits) ||
(max_commits && num_commits > max_commits))) {
if (g->odb != ctx->odb)
break;
+ if (unsigned_add_overflows(num_commits, g->num_commits))
+ die(_("cannot merge graphs with %"PRIuMAX", "
+ "%"PRIuMAX" commits"),
+ (uintmax_t)num_commits,
+ (uintmax_t)g->num_commits);
num_commits += g->num_commits;
g = g->base_graph;
@@ -2165,6 +2188,11 @@ static void merge_commit_graph(struct write_commit_graph_context *ctx,
uint32_t i;
uint32_t offset = g->num_commits_in_base;
+ if (unsigned_add_overflows(ctx->commits.nr, g->num_commits))
+ die(_("cannot merge graph %s, too many commits: %"PRIuMAX),
+ oid_to_hex(&g->oid),
+ (uintmax_t)st_add(ctx->commits.nr, g->num_commits));
+
ALLOC_GROW(ctx->commits.list, ctx->commits.nr + g->num_commits, ctx->commits.alloc);
for (i = 0; i < g->num_commits; i++) {
@@ -2435,7 +2463,7 @@ int write_commit_graph(struct object_directory *odb,
struct commit_graph *g = ctx->r->objects->commit_graph;
for (i = 0; i < g->num_commits; i++) {
struct object_id oid;
- oidread(&oid, g->chunk_oid_lookup + g->hash_len * i);
+ oidread(&oid, g->chunk_oid_lookup + st_mult(g->hash_len, i));
oid_array_append(&ctx->oids, &oid);
}
}
@@ -2533,26 +2561,20 @@ static void graph_report(const char *fmt, ...)
va_end(ap);
}
-#define GENERATION_ZERO_EXISTS 1
-#define GENERATION_NUMBER_EXISTS 2
-
static int commit_graph_checksum_valid(struct commit_graph *g)
{
return hashfile_checksum_valid(g->data, g->data_len);
}
-int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
+static int verify_one_commit_graph(struct repository *r,
+ struct commit_graph *g,
+ struct progress *progress,
+ uint64_t *seen)
{
uint32_t i, cur_fanout_pos = 0;
struct object_id prev_oid, cur_oid;
- int generation_zero = 0;
- struct progress *progress = NULL;
- int local_error = 0;
-
- if (!g) {
- graph_report("no commit-graph file loaded");
- return 1;
- }
+ struct commit *seen_gen_zero = NULL;
+ struct commit *seen_gen_non_zero = NULL;
verify_commit_graph_error = verify_commit_graph_lite(g);
if (verify_commit_graph_error)
@@ -2566,7 +2588,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
for (i = 0; i < g->num_commits; i++) {
struct commit *graph_commit;
- oidread(&cur_oid, g->chunk_oid_lookup + g->hash_len * i);
+ oidread(&cur_oid, g->chunk_oid_lookup + st_mult(g->hash_len, i));
if (i && oidcmp(&prev_oid, &cur_oid) >= 0)
graph_report(_("commit-graph has incorrect OID order: %s then %s"),
@@ -2603,18 +2625,14 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
if (verify_commit_graph_error & ~VERIFY_COMMIT_GRAPH_ERROR_HASH)
return verify_commit_graph_error;
- if (flags & COMMIT_GRAPH_WRITE_PROGRESS)
- progress = start_progress(_("Verifying commits in commit graph"),
- g->num_commits);
-
for (i = 0; i < g->num_commits; i++) {
struct commit *graph_commit, *odb_commit;
struct commit_list *graph_parents, *odb_parents;
timestamp_t max_generation = 0;
timestamp_t generation;
- display_progress(progress, i + 1);
- oidread(&cur_oid, g->chunk_oid_lookup + g->hash_len * i);
+ display_progress(progress, ++(*seen));
+ oidread(&cur_oid, g->chunk_oid_lookup + st_mult(g->hash_len, i));
graph_commit = lookup_commit(r, &cur_oid);
odb_commit = (struct commit *)create_object(r, &cur_oid, alloc_commit_node(r));
@@ -2650,7 +2668,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
oid_to_hex(&graph_parents->item->object.oid),
oid_to_hex(&odb_parents->item->object.oid));
- generation = commit_graph_generation(graph_parents->item);
+ generation = commit_graph_generation_from_graph(graph_parents->item);
if (generation > max_generation)
max_generation = generation;
@@ -2662,16 +2680,12 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
graph_report(_("commit-graph parent list for commit %s terminates early"),
oid_to_hex(&cur_oid));
- if (!commit_graph_generation(graph_commit)) {
- if (generation_zero == GENERATION_NUMBER_EXISTS)
- graph_report(_("commit-graph has generation number zero for commit %s, but non-zero elsewhere"),
- oid_to_hex(&cur_oid));
- generation_zero = GENERATION_ZERO_EXISTS;
- } else if (generation_zero == GENERATION_ZERO_EXISTS)
- graph_report(_("commit-graph has non-zero generation number for commit %s, but zero elsewhere"),
- oid_to_hex(&cur_oid));
+ if (commit_graph_generation_from_graph(graph_commit))
+ seen_gen_non_zero = graph_commit;
+ else
+ seen_gen_zero = graph_commit;
- if (generation_zero == GENERATION_ZERO_EXISTS)
+ if (seen_gen_zero)
continue;
/*
@@ -2696,12 +2710,43 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
graph_commit->date,
odb_commit->date);
}
- stop_progress(&progress);
- local_error = verify_commit_graph_error;
+ if (seen_gen_zero && seen_gen_non_zero)
+ graph_report(_("commit-graph has both zero and non-zero "
+ "generations (e.g., commits '%s' and '%s')"),
+ oid_to_hex(&seen_gen_zero->object.oid),
+ oid_to_hex(&seen_gen_non_zero->object.oid));
+
+ return verify_commit_graph_error;
+}
+
+int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
+{
+ struct progress *progress = NULL;
+ int local_error = 0;
+ uint64_t seen = 0;
+
+ if (!g) {
+ graph_report("no commit-graph file loaded");
+ return 1;
+ }
+
+ if (flags & COMMIT_GRAPH_WRITE_PROGRESS) {
+ uint64_t total = g->num_commits;
+ if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW))
+ total += g->num_commits_in_base;
+
+ progress = start_progress(_("Verifying commits in commit graph"),
+ total);
+ }
+
+ for (; g; g = g->base_graph) {
+ local_error |= verify_one_commit_graph(r, g, progress, &seen);
+ if (flags & COMMIT_GRAPH_VERIFY_SHALLOW)
+ break;
+ }
- if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW) && g->base_graph)
- local_error |= verify_commit_graph(r, g->base_graph, flags);
+ stop_progress(&progress);
return local_error;
}
diff --git a/commit-graph.h b/commit-graph.h
index 83aaa1dbb9..5e534f0fcc 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -1,7 +1,7 @@
#ifndef COMMIT_GRAPH_H
#define COMMIT_GRAPH_H
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oidset.h"
#define GIT_TEST_COMMIT_GRAPH "GIT_TEST_COMMIT_GRAPH"
diff --git a/commit-reach.c b/commit-reach.c
index f15d84566b..4b7c233fd4 100644
--- a/commit-reach.c
+++ b/commit-reach.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "commit.h"
#include "commit-graph.h"
#include "decorate.h"
diff --git a/commit.c b/commit.c
index 0fb9316931..b3223478bc 100644
--- a/commit.c
+++ b/commit.c
@@ -7,7 +7,7 @@
#include "hex.h"
#include "repository.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pkt-line.h"
#include "utf8.h"
#include "diff.h"
@@ -516,7 +516,7 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b
* The clone is shallow if nr_parent < 0, and we must
* not traverse its real parents even when we unhide them.
*/
- if (graft && (graft->nr_parent < 0 || grafts_replace_parents))
+ if (graft && (graft->nr_parent < 0 || !grafts_keep_true_parents))
continue;
new_parent = lookup_commit(r, &parent);
if (!new_parent)
diff --git a/compat/fsmonitor/fsm-health-darwin.c b/compat/fsmonitor/fsm-health-darwin.c
index 4c291f8a06..5b1709d63f 100644
--- a/compat/fsmonitor/fsm-health-darwin.c
+++ b/compat/fsmonitor/fsm-health-darwin.c
@@ -1,6 +1,6 @@
#include "git-compat-util.h"
#include "config.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsm-health.h"
#include "fsmonitor--daemon.h"
diff --git a/compat/fsmonitor/fsm-health-win32.c b/compat/fsmonitor/fsm-health-win32.c
index fe11bdd9ce..2d4e245beb 100644
--- a/compat/fsmonitor/fsm-health-win32.c
+++ b/compat/fsmonitor/fsm-health-win32.c
@@ -1,6 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "config.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsm-health.h"
#include "fsmonitor--daemon.h"
#include "gettext.h"
diff --git a/compat/fsmonitor/fsm-ipc-darwin.c b/compat/fsmonitor/fsm-ipc-darwin.c
index 793073aaa7..6f3a95410c 100644
--- a/compat/fsmonitor/fsm-ipc-darwin.c
+++ b/compat/fsmonitor/fsm-ipc-darwin.c
@@ -2,9 +2,10 @@
#include "config.h"
#include "gettext.h"
#include "hex.h"
+#include "path.h"
#include "repository.h"
#include "strbuf.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsmonitor-ipc.h"
#include "fsmonitor-path-utils.h"
diff --git a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c
index 23e24b4b37..36c7e13281 100644
--- a/compat/fsmonitor/fsm-listen-darwin.c
+++ b/compat/fsmonitor/fsm-listen-darwin.c
@@ -24,12 +24,13 @@
#endif
#include "git-compat-util.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsm-listen.h"
#include "fsmonitor--daemon.h"
#include "fsmonitor-path-utils.h"
#include "gettext.h"
#include "string-list.h"
+#include "trace.h"
struct fsm_listen_data
{
diff --git a/compat/fsmonitor/fsm-listen-win32.c b/compat/fsmonitor/fsm-listen-win32.c
index 677b1bbdec..a361a7db20 100644
--- a/compat/fsmonitor/fsm-listen-win32.c
+++ b/compat/fsmonitor/fsm-listen-win32.c
@@ -1,6 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "config.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsm-listen.h"
#include "fsmonitor--daemon.h"
#include "gettext.h"
diff --git a/compat/fsmonitor/fsm-path-utils-darwin.c b/compat/fsmonitor/fsm-path-utils-darwin.c
index 45eb4a9b9e..049f97eaaf 100644
--- a/compat/fsmonitor/fsm-path-utils-darwin.c
+++ b/compat/fsmonitor/fsm-path-utils-darwin.c
@@ -1,6 +1,8 @@
-#include "fsmonitor.h"
+#include "git-compat-util.h"
+#include "fsmonitor-ll.h"
#include "fsmonitor-path-utils.h"
#include "gettext.h"
+#include "trace.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/compat/fsmonitor/fsm-path-utils-win32.c b/compat/fsmonitor/fsm-path-utils-win32.c
index 4024baafb9..c8a3e9dcdb 100644
--- a/compat/fsmonitor/fsm-path-utils-win32.c
+++ b/compat/fsmonitor/fsm-path-utils-win32.c
@@ -1,7 +1,8 @@
-#include "cache.h"
-#include "fsmonitor.h"
+#include "git-compat-util.h"
+#include "fsmonitor-ll.h"
#include "fsmonitor-path-utils.h"
#include "gettext.h"
+#include "trace.h"
/*
* Check remote working directory protocol.
diff --git a/compat/fsmonitor/fsm-settings-darwin.c b/compat/fsmonitor/fsm-settings-darwin.c
index 58b623fbb9..a382590635 100644
--- a/compat/fsmonitor/fsm-settings-darwin.c
+++ b/compat/fsmonitor/fsm-settings-darwin.c
@@ -1,6 +1,6 @@
#include "git-compat-util.h"
#include "config.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsmonitor-ipc.h"
#include "fsmonitor-settings.h"
#include "fsmonitor-path-utils.h"
diff --git a/compat/fsmonitor/fsm-settings-win32.c b/compat/fsmonitor/fsm-settings-win32.c
index a8af31b71d..b6f6744494 100644
--- a/compat/fsmonitor/fsm-settings-win32.c
+++ b/compat/fsmonitor/fsm-settings-win32.c
@@ -1,7 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "config.h"
#include "repository.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
#include "fsmonitor-settings.h"
#include "fsmonitor-path-utils.h"
diff --git a/compat/mingw.c b/compat/mingw.c
index d06cdc6254..ec5280da16 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -6,7 +6,6 @@
#include <wchar.h>
#include "../strbuf.h"
#include "../run-command.h"
-#include "../cache.h"
#include "../abspath.h"
#include "../alloc.h"
#include "win32/lazyload.h"
@@ -244,7 +243,8 @@ static int core_restrict_inherited_handles = -1;
static enum hide_dotfiles_type hide_dotfiles = HIDE_DOTFILES_DOTGITONLY;
static char *unset_environment_variables;
-int mingw_core_config(const char *var, const char *value, void *cb)
+int mingw_core_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "core.hidedotfiles")) {
if (value && !strcasecmp(value, "dotgitonly"))
@@ -1347,6 +1347,11 @@ static char *path_lookup(const char *cmd, int exe_only)
return prog;
}
+char *mingw_locate_in_PATH(const char *cmd)
+{
+ return path_lookup(cmd, 0);
+}
+
static const wchar_t *wcschrnul(const wchar_t *s, wchar_t c)
{
while (*s && *s != c)
diff --git a/compat/mingw.h b/compat/mingw.h
index 209cf7ceba..6aec50e412 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -11,7 +11,9 @@ typedef _sigset_t sigset_t;
#undef _POSIX_THREAD_SAFE_FUNCTIONS
#endif
-int mingw_core_config(const char *var, const char *value, void *cb);
+struct config_context;
+int mingw_core_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb);
#define platform_core_config mingw_core_config
/*
@@ -175,6 +177,9 @@ pid_t waitpid(pid_t pid, int *status, int options);
#define kill mingw_kill
int mingw_kill(pid_t pid, int sig);
+#define locate_in_PATH mingw_locate_in_PATH
+char *mingw_locate_in_PATH(const char *cmd);
+
#ifndef NO_OPENSSL
#include <openssl/ssl.h>
static inline int mingw_SSL_set_fd(SSL *ssl, int fd)
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index a4d11376ba..0bd5c24250 100644
--- a/compat/precompose_utf8.c
+++ b/compat/precompose_utf8.c
@@ -5,11 +5,12 @@
#define PRECOMPOSE_UNICODE_C
-#include "cache.h"
+#include "git-compat-util.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "path.h"
+#include "strbuf.h"
#include "utf8.h"
#include "precompose_utf8.h"
diff --git a/compat/sha1-chunked.c b/compat/sha1-chunked.c
index 6adfcfd540..a4a6f930d7 100644
--- a/compat/sha1-chunked.c
+++ b/compat/sha1-chunked.c
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "hash-ll.h"
int git_SHA1_Update_Chunked(platform_SHA_CTX *c, const void *data, size_t len)
{
diff --git a/compat/simple-ipc/ipc-win32.c b/compat/simple-ipc/ipc-win32.c
index 6adce3c650..8bfe51248e 100644
--- a/compat/simple-ipc/ipc-win32.c
+++ b/compat/simple-ipc/ipc-win32.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "gettext.h"
#include "simple-ipc.h"
diff --git a/compat/terminal.c b/compat/terminal.c
index d87e321189..0afda730f2 100644
--- a/compat/terminal.c
+++ b/compat/terminal.c
@@ -6,7 +6,6 @@
#include "run-command.h"
#include "string-list.h"
#include "hashmap.h"
-#include "wrapper.h"
#if defined(HAVE_DEV_TTY) || defined(GIT_WINDOWS_NATIVE)
@@ -480,10 +479,13 @@ struct escape_sequence_entry {
};
static int sequence_entry_cmp(const void *hashmap_cmp_fn_data UNUSED,
- const struct escape_sequence_entry *e1,
- const struct escape_sequence_entry *e2,
+ const struct hashmap_entry *he1,
+ const struct hashmap_entry *he2,
const void *keydata)
{
+ const struct escape_sequence_entry
+ *e1 = container_of(he1, const struct escape_sequence_entry, entry),
+ *e2 = container_of(he2, const struct escape_sequence_entry, entry);
return strcmp(e1->sequence, keydata ? keydata : e2->sequence);
}
@@ -497,8 +499,7 @@ static int is_known_escape_sequence(const char *sequence)
struct strbuf buf = STRBUF_INIT;
char *p, *eol;
- hashmap_init(&sequences, (hashmap_cmp_fn)sequence_entry_cmp,
- NULL, 0);
+ hashmap_init(&sequences, sequence_entry_cmp, NULL, 0);
strvec_pushl(&cp.args, "infocmp", "-L", "-1", NULL);
if (pipe_command(&cp, NULL, 0, &buf, 0, NULL, 0))
diff --git a/compat/win32/headless.c b/compat/win32/headless.c
new file mode 100644
index 0000000000..8b00dfe3bd
--- /dev/null
+++ b/compat/win32/headless.c
@@ -0,0 +1,115 @@
+/*
+ * headless Git - run Git without opening a console window on Windows
+ */
+
+#define STRICT
+#define WIN32_LEAN_AND_MEAN
+#define UNICODE
+#define _UNICODE
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+
+/*
+ * If `dir` contains the path to a Git exec directory, extend `PATH` to
+ * include the corresponding `bin/` directory (which is where all those
+ * `.dll` files needed by `git.exe` are, on Windows).
+ */
+static int extend_path(wchar_t *dir, size_t dir_len)
+{
+ const wchar_t *suffix = L"\\libexec\\git-core";
+ size_t suffix_len = wcslen(suffix);
+ wchar_t *env;
+ DWORD len;
+
+ if (dir_len < suffix_len)
+ return 0;
+
+ dir_len -= suffix_len;
+ if (memcmp(dir + dir_len, suffix, suffix_len * sizeof(wchar_t)))
+ return 0;
+
+ len = GetEnvironmentVariableW(L"PATH", NULL, 0);
+ if (!len)
+ return 0;
+
+ env = _alloca((dir_len + 5 + len) * sizeof(wchar_t));
+ wcsncpy(env, dir, dir_len);
+ wcscpy(env + dir_len, L"\\bin;");
+ if (!GetEnvironmentVariableW(L"PATH", env + dir_len + 5, len))
+ return 0;
+
+ SetEnvironmentVariableW(L"PATH", env);
+ return 1;
+}
+
+int WINAPI wWinMain(_In_ HINSTANCE instance,
+ _In_opt_ HINSTANCE previous_instance,
+ _In_ LPWSTR command_line, _In_ int show)
+{
+ wchar_t git_command_line[32768];
+ size_t size = sizeof(git_command_line) / sizeof(wchar_t);
+ const wchar_t *needs_quotes = L"";
+ int slash = 0, i;
+
+ STARTUPINFO startup_info = {
+ .cb = sizeof(STARTUPINFO),
+ .dwFlags = STARTF_USESHOWWINDOW,
+ .wShowWindow = SW_HIDE,
+ };
+ PROCESS_INFORMATION process_info = { 0 };
+ DWORD creation_flags = CREATE_UNICODE_ENVIRONMENT |
+ CREATE_NEW_CONSOLE | CREATE_NO_WINDOW;
+ DWORD exit_code;
+
+ /* First, determine the full path of argv[0] */
+ for (i = 0; _wpgmptr[i]; i++)
+ if (_wpgmptr[i] == L' ')
+ needs_quotes = L"\"";
+ else if (_wpgmptr[i] == L'\\')
+ slash = i;
+
+ if (slash >= size - 11)
+ return 127; /* Too long path */
+
+ /* If it is in Git's exec path, add the bin/ directory to the PATH */
+ extend_path(_wpgmptr, slash);
+
+ /* Then, add the full path of `git.exe` as argv[0] */
+ i = swprintf_s(git_command_line, size, L"%ls%.*ls\\git.exe%ls",
+ needs_quotes, slash, _wpgmptr, needs_quotes);
+ if (i < 0)
+ return 127; /* Too long path */
+
+ if (*command_line) {
+ /* Now, append the command-line arguments */
+ i = swprintf_s(git_command_line + i, size - i,
+ L" %ls", command_line);
+ if (i < 0)
+ return 127;
+ }
+
+ startup_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+ startup_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+ startup_info.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+
+ if (!CreateProcess(NULL, /* infer argv[0] from the command line */
+ git_command_line, /* modified command line */
+ NULL, /* inherit process handles? */
+ NULL, /* inherit thread handles? */
+ FALSE, /* handles inheritable? */
+ creation_flags,
+ NULL, /* use this process' environment */
+ NULL, /* use this process' working directory */
+ &startup_info, &process_info))
+ return 129; /* could not start */
+ WaitForSingleObject(process_info.hProcess, INFINITE);
+ if (!GetExitCodeProcess(process_info.hProcess, &exit_code))
+ exit_code = 130; /* Could not determine exit code? */
+
+ CloseHandle(process_info.hProcess);
+ CloseHandle(process_info.hThread);
+
+ return (int)exit_code;
+}
diff --git a/compat/win32/trace2_win32_process_info.c b/compat/win32/trace2_win32_process_info.c
index a4e33768f4..3ef0936f6f 100644
--- a/compat/win32/trace2_win32_process_info.c
+++ b/compat/win32/trace2_win32_process_info.c
@@ -1,10 +1,10 @@
-#include "../../cache.h"
+#include "../../git-compat-util.h"
#include "../../json-writer.h"
#include "../../repository.h"
#include "../../trace2.h"
#include "lazyload.h"
-#include <Psapi.h>
-#include <tlHelp32.h>
+#include <psapi.h>
+#include <tlhelp32.h>
/*
* An arbitrarily chosen value to limit the size of the ancestor
diff --git a/config.c b/config.c
index 2eeb662142..2ea39295cd 100644
--- a/config.c
+++ b/config.c
@@ -8,7 +8,6 @@
#include "git-compat-util.h"
#include "abspath.h"
#include "advice.h"
-#include "alloc.h"
#include "date.h"
#include "branch.h"
#include "config.h"
@@ -25,18 +24,20 @@
#include "hashmap.h"
#include "string-list.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pager.h"
+#include "path.h"
#include "utf8.h"
#include "dir.h"
#include "color.h"
#include "replace-object.h"
#include "refs.h"
#include "setup.h"
+#include "strvec.h"
#include "trace2.h"
+#include "wildmatch.h"
#include "worktree.h"
#include "ws.h"
-#include "wrapper.h"
#include "write-or-die.h"
struct config_source {
@@ -66,78 +67,6 @@ struct config_source {
};
#define CONFIG_SOURCE_INIT { 0 }
-struct config_reader {
- /*
- * These members record the "current" config source, which can be
- * accessed by parsing callbacks.
- *
- * The "source" variable will be non-NULL only when we are actually
- * parsing a real config source (file, blob, cmdline, etc).
- *
- * The "config_kvi" variable will be non-NULL only when we are feeding
- * cached config from a configset into a callback.
- *
- * They cannot be non-NULL at the same time. If they are both NULL, then
- * we aren't parsing anything (and depending on the function looking at
- * the variables, it's either a bug for it to be called in the first
- * place, or it's a function which can be reused for non-config
- * purposes, and should fall back to some sane behavior).
- */
- struct config_source *source;
- struct key_value_info *config_kvi;
- /*
- * The "scope" of the current config source being parsed (repo, global,
- * etc). Like "source", this is only set when parsing a config source.
- * It's not part of "source" because it transcends a single file (i.e.,
- * a file included from .git/config is still in "repo" scope).
- *
- * When iterating through a configset, the equivalent value is
- * "config_kvi.scope" (see above).
- */
- enum config_scope parsing_scope;
-};
-/*
- * Where possible, prefer to accept "struct config_reader" as an arg than to use
- * "the_reader". "the_reader" should only be used if that is infeasible, e.g. in
- * a public function.
- */
-static struct config_reader the_reader;
-
-static inline void config_reader_push_source(struct config_reader *reader,
- struct config_source *top)
-{
- if (reader->config_kvi)
- BUG("source should not be set while iterating a config set");
- top->prev = reader->source;
- reader->source = top;
-}
-
-static inline struct config_source *config_reader_pop_source(struct config_reader *reader)
-{
- struct config_source *ret;
- if (!reader->source)
- BUG("tried to pop config source, but we weren't reading config");
- ret = reader->source;
- reader->source = reader->source->prev;
- return ret;
-}
-
-static inline void config_reader_set_kvi(struct config_reader *reader,
- struct key_value_info *kvi)
-{
- if (kvi && (reader->source || reader->parsing_scope))
- BUG("kvi should not be set while parsing a config source");
- reader->config_kvi = kvi;
-}
-
-static inline void config_reader_set_scope(struct config_reader *reader,
- enum config_scope scope)
-{
- if (scope && reader->config_kvi)
- BUG("scope should only be set when iterating through a config source");
- reader->parsing_scope = scope;
-}
-
static int pack_compression_seen;
static int zlib_compression_seen;
@@ -200,7 +129,6 @@ struct config_include_data {
const struct config_options *opts;
struct git_config_source *config_source;
struct repository *repo;
- struct config_reader *config_reader;
/*
* All remote URLs discovered when reading all config files.
@@ -209,7 +137,8 @@ struct config_include_data {
};
#define CONFIG_INCLUDE_INIT { 0 }
-static int git_config_include(const char *var, const char *value, void *data);
+static int git_config_include(const char *var, const char *value,
+ const struct config_context *ctx, void *data);
#define MAX_INCLUDE_DEPTH 10
static const char include_depth_advice[] = N_(
@@ -218,7 +147,8 @@ static const char include_depth_advice[] = N_(
"from\n"
" %s\n"
"This might be due to circular includes.");
-static int handle_path_include(struct config_source *cs, const char *path,
+static int handle_path_include(const struct key_value_info *kvi,
+ const char *path,
struct config_include_data *inc)
{
int ret = 0;
@@ -240,14 +170,14 @@ static int handle_path_include(struct config_source *cs, const char *path,
if (!is_absolute_path(path)) {
char *slash;
- if (!cs || !cs->path) {
+ if (!kvi || !kvi->path) {
ret = error(_("relative config includes must come from files"));
goto cleanup;
}
- slash = find_last_dir_sep(cs->path);
+ slash = find_last_dir_sep(kvi->path);
if (slash)
- strbuf_add(&buf, cs->path, slash - cs->path + 1);
+ strbuf_add(&buf, kvi->path, slash - kvi->path + 1);
strbuf_addstr(&buf, path);
path = buf.buf;
}
@@ -255,10 +185,11 @@ static int handle_path_include(struct config_source *cs, const char *path,
if (!access_or_die(path, R_OK, 0)) {
if (++inc->depth > MAX_INCLUDE_DEPTH)
die(_(include_depth_advice), MAX_INCLUDE_DEPTH, path,
- !cs ? "<unknown>" :
- cs->name ? cs->name :
+ !kvi ? "<unknown>" :
+ kvi->filename ? kvi->filename :
"the command line");
- ret = git_config_from_file(git_config_include, path, inc);
+ ret = git_config_from_file_with_options(git_config_include, path, inc,
+ kvi->scope, NULL);
inc->depth--;
}
cleanup:
@@ -273,7 +204,7 @@ static void add_trailing_starstar_for_dir(struct strbuf *pat)
strbuf_addstr(pat, "**");
}
-static int prepare_include_condition_pattern(struct config_source *cs,
+static int prepare_include_condition_pattern(const struct key_value_info *kvi,
struct strbuf *pat)
{
struct strbuf path = STRBUF_INIT;
@@ -290,11 +221,11 @@ static int prepare_include_condition_pattern(struct config_source *cs,
if (pat->buf[0] == '.' && is_dir_sep(pat->buf[1])) {
const char *slash;
- if (!cs || !cs->path)
+ if (!kvi || !kvi->path)
return error(_("relative config include "
"conditionals must come from files"));
- strbuf_realpath(&path, cs->path, 1);
+ strbuf_realpath(&path, kvi->path, 1);
slash = find_last_dir_sep(path.buf);
if (!slash)
BUG("how is this possible?");
@@ -309,7 +240,7 @@ static int prepare_include_condition_pattern(struct config_source *cs,
return prefix;
}
-static int include_by_gitdir(struct config_source *cs,
+static int include_by_gitdir(const struct key_value_info *kvi,
const struct config_options *opts,
const char *cond, size_t cond_len, int icase)
{
@@ -326,7 +257,7 @@ static int include_by_gitdir(struct config_source *cs,
strbuf_realpath(&text, git_dir, 1);
strbuf_add(&pattern, cond, cond_len);
- prefix = prepare_include_condition_pattern(cs, &pattern);
+ prefix = prepare_include_condition_pattern(kvi, &pattern);
again:
if (prefix < 0)
@@ -388,7 +319,8 @@ static int include_by_branch(const char *cond, size_t cond_len)
return ret;
}
-static int add_remote_url(const char *var, const char *value, void *data)
+static int add_remote_url(const char *var, const char *value,
+ const struct config_context *ctx UNUSED, void *data)
{
struct string_list *remote_urls = data;
const char *remote_name;
@@ -407,22 +339,17 @@ static void populate_remote_urls(struct config_include_data *inc)
{
struct config_options opts;
- enum config_scope store_scope = inc->config_reader->parsing_scope;
-
opts = *inc->opts;
opts.unconditional_remote_url = 1;
- config_reader_set_scope(inc->config_reader, 0);
-
inc->remote_urls = xmalloc(sizeof(*inc->remote_urls));
string_list_init_dup(inc->remote_urls);
config_with_options(add_remote_url, inc->remote_urls,
inc->config_source, inc->repo, &opts);
-
- config_reader_set_scope(inc->config_reader, store_scope);
}
static int forbid_remote_url(const char *var, const char *value UNUSED,
+ const struct config_context *ctx UNUSED,
void *data UNUSED)
{
const char *remote_name;
@@ -466,16 +393,16 @@ static int include_by_remote_url(struct config_include_data *inc,
inc->remote_urls);
}
-static int include_condition_is_true(struct config_source *cs,
+static int include_condition_is_true(const struct key_value_info *kvi,
struct config_include_data *inc,
const char *cond, size_t cond_len)
{
const struct config_options *opts = inc->opts;
if (skip_prefix_mem(cond, cond_len, "gitdir:", &cond, &cond_len))
- return include_by_gitdir(cs, opts, cond, cond_len, 0);
+ return include_by_gitdir(kvi, opts, cond, cond_len, 0);
else if (skip_prefix_mem(cond, cond_len, "gitdir/i:", &cond, &cond_len))
- return include_by_gitdir(cs, opts, cond, cond_len, 1);
+ return include_by_gitdir(kvi, opts, cond, cond_len, 1);
else if (skip_prefix_mem(cond, cond_len, "onbranch:", &cond, &cond_len))
return include_by_branch(cond, cond_len);
else if (skip_prefix_mem(cond, cond_len, "hasconfig:remote.*.url:", &cond,
@@ -486,10 +413,11 @@ static int include_condition_is_true(struct config_source *cs,
return 0;
}
-static int git_config_include(const char *var, const char *value, void *data)
+static int git_config_include(const char *var, const char *value,
+ const struct config_context *ctx,
+ void *data)
{
struct config_include_data *inc = data;
- struct config_source *cs = inc->config_reader->source;
const char *cond, *key;
size_t cond_len;
int ret;
@@ -498,21 +426,21 @@ static int git_config_include(const char *var, const char *value, void *data)
* Pass along all values, including "include" directives; this makes it
* possible to query information on the includes themselves.
*/
- ret = inc->fn(var, value, inc->data);
+ ret = inc->fn(var, value, ctx, inc->data);
if (ret < 0)
return ret;
if (!strcmp(var, "include.path"))
- ret = handle_path_include(cs, value, inc);
+ ret = handle_path_include(ctx->kvi, value, inc);
if (!parse_config_key(var, "includeif", &cond, &cond_len, &key) &&
- cond && include_condition_is_true(cs, inc, cond, cond_len) &&
+ cond && include_condition_is_true(ctx->kvi, inc, cond, cond_len) &&
!strcmp(key, "path")) {
config_fn_t old_fn = inc->fn;
if (inc->opts->unconditional_remote_url)
inc->fn = forbid_remote_url;
- ret = handle_path_include(cs, value, inc);
+ ret = handle_path_include(ctx->kvi, value, inc);
inc->fn = old_fn;
}
@@ -670,27 +598,45 @@ out_free_ret_1:
}
static int config_parse_pair(const char *key, const char *value,
- config_fn_t fn, void *data)
+ struct key_value_info *kvi,
+ config_fn_t fn, void *data)
{
char *canonical_name;
int ret;
+ struct config_context ctx = {
+ .kvi = kvi,
+ };
if (!strlen(key))
return error(_("empty config key"));
if (git_config_parse_key(key, &canonical_name, NULL))
return -1;
- ret = (fn(canonical_name, value, data) < 0) ? -1 : 0;
+ ret = (fn(canonical_name, value, &ctx, data) < 0) ? -1 : 0;
free(canonical_name);
return ret;
}
+
+/* for values read from `git_config_from_parameters()` */
+void kvi_from_param(struct key_value_info *out)
+{
+ out->filename = NULL;
+ out->linenr = -1;
+ out->origin_type = CONFIG_ORIGIN_CMDLINE;
+ out->scope = CONFIG_SCOPE_COMMAND;
+ out->path = NULL;
+}
+
int git_config_parse_parameter(const char *text,
config_fn_t fn, void *data)
{
const char *value;
struct strbuf **pair;
int ret;
+ struct key_value_info kvi = KVI_INIT;
+
+ kvi_from_param(&kvi);
pair = strbuf_split_str(text, '=', 2);
if (!pair[0])
@@ -709,12 +655,13 @@ int git_config_parse_parameter(const char *text,
return error(_("bogus config parameter: %s"), text);
}
- ret = config_parse_pair(pair[0]->buf, value, fn, data);
+ ret = config_parse_pair(pair[0]->buf, value, &kvi, fn, data);
strbuf_list_free(pair);
return ret;
}
-static int parse_config_env_list(char *env, config_fn_t fn, void *data)
+static int parse_config_env_list(char *env, struct key_value_info *kvi,
+ config_fn_t fn, void *data)
{
char *cur = env;
while (cur && *cur) {
@@ -748,7 +695,7 @@ static int parse_config_env_list(char *env, config_fn_t fn, void *data)
CONFIG_DATA_ENVIRONMENT);
}
- if (config_parse_pair(key, value, fn, data) < 0)
+ if (config_parse_pair(key, value, kvi, fn, data) < 0)
return -1;
}
else {
@@ -772,11 +719,9 @@ int git_config_from_parameters(config_fn_t fn, void *data)
struct strvec to_free = STRVEC_INIT;
int ret = 0;
char *envw = NULL;
- struct config_source source = CONFIG_SOURCE_INIT;
-
- source.origin_type = CONFIG_ORIGIN_CMDLINE;
- config_reader_push_source(&the_reader, &source);
+ struct key_value_info kvi = KVI_INIT;
+ kvi_from_param(&kvi);
env = getenv(CONFIG_COUNT_ENVIRONMENT);
if (env) {
unsigned long count;
@@ -812,7 +757,7 @@ int git_config_from_parameters(config_fn_t fn, void *data)
}
strbuf_reset(&envvar);
- if (config_parse_pair(key, value, fn, data) < 0) {
+ if (config_parse_pair(key, value, &kvi, fn, data) < 0) {
ret = -1;
goto out;
}
@@ -823,7 +768,7 @@ int git_config_from_parameters(config_fn_t fn, void *data)
if (env) {
/* sq_dequote will write over it */
envw = xstrdup(env);
- if (parse_config_env_list(envw, fn, data) < 0) {
+ if (parse_config_env_list(envw, &kvi, fn, data) < 0) {
ret = -1;
goto out;
}
@@ -833,7 +778,6 @@ out:
strbuf_release(&envvar);
strvec_clear(&to_free);
free(envw);
- config_reader_pop_source(&the_reader);
return ret;
}
@@ -934,12 +878,15 @@ static char *parse_value(struct config_source *cs)
}
}
-static int get_value(struct config_source *cs, config_fn_t fn, void *data,
- struct strbuf *name)
+static int get_value(struct config_source *cs, struct key_value_info *kvi,
+ config_fn_t fn, void *data, struct strbuf *name)
{
int c;
char *value;
int ret;
+ struct config_context ctx = {
+ .kvi = kvi,
+ };
/* Get the full name */
for (;;) {
@@ -968,7 +915,8 @@ static int get_value(struct config_source *cs, config_fn_t fn, void *data,
* accurate line number in error messages.
*/
cs->linenr--;
- ret = fn(name->buf, value, data);
+ kvi->linenr = cs->linenr;
+ ret = fn(name->buf, value, &ctx, data);
if (ret >= 0)
cs->linenr++;
return ret;
@@ -1058,7 +1006,7 @@ static int do_event(struct config_source *cs, enum config_event_t type,
if (data->previous_type != CONFIG_EVENT_EOF &&
data->opts->event_fn(data->previous_type, data->previous_offset,
- offset, data->opts->event_fn_data) < 0)
+ offset, cs, data->opts->event_fn_data) < 0)
return -1;
data->previous_type = type;
@@ -1067,8 +1015,20 @@ static int do_event(struct config_source *cs, enum config_event_t type,
return 0;
}
+static void kvi_from_source(struct config_source *cs,
+ enum config_scope scope,
+ struct key_value_info *out)
+{
+ out->filename = strintern(cs->name);
+ out->origin_type = cs->origin_type;
+ out->linenr = cs->linenr;
+ out->scope = scope;
+ out->path = cs->path;
+}
+
static int git_parse_source(struct config_source *cs, config_fn_t fn,
- void *data, const struct config_options *opts)
+ struct key_value_info *kvi, void *data,
+ const struct config_options *opts)
{
int comment = 0;
size_t baselen = 0;
@@ -1152,7 +1112,7 @@ static int git_parse_source(struct config_source *cs, config_fn_t fn,
*/
strbuf_setlen(var, baselen);
strbuf_addch(var, tolower(c));
- if (get_value(cs, fn, data, var) < 0)
+ if (get_value(cs, kvi, fn, data, var) < 0)
break;
}
@@ -1328,80 +1288,78 @@ int git_parse_ssize_t(const char *value, ssize_t *ret)
return 1;
}
-static int reader_config_name(struct config_reader *reader, const char **out);
-static int reader_origin_type(struct config_reader *reader,
- enum config_origin_type *type);
NORETURN
-static void die_bad_number(struct config_reader *reader, const char *name,
- const char *value)
+static void die_bad_number(const char *name, const char *value,
+ const struct key_value_info *kvi)
{
const char *error_type = (errno == ERANGE) ?
N_("out of range") : N_("invalid unit");
const char *bad_numeric = N_("bad numeric config value '%s' for '%s': %s");
- const char *config_name = NULL;
- enum config_origin_type config_origin = CONFIG_ORIGIN_UNKNOWN;
+
+ if (!kvi)
+ BUG("kvi should not be NULL");
if (!value)
value = "";
- /* Ignoring the return value is okay since we handle missing values. */
- reader_config_name(reader, &config_name);
- reader_origin_type(reader, &config_origin);
-
- if (!config_name)
+ if (!kvi->filename)
die(_(bad_numeric), value, name, _(error_type));
- switch (config_origin) {
+ switch (kvi->origin_type) {
case CONFIG_ORIGIN_BLOB:
die(_("bad numeric config value '%s' for '%s' in blob %s: %s"),
- value, name, config_name, _(error_type));
+ value, name, kvi->filename, _(error_type));
case CONFIG_ORIGIN_FILE:
die(_("bad numeric config value '%s' for '%s' in file %s: %s"),
- value, name, config_name, _(error_type));
+ value, name, kvi->filename, _(error_type));
case CONFIG_ORIGIN_STDIN:
die(_("bad numeric config value '%s' for '%s' in standard input: %s"),
value, name, _(error_type));
case CONFIG_ORIGIN_SUBMODULE_BLOB:
die(_("bad numeric config value '%s' for '%s' in submodule-blob %s: %s"),
- value, name, config_name, _(error_type));
+ value, name, kvi->filename, _(error_type));
case CONFIG_ORIGIN_CMDLINE:
die(_("bad numeric config value '%s' for '%s' in command line %s: %s"),
- value, name, config_name, _(error_type));
+ value, name, kvi->filename, _(error_type));
default:
die(_("bad numeric config value '%s' for '%s' in %s: %s"),
- value, name, config_name, _(error_type));
+ value, name, kvi->filename, _(error_type));
}
}
-int git_config_int(const char *name, const char *value)
+int git_config_int(const char *name, const char *value,
+ const struct key_value_info *kvi)
{
int ret;
if (!git_parse_int(value, &ret))
- die_bad_number(&the_reader, name, value);
+ die_bad_number(name, value, kvi);
return ret;
}
-int64_t git_config_int64(const char *name, const char *value)
+int64_t git_config_int64(const char *name, const char *value,
+ const struct key_value_info *kvi)
{
int64_t ret;
if (!git_parse_int64(value, &ret))
- die_bad_number(&the_reader, name, value);
+ die_bad_number(name, value, kvi);
return ret;
}
-unsigned long git_config_ulong(const char *name, const char *value)
+unsigned long git_config_ulong(const char *name, const char *value,
+ const struct key_value_info *kvi)
{
unsigned long ret;
if (!git_parse_ulong(value, &ret))
- die_bad_number(&the_reader, name, value);
+ die_bad_number(name, value, kvi);
return ret;
}
-ssize_t git_config_ssize_t(const char *name, const char *value)
+ssize_t git_config_ssize_t(const char *name, const char *value,
+ const struct key_value_info *kvi)
{
ssize_t ret;
if (!git_parse_ssize_t(value, &ret))
- die_bad_number(&the_reader, name, value);
+ die_bad_number(name, value, kvi);
return ret;
}
@@ -1506,7 +1464,8 @@ int git_parse_maybe_bool(const char *value)
return -1;
}
-int git_config_bool_or_int(const char *name, const char *value, int *is_bool)
+int git_config_bool_or_int(const char *name, const char *value,
+ const struct key_value_info *kvi, int *is_bool)
{
int v = git_parse_maybe_bool_text(value);
if (0 <= v) {
@@ -1514,7 +1473,7 @@ int git_config_bool_or_int(const char *name, const char *value, int *is_bool)
return v;
}
*is_bool = 0;
- return git_config_int(name, value);
+ return git_config_int(name, value, kvi);
}
int git_config_bool(const char *name, const char *value)
@@ -1562,7 +1521,8 @@ int git_config_color(char *dest, const char *var, const char *value)
return 0;
}
-static int git_default_core_config(const char *var, const char *value, void *cb)
+static int git_default_core_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
/* This needs a better name */
if (!strcmp(var, "core.filemode")) {
@@ -1639,7 +1599,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
else if (!git_parse_maybe_bool_text(value))
default_abbrev = the_hash_algo->hexsz;
else {
- int abbrev = git_config_int(var, value);
+ int abbrev = git_config_int(var, value, ctx->kvi);
if (abbrev < minimum_abbrev || abbrev > the_hash_algo->hexsz)
return error(_("abbrev length out of range: %d"), abbrev);
default_abbrev = abbrev;
@@ -1651,7 +1611,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
return set_disambiguate_hint_config(var, value);
if (!strcmp(var, "core.loosecompression")) {
- int level = git_config_int(var, value);
+ int level = git_config_int(var, value, ctx->kvi);
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
@@ -1662,7 +1622,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
}
if (!strcmp(var, "core.compression")) {
- int level = git_config_int(var, value);
+ int level = git_config_int(var, value, ctx->kvi);
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
@@ -1676,7 +1636,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "core.packedgitwindowsize")) {
int pgsz_x2 = getpagesize() * 2;
- packed_git_window_size = git_config_ulong(var, value);
+ packed_git_window_size = git_config_ulong(var, value, ctx->kvi);
/* This value must be multiple of (pagesize * 2) */
packed_git_window_size /= pgsz_x2;
@@ -1687,17 +1647,17 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
}
if (!strcmp(var, "core.bigfilethreshold")) {
- big_file_threshold = git_config_ulong(var, value);
+ big_file_threshold = git_config_ulong(var, value, ctx->kvi);
return 0;
}
if (!strcmp(var, "core.packedgitlimit")) {
- packed_git_limit = git_config_ulong(var, value);
+ packed_git_limit = git_config_ulong(var, value, ctx->kvi);
return 0;
}
if (!strcmp(var, "core.deltabasecachelimit")) {
- delta_base_cache_limit = git_config_ulong(var, value);
+ delta_base_cache_limit = git_config_ulong(var, value, ctx->kvi);
return 0;
}
@@ -1841,8 +1801,13 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
return 0;
}
+ if (!strcmp(var, "core.maxtreedepth")) {
+ max_allowed_tree_depth = git_config_int(var, value, ctx->kvi);
+ return 0;
+ }
+
/* Add other config variables here and to Documentation/config.txt. */
- return platform_core_config(var, value, cb);
+ return platform_core_config(var, value, ctx, cb);
}
static int git_default_sparse_config(const char *var, const char *value)
@@ -1944,15 +1909,16 @@ static int git_default_mailmap_config(const char *var, const char *value)
return 0;
}
-int git_default_config(const char *var, const char *value, void *cb)
+int git_default_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (starts_with(var, "core."))
- return git_default_core_config(var, value, cb);
+ return git_default_core_config(var, value, ctx, cb);
if (starts_with(var, "user.") ||
starts_with(var, "author.") ||
starts_with(var, "committer."))
- return git_ident_config(var, value, cb);
+ return git_ident_config(var, value, ctx, cb);
if (starts_with(var, "i18n."))
return git_default_i18n_config(var, value);
@@ -1975,12 +1941,12 @@ int git_default_config(const char *var, const char *value, void *cb)
}
if (!strcmp(var, "pack.packsizelimit")) {
- pack_size_limit_cfg = git_config_ulong(var, value);
+ pack_size_limit_cfg = git_config_ulong(var, value, ctx->kvi);
return 0;
}
if (!strcmp(var, "pack.compression")) {
- int level = git_config_int(var, value);
+ int level = git_config_int(var, value, ctx->kvi);
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
@@ -2002,10 +1968,11 @@ int git_default_config(const char *var, const char *value, void *cb)
* fgetc, ungetc, ftell of top need to be initialized before calling
* this function.
*/
-static int do_config_from(struct config_reader *reader,
- struct config_source *top, config_fn_t fn, void *data,
+static int do_config_from(struct config_source *top, config_fn_t fn,
+ void *data, enum config_scope scope,
const struct config_options *opts)
{
+ struct key_value_info kvi = KVI_INIT;
int ret;
/* push config-file parsing state stack */
@@ -2014,23 +1981,21 @@ static int do_config_from(struct config_reader *reader,
top->total_len = 0;
strbuf_init(&top->value, 1024);
strbuf_init(&top->var, 1024);
- config_reader_push_source(reader, top);
+ kvi_from_source(top, scope, &kvi);
- ret = git_parse_source(top, fn, data, opts);
+ ret = git_parse_source(top, fn, &kvi, data, opts);
- /* pop config-file parsing state stack */
strbuf_release(&top->value);
strbuf_release(&top->var);
- config_reader_pop_source(reader);
return ret;
}
-static int do_config_from_file(struct config_reader *reader,
- config_fn_t fn,
+static int do_config_from_file(config_fn_t fn,
const enum config_origin_type origin_type,
const char *name, const char *path, FILE *f,
- void *data, const struct config_options *opts)
+ void *data, enum config_scope scope,
+ const struct config_options *opts)
{
struct config_source top = CONFIG_SOURCE_INIT;
int ret;
@@ -2045,19 +2010,20 @@ static int do_config_from_file(struct config_reader *reader,
top.do_ftell = config_file_ftell;
flockfile(f);
- ret = do_config_from(reader, &top, fn, data, opts);
+ ret = do_config_from(&top, fn, data, scope, opts);
funlockfile(f);
return ret;
}
-static int git_config_from_stdin(config_fn_t fn, void *data)
+static int git_config_from_stdin(config_fn_t fn, void *data,
+ enum config_scope scope)
{
- return do_config_from_file(&the_reader, fn, CONFIG_ORIGIN_STDIN, "",
- NULL, stdin, data, NULL);
+ return do_config_from_file(fn, CONFIG_ORIGIN_STDIN, "", NULL, stdin,
+ data, scope, NULL);
}
int git_config_from_file_with_options(config_fn_t fn, const char *filename,
- void *data,
+ void *data, enum config_scope scope,
const struct config_options *opts)
{
int ret = -1;
@@ -2067,8 +2033,8 @@ int git_config_from_file_with_options(config_fn_t fn, const char *filename,
BUG("filename cannot be NULL");
f = fopen_or_warn(filename, "r");
if (f) {
- ret = do_config_from_file(&the_reader, fn, CONFIG_ORIGIN_FILE,
- filename, filename, f, data, opts);
+ ret = do_config_from_file(fn, CONFIG_ORIGIN_FILE, filename,
+ filename, f, data, scope, opts);
fclose(f);
}
return ret;
@@ -2076,13 +2042,15 @@ int git_config_from_file_with_options(config_fn_t fn, const char *filename,
int git_config_from_file(config_fn_t fn, const char *filename, void *data)
{
- return git_config_from_file_with_options(fn, filename, data, NULL);
+ return git_config_from_file_with_options(fn, filename, data,
+ CONFIG_SCOPE_UNKNOWN, NULL);
}
int git_config_from_mem(config_fn_t fn,
const enum config_origin_type origin_type,
const char *name, const char *buf, size_t len,
- void *data, const struct config_options *opts)
+ void *data, enum config_scope scope,
+ const struct config_options *opts)
{
struct config_source top = CONFIG_SOURCE_INIT;
@@ -2097,14 +2065,15 @@ int git_config_from_mem(config_fn_t fn,
top.do_ungetc = config_buf_ungetc;
top.do_ftell = config_buf_ftell;
- return do_config_from(&the_reader, &top, fn, data, opts);
+ return do_config_from(&top, fn, data, scope, opts);
}
int git_config_from_blob_oid(config_fn_t fn,
const char *name,
struct repository *repo,
const struct object_id *oid,
- void *data)
+ void *data,
+ enum config_scope scope)
{
enum object_type type;
char *buf;
@@ -2120,7 +2089,7 @@ int git_config_from_blob_oid(config_fn_t fn,
}
ret = git_config_from_mem(fn, CONFIG_ORIGIN_BLOB, name, buf, size,
- data, NULL);
+ data, scope, NULL);
free(buf);
return ret;
@@ -2129,13 +2098,14 @@ int git_config_from_blob_oid(config_fn_t fn,
static int git_config_from_blob_ref(config_fn_t fn,
struct repository *repo,
const char *name,
- void *data)
+ void *data,
+ enum config_scope scope)
{
struct object_id oid;
if (repo_get_oid(repo, name, &oid) < 0)
return error(_("unable to resolve config blob '%s'"), name);
- return git_config_from_blob_oid(fn, name, repo, &oid, data);
+ return git_config_from_blob_oid(fn, name, repo, &oid, data, scope);
}
char *git_system_config(void)
@@ -2188,8 +2158,7 @@ int git_config_system(void)
return !git_env_bool("GIT_CONFIG_NOSYSTEM", 0);
}
-static int do_git_config_sequence(struct config_reader *reader,
- const struct config_options *opts,
+static int do_git_config_sequence(const struct config_options *opts,
const struct repository *repo,
config_fn_t fn, void *data)
{
@@ -2199,7 +2168,6 @@ static int do_git_config_sequence(struct config_reader *reader,
char *user_config = NULL;
char *repo_config;
char *worktree_config;
- enum config_scope prev_parsing_scope = reader->parsing_scope;
/*
* Ensure that either:
@@ -2217,38 +2185,39 @@ static int do_git_config_sequence(struct config_reader *reader,
worktree_config = NULL;
}
- config_reader_set_scope(reader, CONFIG_SCOPE_SYSTEM);
if (git_config_system() && system_config &&
!access_or_die(system_config, R_OK,
opts->system_gently ? ACCESS_EACCES_OK : 0))
- ret += git_config_from_file(fn, system_config, data);
+ ret += git_config_from_file_with_options(fn, system_config,
+ data, CONFIG_SCOPE_SYSTEM,
+ NULL);
- config_reader_set_scope(reader, CONFIG_SCOPE_GLOBAL);
git_global_config(&user_config, &xdg_config);
if (xdg_config && !access_or_die(xdg_config, R_OK, ACCESS_EACCES_OK))
- ret += git_config_from_file(fn, xdg_config, data);
+ ret += git_config_from_file_with_options(fn, xdg_config, data,
+ CONFIG_SCOPE_GLOBAL, NULL);
if (user_config && !access_or_die(user_config, R_OK, ACCESS_EACCES_OK))
- ret += git_config_from_file(fn, user_config, data);
+ ret += git_config_from_file_with_options(fn, user_config, data,
+ CONFIG_SCOPE_GLOBAL, NULL);
- config_reader_set_scope(reader, CONFIG_SCOPE_LOCAL);
if (!opts->ignore_repo && repo_config &&
!access_or_die(repo_config, R_OK, 0))
- ret += git_config_from_file(fn, repo_config, data);
+ ret += git_config_from_file_with_options(fn, repo_config, data,
+ CONFIG_SCOPE_LOCAL, NULL);
- config_reader_set_scope(reader, CONFIG_SCOPE_WORKTREE);
if (!opts->ignore_worktree && worktree_config &&
repo && repo->repository_format_worktree_config &&
!access_or_die(worktree_config, R_OK, 0)) {
- ret += git_config_from_file(fn, worktree_config, data);
+ ret += git_config_from_file_with_options(fn, worktree_config, data,
+ CONFIG_SCOPE_WORKTREE,
+ NULL);
}
- config_reader_set_scope(reader, CONFIG_SCOPE_COMMAND);
if (!opts->ignore_cmdline && git_config_from_parameters(fn, data) < 0)
die(_("unable to parse command-line config"));
- config_reader_set_scope(reader, prev_parsing_scope);
free(system_config);
free(xdg_config);
free(user_config);
@@ -2263,7 +2232,6 @@ int config_with_options(config_fn_t fn, void *data,
const struct config_options *opts)
{
struct config_include_data inc = CONFIG_INCLUDE_INIT;
- enum config_scope prev_scope = the_reader.parsing_scope;
int ret;
if (opts->respect_includes) {
@@ -2272,58 +2240,52 @@ int config_with_options(config_fn_t fn, void *data,
inc.opts = opts;
inc.repo = repo;
inc.config_source = config_source;
- inc.config_reader = &the_reader;
fn = git_config_include;
data = &inc;
}
- if (config_source)
- config_reader_set_scope(&the_reader, config_source->scope);
-
/*
* If we have a specific filename, use it. Otherwise, follow the
* regular lookup sequence.
*/
if (config_source && config_source->use_stdin) {
- ret = git_config_from_stdin(fn, data);
+ ret = git_config_from_stdin(fn, data, config_source->scope);
} else if (config_source && config_source->file) {
- ret = git_config_from_file(fn, config_source->file, data);
+ ret = git_config_from_file_with_options(fn, config_source->file,
+ data, config_source->scope,
+ NULL);
} else if (config_source && config_source->blob) {
ret = git_config_from_blob_ref(fn, repo, config_source->blob,
- data);
+ data, config_source->scope);
} else {
- ret = do_git_config_sequence(&the_reader, opts, repo, fn, data);
+ ret = do_git_config_sequence(opts, repo, fn, data);
}
if (inc.remote_urls) {
string_list_clear(inc.remote_urls, 0);
FREE_AND_NULL(inc.remote_urls);
}
- config_reader_set_scope(&the_reader, prev_scope);
return ret;
}
-static void configset_iter(struct config_reader *reader, struct config_set *set,
- config_fn_t fn, void *data)
+static void configset_iter(struct config_set *set, config_fn_t fn, void *data)
{
int i, value_index;
struct string_list *values;
struct config_set_element *entry;
struct configset_list *list = &set->list;
+ struct config_context ctx = CONFIG_CONTEXT_INIT;
for (i = 0; i < list->nr; i++) {
entry = list->items[i].e;
value_index = list->items[i].value_index;
values = &entry->value_list;
- config_reader_set_kvi(reader, values->items[value_index].util);
-
- if (fn(entry->key, values->items[value_index].string, data) < 0)
+ ctx.kvi = values->items[value_index].util;
+ if (fn(entry->key, values->items[value_index].string, &ctx, data) < 0)
git_die_config_linenr(entry->key,
- reader->config_kvi->filename,
- reader->config_kvi->linenr);
-
- config_reader_set_kvi(reader, NULL);
+ ctx.kvi->filename,
+ ctx.kvi->linenr);
}
}
@@ -2399,7 +2361,7 @@ static int configset_find_element(struct config_set *set, const char *key,
return 0;
}
-static int configset_add_value(struct config_reader *reader,
+static int configset_add_value(const struct key_value_info *kvi_p,
struct config_set *set, const char *key,
const char *value)
{
@@ -2430,19 +2392,7 @@ static int configset_add_value(struct config_reader *reader,
l_item->e = e;
l_item->value_index = e->value_list.nr - 1;
- if (!reader->source)
- BUG("configset_add_value has no source");
- if (reader->source->name) {
- kv_info->filename = strintern(reader->source->name);
- kv_info->linenr = reader->source->linenr;
- kv_info->origin_type = reader->source->origin_type;
- } else {
- /* for values read from `git_config_from_parameters()` */
- kv_info->filename = NULL;
- kv_info->linenr = -1;
- kv_info->origin_type = CONFIG_ORIGIN_CMDLINE;
- }
- kv_info->scope = reader->parsing_scope;
+ *kv_info = *kvi_p;
si->util = kv_info;
return 0;
@@ -2490,32 +2440,26 @@ void git_configset_clear(struct config_set *set)
set->list.items = NULL;
}
-struct configset_add_data {
- struct config_set *config_set;
- struct config_reader *config_reader;
-};
-#define CONFIGSET_ADD_INIT { 0 }
-
-static int config_set_callback(const char *key, const char *value, void *cb)
+static int config_set_callback(const char *key, const char *value,
+ const struct config_context *ctx,
+ void *cb)
{
- struct configset_add_data *data = cb;
- configset_add_value(data->config_reader, data->config_set, key, value);
+ struct config_set *set = cb;
+ configset_add_value(ctx->kvi, set, key, value);
return 0;
}
int git_configset_add_file(struct config_set *set, const char *filename)
{
- struct configset_add_data data = CONFIGSET_ADD_INIT;
- data.config_reader = &the_reader;
- data.config_set = set;
- return git_config_from_file(config_set_callback, filename, &data);
+ return git_config_from_file(config_set_callback, filename, set);
}
-int git_configset_get_value(struct config_set *set, const char *key, const char **value)
+int git_configset_get_value(struct config_set *set, const char *key,
+ const char **value, struct key_value_info *kvi)
{
const struct string_list *values = NULL;
int ret;
-
+ struct string_list_item item;
/*
* Follows "last one wins" semantic, i.e., if there are multiple matches for the
* queried key in the files of the configset, the value returned will be the last
@@ -2525,7 +2469,10 @@ int git_configset_get_value(struct config_set *set, const char *key, const char
return ret;
assert(values->nr > 0);
- *value = values->items[values->nr - 1].string;
+ item = values->items[values->nr - 1];
+ *value = item.string;
+ if (kvi)
+ *kvi = *((struct key_value_info *)item.util);
return 0;
}
@@ -2578,7 +2525,7 @@ int git_configset_get(struct config_set *set, const char *key)
int git_configset_get_string(struct config_set *set, const char *key, char **dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value))
+ if (!git_configset_get_value(set, key, &value, NULL))
return git_config_string((const char **)dest, key, value);
else
return 1;
@@ -2588,7 +2535,7 @@ static int git_configset_get_string_tmp(struct config_set *set, const char *key,
const char **dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value)) {
+ if (!git_configset_get_value(set, key, &value, NULL)) {
if (!value)
return config_error_nonbool(key);
*dest = value;
@@ -2601,8 +2548,10 @@ static int git_configset_get_string_tmp(struct config_set *set, const char *key,
int git_configset_get_int(struct config_set *set, const char *key, int *dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value)) {
- *dest = git_config_int(key, value);
+ struct key_value_info kvi;
+
+ if (!git_configset_get_value(set, key, &value, &kvi)) {
+ *dest = git_config_int(key, value, &kvi);
return 0;
} else
return 1;
@@ -2611,8 +2560,10 @@ int git_configset_get_int(struct config_set *set, const char *key, int *dest)
int git_configset_get_ulong(struct config_set *set, const char *key, unsigned long *dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value)) {
- *dest = git_config_ulong(key, value);
+ struct key_value_info kvi;
+
+ if (!git_configset_get_value(set, key, &value, &kvi)) {
+ *dest = git_config_ulong(key, value, &kvi);
return 0;
} else
return 1;
@@ -2621,7 +2572,7 @@ int git_configset_get_ulong(struct config_set *set, const char *key, unsigned lo
int git_configset_get_bool(struct config_set *set, const char *key, int *dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value)) {
+ if (!git_configset_get_value(set, key, &value, NULL)) {
*dest = git_config_bool(key, value);
return 0;
} else
@@ -2632,8 +2583,10 @@ int git_configset_get_bool_or_int(struct config_set *set, const char *key,
int *is_bool, int *dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value)) {
- *dest = git_config_bool_or_int(key, value, is_bool);
+ struct key_value_info kvi;
+
+ if (!git_configset_get_value(set, key, &value, &kvi)) {
+ *dest = git_config_bool_or_int(key, value, &kvi, is_bool);
return 0;
} else
return 1;
@@ -2642,7 +2595,7 @@ int git_configset_get_bool_or_int(struct config_set *set, const char *key,
int git_configset_get_maybe_bool(struct config_set *set, const char *key, int *dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value)) {
+ if (!git_configset_get_value(set, key, &value, NULL)) {
*dest = git_parse_maybe_bool(value);
if (*dest == -1)
return -1;
@@ -2654,7 +2607,7 @@ int git_configset_get_maybe_bool(struct config_set *set, const char *key, int *d
int git_configset_get_pathname(struct config_set *set, const char *key, const char **dest)
{
const char *value;
- if (!git_configset_get_value(set, key, &value))
+ if (!git_configset_get_value(set, key, &value, NULL))
return git_config_pathname(dest, key, value);
else
return 1;
@@ -2664,7 +2617,6 @@ int git_configset_get_pathname(struct config_set *set, const char *key, const ch
static void repo_read_config(struct repository *repo)
{
struct config_options opts = { 0 };
- struct configset_add_data data = CONFIGSET_ADD_INIT;
opts.respect_includes = 1;
opts.commondir = repo->commondir;
@@ -2676,10 +2628,8 @@ static void repo_read_config(struct repository *repo)
git_configset_clear(repo->config);
git_configset_init(repo->config);
- data.config_set = repo->config;
- data.config_reader = &the_reader;
-
- if (config_with_options(config_set_callback, &data, NULL, repo, &opts) < 0)
+ if (config_with_options(config_set_callback, repo->config, NULL,
+ repo, &opts) < 0)
/*
* config_with_options() normally returns only
* zero, as most errors are fatal, and
@@ -2711,7 +2661,7 @@ static void repo_config_clear(struct repository *repo)
void repo_config(struct repository *repo, config_fn_t fn, void *data)
{
git_config_check_init(repo);
- configset_iter(&the_reader, repo->config, fn, data);
+ configset_iter(repo->config, fn, data);
}
int repo_config_get(struct repository *repo, const char *key)
@@ -2724,7 +2674,7 @@ int repo_config_get_value(struct repository *repo,
const char *key, const char **value)
{
git_config_check_init(repo);
- return git_configset_get_value(repo->config, key, value);
+ return git_configset_get_value(repo->config, key, value, NULL);
}
int repo_config_get_value_multi(struct repository *repo, const char *key,
@@ -2818,19 +2768,17 @@ static void read_protected_config(void)
.ignore_worktree = 1,
.system_gently = 1,
};
- struct configset_add_data data = CONFIGSET_ADD_INIT;
git_configset_init(&protected_config);
- data.config_set = &protected_config;
- data.config_reader = &the_reader;
- config_with_options(config_set_callback, &data, NULL, NULL, &opts);
+ config_with_options(config_set_callback, &protected_config, NULL,
+ NULL, &opts);
}
void git_protected_config(config_fn_t fn, void *data)
{
if (!protected_config.hash_initialized)
read_protected_config();
- configset_iter(&the_reader, &protected_config, fn, data);
+ configset_iter(&protected_config, fn, data);
}
/* Functions used historically to read configuration from 'the_repository' */
@@ -3020,7 +2968,6 @@ void git_die_config(const char *key, const char *err, ...)
*/
struct config_store_data {
- struct config_reader *config_reader;
size_t baselen;
char *key;
int do_not_match;
@@ -3066,11 +3013,10 @@ static int matches(const char *key, const char *value,
(value && !regexec(store->value_pattern, value, 0, NULL, 0));
}
-static int store_aux_event(enum config_event_t type,
- size_t begin, size_t end, void *data)
+static int store_aux_event(enum config_event_t type, size_t begin, size_t end,
+ struct config_source *cs, void *data)
{
struct config_store_data *store = data;
- struct config_source *cs = store->config_reader->source;
ALLOC_GROW(store->parsed, store->parsed_nr + 1, store->parsed_alloc);
store->parsed[store->parsed_nr].begin = begin;
@@ -3106,7 +3052,8 @@ static int store_aux_event(enum config_event_t type,
return 0;
}
-static int store_aux(const char *key, const char *value, void *cb)
+static int store_aux(const char *key, const char *value,
+ const struct config_context *ctx UNUSED, void *cb)
{
struct config_store_data *store = cb;
@@ -3390,8 +3337,6 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,
size_t contents_sz;
struct config_store_data store = CONFIG_STORE_INIT;
- store.config_reader = &the_reader;
-
/* parse-key returns negative; flip the sign to feed exit(3) */
ret = 0 - git_config_parse_key(key, &store.key, &store.baselen);
if (ret)
@@ -3480,7 +3425,8 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,
*/
if (git_config_from_file_with_options(store_aux,
config_filename,
- &store, &opts)) {
+ &store, CONFIG_SCOPE_UNKNOWN,
+ &opts)) {
error(_("invalid config file %s"), config_filename);
ret = CONFIG_INVALID_FILE;
goto out_free;
@@ -3962,25 +3908,8 @@ int parse_config_key(const char *var,
return 0;
}
-static int reader_origin_type(struct config_reader *reader,
- enum config_origin_type *type)
+const char *config_origin_type_name(enum config_origin_type type)
{
- if (the_reader.config_kvi)
- *type = reader->config_kvi->origin_type;
- else if(the_reader.source)
- *type = reader->source->origin_type;
- else
- return 1;
- return 0;
-}
-
-const char *current_config_origin_type(void)
-{
- enum config_origin_type type = CONFIG_ORIGIN_UNKNOWN;
-
- if (reader_origin_type(&the_reader, &type))
- BUG("current_config_origin_type called outside config callback");
-
switch (type) {
case CONFIG_ORIGIN_BLOB:
return "blob";
@@ -4017,41 +3946,6 @@ const char *config_scope_name(enum config_scope scope)
}
}
-static int reader_config_name(struct config_reader *reader, const char **out)
-{
- if (the_reader.config_kvi)
- *out = reader->config_kvi->filename;
- else if (the_reader.source)
- *out = reader->source->name;
- else
- return 1;
- return 0;
-}
-
-const char *current_config_name(void)
-{
- const char *name;
- if (reader_config_name(&the_reader, &name))
- BUG("current_config_name called outside config callback");
- return name ? name : "";
-}
-
-enum config_scope current_config_scope(void)
-{
- if (the_reader.config_kvi)
- return the_reader.config_kvi->scope;
- else
- return the_reader.parsing_scope;
-}
-
-int current_config_line(void)
-{
- if (the_reader.config_kvi)
- return the_reader.config_kvi->linenr;
- else
- return the_reader.source->linenr;
-}
-
int lookup_config(const char **mapping, int nr_mapping, const char *var)
{
int i;
diff --git a/config.h b/config.h
index d1c5577589..6332d74904 100644
--- a/config.h
+++ b/config.h
@@ -72,6 +72,7 @@ enum config_event_t {
CONFIG_EVENT_ERROR
};
+struct config_source;
/*
* The parser event function (if not NULL) is called with the event type and
* the begin/end offsets of the parsed elements.
@@ -81,6 +82,7 @@ enum config_event_t {
*/
typedef int (*config_parser_event_fn_t)(enum config_event_t type,
size_t begin_offset, size_t end_offset,
+ struct config_source *cs,
void *event_fn_data);
struct config_options {
@@ -100,6 +102,10 @@ struct config_options {
const char *commondir;
const char *git_dir;
+ /*
+ * event_fn and event_fn_data are for internal use only. Handles events
+ * emitted by the config parser.
+ */
config_parser_event_fn_t event_fn;
void *event_fn_data;
enum config_error_action {
@@ -110,8 +116,31 @@ struct config_options {
} error_action;
};
+/* Config source metadata for a given config key-value pair */
+struct key_value_info {
+ const char *filename;
+ int linenr;
+ enum config_origin_type origin_type;
+ enum config_scope scope;
+ const char *path;
+};
+#define KVI_INIT { \
+ .filename = NULL, \
+ .linenr = -1, \
+ .origin_type = CONFIG_ORIGIN_UNKNOWN, \
+ .scope = CONFIG_SCOPE_UNKNOWN, \
+ .path = NULL, \
+}
+
+/* Captures additional information that a config callback can use. */
+struct config_context {
+ /* Config source metadata for key and value. */
+ const struct key_value_info *kvi;
+};
+#define CONFIG_CONTEXT_INIT { 0 }
+
/**
- * A config callback function takes three parameters:
+ * A config callback function takes four parameters:
*
* - the name of the parsed variable. This is in canonical "flat" form: the
* section, subsection, and variable segments will be separated by dots,
@@ -122,15 +151,22 @@ struct config_options {
* value specified, the value will be NULL (typically this means it
* should be interpreted as boolean true).
*
+ * - the 'config context', that is, additional information about the config
+ * iteration operation provided by the config machinery. For example, this
+ * includes information about the config source being parsed (e.g. the
+ * filename).
+ *
* - a void pointer passed in by the caller of the config API; this can
* contain callback-specific data
*
* A config callback should return 0 for success, or -1 if the variable
* could not be parsed properly.
*/
-typedef int (*config_fn_t)(const char *, const char *, void *);
+typedef int (*config_fn_t)(const char *, const char *,
+ const struct config_context *, void *);
-int git_default_config(const char *, const char *, void *);
+int git_default_config(const char *, const char *,
+ const struct config_context *, void *);
/**
* Read a specific file in git-config format.
@@ -141,16 +177,18 @@ int git_default_config(const char *, const char *, void *);
int git_config_from_file(config_fn_t fn, const char *, void *);
int git_config_from_file_with_options(config_fn_t fn, const char *,
- void *,
+ void *, enum config_scope,
const struct config_options *);
int git_config_from_mem(config_fn_t fn,
const enum config_origin_type,
const char *name,
const char *buf, size_t len,
- void *data, const struct config_options *opts);
+ void *data, enum config_scope scope,
+ const struct config_options *opts);
int git_config_from_blob_oid(config_fn_t fn, const char *name,
struct repository *repo,
- const struct object_id *oid, void *data);
+ const struct object_id *oid, void *data,
+ enum config_scope scope);
void git_config_push_parameter(const char *text);
void git_config_push_env(const char *spec);
int git_config_from_parameters(config_fn_t fn, void *data);
@@ -219,22 +257,26 @@ int git_parse_maybe_bool(const char *);
* Parse the string to an integer, including unit factors. Dies on error;
* otherwise, returns the parsed result.
*/
-int git_config_int(const char *, const char *);
+int git_config_int(const char *, const char *, const struct key_value_info *);
-int64_t git_config_int64(const char *, const char *);
+int64_t git_config_int64(const char *, const char *,
+ const struct key_value_info *);
/**
* Identical to `git_config_int`, but for unsigned longs.
*/
-unsigned long git_config_ulong(const char *, const char *);
+unsigned long git_config_ulong(const char *, const char *,
+ const struct key_value_info *);
-ssize_t git_config_ssize_t(const char *, const char *);
+ssize_t git_config_ssize_t(const char *, const char *,
+ const struct key_value_info *);
/**
* Same as `git_config_bool`, except that integers are returned as-is, and
* an `is_bool` flag is unset.
*/
-int git_config_bool_or_int(const char *, const char *, int *);
+int git_config_bool_or_int(const char *, const char *,
+ const struct key_value_info *, int *);
/**
* Parse a string into a boolean value, respecting keywords like "true" and
@@ -356,10 +398,8 @@ void git_global_config(char **user, char **xdg);
int git_config_parse_parameter(const char *, config_fn_t fn, void *data);
-enum config_scope current_config_scope(void);
-const char *current_config_origin_type(void);
-const char *current_config_name(void);
-int current_config_line(void);
+const char *config_origin_type_name(enum config_origin_type type);
+void kvi_from_param(struct key_value_info *out);
/*
* Match and parse a config key of the form:
@@ -501,7 +541,8 @@ int git_configset_get(struct config_set *cs, const char *key);
* touching `value`. The caller should not free or modify `value`, as it
* is owned by the cache.
*/
-int git_configset_get_value(struct config_set *cs, const char *key, const char **dest);
+int git_configset_get_value(struct config_set *cs, const char *key,
+ const char **dest, struct key_value_info *kvi);
int git_configset_get_string(struct config_set *cs, const char *key, char **dest);
int git_configset_get_int(struct config_set *cs, const char *key, int *dest);
@@ -667,13 +708,6 @@ int git_config_get_expiry(const char *key, const char **output);
/* parse either "this many days" integer, or "5.days.ago" approxidate */
int git_config_get_expiry_in_days(const char *key, timestamp_t *, timestamp_t now);
-struct key_value_info {
- const char *filename;
- int linenr;
- enum config_origin_type origin_type;
- enum config_scope scope;
-};
-
/**
* First prints the error message specified by the caller in `err` and then
* dies printing the line number and the file name of the highest priority
diff --git a/config.mak.uname b/config.mak.uname
index 64c44db805..3bb03f423a 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -526,6 +526,8 @@ else
endif
X = .exe
+ EXTRA_PROGRAMS += headless-git$X
+
compat/msvc.o: compat/msvc.c compat/mingw.c GIT-CFLAGS
endif
ifeq ($(uname_S),Interix)
@@ -705,6 +707,7 @@ ifeq ($(uname_S),MINGW)
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \
-fstack-protector-strong
EXTLIBS += -lntdll
+ EXTRA_PROGRAMS += headless-git$X
INSTALL = /bin/install
INTERNAL_QSORT = YesPlease
HAVE_LIBCHARSET_H = YesPlease
diff --git a/configure.ac b/configure.ac
index 38ff86678a..276593cd9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -546,6 +546,8 @@ fi
# git-http-push are not built, and you cannot use http:// and https://
# transports.
+if test -z "$NO_CURL"; then
+
GIT_STASH_FLAGS($CURLDIR)
AC_CHECK_LIB([curl], [curl_global_init],
@@ -554,6 +556,8 @@ AC_CHECK_LIB([curl], [curl_global_init],
GIT_UNSTASH_FLAGS($CURLDIR)
+fi
+
GIT_CONF_SUBST([NO_CURL])
if test -z "$NO_CURL"; then
@@ -581,6 +585,8 @@ fi
# Define NO_EXPAT if you do not have expat installed. git-http-push is
# not built, and you cannot push using http:// and https:// transports.
+if test -z "$NO_EXPAT"; then
+
GIT_STASH_FLAGS($EXPATDIR)
AC_CHECK_LIB([expat], [XML_ParserCreate],
@@ -589,6 +595,8 @@ AC_CHECK_LIB([expat], [XML_ParserCreate],
GIT_UNSTASH_FLAGS($EXPATDIR)
+fi
+
GIT_CONF_SUBST([NO_EXPAT])
#
@@ -636,7 +644,6 @@ LIBS="$old_LIBS"
GIT_UNSTASH_FLAGS($ICONVDIR)
GIT_CONF_SUBST([NEEDS_LIBICONV])
-GIT_CONF_SUBST([NO_ICONV])
if test -n "$NO_ICONV"; then
NEEDS_LIBICONV=
@@ -644,6 +651,8 @@ fi
fi
+GIT_CONF_SUBST([NO_ICONV])
+
#
# Define NO_DEFLATE_BOUND if deflateBound is missing from zlib.
diff --git a/connect.c b/connect.c
index 3a0186280c..0d77737a53 100644
--- a/connect.c
+++ b/connect.c
@@ -12,6 +12,7 @@
#include "url.h"
#include "string-list.h"
#include "oid-array.h"
+#include "path.h"
#include "transport.h"
#include "trace2.h"
#include "strbuf.h"
@@ -964,7 +965,7 @@ static struct child_process *git_tcp_connect(int fd[2], char *host, int flags)
static char *git_proxy_command;
static int git_proxy_command_options(const char *var, const char *value,
- void *cb)
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "core.gitproxy")) {
const char *for_pos;
@@ -1010,7 +1011,7 @@ static int git_proxy_command_options(const char *var, const char *value,
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static int git_use_proxy(const char *host)
diff --git a/connected.c b/connected.c
index d672521da4..8f89376dbc 100644
--- a/connected.c
+++ b/connected.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "run-command.h"
#include "sigchain.h"
#include "connected.h"
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 2f6e0197ff..6b819e2fbd 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -227,7 +227,7 @@ add_compile_definitions(GIT_HOST_CPU="${CMAKE_SYSTEM_PROCESSOR}")
add_compile_definitions(SHA256_BLK INTERNAL_QSORT RUNTIME_PREFIX)
add_compile_definitions(NO_OPENSSL SHA1_DC SHA1DC_NO_STANDARD_INCLUDES
SHA1DC_INIT_SAFE_HASH_DEFAULT=0
- SHA1DC_CUSTOM_INCLUDE_SHA1_C="cache.h"
+ SHA1DC_CUSTOM_INCLUDE_SHA1_C="git-compat-util.h"
SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="git-compat-util.h" )
list(APPEND compat_SOURCES sha1dc_git.c sha1dc/sha1.c sha1dc/ubc_check.c block-sha1/sha1.c sha256/block/sha256.c compat/qsort_s.c)
@@ -738,6 +738,15 @@ if(WIN32)
else()
message(FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID}")
endif()
+
+ add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
+ elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+ target_link_options(headless-git PUBLIC /NOLOGO /ENTRY:wWinMainCRTStartup /SUBSYSTEM:WINDOWS)
+ else()
+ message(FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID}")
+ endif()
elseif(UNIX)
target_link_libraries(common-main pthread rt)
endif()
diff --git a/contrib/buildsystems/Generators/Vcxproj.pm b/contrib/buildsystems/Generators/Vcxproj.pm
index 1a25789d28..b2e68a1671 100644
--- a/contrib/buildsystems/Generators/Vcxproj.pm
+++ b/contrib/buildsystems/Generators/Vcxproj.pm
@@ -76,7 +76,7 @@ sub createProject {
my $libs_release = "\n ";
my $libs_debug = "\n ";
- if (!$static_library) {
+ if (!$static_library && $name ne 'headless-git') {
$libs_release = join(";", sort(grep /^(?!libgit\.lib|xdiff\/lib\.lib|vcs-svn\/lib\.lib|reftable\/libreftable\.lib)/, @{$$build_structure{"$prefix${name}_LIBS"}}));
$libs_debug = $libs_release;
$libs_debug =~ s/zlib\.lib/zlibd\.lib/g;
@@ -230,7 +230,7 @@ EOM
print F << "EOM";
</ItemGroup>
EOM
- if (!$static_library || $target =~ 'vcs-svn' || $target =~ 'xdiff') {
+ if ((!$static_library || $target =~ 'vcs-svn' || $target =~ 'xdiff') && !($name =~ /headless-git/)) {
my $uuid_libgit = $$build_structure{"LIBS_libgit_GUID"};
my $uuid_libreftable = $$build_structure{"LIBS_reftable/libreftable_GUID"};
my $uuid_xdiff_lib = $$build_structure{"LIBS_xdiff/lib_GUID"};
diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index ed6c45988a..069be7e4be 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -371,6 +371,7 @@ sub handleLinkLine
# exit(1);
foreach (@objfiles) {
my $sourcefile = $_;
+ $sourcefile =~ s/^headless-git\.o$/compat\/win32\/headless.c/;
$sourcefile =~ s/\.o$/.c/;
push(@sources, $sourcefile);
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
diff --git a/contrib/coccinelle/config_fn_ctx.pending.cocci b/contrib/coccinelle/config_fn_ctx.pending.cocci
new file mode 100644
index 0000000000..6d3d1000a9
--- /dev/null
+++ b/contrib/coccinelle/config_fn_ctx.pending.cocci
@@ -0,0 +1,144 @@
+@ get_fn @
+identifier fn, R;
+@@
+(
+(
+git_config_from_file
+|
+git_config_from_file_with_options
+|
+git_config_from_mem
+|
+git_config_from_blob_oid
+|
+read_early_config
+|
+read_very_early_config
+|
+config_with_options
+|
+git_config
+|
+git_protected_config
+|
+config_from_gitmodules
+)
+ (fn, ...)
+|
+repo_config(R, fn, ...)
+)
+
+@ extends get_fn @
+identifier C1, C2, D;
+@@
+int fn(const char *C1, const char *C2,
++ const struct config_context *ctx,
+ void *D);
+
+@ extends get_fn @
+@@
+int fn(const char *, const char *,
++ const struct config_context *,
+ void *);
+
+@ extends get_fn @
+// Don't change fns that look like callback fns but aren't
+identifier fn2 != tar_filter_config && != git_diff_heuristic_config &&
+ != git_default_submodule_config && != git_color_config &&
+ != bundle_list_update && != parse_object_filter_config;
+identifier C1, C2, D1, D2, S;
+attribute name UNUSED;
+@@
+int fn(const char *C1, const char *C2,
++ const struct config_context *ctx,
+ void *D1) {
+<+...
+(
+fn2(C1, C2
++ , ctx
+, D2);
+|
+if(fn2(C1, C2
++ , ctx
+, D2) < 0) { ... }
+|
+return fn2(C1, C2
++ , ctx
+, D2);
+|
+S = fn2(C1, C2
++ , ctx
+, D2);
+)
+...+>
+ }
+
+@ extends get_fn@
+identifier C1, C2, D;
+attribute name UNUSED;
+@@
+int fn(const char *C1, const char *C2,
++ const struct config_context *ctx UNUSED,
+ void *D) {...}
+
+
+// The previous rules don't catch all callbacks, especially if they're defined
+// in a separate file from the git_config() call. Fix these manually.
+@@
+identifier C1, C2, D;
+attribute name UNUSED;
+@@
+int
+(
+git_ident_config
+|
+urlmatch_collect_fn
+|
+write_one_config
+|
+forbid_remote_url
+|
+credential_config_callback
+)
+ (const char *C1, const char *C2,
++ const struct config_context *ctx UNUSED,
+ void *D) {...}
+
+@@
+identifier C1, C2, D, D2, S, fn2;
+@@
+int
+(
+http_options
+|
+git_status_config
+|
+git_commit_config
+|
+git_default_core_config
+|
+grep_config
+)
+ (const char *C1, const char *C2,
++ const struct config_context *ctx,
+ void *D) {
+<+...
+(
+fn2(C1, C2
++ , ctx
+, D2);
+|
+if(fn2(C1, C2
++ , ctx
+, D2) < 0) { ... }
+|
+return fn2(C1, C2
++ , ctx
+, D2);
+|
+S = fn2(C1, C2
++ , ctx
+, D2);
+)
+...+>
+ }
diff --git a/contrib/coccinelle/git_config_number.cocci b/contrib/coccinelle/git_config_number.cocci
new file mode 100644
index 0000000000..7b57dceefe
--- /dev/null
+++ b/contrib/coccinelle/git_config_number.cocci
@@ -0,0 +1,27 @@
+@@
+identifier C1, C2, C3;
+@@
+(
+(
+git_config_int
+|
+git_config_int64
+|
+git_config_ulong
+|
+git_config_ssize_t
+)
+ (C1, C2
++ , ctx->kvi
+ )
+|
+(
+git_configset_get_value
+|
+git_config_bool_or_int
+)
+ (C1, C2
++ , ctx->kvi
+ , C3
+ )
+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 945d2543b0..745dc901fb 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1607,7 +1607,7 @@ _git_checkout ()
if [ -n "$(__git_find_on_cmdline "-b -B -d --detach --orphan")" ]; then
__git_complete_refs --mode="refs"
- elif [ -n "$(__git_find_on_cmdline "--track")" ]; then
+ elif [ -n "$(__git_find_on_cmdline "-t --track")" ]; then
__git_complete_refs --mode="remote-heads"
else
__git_complete_refs $dwim_opt --mode="refs"
@@ -1733,32 +1733,44 @@ __git_color_moved_opts="no default plain blocks zebra dimmed-zebra"
__git_color_moved_ws_opts="no ignore-space-at-eol ignore-space-change
ignore-all-space allow-indentation-change"
+__git_ws_error_highlight_opts="context old new all default"
+
+# Options for the diff machinery (diff, log, show, stash, range-diff, ...)
__git_diff_common_options="--stat --numstat --shortstat --summary
--patch-with-stat --name-only --name-status --color
--no-color --color-words --no-renames --check
--color-moved --color-moved= --no-color-moved
--color-moved-ws= --no-color-moved-ws
--full-index --binary --abbrev --diff-filter=
+ --find-copies --find-object --find-renames
+ --no-relative --relative
--find-copies-harder --ignore-cr-at-eol
--text --ignore-space-at-eol --ignore-space-change
--ignore-all-space --ignore-blank-lines --exit-code
- --quiet --ext-diff --no-ext-diff
+ --quiet --ext-diff --no-ext-diff --unified=
--no-prefix --src-prefix= --dst-prefix=
- --inter-hunk-context=
+ --inter-hunk-context= --function-context
--patience --histogram --minimal
--raw --word-diff --word-diff-regex=
--dirstat --dirstat= --dirstat-by-file
--dirstat-by-file= --cumulative
- --diff-algorithm=
+ --diff-algorithm= --default-prefix
--submodule --submodule= --ignore-submodules
--indent-heuristic --no-indent-heuristic
- --textconv --no-textconv
- --patch --no-patch
- --anchored=
+ --textconv --no-textconv --break-rewrites
+ --patch --no-patch --cc --combined-all-paths
+ --anchored= --compact-summary --ignore-matching-lines=
+ --irreversible-delete --line-prefix --no-stat
+ --output= --output-indicator-context=
+ --output-indicator-new= --output-indicator-old=
+ --ws-error-highlight=
+ --pickaxe-all --pickaxe-regex
"
-__git_diff_difftool_options="--cached --staged --pickaxe-all --pickaxe-regex
- --base --ours --theirs --no-index --relative --merge-base
+# Options for diff/difftool
+__git_diff_difftool_options="--cached --staged
+ --base --ours --theirs --no-index --merge-base
+ --ita-invisible-in-index --ita-visible-in-index
$__git_diff_common_options"
_git_diff ()
@@ -1782,6 +1794,10 @@ _git_diff ()
__gitcomp "$__git_color_moved_ws_opts" "" "${cur##--color-moved-ws=}"
return
;;
+ --ws-error-highlight=*)
+ __gitcomp "$__git_ws_error_highlight_opts" "" "${cur##--ws-error-highlight=}"
+ return
+ ;;
--*)
__gitcomp "$__git_diff_difftool_options"
return
@@ -2024,6 +2040,12 @@ __git_log_shortlog_options="
--author= --committer= --grep=
--all-match --invert-grep
"
+# Options accepted by log and show
+__git_log_show_options="
+ --diff-merges --diff-merges= --no-diff-merges --remerge-diff
+"
+
+__git_diff_merges_opts="off none on first-parent 1 separate m combined c dense-combined cc remerge r"
__git_log_pretty_formats="oneline short medium full fuller reference email raw format: tformat: mboxrd"
__git_log_date_formats="relative iso8601 iso8601-strict rfc2822 short local default human raw unix auto: format:"
@@ -2072,15 +2094,24 @@ _git_log ()
__gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}"
return
;;
+ --ws-error-highlight=*)
+ __gitcomp "$__git_ws_error_highlight_opts" "" "${cur##--ws-error-highlight=}"
+ return
+ ;;
--no-walk=*)
__gitcomp "sorted unsorted" "" "${cur##--no-walk=}"
return
;;
+ --diff-merges=*)
+ __gitcomp "$__git_diff_merges_opts" "" "${cur##--diff-merges=}"
+ return
+ ;;
--*)
__gitcomp "
$__git_log_common_options
$__git_log_shortlog_options
$__git_log_gitk_options
+ $__git_log_show_options
--root --topo-order --date-order --reverse
--follow --full-diff
--abbrev-commit --no-abbrev-commit --abbrev=
@@ -2097,7 +2128,6 @@ _git_log ()
--expand-tabs --expand-tabs= --no-expand-tabs
$merge
$__git_diff_common_options
- --pickaxe-all --pickaxe-regex
"
return
;;
@@ -2484,7 +2514,7 @@ _git_switch ()
if [ -n "$(__git_find_on_cmdline "-c -C -d --detach")" ]; then
__git_complete_refs --mode="refs"
- elif [ -n "$(__git_find_on_cmdline "--track")" ]; then
+ elif [ -n "$(__git_find_on_cmdline "-t --track")" ]; then
__git_complete_refs --mode="remote-heads"
else
__git_complete_refs $dwim_opt --mode="heads"
@@ -2992,10 +3022,19 @@ _git_show ()
__gitcomp "$__git_color_moved_ws_opts" "" "${cur##--color-moved-ws=}"
return
;;
+ --ws-error-highlight=*)
+ __gitcomp "$__git_ws_error_highlight_opts" "" "${cur##--ws-error-highlight=}"
+ return
+ ;;
+ --diff-merges=*)
+ __gitcomp "$__git_diff_merges_opts" "" "${cur##--diff-merges=}"
+ return
+ ;;
--*)
__gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
--oneline --show-signature
--expand-tabs --expand-tabs= --no-expand-tabs
+ $__git_log_show_options
$__git_diff_common_options
"
return
diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c
index ef681f29d5..215a81d8ba 100644
--- a/contrib/credential/libsecret/git-credential-libsecret.c
+++ b/contrib/credential/libsecret/git-credential-libsecret.c
@@ -39,6 +39,8 @@ struct credential {
char *path;
char *username;
char *password;
+ char *password_expiry_utc;
+ char *oauth_refresh_token;
};
#define CREDENTIAL_INIT { 0 }
@@ -52,8 +54,29 @@ struct credential_operation {
#define CREDENTIAL_OP_END { NULL, NULL }
+static void credential_clear(struct credential *c);
+
/* ----------------- Secret Service functions ----------------- */
+static const SecretSchema schema = {
+ "org.git.Password",
+ /* Ignore schema name during search for backwards compatibility */
+ SECRET_SCHEMA_DONT_MATCH_NAME,
+ {
+ /*
+ * libsecret assumes attribute values are non-confidential and
+ * unchanging, so we can't include oauth_refresh_token or
+ * password_expiry_utc.
+ */
+ { "user", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { "object", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { "protocol", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { "port", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
+ { "server", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { NULL, 0 },
+ }
+};
+
static char *make_label(struct credential *c)
{
if (c->port)
@@ -101,7 +124,7 @@ static int keyring_get(struct credential *c)
attributes = make_attr_list(c);
items = secret_service_search_sync(service,
- SECRET_SCHEMA_COMPAT_NETWORK,
+ &schema,
attributes,
SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,
NULL,
@@ -117,6 +140,7 @@ static int keyring_get(struct credential *c)
SecretItem *item;
SecretValue *secret;
const char *s;
+ gchar **parts;
item = items->data;
secret = secret_item_get_secret(item);
@@ -130,8 +154,27 @@ static int keyring_get(struct credential *c)
s = secret_value_get_text(secret);
if (s) {
- g_free(c->password);
- c->password = g_strdup(s);
+ /*
+ * Passwords and other attributes encoded in following format:
+ * hunter2
+ * password_expiry_utc=1684189401
+ * oauth_refresh_token=xyzzy
+ */
+ parts = g_strsplit(s, "\n", 0);
+ if (g_strv_length(parts) >= 1) {
+ g_free(c->password);
+ c->password = g_strdup(parts[0]);
+ }
+ for (int i = 1; i < g_strv_length(parts); i++) {
+ if (g_str_has_prefix(parts[i], "password_expiry_utc=")) {
+ g_free(c->password_expiry_utc);
+ c->password_expiry_utc = g_strdup(&parts[i][20]);
+ } else if (g_str_has_prefix(parts[i], "oauth_refresh_token=")) {
+ g_free(c->oauth_refresh_token);
+ c->oauth_refresh_token = g_strdup(&parts[i][20]);
+ }
+ }
+ g_strfreev(parts);
}
g_hash_table_unref(attributes);
@@ -148,6 +191,7 @@ static int keyring_store(struct credential *c)
char *label = NULL;
GHashTable *attributes = NULL;
GError *error = NULL;
+ GString *secret = NULL;
/*
* Sanity check that what we are storing is actually sensible.
@@ -162,13 +206,23 @@ static int keyring_store(struct credential *c)
label = make_label(c);
attributes = make_attr_list(c);
- secret_password_storev_sync(SECRET_SCHEMA_COMPAT_NETWORK,
+ secret = g_string_new(c->password);
+ if (c->password_expiry_utc) {
+ g_string_append_printf(secret, "\npassword_expiry_utc=%s",
+ c->password_expiry_utc);
+ }
+ if (c->oauth_refresh_token) {
+ g_string_append_printf(secret, "\noauth_refresh_token=%s",
+ c->oauth_refresh_token);
+ }
+ secret_password_storev_sync(&schema,
attributes,
NULL,
label,
- c->password,
+ secret->str,
NULL,
&error);
+ g_string_free(secret, TRUE);
g_free(label);
g_hash_table_unref(attributes);
@@ -185,6 +239,7 @@ static int keyring_erase(struct credential *c)
{
GHashTable *attributes = NULL;
GError *error = NULL;
+ struct credential existing = CREDENTIAL_INIT;
/*
* Sanity check that we actually have something to match
@@ -197,8 +252,22 @@ static int keyring_erase(struct credential *c)
if (!c->protocol && !c->host && !c->path && !c->username)
return EXIT_FAILURE;
+ if (c->password) {
+ existing.host = g_strdup(c->host);
+ existing.path = g_strdup(c->path);
+ existing.port = c->port;
+ existing.protocol = g_strdup(c->protocol);
+ existing.username = g_strdup(c->username);
+ keyring_get(&existing);
+ if (existing.password && strcmp(c->password, existing.password)) {
+ credential_clear(&existing);
+ return EXIT_SUCCESS;
+ }
+ credential_clear(&existing);
+ }
+
attributes = make_attr_list(c);
- secret_password_clearv_sync(SECRET_SCHEMA_COMPAT_NETWORK,
+ secret_password_clearv_sync(&schema,
attributes,
NULL,
&error);
@@ -238,6 +307,8 @@ static void credential_clear(struct credential *c)
g_free(c->path);
g_free(c->username);
g_free(c->password);
+ g_free(c->password_expiry_utc);
+ g_free(c->oauth_refresh_token);
credential_init(c);
}
@@ -284,11 +355,19 @@ static int credential_read(struct credential *c)
} else if (!strcmp(key, "username")) {
g_free(c->username);
c->username = g_strdup(value);
+ } else if (!strcmp(key, "password_expiry_utc")) {
+ g_free(c->password_expiry_utc);
+ c->password_expiry_utc = g_strdup(value);
} else if (!strcmp(key, "password")) {
g_free(c->password);
c->password = g_strdup(value);
while (*value)
*value++ = '\0';
+ } else if (!strcmp(key, "oauth_refresh_token")) {
+ g_free(c->oauth_refresh_token);
+ c->oauth_refresh_token = g_strdup(value);
+ while (*value)
+ *value++ = '\0';
}
/*
* Ignore other lines; we don't know what they mean, but
@@ -314,6 +393,10 @@ static void credential_write(const struct credential *c)
/* only write username/password, if set */
credential_write_item(stdout, "username", c->username);
credential_write_item(stdout, "password", c->password);
+ credential_write_item(stdout, "password_expiry_utc",
+ c->password_expiry_utc);
+ credential_write_item(stdout, "oauth_refresh_token",
+ c->oauth_refresh_token);
}
static void usage(const char *name)
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 96f10613ae..4cd56c42e2 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -109,7 +109,18 @@ static int match_part_last(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim)
return match_part_with_last(ptarget, want, delim, 1);
}
-static int match_cred(const CREDENTIALW *cred)
+static int match_cred_password(const CREDENTIALW *cred) {
+ int ret;
+ WCHAR *cred_password = xmalloc(cred->CredentialBlobSize);
+ wcsncpy_s(cred_password, cred->CredentialBlobSize,
+ (LPCWSTR)cred->CredentialBlob,
+ cred->CredentialBlobSize / sizeof(WCHAR));
+ ret = !wcscmp(cred_password, password);
+ free(cred_password);
+ return ret;
+}
+
+static int match_cred(const CREDENTIALW *cred, int match_password)
{
LPCWSTR target = cred->TargetName;
if (wusername && wcscmp(wusername, cred->UserName ? cred->UserName : L""))
@@ -119,7 +130,8 @@ static int match_cred(const CREDENTIALW *cred)
match_part(&target, protocol, L"://") &&
match_part_last(&target, wusername, L"@") &&
match_part(&target, host, L"/") &&
- match_part(&target, path, L"");
+ match_part(&target, path, L"") &&
+ (!match_password || match_cred_password(cred));
}
static void get_credential(void)
@@ -134,7 +146,7 @@ static void get_credential(void)
/* search for the first credential that matches username */
for (i = 0; i < num_creds; ++i)
- if (match_cred(creds[i])) {
+ if (match_cred(creds[i], 0)) {
write_item("username", creds[i]->UserName,
creds[i]->UserName ? wcslen(creds[i]->UserName) : 0);
write_item("password",
@@ -196,7 +208,7 @@ static void erase_credential(void)
return;
for (i = 0; i < num_creds; ++i) {
- if (match_cred(creds[i]))
+ if (match_cred(creds[i], password != NULL))
CredDeleteW(creds[i]->TargetName, creds[i]->Type, 0);
}
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 7db4c45676..e0c5d3b0de 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -33,19 +33,19 @@ git subtree split --prefix=<prefix> [<commit>]
git subtree pull --prefix=<prefix> <repository> <ref>
git subtree push --prefix=<prefix> <repository> <refspec>
--
-h,help show the help
-q,quiet quiet
-d,debug show debug messages
+h,help! show the help
+q,quiet! quiet
+d,debug! show debug messages
P,prefix= the name of the subdir to split out
options for 'split' (also: 'push')
annotate= add a prefix to commit message of new commits
-b,branch= create a new branch from the split subtree
+b,branch!= create a new branch from the split subtree
ignore-joins ignore prior --rejoin commits
onto= try connecting new tree to an existing one
rejoin merge the new branch back into HEAD
options for 'add' and 'merge' (also: 'pull', 'split --rejoin', and 'push --rejoin')
squash merge subtree changes as a single commit
-m,message= use the given message as the commit message for the merge commit
+m,message!= use the given message as the commit message for the merge commit
"
indent=0
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 341c169eca..49a21dd7c9 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -71,7 +71,7 @@ test_expect_success 'shows short help text for -h' '
test_expect_code 129 git subtree -h >out 2>err &&
test_must_be_empty err &&
grep -e "^ *or: git subtree pull" out &&
- grep -e --annotate out
+ grep -F -e "--[no-]annotate" out
'
#
diff --git a/convert.c b/convert.c
index 9ee79fe469..a8870baff3 100644
--- a/convert.c
+++ b/convert.c
@@ -1,21 +1,21 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "advice.h"
#include "config.h"
#include "convert.h"
#include "copy.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "attr.h"
#include "run-command.h"
#include "quote.h"
+#include "read-cache-ll.h"
#include "sigchain.h"
#include "pkt-line.h"
#include "sub-process.h"
#include "trace.h"
#include "utf8.h"
-#include "ll-merge.h"
-#include "wrapper.h"
+#include "merge-ll.h"
/*
* convert.c - convert a file when checking it out and checking it in.
@@ -633,23 +633,21 @@ static int filter_buffer_or_fd(int in UNUSED, int out, void *data)
*/
struct child_process child_process = CHILD_PROCESS_INIT;
struct filter_params *params = (struct filter_params *)data;
+ const char *format = params->cmd;
int write_err, status;
/* apply % substitution to cmd */
struct strbuf cmd = STRBUF_INIT;
- struct strbuf path = STRBUF_INIT;
- struct strbuf_expand_dict_entry dict[] = {
- { "f", NULL, },
- { NULL, NULL, },
- };
-
- /* quote the path to preserve spaces, etc. */
- sq_quote_buf(&path, params->path);
- dict[0].value = path.buf;
- /* expand all %f with the quoted path */
- strbuf_expand(&cmd, params->cmd, strbuf_expand_dict_cb, &dict);
- strbuf_release(&path);
+ /* expand all %f with the quoted path; quote to preserve space, etc. */
+ while (strbuf_expand_step(&cmd, &format)) {
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(&cmd, '%');
+ else if (skip_prefix(format, "f", &format))
+ sq_quote_buf(&cmd, params->path);
+ else
+ strbuf_addch(&cmd, '%');
+ }
strvec_push(&child_process.args, cmd.buf);
child_process.use_shell = 1;
@@ -1015,7 +1013,9 @@ static int apply_filter(const char *path, const char *src, size_t len,
return 0;
}
-static int read_convert_config(const char *var, const char *value, void *cb UNUSED)
+static int read_convert_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *cb UNUSED)
{
const char *key, *name;
size_t namelen;
diff --git a/copy.c b/copy.c
index 882c79cffb..23d84c6c1d 100644
--- a/copy.c
+++ b/copy.c
@@ -1,7 +1,6 @@
#include "git-compat-util.h"
#include "copy.h"
#include "path.h"
-#include "wrapper.h"
int copy_fd(int ifd, int ofd)
{
diff --git a/credential.c b/credential.c
index 8825c6f132..18098bd35e 100644
--- a/credential.c
+++ b/credential.c
@@ -49,6 +49,7 @@ static int credential_from_potentially_partial_url(struct credential *c,
const char *url);
static int credential_config_callback(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *data)
{
struct credential *c = data;
@@ -87,8 +88,8 @@ static int proto_is_http(const char *s)
static void credential_describe(struct credential *c, struct strbuf *out);
static void credential_format(struct credential *c, struct strbuf *out);
-static int select_all(const struct urlmatch_item *a,
- const struct urlmatch_item *b)
+static int select_all(const struct urlmatch_item *a UNUSED,
+ const struct urlmatch_item *b UNUSED)
{
return 0;
}
diff --git a/csum-file.c b/csum-file.c
index daf9b06dff..870748e016 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -11,7 +11,6 @@
#include "progress.h"
#include "csum-file.h"
#include "hash.h"
-#include "wrapper.h"
static void verify_buffer_or_die(struct hashfile *f,
const void *buf,
@@ -208,7 +207,7 @@ int hashfile_truncate(struct hashfile *f, struct hashfile_checkpoint *checkpoint
lseek(f->fd, offset, SEEK_SET) != offset)
return -1;
f->total = offset;
- f->ctx = checkpoint->ctx;
+ the_hash_algo->clone_fn(&f->ctx, &checkpoint->ctx);
f->offset = 0; /* hashflush() was called in checkpoint */
return 0;
}
diff --git a/ctype.c b/ctype.c
index fc0225cebd..3451745550 100644
--- a/ctype.c
+++ b/ctype.c
@@ -28,39 +28,3 @@ const unsigned char sane_ctype[256] = {
A, A, A, A, A, A, A, A, A, A, A, R, R, U, P, X, /* 112..127 */
/* Nothing in the 128.. range */
};
-
-/* For case-insensitive kwset */
-const unsigned char tolower_trans_tbl[256] = {
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- ' ', '!', '"', '#', '$', '%', '&', 0x27,
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '[', 0x5c, ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
- 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
- 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
- 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
- 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
- 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
-};
diff --git a/daemon.c b/daemon.c
index 7139cc201d..f5e597114b 100644
--- a/daemon.c
+++ b/daemon.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "path.h"
@@ -10,7 +9,6 @@
#include "setup.h"
#include "strbuf.h"
#include "string-list.h"
-#include "wrapper.h"
#ifdef NO_INITGROUPS
#define initgroups(x, y) (0) /* nothing */
@@ -144,42 +142,6 @@ static void NORETURN daemon_die(const char *err, va_list params)
exit(1);
}
-struct expand_path_context {
- const char *directory;
- struct hostinfo *hostinfo;
-};
-
-static size_t expand_path(struct strbuf *sb, const char *placeholder, void *ctx)
-{
- struct expand_path_context *context = ctx;
- struct hostinfo *hi = context->hostinfo;
-
- switch (placeholder[0]) {
- case 'H':
- strbuf_addbuf(sb, &hi->hostname);
- return 1;
- case 'C':
- if (placeholder[1] == 'H') {
- strbuf_addstr(sb, get_canon_hostname(hi));
- return 2;
- }
- break;
- case 'I':
- if (placeholder[1] == 'P') {
- strbuf_addstr(sb, get_ip_address(hi));
- return 2;
- }
- break;
- case 'P':
- strbuf_addbuf(sb, &hi->tcp_port);
- return 1;
- case 'D':
- strbuf_addstr(sb, context->directory);
- return 1;
- }
- return 0;
-}
-
static const char *path_ok(const char *directory, struct hostinfo *hi)
{
static char rpath[PATH_MAX];
@@ -223,10 +185,7 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
}
else if (interpolated_path && hi->saw_extended_args) {
struct strbuf expanded_path = STRBUF_INIT;
- struct expand_path_context context;
-
- context.directory = directory;
- context.hostinfo = hi;
+ const char *format = interpolated_path;
if (*dir != '/') {
/* Allow only absolute */
@@ -234,8 +193,24 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
return NULL;
}
- strbuf_expand(&expanded_path, interpolated_path,
- expand_path, &context);
+ while (strbuf_expand_step(&expanded_path, &format)) {
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(&expanded_path, '%');
+ else if (skip_prefix(format, "H", &format))
+ strbuf_addbuf(&expanded_path, &hi->hostname);
+ else if (skip_prefix(format, "CH", &format))
+ strbuf_addstr(&expanded_path,
+ get_canon_hostname(hi));
+ else if (skip_prefix(format, "IP", &format))
+ strbuf_addstr(&expanded_path,
+ get_ip_address(hi));
+ else if (skip_prefix(format, "P", &format))
+ strbuf_addbuf(&expanded_path, &hi->tcp_port);
+ else if (skip_prefix(format, "D", &format))
+ strbuf_addstr(&expanded_path, directory);
+ else
+ strbuf_addch(&expanded_path, '%');
+ }
rlen = strlcpy(interp_path, expanded_path.buf,
sizeof(interp_path));
diff --git a/decorate.c b/decorate.c
index 71e79daa82..a5c43c0c14 100644
--- a/decorate.c
+++ b/decorate.c
@@ -3,7 +3,6 @@
* data.
*/
#include "git-compat-util.h"
-#include "hashmap.h"
#include "object.h"
#include "decorate.h"
diff --git a/delta-islands.c b/delta-islands.c
index c824a5f6a4..5de5759f3f 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "attr.h"
#include "object.h"
#include "blob.h"
@@ -341,7 +340,9 @@ static void free_remote_islands(kh_str_t *remote_islands)
kh_destroy_str(remote_islands);
}
-static int island_config_callback(const char *k, const char *v, void *cb)
+static int island_config_callback(const char *k, const char *v,
+ const struct config_context *ctx UNUSED,
+ void *cb)
{
struct island_load_data *ild = cb;
diff --git a/diagnose.c b/diagnose.c
index c8c7ebcfa3..8430064000 100644
--- a/diagnose.c
+++ b/diagnose.c
@@ -7,7 +7,7 @@
#include "gettext.h"
#include "hex.h"
#include "strvec.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
#include "parse-options.h"
#include "write-or-die.h"
diff --git a/diff-lib.c b/diff-lib.c
index 1918517ebd..d8aa777a73 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -1,18 +1,21 @@
/*
* Copyright (C) 2005 Junio C Hamano
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "quote.h"
#include "commit.h"
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "object-name.h"
+#include "read-cache.h"
#include "revision.h"
#include "cache-tree.h"
#include "unpack-trees.h"
#include "refs.h"
+#include "repository.h"
#include "submodule.h"
#include "symlinks.h"
#include "trace.h"
@@ -93,7 +96,7 @@ static int match_stat_with_submodule(struct diff_options *diffopt,
return changed;
}
-int run_diff_files(struct rev_info *revs, unsigned int option)
+void run_diff_files(struct rev_info *revs, unsigned int option)
{
int entries, i;
int diff_unmerged_stage = revs->max_count;
@@ -269,7 +272,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
trace_performance_since(start, "diff-files");
- return 0;
}
/*
@@ -603,7 +605,7 @@ void diff_get_merge_base(const struct rev_info *revs, struct object_id *mb)
free_commit_list(merge_bases);
}
-int run_diff_index(struct rev_info *revs, unsigned int option)
+void run_diff_index(struct rev_info *revs, unsigned int option)
{
struct object_array_entry *ent;
int cached = !!(option & DIFF_INDEX_CACHED);
@@ -637,7 +639,6 @@ int run_diff_index(struct rev_info *revs, unsigned int option)
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
trace_performance_leave("diff-index");
- return 0;
}
int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
@@ -679,7 +680,7 @@ int index_differs_from(struct repository *r,
rev.diffopt.flags.ignore_submodules = flags->ignore_submodules;
}
rev.diffopt.ita_invisible_in_index = ita_invisible_in_index;
- run_diff_index(&rev, 1);
+ run_diff_index(&rev, DIFF_INDEX_CACHED);
has_changes = rev.diffopt.flags.has_changes;
release_revisions(&rev);
return (has_changes != 0);
diff --git a/diff-no-index.c b/diff-no-index.c
index 3e573505e0..e7041b89e3 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -365,7 +365,7 @@ int diff_no_index(struct rev_info *revs,
* The return code for --no-index imitates diff(1):
* 0 = no changes, 1 = changes, else error
*/
- ret = diff_result_code(&revs->diffopt, 0);
+ ret = diff_result_code(&revs->diffopt);
out:
for (i = 0; i < ARRAY_SIZE(to_free); i++)
diff --git a/diff.c b/diff.c
index c106f8a4ff..bccb018da4 100644
--- a/diff.c
+++ b/diff.c
@@ -1,9 +1,8 @@
/*
* Copyright (C) 2005 Junio C Hamano
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "base85.h"
#include "config.h"
#include "convert.h"
@@ -20,13 +19,13 @@
#include "attr.h"
#include "run-command.h"
#include "utf8.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "userdiff.h"
#include "submodule-config.h"
#include "submodule.h"
#include "hashmap.h"
#include "mem-pool.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "string-list.h"
#include "strvec.h"
#include "graph.h"
@@ -39,10 +38,10 @@
#include "dir.h"
#include "object-file.h"
#include "object-name.h"
+#include "read-cache-ll.h"
#include "setup.h"
#include "strmap.h"
#include "ws.h"
-#include "wrapper.h"
#ifdef NO_FAST_WORKING_DIRECTORY
#define FAST_WORKING_DIRECTORY 0
@@ -357,7 +356,8 @@ static unsigned parse_color_moved_ws(const char *arg)
return ret;
}
-int git_diff_ui_config(const char *var, const char *value, void *cb)
+int git_diff_ui_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
diff_use_color_default = git_config_colorbool(var, value);
@@ -378,13 +378,14 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
return 0;
}
if (!strcmp(var, "diff.context")) {
- diff_context_default = git_config_int(var, value);
+ diff_context_default = git_config_int(var, value, ctx->kvi);
if (diff_context_default < 0)
return -1;
return 0;
}
if (!strcmp(var, "diff.interhunkcontext")) {
- diff_interhunk_context_default = git_config_int(var, value);
+ diff_interhunk_context_default = git_config_int(var, value,
+ ctx->kvi);
if (diff_interhunk_context_default < 0)
return -1;
return 0;
@@ -410,7 +411,7 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
return 0;
}
if (!strcmp(var, "diff.statgraphwidth")) {
- diff_stat_graph_width = git_config_int(var, value);
+ diff_stat_graph_width = git_config_int(var, value, ctx->kvi);
return 0;
}
if (!strcmp(var, "diff.external"))
@@ -440,15 +441,16 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
if (git_color_config(var, value, cb) < 0)
return -1;
- return git_diff_basic_config(var, value, cb);
+ return git_diff_basic_config(var, value, ctx, cb);
}
-int git_diff_basic_config(const char *var, const char *value, void *cb)
+int git_diff_basic_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *name;
if (!strcmp(var, "diff.renamelimit")) {
- diff_rename_limit_default = git_config_int(var, value);
+ diff_rename_limit_default = git_config_int(var, value, ctx->kvi);
return 0;
}
@@ -495,7 +497,7 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
if (git_diff_heuristic_config(var, value, cb) < 0)
return -1;
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static char *quote_two(const char *one, const char *two)
@@ -3561,18 +3563,21 @@ static void builtin_diff(const char *name_a,
strbuf_addf(&header, "%s%snew file mode %06o%s\n", line_prefix, meta, two->mode, reset);
if (xfrm_msg)
strbuf_addstr(&header, xfrm_msg);
+ o->found_changes = 1;
must_show_header = 1;
}
else if (lbl[1][0] == '/') {
strbuf_addf(&header, "%s%sdeleted file mode %06o%s\n", line_prefix, meta, one->mode, reset);
if (xfrm_msg)
strbuf_addstr(&header, xfrm_msg);
+ o->found_changes = 1;
must_show_header = 1;
}
else {
if (one->mode != two->mode) {
strbuf_addf(&header, "%s%sold mode %06o%s\n", line_prefix, meta, one->mode, reset);
strbuf_addf(&header, "%s%snew mode %06o%s\n", line_prefix, meta, two->mode, reset);
+ o->found_changes = 1;
must_show_header = 1;
}
if (xfrm_msg)
@@ -4830,6 +4835,10 @@ void diff_setup_done(struct diff_options *options)
else
options->prefix_length = 0;
+ /*
+ * --name-only, --name-status, --checkdiff, and -s
+ * turn other output format off.
+ */
if (options->output_format & (DIFF_FORMAT_NAME |
DIFF_FORMAT_NAME_STATUS |
DIFF_FORMAT_CHECKDIFF |
@@ -5519,6 +5528,10 @@ static int diff_opt_rotate_to(const struct option *opt, const char *arg, int uns
return 0;
}
+/*
+ * Consider adding new flags to __git_diff_common_options
+ * in contrib/completion/git-completion.bash
+ */
struct option *add_diff_options(const struct option *opts,
struct diff_options *options)
{
@@ -6200,6 +6213,8 @@ static void flush_one_pair(struct diff_filepair *p, struct diff_options *opt)
fprintf(opt->file, "%s", diff_line_prefix(opt));
write_name_quoted(name_a, opt->file, opt->line_termination);
}
+
+ opt->found_changes = 1;
}
static void show_file_mode_name(struct diff_options *opt, const char *newdelete, struct diff_filespec *fs)
@@ -6678,6 +6693,21 @@ void diff_flush(struct diff_options *options)
separator++;
}
+ if (output_format & DIFF_FORMAT_PATCH) {
+ if (separator) {
+ emit_diff_symbol(options, DIFF_SYMBOL_SEPARATOR, NULL, 0, 0);
+ if (options->stat_sep)
+ /* attach patch instead of inline */
+ emit_diff_symbol(options, DIFF_SYMBOL_STAT_SEP,
+ NULL, 0, 0);
+ }
+
+ diff_flush_patch_all_file_pairs(options);
+ }
+
+ if (output_format & DIFF_FORMAT_CALLBACK)
+ options->format_callback(q, options, options->format_callback_data);
+
if (output_format & DIFF_FORMAT_NO_OUTPUT &&
options->flags.exit_with_status &&
options->flags.diff_from_contents) {
@@ -6699,21 +6729,6 @@ void diff_flush(struct diff_options *options)
}
}
- if (output_format & DIFF_FORMAT_PATCH) {
- if (separator) {
- emit_diff_symbol(options, DIFF_SYMBOL_SEPARATOR, NULL, 0, 0);
- if (options->stat_sep)
- /* attach patch instead of inline */
- emit_diff_symbol(options, DIFF_SYMBOL_STAT_SEP,
- NULL, 0, 0);
- }
-
- diff_flush_patch_all_file_pairs(options);
- }
-
- if (output_format & DIFF_FORMAT_CALLBACK)
- options->format_callback(q, options, options->format_callback_data);
-
free_queue:
diff_free_queue(q);
DIFF_QUEUE_CLEAR(q);
@@ -6967,16 +6982,14 @@ void diffcore_std(struct diff_options *options)
options->found_follow = 0;
}
-int diff_result_code(struct diff_options *opt, int status)
+int diff_result_code(struct diff_options *opt)
{
int result = 0;
diff_warn_rename_limit("diff.renameLimit",
opt->needed_rename_limit,
opt->degraded_cc_to_c);
- if (!opt->flags.exit_with_status &&
- !(opt->output_format & DIFF_FORMAT_CHECKDIFF))
- return status;
+
if (opt->flags.exit_with_status &&
opt->flags.has_changes)
result |= 01;
@@ -7023,6 +7036,7 @@ void compute_diffstat(struct diff_options *options,
if (check_pair_status(p))
diff_flush_stat(p, options, diffstat);
}
+ options->found_changes = !!diffstat->nr;
}
void diff_addremove(struct diff_options *options,
diff --git a/diff.h b/diff.h
index 6c10ce289d..caf1528bf0 100644
--- a/diff.h
+++ b/diff.h
@@ -4,10 +4,12 @@
#ifndef DIFF_H
#define DIFF_H
+#include "hash-ll.h"
#include "pathspec.h"
-#include "oidset.h"
#include "strbuf.h"
+struct oidset;
+
/**
* The diff API is for programs that compare two sets of files (e.g. two trees,
* one tree and the index) and present the found difference in various ways.
@@ -531,10 +533,13 @@ void free_diffstat_info(struct diffstat_t *diffstat);
int parse_long_opt(const char *opt, const char **argv,
const char **optarg);
-int git_diff_basic_config(const char *var, const char *value, void *cb);
+struct config_context;
+int git_diff_basic_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb);
int git_diff_heuristic_config(const char *var, const char *value, void *cb);
void init_diff_ui_defaults(void);
-int git_diff_ui_config(const char *var, const char *value, void *cb);
+int git_diff_ui_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb);
void repo_diff_setup(struct repository *, struct diff_options *);
struct option *add_diff_options(const struct option *, struct diff_options *);
int diff_opt_parse(struct diff_options *, const char **, int, const char *);
@@ -632,17 +637,17 @@ void diff_get_merge_base(const struct rev_info *revs, struct object_id *mb);
#define DIFF_SILENT_ON_REMOVED 01
/* report racily-clean paths as modified */
#define DIFF_RACY_IS_MODIFIED 02
-int run_diff_files(struct rev_info *revs, unsigned int option);
+void run_diff_files(struct rev_info *revs, unsigned int option);
#define DIFF_INDEX_CACHED 01
#define DIFF_INDEX_MERGE_BASE 02
-int run_diff_index(struct rev_info *revs, unsigned int option);
+void run_diff_index(struct rev_info *revs, unsigned int option);
int do_diff_cache(const struct object_id *, struct diff_options *);
int diff_flush_patch_id(struct diff_options *, struct object_id *, int);
void flush_one_hunk(struct object_id *result, git_hash_ctx *ctx);
-int diff_result_code(struct diff_options *, int);
+int diff_result_code(struct diff_options *);
int diff_no_index(struct rev_info *,
int implicit_no_index, int, const char **);
@@ -701,4 +706,6 @@ void print_stat_summary(FILE *fp, int files,
int insertions, int deletions);
void setup_diff_pager(struct diff_options *);
+extern int diff_auto_refresh_index;
+
#endif /* DIFF_H */
diff --git a/diffcore-break.c b/diffcore-break.c
index 5462420bbb..f57ece2757 100644
--- a/diffcore-break.c
+++ b/diffcore-break.c
@@ -1,9 +1,11 @@
/*
* Copyright (C) 2005 Junio C Hamano
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "diff.h"
#include "diffcore.h"
+#include "hash.h"
+#include "object.h"
#include "promisor-remote.h"
static int should_break(struct repository *r,
diff --git a/diffcore-order.c b/diffcore-order.c
index 57ccab2846..e7d20ebd2d 100644
--- a/diffcore-order.c
+++ b/diffcore-order.c
@@ -5,6 +5,7 @@
#include "gettext.h"
#include "diff.h"
#include "diffcore.h"
+#include "wildmatch.h"
static char **order;
static int order_cnt;
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 13c98a7b5e..b195fa4eb3 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -7,6 +7,7 @@
#include "diffcore.h"
#include "xdiff-interface.h"
#include "kwset.h"
+#include "oidset.h"
#include "pretty.h"
#include "quote.h"
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 8e2e7a3ad7..5a6e2bcac7 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -3,10 +3,9 @@
* Copyright (C) 2005 Junio C Hamano
*/
#include "git-compat-util.h"
-#include "alloc.h"
#include "diff.h"
#include "diffcore.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "hashmap.h"
#include "mem-pool.h"
#include "oid-array.h"
diff --git a/dir-iterator.c b/dir-iterator.c
index fb7c47f0e8..278b04243a 100644
--- a/dir-iterator.c
+++ b/dir-iterator.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "dir.h"
#include "iterator.h"
#include "dir-iterator.h"
diff --git a/dir.c b/dir.c
index a7469df3ac..8486e4d56f 100644
--- a/dir.c
+++ b/dir.c
@@ -7,14 +7,15 @@
*/
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "convert.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
+#include "name-hash.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "attr.h"
#include "refs.h"
#include "wildmatch.h"
@@ -22,13 +23,14 @@
#include "utf8.h"
#include "varint.h"
#include "ewah/ewok.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
+#include "read-cache-ll.h"
#include "setup.h"
+#include "sparse-index.h"
#include "submodule-config.h"
#include "symlinks.h"
#include "trace2.h"
#include "tree.h"
-#include "wrapper.h"
/*
* Tells read_directory_recursive how a file or directory should be treated.
@@ -374,7 +376,7 @@ static int match_pathspec_item(struct index_state *istate,
return 0;
if (item->attr_match_nr &&
- !match_pathspec_attrs(istate, name, namelen, item))
+ !match_pathspec_attrs(istate, name - prefix, namelen + prefix, item))
return 0;
/* If the match was just the prefix, we matched */
diff --git a/dir.h b/dir.h
index d65a40126c..ad06682fd5 100644
--- a/dir.h
+++ b/dir.h
@@ -1,11 +1,14 @@
#ifndef DIR_H
#define DIR_H
+#include "hash-ll.h"
#include "hashmap.h"
#include "pathspec.h"
#include "statinfo.h"
#include "strbuf.h"
+struct repository;
+
/**
* The directory listing API is used to enumerate paths in the work tree,
* optionally taking `.git/info/exclude` and `.gitignore` files per directory
@@ -40,6 +43,8 @@
*
*/
+struct repository;
+
struct dir_entry {
unsigned int len;
char name[FLEX_ARRAY]; /* more */
diff --git a/editor.c b/editor.c
index 38c5dbbb79..b67b802ddf 100644
--- a/editor.c
+++ b/editor.c
@@ -11,7 +11,6 @@
#include "strvec.h"
#include "run-command.h"
#include "sigchain.h"
-#include "wrapper.h"
#ifndef DEFAULT_EDITOR
#define DEFAULT_EDITOR "vi"
diff --git a/entry.c b/entry.c
index 91a540bd29..43767f9043 100644
--- a/entry.c
+++ b/entry.c
@@ -1,10 +1,12 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "blob.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
+#include "name-hash.h"
+#include "sparse-index.h"
#include "streaming.h"
#include "submodule.h"
#include "symlinks.h"
@@ -12,7 +14,6 @@
#include "fsmonitor.h"
#include "entry.h"
#include "parallel-checkout.h"
-#include "wrapper.h"
static void create_directories(const char *path, int path_len,
const struct checkout *state)
diff --git a/environment.c b/environment.c
index d449f9719b..bb3c2a96a3 100644
--- a/environment.c
+++ b/environment.c
@@ -20,14 +20,14 @@
#include "commit.h"
#include "strvec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "replace-object.h"
#include "tmp-objdir.h"
#include "chdir-notify.h"
#include "setup.h"
#include "shallow.h"
#include "trace.h"
-#include "wrapper.h"
#include "write-or-die.h"
int trust_executable_bit = 1;
@@ -73,7 +73,7 @@ enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED;
#endif
enum object_creation_mode object_creation_mode = OBJECT_CREATION_MODE;
char *notes_ref_name;
-int grafts_replace_parents = 1;
+int grafts_keep_true_parents;
int core_apply_sparse_checkout;
int core_sparse_checkout_cone;
int sparse_expect_files_outside_of_patterns;
@@ -81,6 +81,7 @@ int merge_log_config = -1;
int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
unsigned long pack_size_limit_cfg;
enum log_refs_config log_all_ref_updates = LOG_REFS_UNSET;
+int max_allowed_tree_depth = 2048;
#ifndef PROTECT_HFS_DEFAULT
#define PROTECT_HFS_DEFAULT 0
@@ -108,7 +109,7 @@ char *git_work_tree_cfg;
static char *git_namespace;
/*
- * Repository-local GIT_* environment variables; see cache.h for details.
+ * Repository-local GIT_* environment variables; see environment.h for details.
*/
const char * const local_repo_env[] = {
ALTERNATE_DB_ENVIRONMENT,
diff --git a/environment.h b/environment.h
index e666807926..e5351c9dd9 100644
--- a/environment.h
+++ b/environment.h
@@ -1,9 +1,8 @@
#ifndef ENVIRONMENT_H
#define ENVIRONMENT_H
-#include "strvec.h"
-
struct repository;
+struct strvec;
/*
* The character that begins a commented line in user-editable file
@@ -133,6 +132,7 @@ extern size_t packed_git_limit;
extern size_t delta_base_cache_limit;
extern unsigned long big_file_threshold;
extern unsigned long pack_size_limit_cfg;
+extern int max_allowed_tree_depth;
/*
* Accessors for the core.sharedrepository config which lazy-load the value
@@ -194,7 +194,7 @@ extern enum object_creation_mode object_creation_mode;
extern char *notes_ref_name;
-extern int grafts_replace_parents;
+extern int grafts_keep_true_parents;
extern int repository_format_precious_objects;
diff --git a/ewah/bitmap.c b/ewah/bitmap.c
index 12d6aa398e..7b525b1ecd 100644
--- a/ewah/bitmap.c
+++ b/ewah/bitmap.c
@@ -17,7 +17,6 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "git-compat-util.h"
-#include "alloc.h"
#include "ewok.h"
#define EWAH_MASK(x) ((eword_t)1 << (x % BITS_IN_EWORD))
diff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c
index c6d4ffc87c..8785cbc54a 100644
--- a/ewah/ewah_bitmap.c
+++ b/ewah/ewah_bitmap.c
@@ -17,7 +17,6 @@
* 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"
diff --git a/exec-cmd.c b/exec-cmd.c
index 1e34e48c0e..1d597e84ea 100644
--- a/exec-cmd.c
+++ b/exec-cmd.c
@@ -1,10 +1,11 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "path.h"
#include "quote.h"
+#include "run-command.h"
#include "strvec.h"
#include "trace.h"
#include "trace2.h"
diff --git a/fetch-pack.c b/fetch-pack.c
index 0f71054fba..26999e3b65 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "repository.h"
#include "config.h"
#include "date.h"
@@ -24,7 +23,8 @@
#include "oid-array.h"
#include "oidset.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "connected.h"
#include "fetch-negotiator.h"
#include "fsck.h"
@@ -33,7 +33,6 @@
#include "commit-graph.h"
#include "sigchain.h"
#include "mergesort.h"
-#include "wrapper.h"
static int transfer_unpack_limit = -1;
static int fetch_unpack_limit = -1;
@@ -1860,7 +1859,8 @@ static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args,
return ref;
}
-static int fetch_pack_config_cb(const char *var, const char *value, void *cb)
+static int fetch_pack_config_cb(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (strcmp(var, "fetch.fsck.skiplist") == 0) {
const char *path;
@@ -1882,7 +1882,7 @@ static int fetch_pack_config_cb(const char *var, const char *value, void *cb)
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
static void fetch_pack_config(void)
@@ -1911,10 +1911,10 @@ static void fetch_pack_setup(void)
if (did_setup)
return;
fetch_pack_config();
- if (0 <= transfer_unpack_limit)
- unpack_limit = transfer_unpack_limit;
- else if (0 <= fetch_unpack_limit)
+ if (0 <= fetch_unpack_limit)
unpack_limit = fetch_unpack_limit;
+ else if (0 <= transfer_unpack_limit)
+ unpack_limit = transfer_unpack_limit;
did_setup = 1;
}
diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
index 5af0d4715b..66e47449a0 100644
--- a/fmt-merge-msg.c
+++ b/fmt-merge-msg.c
@@ -1,10 +1,9 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "refs.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "diff.h"
#include "diff-merges.h"
#include "hex.h"
@@ -15,16 +14,18 @@
#include "fmt-merge-msg.h"
#include "commit-reach.h"
#include "gpg-interface.h"
+#include "wildmatch.h"
static int use_branch_desc;
static int suppress_dest_pattern_seen;
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 fmt_merge_msg_config(const char *key, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(key, "merge.log") || !strcmp(key, "merge.summary")) {
int is_bool;
- merge_log_config = git_config_bool_or_int(key, value, &is_bool);
+ merge_log_config = git_config_bool_or_int(key, value, ctx->kvi, &is_bool);
if (!is_bool && merge_log_config < 0)
return error("%s: negative length %s", key, value);
if (is_bool && merge_log_config)
@@ -40,7 +41,7 @@ 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 {
- return git_default_config(key, value, cb);
+ return git_default_config(key, value, ctx, cb);
}
return 0;
}
@@ -508,7 +509,8 @@ static void fmt_tag_signature(struct strbuf *tagbuf,
strbuf_complete_line(tagbuf);
if (sig->len) {
strbuf_addch(tagbuf, '\n');
- strbuf_add_commented_lines(tagbuf, sig->buf, sig->len);
+ strbuf_add_commented_lines(tagbuf, sig->buf, sig->len,
+ comment_line_char);
}
}
@@ -554,7 +556,8 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
strbuf_addch(&tagline, '\n');
strbuf_add_commented_lines(&tagline,
origins.items[first_tag].string,
- strlen(origins.items[first_tag].string));
+ strlen(origins.items[first_tag].string),
+ comment_line_char);
strbuf_insert(&tagbuf, 0, tagline.buf,
tagline.len);
strbuf_release(&tagline);
@@ -562,7 +565,8 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
strbuf_addch(&tagbuf, '\n');
strbuf_add_commented_lines(&tagbuf,
origins.items[i].string,
- strlen(origins.items[i].string));
+ strlen(origins.items[i].string),
+ comment_line_char);
fmt_tag_signature(&tagbuf, &sig, buf, len);
}
strbuf_release(&payload);
diff --git a/fmt-merge-msg.h b/fmt-merge-msg.h
index 99054042dc..73ca3e4465 100644
--- a/fmt-merge-msg.h
+++ b/fmt-merge-msg.h
@@ -13,7 +13,8 @@ struct fmt_merge_msg_opts {
};
extern int merge_log_config;
-int fmt_merge_msg_config(const char *key, const char *value, void *cb);
+int fmt_merge_msg_config(const char *key, const char *value,
+ const struct config_context *ctx, void *cb);
int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
struct fmt_merge_msg_opts *);
diff --git a/fsck.c b/fsck.c
index 3261ef9ec2..6a0bbc5087 100644
--- a/fsck.c
+++ b/fsck.c
@@ -1,8 +1,9 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "date.h"
+#include "dir.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "repository.h"
#include "object.h"
#include "attr.h"
@@ -23,6 +24,8 @@
#include "credential.h"
#include "help.h"
+static ssize_t max_tree_entry_len = 4096;
+
#define STR(x) #x
#define MSG_ID(id, msg_type) { STR(id), NULL, NULL, FSCK_##msg_type },
static struct {
@@ -153,15 +156,29 @@ void fsck_set_msg_type(struct fsck_options *options,
const char *msg_id_str, const char *msg_type_str)
{
int msg_id = parse_msg_id(msg_id_str);
- enum fsck_msg_type msg_type = parse_msg_type(msg_type_str);
+ char *to_free = NULL;
+ enum fsck_msg_type msg_type;
if (msg_id < 0)
die("Unhandled message id: %s", msg_id_str);
+ if (msg_id == FSCK_MSG_LARGE_PATHNAME) {
+ const char *colon = strchr(msg_type_str, ':');
+ if (colon) {
+ msg_type_str = to_free =
+ xmemdupz(msg_type_str, colon - msg_type_str);
+ colon++;
+ if (!git_parse_ssize_t(colon, &max_tree_entry_len))
+ die("unable to parse max tree entry len: %s", colon);
+ }
+ }
+ msg_type = parse_msg_type(msg_type_str);
+
if (msg_type != FSCK_ERROR && msg_id_info[msg_id].msg_type == FSCK_FATAL)
die("Cannot demote %s to %s", msg_id_str, msg_type_str);
fsck_set_msg_type_from_ids(options, msg_id, msg_type);
+ free(to_free);
}
void fsck_set_msg_types(struct fsck_options *options, const char *values)
@@ -577,6 +594,7 @@ static int fsck_tree(const struct object_id *tree_oid,
int has_bad_modes = 0;
int has_dup_entries = 0;
int not_properly_sorted = 0;
+ int has_large_name = 0;
struct tree_desc desc;
unsigned o_mode;
const char *o_name;
@@ -606,6 +624,7 @@ static int fsck_tree(const struct object_id *tree_oid,
has_dotdot |= !strcmp(name, "..");
has_dotgit |= is_hfs_dotgit(name) || is_ntfs_dotgit(name);
has_zero_pad |= *(char *)desc.buffer == '0';
+ has_large_name |= tree_entry_len(&desc.entry) > max_tree_entry_len;
if (is_hfs_dotgitmodules(name) || is_ntfs_dotgitmodules(name)) {
if (!S_ISLNK(mode))
@@ -748,6 +767,10 @@ static int fsck_tree(const struct object_id *tree_oid,
retval += report(options, tree_oid, OBJ_TREE,
FSCK_MSG_TREE_NOT_SORTED,
"not properly sorted");
+ if (has_large_name)
+ retval += report(options, tree_oid, OBJ_TREE,
+ FSCK_MSG_LARGE_PATHNAME,
+ "contains excessively large pathname");
return retval;
}
@@ -1163,7 +1186,9 @@ struct fsck_gitmodules_data {
int ret;
};
-static int fsck_gitmodules_fn(const char *var, const char *value, void *vdata)
+static int fsck_gitmodules_fn(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *vdata)
{
struct fsck_gitmodules_data *data = vdata;
const char *subsection, *key;
@@ -1236,7 +1261,8 @@ static int fsck_blob(const struct object_id *oid, const char *buf,
data.ret = 0;
config_opts.error_action = CONFIG_ERROR_SILENT;
if (git_config_from_mem(fsck_gitmodules_fn, CONFIG_ORIGIN_BLOB,
- ".gitmodules", buf, size, &data, &config_opts))
+ ".gitmodules", buf, size, &data,
+ CONFIG_SCOPE_UNKNOWN, &config_opts))
data.ret |= report(options, oid, OBJ_BLOB,
FSCK_MSG_GITMODULES_PARSE,
"could not parse gitmodules blob");
@@ -1305,9 +1331,9 @@ int fsck_buffer(const struct object_id *oid, enum object_type type,
int fsck_error_function(struct fsck_options *o,
const struct object_id *oid,
- enum object_type object_type,
+ enum object_type object_type UNUSED,
enum fsck_msg_type msg_type,
- enum fsck_msg_id msg_id,
+ enum fsck_msg_id msg_id UNUSED,
const char *message)
{
if (msg_type == FSCK_WARN) {
@@ -1373,7 +1399,8 @@ int fsck_finish(struct fsck_options *options)
return ret;
}
-int git_fsck_config(const char *var, const char *value, void *cb)
+int git_fsck_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
struct fsck_options *options = cb;
if (strcmp(var, "fsck.skiplist") == 0) {
@@ -1394,7 +1421,7 @@ int git_fsck_config(const char *var, const char *value, void *cb)
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
/*
diff --git a/fsck.h b/fsck.h
index e17730e9da..e3adf9d911 100644
--- a/fsck.h
+++ b/fsck.h
@@ -73,6 +73,7 @@ enum fsck_msg_type {
FUNC(NULL_SHA1, WARN) \
FUNC(ZERO_PADDED_FILEMODE, WARN) \
FUNC(NUL_IN_COMMIT, WARN) \
+ FUNC(LARGE_PATHNAME, WARN) \
/* infos (reported as warnings, but ignored by default) */ \
FUNC(BAD_FILEMODE, INFO) \
FUNC(GITMODULES_PARSE, INFO) \
@@ -233,10 +234,12 @@ void fsck_put_object_name(struct fsck_options *options,
const char *fsck_describe_object(struct fsck_options *options,
const struct object_id *oid);
+struct key_value_info;
/*
* git_config() callback for use by fsck-y tools that want to support
* fsck.<msg> fsck.skipList etc.
*/
-int git_fsck_config(const char *var, const char *value, void *cb);
+int git_fsck_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb);
#endif
diff --git a/fsmonitor-ipc.c b/fsmonitor-ipc.c
index 6a6a89764a..88575aa54c 100644
--- a/fsmonitor-ipc.c
+++ b/fsmonitor-ipc.c
@@ -1,5 +1,5 @@
-#include "cache.h"
-#include "fsmonitor.h"
+#include "git-compat-util.h"
+#include "fsmonitor-ll.h"
#include "gettext.h"
#include "simple-ipc.h"
#include "fsmonitor-ipc.h"
diff --git a/fsmonitor-ll.h b/fsmonitor-ll.h
new file mode 100644
index 0000000000..0504ca07d6
--- /dev/null
+++ b/fsmonitor-ll.h
@@ -0,0 +1,52 @@
+#ifndef FSMONITOR_LL_H
+#define FSMONITOR_LL_H
+
+struct index_state;
+struct strbuf;
+
+extern struct trace_key trace_fsmonitor;
+
+/*
+ * Read the fsmonitor index extension and (if configured) restore the
+ * CE_FSMONITOR_VALID state.
+ */
+int read_fsmonitor_extension(struct index_state *istate, const void *data, unsigned long sz);
+
+/*
+ * Fill the fsmonitor_dirty ewah bits with their state from the index,
+ * before it is split during writing.
+ */
+void fill_fsmonitor_bitmap(struct index_state *istate);
+
+/*
+ * Write the CE_FSMONITOR_VALID state into the fsmonitor index
+ * extension. Reads from the fsmonitor_dirty ewah in the index.
+ */
+void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate);
+
+/*
+ * Add/remove the fsmonitor index extension
+ */
+void add_fsmonitor(struct index_state *istate);
+void remove_fsmonitor(struct index_state *istate);
+
+/*
+ * Add/remove the fsmonitor index extension as necessary based on the current
+ * core.fsmonitor setting.
+ */
+void tweak_fsmonitor(struct index_state *istate);
+
+/*
+ * Run the configured fsmonitor integration script and clear the
+ * CE_FSMONITOR_VALID bit for any files returned as dirty. Also invalidate
+ * any corresponding untracked cache directory structures. Optimized to only
+ * run the first time it is called.
+ */
+void refresh_fsmonitor(struct index_state *istate);
+
+/*
+ * Does the received result contain the "trivial" response?
+ */
+int fsmonitor_is_trivial_response(const struct strbuf *query_result);
+
+#endif /* FSMONITOR_LL_H */
diff --git a/fsmonitor.c b/fsmonitor.c
index 28c083d4d8..f670c50937 100644
--- a/fsmonitor.c
+++ b/fsmonitor.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
diff --git a/fsmonitor.h b/fsmonitor.h
index c67e0ebc09..5195a8624d 100644
--- a/fsmonitor.h
+++ b/fsmonitor.h
@@ -1,56 +1,13 @@
#ifndef FSMONITOR_H
#define FSMONITOR_H
-#include "cache.h"
+#include "fsmonitor-ll.h"
#include "dir.h"
#include "fsmonitor-settings.h"
+#include "object.h"
+#include "read-cache-ll.h"
#include "trace.h"
-extern struct trace_key trace_fsmonitor;
-
-/*
- * Read the fsmonitor index extension and (if configured) restore the
- * CE_FSMONITOR_VALID state.
- */
-int read_fsmonitor_extension(struct index_state *istate, const void *data, unsigned long sz);
-
-/*
- * Fill the fsmonitor_dirty ewah bits with their state from the index,
- * before it is split during writing.
- */
-void fill_fsmonitor_bitmap(struct index_state *istate);
-
-/*
- * Write the CE_FSMONITOR_VALID state into the fsmonitor index
- * extension. Reads from the fsmonitor_dirty ewah in the index.
- */
-void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate);
-
-/*
- * Add/remove the fsmonitor index extension
- */
-void add_fsmonitor(struct index_state *istate);
-void remove_fsmonitor(struct index_state *istate);
-
-/*
- * Add/remove the fsmonitor index extension as necessary based on the current
- * core.fsmonitor setting.
- */
-void tweak_fsmonitor(struct index_state *istate);
-
-/*
- * Run the configured fsmonitor integration script and clear the
- * CE_FSMONITOR_VALID bit for any files returned as dirty. Also invalidate
- * any corresponding untracked cache directory structures. Optimized to only
- * run the first time it is called.
- */
-void refresh_fsmonitor(struct index_state *istate);
-
-/*
- * Does the received result contain the "trivial" response?
- */
-int fsmonitor_is_trivial_response(const struct strbuf *query_result);
-
/*
* Check if refresh_fsmonitor has been called at least once.
* refresh_fsmonitor is idempotent. Returns true if fsmonitor is
diff --git a/git-compat-util.h b/git-compat-util.h
index 5b2b99c17c..3e7a59b5ff 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -422,6 +422,10 @@ char *gitdirname(char *);
#define PATH_MAX 4096
#endif
+#ifndef NAME_MAX
+#define NAME_MAX 255
+#endif
+
typedef uintmax_t timestamp_t;
#define PRItime PRIuMAX
#define parse_timestamp strtoumax
@@ -440,8 +444,10 @@ typedef uintmax_t timestamp_t;
#endif
#ifndef platform_core_config
+struct config_context;
static inline int noop_core_config(const char *var UNUSED,
const char *value UNUSED,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
return 0;
@@ -625,9 +631,7 @@ static inline int git_has_dir_sep(const char *path)
#include "compat/bswap.h"
-#include "wildmatch.h"
-
-struct strbuf;
+#include "wrapper.h"
/* General helper functions */
NORETURN void usage(const char *err);
@@ -679,9 +683,6 @@ void set_warn_routine(report_fn routine);
report_fn get_warn_routine(void);
void set_die_is_recursing_routine(int (*routine)(void));
-int starts_with(const char *str, const char *prefix);
-int istarts_with(const char *str, const char *prefix);
-
/*
* If the string "str" begins with the string found in "prefix", return 1.
* The "out" parameter is set to "str + strlen(prefix)" (i.e., to the point in
@@ -711,29 +712,6 @@ static inline int skip_prefix(const char *str, const char *prefix,
}
/*
- * If the string "str" is the same as the string in "prefix", then the "arg"
- * parameter is set to the "def" parameter and 1 is returned.
- * If the string "str" begins with the string found in "prefix" and then a
- * "=" sign, then the "arg" parameter is set to "str + strlen(prefix) + 1"
- * (i.e., to the point in the string right after the prefix and the "=" sign),
- * and 1 is returned.
- *
- * Otherwise, return 0 and leave "arg" untouched.
- *
- * When we accept both a "--key" and a "--key=<val>" option, this function
- * can be used instead of !strcmp(arg, "--key") and then
- * skip_prefix(arg, "--key=", &arg) to parse such an option.
- */
-int skip_to_optional_arg_default(const char *str, const char *prefix,
- const char **arg, const char *def);
-
-static inline int skip_to_optional_arg(const char *str, const char *prefix,
- const char **arg)
-{
- return skip_to_optional_arg_default(str, prefix, arg, "");
-}
-
-/*
* Like skip_prefix, but promises never to read past "len" bytes of the input
* buffer, and returns the remaining number of bytes in "out" via "outlen".
*/
@@ -777,12 +755,6 @@ static inline int strip_suffix(const char *str, const char *suffix, size_t *len)
return strip_suffix_mem(str, len, suffix);
}
-static inline int ends_with(const char *str, const char *suffix)
-{
- size_t len;
- return strip_suffix(str, suffix, &len);
-}
-
#define SWAP(a, b) do { \
void *_swap_a_ptr = &(a); \
void *_swap_b_ptr = &(b); \
@@ -1079,36 +1051,6 @@ static inline int cast_size_t_to_int(size_t a)
# define xalloca(size) (xmalloc(size))
# define xalloca_free(p) (free(p))
#endif
-char *xstrdup(const char *str);
-void *xmalloc(size_t size);
-void *xmallocz(size_t size);
-void *xmallocz_gently(size_t size);
-void *xmemdupz(const void *data, size_t len);
-char *xstrndup(const char *str, size_t len);
-void *xrealloc(void *ptr, size_t size);
-void *xcalloc(size_t nmemb, size_t size);
-void xsetenv(const char *name, const char *value, int overwrite);
-void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
-const char *mmap_os_err(void);
-void *xmmap_gently(void *start, size_t length, int prot, int flags, int fd, off_t offset);
-int xopen(const char *path, int flags, ...);
-ssize_t xread(int fd, void *buf, size_t len);
-ssize_t xwrite(int fd, const void *buf, size_t len);
-ssize_t xpread(int fd, void *buf, size_t len, off_t offset);
-int xdup(int fd);
-FILE *xfopen(const char *path, const char *mode);
-FILE *xfdopen(int fd, const char *mode);
-int xmkstemp(char *temp_filename);
-int xmkstemp_mode(char *temp_filename, int mode);
-char *xgetcwd(void);
-FILE *fopen_for_writing(const char *path);
-FILE *fopen_or_warn(const char *path, const char *mode);
-
-/*
- * Like strncmp, but only return zero if s is NUL-terminated and exactly len
- * characters long. If it is not, consider it greater than t.
- */
-int xstrncmpz(const char *s, const char *t, size_t len);
/*
* FREE_AND_NULL(ptr) is like free(ptr) followed by ptr = NULL. Note
@@ -1198,6 +1140,81 @@ static inline void move_array(void *dst, const void *src, size_t n, size_t size)
#define FLEXPTR_ALLOC_STR(x, ptrname, str) \
FLEXPTR_ALLOC_MEM((x), ptrname, (str), strlen(str))
+#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)
+
static inline char *xstrdup_or_null(const char *str)
{
return str ? xstrdup(str) : NULL;
@@ -1210,79 +1227,11 @@ static inline size_t xsize_t(off_t len)
return (size_t) len;
}
-__attribute__((format (printf, 3, 4)))
-int xsnprintf(char *dst, size_t max, const char *fmt, ...);
-
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 256
#endif
-int xgethostname(char *buf, size_t len);
-
-/* in ctype.c, for kwset users */
-extern const unsigned char tolower_trans_tbl[256];
-
-/* Sane ctype - no locale, and works with signed chars */
-#undef isascii
-#undef isspace
-#undef isdigit
-#undef isalpha
-#undef isalnum
-#undef isprint
-#undef islower
-#undef isupper
-#undef tolower
-#undef toupper
-#undef iscntrl
-#undef ispunct
-#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
-#define GIT_GLOB_SPECIAL 0x08
-#define GIT_REGEX_SPECIAL 0x10
-#define GIT_PATHSPEC_MAGIC 0x20
-#define GIT_CNTRL 0x40
-#define GIT_PUNCT 0x80
-#define sane_istest(x,mask) ((sane_ctype[(unsigned char)(x)] & (mask)) != 0)
-#define isascii(x) (((x) & ~0x7f) == 0)
-#define isspace(x) sane_istest(x,GIT_SPACE)
-#define isdigit(x) sane_istest(x,GIT_DIGIT)
-#define isalpha(x) sane_istest(x,GIT_ALPHA)
-#define isalnum(x) sane_istest(x,GIT_ALPHA | GIT_DIGIT)
-#define isprint(x) ((x) >= 0x20 && (x) <= 0x7e)
-#define islower(x) sane_iscase(x, 1)
-#define isupper(x) sane_iscase(x, 0)
-#define is_glob_special(x) sane_istest(x,GIT_GLOB_SPECIAL)
-#define is_regex_special(x) sane_istest(x,GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL)
-#define iscntrl(x) (sane_istest(x,GIT_CNTRL))
-#define ispunct(x) sane_istest(x, GIT_PUNCT | GIT_REGEX_SPECIAL | \
- GIT_GLOB_SPECIAL | GIT_PATHSPEC_MAGIC)
-#define isxdigit(x) (hexval_table[(unsigned char)(x)] != -1)
-#define tolower(x) sane_case((unsigned char)(x), 0x20)
-#define toupper(x) sane_case((unsigned char)(x), 0)
-#define is_pathspec_magic(x) sane_istest(x,GIT_PATHSPEC_MAGIC)
-
-static inline int sane_case(int x, int high)
-{
- if (sane_istest(x, GIT_ALPHA))
- x = (x & ~0x20) | high;
- return x;
-}
-
-static inline int sane_iscase(int x, int is_lower)
-{
- if (!sane_istest(x, GIT_ALPHA))
- return 0;
-
- if (is_lower)
- return (x & 0x20) != 0;
- else
- return (x & 0x20) == 0;
-}
+#include "sane-ctype.h"
/*
* Like skip_prefix, but compare case-insensitively. Note that the comparison
@@ -1459,72 +1408,6 @@ void bug_fl(const char *file, int line, const char *fmt, ...);
#endif
#endif
-enum fsync_action {
- FSYNC_WRITEOUT_ONLY,
- FSYNC_HARDWARE_FLUSH
-};
-
-/*
- * Issues an fsync against the specified file according to the specified mode.
- *
- * FSYNC_WRITEOUT_ONLY attempts to use interfaces available on some operating
- * systems to flush the OS cache without issuing a flush command to the storage
- * controller. If those interfaces are unavailable, the function fails with
- * ENOSYS.
- *
- * FSYNC_HARDWARE_FLUSH does an OS writeout and hardware flush to ensure that
- * changes are durable. It is not expected to fail.
- */
-int git_fsync(int fd, enum fsync_action action);
-
-/*
- * Writes out trace statistics for fsync using the trace2 API.
- */
-void trace_git_fsync_stats(void);
-
-/*
- * Preserves errno, prints a message, but gives no warning for ENOENT.
- * Returns 0 on success, which includes trying to unlink an object that does
- * not exist.
- */
-int unlink_or_warn(const char *path);
- /*
- * Tries to unlink file. Returns 0 if unlink succeeded
- * or the file already didn't exist. Returns -1 and
- * appends a message to err suitable for
- * 'error("%s", err->buf)' on error.
- */
-int unlink_or_msg(const char *file, struct strbuf *err);
-/*
- * Preserves errno, prints a message, but gives no warning for ENOENT.
- * Returns 0 on success, which includes trying to remove a directory that does
- * not exist.
- */
-int rmdir_or_warn(const char *path);
-/*
- * Calls the correct function out of {unlink,rmdir}_or_warn based on
- * the supplied file mode.
- */
-int remove_or_warn(unsigned int mode, const char *path);
-
-/*
- * Call access(2), but warn for any error except "missing file"
- * (ENOENT or ENOTDIR).
- */
-#define ACCESS_EACCES_OK (1U << 0)
-int access_or_warn(const char *path, int mode, unsigned flag);
-int access_or_die(const char *path, int mode, unsigned flag);
-
-/* Warn on an inaccessible file if errno indicates this is an error */
-int warn_on_fopen_errors(const char *path);
-
-/*
- * Open with O_NOFOLLOW, or equivalent. Note that the fallback equivalent
- * may be racy. Do not use this as protection against an attacker who can
- * simultaneously create paths.
- */
-int open_nofollow(const char *path, int flags);
-
#ifndef SHELL_PATH
# define SHELL_PATH "/bin/sh"
#endif
@@ -1664,13 +1547,4 @@ static inline void *container_of_or_null_offset(void *ptr, size_t offset)
((uintptr_t)&(ptr)->member - (uintptr_t)(ptr))
#endif /* !__GNUC__ */
-void sleep_millisec(int millisec);
-
-/*
- * Generate len bytes from the system cryptographically secure PRNG.
- * Returns 0 on success and -1 on error, setting errno. The inability to
- * satisfy the full request is an error.
- */
-int csprng_bytes(void *buf, size_t len);
-
#endif
diff --git a/git-gui/Makefile b/git-gui/Makefile
index a0d5a4b28e..3f80435436 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -138,25 +138,10 @@ GITGUI_SCRIPT := $$0
GITGUI_RELATIVE :=
GITGUI_MACOSXAPP :=
-ifeq ($(uname_O),Cygwin)
- GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
-
- # Is this a Cygwin Tcl/Tk binary? If so it knows how to do
- # POSIX path translation just like cygpath does and we must
- # keep libdir in POSIX format so Cygwin packages of git-gui
- # work no matter where the user installs them.
- #
- ifeq ($(shell echo 'puts [file normalize /]' | '$(TCL_PATH_SQ)'),$(shell cygpath --mixed --absolute /))
- gg_libdir_sed_in := $(gg_libdir)
- else
- gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
- endif
-else
- ifeq ($(exedir),$(gg_libdir))
- GITGUI_RELATIVE := 1
- endif
- gg_libdir_sed_in := $(gg_libdir)
+ifeq ($(exedir),$(gg_libdir))
+ GITGUI_RELATIVE := 1
endif
+gg_libdir_sed_in := $(gg_libdir)
ifeq ($(uname_S),Darwin)
ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
GITGUI_MACOSXAPP := YesPlease
diff --git a/git-gui/README.md b/git-gui/README.md
index 5ce2122fbc..b460b649a8 100644
--- a/git-gui/README.md
+++ b/git-gui/README.md
@@ -88,7 +88,7 @@ that you first use `git-format-patch` to generate the emails, audit them, and
then send them via `git-send-email`.
A pretty good guide to configuring and using `git-send-email` can be found
-[here](https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/)
+[here](https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/).
### Using your email client
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 201524c34e..8bc8892c40 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -46,6 +46,132 @@ catch {rename send {}} ; # What an evil concept...
######################################################################
##
+## Enabling platform-specific code paths
+
+proc is_MacOSX {} {
+ if {[tk windowingsystem] eq {aqua}} {
+ return 1
+ }
+ return 0
+}
+
+proc is_Windows {} {
+ if {$::tcl_platform(platform) eq {windows}} {
+ return 1
+ }
+ return 0
+}
+
+set _iscygwin {}
+proc is_Cygwin {} {
+ global _iscygwin
+ if {$_iscygwin eq {}} {
+ if {[string match "CYGWIN_*" $::tcl_platform(os)]} {
+ set _iscygwin 1
+ } else {
+ set _iscygwin 0
+ }
+ }
+ return $_iscygwin
+}
+
+######################################################################
+##
+## PATH lookup
+
+set _search_path {}
+proc _which {what args} {
+ global env _search_exe _search_path
+
+ if {$_search_path eq {}} {
+ if {[is_Windows]} {
+ set gitguidir [file dirname [info script]]
+ regsub -all ";" $gitguidir "\\;" gitguidir
+ set env(PATH) "$gitguidir;$env(PATH)"
+ set _search_path [split $env(PATH) {;}]
+ # Skip empty `PATH` elements
+ set _search_path [lsearch -all -inline -not -exact \
+ $_search_path ""]
+ set _search_exe .exe
+ } else {
+ set _search_path [split $env(PATH) :]
+ set _search_exe {}
+ }
+ }
+
+ if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
+ set suffix {}
+ } else {
+ set suffix $_search_exe
+ }
+
+ foreach p $_search_path {
+ set p [file join $p $what$suffix]
+ if {[file exists $p]} {
+ return [file normalize $p]
+ }
+ }
+ return {}
+}
+
+proc sanitize_command_line {command_line from_index} {
+ set i $from_index
+ while {$i < [llength $command_line]} {
+ set cmd [lindex $command_line $i]
+ if {[file pathtype $cmd] ne "absolute"} {
+ set fullpath [_which $cmd]
+ if {$fullpath eq ""} {
+ throw {NOT-FOUND} "$cmd not found in PATH"
+ }
+ lset command_line $i $fullpath
+ }
+
+ # handle piped commands, e.g. `exec A | B`
+ for {incr i} {$i < [llength $command_line]} {incr i} {
+ if {[lindex $command_line $i] eq "|"} {
+ incr i
+ break
+ }
+ }
+ }
+ return $command_line
+}
+
+# Override `exec` to avoid unsafe PATH lookup
+
+rename exec real_exec
+
+proc exec {args} {
+ # skip options
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ set arg [lindex $args $i]
+ if {$arg eq "--"} {
+ incr i
+ break
+ }
+ if {[string range $arg 0 0] ne "-"} {
+ break
+ }
+ }
+ set args [sanitize_command_line $args $i]
+ uplevel 1 real_exec $args
+}
+
+# Override `open` to avoid unsafe PATH lookup
+
+rename open real_open
+
+proc open {args} {
+ set arg0 [lindex $args 0]
+ if {[string range $arg0 0 0] eq "|"} {
+ set command_line [string trim [string range $arg0 1 end]]
+ lset args 0 "| [sanitize_command_line $command_line 0]"
+ }
+ uplevel 1 real_open $args
+}
+
+######################################################################
+##
## locate our library
if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
@@ -163,8 +289,6 @@ set _isbare {}
set _gitexec {}
set _githtmldir {}
set _reponame {}
-set _iscygwin {}
-set _search_path {}
set _shellpath {@@SHELL_PATH@@}
set _trace [lsearch -exact $argv --trace]
@@ -211,14 +335,7 @@ proc gitexec {args} {
if {[catch {set _gitexec [git --exec-path]} err]} {
error "Git not installed?\n\n$err"
}
- if {[is_Cygwin]} {
- set _gitexec [exec cygpath \
- --windows \
- --absolute \
- $_gitexec]
- } else {
- set _gitexec [file normalize $_gitexec]
- }
+ set _gitexec [file normalize $_gitexec]
}
if {$args eq {}} {
return $_gitexec
@@ -233,14 +350,7 @@ proc githtmldir {args} {
# Git not installed or option not yet supported
return {}
}
- if {[is_Cygwin]} {
- set _githtmldir [exec cygpath \
- --windows \
- --absolute \
- $_githtmldir]
- } else {
- set _githtmldir [file normalize $_githtmldir]
- }
+ set _githtmldir [file normalize $_githtmldir]
}
if {$args eq {}} {
return $_githtmldir
@@ -252,40 +362,6 @@ proc reponame {} {
return $::_reponame
}
-proc is_MacOSX {} {
- if {[tk windowingsystem] eq {aqua}} {
- return 1
- }
- return 0
-}
-
-proc is_Windows {} {
- if {$::tcl_platform(platform) eq {windows}} {
- return 1
- }
- return 0
-}
-
-proc is_Cygwin {} {
- global _iscygwin
- if {$_iscygwin eq {}} {
- if {$::tcl_platform(platform) eq {windows}} {
- if {[catch {set p [exec cygpath --windir]} err]} {
- set _iscygwin 0
- } else {
- set _iscygwin 1
- # Handle MSys2 which is only cygwin when MSYSTEM is MSYS.
- if {[info exists ::env(MSYSTEM)] && $::env(MSYSTEM) ne "MSYS"} {
- set _iscygwin 0
- }
- }
- } else {
- set _iscygwin 0
- }
- }
- return $_iscygwin
-}
-
proc is_enabled {option} {
global enabled_options
if {[catch {set on $enabled_options($option)}]} {return 0}
@@ -448,44 +524,6 @@ proc _git_cmd {name} {
return $v
}
-proc _which {what args} {
- global env _search_exe _search_path
-
- if {$_search_path eq {}} {
- if {[is_Cygwin] && [regexp {^(/|\.:)} $env(PATH)]} {
- set _search_path [split [exec cygpath \
- --windows \
- --path \
- --absolute \
- $env(PATH)] {;}]
- set _search_exe .exe
- } elseif {[is_Windows]} {
- set gitguidir [file dirname [info script]]
- regsub -all ";" $gitguidir "\\;" gitguidir
- set env(PATH) "$gitguidir;$env(PATH)"
- set _search_path [split $env(PATH) {;}]
- set _search_exe .exe
- } else {
- set _search_path [split $env(PATH) :]
- set _search_exe {}
- }
- }
-
- if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
- set suffix {}
- } else {
- set suffix $_search_exe
- }
-
- foreach p $_search_path {
- set p [file join $p $what$suffix]
- if {[file exists $p]} {
- return [file normalize $p]
- }
- }
- return {}
-}
-
# Test a file for a hashbang to identify executable scripts on Windows.
proc is_shellscript {filename} {
if {![file exists $filename]} {return 0}
@@ -1259,9 +1297,6 @@ if {$_gitdir eq "."} {
set _gitdir [pwd]
}
-if {![file isdirectory $_gitdir] && [is_Cygwin]} {
- catch {set _gitdir [exec cygpath --windows $_gitdir]}
-}
if {![file isdirectory $_gitdir]} {
catch {wm withdraw .}
error_popup [strcat [mc "Git directory not found:"] "\n\n$_gitdir"]
@@ -1273,11 +1308,7 @@ apply_config
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
if {[package vcompare $_git_version 1.7.0] >= 0} {
- if { [is_Cygwin] } {
- catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
- } else {
- set _gitworktree [git rev-parse --show-toplevel]
- }
+ set _gitworktree [git rev-parse --show-toplevel]
} else {
# try to set work tree from environment, core.worktree or use
# cdup to obtain a relative path to the top of the worktree. If
@@ -1502,24 +1533,8 @@ proc rescan {after {honor_trustmtime 1}} {
}
}
-if {[is_Cygwin]} {
- set is_git_info_exclude {}
- proc have_info_exclude {} {
- global is_git_info_exclude
-
- if {$is_git_info_exclude eq {}} {
- if {[catch {exec test -f [gitdir info exclude]}]} {
- set is_git_info_exclude 0
- } else {
- set is_git_info_exclude 1
- }
- }
- return $is_git_info_exclude
- }
-} else {
- proc have_info_exclude {} {
- return [file readable [gitdir info exclude]]
- }
+proc have_info_exclude {} {
+ return [file readable [gitdir info exclude]]
}
proc rescan_stage2 {fd after} {
@@ -2259,7 +2274,9 @@ proc do_git_gui {} {
# Get the system-specific explorer app/command.
proc get_explorer {} {
- if {[is_Cygwin] || [is_Windows]} {
+ if {[is_Cygwin]} {
+ set explorer "/bin/cygstart.exe --explore"
+ } elseif {[is_Windows]} {
set explorer "explorer.exe"
} elseif {[is_MacOSX]} {
set explorer "open"
@@ -3053,10 +3070,6 @@ if {[is_MacOSX]} {
set doc_path [githtmldir]
if {$doc_path ne {}} {
set doc_path [file join $doc_path index.html]
-
- if {[is_Cygwin]} {
- set doc_path [exec cygpath --mixed $doc_path]
- }
}
if {[file isfile $doc_path]} {
@@ -4028,60 +4041,6 @@ set file_lists($ui_workdir) [list]
wm title . "[appname] ([reponame]) [file normalize $_gitworktree]"
focus -force $ui_comm
-# -- Warn the user about environmental problems. Cygwin's Tcl
-# does *not* pass its env array onto any processes it spawns.
-# This means that git processes get none of our environment.
-#
-if {[is_Cygwin]} {
- set ignored_env 0
- set suggest_user {}
- set msg [mc "Possible environment issues exist.
-
-The following environment variables are probably
-going to be ignored by any Git subprocess run
-by %s:
-
-" [appname]]
- foreach name [array names env] {
- switch -regexp -- $name {
- {^GIT_INDEX_FILE$} -
- {^GIT_OBJECT_DIRECTORY$} -
- {^GIT_ALTERNATE_OBJECT_DIRECTORIES$} -
- {^GIT_DIFF_OPTS$} -
- {^GIT_EXTERNAL_DIFF$} -
- {^GIT_PAGER$} -
- {^GIT_TRACE$} -
- {^GIT_CONFIG$} -
- {^GIT_(AUTHOR|COMMITTER)_DATE$} {
- append msg " - $name\n"
- incr ignored_env
- }
- {^GIT_(AUTHOR|COMMITTER)_(NAME|EMAIL)$} {
- append msg " - $name\n"
- incr ignored_env
- set suggest_user $name
- }
- }
- }
- if {$ignored_env > 0} {
- append msg [mc "
-This is due to a known issue with the
-Tcl binary distributed by Cygwin."]
-
- if {$suggest_user ne {}} {
- append msg [mc "
-
-A good replacement for %s
-is placing values for the user.name and
-user.email settings into your personal
-~/.gitconfig file.
-" $suggest_user]
- }
- warn_popup $msg
- }
- unset ignored_env msg suggest_user name
-}
-
# -- Only initialize complex UI if we are going to stay running.
#
if {[is_enabled transport]} {
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index af1fee7c75..d23abedcb3 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -174,9 +174,6 @@ constructor pick {} {
-foreground blue \
-underline 1
set home $::env(HOME)
- if {[is_Cygwin]} {
- set home [exec cygpath --windows --absolute $home]
- }
set home "[file normalize $home]/"
set hlen [string length $home]
foreach p $sorted_recent {
@@ -374,18 +371,6 @@ proc _objdir {path} {
return $objdir
}
- if {[is_Cygwin]} {
- set objdir [file join $path .git objects.lnk]
- if {[file isfile $objdir]} {
- return [win32_read_lnk $objdir]
- }
-
- set objdir [file join $path objects.lnk]
- if {[file isfile $objdir]} {
- return [win32_read_lnk $objdir]
- }
- }
-
return {}
}
@@ -623,12 +608,6 @@ method _do_clone2 {} {
}
set giturl $origin_url
- if {[is_Cygwin] && [file isdirectory $giturl]} {
- set giturl [exec cygpath --unix --absolute $giturl]
- if {$clone_type eq {shared}} {
- set objdir [exec cygpath --unix --absolute $objdir]
- }
- }
if {[file exists $local_path]} {
error_popup [mc "Location %s already exists." $local_path]
@@ -668,11 +647,7 @@ method _do_clone2 {} {
fconfigure $f_cp -translation binary -encoding binary
cd $objdir
while {[gets $f_in line] >= 0} {
- if {[is_Cygwin]} {
- puts $f_cp [exec cygpath --unix --absolute $line]
- } else {
- puts $f_cp [file normalize $line]
- }
+ puts $f_cp [file normalize $line]
}
close $f_in
close $f_cp
diff --git a/git-gui/lib/shortcut.tcl b/git-gui/lib/shortcut.tcl
index 97d1d7aa02..674a41f5e0 100644
--- a/git-gui/lib/shortcut.tcl
+++ b/git-gui/lib/shortcut.tcl
@@ -27,13 +27,10 @@ proc do_windows_shortcut {} {
}
proc do_cygwin_shortcut {} {
- global argv0 _gitworktree
+ global argv0 _gitworktree oguilib
if {[catch {
set desktop [exec cygpath \
- --windows \
- --absolute \
- --long-name \
--desktop]
}]} {
set desktop .
@@ -48,19 +45,19 @@ proc do_cygwin_shortcut {} {
set fn ${fn}.lnk
}
if {[catch {
- set sh [exec cygpath \
- --windows \
- --absolute \
- /bin/sh.exe]
- set me [exec cygpath \
- --unix \
- --absolute \
- $argv0]
- win32_create_lnk $fn [list \
- $sh -c \
- "CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \
- ] \
- [file normalize $_gitworktree]
+ set repodir [file normalize $_gitworktree]
+ set shargs {-c \
+ "CHERE_INVOKING=1 \
+ source /etc/profile; \
+ git gui"}
+ exec /bin/mkshortcut.exe \
+ --arguments $shargs \
+ --desc "git-gui on $repodir" \
+ --icon $oguilib/git-gui.ico \
+ --name $fn \
+ --show min \
+ --workingdir $repodir \
+ /bin/sh.exe
} err]} {
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
}
diff --git a/git-send-email.perl b/git-send-email.perl
index affbb88509..897cea6564 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -26,18 +26,6 @@ use Git::I18N;
Getopt::Long::Configure qw/ pass_through /;
-package FakeTerm;
-sub new {
- my ($class, $reason) = @_;
- return bless \$reason, shift;
-}
-sub readline {
- my $self = shift;
- die "Cannot use readline on FakeTerm: $$self";
-}
-package main;
-
-
sub usage {
print <<EOT;
git send-email' [<options>] <file|directory>
@@ -971,17 +959,19 @@ EOT3
do_edit(@files);
}
-sub term {
- my $term = eval {
+{
+ # Only instantiate one $term per program run, since some
+ # Term::ReadLine providers refuse to create a second instance.
+ my $term;
+ sub term {
require Term::ReadLine;
- $ENV{"GIT_SEND_EMAIL_NOTTY"}
- ? Term::ReadLine->new('git-send-email', \*STDIN, \*STDOUT)
- : Term::ReadLine->new('git-send-email');
- };
- if ($@) {
- $term = FakeTerm->new("$@: going non-interactive");
+ if (!defined $term) {
+ $term = $ENV{"GIT_SEND_EMAIL_NOTTY"}
+ ? Term::ReadLine->new('git-send-email', \*STDIN, \*STDOUT)
+ : Term::ReadLine->new('git-send-email');
+ }
+ return $term;
}
- return $term;
}
sub ask {
diff --git a/git-svn.perl b/git-svn.perl
index be987e316f..4e8878f035 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -297,28 +297,12 @@ my %cmd = (
{} ],
);
-package FakeTerm;
-sub new {
- my ($class, $reason) = @_;
- return bless \$reason, shift;
-}
-sub readline {
- my $self = shift;
- die "Cannot use readline on FakeTerm: $$self";
-}
-package main;
-
my $term;
sub term_init {
- $term = eval {
- require Term::ReadLine;
- $ENV{"GIT_SVN_NOTTY"}
+ require Term::ReadLine;
+ $term = $ENV{"GIT_SVN_NOTTY"}
? new Term::ReadLine 'git-svn', \*STDIN, \*STDOUT
: new Term::ReadLine 'git-svn';
- };
- if ($@) {
- $term = new FakeTerm "$@: going non-interactive";
- }
}
my $cmd;
diff --git a/git.c b/git.c
index bb6ea3547e..c67e44dd82 100644
--- a/git.c
+++ b/git.c
@@ -5,6 +5,7 @@
#include "gettext.h"
#include "help.h"
#include "pager.h"
+#include "read-cache-ll.h"
#include "run-command.h"
#include "alias.h"
#include "replace-object.h"
diff --git a/gpg-interface.c b/gpg-interface.c
index 19a3471a0b..48f43c5a21 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -12,9 +12,10 @@
#include "sigchain.h"
#include "tempfile.h"
#include "alias.h"
-#include "wrapper.h"
+#include "environment.h"
-static int git_gpg_config(const char *, const char *, void *);
+static int git_gpg_config(const char *, const char *,
+ const struct config_context *, void *);
static void gpg_interface_lazy_init(void)
{
@@ -586,8 +587,8 @@ static int verify_ssh_signed_buffer(struct signature_check *sigc,
}
}
- strbuf_stripspace(&ssh_keygen_out, 0);
- strbuf_stripspace(&ssh_keygen_err, 0);
+ strbuf_stripspace(&ssh_keygen_out, '\0');
+ strbuf_stripspace(&ssh_keygen_err, '\0');
/* Add stderr outputs to show the user actual ssh-keygen errors */
strbuf_add(&ssh_keygen_out, ssh_principals_err.buf, ssh_principals_err.len);
strbuf_add(&ssh_keygen_out, ssh_keygen_err.buf, ssh_keygen_err.len);
@@ -720,7 +721,9 @@ void set_signing_key(const char *key)
configured_signing_key = xstrdup(key);
}
-static int git_gpg_config(const char *var, const char *value, void *cb UNUSED)
+static int git_gpg_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *cb UNUSED)
{
struct gpg_format *fmt = NULL;
char *fmtname = NULL;
diff --git a/grep.c b/grep.c
index f00986c451..fc2d0c837a 100644
--- a/grep.c
+++ b/grep.c
@@ -3,7 +3,7 @@
#include "gettext.h"
#include "grep.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pretty.h"
#include "userdiff.h"
#include "xdiff-interface.h"
@@ -12,13 +12,12 @@
#include "commit.h"
#include "quote.h"
#include "help.h"
-#include "wrapper.h"
static int grep_source_load(struct grep_source *gs);
static int grep_source_is_binary(struct grep_source *gs,
struct index_state *istate);
-static void std_output(struct grep_opt *opt, const void *buf, size_t size)
+static void std_output(struct grep_opt *opt UNUSED, const void *buf, size_t size)
{
fwrite(buf, size, 1, stdout);
}
@@ -56,7 +55,8 @@ define_list_config_array_extra(color_grep_slots, {"match"});
* Read the configuration file once and store it in
* the grep_defaults template.
*/
-int grep_config(const char *var, const char *value, void *cb)
+int grep_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
struct grep_opt *opt = cb;
const char *slot;
@@ -91,9 +91,9 @@ int grep_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "color.grep"))
opt->color = git_config_colorbool(var, value);
if (!strcmp(var, "color.grep.match")) {
- if (grep_config("color.grep.matchcontext", value, cb) < 0)
+ if (grep_config("color.grep.matchcontext", value, ctx, cb) < 0)
return -1;
- if (grep_config("color.grep.matchselected", value, cb) < 0)
+ if (grep_config("color.grep.matchselected", value, ctx, cb) < 0)
return -1;
} else if (skip_prefix(var, "color.grep.", &slot)) {
int i = LOOKUP_CONFIG(color_grep_slots, slot);
@@ -452,18 +452,20 @@ static void free_pcre2_pattern(struct grep_pat *p)
pcre2_general_context_free(p->pcre2_general_context);
}
#else /* !USE_LIBPCRE2 */
-static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt)
+static void compile_pcre2_pattern(struct grep_pat *p UNUSED,
+ const struct grep_opt *opt UNUSED)
{
die("cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE");
}
-static int pcre2match(struct grep_pat *p, const char *line, const char *eol,
- regmatch_t *match, int eflags)
+static int pcre2match(struct grep_pat *p UNUSED, const char *line UNUSED,
+ const char *eol UNUSED, regmatch_t *match UNUSED,
+ int eflags UNUSED)
{
return 1;
}
-static void free_pcre2_pattern(struct grep_pat *p)
+static void free_pcre2_pattern(struct grep_pat *p UNUSED)
{
}
diff --git a/grep.h b/grep.h
index c59592e3bd..926c0875c4 100644
--- a/grep.h
+++ b/grep.h
@@ -202,7 +202,9 @@ struct grep_opt {
.output = std_output, \
}
-int grep_config(const char *var, const char *value, void *);
+struct config_context;
+int grep_config(const char *var, const char *value,
+ const struct config_context *ctx, void *data);
void grep_init(struct grep_opt *, struct repository *repo);
void append_grep_pat(struct grep_opt *opt, const char *pat, size_t patlen, const char *origin, int no, enum grep_pat_token t);
diff --git a/hash-ll.h b/hash-ll.h
index 8050925137..10d84cc208 100644
--- a/hash-ll.h
+++ b/hash-ll.h
@@ -4,7 +4,11 @@
#if defined(SHA1_APPLE)
#include <CommonCrypto/CommonDigest.h>
#elif defined(SHA1_OPENSSL)
-#include <openssl/sha.h>
+# include <openssl/sha.h>
+# if defined(OPENSSL_API_LEVEL) && OPENSSL_API_LEVEL >= 3
+# define SHA1_NEEDS_CLONE_HELPER
+# include "sha1/openssl.h"
+# endif
#elif defined(SHA1_DC)
#include "sha1dc_git.h"
#else /* SHA1_BLK */
@@ -17,7 +21,11 @@
#define SHA256_NEEDS_CLONE_HELPER
#include "sha256/gcrypt.h"
#elif defined(SHA256_OPENSSL)
-#include <openssl/sha.h>
+# include <openssl/sha.h>
+# if defined(OPENSSL_API_LEVEL) && OPENSSL_API_LEVEL >= 3
+# define SHA256_NEEDS_CLONE_HELPER
+# include "sha256/openssl.h"
+# endif
#else
#include "sha256/block/sha256.h"
#endif
@@ -41,6 +49,10 @@
#define git_SHA1_Update platform_SHA1_Update
#define git_SHA1_Final platform_SHA1_Final
+#ifdef platform_SHA1_Clone
+#define git_SHA1_Clone platform_SHA1_Clone
+#endif
+
#ifndef platform_SHA256_CTX
#define platform_SHA256_CTX SHA256_CTX
#define platform_SHA256_Init SHA256_Init
@@ -63,10 +75,12 @@
#define git_SHA1_Update git_SHA1_Update_Chunked
#endif
+#ifndef SHA1_NEEDS_CLONE_HELPER
static inline void git_SHA1_Clone(git_SHA_CTX *dst, const git_SHA_CTX *src)
{
memcpy(dst, src, sizeof(*dst));
}
+#endif
#ifndef SHA256_NEEDS_CLONE_HELPER
static inline void git_SHA256_Clone(git_SHA256_CTX *dst, const git_SHA256_CTX *src)
@@ -270,6 +284,25 @@ static inline void oid_set_algo(struct object_id *oid, const struct git_hash_alg
oid->algo = hash_algo_by_ptr(algop);
}
+/*
+ * Converts a cryptographic hash (e.g. SHA-1) into an int-sized hash code
+ * for use in hash tables. Cryptographic hashes are supposed to have
+ * uniform distribution, so in contrast to `memhash()`, this just copies
+ * the first `sizeof(int)` bytes without shuffling any bits. Note that
+ * the results will be different on big-endian and little-endian
+ * platforms, so they should not be stored or transferred over the net.
+ */
+static inline unsigned int oidhash(const struct object_id *oid)
+{
+ /*
+ * Equivalent to 'return *(unsigned int *)oid->hash;', but safe on
+ * platforms that don't support unaligned reads.
+ */
+ unsigned int hash;
+ memcpy(&hash, oid->hash, sizeof(hash));
+ return hash;
+}
+
const char *empty_tree_oid_hex(void);
const char *empty_blob_oid_hex(void);
diff --git a/hash-lookup.c b/hash-lookup.c
index bb54dfde9c..9f0f95e2b9 100644
--- a/hash-lookup.c
+++ b/hash-lookup.c
@@ -1,6 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "hash.h"
#include "hash-lookup.h"
+#include "read-cache-ll.h"
static uint32_t take2(const struct object_id *oid, size_t ofs)
{
diff --git a/hashmap.h b/hashmap.h
index 2695f3d3a6..c8216e47bb 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -1,8 +1,6 @@
#ifndef HASHMAP_H
#define HASHMAP_H
-#include "hash-ll.h"
-
/*
* Generic implementation of hash-based key-value mappings.
*
@@ -121,25 +119,6 @@ unsigned int memihash(const void *buf, size_t len);
unsigned int memihash_cont(unsigned int hash_seed, const void *buf, size_t len);
/*
- * Converts a cryptographic hash (e.g. SHA-1) into an int-sized hash code
- * for use in hash tables. Cryptographic hashes are supposed to have
- * uniform distribution, so in contrast to `memhash()`, this just copies
- * the first `sizeof(int)` bytes without shuffling any bits. Note that
- * the results will be different on big-endian and little-endian
- * platforms, so they should not be stored or transferred over the net.
- */
-static inline unsigned int oidhash(const struct object_id *oid)
-{
- /*
- * Equivalent to 'return *(unsigned int *)oid->hash;', but safe on
- * platforms that don't support unaligned reads.
- */
- unsigned int hash;
- memcpy(&hash, oid->hash, sizeof(hash));
- return hash;
-}
-
-/*
* struct hashmap_entry is an opaque structure representing an entry in the
* hash table.
* Ideally it should be followed by an int-sized member to prevent unused
diff --git a/help.c b/help.c
index 5d7637dce9..6d2ebfbd2a 100644
--- a/help.c
+++ b/help.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "builtin.h"
#include "exec-cmd.h"
@@ -309,7 +308,8 @@ void load_command_list(const char *prefix,
exclude_cmds(other_cmds, main_cmds);
}
-static int get_colopts(const char *var, const char *value, void *data)
+static int get_colopts(const char *var, const char *value,
+ const struct config_context *ctx UNUSED, void *data)
{
unsigned int *colopts = data;
@@ -459,7 +459,8 @@ void list_developer_interfaces_help(void)
putchar('\n');
}
-static int get_alias(const char *var, const char *value, void *data)
+static int get_alias(const char *var, const char *value,
+ const struct config_context *ctx UNUSED, void *data)
{
struct string_list *list = data;
@@ -543,6 +544,7 @@ static struct cmdnames aliases;
#define AUTOCORRECT_IMMEDIATELY (-1)
static int git_unknown_cmd_config(const char *var, const char *value,
+ const struct config_context *ctx,
void *cb UNUSED)
{
const char *p;
@@ -557,7 +559,7 @@ static int git_unknown_cmd_config(const char *var, const char *value,
} else if (!strcmp(value, "prompt")) {
autocorrect = AUTOCORRECT_PROMPT;
} else {
- int v = git_config_int(var, value);
+ int v = git_config_int(var, value, ctx->kvi);
autocorrect = (v < 0)
? AUTOCORRECT_IMMEDIATELY : v;
}
diff --git a/hex.c b/hex.c
index 7bb440e794..01f17fe5c9 100644
--- a/hex.c
+++ b/hex.c
@@ -63,7 +63,7 @@ static int get_hash_hex_algop(const char *hex, unsigned char *hash,
return 0;
}
-int get_sha1_hex(const char *hex, unsigned char *sha1)
+int get_hash_hex(const char *hex, unsigned char *sha1)
{
return get_hash_hex_algop(hex, sha1, the_hash_algo);
}
diff --git a/hex.h b/hex.h
index 7df4b3c460..87abf66602 100644
--- a/hex.h
+++ b/hex.h
@@ -20,14 +20,16 @@ static inline int hex2chr(const char *s)
}
/*
- * 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.
+ * Try to read a hash (specified by the_hash_algo) in hexadecimal
+ * format from the 40 (or whatever length the hash algorithm uses)
+ * characters starting at hex. Write the 20-byte (or the length of
+ * the hash) result to hash 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);
+int get_hash_hex(const char *hex, unsigned char *hash);
+int get_oid_hex(const char *hex, struct object_id *oid);
/* 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);
diff --git a/hook.c b/hook.c
index 3ca5e60895..f6306d72b3 100644
--- a/hook.c
+++ b/hook.c
@@ -1,4 +1,5 @@
#include "git-compat-util.h"
+#include "abspath.h"
#include "advice.h"
#include "gettext.h"
#include "hook.h"
diff --git a/http-backend.c b/http-backend.c
index ac146d85c5..ff07b87e64 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -1,9 +1,9 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "git-zlib.h"
#include "hex.h"
+#include "path.h"
#include "repository.h"
#include "refs.h"
#include "pkt-line.h"
@@ -15,10 +15,9 @@
#include "url.h"
#include "strvec.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "protocol.h"
#include "date.h"
-#include "wrapper.h"
#include "write-or-die.h"
static const char content_type[] = "Content-Type";
@@ -559,7 +558,7 @@ static void get_info_refs(struct strbuf *hdr, char *arg UNUSED)
} else {
select_getanyfile(hdr);
- for_each_namespaced_ref(show_text_ref, &buf);
+ for_each_namespaced_ref(NULL, show_text_ref, &buf);
send_strbuf(hdr, "text/plain", &buf);
}
strbuf_release(&buf);
diff --git a/http-push.c b/http-push.c
index 29cf9db34e..a704f490fd 100644
--- a/http-push.c
+++ b/http-push.c
@@ -18,7 +18,7 @@
#include "tree.h"
#include "tree-walk.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit-reach.h"
#ifdef EXPAT_NEEDS_XMLPARSE_H
@@ -783,7 +783,7 @@ static void handle_new_lock_ctx(struct xml_ctx *ctx, int tag_closed)
static void one_remote_ref(const char *refname);
static void
-xml_start_tag(void *userData, const char *name, const char **atts)
+xml_start_tag(void *userData, const char *name, const char **atts UNUSED)
{
struct xml_ctx *ctx = (struct xml_ctx *)userData;
const char *c = strchr(name, ':');
diff --git a/http-walker.c b/http-walker.c
index bba306b2d5..78d99f7c4b 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -7,7 +7,7 @@
#include "list.h"
#include "transport.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
struct alt_base {
char *base;
diff --git a/http.c b/http.c
index b71bb1e3ad..e138b4b96f 100644
--- a/http.c
+++ b/http.c
@@ -18,7 +18,7 @@
#include "protocol.h"
#include "string-list.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
static struct trace_key trace_curl = TRACE_KEY_INIT(CURL);
static int trace_curl_data = 1;
@@ -196,7 +196,7 @@ static inline int is_hdr_continuation(const char *ptr, const size_t size)
return size && (*ptr == ' ' || *ptr == '\t');
}
-static size_t fwrite_wwwauth(char *ptr, size_t eltsize, size_t nmemb, void *p)
+static size_t fwrite_wwwauth(char *ptr, size_t eltsize, size_t nmemb, void *p UNUSED)
{
size_t size = eltsize * nmemb;
struct strvec *values = &http_auth.wwwauth_headers;
@@ -295,7 +295,8 @@ exit:
return size;
}
-size_t fwrite_null(char *ptr, size_t eltsize, size_t nmemb, void *strbuf)
+size_t fwrite_null(char *ptr UNUSED, size_t eltsize UNUSED, size_t nmemb,
+ void *data UNUSED)
{
return nmemb;
}
@@ -363,7 +364,8 @@ static void process_curl_messages(void)
}
}
-static int http_options(const char *var, const char *value, void *cb)
+static int http_options(const char *var, const char *value,
+ const struct config_context *ctx, void *data)
{
if (!strcmp("http.version", var)) {
return git_config_string(&curl_http_version, var, value);
@@ -413,21 +415,21 @@ static int http_options(const char *var, const char *value, void *cb)
}
if (!strcmp("http.minsessions", var)) {
- min_curl_sessions = git_config_int(var, value);
+ min_curl_sessions = git_config_int(var, value, ctx->kvi);
if (min_curl_sessions > 1)
min_curl_sessions = 1;
return 0;
}
if (!strcmp("http.maxrequests", var)) {
- max_requests = git_config_int(var, value);
+ max_requests = git_config_int(var, value, ctx->kvi);
return 0;
}
if (!strcmp("http.lowspeedlimit", var)) {
- curl_low_speed_limit = (long)git_config_int(var, value);
+ curl_low_speed_limit = (long)git_config_int(var, value, ctx->kvi);
return 0;
}
if (!strcmp("http.lowspeedtime", var)) {
- curl_low_speed_time = (long)git_config_int(var, value);
+ curl_low_speed_time = (long)git_config_int(var, value, ctx->kvi);
return 0;
}
@@ -463,7 +465,7 @@ static int http_options(const char *var, const char *value, void *cb)
}
if (!strcmp("http.postbuffer", var)) {
- http_post_buffer = git_config_ssize_t(var, value);
+ http_post_buffer = git_config_ssize_t(var, value, ctx->kvi);
if (http_post_buffer < 0)
warning(_("negative value for http.postBuffer; defaulting to %d"), LARGE_PACKET_MAX);
if (http_post_buffer < LARGE_PACKET_MAX)
@@ -534,7 +536,7 @@ static int http_options(const char *var, const char *value, void *cb)
}
/* Fall back on the default ones */
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, data);
}
static int curl_empty_auth_enabled(void)
@@ -820,7 +822,9 @@ static void curl_dump_info(char *data, size_t size)
strbuf_release(&buf);
}
-static int curl_trace(CURL *handle, curl_infotype type, char *data, size_t size, void *userp)
+static int curl_trace(CURL *handle UNUSED, curl_infotype type,
+ char *data, size_t size,
+ void *userp UNUSED)
{
const char *text;
enum { NO_FILTER = 0, DO_FILTER = 1 };
diff --git a/ident.c b/ident.c
index 8fad92d700..cc7afdbf81 100644
--- a/ident.c
+++ b/ident.c
@@ -203,7 +203,6 @@ void reset_ident_date(void)
static int crud(unsigned char c)
{
return c <= 32 ||
- c == '.' ||
c == ',' ||
c == ':' ||
c == ';' ||
@@ -671,7 +670,9 @@ static int set_ident(const char *var, const char *value)
return 0;
}
-int git_ident_config(const char *var, const char *value, void *data UNUSED)
+int git_ident_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *data UNUSED)
{
if (!strcmp(var, "user.useconfigonly")) {
ident_use_config_only = git_config_bool(var, value);
diff --git a/ident.h b/ident.h
index 96a64896a0..6a79febba1 100644
--- a/ident.h
+++ b/ident.h
@@ -62,6 +62,8 @@ 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 *);
+struct config_context;
+int git_ident_config(const char *, const char *, const struct config_context *,
+ void *);
#endif
diff --git a/imap-send.c b/imap-send.c
index 7f5426177a..996651e4f8 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -30,7 +30,6 @@
#include "parse-options.h"
#include "setup.h"
#include "strbuf.h"
-#include "wrapper.h"
#if defined(NO_OPENSSL) && !defined(HAVE_OPENSSL_CSPRNG)
typedef void *SSL;
#endif
@@ -137,12 +136,10 @@ struct imap_store {
};
struct imap_cmd_cb {
- int (*cont)(struct imap_store *ctx, struct imap_cmd *cmd, const char *prompt);
- void (*done)(struct imap_store *ctx, struct imap_cmd *cmd, int response);
+ int (*cont)(struct imap_store *ctx, const char *prompt);
void *ctx;
char *data;
int dlen;
- int uid;
};
struct imap_cmd {
@@ -209,10 +206,14 @@ static void socket_perror(const char *func, struct imap_socket *sock, int ret)
else
fprintf(stderr, "%s: unexpected EOF\n", func);
}
+ /* mark as used to appease -Wunused-parameter with NO_OPENSSL */
+ (void)sock;
}
#ifdef NO_OPENSSL
-static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int verify)
+static int ssl_socket_connect(struct imap_socket *sock UNUSED,
+ int use_tls_only UNUSED,
+ int verify UNUSED)
{
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
return -1;
@@ -786,7 +787,7 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd)
if (n != (int)cmdp->cb.dlen)
return RESP_BAD;
} else if (cmdp->cb.cont) {
- if (cmdp->cb.cont(ctx, cmdp, cmd))
+ if (cmdp->cb.cont(ctx, cmd))
return RESP_BAD;
} else {
fprintf(stderr, "IMAP error: unexpected command continuation request\n");
@@ -828,8 +829,6 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd)
}
if ((resp2 = parse_response_code(ctx, &cmdp->cb, cmd)) > resp)
resp = resp2;
- if (cmdp->cb.done)
- cmdp->cb.done(ctx, cmdp, resp);
free(cmdp->cb.data);
free(cmdp->cmd);
free(cmdp);
@@ -909,7 +908,9 @@ static char *cram(const char *challenge_64, const char *user, const char *pass)
#else
-static char *cram(const char *challenge_64, const char *user, const char *pass)
+static char *cram(const char *challenge_64 UNUSED,
+ const char *user UNUSED,
+ const char *pass UNUSED)
{
die("If you want to use CRAM-MD5 authenticate method, "
"you have to build git-imap-send with OpenSSL library.");
@@ -917,7 +918,7 @@ static char *cram(const char *challenge_64, const char *user, const char *pass)
#endif
-static int auth_cram_md5(struct imap_store *ctx, struct imap_cmd *cmd, const char *prompt)
+static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
{
int ret;
char *response;
@@ -1323,7 +1324,8 @@ static int split_msg(struct strbuf *all_msgs, struct strbuf *msg, int *ofs)
return 1;
}
-static int git_imap_config(const char *var, const char *val, void *cb)
+static int git_imap_config(const char *var, const char *val,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp("imap.sslverify", var))
@@ -1341,7 +1343,7 @@ static int git_imap_config(const char *var, const char *val, void *cb)
else if (!strcmp("imap.authmethod", var))
return git_config_string(&server.auth_method, var, val);
else if (!strcmp("imap.port", var))
- server.port = git_config_int(var, val);
+ server.port = git_config_int(var, val, ctx->kvi);
else if (!strcmp("imap.host", var)) {
if (!val) {
git_die_config("imap.host", "Missing value for 'imap.host'");
@@ -1357,7 +1359,7 @@ static int git_imap_config(const char *var, const char *val, void *cb)
server.host = xstrdup(val);
}
} else
- return git_default_config(var, val, cb);
+ return git_default_config(var, val, ctx, cb);
return 0;
}
@@ -1415,16 +1417,16 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
if (!curl)
die("curl_easy_init failed");
- server_fill_credential(&server, cred);
- curl_easy_setopt(curl, CURLOPT_USERNAME, server.user);
- curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);
+ server_fill_credential(srvc, cred);
+ curl_easy_setopt(curl, CURLOPT_USERNAME, srvc->user);
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, srvc->pass);
- strbuf_addstr(&path, server.use_ssl ? "imaps://" : "imap://");
- strbuf_addstr(&path, server.host);
+ strbuf_addstr(&path, srvc->use_ssl ? "imaps://" : "imap://");
+ strbuf_addstr(&path, srvc->host);
if (!path.len || path.buf[path.len - 1] != '/')
strbuf_addch(&path, '/');
- uri_encoded_folder = curl_easy_escape(curl, server.folder, 0);
+ uri_encoded_folder = curl_easy_escape(curl, srvc->folder, 0);
if (!uri_encoded_folder)
die("failed to encode server folder");
strbuf_addstr(&path, uri_encoded_folder);
@@ -1432,25 +1434,25 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
curl_easy_setopt(curl, CURLOPT_URL, path.buf);
strbuf_release(&path);
- curl_easy_setopt(curl, CURLOPT_PORT, server.port);
+ curl_easy_setopt(curl, CURLOPT_PORT, srvc->port);
- if (server.auth_method) {
+ if (srvc->auth_method) {
#ifndef GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS
warning("No LOGIN_OPTIONS support in this cURL version");
#else
struct strbuf auth = STRBUF_INIT;
strbuf_addstr(&auth, "AUTH=");
- strbuf_addstr(&auth, server.auth_method);
+ strbuf_addstr(&auth, srvc->auth_method);
curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
strbuf_release(&auth);
#endif
}
- if (!server.use_ssl)
+ if (!srvc->use_ssl)
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, server.ssl_verify);
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, server.ssl_verify);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, srvc->ssl_verify);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, srvc->ssl_verify);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
diff --git a/khash.h b/khash.h
index 56241e6a5c..ff88163177 100644
--- a/khash.h
+++ b/khash.h
@@ -26,7 +26,6 @@
#ifndef __AC_KHASH_H
#define __AC_KHASH_H
-#include "hashmap.h"
#include "hash.h"
#define AC_VERSION_KHASH_H "0.2.8"
@@ -62,7 +61,7 @@ static inline khint_t __ac_X31_hash_string(const char *s)
static const double __ac_HASH_UPPER = 0.77;
#define __KHASH_TYPE(name, khkey_t, khval_t) \
- typedef struct { \
+ typedef struct kh_##name { \
khint_t n_buckets, size, n_occupied, upper_bound; \
khint32_t *flags; \
khkey_t *keys; \
diff --git a/kwset.c b/kwset.c
index 4b14d4f86b..bbfcf815a5 100644
--- a/kwset.c
+++ b/kwset.c
@@ -49,6 +49,42 @@ static void *obstack_chunk_alloc(long size)
#define U(c) ((unsigned char) (c))
+/* For case-insensitive kwset */
+const unsigned char tolower_trans_tbl[256] = {
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+ ' ', '!', '"', '#', '$', '%', '&', 0x27,
+ '(', ')', '*', '+', ',', '-', '.', '/',
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', ':', ';', '<', '=', '>', '?',
+ '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', '[', 0x5c, ']', '^', '_',
+ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', '{', '|', '}', '~', 0x7f,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
+ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
+ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
+};
+
/* Balanced tree of edges and labels leaving a given trie node. */
struct tree
{
diff --git a/kwset.h b/kwset.h
index f50ecae573..d42a793a30 100644
--- a/kwset.h
+++ b/kwset.h
@@ -26,6 +26,8 @@
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
+extern const unsigned char tolower_trans_tbl[256];
+
struct kwsmatch
{
int index; /* Index number of matching keyword. */
diff --git a/line-log.c b/line-log.c
index 6a7ac312a4..790ab73212 100644
--- a/line-log.c
+++ b/line-log.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "line-range.h"
#include "hex.h"
#include "tag.h"
@@ -8,6 +7,7 @@
#include "diff.h"
#include "commit.h"
#include "decorate.h"
+#include "repository.h"
#include "revision.h"
#include "xdiff-interface.h"
#include "strbuf.h"
diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 2a3b7881af..8a08b7af49 100644
--- a/list-objects-filter-options.c
+++ b/list-objects-filter-options.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "commit.h"
#include "config.h"
#include "gettext.h"
diff --git a/list-objects-filter-options.h b/list-objects-filter-options.h
index f620612586..55fab8563d 100644
--- a/list-objects-filter-options.h
+++ b/list-objects-filter-options.h
@@ -3,7 +3,6 @@
#include "gettext.h"
#include "object.h"
-#include "string-list.h"
#include "strbuf.h"
struct option;
diff --git a/list-objects-filter.c b/list-objects-filter.c
index 5d270ce598..9327ccd505 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "dir.h"
#include "gettext.h"
#include "hex.h"
@@ -16,7 +15,7 @@
#include "oidmap.h"
#include "oidset.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
/* Remember to update object flag allocation in object.h */
/*
diff --git a/list-objects.c b/list-objects.c
index eecca721ac..c25c72b32c 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -12,8 +12,9 @@
#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "trace.h"
+#include "environment.h"
struct traversal_context {
struct rev_info *revs;
@@ -21,6 +22,7 @@ struct traversal_context {
show_commit_fn show_commit;
void *show_data;
struct filter *filter;
+ int depth;
};
static void show_commit(struct traversal_context *ctx,
@@ -102,7 +104,7 @@ static void process_tree_contents(struct traversal_context *ctx,
while (tree_entry(&desc, &entry)) {
if (match != all_entries_interesting) {
match = tree_entry_interesting(ctx->revs->repo->index,
- &entry, base, 0,
+ &entry, base,
&ctx->revs->diffopt.pathspec);
if (match == all_entries_not_interesting)
break;
@@ -118,7 +120,9 @@ static void process_tree_contents(struct traversal_context *ctx,
entry.path, oid_to_hex(&tree->object.oid));
}
t->object.flags |= NOT_USER_GIVEN;
+ ctx->depth++;
process_tree(ctx, t, base, entry.path);
+ ctx->depth--;
}
else if (S_ISGITLINK(entry.mode))
; /* ignore gitlink */
@@ -156,6 +160,9 @@ static void process_tree(struct traversal_context *ctx,
!revs->include_check_obj(&tree->object, revs->include_check_data))
return;
+ if (ctx->depth > max_allowed_tree_depth)
+ die("exceeded maximum allowed tree depth");
+
failed_parse = parse_tree_gently(tree, 1);
if (failed_parse) {
if (revs->ignore_missing_links)
@@ -349,6 +356,7 @@ static void traverse_non_commits(struct traversal_context *ctx,
if (!path)
path = "";
if (obj->type == OBJ_TREE) {
+ ctx->depth = 0;
process_tree(ctx, (struct tree *)obj, base, path);
continue;
}
diff --git a/log-tree.c b/log-tree.c
index 48468087af..504da6b519 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -5,7 +5,7 @@
#include "environment.h"
#include "hex.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "repository.h"
#include "tmp-objdir.h"
#include "commit.h"
@@ -16,6 +16,7 @@
#include "reflog-walk.h"
#include "refs.h"
#include "replace-object.h"
+#include "revision.h"
#include "string-list.h"
#include "color.h"
#include "gpg-interface.h"
@@ -25,6 +26,7 @@
#include "range-diff.h"
#include "strmap.h"
#include "tree.h"
+#include "wildmatch.h"
#include "write-or-die.h"
static struct decoration name_decoration = { "object names" };
@@ -301,26 +303,43 @@ static void show_name(struct strbuf *sb, const struct name_decoration *decoratio
/*
* The caller makes sure there is no funny color before calling.
- * format_decorations_extended makes sure the same after return.
+ * format_decorations ensures the same after return.
*/
-void format_decorations_extended(struct strbuf *sb,
+void format_decorations(struct strbuf *sb,
const struct commit *commit,
int use_color,
- const char *prefix,
- const char *separator,
- const char *suffix)
+ const struct decoration_options *opts)
{
const struct name_decoration *decoration;
const struct name_decoration *current_and_HEAD;
- const char *color_commit =
- diff_get_color(use_color, DIFF_COMMIT);
- const char *color_reset =
- decorate_get_color(use_color, DECORATION_NONE);
+ const char *color_commit, *color_reset;
+
+ const char *prefix = " (";
+ const char *suffix = ")";
+ const char *separator = ", ";
+ const char *pointer = " -> ";
+ const char *tag = "tag: ";
decoration = get_name_decoration(&commit->object);
if (!decoration)
return;
+ if (opts) {
+ if (opts->prefix)
+ prefix = opts->prefix;
+ if (opts->suffix)
+ suffix = opts->suffix;
+ if (opts->separator)
+ separator = opts->separator;
+ if (opts->pointer)
+ pointer = opts->pointer;
+ if (opts->tag)
+ tag = opts->tag;
+ }
+
+ color_commit = diff_get_color(use_color, DIFF_COMMIT);
+ color_reset = decorate_get_color(use_color, DECORATION_NONE);
+
current_and_HEAD = current_pointed_by_HEAD(decoration);
while (decoration) {
/*
@@ -329,31 +348,44 @@ void format_decorations_extended(struct strbuf *sb,
* appeared, skipping the entry for current.
*/
if (decoration != current_and_HEAD) {
- strbuf_addstr(sb, color_commit);
- strbuf_addstr(sb, prefix);
- strbuf_addstr(sb, color_reset);
- strbuf_addstr(sb, decorate_get_color(use_color, decoration->type));
- if (decoration->type == DECORATION_REF_TAG)
- strbuf_addstr(sb, "tag: ");
+ const char *color =
+ decorate_get_color(use_color, decoration->type);
+
+ if (*prefix) {
+ strbuf_addstr(sb, color_commit);
+ strbuf_addstr(sb, prefix);
+ strbuf_addstr(sb, color_reset);
+ }
+ if (*tag && decoration->type == DECORATION_REF_TAG) {
+ strbuf_addstr(sb, color);
+ strbuf_addstr(sb, tag);
+ strbuf_addstr(sb, color_reset);
+ }
+
+ strbuf_addstr(sb, color);
show_name(sb, decoration);
+ strbuf_addstr(sb, color_reset);
if (current_and_HEAD &&
decoration->type == DECORATION_REF_HEAD) {
- strbuf_addstr(sb, " -> ");
+ strbuf_addstr(sb, color_commit);
+ strbuf_addstr(sb, pointer);
strbuf_addstr(sb, color_reset);
strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type));
show_name(sb, current_and_HEAD);
+ strbuf_addstr(sb, color_reset);
}
- strbuf_addstr(sb, color_reset);
prefix = separator;
}
decoration = decoration->next;
}
- strbuf_addstr(sb, color_commit);
- strbuf_addstr(sb, suffix);
- strbuf_addstr(sb, color_reset);
+ if (*suffix) {
+ strbuf_addstr(sb, color_commit);
+ strbuf_addstr(sb, suffix);
+ strbuf_addstr(sb, color_reset);
+ }
}
void show_decorations(struct rev_info *opt, struct commit *commit)
@@ -368,7 +400,7 @@ void show_decorations(struct rev_info *opt, struct commit *commit)
}
if (!opt->show_decorations)
return;
- format_decorations(&sb, commit, opt->diffopt.use_color);
+ format_decorations(&sb, commit, opt->diffopt.use_color, NULL);
fputs(sb.buf, opt->diffopt.file);
strbuf_release(&sb);
}
diff --git a/log-tree.h b/log-tree.h
index e7e4641cf8..41c776fea5 100644
--- a/log-tree.h
+++ b/log-tree.h
@@ -1,7 +1,7 @@
#ifndef LOG_TREE_H
#define LOG_TREE_H
-#include "revision.h"
+struct rev_info;
struct log_info {
struct commit *commit, *parent;
@@ -13,17 +13,20 @@ struct decoration_filter {
struct string_list *exclude_ref_config_pattern;
};
+struct decoration_options {
+ char *prefix;
+ char *suffix;
+ char *separator;
+ char *pointer;
+ char *tag;
+};
+
int parse_decorate_color_config(const char *var, const char *slot_name, const char *value);
int log_tree_diff_flush(struct rev_info *);
int log_tree_commit(struct rev_info *, struct commit *);
void show_log(struct rev_info *opt);
-void format_decorations_extended(struct strbuf *sb, const struct commit *commit,
- int use_color,
- const char *prefix,
- const char *separator,
- const char *suffix);
-#define format_decorations(strbuf, commit, color) \
- format_decorations_extended((strbuf), (commit), (color), " (", ", ", ")")
+void format_decorations(struct strbuf *sb, const struct commit *commit,
+ int use_color, const struct decoration_options *opts);
void show_decorations(struct rev_info *opt, struct commit *commit);
void log_write_email_headers(struct rev_info *opt, struct commit *commit,
const char **extra_headers_p,
diff --git a/ls-refs.c b/ls-refs.c
index f385938b64..0e49b932c3 100644
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -72,7 +72,7 @@ struct ls_refs_data {
unsigned symrefs;
struct strvec prefixes;
struct strbuf buf;
- struct string_list hidden_refs;
+ struct strvec hidden_refs;
unsigned unborn : 1;
};
@@ -137,6 +137,7 @@ static void send_possibly_unborn_head(struct ls_refs_data *data)
}
static int ls_refs_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb_data)
{
struct ls_refs_data *data = cb_data;
@@ -155,7 +156,7 @@ int ls_refs(struct repository *r, struct packet_reader *request)
memset(&data, 0, sizeof(data));
strvec_init(&data.prefixes);
strbuf_init(&data.buf, 0);
- string_list_init_dup(&data.hidden_refs);
+ strvec_init(&data.hidden_refs);
git_config(ls_refs_config, &data);
@@ -193,11 +194,12 @@ int ls_refs(struct repository *r, struct packet_reader *request)
strvec_push(&data.prefixes, "");
refs_for_each_fullref_in_prefixes(get_main_ref_store(r),
get_git_namespace(), data.prefixes.v,
+ hidden_refs_to_excludes(&data.hidden_refs),
send_ref, &data);
packet_fflush(stdout);
strvec_clear(&data.prefixes);
strbuf_release(&data.buf);
- string_list_clear(&data.hidden_refs, 0);
+ strvec_clear(&data.hidden_refs);
return 0;
}
diff --git a/mailinfo.c b/mailinfo.c
index 2aeb20e5e6..931505363c 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -1241,12 +1241,13 @@ int mailinfo_parse_quoted_cr_action(const char *actionstr, int *action)
return 0;
}
-static int git_mailinfo_config(const char *var, const char *value, void *mi_)
+static int git_mailinfo_config(const char *var, const char *value,
+ const struct config_context *ctx, void *mi_)
{
struct mailinfo *mi = mi_;
if (!starts_with(var, "mailinfo."))
- return git_default_config(var, value, NULL);
+ return git_default_config(var, value, ctx, NULL);
if (!strcmp(var, "mailinfo.scissors")) {
mi->use_scissors = git_config_bool(var, value);
return 0;
diff --git a/mailmap.c b/mailmap.c
index 5dc5223c43..3d6a5e9400 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -3,7 +3,7 @@
#include "string-list.h"
#include "mailmap.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "setup.h"
const char *git_mailmap_file;
diff --git a/match-trees.c b/match-trees.c
index 6bc8eb7647..0885ac681c 100644
--- a/match-trees.c
+++ b/match-trees.c
@@ -1,9 +1,10 @@
#include "git-compat-util.h"
#include "hex.h"
#include "match-trees.h"
+#include "strbuf.h"
#include "tree.h"
#include "tree-walk.h"
-#include "object-store.h"
+#include "object-store-ll.h"
static int score_missing(unsigned mode)
{
diff --git a/merge-blobs.c b/merge-blobs.c
index 5632ff6abb..9293cbf75c 100644
--- a/merge-blobs.c
+++ b/merge-blobs.c
@@ -1,10 +1,10 @@
#include "git-compat-util.h"
#include "run-command.h"
#include "xdiff-interface.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "blob.h"
#include "merge-blobs.h"
-#include "object-store.h"
+#include "object-store-ll.h"
static int fill_mmfile_blob(mmfile_t *f, struct blob *obj)
{
diff --git a/ll-merge.c b/merge-ll.c
index 07ec16e8e5..8fcf2d3710 100644
--- a/ll-merge.c
+++ b/merge-ll.c
@@ -10,10 +10,9 @@
#include "attr.h"
#include "xdiff-interface.h"
#include "run-command.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "quote.h"
#include "strbuf.h"
-#include "wrapper.h"
struct ll_merge_driver;
@@ -192,24 +191,15 @@ static enum ll_merge_result ll_ext_merge(const struct ll_merge_driver *fn,
const struct ll_merge_options *opts,
int marker_size)
{
- char temp[4][50];
+ char temp[3][50];
struct strbuf cmd = STRBUF_INIT;
- struct strbuf_expand_dict_entry dict[6];
- struct strbuf path_sq = STRBUF_INIT;
+ const char *format = fn->cmdline;
struct child_process child = CHILD_PROCESS_INIT;
int status, fd, i;
struct stat st;
enum ll_merge_result ret;
assert(opts);
- sq_quote_buf(&path_sq, path);
- dict[0].placeholder = "O"; dict[0].value = temp[0];
- dict[1].placeholder = "A"; dict[1].value = temp[1];
- dict[2].placeholder = "B"; dict[2].value = temp[2];
- dict[3].placeholder = "L"; dict[3].value = temp[3];
- dict[4].placeholder = "P"; dict[4].value = path_sq.buf;
- dict[5].placeholder = NULL; dict[5].value = NULL;
-
if (!fn->cmdline)
die("custom merge driver %s lacks command line.", fn->name);
@@ -218,9 +208,23 @@ static enum ll_merge_result ll_ext_merge(const struct ll_merge_driver *fn,
create_temp(orig, temp[0], sizeof(temp[0]));
create_temp(src1, temp[1], sizeof(temp[1]));
create_temp(src2, temp[2], sizeof(temp[2]));
- xsnprintf(temp[3], sizeof(temp[3]), "%d", marker_size);
- strbuf_expand(&cmd, fn->cmdline, strbuf_expand_dict_cb, &dict);
+ while (strbuf_expand_step(&cmd, &format)) {
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(&cmd, '%');
+ else if (skip_prefix(format, "O", &format))
+ strbuf_addstr(&cmd, temp[0]);
+ else if (skip_prefix(format, "A", &format))
+ strbuf_addstr(&cmd, temp[1]);
+ else if (skip_prefix(format, "B", &format))
+ strbuf_addstr(&cmd, temp[2]);
+ else if (skip_prefix(format, "L", &format))
+ strbuf_addf(&cmd, "%d", marker_size);
+ else if (skip_prefix(format, "P", &format))
+ sq_quote_buf(&cmd, path);
+ else
+ strbuf_addch(&cmd, '%');
+ }
child.use_shell = 1;
strvec_push(&child.args, cmd.buf);
@@ -242,8 +246,13 @@ static enum ll_merge_result ll_ext_merge(const struct ll_merge_driver *fn,
for (i = 0; i < 3; i++)
unlink_or_warn(temp[i]);
strbuf_release(&cmd);
- strbuf_release(&path_sq);
- ret = (status > 0) ? LL_MERGE_CONFLICT : status;
+ if (!status)
+ ret = LL_MERGE_OK;
+ else if (status <= 128)
+ ret = LL_MERGE_CONFLICT;
+ else
+ /* died due to a signal: WTERMSIG(status) + 128 */
+ ret = LL_MERGE_ERROR;
return ret;
}
@@ -254,6 +263,7 @@ static struct ll_merge_driver *ll_user_merge, **ll_user_merge_tail;
static const char *default_ll_merge;
static int read_merge_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
struct ll_merge_driver *fn;
diff --git a/ll-merge.h b/merge-ll.h
index e4a20e81a3..e4a20e81a3 100644
--- a/ll-merge.h
+++ b/merge-ll.h
diff --git a/merge-ort-wrappers.c b/merge-ort-wrappers.c
index a550753300..4acedf3c33 100644
--- a/merge-ort-wrappers.c
+++ b/merge-ort-wrappers.c
@@ -1,8 +1,9 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "gettext.h"
#include "hash.h"
#include "merge-ort.h"
#include "merge-ort-wrappers.h"
+#include "read-cache-ll.h"
#include "tree.h"
#include "commit.h"
diff --git a/merge-ort.c b/merge-ort.c
index a50b095c47..8631c99700 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -14,7 +14,7 @@
* "cale", "peedy", or "ins" instead of "ort"?)
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "merge-ort.h"
#include "alloc.h"
@@ -30,14 +30,17 @@
#include "gettext.h"
#include "hex.h"
#include "entry.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "match-trees.h"
#include "mem-pool.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oid-array.h"
+#include "path.h"
#include "promisor-remote.h"
+#include "read-cache-ll.h"
#include "revision.h"
+#include "sparse-index.h"
#include "strmap.h"
#include "submodule-config.h"
#include "submodule.h"
diff --git a/merge-recursive.c b/merge-recursive.c
index 8e87b6386d..6a4081bb0f 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -3,7 +3,7 @@
* Fredrik Kuivinen.
* The thieves were Alex Riesen and Johannes Schindelin, in June/July 2006
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "merge-recursive.h"
#include "advice.h"
@@ -20,14 +20,17 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "lockfile.h"
#include "match-trees.h"
+#include "name-hash.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "repository.h"
#include "revision.h"
+#include "sparse-index.h"
#include "string-list.h"
#include "submodule-config.h"
#include "submodule.h"
@@ -35,7 +38,6 @@
#include "tag.h"
#include "tree-walk.h"
#include "unpack-trees.h"
-#include "wrapper.h"
#include "xdiff-interface.h"
struct merge_options_internal {
diff --git a/merge.c b/merge.c
index 10aaec3a6c..b60925459c 100644
--- a/merge.c
+++ b/merge.c
@@ -1,10 +1,13 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "lockfile.h"
+#include "merge.h"
#include "commit.h"
+#include "repository.h"
#include "run-command.h"
#include "resolve-undo.h"
#include "tree.h"
diff --git a/merge.h b/merge.h
new file mode 100644
index 0000000000..21ac7ef2f1
--- /dev/null
+++ b/merge.h
@@ -0,0 +1,17 @@
+#ifndef MERGE_H
+#define MERGE_H
+
+struct commit_list;
+struct object_id;
+struct repository;
+
+int try_merge_command(struct repository *r,
+ const char *strategy, size_t xopts_nr,
+ const char **xopts, struct commit_list *common,
+ const char *head_arg, struct commit_list *remotes);
+int checkout_fast_forward(struct repository *r,
+ const struct object_id *from,
+ const struct object_id *to,
+ int overwrite_ignore);
+
+#endif /* MERGE_H */
diff --git a/midx.c b/midx.c
index b500174d1f..931f557350 100644
--- a/midx.c
+++ b/midx.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "csum-file.h"
#include "dir.h"
@@ -9,7 +8,7 @@
#include "lockfile.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "hash-lookup.h"
#include "midx.h"
#include "progress.h"
@@ -254,7 +253,7 @@ struct object_id *nth_midxed_object_oid(struct object_id *oid,
if (n >= m->num_objects)
return NULL;
- oidread(oid, m->chunk_oid_lookup + m->hash_len * n);
+ oidread(oid, m->chunk_oid_lookup + st_mult(m->hash_len, n));
return oid;
}
@@ -271,7 +270,8 @@ off_t nth_midxed_offset(struct multi_pack_index *m, uint32_t pos)
die(_("multi-pack-index stores a 64-bit offset, but off_t is too small"));
offset32 ^= MIDX_LARGE_OFFSET_NEEDED;
- return get_be64(m->chunk_large_offsets + sizeof(uint64_t) * offset32);
+ return get_be64(m->chunk_large_offsets +
+ st_mult(sizeof(uint64_t), offset32));
}
return offset32;
@@ -445,14 +445,14 @@ static int idx_or_pack_name_cmp(const void *_va, const void *_vb)
struct write_midx_context {
struct pack_info *info;
- uint32_t nr;
- uint32_t alloc;
+ size_t nr;
+ size_t alloc;
struct multi_pack_index *m;
struct progress *progress;
unsigned pack_paths_checked;
struct pack_midx_entry *entries;
- uint32_t entries_nr;
+ size_t entries_nr;
uint32_t *pack_perm;
uint32_t *pack_order;
@@ -584,12 +584,14 @@ static void fill_pack_entry(uint32_t pack_int_id,
struct midx_fanout {
struct pack_midx_entry *entries;
- uint32_t nr;
- uint32_t alloc;
+ size_t nr, alloc;
};
-static void midx_fanout_grow(struct midx_fanout *fanout, uint32_t nr)
+static void midx_fanout_grow(struct midx_fanout *fanout, size_t nr)
{
+ if (nr < fanout->nr)
+ BUG("negative growth in midx_fanout_grow() (%"PRIuMAX" < %"PRIuMAX")",
+ (uintmax_t)nr, (uintmax_t)fanout->nr);
ALLOC_GROW(fanout->entries, nr, fanout->alloc);
}
@@ -668,17 +670,18 @@ static void midx_fanout_add_pack_fanout(struct midx_fanout *fanout,
static struct pack_midx_entry *get_sorted_entries(struct multi_pack_index *m,
struct pack_info *info,
uint32_t nr_packs,
- uint32_t *nr_objects,
+ size_t *nr_objects,
int preferred_pack)
{
uint32_t cur_fanout, cur_pack, cur_object;
- uint32_t alloc_objects, total_objects = 0;
+ size_t alloc_objects, total_objects = 0;
struct midx_fanout fanout = { 0 };
struct pack_midx_entry *deduplicated_entries = NULL;
uint32_t start_pack = m ? m->num_packs : 0;
for (cur_pack = start_pack; cur_pack < nr_packs; cur_pack++)
- total_objects += info[cur_pack].p->num_objects;
+ total_objects = st_add(total_objects,
+ info[cur_pack].p->num_objects);
/*
* As we de-duplicate by fanout value, we expect the fanout
@@ -721,7 +724,8 @@ static struct pack_midx_entry *get_sorted_entries(struct multi_pack_index *m,
&fanout.entries[cur_object].oid))
continue;
- ALLOC_GROW(deduplicated_entries, *nr_objects + 1, alloc_objects);
+ ALLOC_GROW(deduplicated_entries, st_add(*nr_objects, 1),
+ alloc_objects);
memcpy(&deduplicated_entries[*nr_objects],
&fanout.entries[cur_object],
sizeof(struct pack_midx_entry));
@@ -1496,21 +1500,22 @@ static int write_midx_internal(const char *object_dir,
add_chunk(cf, MIDX_CHUNKID_OIDFANOUT, MIDX_CHUNK_FANOUT_SIZE,
write_midx_oid_fanout);
add_chunk(cf, MIDX_CHUNKID_OIDLOOKUP,
- (size_t)ctx.entries_nr * the_hash_algo->rawsz,
+ st_mult(ctx.entries_nr, the_hash_algo->rawsz),
write_midx_oid_lookup);
add_chunk(cf, MIDX_CHUNKID_OBJECTOFFSETS,
- (size_t)ctx.entries_nr * MIDX_CHUNK_OFFSET_WIDTH,
+ st_mult(ctx.entries_nr, MIDX_CHUNK_OFFSET_WIDTH),
write_midx_object_offsets);
if (ctx.large_offsets_needed)
add_chunk(cf, MIDX_CHUNKID_LARGEOFFSETS,
- (size_t)ctx.num_large_offsets * MIDX_CHUNK_LARGE_OFFSET_WIDTH,
+ st_mult(ctx.num_large_offsets,
+ MIDX_CHUNK_LARGE_OFFSET_WIDTH),
write_midx_large_offsets);
if (flags & (MIDX_WRITE_REV_INDEX | MIDX_WRITE_BITMAP)) {
ctx.pack_order = midx_pack_order(&ctx);
add_chunk(cf, MIDX_CHUNKID_REVINDEX,
- ctx.entries_nr * sizeof(uint32_t),
+ st_mult(ctx.entries_nr, sizeof(uint32_t)),
write_midx_revindex);
}
@@ -1988,8 +1993,8 @@ static int fill_included_packs_batch(struct repository *r,
if (open_pack_index(p) || !p->num_objects)
continue;
- expected_size = (size_t)(p->pack_size
- * pack_info[i].referenced_objects);
+ expected_size = st_mult(p->pack_size,
+ pack_info[i].referenced_objects);
expected_size /= p->num_objects;
if (expected_size >= batch_size)
diff --git a/name-hash.c b/name-hash.c
index fb13716e43..251f036eef 100644
--- a/name-hash.c
+++ b/name-hash.c
@@ -5,9 +5,12 @@
*
* Copyright (C) 2008 Linus Torvalds
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "environment.h"
#include "gettext.h"
+#include "name-hash.h"
+#include "object.h"
+#include "read-cache-ll.h"
#include "thread-utils.h"
#include "trace.h"
#include "trace2.h"
diff --git a/name-hash.h b/name-hash.h
new file mode 100644
index 0000000000..b1b4b0fb33
--- /dev/null
+++ b/name-hash.h
@@ -0,0 +1,16 @@
+#ifndef NAME_HASH_H
+#define NAME_HASH_H
+
+struct cache_entry;
+struct index_state;
+
+int index_dir_exists(struct index_state *istate, const char *name, int namelen);
+void adjust_dirname_case(struct index_state *istate, char *name);
+struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
+
+int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
+void add_name_hash(struct index_state *istate, struct cache_entry *ce);
+void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
+void free_name_hash(struct index_state *istate);
+
+#endif /* NAME_HASH_H */
diff --git a/negotiator/noop.c b/negotiator/noop.c
index 7b72937686..de39028ab7 100644
--- a/negotiator/noop.c
+++ b/negotiator/noop.c
@@ -3,22 +3,24 @@
#include "../commit.h"
#include "../fetch-negotiator.h"
-static void known_common(struct fetch_negotiator *n, struct commit *c)
+static void known_common(struct fetch_negotiator *n UNUSED,
+ struct commit *c UNUSED)
{
/* do nothing */
}
-static void add_tip(struct fetch_negotiator *n, struct commit *c)
+static void add_tip(struct fetch_negotiator *n UNUSED,
+ struct commit *c UNUSED)
{
/* do nothing */
}
-static const struct object_id *next(struct fetch_negotiator *n)
+static const struct object_id *next(struct fetch_negotiator *n UNUSED)
{
return NULL;
}
-static int ack(struct fetch_negotiator *n, struct commit *c)
+static int ack(struct fetch_negotiator *n UNUSED, struct commit *c UNUSED)
{
/*
* This negotiator does not emit any commits, so there is no commit to
@@ -28,7 +30,7 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
return 0;
}
-static void release(struct fetch_negotiator *n)
+static void release(struct fetch_negotiator *n UNUSED)
{
/* nothing to release */
}
diff --git a/notes-cache.c b/notes-cache.c
index 14288caf98..0e1d5b1ac7 100644
--- a/notes-cache.c
+++ b/notes-cache.c
@@ -1,10 +1,11 @@
#include "git-compat-util.h"
#include "notes-cache.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pretty.h"
#include "repository.h"
#include "commit.h"
#include "refs.h"
+#include "strbuf.h"
static int notes_cache_match_validity(struct repository *r,
const char *ref,
diff --git a/notes-merge.c b/notes-merge.c
index 233e49e319..8799b522a5 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -5,13 +5,14 @@
#include "refs.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "repository.h"
#include "diff.h"
#include "diffcore.h"
#include "hex.h"
#include "xdiff-interface.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "dir.h"
#include "notes.h"
#include "notes-merge.h"
@@ -19,7 +20,6 @@
#include "trace.h"
#include "notes-utils.h"
#include "commit-reach.h"
-#include "wrapper.h"
struct notes_merge_pair {
struct object_id obj, base, local, remote;
diff --git a/notes-utils.c b/notes-utils.c
index 4a793eb347..97c031c26e 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -94,7 +94,9 @@ static combine_notes_fn parse_combine_notes_fn(const char *v)
return NULL;
}
-static int notes_rewrite_config(const char *k, const char *v, void *cb)
+static int notes_rewrite_config(const char *k, const char *v,
+ const struct config_context *ctx UNUSED,
+ void *cb)
{
struct notes_rewrite_cfg *c = cb;
if (starts_with(k, "notes.rewrite.") && !strcmp(k+14, c->cmd)) {
diff --git a/notes.c b/notes.c
index f51a2d3630..1ef2a331ce 100644
--- a/notes.c
+++ b/notes.c
@@ -4,7 +4,7 @@
#include "hex.h"
#include "notes.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "blob.h"
#include "tree.h"
#include "utf8.h"
@@ -974,7 +974,9 @@ void string_list_add_refs_from_colon_sep(struct string_list *list,
free(globs_copy);
}
-static int notes_display_config(const char *k, const char *v, void *cb)
+static int notes_display_config(const char *k, const char *v,
+ const struct config_context *ctx UNUSED,
+ void *cb)
{
int *load_refs = cb;
diff --git a/object-file.c b/object-file.c
index 7c1af5c8db..7dc0c4bfbb 100644
--- a/object-file.c
+++ b/object-file.c
@@ -8,7 +8,6 @@
*/
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "convert.h"
#include "environment.h"
@@ -39,11 +38,11 @@
#include "object-file.h"
#include "object-store.h"
#include "oidtree.h"
+#include "path.h"
#include "promisor-remote.h"
#include "setup.h"
#include "submodule.h"
#include "fsck.h"
-#include "wrapper.h"
/* The maximum size for an object header. */
#define MAX_HEADER_LEN 32
@@ -2307,11 +2306,11 @@ int repo_has_object_file(struct repository *r,
* report the minimal fsck error here, and rely on the caller to
* give more context.
*/
-static int hash_format_check_report(struct fsck_options *opts,
- const struct object_id *oid,
- enum object_type object_type,
- enum fsck_msg_type msg_type,
- enum fsck_msg_id msg_id,
+static int hash_format_check_report(struct fsck_options *opts UNUSED,
+ const struct object_id *oid UNUSED,
+ enum object_type object_type UNUSED,
+ enum fsck_msg_type msg_type UNUSED,
+ enum fsck_msg_id msg_id UNUSED,
const char *message)
{
error(_("object fails fsck: %s"), message);
diff --git a/object-name.c b/object-name.c
index 6fc3fa595b..0bfa29dbbf 100644
--- a/object-name.c
+++ b/object-name.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "object-name.h"
#include "advice.h"
#include "config.h"
@@ -17,7 +17,8 @@
#include "oidtree.h"
#include "packfile.h"
#include "pretty.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
#include "submodule.h"
@@ -768,6 +769,21 @@ static void find_abbrev_len_packed(struct min_abbrev_data *mad)
find_abbrev_len_for_pack(p, mad);
}
+void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo,
+ const struct object_id *oid, int abbrev_len)
+{
+ int r;
+ strbuf_grow(sb, GIT_MAX_HEXSZ + 1);
+ r = repo_find_unique_abbrev_r(repo, sb->buf + sb->len, oid, abbrev_len);
+ strbuf_setlen(sb, sb->len + r);
+}
+
+void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
+ int abbrev_len)
+{
+ strbuf_repo_add_unique_abbrev(sb, the_repository, oid, abbrev_len);
+}
+
int repo_find_unique_abbrev_r(struct repository *r, char *hex,
const struct object_id *oid, int len)
{
diff --git a/object-name.h b/object-name.h
index 1d63698f42..9ae5223071 100644
--- a/object-name.h
+++ b/object-name.h
@@ -40,6 +40,15 @@ struct object_context {
const char *repo_find_unique_abbrev(struct repository *r, const struct object_id *oid, int len);
int repo_find_unique_abbrev_r(struct repository *r, char *hex, const struct object_id *oid, int len);
+/**
+ * Add the abbreviation, as generated by repo_find_unique_abbrev(), of `sha1` to
+ * the strbuf `sb`.
+ */
+void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo,
+ const struct object_id *oid, int abbrev_len);
+void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
+ int abbrev_len);
+
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, ...);
diff --git a/object-store-ll.h b/object-store-ll.h
new file mode 100644
index 0000000000..26a3895c82
--- /dev/null
+++ b/object-store-ll.h
@@ -0,0 +1,533 @@
+#ifndef OBJECT_STORE_LL_H
+#define OBJECT_STORE_LL_H
+
+#include "hashmap.h"
+#include "object.h"
+#include "list.h"
+#include "thread-utils.h"
+#include "oidset.h"
+
+struct oidmap;
+struct oidtree;
+struct strbuf;
+
+struct object_directory {
+ struct object_directory *next;
+
+ /*
+ * Used to store the results of readdir(3) calls when we are OK
+ * sacrificing accuracy due to races for speed. That includes
+ * object existence with OBJECT_INFO_QUICK, as well as
+ * our search for unique abbreviated hashes. Don't use it for tasks
+ * requiring greater accuracy!
+ *
+ * Be sure to call odb_load_loose_cache() before using.
+ */
+ uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
+ struct oidtree *loose_objects_cache;
+
+ /*
+ * This is a temporary object store created by the tmp_objdir
+ * facility. Disable ref updates since the objects in the store
+ * might be discarded on rollback.
+ */
+ int disable_ref_updates;
+
+ /*
+ * This object store is ephemeral, so there is no need to fsync.
+ */
+ int will_destroy;
+
+ /*
+ * Path to the alternative object store. If this is a relative path,
+ * it is relative to the current working directory.
+ */
+ char *path;
+};
+
+struct input_stream {
+ const void *(*read)(struct input_stream *, unsigned long *len);
+ void *data;
+ int is_finished;
+};
+
+void prepare_alt_odb(struct repository *r);
+int has_alt_odb(struct repository *r);
+char *compute_alternate_path(const char *path, struct strbuf *err);
+struct object_directory *find_odb(struct repository *r, const char *obj_dir);
+typedef int alt_odb_fn(struct object_directory *, void *);
+int foreach_alt_odb(alt_odb_fn, void*);
+typedef void alternate_ref_fn(const struct object_id *oid, void *);
+void for_each_alternate_ref(alternate_ref_fn, void *);
+
+/*
+ * Add the directory to the on-disk alternates file; the new entry will also
+ * take effect in the current process.
+ */
+void add_to_alternates_file(const char *dir);
+
+/*
+ * Add the directory to the in-memory list of alternates (along with any
+ * recursive alternates it points to), but do not modify the on-disk alternates
+ * file.
+ */
+void add_to_alternates_memory(const char *dir);
+
+/*
+ * Replace the current writable object directory with the specified temporary
+ * object directory; returns the former primary object directory.
+ */
+struct object_directory *set_temporary_primary_odb(const char *dir, int will_destroy);
+
+/*
+ * Restore a previous ODB replaced by set_temporary_main_odb.
+ */
+void restore_primary_odb(struct object_directory *restore_odb, const char *old_path);
+
+/*
+ * Populate and return the loose object cache array corresponding to the
+ * given object ID.
+ */
+struct oidtree *odb_loose_cache(struct object_directory *odb,
+ const struct object_id *oid);
+
+/* Empty the loose object cache for the specified object directory. */
+void odb_clear_loose_cache(struct object_directory *odb);
+
+/* Clear and free the specified object directory */
+void free_object_directory(struct object_directory *odb);
+
+struct packed_git {
+ struct hashmap_entry packmap_ent;
+ struct packed_git *next;
+ struct list_head mru;
+ struct pack_window *windows;
+ off_t pack_size;
+ const void *index_data;
+ size_t index_size;
+ uint32_t num_objects;
+ size_t crc_offset;
+ struct oidset bad_objects;
+ int index_version;
+ time_t mtime;
+ int pack_fd;
+ int index; /* for builtin/pack-objects.c */
+ unsigned pack_local:1,
+ pack_keep:1,
+ pack_keep_in_core:1,
+ freshened:1,
+ do_not_close:1,
+ pack_promisor:1,
+ multi_pack_index:1,
+ is_cruft:1;
+ unsigned char hash[GIT_MAX_RAWSZ];
+ struct revindex_entry *revindex;
+ const uint32_t *revindex_data;
+ const uint32_t *revindex_map;
+ size_t revindex_size;
+ /*
+ * mtimes_map points at the beginning of the memory mapped region of
+ * this pack's corresponding .mtimes file, and mtimes_size is the size
+ * of that .mtimes file
+ */
+ const uint32_t *mtimes_map;
+ size_t mtimes_size;
+ /* something like ".git/objects/pack/xxxxx.pack" */
+ char pack_name[FLEX_ARRAY]; /* more */
+};
+
+struct multi_pack_index;
+
+static inline int pack_map_entry_cmp(const void *cmp_data UNUSED,
+ const struct hashmap_entry *entry,
+ const struct hashmap_entry *entry2,
+ const void *keydata)
+{
+ const char *key = keydata;
+ const struct packed_git *pg1, *pg2;
+
+ pg1 = container_of(entry, const struct packed_git, packmap_ent);
+ pg2 = container_of(entry2, const struct packed_git, packmap_ent);
+
+ return strcmp(pg1->pack_name, key ? key : pg2->pack_name);
+}
+
+struct raw_object_store {
+ /*
+ * Set of all object directories; the main directory is first (and
+ * cannot be NULL after initialization). Subsequent directories are
+ * alternates.
+ */
+ struct object_directory *odb;
+ struct object_directory **odb_tail;
+ struct kh_odb_path_map *odb_by_path;
+
+ int loaded_alternates;
+
+ /*
+ * A list of alternate object directories loaded from the environment;
+ * this should not generally need to be accessed directly, but will
+ * populate the "odb" list when prepare_alt_odb() is run.
+ */
+ char *alternate_db;
+
+ /*
+ * Objects that should be substituted by other objects
+ * (see git-replace(1)).
+ */
+ struct oidmap *replace_map;
+ unsigned replace_map_initialized : 1;
+ pthread_mutex_t replace_mutex; /* protect object replace functions */
+
+ struct commit_graph *commit_graph;
+ unsigned commit_graph_attempted : 1; /* if loading has been attempted */
+
+ /*
+ * private data
+ *
+ * should only be accessed directly by packfile.c and midx.c
+ */
+ struct multi_pack_index *multi_pack_index;
+
+ /*
+ * private data
+ *
+ * should only be accessed directly by packfile.c
+ */
+
+ struct packed_git *packed_git;
+ /* A most-recently-used ordered version of the packed_git list. */
+ struct list_head packed_git_mru;
+
+ struct {
+ struct packed_git **packs;
+ unsigned flags;
+ } kept_pack_cache;
+
+ /*
+ * A map of packfiles to packed_git structs for tracking which
+ * packs have been loaded already.
+ */
+ struct hashmap pack_map;
+
+ /*
+ * A fast, rough count of the number of objects in the repository.
+ * These two fields are not meant for direct access. Use
+ * repo_approximate_object_count() instead.
+ */
+ unsigned long approximate_object_count;
+ unsigned approximate_object_count_valid : 1;
+
+ /*
+ * Whether packed_git has already been populated with this repository's
+ * packs.
+ */
+ unsigned packed_git_initialized : 1;
+};
+
+struct raw_object_store *raw_object_store_new(void);
+void raw_object_store_clear(struct raw_object_store *o);
+
+/*
+ * Put in `buf` the name of the file in the local object database that
+ * would be used to store a loose object with the specified oid.
+ */
+const char *loose_object_path(struct repository *r, struct strbuf *buf,
+ const struct object_id *oid);
+
+void *map_loose_object(struct repository *r, const struct object_id *oid,
+ unsigned long *size);
+
+void *repo_read_object_file(struct repository *r,
+ const struct object_id *oid,
+ enum object_type *type,
+ unsigned long *size);
+
+/* Read and unpack an object file into memory, write memory to an object file */
+int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
+
+void hash_object_file(const struct git_hash_algo *algo, const void *buf,
+ unsigned long len, enum object_type type,
+ struct object_id *oid);
+
+int write_object_file_flags(const void *buf, unsigned long len,
+ enum object_type type, struct object_id *oid,
+ unsigned flags);
+static inline int write_object_file(const void *buf, unsigned long len,
+ enum object_type type, struct object_id *oid)
+{
+ return write_object_file_flags(buf, len, type, oid, 0);
+}
+
+int write_object_file_literally(const void *buf, unsigned long len,
+ const char *type, struct object_id *oid,
+ unsigned flags);
+int stream_loose_object(struct input_stream *in_stream, size_t len,
+ struct object_id *oid);
+
+/*
+ * Add an object file to the in-memory object store, without writing it
+ * to disk.
+ *
+ * Callers are responsible for calling write_object_file to record the
+ * object in persistent storage before writing any other new objects
+ * that reference it.
+ */
+int pretend_object_file(void *, unsigned long, enum object_type,
+ struct object_id *oid);
+
+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
+ * type, and size. If the object is a blob, then "contents" may return NULL,
+ * to allow streaming of large blobs.
+ *
+ * Returns 0 on success, negative on error (details may be written to stderr).
+ */
+int read_loose_object(const char *path,
+ const struct object_id *expected_oid,
+ struct object_id *real_oid,
+ void **contents,
+ struct object_info *oi);
+
+/* Retry packed storage after checking packed and loose storage */
+#define HAS_OBJECT_RECHECK_PACKED 1
+
+/*
+ * Returns 1 if the object exists. This function will not lazily fetch objects
+ * in a partial clone.
+ */
+int has_object(struct repository *r, const struct object_id *oid,
+ unsigned flags);
+
+/*
+ * These macros and functions are deprecated. If checking existence for an
+ * object that is likely to be missing and/or whose absence is relatively
+ * inconsequential (or is consequential but the caller is prepared to handle
+ * it), use has_object(), which has better defaults (no lazy fetch in a partial
+ * clone and no rechecking of packed storage). In the unlikely event that a
+ * caller needs to assert existence of an object that it fully expects to
+ * exist, and wants to trigger a lazy fetch in a partial clone, use
+ * oid_object_info_extended() with a NULL struct object_info.
+ *
+ * These functions can be removed once all callers have migrated to
+ * has_object() and/or oid_object_info_extended().
+ */
+int repo_has_object_file(struct repository *r, const struct object_id *oid);
+int repo_has_object_file_with_flags(struct repository *r,
+ const struct object_id *oid, int flags);
+
+/*
+ * Return true iff an alternate object database has a loose object
+ * with the specified name. This function does not respect replace
+ * references.
+ */
+int has_loose_object_nonlocal(const struct object_id *);
+
+int has_loose_object(const struct object_id *);
+
+/**
+ * format_object_header() is a thin wrapper around s xsnprintf() that
+ * writes the initial "<type> <obj-len>" part of the loose object
+ * header. It returns the size that snprintf() returns + 1.
+ */
+int format_object_header(char *str, size_t size, enum object_type type,
+ size_t objsize);
+
+void assert_oid_type(const struct object_id *oid, enum object_type expect);
+
+/*
+ * Enabling the object read lock allows multiple threads to safely call the
+ * following functions in parallel: repo_read_object_file(),
+ * read_object_with_reference(), oid_object_info() and oid_object_info_extended().
+ *
+ * obj_read_lock() and obj_read_unlock() may also be used to protect other
+ * section which cannot execute in parallel with object reading. Since the used
+ * lock is a recursive mutex, these sections can even contain calls to object
+ * reading functions. However, beware that in these cases zlib inflation won't
+ * be performed in parallel, losing performance.
+ *
+ * TODO: oid_object_info_extended()'s call stack has a recursive behavior. If
+ * any of its callees end up calling it, this recursive call won't benefit from
+ * parallel inflation.
+ */
+void enable_obj_read_lock(void);
+void disable_obj_read_lock(void);
+
+extern int obj_read_use_lock;
+extern pthread_mutex_t obj_read_mutex;
+
+static inline void obj_read_lock(void)
+{
+ if(obj_read_use_lock)
+ pthread_mutex_lock(&obj_read_mutex);
+}
+
+static inline void obj_read_unlock(void)
+{
+ if(obj_read_use_lock)
+ pthread_mutex_unlock(&obj_read_mutex);
+}
+
+/*
+ * Iterate over the files in the loose-object parts of the object
+ * directory "path", triggering the following callbacks:
+ *
+ * - loose_object is called for each loose object we find.
+ *
+ * - loose_cruft is called for any files that do not appear to be
+ * loose objects. Note that we only look in the loose object
+ * directories "objects/[0-9a-f]{2}/", so we will not report
+ * "objects/foobar" as cruft.
+ *
+ * - loose_subdir is called for each top-level hashed subdirectory
+ * of the object directory (e.g., "$OBJDIR/f0"). It is called
+ * after the objects in the directory are processed.
+ *
+ * Any callback that is NULL will be ignored. Callbacks returning non-zero
+ * will end the iteration.
+ *
+ * In the "buf" variant, "path" is a strbuf which will also be used as a
+ * scratch buffer, but restored to its original contents before
+ * the function returns.
+ */
+typedef int each_loose_object_fn(const struct object_id *oid,
+ const char *path,
+ void *data);
+typedef int each_loose_cruft_fn(const char *basename,
+ const char *path,
+ void *data);
+typedef int each_loose_subdir_fn(unsigned int nr,
+ const char *path,
+ void *data);
+int for_each_file_in_obj_subdir(unsigned int subdir_nr,
+ struct strbuf *path,
+ each_loose_object_fn obj_cb,
+ each_loose_cruft_fn cruft_cb,
+ each_loose_subdir_fn subdir_cb,
+ void *data);
+int for_each_loose_file_in_objdir(const char *path,
+ each_loose_object_fn obj_cb,
+ each_loose_cruft_fn cruft_cb,
+ each_loose_subdir_fn subdir_cb,
+ void *data);
+int for_each_loose_file_in_objdir_buf(struct strbuf *path,
+ each_loose_object_fn obj_cb,
+ each_loose_cruft_fn cruft_cb,
+ each_loose_subdir_fn subdir_cb,
+ void *data);
+
+/* Flags for for_each_*_object() below. */
+enum for_each_object_flags {
+ /* Iterate only over local objects, not alternates. */
+ FOR_EACH_OBJECT_LOCAL_ONLY = (1<<0),
+
+ /* Only iterate over packs obtained from the promisor remote. */
+ FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
+
+ /*
+ * Visit objects within a pack in packfile order rather than .idx order
+ */
+ FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
+
+ /* Only iterate over packs that are not marked as kept in-core. */
+ FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
+
+ /* Only iterate over packs that do not have .keep files. */
+ FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
+};
+
+/*
+ * Iterate over all accessible loose objects without respect to
+ * reachability. By default, this includes both local and alternate objects.
+ * The order in which objects are visited is unspecified.
+ *
+ * Any flags specific to packs are ignored.
+ */
+int for_each_loose_object(each_loose_object_fn, void *,
+ enum for_each_object_flags flags);
+
+/*
+ * Iterate over all accessible packed objects without respect to reachability.
+ * By default, this includes both local and alternate packs.
+ *
+ * Note that some objects may appear twice if they are found in multiple packs.
+ * Each pack is visited in an unspecified order. By default, objects within a
+ * pack are visited in pack-idx order (i.e., sorted by oid).
+ */
+typedef int each_packed_object_fn(const struct object_id *oid,
+ struct packed_git *pack,
+ uint32_t pos,
+ void *data);
+int for_each_object_in_pack(struct packed_git *p,
+ each_packed_object_fn, void *data,
+ enum for_each_object_flags flags);
+int for_each_packed_object(each_packed_object_fn, void *,
+ enum for_each_object_flags flags);
+
+#endif /* OBJECT_STORE_LL_H */
diff --git a/object-store.h b/object-store.h
index 12415e5ea7..1b3e3d7d01 100644
--- a/object-store.h
+++ b/object-store.h
@@ -1,537 +1,11 @@
#ifndef OBJECT_STORE_H
#define OBJECT_STORE_H
-#include "object.h"
-#include "list.h"
-#include "thread-utils.h"
#include "khash.h"
#include "dir.h"
-#include "oidset.h"
-
-struct oidmap;
-struct oidtree;
-struct strbuf;
-
-struct object_directory {
- struct object_directory *next;
-
- /*
- * Used to store the results of readdir(3) calls when we are OK
- * sacrificing accuracy due to races for speed. That includes
- * object existence with OBJECT_INFO_QUICK, as well as
- * our search for unique abbreviated hashes. Don't use it for tasks
- * requiring greater accuracy!
- *
- * Be sure to call odb_load_loose_cache() before using.
- */
- uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
- struct oidtree *loose_objects_cache;
-
- /*
- * This is a temporary object store created by the tmp_objdir
- * facility. Disable ref updates since the objects in the store
- * might be discarded on rollback.
- */
- int disable_ref_updates;
-
- /*
- * This object store is ephemeral, so there is no need to fsync.
- */
- int will_destroy;
-
- /*
- * Path to the alternative object store. If this is a relative path,
- * it is relative to the current working directory.
- */
- char *path;
-};
-
-struct input_stream {
- const void *(*read)(struct input_stream *, unsigned long *len);
- void *data;
- int is_finished;
-};
+#include "object-store-ll.h"
KHASH_INIT(odb_path_map, const char * /* key: odb_path */,
struct object_directory *, 1, fspathhash, fspatheq)
-void prepare_alt_odb(struct repository *r);
-int has_alt_odb(struct repository *r);
-char *compute_alternate_path(const char *path, struct strbuf *err);
-struct object_directory *find_odb(struct repository *r, const char *obj_dir);
-typedef int alt_odb_fn(struct object_directory *, void *);
-int foreach_alt_odb(alt_odb_fn, void*);
-typedef void alternate_ref_fn(const struct object_id *oid, void *);
-void for_each_alternate_ref(alternate_ref_fn, void *);
-
-/*
- * Add the directory to the on-disk alternates file; the new entry will also
- * take effect in the current process.
- */
-void add_to_alternates_file(const char *dir);
-
-/*
- * Add the directory to the in-memory list of alternates (along with any
- * recursive alternates it points to), but do not modify the on-disk alternates
- * file.
- */
-void add_to_alternates_memory(const char *dir);
-
-/*
- * Replace the current writable object directory with the specified temporary
- * object directory; returns the former primary object directory.
- */
-struct object_directory *set_temporary_primary_odb(const char *dir, int will_destroy);
-
-/*
- * Restore a previous ODB replaced by set_temporary_main_odb.
- */
-void restore_primary_odb(struct object_directory *restore_odb, const char *old_path);
-
-/*
- * Populate and return the loose object cache array corresponding to the
- * given object ID.
- */
-struct oidtree *odb_loose_cache(struct object_directory *odb,
- const struct object_id *oid);
-
-/* Empty the loose object cache for the specified object directory. */
-void odb_clear_loose_cache(struct object_directory *odb);
-
-/* Clear and free the specified object directory */
-void free_object_directory(struct object_directory *odb);
-
-struct packed_git {
- struct hashmap_entry packmap_ent;
- struct packed_git *next;
- struct list_head mru;
- struct pack_window *windows;
- off_t pack_size;
- const void *index_data;
- size_t index_size;
- uint32_t num_objects;
- uint32_t crc_offset;
- struct oidset bad_objects;
- int index_version;
- time_t mtime;
- int pack_fd;
- int index; /* for builtin/pack-objects.c */
- unsigned pack_local:1,
- pack_keep:1,
- pack_keep_in_core:1,
- freshened:1,
- do_not_close:1,
- pack_promisor:1,
- multi_pack_index:1,
- is_cruft:1;
- unsigned char hash[GIT_MAX_RAWSZ];
- struct revindex_entry *revindex;
- const uint32_t *revindex_data;
- const uint32_t *revindex_map;
- size_t revindex_size;
- /*
- * mtimes_map points at the beginning of the memory mapped region of
- * this pack's corresponding .mtimes file, and mtimes_size is the size
- * of that .mtimes file
- */
- const uint32_t *mtimes_map;
- size_t mtimes_size;
- /* something like ".git/objects/pack/xxxxx.pack" */
- char pack_name[FLEX_ARRAY]; /* more */
-};
-
-struct multi_pack_index;
-
-static inline int pack_map_entry_cmp(const void *cmp_data UNUSED,
- const struct hashmap_entry *entry,
- const struct hashmap_entry *entry2,
- const void *keydata)
-{
- const char *key = keydata;
- const struct packed_git *pg1, *pg2;
-
- pg1 = container_of(entry, const struct packed_git, packmap_ent);
- pg2 = container_of(entry2, const struct packed_git, packmap_ent);
-
- return strcmp(pg1->pack_name, key ? key : pg2->pack_name);
-}
-
-struct raw_object_store {
- /*
- * Set of all object directories; the main directory is first (and
- * cannot be NULL after initialization). Subsequent directories are
- * alternates.
- */
- struct object_directory *odb;
- struct object_directory **odb_tail;
- kh_odb_path_map_t *odb_by_path;
-
- int loaded_alternates;
-
- /*
- * A list of alternate object directories loaded from the environment;
- * this should not generally need to be accessed directly, but will
- * populate the "odb" list when prepare_alt_odb() is run.
- */
- char *alternate_db;
-
- /*
- * Objects that should be substituted by other objects
- * (see git-replace(1)).
- */
- struct oidmap *replace_map;
- unsigned replace_map_initialized : 1;
- pthread_mutex_t replace_mutex; /* protect object replace functions */
-
- struct commit_graph *commit_graph;
- unsigned commit_graph_attempted : 1; /* if loading has been attempted */
-
- /*
- * private data
- *
- * should only be accessed directly by packfile.c and midx.c
- */
- struct multi_pack_index *multi_pack_index;
-
- /*
- * private data
- *
- * should only be accessed directly by packfile.c
- */
-
- struct packed_git *packed_git;
- /* A most-recently-used ordered version of the packed_git list. */
- struct list_head packed_git_mru;
-
- struct {
- struct packed_git **packs;
- unsigned flags;
- } kept_pack_cache;
-
- /*
- * A map of packfiles to packed_git structs for tracking which
- * packs have been loaded already.
- */
- struct hashmap pack_map;
-
- /*
- * A fast, rough count of the number of objects in the repository.
- * These two fields are not meant for direct access. Use
- * repo_approximate_object_count() instead.
- */
- unsigned long approximate_object_count;
- unsigned approximate_object_count_valid : 1;
-
- /*
- * Whether packed_git has already been populated with this repository's
- * packs.
- */
- unsigned packed_git_initialized : 1;
-};
-
-struct raw_object_store *raw_object_store_new(void);
-void raw_object_store_clear(struct raw_object_store *o);
-
-/*
- * Put in `buf` the name of the file in the local object database that
- * would be used to store a loose object with the specified oid.
- */
-const char *loose_object_path(struct repository *r, struct strbuf *buf,
- const struct object_id *oid);
-
-void *map_loose_object(struct repository *r, const struct object_id *oid,
- unsigned long *size);
-
-void *repo_read_object_file(struct repository *r,
- const struct object_id *oid,
- enum object_type *type,
- unsigned long *size);
-
-/* Read and unpack an object file into memory, write memory to an object file */
-int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
-
-void hash_object_file(const struct git_hash_algo *algo, const void *buf,
- unsigned long len, enum object_type type,
- struct object_id *oid);
-
-int write_object_file_flags(const void *buf, unsigned long len,
- enum object_type type, struct object_id *oid,
- unsigned flags);
-static inline int write_object_file(const void *buf, unsigned long len,
- enum object_type type, struct object_id *oid)
-{
- return write_object_file_flags(buf, len, type, oid, 0);
-}
-
-int write_object_file_literally(const void *buf, unsigned long len,
- const char *type, struct object_id *oid,
- unsigned flags);
-int stream_loose_object(struct input_stream *in_stream, size_t len,
- struct object_id *oid);
-
-/*
- * Add an object file to the in-memory object store, without writing it
- * to disk.
- *
- * Callers are responsible for calling write_object_file to record the
- * object in persistent storage before writing any other new objects
- * that reference it.
- */
-int pretend_object_file(void *, unsigned long, enum object_type,
- struct object_id *oid);
-
-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
- * type, and size. If the object is a blob, then "contents" may return NULL,
- * to allow streaming of large blobs.
- *
- * Returns 0 on success, negative on error (details may be written to stderr).
- */
-int read_loose_object(const char *path,
- const struct object_id *expected_oid,
- struct object_id *real_oid,
- void **contents,
- struct object_info *oi);
-
-/* Retry packed storage after checking packed and loose storage */
-#define HAS_OBJECT_RECHECK_PACKED 1
-
-/*
- * Returns 1 if the object exists. This function will not lazily fetch objects
- * in a partial clone.
- */
-int has_object(struct repository *r, const struct object_id *oid,
- unsigned flags);
-
-/*
- * These macros and functions are deprecated. If checking existence for an
- * object that is likely to be missing and/or whose absence is relatively
- * inconsequential (or is consequential but the caller is prepared to handle
- * it), use has_object(), which has better defaults (no lazy fetch in a partial
- * clone and no rechecking of packed storage). In the unlikely event that a
- * caller needs to assert existence of an object that it fully expects to
- * exist, and wants to trigger a lazy fetch in a partial clone, use
- * oid_object_info_extended() with a NULL struct object_info.
- *
- * These functions can be removed once all callers have migrated to
- * has_object() and/or oid_object_info_extended().
- */
-int repo_has_object_file(struct repository *r, const struct object_id *oid);
-int repo_has_object_file_with_flags(struct repository *r,
- const struct object_id *oid, int flags);
-
-/*
- * Return true iff an alternate object database has a loose object
- * with the specified name. This function does not respect replace
- * references.
- */
-int has_loose_object_nonlocal(const struct object_id *);
-
-int has_loose_object(const struct object_id *);
-
-/**
- * format_object_header() is a thin wrapper around s xsnprintf() that
- * writes the initial "<type> <obj-len>" part of the loose object
- * header. It returns the size that snprintf() returns + 1.
- */
-int format_object_header(char *str, size_t size, enum object_type type,
- size_t objsize);
-
-void assert_oid_type(const struct object_id *oid, enum object_type expect);
-
-/*
- * Enabling the object read lock allows multiple threads to safely call the
- * following functions in parallel: repo_read_object_file(),
- * read_object_with_reference(), oid_object_info() and oid_object_info_extended().
- *
- * obj_read_lock() and obj_read_unlock() may also be used to protect other
- * section which cannot execute in parallel with object reading. Since the used
- * lock is a recursive mutex, these sections can even contain calls to object
- * reading functions. However, beware that in these cases zlib inflation won't
- * be performed in parallel, losing performance.
- *
- * TODO: oid_object_info_extended()'s call stack has a recursive behavior. If
- * any of its callees end up calling it, this recursive call won't benefit from
- * parallel inflation.
- */
-void enable_obj_read_lock(void);
-void disable_obj_read_lock(void);
-
-extern int obj_read_use_lock;
-extern pthread_mutex_t obj_read_mutex;
-
-static inline void obj_read_lock(void)
-{
- if(obj_read_use_lock)
- pthread_mutex_lock(&obj_read_mutex);
-}
-
-static inline void obj_read_unlock(void)
-{
- if(obj_read_use_lock)
- pthread_mutex_unlock(&obj_read_mutex);
-}
-
-/*
- * Iterate over the files in the loose-object parts of the object
- * directory "path", triggering the following callbacks:
- *
- * - loose_object is called for each loose object we find.
- *
- * - loose_cruft is called for any files that do not appear to be
- * loose objects. Note that we only look in the loose object
- * directories "objects/[0-9a-f]{2}/", so we will not report
- * "objects/foobar" as cruft.
- *
- * - loose_subdir is called for each top-level hashed subdirectory
- * of the object directory (e.g., "$OBJDIR/f0"). It is called
- * after the objects in the directory are processed.
- *
- * Any callback that is NULL will be ignored. Callbacks returning non-zero
- * will end the iteration.
- *
- * In the "buf" variant, "path" is a strbuf which will also be used as a
- * scratch buffer, but restored to its original contents before
- * the function returns.
- */
-typedef int each_loose_object_fn(const struct object_id *oid,
- const char *path,
- void *data);
-typedef int each_loose_cruft_fn(const char *basename,
- const char *path,
- void *data);
-typedef int each_loose_subdir_fn(unsigned int nr,
- const char *path,
- void *data);
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
- struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data);
-int for_each_loose_file_in_objdir(const char *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data);
-int for_each_loose_file_in_objdir_buf(struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data);
-
-/* Flags for for_each_*_object() below. */
-enum for_each_object_flags {
- /* Iterate only over local objects, not alternates. */
- FOR_EACH_OBJECT_LOCAL_ONLY = (1<<0),
-
- /* Only iterate over packs obtained from the promisor remote. */
- FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
-
- /*
- * Visit objects within a pack in packfile order rather than .idx order
- */
- FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
-
- /* Only iterate over packs that are not marked as kept in-core. */
- FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
-
- /* Only iterate over packs that do not have .keep files. */
- FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
-};
-
-/*
- * Iterate over all accessible loose objects without respect to
- * reachability. By default, this includes both local and alternate objects.
- * The order in which objects are visited is unspecified.
- *
- * Any flags specific to packs are ignored.
- */
-int for_each_loose_object(each_loose_object_fn, void *,
- enum for_each_object_flags flags);
-
-/*
- * Iterate over all accessible packed objects without respect to reachability.
- * By default, this includes both local and alternate packs.
- *
- * Note that some objects may appear twice if they are found in multiple packs.
- * Each pack is visited in an unspecified order. By default, objects within a
- * pack are visited in pack-idx order (i.e., sorted by oid).
- */
-typedef int each_packed_object_fn(const struct object_id *oid,
- struct packed_git *pack,
- uint32_t pos,
- void *data);
-int for_each_object_in_pack(struct packed_git *p,
- each_packed_object_fn, void *data,
- enum for_each_object_flags flags);
-int for_each_packed_object(each_packed_object_fn, void *,
- enum for_each_object_flags flags);
-
#endif /* OBJECT_STORE_H */
diff --git a/object.c b/object.c
index f1adb458b6..2c61e4c862 100644
--- a/object.c
+++ b/object.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
#include "object.h"
@@ -6,6 +6,7 @@
#include "object-file.h"
#include "object-store.h"
#include "blob.h"
+#include "statinfo.h"
#include "tree.h"
#include "commit.h"
#include "tag.h"
diff --git a/oid-array.c b/oid-array.c
index e8228c777b..8e4717746c 100644
--- a/oid-array.c
+++ b/oid-array.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "oid-array.h"
#include "hash-lookup.h"
diff --git a/oidmap.h b/oidmap.h
index c1642927fa..05c673eb7c 100644
--- a/oidmap.h
+++ b/oidmap.h
@@ -1,6 +1,7 @@
#ifndef OIDMAP_H
#define OIDMAP_H
+#include "hash-ll.h"
#include "hashmap.h"
/*
diff --git a/oidtree.c b/oidtree.c
index 7d57b7b19e..daef175dc7 100644
--- a/oidtree.c
+++ b/oidtree.c
@@ -4,7 +4,6 @@
*/
#include "git-compat-util.h"
#include "oidtree.h"
-#include "alloc.h"
#include "hash.h"
struct oidtree_iter_data {
diff --git a/oss-fuzz/fuzz-pack-idx.c b/oss-fuzz/fuzz-pack-idx.c
index 609a343ee3..3e190214d1 100644
--- a/oss-fuzz/fuzz-pack-idx.c
+++ b/oss-fuzz/fuzz-pack-idx.c
@@ -1,5 +1,5 @@
#include "git-compat-util.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index cdffe2ce47..f6757c3cbf 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -1,9 +1,8 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
#include "tag.h"
#include "diff.h"
@@ -15,6 +14,7 @@
#include "pack-bitmap.h"
#include "hash-lookup.h"
#include "pack-objects.h"
+#include "path.h"
#include "commit-reach.h"
#include "prio-queue.h"
#include "trace2.h"
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 35669e2478..ca8319b87c 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "commit.h"
#include "gettext.h"
#include "hex.h"
@@ -17,7 +16,7 @@
#include "repository.h"
#include "trace2.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "list-objects-filter-options.h"
#include "midx.h"
#include "config.h"
@@ -1102,8 +1101,9 @@ static void show_boundary_commit(struct commit *commit, void *_data)
}
}
-static void show_boundary_object(struct object *object,
- const char *name, void *data)
+static void show_boundary_object(struct object *object UNUSED,
+ const char *name UNUSED,
+ void *data UNUSED)
{
BUG("should not be called");
}
@@ -1294,7 +1294,7 @@ static void show_extended_objects(struct bitmap_index *bitmap_git,
for (i = 0; i < eindex->count; ++i) {
struct object *obj;
- if (!bitmap_get(objects, bitmap_num_objects(bitmap_git) + i))
+ if (!bitmap_get(objects, st_add(bitmap_num_objects(bitmap_git), i)))
continue;
obj = eindex->objects[i];
@@ -1473,7 +1473,7 @@ static void filter_bitmap_exclude_type(struct bitmap_index *bitmap_git,
* them individually.
*/
for (i = 0; i < eindex->count; i++) {
- uint32_t pos = i + bitmap_num_objects(bitmap_git);
+ size_t pos = st_add(i, bitmap_num_objects(bitmap_git));
if (eindex->objects[i]->type == type &&
bitmap_get(to_filter, pos) &&
!bitmap_get(tips, pos))
@@ -1564,7 +1564,7 @@ static void filter_bitmap_blob_limit(struct bitmap_index *bitmap_git,
}
for (i = 0; i < eindex->count; i++) {
- uint32_t pos = i + bitmap_num_objects(bitmap_git);
+ size_t pos = st_add(i, bitmap_num_objects(bitmap_git));
if (eindex->objects[i]->type == OBJ_BLOB &&
bitmap_get(to_filter, pos) &&
!bitmap_get(tips, pos) &&
@@ -2038,7 +2038,8 @@ static uint32_t count_object_type(struct bitmap_index *bitmap_git,
for (i = 0; i < eindex->count; ++i) {
if (eindex->objects[i]->type == type &&
- bitmap_get(objects, bitmap_num_objects(bitmap_git) + i))
+ bitmap_get(objects,
+ st_add(bitmap_num_objects(bitmap_git), i)))
count++;
}
@@ -2452,7 +2453,8 @@ static off_t get_disk_usage_for_extended(struct bitmap_index *bitmap_git)
for (i = 0; i < eindex->count; i++) {
struct object *obj = eindex->objects[i];
- if (!bitmap_get(result, bitmap_num_objects(bitmap_git) + i))
+ if (!bitmap_get(result,
+ st_add(bitmap_num_objects(bitmap_git), i)))
continue;
if (oid_object_info_extended(the_repository, &obj->oid, &oi, 0) < 0)
diff --git a/pack-check.c b/pack-check.c
index 049f2f0bfc..977f619618 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -7,7 +7,7 @@
#include "progress.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
struct idx_entry {
off_t offset;
diff --git a/pack-mtimes.c b/pack-mtimes.c
index 020a37f8fe..cdf30b8d2b 100644
--- a/pack-mtimes.c
+++ b/pack-mtimes.c
@@ -2,8 +2,9 @@
#include "gettext.h"
#include "pack-mtimes.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
+#include "strbuf.h"
static char *pack_mtimes_filename(struct packed_git *p)
{
diff --git a/pack-objects.c b/pack-objects.c
index ccab09fe65..1b8052bece 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "object.h"
#include "pack.h"
#include "pack-objects.h"
diff --git a/pack-objects.h b/pack-objects.h
index 579476687c..0d78db40cb 100644
--- a/pack-objects.h
+++ b/pack-objects.h
@@ -1,7 +1,7 @@
#ifndef PACK_OBJECTS_H
#define PACK_OBJECTS_H
-#include "object-store.h"
+#include "object-store-ll.h"
#include "thread-utils.h"
#include "pack.h"
diff --git a/pack-revindex.c b/pack-revindex.c
index 1f51b712e8..7fffcad912 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -2,8 +2,9 @@
#include "gettext.h"
#include "pack-revindex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
+#include "strbuf.h"
#include "trace2.h"
#include "config.h"
#include "midx.h"
diff --git a/pack-write.c b/pack-write.c
index 3b3ce89de6..b19ddf15b2 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -10,7 +10,8 @@
#include "oidmap.h"
#include "pack-objects.h"
#include "pack-revindex.h"
-#include "wrapper.h"
+#include "path.h"
+#include "strbuf.h"
void reset_pack_idx_option(struct pack_idx_option *opts)
{
diff --git a/packfile.c b/packfile.c
index fd083c86e0..9cc0a2e37a 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
@@ -19,12 +18,11 @@
#include "tree-walk.h"
#include "tree.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "midx.h"
#include "commit-graph.h"
#include "pack-revindex.h"
#include "promisor-remote.h"
-#include "wrapper.h"
char *odb_pack_name(struct strbuf *buf,
const unsigned char *hash,
@@ -186,7 +184,7 @@ int load_idx(const char *path, const unsigned int hashsz, void *idx_map,
*/
(sizeof(off_t) <= 4))
return error("pack too large for current definition of off_t in %s", path);
- p->crc_offset = 8 + 4 * 256 + nr * hashsz;
+ p->crc_offset = st_add(8 + 4 * 256, st_mult(nr, hashsz));
}
p->index_version = version;
@@ -381,7 +379,7 @@ void close_object_store(struct raw_object_store *o)
void unlink_pack_path(const char *pack_name, int force_delete)
{
- static const char *exts[] = {".pack", ".idx", ".rev", ".keep", ".bitmap", ".promisor", ".mtimes"};
+ static const char *exts[] = {".idx", ".pack", ".rev", ".keep", ".bitmap", ".promisor", ".mtimes"};
int i;
struct strbuf buf = STRBUF_INIT;
size_t plen;
@@ -753,7 +751,7 @@ struct packed_git *add_packed_git(const char *path, size_t path_len, int local)
p->pack_local = local;
p->mtime = st.st_mtime;
if (path_len < the_hash_algo->hexsz ||
- get_sha1_hex(path + path_len - the_hash_algo->hexsz, p->hash))
+ get_hash_hex(path + path_len - the_hash_algo->hexsz, p->hash))
hashclr(p->hash);
return p;
}
@@ -1920,10 +1918,10 @@ int nth_packed_object_id(struct object_id *oid,
return -1;
index += 4 * 256;
if (p->index_version == 1) {
- oidread(oid, index + (hashsz + 4) * n + 4);
+ oidread(oid, index + st_add(st_mult(hashsz + 4, n), 4));
} else {
index += 8;
- oidread(oid, index + hashsz * n);
+ oidread(oid, index + st_mult(hashsz, n));
}
return 0;
}
@@ -1948,14 +1946,15 @@ off_t nth_packed_object_offset(const struct packed_git *p, uint32_t n)
const unsigned int hashsz = the_hash_algo->rawsz;
index += 4 * 256;
if (p->index_version == 1) {
- return ntohl(*((uint32_t *)(index + (hashsz + 4) * (size_t)n)));
+ return ntohl(*((uint32_t *)(index + st_mult(hashsz + 4, n))));
} else {
uint32_t off;
- index += 8 + (size_t)p->num_objects * (hashsz + 4);
- off = ntohl(*((uint32_t *)(index + 4 * n)));
+ index += st_add(8, st_mult(p->num_objects, hashsz + 4));
+ off = ntohl(*((uint32_t *)(index + st_mult(4, n))));
if (!(off & 0x80000000))
return off;
- index += (size_t)p->num_objects * 4 + (off & 0x7fffffff) * 8;
+ index += st_add(st_mult(p->num_objects, 4),
+ st_mult(off & 0x7fffffff, 8));
check_pack_index_ptr(p, index);
return get_be64(index);
}
diff --git a/pager.c b/pager.c
index 63055d0873..b8822a9381 100644
--- a/pager.c
+++ b/pager.c
@@ -43,6 +43,7 @@ static void wait_for_pager_signal(int signo)
}
static int core_pager_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *data UNUSED)
{
if (!strcmp(var, "core.pager"))
@@ -228,7 +229,9 @@ struct pager_command_config_data {
char *value;
};
-static int pager_command_config(const char *var, const char *value, void *vdata)
+static int pager_command_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *vdata)
{
struct pager_command_config_data *data = vdata;
const char *cmd;
diff --git a/parallel-checkout.c b/parallel-checkout.c
index 69d569f352..b5a714c711 100644
--- a/parallel-checkout.c
+++ b/parallel-checkout.c
@@ -1,5 +1,4 @@
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "config.h"
#include "entry.h"
#include "gettext.h"
@@ -8,13 +7,13 @@
#include "parallel-checkout.h"
#include "pkt-line.h"
#include "progress.h"
+#include "read-cache-ll.h"
#include "run-command.h"
#include "sigchain.h"
#include "streaming.h"
#include "symlinks.h"
#include "thread-utils.h"
#include "trace2.h"
-#include "wrapper.h"
struct pc_worker {
struct child_process cp;
diff --git a/parse-options-cb.c b/parse-options-cb.c
index a24521dee0..bdc7fae497 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -227,7 +227,9 @@ int parse_opt_strvec(const struct option *opt, const char *arg, int unset)
return 0;
}
-int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset)
+int parse_opt_noop_cb(const struct option *opt UNUSED,
+ const char *arg UNUSED,
+ int unset UNUSED)
{
return 0;
}
diff --git a/parse-options.c b/parse-options.c
index f8a155ee13..e8e076c3a6 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -480,6 +480,9 @@ static void parse_options_check(const struct option *opts)
opts->long_name))
optbug(opts, "uses feature "
"not supported for dashless options");
+ if (opts->type == OPTION_SET_INT && !opts->defval &&
+ opts->long_name && !(opts->flags & PARSE_OPT_NONEG))
+ optbug(opts, "OPTION_SET_INT 0 should not be negatable");
switch (opts->type) {
case OPTION_COUNTUP:
case OPTION_BIT:
@@ -1020,14 +1023,37 @@ static int usage_argh(const struct option *opts, FILE *outfile)
return utf8_fprintf(outfile, s, opts->argh ? _(opts->argh) : _("..."));
}
-#define USAGE_OPTS_WIDTH 24
-#define USAGE_GAP 2
+static int usage_indent(FILE *outfile)
+{
+ return fprintf(outfile, " ");
+}
+
+#define USAGE_OPTS_WIDTH 26
+
+static void usage_padding(FILE *outfile, size_t pos)
+{
+ if (pos < USAGE_OPTS_WIDTH)
+ fprintf(outfile, "%*s", USAGE_OPTS_WIDTH - (int)pos, "");
+ else
+ fprintf(outfile, "\n%*s", USAGE_OPTS_WIDTH, "");
+}
+
+static const struct option *find_option_by_long_name(const struct option *opts,
+ const char *long_name)
+{
+ for (; opts->type != OPTION_END; opts++) {
+ if (opts->long_name && !strcmp(opts->long_name, long_name))
+ return opts;
+ }
+ return NULL;
+}
static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t *ctx,
const char * const *usagestr,
const struct option *opts,
int full, int err)
{
+ const struct option *all_opts = opts;
FILE *outfile = err ? stderr : stdout;
int need_newline;
@@ -1108,7 +1134,8 @@ static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t
for (; opts->type != OPTION_END; opts++) {
size_t pos;
- int pad;
+ const char *cp, *np;
+ const char *positive_name = NULL;
if (opts->type == OPTION_SUBCOMMAND)
continue;
@@ -1127,7 +1154,7 @@ static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t
need_newline = 0;
}
- pos = fprintf(outfile, " ");
+ pos = usage_indent(outfile);
if (opts->short_name) {
if (opts->flags & PARSE_OPT_NODASH)
pos += fprintf(outfile, "%c", opts->short_name);
@@ -1136,8 +1163,15 @@ static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t
}
if (opts->long_name && opts->short_name)
pos += fprintf(outfile, ", ");
- if (opts->long_name)
- pos += fprintf(outfile, "--%s", opts->long_name);
+ if (opts->long_name) {
+ const char *long_name = opts->long_name;
+ if ((opts->flags & PARSE_OPT_NONEG) ||
+ skip_prefix(long_name, "no-", &positive_name))
+ pos += fprintf(outfile, "--%s", long_name);
+ else
+ pos += fprintf(outfile, "--[no-]%s", long_name);
+ }
+
if (opts->type == OPTION_NUMBER)
pos += utf8_fprintf(outfile, _("-NUM"));
@@ -1145,19 +1179,32 @@ static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t
!(opts->flags & PARSE_OPT_NOARG))
pos += usage_argh(opts, outfile);
- if (pos <= USAGE_OPTS_WIDTH)
- pad = USAGE_OPTS_WIDTH - pos;
- else {
- fputc('\n', outfile);
- pad = USAGE_OPTS_WIDTH;
- }
if (opts->type == OPTION_ALIAS) {
- fprintf(outfile, "%*s", pad + USAGE_GAP, "");
+ usage_padding(outfile, pos);
fprintf_ln(outfile, _("alias of --%s"),
(const char *)opts->value);
continue;
}
- fprintf(outfile, "%*s%s\n", pad + USAGE_GAP, "", _(opts->help));
+
+ for (cp = opts->help ? _(opts->help) : ""; *cp; cp = np) {
+ np = strchrnul(cp, '\n');
+ if (*np)
+ np++;
+ usage_padding(outfile, pos);
+ fwrite(cp, 1, np - cp, outfile);
+ pos = 0;
+ }
+ fputc('\n', outfile);
+
+ if (positive_name) {
+ if (find_option_by_long_name(all_opts, positive_name))
+ continue;
+ pos = usage_indent(outfile);
+ pos += fprintf(outfile, "--%s", positive_name);
+ usage_padding(outfile, pos);
+ fprintf_ln(outfile, _("opposite of --no-%s"),
+ positive_name);
+ }
}
fputc('\n', outfile);
diff --git a/parse-options.h b/parse-options.h
index 8e48efe524..57a7fe9d91 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -581,4 +581,10 @@ int parse_opt_tracking_mode(const struct option *, const char *, int);
#define OPT_PATHSPEC_FILE_NUL(v) OPT_BOOL(0, "pathspec-file-nul", v, N_("with --pathspec-from-file, pathspec elements are separated with NUL character"))
#define OPT_AUTOSTASH(v) OPT_BOOL(0, "autostash", v, N_("automatically stash/stash pop before and after"))
+#define OPT_IPVERSION(v) \
+ OPT_SET_INT_F('4', "ipv4", (v), N_("use IPv4 addresses only"), \
+ TRANSPORT_FAMILY_IPV4, PARSE_OPT_NONEG), \
+ OPT_SET_INT_F('6', "ipv6", (v), N_("use IPv6 addresses only"), \
+ TRANSPORT_FAMILY_IPV6, PARSE_OPT_NONEG)
+
#endif
diff --git a/patch-ids.c b/patch-ids.c
index 19af7bee98..c3e1a0dd21 100644
--- a/patch-ids.c
+++ b/patch-ids.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "diff.h"
#include "commit.h"
+#include "hash.h"
#include "hash-lookup.h"
#include "hex.h"
#include "patch-ids.h"
diff --git a/path.c b/path.c
index 7c1cd8182a..67e2690efe 100644
--- a/path.c
+++ b/path.c
@@ -15,10 +15,9 @@
#include "submodule-config.h"
#include "path.h"
#include "packfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "lockfile.h"
#include "exec-cmd.h"
-#include "wrapper.h"
static int get_st_mode_bits(const char *path, int *mode)
{
@@ -1213,6 +1212,26 @@ int normalize_path_copy(char *dst, const char *src)
return normalize_path_copy_len(dst, src, NULL);
}
+int strbuf_normalize_path(struct strbuf *src)
+{
+ struct strbuf dst = STRBUF_INIT;
+
+ strbuf_grow(&dst, src->len);
+ if (normalize_path_copy(dst.buf, src->buf) < 0) {
+ strbuf_release(&dst);
+ return -1;
+ }
+
+ /*
+ * normalize_path does not tell us the new length, so we have to
+ * compute it by looking for the new NUL it placed
+ */
+ strbuf_setlen(&dst, strlen(dst.buf));
+ strbuf_swap(src, &dst);
+ strbuf_release(&dst);
+ return 0;
+}
+
/*
* path = Canonical absolute path
* prefixes = string_list containing normalized, absolute paths without
diff --git a/path.h b/path.h
index 60e83a49a9..639372edd9 100644
--- a/path.h
+++ b/path.h
@@ -191,6 +191,11 @@ const char *remove_leading_path(const char *in, const char *prefix);
const char *relative_path(const char *in, const char *prefix, struct strbuf *sb);
int normalize_path_copy_len(char *dst, const char *src, int *prefix_len);
int normalize_path_copy(char *dst, const char *src);
+/**
+ * Normalize in-place the path contained in the strbuf. If an error occurs,
+ * the contents of "sb" are left untouched, and -1 is returned.
+ */
+int strbuf_normalize_path(struct strbuf *src);
int longest_ancestor_length(const char *path, struct string_list *prefixes);
char *strip_path_suffix(const char *path, const char *suffix);
int daemon_avoid_alias(const char *path);
diff --git a/pathspec.c b/pathspec.c
index 5049dbb528..3a3a5724c4 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "config.h"
#include "dir.h"
@@ -6,11 +6,13 @@
#include "gettext.h"
#include "pathspec.h"
#include "attr.h"
+#include "read-cache.h"
#include "repository.h"
#include "setup.h"
#include "strvec.h"
#include "symlinks.h"
#include "quote.h"
+#include "wildmatch.h"
/*
* Finds which of the given pathspecs match items in the index.
diff --git a/pkt-line.c b/pkt-line.c
index 62b4208b66..af83a19f4d 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -5,7 +5,6 @@
#include "hex.h"
#include "run-command.h"
#include "trace.h"
-#include "wrapper.h"
#include "write-or-die.h"
char packet_buffer[LARGE_PACKET_MAX];
@@ -373,10 +372,14 @@ static int get_packet_data(int fd, char **src_buf, size_t *src_size,
return ret;
}
-int packet_length(const char lenbuf_hex[4])
+int packet_length(const char lenbuf_hex[4], size_t size)
{
- int val = hex2chr(lenbuf_hex);
- return (val < 0) ? val : (val << 8) | hex2chr(lenbuf_hex + 2);
+ if (size < 4)
+ BUG("buffer too small");
+ return hexval(lenbuf_hex[0]) << 12 |
+ hexval(lenbuf_hex[1]) << 8 |
+ hexval(lenbuf_hex[2]) << 4 |
+ hexval(lenbuf_hex[3]);
}
static char *find_packfile_uri_path(const char *buffer)
@@ -419,7 +422,7 @@ enum packet_read_status packet_read_with_status(int fd, char **src_buffer,
return PACKET_READ_EOF;
}
- len = packet_length(linelen);
+ len = packet_length(linelen, sizeof(linelen));
if (len < 0) {
if (options & PACKET_READ_GENTLE_ON_READ_ERROR)
diff --git a/pkt-line.h b/pkt-line.h
index 7c23a4bfaf..954eec8719 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -94,7 +94,7 @@ int packet_read(int fd, char *buffer, unsigned size, int options);
* If lenbuf_hex contains non-hex characters, return -1. Otherwise, return the
* numeric value of the length header.
*/
-int packet_length(const char lenbuf_hex[4]);
+int packet_length(const char lenbuf_hex[4], size_t size);
/*
* Read a packetized line into a buffer like the 'packet_read()' function but
diff --git a/po/ca.po b/po/ca.po
index 4b164f2991..6d64d7259a 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -3,14 +3,16 @@
# Alex Henrie <alexhenrie24@gmail.com>, 2014-2016.
# Jordi Mas i Hernàndez <jmas@softcatala.org>, 2016-2023
#
-# Terminologia i criteris utilitzats
+# Terminologia
#
# Anglès | Català
# -----------------+---------------------------------
# ahead | davant per
# amend | esmenar
+# branch | branca
# broken | malmès
# bundle | farcell
+# check out | agafar
# chunk | fragment
# cover letter | carta de presentació
# cruft | superflu
@@ -64,12 +66,16 @@
#
# Vegeu també https://git.github.io/htmldocs/gitglossary.html
#
+# Criteris
+# - Mantingueu en anglès les referències a seccions de la documentació, ja que no està traduïda.
+# - Usem la convenció valenciana per a «per / per a», que inclou l'ús de «per a» davant d'infintiu
+#
msgid ""
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2023-05-20 14:03+0200\n"
-"PO-Revision-Date: 2023-05-26 19:00-0600\n"
+"POT-Creation-Date: 2023-08-16 18:22+0200\n"
+"PO-Revision-Date: 2023-08-16 19:00-0600\n"
"Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
"Language-Team: Catalan\n"
"Language: ca\n"
@@ -584,6 +590,7 @@ msgstr "«git apply --cached» ha fallat"
#. 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 ""
@@ -698,9 +705,8 @@ msgstr "Baixar no és possible perquè teniu fitxers sense fusionar."
msgid "Reverting is not possible because you have unmerged files."
msgstr "Revertir no és possible perquè teniu fitxers sense fusionar."
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "No és possible %s perquè teniu fitxers sense fusionar."
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr "Fer «rebase» no és possible perquè teniu fitxers sense fusionar."
msgid ""
"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
@@ -845,6 +851,12 @@ msgstr "les opcions «%s» i «%s» no es poden usar juntes"
msgid "'%s' outside a repository"
msgstr "«%s» fora d'un repositori"
+msgid "failed to read patch"
+msgstr "s'ha produït un error en llegir el pedaç"
+
+msgid "patch too large"
+msgstr "el pedaç és massa gran"
+
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "No es pot preparar l'expressió regular de marca de temps %s"
@@ -1387,7 +1399,7 @@ msgstr "no es pot llegir «%s»"
#, c-format
msgid "pathspec '%s' matches files outside the current directory"
msgstr ""
-"l'específicació de camí «%s» coincideix amb fitxers fora del directori actual"
+"l'especificació de camí «%s» coincideix amb fitxers fora del directori actual"
#, c-format
msgid "pathspec '%s' did not match any files"
@@ -1630,6 +1642,7 @@ msgstr[1] "(aproximadament %d passos)"
#. TRANSLATORS: the last %s will be replaced with "(roughly %d
#. steps)" translation.
+#.
#, c-format
msgid "Bisecting: %d revision left to test after this %s\n"
msgid_plural "Bisecting: %d revisions left to test after this %s\n"
@@ -1715,17 +1728,20 @@ msgstr "no s'està seguint: informació ambigua per a la referència «%s»"
#. 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
#. around.
+#.
#, c-format
msgid " %s\n"
msgstr " %s\n"
#. TRANSLATORS: The second argument is a \n-delimited list of
#. duplicate refspecs, composed above.
+#.
#, c-format
msgid ""
"There are multiple remotes whose fetch refspecs map to the remote\n"
@@ -1755,8 +1771,10 @@ msgid "a branch named '%s' already exists"
msgstr "ja existeix una branca amb nom «%s»"
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
-msgstr "no es pot forçar l'actualització de la branca «%s», agafada a «%s»"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr ""
+"no es pot forçar l'actualització de la branca «%s» utilitzada per l'arbre de "
+"treball a «%s»"
#, c-format
msgid "cannot set up tracking information; starting point '%s' is not a branch"
@@ -1827,17 +1845,6 @@ msgstr "git add [<opcions>] [--] <especificació-de-camí>..."
msgid "cannot chmod %cx '%s'"
msgstr "no es pot fer chmod %cx «%s»"
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "estat de diff inesperat %c"
-
-msgid "updating files failed"
-msgstr "s'ha produït un error en actualitzar els fitxers"
-
-#, c-format
-msgid "remove '%s'\n"
-msgstr "elimina «%s»\n"
-
msgid "Unstaged changes after refreshing the index:"
msgstr "Canvis «unstaged» després d'actualitzar l'índex:"
@@ -2139,6 +2146,7 @@ msgstr "El cos de la comissió és:"
#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
#. in your translation. The program will only accept English
#. input at this point.
+#.
#, c-format
msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: "
msgstr ""
@@ -2266,10 +2274,6 @@ msgstr "passa l'indicador -m a git-mailinfo"
msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "passa l'indicador --keep-cr a git-mailsplit per al format mbox"
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr ""
-"no passis l'indicador --keep-cr a git-mailsplit independentment d'am.keepcr"
-
msgid "strip everything before a scissors line"
msgstr "elimina tot abans d'una línia de tisores"
@@ -2487,6 +2491,7 @@ msgstr "bisecant amb només una comissió %s"
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
+#.
msgid "Are you sure [Y/n]? "
msgstr "N'esteu segur [Y/n]? "
@@ -2564,6 +2569,7 @@ msgstr "Cal començar per «git bisect start»\n"
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
+#.
msgid "Do you want me to do it for you [Y/n]? "
msgstr "Voleu que ho faci per vostè [Y/n]? "
@@ -2784,6 +2790,7 @@ msgstr ""
#. among various forms of relative timestamps, but
#. your language may need more or fewer display
#. columns.
+#.
msgid "4 years, 11 months ago"
msgstr "fa 4 anys i 11 mesos"
@@ -3322,12 +3329,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3374,6 +3381,9 @@ msgstr "com a --batch, però no emetis <contents>"
msgid "stdin is NUL-terminated"
msgstr "l'entrada és acabada amb NUL"
+msgid "stdin and stdout is NUL-terminated"
+msgstr "stdin i stdout estan terminats amb NUL"
+
msgid "read commands from stdin"
msgstr "llegeix les ordres de stdin"
@@ -4237,12 +4247,6 @@ msgstr "específic al servidor"
msgid "option to transmit"
msgstr "opció a transmetre"
-msgid "use IPv4 addresses only"
-msgstr "usa només adreces IPv4"
-
-msgid "use IPv6 addresses only"
-msgstr "usa només adreces IPv6"
-
msgid "apply partial clone filters to submodules"
msgstr "aplica els filtres de clonatge parcial als submòduls"
@@ -4684,6 +4688,9 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+msgid "updating files failed"
+msgstr "s'ha produït un error en actualitzar els fitxers"
+
msgid "failed to unpack HEAD tree object"
msgstr "s'ha produït un error en desempaquetar l'objecte d'arbre HEAD"
@@ -4743,8 +4750,8 @@ msgstr ""
"no sigui usat en el missatge de comissió actual"
#, c-format
-msgid "could not lookup commit %s"
-msgstr "no s'ha pogut cercar la comissió %s"
+msgid "could not lookup commit '%s'"
+msgstr "no s'ha pogut cercar la comissió «%s»"
#, c-format
msgid "(reading log message from standard input)\n"
@@ -5006,6 +5013,7 @@ msgstr "reusa el missatge de la comissió especificada"
#. TRANSLATORS: Leave "[(amend|reword):]" as-is,
#. and only translate <commit>.
+#.
msgid "[(amend|reword):]commit"
msgstr "[(amend|reword):]commit"
@@ -5183,7 +5191,7 @@ msgid "remove a section: name"
msgstr "elimina una secció: nom"
msgid "list all"
-msgstr "llista tots"
+msgstr "llista'ls tots"
msgid "use string equality when comparing values to 'value-pattern'"
msgstr ""
@@ -5462,7 +5470,7 @@ msgid ""
"However, there were unannotated tags: try --tags."
msgstr ""
"Cap etiqueta anotada pot descriure «%s».\n"
-"No obstant, hi havia etiquetes no anotades: proveu --tags."
+"No obstant això, hi havia etiquetes no anotades: proveu --tags."
#, c-format
msgid ""
@@ -6813,6 +6821,7 @@ msgstr "s'ha especificat un nombre de fils no vàlid (%d) per a %s"
#. TRANSLATORS: %s is the configuration
#. variable for tweaking threads, currently
#. grep.threads
+#.
#, c-format
msgid "no threads support, ignoring %s"
msgstr "no s'admeten fils, s'ignorarà %s"
@@ -7380,77 +7389,6 @@ msgstr "s'ha donat --verify sense nom de fitxer de paquet"
msgid "fsck error in pack objects"
msgstr "error fsck als objectes del paquet"
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "no es pot fer stat en la plantilla «%s»"
-
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "no es pot fer opendir en el directori «%s»"
-
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "no es pot fer readlink en «%s»"
-
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "no es pot fer symlink en «%s» «%s»"
-
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "no es pot copiar «%s» a «%s»"
-
-#, c-format
-msgid "ignoring template %s"
-msgstr "s'està ignorant la plantilla %s"
-
-#, c-format
-msgid "templates not found in %s"
-msgstr "plantilles no trobades a %s"
-
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "no s'estan copiant plantilles de «%s»: %s"
-
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "nom de branca inicial no vàlid: «%s»"
-
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "no s'ha pogut gestionar el tipus de fitxer %d"
-
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "no s'ha pogut moure %s a %s"
-
-msgid "attempt to reinitialize repository with different hash"
-msgstr "s'ha intentat reinicialitzar el repositori amb un resum diferent"
-
-#, c-format
-msgid "%s already exists"
-msgstr "%s ja existeix"
-
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "reinicialització: s'ha ignorat --initial-branch=%s"
-
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "S'ha reinicialitzat el repositori compartit existent del Git en %s%s\n"
-
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "S'ha reinicialitzat el repositori existent del Git en %s%s\n"
-
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "S'ha inicialitzat un repositori compartit buit del Git en %s%s\n"
-
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "S'ha inicialitzat un repositori buit del Git en %s%s\n"
-
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -7891,6 +7829,10 @@ msgstr ""
"manualment.\n"
#, c-format
+msgid "could not get object info about '%s'"
+msgstr "no s'ha pogut obtenir la informació sobre l'objecte «%s»"
+
+#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
msgstr "format incorrecte del ls-files: l'element «%s» no comença amb «(»"
@@ -8035,10 +7977,6 @@ msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
msgstr "git ls-tree [<opcions>] <arbre> [<camí>...]"
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "no s'ha pogut obtenir la informació sobre l'objecte «%s»"
-
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "format incorrecte del ls-tree: l'element '%s' no comença amb «(»"
@@ -8773,22 +8711,26 @@ msgid "git notes [--ref <notes-ref>] [list [<object>]]"
msgstr "git notes [--ref <referència-de-notes>] [llista [<objecte>]]"
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <referència-de-notes>] add [-f] [--allow-empty] [-m "
-"<missatge> | -F <fitxer> | (-c | -C) <objecte>] [<objecte>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
msgstr ""
"git notes [--ref <referència-de-notes>] copy [-f] <d'objecte> <a-objecte>"
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <referència-de-notes>] append [--allow-empty] [-m "
-"<missatge> | -F <fitxer> | (-c | -C) <objecte>] [<objecte>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
msgstr ""
@@ -8895,6 +8837,7 @@ msgstr "s'ha produït un error en copiar les notes de «%s» a «%s»"
#. TRANSLATORS: the first %s will be replaced by a git
#. notes command: 'add', 'merge', 'remove', etc.
+#.
#, c-format
msgid "refusing to %s notes in %s (outside of refs/notes/)"
msgstr "s'està refusant %s les notes en %s (fora de refs/notes/)"
@@ -8921,6 +8864,15 @@ msgstr "permet l'emmagatzematge d'una nota buida"
msgid "replace existing notes"
msgstr "reemplaça les notes existents"
+msgid "<paragraph-break>"
+msgstr "<paragraph-break>"
+
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "insereix <paragraph-break> entre paràgrafs"
+
+msgid "remove unnecessary whitespace"
+msgstr "elimina l'espai en blanc innecessari"
+
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -9487,8 +9439,11 @@ msgstr ""
msgid "refusing to run without --i-still-use-this"
msgstr "es rebutja a executar sense --i-still-use-this"
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <patró>] [--exclude <patró>]"
msgid "pack everything"
msgstr "empaqueta-ho tot"
@@ -9496,6 +9451,12 @@ msgstr "empaqueta-ho tot"
msgid "prune loose refs (default)"
msgstr "poda les referències soltes (per defecte)"
+msgid "references to include"
+msgstr "referències a incloure"
+
+msgid "references to exclude"
+msgstr "referències a excloure"
+
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -9554,6 +9515,12 @@ msgstr "força la sobreescriptura de la branca local"
msgid "number of submodules pulled in parallel"
msgstr "nombre de submòduls baixats en paral·lel"
+msgid "use IPv4 addresses only"
+msgstr "usa només adreces IPv4"
+
+msgid "use IPv6 addresses only"
+msgstr "usa només adreces IPv6"
+
msgid ""
"There is no candidate for rebasing against among the refs that you just "
"fetched."
@@ -9821,43 +9788,39 @@ msgstr ""
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"S'han rebutjat les actualitzacions perquè el punt de la vostra branca\n"
-"actual està darrere de la seva branca remota corresponent. Integreu\n"
-"els canvis remots (per exemple, «git pull ...») abans de pujar de nou.\n"
-"Vegeu la «Nota sobre avanços ràpids» a «git push --help» per a més "
-"informació."
+"S'han rebutjat les actualitzacions perquè la punta de la branca actual\n"
+"està darrere de la seva contrapart remota. Si voleu integrar els canvis,\n"
+"remots useu «git pull» abans de tornar a pujar.\n"
+"Vegeu «Note about fast-forwards» a «git push --help» per a més detalls."
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"S'han rebutjat les actualitzacions perquè un punt de branca pujada\n"
-"està darrere de la seva branca remota corresponent. Agafeu aquesta\n"
-"branca i integreu els canvis remots (per exemple, «git pull ...»)\n"
-"abans de pujar de nou.\n"
-"Vegeu la «Nota sobre avanços ràpids» a «git push --help» per a més "
-"informació."
+"Les actualitzacions s'han rebutjat perquè la branca pujada està darrere\n"
+"de la seva contrapart remota. Si voleu integrar els canvis remots,\n"
+"utilitzeu «git pull» abans de tornar a pujar.\n"
+"Vegeu «Note about fast-forwards» a «git push --help» per a més detalls."
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"S'han rebutjat les actualitzacions perquè el remot conté canvis\n"
-"que no teniu localment. Això acostuma a ser causat per un altre repositori\n"
-"que ha pujat a la mateixa referència. Pot ser que primer vulgueu\n"
-"integrar els canvis remots (per exemple, «git pull ...») abans de\n"
-"pujar de nou.\n"
-"Vegeu la «Nota sobre avanços ràpids» a «git push --help» per a més "
-"informació."
+"Les actualitzacions s'han rebutjat perquè el remot conté canvis que no "
+"teniu\n"
+"localment. Això sol ser causat per un altre repositori que a pujat a\n"
+"la mateixa referència. Si voleu integrar els canvis remots, utilitzeu\n"
+"«git pull» abans de tornar a pujar.\n"
+"Vegeu «Note about fast-forwards» a «git push --help» per a més detalls."
msgid "Updates were rejected because the tag already exists in the remote."
msgstr ""
@@ -9874,15 +9837,15 @@ msgstr ""
"«--force».\n"
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"S'han rebutjat les actualitzacions perquè el punt actual de la vostra\n"
-"branca està darrere de la seva branca remota corresponent. Integreu\n"
-"els canvis localment (per exemple, «git pull ...») abans de forçar\n"
-"una pujada.\n"
+"Les actualitzacions s'han rebutjat perquè la branca de seguiment remot\n"
+"s'ha actualitzat des de l'última baixada. Si voleu integrar els\n"
+"canvis remots, utilitzeu «git pull» abans de tornar a pujar.\n"
+"Vegeu «Note about fast-forwards» a «git push --help» per a més detalls."
#, c-format
msgid "Pushing to %s\n"
@@ -10742,11 +10705,12 @@ msgstr "argument de «mirror» desconegut: %s"
msgid "fetch the remote branches"
msgstr "obtén les branques remotes"
-msgid "import all tags and associated objects when fetching"
-msgstr "en obtenir, importa totes les etiquetes i tots els objectes"
-
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "o no obtinguis cap etiqueta (--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"importa totes les etiquetes i objectes associats en obtenir\n"
+"o no obtingueu cap etiqueta (--no-tags)"
msgid "branch(es) to track"
msgstr "branques a seguir"
@@ -10949,6 +10913,7 @@ msgstr "(sense URL)"
#. TRANSLATORS: the colon ':' should align
#. with the one in " Fetch URL: %s"
#. translation.
+#.
#, c-format
msgid " Push URL: %s"
msgstr " URL de pujada: %s"
@@ -12707,6 +12672,10 @@ msgid "Skipping submodule '%s'"
msgstr "S'està ometent el submòdul «%s»"
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "no es pot clonar el submòdul «%s» sense un URL"
+
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "S'ha produït un error en clonar «%s». S'ha programat un reintent"
@@ -13460,10 +13429,10 @@ msgstr "imprimeix els continguts de l'etiqueta"
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
-"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <camí> [<commit-ish>]"
+"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <cadena>]]\n"
+" [--orphan] [(-b | -B) <new-branch>] <camí> [<commit-ish>]"
msgid "git worktree list [-v | --porcelain [-z]]"
msgstr "git worktree list [-v | --porcelain [-z]]"
@@ -13486,6 +13455,37 @@ msgstr "git worktree repair [<camí>...]"
msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <worktree>"
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "No hi ha cap branca d'origen possible, inferint «--orphan»"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Si voleu crear un arbre de treball que contingui una branca orfe nova\n"
+"(branca sense comissions) per a aquest repositori, podeu fer-ho\n"
+"utilitzant l'argument --orphan:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Si voleu crear un arbre de treball que contingui una branca orfe nova\n"
+"(branca sense comissions) per a aquest repositori, podeu fer-ho\n"
+"utilitzant l'argument --orphan:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
#, c-format
msgid "Removing %s/%s: %s"
msgstr "S'està eliminant %s/%s: %s"
@@ -13558,9 +13558,34 @@ msgid "Preparing worktree (checking out '%s')"
msgstr "S'està preparant l'arbre de treball (s'està agafant «%s»)"
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "no accessible: referència no vàlida: %s"
+
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "S'està preparant l'arbre de treball (HEAD %s separat)"
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD apunta a una referència no vàlida (o òrfena).\n"
+"Camí HEAD: «%s»\n"
+"Contingut HEAD: «%s»"
+
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"No hi ha referències locals o remotes malgrat que hi existeix almenys un\n"
+"remot, aturat; useu «add -f» per a forcar-ho o obtenir primer un remot"
+
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "les opcions «%s» i «%s» no es poden usar juntes"
+
msgid "checkout <branch> even if already checked out in other worktree"
msgstr "agafa <branca> encara que sigui agafada en altre arbre de treball"
@@ -13570,6 +13595,9 @@ msgstr "crea una branca nova"
msgid "create or reset a branch"
msgstr "crea o restableix una branca"
+msgid "create unborn/orphaned branch"
+msgstr "crea una branca no nascuda/òrfena"
+
msgid "populate the new working tree"
msgstr "emplena l'arbre de treball nou"
@@ -13591,6 +13619,13 @@ msgstr ""
msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "les opcions «%s», «%s», i «%s» no es poden usar juntes"
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "les opcions «%s» i «%s» no es poden usar juntes"
+
+msgid "<commit-ish>"
+msgstr "<commit-ish>"
+
msgid "added with --lock"
msgstr "afegit amb --lock"
@@ -13822,6 +13857,14 @@ msgid_plural "The bundle requires these %<PRIuMAX> refs:"
msgstr[0] "El farcell requereix aquesta referència:"
msgstr[1] "El farcell requereix aquestes %<PRIuMAX> referències:"
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "El farcell utilitza aquest algoritme de resum: %s"
+
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "El farcell utilitza aquest filtre: %s"
+
msgid "unable to dup bundle descriptor"
msgstr "no s'ha pogut duplicar el descriptor del farcell"
@@ -14055,8 +14098,9 @@ msgstr "Imprimeix les línies coincidents amb un patró"
msgid "A portable graphical interface to Git"
msgstr "Una interfície gràfica portable per al Git"
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr "Calcula l'ID de l'objecte i opcionalment crea un blob des del fitxer"
+msgid "Compute object ID and optionally create an object from a file"
+msgstr ""
+"Calcula l'ID de l'objecte i opcionalment crea un objecte des del fitxer"
msgid "Display help information about Git"
msgstr "Mostra informació d'ajuda del Git"
@@ -14475,6 +14519,10 @@ msgid "commit-graph chain does not match"
msgstr "la cadena del graf de comissions no coincideix"
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "el nombre de comissions en el graf base és massa alt: %<PRIuMAX>"
+
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr ""
"la cadena del graf de comissions no és vàlida: la línia «%s» no és un hash"
@@ -14569,6 +14617,14 @@ msgid "failed to rename temporary commit-graph file"
msgstr ""
"no s'ha pogut canviar el nom del fitxer temporal del graf de comissions"
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "no es poden fusionar els gràfics amb %<PRIuMAX>, %<PRIuMAX>entregues"
+
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "no es pot fusionar el graf %s, hi ha massa comissions: %<PRIuMAX>"
+
msgid "Scanning merged commits"
msgstr "S'estan escanejant les comissions fusionades"
@@ -14603,9 +14659,6 @@ msgid "failed to parse commit %s from commit-graph"
msgstr ""
"s'ha produït un error en analitzar la comissió %s del graf de comissions"
-msgid "Verifying commits in commit graph"
-msgstr "S'estan verificant les comissions al graf de comissions"
-
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr ""
@@ -14657,6 +14710,9 @@ msgstr ""
"la data d'enviament per a la comissió %s en el graf de comissions és "
"%<PRIuMAX> != %<PRIuMAX>"
+msgid "Verifying commits in commit graph"
+msgstr "S'estan verificant les comissions al graf de comissions"
+
#, c-format
msgid "%s %s is not a commit!"
msgstr "%s %s no és una comissió!"
@@ -14835,7 +14891,7 @@ msgid "Invalid back reference"
msgstr "Referència anterior no vàlida"
msgid "Unmatched [ or [^"
-msgstr "[ or [^ no emparellat"
+msgstr "[ o [^ no emparellat"
msgid "Unmatched ( or \\("
msgstr "( o \\( no emparellat"
@@ -15613,6 +15669,12 @@ msgstr "no s'ha trobat una base de fusió"
msgid "multiple merge bases found"
msgstr "s'han trobat múltiples bases de fusió"
+msgid "cannot compare stdin to a directory"
+msgstr "no es pot comparar stdin amb un directori"
+
+msgid "cannot compare a named pipe to a directory"
+msgstr "no es pot comparar una canonada amb nom amb un directori"
+
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<opcions>] <camí> <camí>"
@@ -15673,6 +15735,13 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "el diff external s'ha mort, s'està aturant a %s"
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow requereix exactament una especificació de camí"
+
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "el «pathspec» màgic no està suportat per --follow: %s"
+
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
msgstr "les opcions «%s», «%s», «%s», i «%s» no es poden usar juntes"
@@ -15687,9 +15756,6 @@ msgid ""
msgstr ""
"les opcions «%s» i «%s» no es poden usar juntes, useu «%s» amb «%s» i «%s»"
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow requereix exactament una especificació de camí"
-
#, c-format
msgid "invalid --stat value: %s"
msgstr "valor --stat no vàlid: %s"
@@ -16371,12 +16437,14 @@ msgstr "s'ha produït un error en processar els acks: %d"
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
+#.
#, c-format
msgid "expected packfile to be sent after '%s'"
msgstr "s'esperava que el fitxer de paquet s'enviés després de «%s»"
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
+#.
#, c-format
msgid "expected no other sections to be sent after no '%s'"
msgstr "no s'esperava que cap altra secció s'enviés després de «%s»"
@@ -16971,7 +17039,7 @@ msgid ""
msgstr ""
"No s'ha pogut crear «%s.lock»: %s.\n"
"\n"
-"Sembla que un altre procés de git s'està executant en aquest\n"
+"Sembla que un altre procés git s'està executant en aquest\n"
"repositori, per exemple, un editor obert per «git commit». \n"
"Assegureu-vos que tots els processos s'hagin acabat i\n"
"llavors proveu de nou. Si encara falla, pot ser un procés git\n"
@@ -17194,6 +17262,7 @@ msgstr ""
#. 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"
+#.
#, c-format
msgid ""
" - go to submodule (%s), and either merge commit %s\n"
@@ -17228,6 +17297,7 @@ msgstr ""
#. TRANSLATORS: The %s arguments are: 1) tree hash of a merge
#. base, and 2-3) the trees for the two trees we're merging.
+#.
#, c-format
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr ""
@@ -17701,6 +17771,7 @@ msgstr "S'està refusant reescriure les notes en %s (fora de refs/notes/)"
#. TRANSLATORS: The first %s is the name of
#. the environment variable, the second %s is
#. its value.
+#.
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Valor erroni de %s: «%s»"
@@ -17919,6 +17990,7 @@ msgstr "no s'han pogut desempaquetar els continguts de %s"
#. TRANSLATORS: This is a line of ambiguous object
#. output shown when we cannot look up or parse the
#. object in question. E.g. "deadbeef [bad object]".
+#.
#, c-format
msgid "%s [bad object]"
msgstr "%s [objecte incorrecte]"
@@ -17927,6 +17999,7 @@ msgstr "%s [objecte incorrecte]"
#. object output. E.g.:
#. *
#. "deadbeef commit 2021-01-01 - Some Commit Message"
+#.
#, c-format
msgid "%s commit %s - %s"
msgstr "%s comissió %s - %s"
@@ -17941,6 +18014,7 @@ msgstr "%s comissió %s - %s"
#. *
#. The third argument is the "tag" string
#. from object.c.
+#.
#, c-format
msgid "%s tag %s - %s"
msgstr "%s etiqueta %s - %s"
@@ -17950,18 +18024,21 @@ msgstr "%s etiqueta %s - %s"
#. the tag itself. E.g.:
#. *
#. "deadbeef [bad tag, could not parse it]"
+#.
#, c-format
msgid "%s [bad tag, could not parse it]"
msgstr "%s [etiqueta malmesa, no s'ha pogut analitzar]"
#. TRANSLATORS: This is a line of ambiguous <type>
#. object output. E.g. "deadbeef tree".
+#.
#, c-format
msgid "%s tree"
msgstr "arbre %s"
#. TRANSLATORS: This is a line of ambiguous <type>
#. object output. E.g. "deadbeef blob".
+#.
#, c-format
msgid "%s blob"
msgstr "blob %s"
@@ -17973,6 +18050,7 @@ msgstr "l'id d'objecte curt %s és ambigu"
#. TRANSLATORS: The argument is the list of ambiguous
#. objects composed in show_ambiguous_object(). See
#. its "TRANSLATORS" comments for details.
+#.
#, c-format
msgid ""
"The candidates are:\n"
@@ -18364,6 +18442,7 @@ msgstr "ús: %s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation.
+#.
#, c-format
msgid " or: %s"
msgstr " o: %s"
@@ -18386,6 +18465,7 @@ msgstr " o: %s"
#. function. The "%s" is a line in the (hopefully already
#. translated) N_() usage string, which contained embedded
#. newlines before we split it up.
+#.
#, c-format
msgid "%*s%s"
msgstr "%*s%s"
@@ -18606,6 +18686,13 @@ msgid "could not parse log for '%s'"
msgstr "no s'ha pogut llegir el fitxer de registre per a «%s»"
#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "punta extra extra no vàlida: «%s»"
+
+msgid "unable to enumerate additional recent objects"
+msgstr "no s'han pogut enumerar els objectes recents addicionals"
+
+#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
msgstr "no s'afegirà l'àlies «%s»: («%s» ja existeix en l'índex)"
@@ -18756,6 +18843,14 @@ msgstr "no s'han pogut corregir els bits de permisos en «%s»"
msgid "%s: cannot drop to stage #0"
msgstr "%s: no es pot baixar fins al «stage» #0"
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "estat de diff inesperat %c"
+
+#, c-format
+msgid "remove '%s'\n"
+msgstr "elimina «%s»\n"
+
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
"continue'.\n"
@@ -18872,7 +18967,7 @@ msgid ""
"\n"
msgstr ""
"\n"
-"No obstant, si elimineu tot, s'avortarà el «rebase».\n"
+"No obstant això, si elimineu tot, s'avortarà el «rebase».\n"
"\n"
#, c-format
@@ -18960,6 +19055,22 @@ msgid "positive value expected contents:lines=%s"
msgstr "valor positiu esperat conté:lines=%s"
#, c-format
+msgid "argument expected for %s"
+msgstr "s'esperava un argument per a %s"
+
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "valor positiu esperat %s=%s"
+
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "no es pot analitzar completament %s=%s"
+
+#, c-format
+msgid "value expected %s="
+msgstr "s'esperava un valor %s="
+
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "valor positiu esperat «%s» a %%(%s)"
@@ -19034,6 +19145,9 @@ msgstr "aquesta ordre rebutja l'àtom %%(%.*s)"
msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "no es pot usar --format=%.*s amb --python, --shell, --tcl"
+msgid "failed to run 'describe'"
+msgstr "no s'ha pogut executar «describe»"
+
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(sense branca, s'està fent «rebase» %s)"
@@ -19095,6 +19209,9 @@ msgstr "clau"
msgid "field name to sort on"
msgstr "nom del camp en el qual ordenar"
+msgid "exclude refs which match pattern"
+msgstr "exclou refs que coincideixin amb el patró"
+
#, c-format
msgid "not a reflog: %s"
msgstr "no és un registre de referència: %s"
@@ -19371,6 +19488,7 @@ msgstr ""
#. TRANSLATORS: "matches '%s'%" is the <dst> part of "git push
#. <remote> <src>:<dst>" push, and "being pushed ('%s')" is
#. the <src>.
+#.
#, c-format
msgid ""
"The destination you provided is not a full refname (i.e.,\n"
@@ -19547,8 +19665,10 @@ msgstr[1] ""
"La vostra branca i «%s» han divergit,\n"
"i tenen %d i %d comissions distintes cada una, respectivament.\n"
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (useu «git pull» per a fusionar la branca remota amb la vostra)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr ""
+" (utilitzeu «git pull» si voleu integrar la branca remota amb la vostra)\n"
#, c-format
msgid "cannot parse expected object name '%s'"
@@ -19660,6 +19780,10 @@ msgstr "no s'ha pogut obtenir la comissió per a l'argument d'ancestry-path %s"
msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<packfile> ja no s'admet"
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "opció no vàlida: «%s» en mode --stdin"
+
msgid "your current branch appears to be broken"
msgstr "la vostra branca actual sembla malmesa"
@@ -19975,6 +20099,7 @@ msgstr "cometeu els vostres canvis o feu un «stash» per a procedir."
#. TRANSLATORS: %s will be "revert", "cherry-pick" or
#. "rebase".
+#.
#, c-format
msgid "%s: Unable to write new index file"
msgstr "%s: No s'ha pogut escriure un fitxer d'índex nou"
@@ -20818,6 +20943,77 @@ msgid "setsid failed"
msgstr "«setsid» ha fallat"
#, c-format
+msgid "cannot stat template '%s'"
+msgstr "no es pot fer stat en la plantilla «%s»"
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "no es pot fer opendir en el directori «%s»"
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "no es pot fer readlink en «%s»"
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "no es pot fer symlink en «%s» «%s»"
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "no es pot copiar «%s» a «%s»"
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "s'està ignorant la plantilla %s"
+
+#, c-format
+msgid "templates not found in %s"
+msgstr "plantilles no trobades a %s"
+
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "no s'estan copiant plantilles de «%s»: %s"
+
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "nom de branca inicial no vàlid: «%s»"
+
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "no s'ha pogut gestionar el tipus de fitxer %d"
+
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "no s'ha pogut moure %s a %s"
+
+msgid "attempt to reinitialize repository with different hash"
+msgstr "s'ha intentat reinicialitzar el repositori amb un resum diferent"
+
+#, c-format
+msgid "%s already exists"
+msgstr "%s ja existeix"
+
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "reinicialització: s'ha ignorat --initial-branch=%s"
+
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "S'ha reinicialitzat el repositori compartit existent del Git en %s%s\n"
+
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "S'ha reinicialitzat el repositori existent del Git en %s%s\n"
+
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "S'ha inicialitzat un repositori compartit buit del Git en %s%s\n"
+
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "S'ha inicialitzat un repositori buit del Git en %s%s\n"
+
+#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
msgstr "l'entrada d'índex és un directori, però no dispers (%08x)"
diff --git a/po/de.po b/po/de.po
index 2ef0dc7a72..f7e49ce4a5 100644
--- 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: 2023-05-22 17:14+0200\n"
-"PO-Revision-Date: 2023-05-22 17:16+0200\n"
+"POT-Creation-Date: 2023-08-17 16:53+0200\n"
+"PO-Revision-Date: 2023-08-17 16:55+0200\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.3.1\n"
+"X-Generator: Poedit 3.3.2\n"
#, c-format
msgid "Huh (%s)?"
@@ -664,9 +664,9 @@ msgid "Reverting is not possible because you have unmerged files."
msgstr ""
"Reverten ist nicht möglich, weil Sie nicht zusammengeführte Dateien haben."
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "%s ist nicht möglich, weil Sie nicht zusammengeführte Dateien haben."
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr ""
+"Rebase ist nicht möglich, weil Sie nicht zusammengeführte Dateien haben."
msgid ""
"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
@@ -816,6 +816,12 @@ msgstr "die Optionen '%s' und '%s' können nicht gemeinsam verwendet werden"
msgid "'%s' outside a repository"
msgstr "'%s' außerhalb eines Repositories"
+msgid "failed to read patch"
+msgstr "Patch konnte nicht gelesen werden"
+
+msgid "patch too large"
+msgstr "Patch zu groß"
+
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "Kann regulären Ausdruck für Zeitstempel %s nicht verarbeiten"
@@ -1692,12 +1698,10 @@ 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
@@ -1740,9 +1744,10 @@ msgid "a branch named '%s' already exists"
msgstr "Branch '%s' existiert bereits"
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
msgstr ""
-"kann Aktualisierung des Branches '%s' nicht erzwingen, ausgecheckt in '%s'"
+"Aktualisierung des vom Arbeitsverzeichnis '%2$s' verwendete Branch '%1$s' "
+"kann nicht erzwungen werden"
#, c-format
msgid "cannot set up tracking information; starting point '%s' is not a branch"
@@ -1812,17 +1817,6 @@ msgstr "git add [<Optionen>] [--] <Pfadspezifikation>..."
msgid "cannot chmod %cx '%s'"
msgstr "kann chmod %cx '%s' nicht ausführen"
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "unerwarteter Differenz-Status %c"
-
-msgid "updating files failed"
-msgstr "Aktualisierung der Dateien fehlgeschlagen"
-
-#, c-format
-msgid "remove '%s'\n"
-msgstr "lösche '%s'\n"
-
msgid "Unstaged changes after refreshing the index:"
msgstr ""
"Nicht zum Commit vorgemerkte Änderungen nach Aktualisierung der Staging-Area:"
@@ -2270,9 +2264,6 @@ msgstr "-m an git-mailinfo übergeben"
msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "--keep-cr an git-mailsplit für mbox-Format übergeben"
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr "kein --keep-cr an git-mailsplit übergeben, unabhängig von am.keepcr"
-
msgid "strip everything before a scissors line"
msgstr "alles vor einer Scheren-Zeile entfernen"
@@ -3333,12 +3324,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3385,6 +3376,9 @@ msgstr "wie --batch, aber keine Ausgabe von <Inhalten>"
msgid "stdin is NUL-terminated"
msgstr "stdin endet mit NUL"
+msgid "stdin and stdout is NUL-terminated"
+msgstr "stdin und stdout sind NUL-beendet"
+
msgid "read commands from stdin"
msgstr "Befehle von der Standard-Eingabe lesen"
@@ -4269,12 +4263,6 @@ msgstr "serverspezifisch"
msgid "option to transmit"
msgstr "Option übertragen"
-msgid "use IPv4 addresses only"
-msgstr "nur IPv4-Adressen benutzen"
-
-msgid "use IPv6 addresses only"
-msgstr "nur IPv6-Adressen benutzen"
-
msgid "apply partial clone filters to submodules"
msgstr "partielle Klonfilter auf Submodule anwenden"
@@ -4738,6 +4726,9 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+msgid "updating files failed"
+msgstr "Aktualisierung der Dateien fehlgeschlagen"
+
msgid "failed to unpack HEAD tree object"
msgstr "Fehler beim Entpacken des Tree-Objektes von HEAD."
@@ -4798,8 +4789,8 @@ msgstr ""
"der aktuellen Commit-Beschreibung verwendet wird."
#, c-format
-msgid "could not lookup commit %s"
-msgstr "Konnte Commit %s nicht nachschlagen"
+msgid "could not lookup commit '%s'"
+msgstr "konnte Commit '%s' nicht nachschlagen"
#, c-format
msgid "(reading log message from standard input)\n"
@@ -6889,7 +6880,6 @@ 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
@@ -7464,77 +7454,6 @@ msgstr "--verify wurde ohne Namen der Paketdatei angegeben"
msgid "fsck error in pack objects"
msgstr "fsck Fehler beim Packen von Objekten"
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "kann Vorlage '%s' nicht lesen"
-
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "kann Verzeichnis '%s' nicht öffnen"
-
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "kann Verweis '%s' nicht lesen"
-
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "kann symbolische Verknüpfung '%s' auf '%s' nicht erstellen"
-
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "kann '%s' nicht nach '%s' kopieren"
-
-#, c-format
-msgid "ignoring template %s"
-msgstr "ignoriere Vorlage %s"
-
-#, c-format
-msgid "templates not found in %s"
-msgstr "Keine Vorlagen in %s gefunden."
-
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "kopiere keine Vorlagen von '%s': %s"
-
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "ungültiger initialer Branchname: '%s'"
-
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "kann nicht mit Dateityp %d umgehen"
-
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "Konnte %s nicht nach %s verschieben"
-
-msgid "attempt to reinitialize repository with different hash"
-msgstr "Versuch, das Repository mit einem anderen Hash zu reinitialisieren"
-
-#, c-format
-msgid "%s already exists"
-msgstr "%s existiert bereits"
-
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "Neu-Initialisierung: --initial-branch=%s ignoriert"
-
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "Bestehendes verteiltes Git-Repository in %s%s neuinitialisiert\n"
-
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "Bestehendes Git-Repository in %s%s neuinitialisiert\n"
-
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "Leeres verteiltes Git-Repository in %s%s initialisiert\n"
-
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "Leeres Git-Repository in %s%s initialisiert\n"
-
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -7974,6 +7893,10 @@ msgstr ""
"manuell an.\n"
#, c-format
+msgid "could not get object info about '%s'"
+msgstr "konnte Objekt-Informationen über '%s' nicht bestimmen"
+
+#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
msgstr "ungültiges ls-files-Format: Element '%s' fängt nicht mit '(' an"
@@ -8123,10 +8046,6 @@ msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
msgstr "git ls-tree [<Optionen>] <Commit-Referenz> [<Pfad>...]"
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "konnte Objekt-Informationen über '%s' nicht bestimmen"
-
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "ungültiges ls-tree-Format: Element '%s' fängt nicht mit '(' an"
@@ -8871,22 +8790,26 @@ msgid "git notes [--ref <notes-ref>] [list [<object>]]"
msgstr "git notes [--ref <Notiz-Referenz>] [list [<Objekt>]]"
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <Notiz-Referenz>] add [-f] [--allow-empty] [-m "
-"<Beschreibung> | -F <Datei> | (-c | -C) <Objekt>] [<Objekt>]"
+"git notes [--ref <Notiz-Referenz>] add [-f] [--allow-empty] [--"
+"[no-]separator|--separator=<Absatz-Unterbrechung>] [--[no-]stripspace] [-m "
+"<Nachricht> | -F <Datei> | (-c | -C) <Objekt>] [<Objekt>]"
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
msgstr ""
"git notes [--ref <Notiz-Referenz>] copy [-f] <von-Objekt> <nach-Objekt>"
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <Notiz-Referenz>] append [--allow-empty] [-m <Beschreibung> "
-"| -F <Datei> | (-c | -C) <Objekt>] [<Objekt>]"
+"git notes [--ref <Notiz-Referenz>] append [--allow-empty] [--"
+"[no-]separator|--separator=<Absatz-Unterbrechnung>] [--[no-]stripspace] [-m "
+"<Nachricht> | -F <Datei> | (-c | -C) <Objekt>] [<Object>]"
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
msgstr "git notes [--ref <Notiz-Referenz>] edit [--allow-empty] [<Objekt>]"
@@ -9021,6 +8944,15 @@ msgstr "Speichern leerer Notiz erlauben"
msgid "replace existing notes"
msgstr "existierende Notizen ersetzen"
+msgid "<paragraph-break>"
+msgstr "<Absatz-Unterbrechung>"
+
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "<Absatz-Unterbrechung> zwischen Absätzen einfügen"
+
+msgid "remove unnecessary whitespace"
+msgstr "unnötigen Whitespace entfernen"
+
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -9595,8 +9527,11 @@ msgstr ""
msgid "refusing to run without --i-still-use-this"
msgstr "Ausführung ohne --i-still-use-this verweigert"
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <Muster>] [--exclude <Muster>]"
msgid "pack everything"
msgstr "alles packen"
@@ -9604,6 +9539,12 @@ msgstr "alles packen"
msgid "prune loose refs (default)"
msgstr "lose Referenzen entfernen (Standard)"
+msgid "references to include"
+msgstr "einzubeziehende Referenzen"
+
+msgid "references to exclude"
+msgstr "Referenzen zum Ausschluss"
+
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -9663,6 +9604,12 @@ msgstr "das Überschreiben von lokalen Branches erzwingen"
msgid "number of submodules pulled in parallel"
msgstr "Anzahl der parallel mit 'pull' zu verarbeitenden Submodule"
+msgid "use IPv4 addresses only"
+msgstr "nur IPv4-Adressen benutzen"
+
+msgid "use IPv6 addresses only"
+msgstr "nur IPv6-Adressen benutzen"
+
msgid ""
"There is no candidate for rebasing against among the refs that you just "
"fetched."
@@ -9938,35 +9885,37 @@ msgstr ""
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Aktualisierungen wurden zurückgewiesen, weil die Spitze Ihres aktuellen\n"
-"Branches hinter seinem externen Gegenstück zurückgefallen ist. Führen Sie\n"
-"die externen Änderungen zusammen (z. B. 'git pull ...') bevor Sie \"push\"\n"
-"erneut ausführen.\n"
-"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help'\n"
-"für weitere Details."
+"Branches hinter seinem externen Gegenstück zurückgefallen ist. Wenn Sie\n"
+"die externen Änderungen integrieren wollen, verwenden Sie 'git pull' bevor\n"
+"Sie erneut push ausführen.\n"
+"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help' für "
+"weitere\n"
+"Informationen."
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Aktualisierungen wurden zurückgewiesen, weil die Spitze eines versendeten\n"
-"Branches hinter seinem externen Gegenstück zurückgefallen ist. Checken Sie\n"
-"diesen Branch aus und führen Sie die externen Änderungen zusammen\n"
-"(z. B. 'git pull ...') bevor Sie erneut \"push\" ausführen.\n"
-"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help'\n"
-"für weitere Details."
-
-msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Branches hinter seinem externen Gegenstück zurückgefallen ist. Wenn Sie die\n"
+"externen Änderungen integrieren wollen, verwenden Sie 'git pull'\n"
+"bevor Sie erneut push ausführen.\n"
+"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help' für "
+"weitere\n"
+"Informationen."
+
+msgid ""
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Aktualisierungen wurden zurückgewiesen, weil das Remote-Repository Commits "
@@ -9974,11 +9923,12 @@ msgstr ""
"die lokal nicht vorhanden sind. Das wird üblicherweise durch einen \"push\" "
"von\n"
"Commits auf dieselbe Referenz von einem anderen Repository aus verursacht.\n"
-"Vielleicht müssen Sie die externen Änderungen zusammenführen (z. B. 'git "
-"pull ...')\n"
-"bevor Sie erneut \"push\" ausführen.\n"
-"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help'\n"
-"für weitere Details."
+"Wenn Sie die externen Änderungen integrieren wollen, verwenden Sie 'git "
+"pull'\n"
+"bevor Sie erneut push ausführen.\n"
+"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help' für "
+"weitere\n"
+"Informationen."
msgid "Updates were rejected because the tag already exists in the remote."
msgstr ""
@@ -9995,15 +9945,21 @@ msgstr ""
"die Option '--force' zu verwenden.\n"
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Aktualisierungen wurden zurückgewiesen, weil die Spitze des Remote-\n"
-"Tracking-Branches seit dem letzen Checkout aktualisiert wurde. Sie möchten\n"
-"diese Änderungen vielleicht lokal integrieren (z. B. 'git pull ...') bevor\n"
-"Sie die Änderungen erzwingen.\n"
+"Aktualisierungen wurden zurückgewiesen, weil die Spitze des Remote-"
+"Tracking-\n"
+"Branches seit dem letzten Auschecken aktualisiert wurde. Wenn Sie die "
+"externen\n"
+"Änderungen integrieren wollen, verwenden Sie 'git pull' bevor Sie erneut "
+"push\n"
+"ausführen.\n"
+"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help' für "
+"weitere\n"
+"Informationen."
#, c-format
msgid "Pushing to %s\n"
@@ -10886,11 +10842,12 @@ msgstr "unbekanntes Argument für Option mirror: %s"
msgid "fetch the remote branches"
msgstr "die Remote-Branches anfordern"
-msgid "import all tags and associated objects when fetching"
-msgstr "alle Tags und verbundene Objekte beim Anfordern importieren"
-
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "oder fordere gar keine Tags an (--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"alle Tags und zugehörigen Objekte beim Abruf importieren\n"
+"oder überhaupt keine Tags abrufen (--no-tags)"
msgid "branch(es) to track"
msgstr "Branch(es) zur Übernahme"
@@ -12876,6 +12833,10 @@ msgid "Skipping submodule '%s'"
msgstr "Überspringe Submodul '%s'"
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "kann Submodul '%s' nicht ohne URL klonen"
+
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "Fehler beim Klonen von '%s'. Weiterer Versuch geplant"
@@ -13649,11 +13610,12 @@ msgstr "Tag-Inhalte ausgeben"
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason "
"<Zeichenkette>]]\n"
-" [-b <neuer-Branch>] <Pfad> [<Commit-Angabe>]"
+" [--orphan] [(-b | -B) <neuer-Branch>] <Pfad> [<Commit-"
+"Angabe>]"
msgid "git worktree list [-v | --porcelain [-z]]"
msgstr "git worktree list [-v | --porcelain [-z]]"
@@ -13676,6 +13638,41 @@ msgstr "git worktree repair [<Pfad>...]"
msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <Arbeitsverzeichnis>"
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Kein möglicher Quell-Branch, der auf '--orphan' schließen lässt"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Wenn Sie ein Arbeitsverzeichnis erstellen möchten, um einen neuen verwaisten "
+"Branch\n"
+"(Branch ohne Commits) für dieses Repository zu erstellen, können Sie dies "
+"mit\n"
+"der Option --orphan tun:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Wenn Sie ein Arbeitsverzeichnis erstellen möchten, um einen neuen verwaisten "
+"Branch\n"
+"(Branch ohne Commits) für dieses Repository zu erstellen, können Sie dies "
+"mit\n"
+"der Option --orphan tun:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
#, c-format
msgid "Removing %s/%s: %s"
msgstr "Entferne %s/%s: %s"
@@ -13747,9 +13744,37 @@ msgid "Preparing worktree (checking out '%s')"
msgstr "Bereite Arbeitsverzeichnis vor (checke '%s' aus)"
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "unerreichbar: ungültige Referenz: %s"
+
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "Bereite Arbeitsverzeichnis vor (losgelöster HEAD %s)"
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD zeigt auf eine ungültige (oder verwaiste) Referenz.\n"
+"HEAD-Pfad: '%s'\n"
+"HEAD Inhalte: '%s'"
+
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"Es gibt keine lokalen oder entfernten Referenzen, obwohl mindestens ein "
+"Remote-Repository\n"
+"vorhanden ist. Angehalten. Verwenden Sie 'add -f', um eine entfernte "
+"Referenz zu überschreiben\n"
+"oder rufen Sie diese zuerst ab"
+
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "'%s' und '%s' können nicht zusammen verwendet werden"
+
msgid "checkout <branch> even if already checked out in other worktree"
msgstr ""
"<Branch> auschecken, auch wenn dieser bereits in einem anderen "
@@ -13761,6 +13786,9 @@ msgstr "neuen Branch erstellen"
msgid "create or reset a branch"
msgstr "Branch erstellen oder umsetzen"
+msgid "create unborn/orphaned branch"
+msgstr "ungeborenen/verwaisten Branch erstellen"
+
msgid "populate the new working tree"
msgstr "das neue Arbeitsverzeichnis auschecken"
@@ -13783,6 +13811,13 @@ msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr ""
"die Optionen '%s', '%s' und '%s' können nicht gemeinsam verwendet werden"
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "die Optionen '%s' und '%s' können nicht gemeinsam verwendet werden"
+
+msgid "<commit-ish>"
+msgstr "<Commit-Angabe>"
+
msgid "added with --lock"
msgstr "mit --lock hinzugefügt"
@@ -14022,6 +14057,14 @@ msgid_plural "The bundle requires these %<PRIuMAX> refs:"
msgstr[0] "Das Paket benötigt diese Referenz:"
msgstr[1] "Das Paket benötigt diese %<PRIuMAX> Referenzen:"
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "Das Paket verwendet diesen Hash-Algorithmus: %s"
+
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Das Paket verwendet diesen Filter: %s"
+
msgid "unable to dup bundle descriptor"
msgstr "konnte dup für Descriptor des Pakets nicht ausführen"
@@ -14261,9 +14304,10 @@ msgstr "Zeilen darstellen, die einem Muster entsprechen"
msgid "A portable graphical interface to Git"
msgstr "eine portable grafische Schnittstelle zu Git"
-msgid "Compute object ID and optionally creates a blob from a file"
+msgid "Compute object ID and optionally create an object from a file"
msgstr ""
-"von einer Datei die Objekt-ID berechnen und optional ein Blob erstellen"
+"Berechnung der Objekt-ID und optionales Erstellen eines Objekts aus einer "
+"Datei"
msgid "Display help information about Git"
msgstr "Hilfsinformationen über Git anzeigen"
@@ -14688,6 +14732,10 @@ msgid "commit-graph chain does not match"
msgstr "Commit-Graph Verkettung stimmt nicht überein"
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "Anzahl der Commits im Basisgraph zu hoch: %<PRIuMAX>"
+
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr "Ungültige Commit-Graph Verkettung: Zeile '%s' ist kein Hash"
@@ -14770,6 +14818,17 @@ msgstr "konnte Basis-Commit-Graph-Datei nicht umbenennen"
msgid "failed to rename temporary commit-graph file"
msgstr "konnte temporäre Commit-Graph-Datei nicht umbenennen"
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr ""
+"Graphen mit %<PRIuMAX>, %<PRIuMAX> Commits können nicht zusammengeführt "
+"werden"
+
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr ""
+"Graph %s kann nicht zusammengeführt werden, zu viele Commits: %<PRIuMAX>"
+
msgid "Scanning merged commits"
msgstr "Durchsuche zusammengeführte Commits"
@@ -14801,9 +14860,6 @@ msgstr "Commit-Graph hat fehlerhaften Fanout-Wert: fanout[%d] = %u != %u"
msgid "failed to parse commit %s from commit-graph"
msgstr "konnte Commit %s von Commit-Graph nicht parsen"
-msgid "Verifying commits in commit graph"
-msgstr "Commit in Commit-Graph überprüfen"
-
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr ""
@@ -14849,6 +14905,9 @@ msgid "commit date for commit %s in commit-graph is %<PRIuMAX> != %<PRIuMAX>"
msgstr ""
"Commit-Datum für Commit %s in Commit-Graph ist %<PRIuMAX> != %<PRIuMAX>"
+msgid "Verifying commits in commit graph"
+msgstr "Commit in Commit-Graph überprüfen"
+
#, c-format
msgid "%s %s is not a commit!"
msgstr "%s %s ist kein Commit!"
@@ -15816,6 +15875,12 @@ msgstr "keine Merge-Basis gefunden"
msgid "multiple merge bases found"
msgstr "mehrere Merge-Basen gefunden"
+msgid "cannot compare stdin to a directory"
+msgstr "kann stdin nicht mit einem Verzeichnis vergleichen"
+
+msgid "cannot compare a named pipe to a directory"
+msgstr "kann eine benannte Pipe nicht mit einem Verzeichnis vergleichen"
+
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<Optionen>] <Pfad> <Pfad>"
@@ -15873,6 +15938,13 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "externes Diff-Programm unerwartet beendet, angehalten bei %s"
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow erfordert genau eine Pfadspezifikation"
+
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "Magie von Pfadspezifikationen wird von --follow nicht unterstützt: %s"
+
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
msgstr ""
@@ -15892,9 +15964,6 @@ msgstr ""
"die Optionen '%s' und '%s' können nicht gemeinsam verwendet werden, nutzen "
"Sie '%s' mit '%s' und '%s'"
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow erfordert genau eine Pfadspezifikation"
-
#, c-format
msgid "invalid --stat value: %s"
msgstr "Ungültiger --stat Wert: %s"
@@ -17404,7 +17473,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 ""
@@ -18145,7 +18214,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"
@@ -18154,7 +18223,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.
@@ -18170,7 +18239,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]"
@@ -18828,6 +18897,13 @@ msgid "could not parse log for '%s'"
msgstr "Konnte Log für '%s' nicht parsen."
#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "ungültiger zusätzlicher Schrotthinweis: '%s'"
+
+msgid "unable to enumerate additional recent objects"
+msgstr "zusätzliche neue Objekte konnten nicht aufgezählt werden"
+
+#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
msgstr ""
"Dateialias '%s' wird nicht hinzugefügt ('%s' existiert bereits im Index)."
@@ -18980,6 +19056,14 @@ msgstr "Konnte Zugriffsberechtigung auf '%s' nicht setzen."
msgid "%s: cannot drop to stage #0"
msgstr "%s: Kann nicht auf Stufe #0 wechseln."
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "unerwarteter Differenz-Status %c"
+
+#, c-format
+msgid "remove '%s'\n"
+msgstr "lösche '%s'\n"
+
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
"continue'.\n"
@@ -19181,6 +19265,22 @@ msgid "positive value expected contents:lines=%s"
msgstr "Positiver Wert erwartet contents:lines=%s"
#, c-format
+msgid "argument expected for %s"
+msgstr "Argument erwartet für %s"
+
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "positiver Wert erwartet %s=%s"
+
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "kann %s=%s nicht vollständig parsen"
+
+#, c-format
+msgid "value expected %s="
+msgstr "Wert erwartet %s="
+
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "positiver Wert erwartet '%s' in %%(%s)"
@@ -19254,6 +19354,9 @@ msgstr "dieser Befehl lehnt Atom ab %%(%.*s)"
msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s kann nicht mit --python, --shell, --tcl verwendet werden"
+msgid "failed to run 'describe'"
+msgstr "'describe' konnte nicht ausgeführt werden"
+
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(kein Branch, Rebase von %s)"
@@ -19315,6 +19418,9 @@ msgstr "Schüssel"
msgid "field name to sort on"
msgstr "sortiere nach diesem Feld"
+msgid "exclude refs which match pattern"
+msgstr "Ausschluss von Referenzen, die dem Muster entsprechen"
+
#, c-format
msgid "not a reflog: %s"
msgstr "Kein Reflog: %s"
@@ -19772,10 +19878,11 @@ msgstr[1] ""
"Ihr Branch und '%s' sind divergiert,\n"
"und haben jeweils %d und %d unterschiedliche Commits.\n"
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
msgstr ""
-" (benutzen Sie \"git pull\", um Ihren Branch mit dem Remote-Branch "
-"zusammenzuführen)\n"
+" (verwenden Sie \"git pull\", wenn Sie den Remote-Branch in Ihren "
+"integrieren wollen)\n"
#, c-format
msgid "cannot parse expected object name '%s'"
@@ -19887,6 +19994,10 @@ msgstr "konnte kein Commit für das Argument ancestry-path %s erhalten"
msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<Pack-Datei> wird nicht länger unterstützt"
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "ungültige Option '%s' im Modus --stdin"
+
msgid "your current branch appears to be broken"
msgstr "Ihr aktueller Branch scheint fehlerhaft zu sein."
@@ -21057,6 +21168,77 @@ msgid "setsid failed"
msgstr "setsid fehlgeschlagen"
#, c-format
+msgid "cannot stat template '%s'"
+msgstr "kann Vorlage '%s' nicht lesen"
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "kann Verzeichnis '%s' nicht öffnen"
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "kann Verweis '%s' nicht lesen"
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "kann symbolische Verknüpfung '%s' auf '%s' nicht erstellen"
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "kann '%s' nicht nach '%s' kopieren"
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "ignoriere Vorlage %s"
+
+#, c-format
+msgid "templates not found in %s"
+msgstr "Keine Vorlagen in %s gefunden."
+
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "kopiere keine Vorlagen von '%s': %s"
+
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "ungültiger initialer Branchname: '%s'"
+
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "kann nicht mit Dateityp %d umgehen"
+
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "Konnte %s nicht nach %s verschieben"
+
+msgid "attempt to reinitialize repository with different hash"
+msgstr "Versuch, das Repository mit einem anderen Hash zu reinitialisieren"
+
+#, c-format
+msgid "%s already exists"
+msgstr "%s existiert bereits"
+
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "Neu-Initialisierung: --initial-branch=%s ignoriert"
+
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "Bestehendes verteiltes Git-Repository in %s%s neuinitialisiert\n"
+
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "Bestehendes Git-Repository in %s%s neuinitialisiert\n"
+
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "Leeres verteiltes Git-Repository in %s%s initialisiert\n"
+
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "Leeres Git-Repository in %s%s initialisiert\n"
+
+#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
msgstr "Index-Eintrag ist ein Verzeichnis, aber nicht partiell (%08x)"
diff --git a/po/fr.po b/po/fr.po
index db6efc0250..68a4d45fd8 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -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: 2023-05-20 12:25+0200\n"
-"PO-Revision-Date: 2023-05-18 18:50+0200\n"
+"POT-Creation-Date: 2023-08-16 11:48+0200\n"
+"PO-Revision-Date: 2023-08-16 11:49+0200\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"
@@ -716,9 +716,8 @@ msgstr "Impossible de tirer car vous avez des fichiers non fusionnés."
msgid "Reverting is not possible because you have unmerged files."
msgstr "Impossible d'annuler car vous avez des fichiers non fusionnés."
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "%s n'est pas possible car vous avez des fichiers non fusionnés."
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr "Impossible de rebaser, car vous avez des fichiers non fusionnés."
msgid ""
"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
@@ -868,6 +867,12 @@ msgstr "les options '%s' et '%s' ne peuvent pas être utilisées ensemble"
msgid "'%s' outside a repository"
msgstr "'%s' hors d'un dépôt"
+msgid "failed to read patch"
+msgstr "impossible de lire la rustine"
+
+msgid "patch too large"
+msgstr "la rustine est trop grosse"
+
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "Impossible de préparer la regexp d'horodatage %s"
@@ -1787,9 +1792,10 @@ msgid "a branch named '%s' already exists"
msgstr "Une branche nommée '%s' existe déjà"
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
msgstr ""
-"impossible de forcer la mise à jour de la branche '%s' extraite dans '%s'"
+"impossible de forcer la mise à jour de la branche '%s' utilisée par l'arbre-"
+"de-travail dans '%s'"
#, c-format
msgid "cannot set up tracking information; starting point '%s' is not a branch"
@@ -1859,17 +1865,6 @@ msgstr "git add [<options>] [--] <chemin>..."
msgid "cannot chmod %cx '%s'"
msgstr "impossible de chmod %cx '%s'"
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "état de diff inattendu %c"
-
-msgid "updating files failed"
-msgstr "échec de la mise à jour des fichiers"
-
-#, c-format
-msgid "remove '%s'\n"
-msgstr "suppression de '%s'\n"
-
msgid "Unstaged changes after refreshing the index:"
msgstr "Modifications non indexées après rafraîchissement de l'index :"
@@ -2305,10 +2300,6 @@ msgstr "passer l'option -m à git-mailinfo"
msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "passer l'option --keep-cr à git-mailsplit fpour le format mbox"
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr ""
-"ne pas passer l'option --keep-cr à git-mailsplit indépendamment de am.keepcr"
-
msgid "strip everything before a scissors line"
msgstr "retirer tout le contenu avant la ligne des ciseaux"
@@ -3370,12 +3361,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3420,6 +3411,9 @@ msgstr "comme --batch, mais ne pas émettre <contenu>"
msgid "stdin is NUL-terminated"
msgstr "l'entrée se termine par NUL"
+msgid "stdin and stdout is NUL-terminated"
+msgstr "l'entrée et la sortie standard se terminent par NUL"
+
msgid "read commands from stdin"
msgstr "lire les commandes depuis l'entrée standard"
@@ -4296,12 +4290,6 @@ msgstr "spécifique au serveur"
msgid "option to transmit"
msgstr "option à transmettre"
-msgid "use IPv4 addresses only"
-msgstr "n'utiliser que des adresses IPv4"
-
-msgid "use IPv6 addresses only"
-msgstr "n'utiliser que des adresses IPv6"
-
msgid "apply partial clone filters to submodules"
msgstr "appliquer les filtres de clone partiel aux sous-modules"
@@ -4753,6 +4741,9 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+msgid "updating files failed"
+msgstr "échec de la mise à jour des fichiers"
+
msgid "failed to unpack HEAD tree object"
msgstr "échec du dépaquetage de l'objet arbre HEAD"
@@ -4812,8 +4803,8 @@ msgstr ""
"qui n'est pas utilisé dans le message de validation actuel"
#, c-format
-msgid "could not lookup commit %s"
-msgstr "impossible de rechercher le commit %s"
+msgid "could not lookup commit '%s'"
+msgstr "impossible de rechercher le commit '%s'"
#, c-format
msgid "(reading log message from standard input)\n"
@@ -7461,77 +7452,6 @@ msgstr "--verify sans nom de fichier paquet donné"
msgid "fsck error in pack objects"
msgstr "erreur de fsck dans les objets paquets"
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "impossible de faire un stat du modèle '%s'"
-
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "impossible d'ouvrir le répertoire '%s'"
-
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "impossible de lire le lien '%s'"
-
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "impossible de créer un lien symbolique de '%s' '%s'"
-
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "impossible de copier '%s' vers '%s'"
-
-#, c-format
-msgid "ignoring template %s"
-msgstr "modèle %s ignoré"
-
-#, c-format
-msgid "templates not found in %s"
-msgstr "modèles non trouvés dans %s"
-
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "pas de copie des modèles depuis '%s' : %s"
-
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "nom de branche initiale invalide : '%s'"
-
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "impossible de traiter le fichier de type %d"
-
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "impossible de déplacer %s vers %s"
-
-msgid "attempt to reinitialize repository with different hash"
-msgstr "essai de réinitialisation du dépôt avec une empreinte différente"
-
-#, c-format
-msgid "%s already exists"
-msgstr "%s existe déjà"
-
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "re-initialisation : --initial-branch=%s ignoré"
-
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "Dépôt Git existant partagé réinitialisé dans %s%s\n"
-
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "Dépôt Git existant réinitialisé dans %s%s\n"
-
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "Dépôt Git vide partagé initialisé dans %s%s\n"
-
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "Dépôt Git vide initialisé dans %s%s\n"
-
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -7980,6 +7900,10 @@ msgstr ""
"<branche_amont> manuellement.\n"
#, c-format
+msgid "could not get object info about '%s'"
+msgstr "impossible d'obtenir l'information d'objet pour '%s'"
+
+#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
msgstr "mauvais format ls-files : l'élément '%s' ne commence pas par '('"
@@ -8127,10 +8051,6 @@ msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
msgstr "git ls-tree [<options>] <arbre ou apparenté> [<chemin>...]"
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "impossible d'obtenir l'information d'objet pour '%s'"
-
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "mauvais format ls-tree : l'élément '%s' ne commence pas par '('"
@@ -8872,22 +8792,26 @@ msgid "git notes [--ref <notes-ref>] [list [<object>]]"
msgstr "git notes [--ref <références-notes>] [list [<object>]]"
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <références-notes>] add [-f] [--allow-empty] [-m <message> "
-"| -F <fichier> | (-c | -C) <objet>] [<objet>]"
+"git notes [--ref <référence-notes>] add [-f] [--allow-empty] [--"
+"[no-]separator|--separator=<coupure-paragraphe>] [--[no-]stripspace] [-m "
+"<message> | -F <fichier> | (-c | -C) <objet>] [<objet>]"
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
msgstr ""
"git notes [--ref <références-notes>] copy [-f] <depuis-objet> <vers-objet>"
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <références-notes>] append [--allow-empty] [-m <message> | -"
-"F <fichier> | (-c | -C) <objet>] [<objet>]"
+"git notes [--ref <références-notes>] append [--allow-empty] [--"
+"[no-]separator|--separator=<coupure-paragraphe>] [--[no-]stripspace]-m "
+"<message> | -F <fichier> | (-c | -C) <objet>] [<objet>]"
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
msgstr "git notes [--ref <références-notes>] edit [--allow-empty] [<objet>]"
@@ -9019,6 +8943,15 @@ msgstr "permettre de stocker une note vide"
msgid "replace existing notes"
msgstr "remplacer les notes existantes"
+msgid "<paragraph-break>"
+msgstr "<séparateur-paragraphe>"
+
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "insérer <séparateur-paragraphe> entre les paragraphes"
+
+msgid "remove unnecessary whitespace"
+msgstr "retirer les espaces inutiles"
+
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -9584,8 +9517,11 @@ msgstr ""
msgid "refusing to run without --i-still-use-this"
msgstr "refus de lancer sans --i-still-use-this"
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <motif>] [--exclude <motif>]"
msgid "pack everything"
msgstr "empaqueter tout"
@@ -9593,6 +9529,12 @@ msgstr "empaqueter tout"
msgid "prune loose refs (default)"
msgstr "élaguer les références perdues (défaut)"
+msgid "references to include"
+msgstr "références à inclure"
+
+msgid "references to exclude"
+msgstr "références à exclure"
+
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -9650,6 +9592,12 @@ msgstr "forcer l'écrasement de la branche locale"
msgid "number of submodules pulled in parallel"
msgstr "nombre de sous-modules tirés en parallèle"
+msgid "use IPv4 addresses only"
+msgstr "n'utiliser que des adresses IPv4"
+
+msgid "use IPv6 addresses only"
+msgstr "n'utiliser que des adresses IPv6"
+
msgid ""
"There is no candidate for rebasing against among the refs that you just "
"fetched."
@@ -9920,46 +9868,43 @@ msgstr ""
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Les mises à jour ont été rejetées car la pointe de la branche courante est "
+"Les mises à jour ont été rejetées car le sommet de la branche actuelle est "
"derrière\n"
-"son homologue distant. Intégrez les changements distants (par exemple 'git "
-"pull ...')\n"
-"avant de pousser à nouveau.\n"
+"son homologue distant. Si vous souhaitez intégrer les changements distants,\n"
+"utilisez 'git pull' avant de pousser à nouveau.\n"
"Voir la 'Note à propos des avances rapides' dans 'git push --help' pour plus "
"d'information."
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Les mises à jour ont été rejetées car la pointe de la branche courante est "
+"Les mises à jour ont été rejetées, car le sommet d'une branche poussée est "
"derrière\n"
-"son homologue distant. Extrayez cette branche et intégrez les changements "
-"distants\n"
-"(par exemple 'git pull ...') avant de pousser à nouveau.\n"
+"son homologue distant. Si vous souhaitez intégrer les changements distants,\n"
+"\"utilisez 'git pull' avant de pousser à nouveau.\n"
"Voir la 'Note à propos des avances rapides' dans 'git push --help' pour plus "
"d'information."
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Les mises à jour ont été rejetées car la branche distante contient du "
-"travail que\n"
-"vous n'avez pas en local. Ceci est généralement causé par un autre dépôt "
-"poussé\n"
-"vers la même référence. Vous pourriez intégrer d'abord les changements "
-"distants\n"
-"(par exemple 'git pull ...') avant de pousser à nouveau.\n"
+"Les mises à jour ont été rejetées car le distant contient du travail que "
+"vous\n"
+"n'avez pas localement. La cause probable est que quelqu'un a déjà poussé sur "
+"la même réf.\n"
+"depuis un autre dépôt. Si vous souhaitez intégrer les changements distants,\n"
+"\"utilisez 'git pull' avant de pousser à nouveau.\n"
"Voir la 'Note à propos des avances rapides' dans 'git push --help' pour plus "
"d'information."
@@ -9980,15 +9925,18 @@ msgstr ""
"vers un objet qui n'est pas un commit, sans utiliser l'option '--force'.\n"
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Les mises à jour ont été rejetées, car la pointe de la branche\n"
-"de suivi a été mise à jour depuis la dernière extraction. Intégrez\n"
-"ces changements localement (par exemple 'git pull ...') avant de\n"
-"forcer à nouveau une mise à jour.\n"
+"Les mises à jour ont été rejetées, car le sommet de la branche de suivi à "
+"distance a\n"
+"été mis à jour depuis la dernière extraction. Si vous souhaitez intégrer les "
+"changements distants,\n"
+"\"utilisez 'git pull' avant de pousser à nouveau.\n"
+"Voir la 'Note à propos des avances rapides' dans 'git push --help' pour plus "
+"d'information."
#, c-format
msgid "Pushing to %s\n"
@@ -10860,12 +10808,13 @@ msgstr "argument miroir inconnu : %s"
msgid "fetch the remote branches"
msgstr "rapatrier les branches distantes"
-msgid "import all tags and associated objects when fetching"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
msgstr ""
-"importer toutes les étiquettes et les objets associés lors du rapatriement"
-
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "ou ne rapatrier aucune étiquette (--no-tags)"
+"importer toutes les étiquettes et les objets associés lors de la "
+"récupération\n"
+"ou ne récupérer aucune étiquette (--no-tags)"
msgid "branch(es) to track"
msgstr "branche(s) à suivre"
@@ -12849,6 +12798,10 @@ msgid "Skipping submodule '%s'"
msgstr "Sous-module '%s' non traité"
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "impossible de cloner le sous-module '%s' sans une URL"
+
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "Impossible de cloner '%s'. Réessai prévu"
@@ -13611,10 +13564,11 @@ msgstr "afficher le contenu de l'étiquette"
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <chaîne>]]\n"
-" [-b <nouvelle-branche>] <chemin> [<commit-esque>]"
+" [--orphan] [(-b | -B) <nouvelle-branche>] <chemin> [<commit-"
+"esque>]"
msgid "git worktree list [-v | --porcelain [-z]]"
msgstr "git worktree list [-v | --porcelain [-z]]"
@@ -13637,6 +13591,37 @@ msgstr "git worktree repair [<chemin>...]"
msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <arbre-de-travail>"
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Aucune branche source possible, activation de '--orphan'"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Si vous vouliez créer un arbre-de-travail contenant une nouvelle branche\n"
+"orpheline (une branche sans commit) pour ce dépôt, vous pouvez le faire\n"
+"en utilisant le drapeau --orphan :\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Si vous vouliez créer un arbre-de-travail contenant une nouvelle branche\n"
+"orpheline (une branche sans commit) pour ce dépôt, vous pouvez le faire\n"
+"en utilisant le drapeau --orphan :\n"
+"\n"
+" git worktree add --orphan %s\n"
+
#, c-format
msgid "Removing %s/%s: %s"
msgstr "Suppression de %s/%s : %s"
@@ -13709,9 +13694,35 @@ msgid "Preparing worktree (checking out '%s')"
msgstr "Préparation de l'arbre de travail (extraction de '%s')"
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "non joignable : référence invalide : %s"
+
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "Préparation de l'arbre de travail (HEAD détachée %s)"
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD pointe sur une référence invalide (ou orpheline).\n"
+"chemin de HEAD '%s'\n"
+"contenu de HEAD : '%s'"
+
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"Aucune réf locale ou distant n'existe malgré la présence d'au moins un "
+"distant,\n"
+"on arrête ; utilisez 'add -f' pour passe outre ou récupérer le distant avant"
+
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "'%s' et '%s' ne peuvent pas être utilisées ensemble"
+
msgid "checkout <branch> even if already checked out in other worktree"
msgstr ""
"extraire la <branche> même si elle est déjà extraite dans une autre copie de "
@@ -13723,6 +13734,9 @@ msgstr "créer une nouvelle branche"
msgid "create or reset a branch"
msgstr "créer ou réinitialiser une branche"
+msgid "create unborn/orphaned branch"
+msgstr "créer une branche non née/orpheline"
+
msgid "populate the new working tree"
msgstr "remplissage de la nouvelle copie de travail"
@@ -13742,6 +13756,13 @@ msgstr "essayer de nommer la nouvelle branche comme la branche amont"
msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "les options '%s', '%s' et '%s' ne peuvent pas être utilisées ensemble"
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "les options '%s' et '%s' ne peuvent pas être utilisées ensemble"
+
+msgid "<commit-ish>"
+msgstr "<commit-esque>"
+
msgid "added with --lock"
msgstr "ajouté avec --lock"
@@ -13979,6 +14000,14 @@ msgid_plural "The bundle requires these %<PRIuMAX> refs:"
msgstr[0] "Le colis exige cette référence :"
msgstr[1] "Le colis exige ces %<PRIuMAX> références :"
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "algorithme d'empreinte du colis : %s"
+
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Le colis utilise ce filtre : %s"
+
msgid "unable to dup bundle descriptor"
msgstr "impossible de dupliquer le descripteur de liasse"
@@ -14214,9 +14243,9 @@ msgstr "Afficher les lignes correspondant à un motif"
msgid "A portable graphical interface to Git"
msgstr "Une interface graphique portable pour Git"
-msgid "Compute object ID and optionally creates a blob from a file"
+msgid "Compute object ID and optionally create an object from a file"
msgstr ""
-"Calculer l'ID d'objet et créer optionnellement un blob depuis un fichier"
+"Calculer l'ID d'objet et créer optionnellement un objet depuis un fichier"
msgid "Display help information about Git"
msgstr "Afficher l'information d'aide à propos de Git"
@@ -14639,6 +14668,10 @@ msgid "commit-graph chain does not match"
msgstr "la chaîne de graphe de commit ne correspond pas"
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "nombre de commits dans le graphe de base trop haut : %<PRIuMAX>"
+
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr ""
"chaîne de graphe de commit invalide : la ligne '%s' n'est pas une empreinte"
@@ -14729,6 +14762,15 @@ msgstr "échec du renommage du fichier de graphe de commits"
msgid "failed to rename temporary commit-graph file"
msgstr "impossible de renommer le fichier temporaire de graphe de commits"
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr ""
+"impossible de fusionner des graphes avec %<PRIuMAX>, %<PRIuMAX> commits"
+
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "impossible de fusionner le graphe %s, trop de commits : %<PRIuMAX>"
+
msgid "Scanning merged commits"
msgstr "Analyse des commits de fusion"
@@ -14761,9 +14803,6 @@ msgstr ""
msgid "failed to parse commit %s from commit-graph"
msgstr "échec de l'analyse le commit %s depuis le graphe de commits"
-msgid "Verifying commits in commit graph"
-msgstr "Verification des commits dans le graphe de commits"
-
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr ""
@@ -14816,6 +14855,9 @@ msgstr ""
"la date de validation pour le commit %s dans le graphe de commit est "
"%<PRIuMAX> != %<PRIuMAX>"
+msgid "Verifying commits in commit graph"
+msgstr "Verification des commits dans le graphe de commits"
+
#, c-format
msgid "%s %s is not a commit!"
msgstr "%s %s n'est pas un commit !"
@@ -15784,6 +15826,12 @@ msgstr "aucune base de fusion trouvée"
msgid "multiple merge bases found"
msgstr "bases multiples de fusion trouvées"
+msgid "cannot compare stdin to a directory"
+msgstr "impossible de comparer stdin à un répertoire"
+
+msgid "cannot compare a named pipe to a directory"
+msgstr "impossible de réparer un tuyau nommé à un répertoire"
+
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<options>] <chemin> <chemin>"
@@ -15843,6 +15891,14 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "l'application de diff externe a disparu, arrêt à %s"
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow a besoin d'une spécification de chemin unique"
+
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr ""
+"le spécificateur magique de chemin n'est pas pris en charge par --follow : %s"
+
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
msgstr ""
@@ -15861,9 +15917,6 @@ msgstr ""
"les options '%s' et '%s' ne peuvent pas être utilisées ensemble, utilisez "
"'%s' avec '%s' et '%s'"
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow a besoin d'une spécification de chemin unique"
-
#, c-format
msgid "invalid --stat value: %s"
msgstr "valeur invalide de --stat : %s"
@@ -18795,6 +18848,13 @@ msgid "could not parse log for '%s'"
msgstr "impossible d'analyser le journal pour '%s'"
#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "sommet supplémentaire dégénéré invalide : '%s'"
+
+msgid "unable to enumerate additional recent objects"
+msgstr "impossible d'énumérer les objets récents additionnels"
+
+#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
msgstr "pas d'ajout d'alias de fichier '%s'(« %s » existe déjà dans l'index)"
@@ -18946,6 +19006,14 @@ msgstr "impossible de régler les bits de droit de '%s'"
msgid "%s: cannot drop to stage #0"
msgstr "%s : impossible de revenir à l'étape 0"
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "état de diff inattendu %c"
+
+#, c-format
+msgid "remove '%s'\n"
+msgstr "suppression de '%s'\n"
+
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
"continue'.\n"
@@ -19149,6 +19217,22 @@ msgid "positive value expected contents:lines=%s"
msgstr "valeur positive attendue contents:lines=%s"
#, c-format
+msgid "argument expected for %s"
+msgstr "argument attendu pour %s"
+
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "valeur positive attendue %s=%s"
+
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "impossible d'analyser complètement %s=%s"
+
+#, c-format
+msgid "value expected %s="
+msgstr "valeur attendue %s="
+
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "valeur positive attendue '%s' dans %%(%s)"
@@ -19222,6 +19306,9 @@ msgstr "cette commande rejette l'atome %%(%.*s)"
msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s ne peut pas être utilisé avec --python, --shell, --tcl"
+msgid "failed to run 'describe'"
+msgstr "échec pour lancer 'describe'"
+
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(aucune branche, rebasage de %s)"
@@ -19283,6 +19370,9 @@ msgstr "clé"
msgid "field name to sort on"
msgstr "nom du champ servant à trier"
+msgid "exclude refs which match pattern"
+msgstr "exclure les références correspondant à <motif>"
+
#, c-format
msgid "not a reflog: %s"
msgstr "'%s' n'est pas un journal de références"
@@ -19736,9 +19826,10 @@ msgstr[1] ""
"Votre branche et '%s' ont divergé,\n"
"et ont %d et %d commits différents chacune respectivement.\n"
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
msgstr ""
-" (utilisez \"git pull\" pour fusionner la branche distante dans la vôtre)\n"
+" (utilisez \"git pull\" pour intégrer la branche distante avec la vôtre)\n"
#, c-format
msgid "cannot parse expected object name '%s'"
@@ -19851,6 +19942,10 @@ msgstr ""
msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<fichier-paquet> n'est plus géré"
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "option invalide '%s' en mode --stdin"
+
msgid "your current branch appears to be broken"
msgstr "votre branche actuelle semble cassée"
@@ -21014,6 +21109,77 @@ msgid "setsid failed"
msgstr "échec du setsid"
#, c-format
+msgid "cannot stat template '%s'"
+msgstr "impossible de faire un stat du modèle '%s'"
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "impossible d'ouvrir le répertoire '%s'"
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "impossible de lire le lien '%s'"
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "impossible de créer un lien symbolique de '%s' '%s'"
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "impossible de copier '%s' vers '%s'"
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "modèle %s ignoré"
+
+#, c-format
+msgid "templates not found in %s"
+msgstr "modèles non trouvés dans %s"
+
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "pas de copie des modèles depuis '%s' : %s"
+
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "nom de branche initiale invalide : '%s'"
+
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "impossible de traiter le fichier de type %d"
+
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "impossible de déplacer %s vers %s"
+
+msgid "attempt to reinitialize repository with different hash"
+msgstr "essai de réinitialisation du dépôt avec une empreinte différente"
+
+#, c-format
+msgid "%s already exists"
+msgstr "%s existe déjà"
+
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-initialisation : --initial-branch=%s ignoré"
+
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "Dépôt Git existant partagé réinitialisé dans %s%s\n"
+
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "Dépôt Git existant réinitialisé dans %s%s\n"
+
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "Dépôt Git vide partagé initialisé dans %s%s\n"
+
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "Dépôt Git vide initialisé dans %s%s\n"
+
+#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
msgstr "l'entrée d'index est un répertoire, mais pas clairsemé (%08x)"
@@ -22870,6 +23036,29 @@ msgstr "%s sauté avec un suffix de sauvegarde '%s'.\n"
msgid "Do you really want to send %s? [y|N]: "
msgstr "Souhaitez-vous réellement envoyer %s ?[y|N] : "
+#, c-format
+#~ msgid "It is not possible to %s because you have unmerged files."
+#~ msgstr "%s n'est pas possible car vous avez des fichiers non fusionnés."
+
+#~ msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
+#~ msgstr ""
+#~ "ne pas passer l'option --keep-cr à git-mailsplit indépendamment de am."
+#~ "keepcr"
+
+#~ msgid ""
+#~ "Updates were rejected because the tip of the remote-tracking\n"
+#~ "branch has been updated since the last checkout. You may want\n"
+#~ "to integrate those changes locally (e.g., 'git pull ...')\n"
+#~ "before forcing an update.\n"
+#~ msgstr ""
+#~ "Les mises à jour ont été rejetées, car la pointe de la branche\n"
+#~ "de suivi a été mise à jour depuis la dernière extraction. Intégrez\n"
+#~ "ces changements localement (par exemple 'git pull ...') avant de\n"
+#~ "forcer à nouveau une mise à jour.\n"
+
+#~ msgid "or do not fetch any tag at all (--no-tags)"
+#~ msgstr "ou ne rapatrier aucune étiquette (--no-tags)"
+
#~ msgid "current working directory is untracked"
#~ msgstr "l'arbre de travail actuel est non-suivi"
diff --git a/po/id.po b/po/id.po
index ccd38422c7..e20e18e893 100644
--- 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: 2023-05-19 19:57+0000\n"
-"PO-Revision-Date: 2023-05-22 15:24+0700\n"
+"POT-Creation-Date: 2023-08-06 17:06+0700\n"
+"PO-Revision-Date: 2023-08-06 17:06+0700\n"
"Last-Translator: Bagas Sanjaya <bagasdotme@gmail.com>\n"
"Language-Team: Indonesian\n"
"Language: id\n"
@@ -942,6 +942,14 @@ msgid "'%s' outside a repository"
msgstr "'%s' di luar repositori"
#: apply.c
+msgid "failed to read patch"
+msgstr "gagal membaca tambalan"
+
+#: apply.c
+msgid "patch too large"
+msgstr "tambalan terlalu besar"
+
+#: apply.c
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "Tidak dapat menyiapkan ekspresi reguler stempel waktu %s"
@@ -2062,8 +2070,10 @@ msgstr "sebuah cabang bernama '%s' sudah ada"
#: branch.c
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
-msgstr "tidak dapat memperbarui paksa cabang '%s' yang ter-check out pada '%s'"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr ""
+"tidak dapat memperbarui paksa cabang '%s' yang yang digunakan oleh pohon "
+"kerja pada '%s'"
#: branch.c
#, c-format
@@ -2146,20 +2156,6 @@ msgid "cannot chmod %cx '%s'"
msgstr "tidak dapat chmod %cx '%s'"
#: builtin/add.c
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "status diff tak diharapkan %c"
-
-#: builtin/add.c builtin/commit.c
-msgid "updating files failed"
-msgstr "gagal memperbarui berkas"
-
-#: builtin/add.c
-#, c-format
-msgid "remove '%s'\n"
-msgstr "hapus '%s'\n"
-
-#: builtin/add.c
msgid "Unstaged changes after refreshing the index:"
msgstr "Perubahan tak tergelar setelah menyegarkan indeks:"
@@ -2705,11 +2701,6 @@ msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "lewatkan opsi --keep-cr ke git-mailsplit untuk format mbox"
#: builtin/am.c
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr ""
-"jangan lewatkan opsi --keep-cr ke git-mailsplit tak bergantung pada am.keepcr"
-
-#: builtin/am.c
msgid "strip everything before a scissors line"
msgstr "copot semuanya sebelum garis gunting"
@@ -4022,7 +4013,7 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
@@ -4087,6 +4078,10 @@ msgid "stdin is NUL-terminated"
msgstr "stdin diakhiri dengan NUL"
#: builtin/cat-file.c
+msgid "stdin and stdout is NUL-terminated"
+msgstr "stdin dan stdout diakhiri dengan NUL"
+
+#: builtin/cat-file.c
msgid "read commands from stdin"
msgstr "baca perintah dari masukan standar"
@@ -4624,8 +4619,8 @@ msgid ""
"Consider \"git merge --quit\" or \"git worktree add\"."
msgstr ""
"tidak dapat mengganti cabang saat penggabungan\n"
-"Pertimbangkan untuk menggunakan \"git merge --quit\" atau \"git worktree add"
-"\"."
+"Pertimbangkan untuk menggunakan \"git merge --quit\" atau \"git worktree "
+"add\"."
#: builtin/checkout.c
msgid ""
@@ -4641,8 +4636,8 @@ msgid ""
"Consider \"git rebase --quit\" or \"git worktree add\"."
msgstr ""
"tidak dapat mengganti cabang saat pendasaran ulang\n"
-"Pertimbangkan untuk menggunakan \"git rebase --quit\" atau \"git worktree add"
-"\"."
+"Pertimbangkan untuk menggunakan \"git rebase --quit\" atau \"git worktree "
+"add\"."
#: builtin/checkout.c
msgid ""
@@ -4659,8 +4654,8 @@ msgid ""
"Consider \"git revert --quit\" or \"git worktree add\"."
msgstr ""
"tidak dapat mengganti cabang saat pembalikan\n"
-"Pertimbangkan untuk menggunakan \"git revert --quit\" atau \"git worktree add"
-"\"."
+"Pertimbangkan untuk menggunakan \"git revert --quit\" atau \"git worktree "
+"add\"."
#: builtin/checkout.c
msgid "you are switching branch while bisecting"
@@ -4999,7 +4994,8 @@ msgid "remove whole directories"
msgstr "hapus keseluruhan direktori"
#: builtin/clean.c builtin/describe.c builtin/grep.c builtin/log.c
-#: builtin/ls-files.c builtin/name-rev.c builtin/show-ref.c
+#: builtin/ls-files.c builtin/name-rev.c builtin/pack-refs.c builtin/show-ref.c
+#: ref-filter.h
msgid "pattern"
msgstr "pola"
@@ -5171,14 +5167,6 @@ msgstr "spesifik ke server"
msgid "option to transmit"
msgstr "opsi untuk transmisi"
-#: builtin/clone.c builtin/fetch.c builtin/pull.c builtin/push.c
-msgid "use IPv4 addresses only"
-msgstr "gunakan hanya alamat IPv4"
-
-#: builtin/clone.c builtin/fetch.c builtin/pull.c builtin/push.c
-msgid "use IPv6 addresses only"
-msgstr "gunakan hanya alamat IPv6"
-
#: builtin/clone.c
msgid "apply partial clone filters to submodules"
msgstr "terapkan saringan kloning parsial ke submodul"
@@ -5726,6 +5714,10 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+#: builtin/commit.c read-cache.c
+msgid "updating files failed"
+msgstr "gagal memperbarui berkas"
+
#: builtin/commit.c
msgid "failed to unpack HEAD tree object"
msgstr "gagal membuka objek pohon HEAD"
@@ -5803,8 +5795,8 @@ msgstr ""
#: builtin/commit.c builtin/merge-tree.c
#, c-format
-msgid "could not lookup commit %s"
-msgstr "tidak dapat mencari komit %s"
+msgid "could not lookup commit '%s'"
+msgstr "tidak dapat mencari komit '%s'"
#: builtin/commit.c builtin/shortlog.c
#, c-format
@@ -8065,7 +8057,7 @@ msgstr "Gagal men-fstat %s: %s"
msgid "failed to parse '%s' value '%s'"
msgstr "gagal menguraikan nilai '%s' '%s'"
-#: builtin/gc.c builtin/init-db.c
+#: builtin/gc.c setup.c
#, c-format
msgid "cannot stat '%s'"
msgstr "tidak dapat men-stat '%s'"
@@ -9089,7 +9081,7 @@ msgstr "tidak dapat kembali ke direktori kerja saat ini"
msgid "bad %s"
msgstr "%s jelek"
-#: builtin/index-pack.c builtin/init-db.c
+#: builtin/index-pack.c builtin/init-db.c setup.c
#, c-format
msgid "unknown hash algorithm '%s'"
msgstr "algoritma hash tak dikenal '%s'"
@@ -9107,95 +9099,6 @@ msgid "fsck error in pack objects"
msgstr "kesalahan fsck dalam objek paket"
#: builtin/init-db.c
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "tidak dapat men-stat templat '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "tidak dapat membuka direktori '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "tidak dapat membaca tautan '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "tidak dapat menautkan simbolik '%s' '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "tidak dapat menyalin '%s' ke '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "ignoring template %s"
-msgstr "mengabaikan templat %s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "templates not found in %s"
-msgstr "templat tidak ditemukan di %s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "tidak menyalin templat dari '%s': %s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "nama cabang asal salah: '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "tidak dapat menangani tipe berkas %d"
-
-#: builtin/init-db.c
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "tidak dapat memindahkan %s ke %s"
-
-#: builtin/init-db.c
-msgid "attempt to reinitialize repository with different hash"
-msgstr "mencoba menginisialisasi ulang repositori dengan hash yang berbeda"
-
-#: builtin/init-db.c
-#, c-format
-msgid "%s already exists"
-msgstr "%s sudah ada"
-
-#: builtin/init-db.c
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "re-init: --initial-branch=%s diabaikan"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "Repositori berbagi Git yang sudah ada diinisialisasi ulang di %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "Repositori Git diinisialisasi ulang di %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "Repositori berbagi Git kosong diinisialisasi di %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "Repositori Git kosong dinisialisasi di %s%s\n"
-
-#: builtin/init-db.c
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -9755,6 +9658,11 @@ msgstr ""
"Tidak dapat menemukan cabang remote terlacak, mohon sebutkan <hulu>\n"
"secara manual.\n"
+#: builtin/ls-files.c builtin/ls-tree.c
+#, c-format
+msgid "could not get object info about '%s'"
+msgstr "tidak dapat mendapatkan info objek tentang '%s'"
+
#: builtin/ls-files.c
#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
@@ -9944,11 +9852,6 @@ msgstr "git ls-tree [<opsi>] <mirip-pohon> [<jalur>...]"
#: builtin/ls-tree.c
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "tidak dapat mendapatkan info objek tentang '%s'"
-
-#: builtin/ls-tree.c
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "format ls-tree jelek: elemen '%s' tidak dimulai dengan '('"
@@ -10884,11 +10787,13 @@ msgstr "git notes [--ref <referensi catan>] [list [<objek>]]"
#: builtin/notes.c
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <referensi catatan>] add [-f] [--allow-empty] [-m <pesan | -"
-"F <berkas> | (-c | -C) <objek>] [<objek>]"
+"git notes [--ref <referensi catatan>] add [-f] [--allow-empty] [--"
+"[no-]separator|--separator=<pemisah paragraf>] [--[no-]stripspace] [-m "
+"<pesan | -F <berkas> | (-c | -C) <objek>] [<objek>]"
#: builtin/notes.c
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
@@ -10897,11 +10802,13 @@ msgstr ""
#: builtin/notes.c
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <referensi catatan>] append [--alow-empty] [-m <pesan> | -F "
-"<berkas> | (-c | -C) <objek>] [<objek>]"
+"git notes [--ref <referensi catatan>] append [--alow-empty] [--"
+"[no]separator|--separator=<pemisah paragraf>] [--[no-]stripspace] [-m "
+"<pesan> | -F <berkas> | (-c | -C) <objek>] [<objek>]"
#: builtin/notes.c
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
@@ -11072,6 +10979,18 @@ msgid "replace existing notes"
msgstr "timpa catatan yang sudah ada"
#: builtin/notes.c
+msgid "<paragraph-break>"
+msgstr "<pemisah paragraf>"
+
+#: builtin/notes.c
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "masukkan <pemisah paragraf> di antara paragraf"
+
+#: builtin/notes.c
+msgid "remove unnecessary whitespace"
+msgstr "hapus spasi yang tidak diperlukan"
+
+#: builtin/notes.c
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -11771,8 +11690,11 @@ msgid "refusing to run without --i-still-use-this"
msgstr "menolak menjalankan tanpa --i-still-use-this"
#: builtin/pack-refs.c
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <pola>] [--exclude <pola>]"
#: builtin/pack-refs.c
msgid "pack everything"
@@ -11782,6 +11704,14 @@ msgstr "pak semuanya"
msgid "prune loose refs (default)"
msgstr "pangkas referensi longgar (asali)"
+#: builtin/pack-refs.c
+msgid "references to include"
+msgstr "referensi untuk ditambahkan"
+
+#: builtin/pack-refs.c
+msgid "references to exclude"
+msgstr "referensi untuk dikecualikan"
+
#: builtin/patch-id.c
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -11858,6 +11788,14 @@ msgstr "paksa timpa cabang lokal"
msgid "number of submodules pulled in parallel"
msgstr "nomor submodul ditarik dalam paralel"
+#: builtin/pull.c parse-options.h
+msgid "use IPv4 addresses only"
+msgstr "gunakan hanya alamat IPv4"
+
+#: builtin/pull.c parse-options.h
+msgid "use IPv6 addresses only"
+msgstr "gunakan hanya alamat IPv6"
+
#: builtin/pull.c
msgid ""
"There is no candidate for rebasing against among the refs that you just "
@@ -12163,39 +12101,39 @@ msgstr ""
#: builtin/push.c
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Pembaruan ditolak karena ujung dari cabang Anda saat ini di belakang\n"
-"pasangan remotenya. Integrasikan perubahan remote (seperti\n"
-"'git pull') sebelum dorong lagi.\n"
+"pasangan remotenya. Jika Anda ingin mengintegrasikan perubahan remote,\n"
+"lakukan 'git pull' sebelum mendorong lagi.\n"
"Lihat 'Note about fast-forwards' di 'git push --help' untuk selengkapnya."
#: builtin/push.c
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Pembaruan ditolak karena ujung dari cabang yang didorong di belakang\n"
-"pasangan remotenya. Check out cabang itu dan integrasikan perubahan\n"
-"remote (seperti 'git pull') sebelum dorong lagi.\n"
+"pasangan remotenya. Jika anda ingin mengintegrasikan perubahan\n"
+"remote, lakukan 'git pull' sebelum mendorong lagi.\n"
"Lihat 'Note about fast-forwards' di 'git push --help' untuk selengkapnya."
#: builtin/push.c
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Pembaruan ditolak karena remote berisi kerja yang Anda tidak punya\n"
+"Pembaruan ditolak karena remote berisi karya yang Anda tidak punya\n"
"di lokal. Ini biasanya disebabkan repositori yang lain dorong ke\n"
-"referensi yang sama. Mungkin Anda ingin integrasikan terlebih dahulu\n"
-"perubahan remote (seperti 'git pull') sebelum dorong lagi.\n"
+"referensi yang sama. Jika Anda ingin mengintegrasikan perubahan remote\n"
+"lakukan 'git pull' sebelum mendorong lagi.\n"
"Lihat 'Note about fast-forwards' di 'git push --help' untuk selengkapnya."
#: builtin/push.c
@@ -12214,15 +12152,15 @@ msgstr ""
#: builtin/push.c
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Pembaruan ditolak karena ujung dari cabang pelacak remote\n"
-"sudah diperbarui sejak checkout terakhir. Mungkin Anda ingin\n"
-"integrasikan perubahan tersebut ke lokal (seperti 'git pull...')\n"
-"sebelum memaksa pembaruan.\n"
+"Pembaruan ditolak karena ujung dari cabang Anda saat ini sudah diperbarui\n"
+"sejak checkout terakhir. Jika Anda ingin mengintegrasikan perubahan remote,\n"
+"lakukan 'git pull' sebelum mendorong lagi.\n"
+"Lihat 'Note about fast-forwards' di 'git push --help' untuk selengkapnya."
#: builtin/push.c
#, c-format
@@ -12614,8 +12552,8 @@ msgstr "opsi apply dan opsi merge tidak dapat digunakan bersamaan"
#: builtin/rebase.c
#, c-format
msgid ""
-"unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and \"ask"
-"\"."
+"unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
+"\"ask\"."
msgstr ""
"tipe kosong tak dikenali '%s'; nilai yang valid adalah \"drop\", \"keep\", "
"dan \"ask\"."
@@ -13282,12 +13220,12 @@ msgid "fetch the remote branches"
msgstr "ambil cabang remote"
#: builtin/remote.c
-msgid "import all tags and associated objects when fetching"
-msgstr "impor semua tag dan objek yang terkait ketika mengambil"
-
-#: builtin/remote.c
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "atau jangan mengambil tag apapun (--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"impor semua tag dan objek yang terkait ketika mengambil atau jangan\n"
+"mengambil tag apapun (--no-tags)"
#: builtin/remote.c
msgid "branch(es) to track"
@@ -15721,6 +15659,11 @@ msgstr "Melewati submodul '%s'"
#: builtin/submodule--helper.c
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "tidak dapat mengkloning submodul '%s' tanpa URL"
+
+#: builtin/submodule--helper.c
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "Gagal mengkloning '%s'. Percobaan ulang dijadwalkan"
@@ -16651,10 +16594,10 @@ msgstr "cetak isi tag"
#: builtin/worktree.c
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <untai>]]\n"
-" [-b <cabang baru>] <jalur> [<mirip komit>]"
+" [--orphan] [(-b | -B) <cabang baru>] <jalur> [<mirip komit>]"
#: builtin/worktree.c
msgid "git worktree list [-v | --porcelain [-z]]"
@@ -16685,6 +16628,38 @@ msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <worktree>"
#: builtin/worktree.c
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Tidak ada cabang sumber yang mungkin, menyimpulkan '--orphan'"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Jika maksud Anda ingin membuat pohon kerja berisi sebuah cabang yatim baru\n"
+"(cabang tanpa komit) untuk repositori ini, Anda dapat melakukannya dengan\n"
+"opsi --orphan:\n"
+" git worktree add --orphan -b %s %s\n"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Jika maksud Anda ingin membuat pohon kerja berisi sebuah cabang yatim baru\n"
+"(cabang tanpa komit) untuk repositori ini, Anda dapat melakukannya dengan\n"
+"opsi --orphan:\n"
+" git worktree add --orphan %s\n"
+
+#: builtin/worktree.c
#, c-format
msgid "Removing %s/%s: %s"
msgstr "Menghapus %s/%s: %s"
@@ -16769,10 +16744,41 @@ msgstr "Menyiapkan pohon kerja (men-checkout '%s')"
#: builtin/worktree.c
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "tidak dapat dicapat: referensi tidak valid: %s"
+
+#: builtin/worktree.c
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "Menyiapkan pohon kerja (HEAD terpisah %s)"
#: builtin/worktree.c
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD menunjuk pada referensi tidak valid (atau yatim).\n"
+"Jalur HEAD: '%s'\n"
+"Isi HEAD: '%s'"
+
+#: builtin/worktree.c
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"Tidak ada referensi lokal atau remote yang ada meskipun salah satu remote\n"
+"ada, berhenti. Gunakan 'add -f' untuk menimpa atau mengambil remote "
+"terlebih\n"
+"dahulu"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "'%s' dan '%s' tidak dapat digunakan bersamaan"
+
+#: builtin/worktree.c
msgid "checkout <branch> even if already checked out in other worktree"
msgstr ""
"checkout <cabang> bahkan jika sudah di-checkout pada pohon kerja lainnya"
@@ -16786,6 +16792,10 @@ msgid "create or reset a branch"
msgstr "buat atau setel ulang sebuah cabang"
#: builtin/worktree.c
+msgid "create unborn/orphaned branch"
+msgstr "buat cabang belum lahir/yatim"
+
+#: builtin/worktree.c
msgid "populate the new working tree"
msgstr "isikan pohon kerja baru"
@@ -16811,6 +16821,15 @@ msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "Opsi '%s', '%s', dan '%s' tidak dapat digunakan bersamaan"
#: builtin/worktree.c
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "Opsi '%s', dan '%s' tidak dapat digunakan bersamaan"
+
+#: builtin/worktree.c
+msgid "<commit-ish>"
+msgstr "<mirip-komit>"
+
+#: builtin/worktree.c
msgid "added with --lock"
msgstr "tambahkan dengan --lock"
@@ -17096,6 +17115,16 @@ msgstr[0] "Bundel membutuhkan referensi ini:"
msgstr[1] "Bundel membutuhkan %<PRIuMAX> referensi berikut:"
#: bundle.c
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "Bundel menggunakan algoritma hash ini: %s"
+
+#: bundle.c
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Bundel menggunakan penyaring ini: %s"
+
+#: bundle.c
msgid "unable to dup bundle descriptor"
msgstr "tidak dapat men-dup pendeskripsi bundel"
@@ -17398,8 +17427,8 @@ msgid "A portable graphical interface to Git"
msgstr "Sebuah antarmuka grafis Git portabel"
#: command-list.h
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr "Hitung ID objek dan buat blob dari berkas (opsional)"
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "Hitung ID objek dan buat objeck dari berkas (opsional)"
#: command-list.h
msgid "Display help information about Git"
@@ -17943,6 +17972,11 @@ msgstr "rantai grafik komit tidak cocok"
#: commit-graph.c
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "jumlah komit pada grafik dasar terlalu tinggi: %<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr "rantai grafik komit tidak cocok: baris '%s' bukan sebuah hash"
@@ -18049,6 +18083,16 @@ msgid "failed to rename temporary commit-graph file"
msgstr "gagal menamai ulang berkas grafik komit sementara"
#: commit-graph.c
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "tidak dapat menggabungkan grafik dengan %<PRIuMAX>, %<PRIuMAX> komit"
+
+#: commit-graph.c
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "tidak dapat menggabungkan grafik %s, terlalu banyak komit: %<PRIuMAX>"
+
+#: commit-graph.c
msgid "Scanning merged commits"
msgstr "Memindai komit tergabung"
@@ -18084,10 +18128,6 @@ msgid "failed to parse commit %s from commit-graph"
msgstr "gagal menguraikan komit %s dari grafik komit"
#: commit-graph.c
-msgid "Verifying commits in commit graph"
-msgstr "Memverifikasi komit di dalam grafik komit"
-
-#: commit-graph.c
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr "gagal menguraikan komit %s dari basis data objek untuk grafik komit"
@@ -18140,6 +18180,10 @@ msgstr ""
"tanggal komit untuk komit %s di dalam grafik komit yaitu %<PRIuMAX> != "
"%<PRIuMAX>"
+#: commit-graph.c
+msgid "Verifying commits in commit graph"
+msgstr "Memverifikasi komit di dalam grafik komit"
+
#: commit.c
#, c-format
msgid "%s %s is not a commit!"
@@ -19314,6 +19358,14 @@ msgid "multiple merge bases found"
msgstr "banyak dasar penggabungan ditemukan"
#: diff-no-index.c
+msgid "cannot compare stdin to a directory"
+msgstr "tidak dapat membandingkan masukan standar dan sebuah direktori"
+
+#: diff-no-index.c
+msgid "cannot compare a named pipe to a directory"
+msgstr "tidak dapat membandingkan pipa bernama dan sebuah direktori"
+
+#: diff-no-index.c
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<opsi>] <jalur> <jalur>"
@@ -19380,6 +19432,15 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "diff eksternal mati, berhenti pada %s"
+#: diff.c
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow butuh tepatnya satu spek jalur"
+
+#: diff.c
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "spek jalur ajaib tidak didukung oleh --follow: %s"
+
#: diff.c parse-options.c
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
@@ -19400,10 +19461,6 @@ msgstr ""
"dan '%s'"
#: diff.c
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow butuh tepatnya satu spek jalur"
-
-#: diff.c
#, c-format
msgid "invalid --stat value: %s"
msgstr "nilai --stat tidak valid: %s"
@@ -21468,8 +21525,8 @@ msgstr ""
#: merge-recursive.c
#, c-format
msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s"
-"\"->\"%s\" in \"%s\"%s"
+"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
+"\"%s\"->\"%s\" in \"%s\"%s"
msgstr ""
"KONFLIK (penamaan ulang/penamaan ulang): Penamaan ulang \"%s\"->\"%s\" di "
"dalam cabang \"%s\" penamaan ulang \"%s\"->\"%s\" di \"%s\"%s"
@@ -22947,6 +23004,15 @@ msgstr "gagal membuat diff"
msgid "could not parse log for '%s'"
msgstr "tidak dapat menguraikan log untuk '%s'"
+#: reachable.c
+#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "ujung sampah tambahan tidak valid: '%s'"
+
+#: reachable.c
+msgid "unable to enumerate additional recent objects"
+msgstr "tidak dapat menghitung objeck terkini tambahan"
+
#: read-cache.c
#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
@@ -23137,6 +23203,16 @@ msgstr "tidak dapat memperbaiki bit perizinan pada '%s'"
msgid "%s: cannot drop to stage #0"
msgstr "%s: tidak dapat menurunkan ke tahap #0"
+#: read-cache.c
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "status diff tak diharapkan %c"
+
+#: read-cache.c
+#, c-format
+msgid "remove '%s'\n"
+msgstr "hapus '%s'\n"
+
#: rebase-interactive.c
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
@@ -23360,6 +23436,26 @@ msgstr "nilai positif diharapkan contents:lines=%s"
#: ref-filter.c
#, c-format
+msgid "argument expected for %s"
+msgstr "argumen diharapkan untuk %s"
+
+#: ref-filter.c
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "nilai positif %s=%s diharapkan"
+
+#: ref-filter.c
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "tidak dapat menguraikan penuh %s=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "value expected %s="
+msgstr "nilai %s= diharapkan"
+
+#: ref-filter.c
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "nilai positif '%s' diharapkan di %%(%s)"
@@ -23451,6 +23547,10 @@ msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s tidak dapat digunakan dengan --python, --shell, --tcl"
#: ref-filter.c
+msgid "failed to run 'describe'"
+msgstr "gagal menjalankan 'describe'"
+
+#: ref-filter.c
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(tanpa cabang, mendasarkan ulang %s)"
@@ -23527,6 +23627,10 @@ msgstr "kunci"
msgid "field name to sort on"
msgstr "nama bidang untuk diurutkan"
+#: ref-filter.h
+msgid "exclude refs which match pattern"
+msgstr "hanya gunakan referensi yang cocok dengan pola"
+
#: reflog.c
#, c-format
msgid "not a reflog: %s"
@@ -24067,8 +24171,11 @@ msgstr[1] ""
"dan masing-masing punya %d dan %d komit berbeda.\n"
#: remote.c
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (gunakan \"git pull\" untuk gabungkan cabang remote ke milik Anda)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr ""
+" (gunakan \"git pull\" jika Anda ingin mengintegrasikan cabang remote pada\n"
+" milik Anda)\n"
#: remote.c
#, c-format
@@ -24211,6 +24318,11 @@ msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<berkas pak> tidak didukung lagi"
#: revision.c
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "opsi tidak valid: '%s' di mode --stdin"
+
+#: revision.c
msgid "your current branch appears to be broken"
msgstr "sepertinya cabang Anda saat ini rusak"
@@ -25618,6 +25730,95 @@ msgstr "penggarpuan gagal"
msgid "setsid failed"
msgstr "setsid gagal"
+#: setup.c
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "tidak dapat men-stat templat '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "tidak dapat membuka direktori '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "tidak dapat membaca tautan '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "tidak dapat menautkan simbolik '%s' '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "tidak dapat menyalin '%s' ke '%s'"
+
+#: setup.c
+#, c-format
+msgid "ignoring template %s"
+msgstr "mengabaikan templat %s"
+
+#: setup.c
+#, c-format
+msgid "templates not found in %s"
+msgstr "templat tidak ditemukan di %s"
+
+#: setup.c
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "tidak menyalin templat dari '%s': %s"
+
+#: setup.c
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "nama cabang asal salah: '%s'"
+
+#: setup.c
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "tidak dapat menangani tipe berkas %d"
+
+#: setup.c
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "tidak dapat memindahkan %s ke %s"
+
+#: setup.c
+msgid "attempt to reinitialize repository with different hash"
+msgstr "mencoba menginisialisasi ulang repositori dengan hash yang berbeda"
+
+#: setup.c
+#, c-format
+msgid "%s already exists"
+msgstr "%s sudah ada"
+
+#: setup.c
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-init: --initial-branch=%s diabaikan"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "Repositori berbagi Git yang sudah ada diinisialisasi ulang di %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "Repositori Git diinisialisasi ulang di %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "Repositori berbagi Git kosong diinisialisasi di %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "Repositori Git kosong dinisialisasi di %s%s\n"
+
#: sparse-index.c
#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
@@ -27845,3 +28046,22 @@ 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]: "
+
+#~ msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
+#~ msgstr ""
+#~ "jangan lewatkan opsi --keep-cr ke git-mailsplit tak bergantung pada am."
+#~ "keepcr"
+
+#~ msgid ""
+#~ "Updates were rejected because the tip of the remote-tracking\n"
+#~ "branch has been updated since the last checkout. You may want\n"
+#~ "to integrate those changes locally (e.g., 'git pull ...')\n"
+#~ "before forcing an update.\n"
+#~ msgstr ""
+#~ "Pembaruan ditolak karena ujung dari cabang pelacak remote\n"
+#~ "sudah diperbarui sejak checkout terakhir. Mungkin Anda ingin\n"
+#~ "integrasikan perubahan tersebut ke lokal (seperti 'git pull...')\n"
+#~ "sebelum memaksa pembaruan.\n"
+
+#~ msgid "or do not fetch any tag at all (--no-tags)"
+#~ msgstr "atau jangan mengambil tag apapun (--no-tags)"
diff --git a/po/ru.po b/po/ru.po
index 803208c4d5..3e56eb546e 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -4,28 +4,28 @@
#
# Translators:
# Alexander Golubev <fatzer2@gmail.com>, 2020
-# Dimitriy Ryazantcev <DJm00n@mail.ru>, 2014-2022
+# Dimitriy Ryazantcev <DJm00n@mail.ru>, 2014-2023
# insolor, 2014
# insolor, 2014
# Sergey Alyoshin <alyoshin.s@gmail.com>, 2020-2021
# Sergey Kuznetsov <votkinsk@gmail.com>, 2021-2022
-# Чук Таблицоменделеев <aurum444an@gmail.com>, 2019
+# Чук Таблицоменделеев (Aurum79) <aurum444an@gmail.com>, 2019
msgid ""
msgstr ""
"Project-Id-Version: Git Russian Localization Project\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2022-06-26 20:30+0800\n"
+"POT-Creation-Date: 2023-06-30 12:55+0300\n"
"PO-Revision-Date: 2014-02-18 23:30+0000\n"
-"Last-Translator: Dimitriy Ryazantcev <DJm00n@mail.ru>, 2014-2022\n"
-"Language-Team: Russian (http://www.transifex.com/djm00n/git-po-ru/language/"
+"Last-Translator: Dimitriy Ryazantcev <DJm00n@mail.ru>, 2014-2023\n"
+"Language-Team: Russian (http://app.transifex.com/djm00n/git-po-ru/language/"
"ru/)\n"
-"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
-"%100>=11 && n%100<=14)? 2 : 3);\n"
+"Language: ru\n"
+"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
+"(n%100>=11 && n%100<=14)? 2 : 3);\n"
#, c-format
msgid "Huh (%s)?"
@@ -53,7 +53,7 @@ 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"
@@ -61,7 +61,7 @@ msgstr[1] "обновлено %d пути\n"
msgstr[2] "обновлено %d путей\n"
msgstr[3] "обновлено %d пути\n"
-#, c-format, perl-format
+#, c-format
msgid "note: %s is untracked now.\n"
msgstr "примечание: %s теперь неотслеживаемый.\n"
@@ -75,7 +75,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"
@@ -90,7 +90,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"
@@ -188,19 +188,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,?]? "
@@ -224,19 +224,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,?]? "
@@ -259,19 +259,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,?]? "
@@ -289,25 +289,25 @@ msgid ""
"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\n"
msgstr ""
-"y - убрать из индекса этот блок\n"
+"y - убрать этот блок из индекса\n"
"n - пропустить этот блок\n"
"q - выход; пропустить этот и все последующие блоки\n"
"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,?]? "
@@ -331,21 +331,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,?]?"
+msgstr "Отбросить этот блок из рабочего каталога [y,n,q,a,d%s,?]?"
msgid ""
"If the patch applies cleanly, the edited hunk will immediately be marked for "
@@ -360,29 +360,29 @@ msgid ""
"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\n"
msgstr ""
-"y - отбросить этот блок из рабочего дерева\n"
+"y - отбросить этот блок из рабочего каталога\n"
"n - пропустить этот блок\n"
"q - выход; пропустить этот и все последующие блоки\n"
"a - отбросить этот и остальные блоки файла\n"
"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,?]? "
+"Отменить изменения режима доступа в индексе и рабочем каталоге [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,?]? "
+msgstr "Отбросить этот блок из индекса рабочего каталога [y,n,q,a,d%s,?]? "
msgid ""
"y - discard this hunk from index and worktree\n"
@@ -391,27 +391,27 @@ msgid ""
"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\n"
msgstr ""
-"y - отбросить этот блок из рабочего дерева\n"
+"y - отбросить этот блок из рабочего каталога\n"
"n - пропустить этот блок\n"
"q - выход; пропустить этот и все последующие блоки\n"
"a - отбросить этот и остальные блоки файла\n"
"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,?]? "
+"Применить изменения режима доступа к индексу и рабочему каталогу [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,?]? "
@@ -422,12 +422,28 @@ msgid ""
"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\n"
msgstr ""
-"y - принять этот блок в индекс и рабочее дерево\n"
+"y - принять этот блок в индекс и рабочий каталог\n"
"n - пропустить этот блок\n"
"q - выход; пропустить этот и все последующие блоки\n"
"a - принять этот и остальные блоки файла\n"
"d - пропустить этот и остальные блоки файла\n"
+#, c-format
+msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+
+#, c-format
+msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+
+#, c-format
+msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+
+#, c-format
+msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
+msgstr "Принять этот блок в рабочий каталог [y,n,q,a,d%s,?]? "
+
msgid ""
"y - apply this hunk to worktree\n"
"n - do not apply this hunk to worktree\n"
@@ -435,7 +451,7 @@ msgid ""
"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\n"
msgstr ""
-"y - принять этот блок в рабочее дерево\n"
+"y - принять этот блок в рабочий каталог\n"
"n - пропустить этот блок\n"
"q - выход; пропустить этот и все последующие блоки\n"
"a - принять этот и остальные блоки файла\n"
@@ -445,10 +461,6 @@ msgstr ""
msgid "could not parse hunk header '%.*s'"
msgstr "не удалось разобрать заголовок блока изменений «%.*s»"
-#, c-format
-msgid "could not parse colored hunk header '%.*s'"
-msgstr "не удалось разобрать цветной заголовок блока изменений «%.*s»"
-
msgid "could not parse diff"
msgstr "не удалось разобрать список изменений (diff)"
@@ -457,15 +469,18 @@ msgstr "не удалось разобрать цветной список из
#, c-format
msgid "failed to run '%s'"
-msgstr ""
+msgstr "не удалось запустить «%s»"
msgid "mismatched output from interactive.diffFilter"
-msgstr ""
+msgstr "несовпадение вывода из interactive.diffFilter"
msgid ""
"Your filter must maintain a one-to-one correspondence\n"
"between its input and output lines."
msgstr ""
+"Ваш фильтр должен поддерживать соответствие\n"
+"один-к-одному между его входными и выходными\n"
+"строками."
#, c-format
msgid ""
@@ -504,8 +519,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"
@@ -517,25 +530,16 @@ msgstr ""
"и блок останется без изменений.\n"
msgid "could not parse hunk header"
-msgstr ""
+msgstr "не удалось разобрать заголовок блока изменений"
msgid "'git apply --cached' failed"
-msgstr ""
+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 ""
@@ -543,7 +547,7 @@ msgstr ""
"«нет»!) [y/n]? "
msgid "The selected hunks do not apply to the index!"
-msgstr ""
+msgstr "Выбранные блоки не применяются без ошибок к индексу!"
msgid "Apply them to the worktree anyway? "
msgstr "Все равно применить их к рабочему каталогу? "
@@ -562,15 +566,24 @@ msgid ""
"e - manually edit the current hunk\n"
"? - print help\n"
msgstr ""
+"j - не принимать решение по этому блоку, перейти на следующий нерешенный\n"
+"J - не принимать решение по этому блоку, перейти на следующий\n"
+"k - не принимать решение по этому блоку, перейти на предыдущий нерешенный\n"
+"K - не принимать решение по этому блоку, перейти на предыдущий\n"
+"g - выбрать блок изменений на который нужно перейти\n"
+"/ - поиск блока изменений с помощью регулярного выражения\n"
+"s - разделить текущий блок на блоки меньшего размера\n"
+"e - вручную отредактировать текущий блок\n"
+"? - вывести справку\n"
msgid "No previous hunk"
-msgstr ""
+msgstr "Нет предыдущего блока"
msgid "No next hunk"
-msgstr ""
+msgstr "Не следующего блока"
msgid "No other hunks to goto"
-msgstr ""
+msgstr "Нет других блоков для перехода"
msgid "go to which hunk (<ret> to see more)? "
msgstr "на какой блок перейти (нажмите <ввод> чтобы увидеть еще)? "
@@ -580,41 +593,41 @@ msgstr "на какой блок перейти? "
#, c-format
msgid "Invalid number: '%s'"
-msgstr ""
+msgstr "Недопустимый номер: «%s»"
#, c-format
msgid "Sorry, only %d hunk available."
msgid_plural "Sorry, only %d hunks available."
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
-msgstr[3] ""
+msgstr[0] "Простите, но только %d блок изменений доступнен."
+msgstr[1] "Простите, но только %d блока изменений доступно."
+msgstr[2] "Простите, но только %d блоков изменений доступно."
+msgstr[3] "Простите, но только %d блока изменений доступно."
msgid "No other hunks to search"
-msgstr ""
+msgstr "Нет других блоков для поиска"
msgid "search for regex? "
msgstr "искать с помощью регулярного выражения? "
#, c-format
msgid "Malformed search regexp %s: %s"
-msgstr ""
+msgstr "Регулярное выражение для поиска в неправильном формате %s: %s"
msgid "No hunk matches the given pattern"
-msgstr ""
+msgstr "Не найдены блоки, которые соответствуют указанному шаблону"
msgid "Sorry, cannot split this hunk"
msgstr ""
#, c-format
msgid "Split into %d hunks."
-msgstr ""
+msgstr "Разбито на %d блока изменений."
msgid "Sorry, cannot edit this hunk"
msgstr ""
msgid "'git apply' failed"
-msgstr ""
+msgstr "сбой при выполнении «git apply»"
#, c-format
msgid ""
@@ -666,6 +679,16 @@ msgstr "Перед слиянием, выполните коммит ваших
msgid "Exiting because of unfinished merge."
msgstr "Выход из-за незавершенного слияния."
+msgid ""
+"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"
+msgstr ""
+
msgid "Not possible to fast-forward, aborting."
msgstr "Быстрая перемотка невозможна, отменяем."
@@ -724,19 +747,35 @@ msgstr ""
"advice.detachedHead в значение false\n"
"\n"
+#, c-format
+msgid ""
+"The following paths have been moved outside the\n"
+"sparse-checkout definition but are not sparse due to local\n"
+"modifications.\n"
+msgstr ""
+
+msgid ""
+"To correct the sparsity of these paths, do the following:\n"
+"* Use \"git add --sparse <paths>\" to update the index\n"
+"* Use \"git sparse-checkout reapply\" to apply the sparsity rules"
+msgstr ""
+
msgid "cmdline ends with \\"
msgstr "командная строка заканчивается символом \\"
msgid "unclosed quote"
msgstr "пропущена закрывающая кавычка"
+msgid "too many arguments"
+msgstr ""
+
#, c-format
msgid "unrecognized whitespace option '%s'"
-msgstr "неопознанная опция для пробелов «%s»"
+msgstr "неопознанный параметр для пробелов «%s»"
#, c-format
msgid "unrecognized whitespace ignore option '%s'"
-msgstr "неопознанная опция для игнорирования пробелов «%s»"
+msgstr "неопознанный параметр для игнорирования пробелов «%s»"
#, c-format
msgid "options '%s' and '%s' cannot be used together"
@@ -1101,6 +1140,10 @@ msgid "cannot open %s"
msgstr "не удалось открыть %s"
#, c-format
+msgid "cannot unlink '%s'"
+msgstr ""
+
+#, c-format
msgid "Hunk #%d applied cleanly."
msgstr "Блок №%d применен без ошибок."
@@ -1256,6 +1299,10 @@ msgid "unsupported file mode: 0%o (SHA1: %s)"
msgstr "неподдерживаемый режим доступа к файлу: 0%o (SHA1: %s)"
#, c-format
+msgid "deflate error (%d)"
+msgstr "ошибка сжатия (%d)"
+
+#, c-format
msgid "unable to start '%s' filter"
msgstr "не удалось запустить фильтр «%s»"
@@ -1275,10 +1322,6 @@ msgid "path too long (%d chars, SHA1: %s): %s"
msgstr "путь слишком длинный (%d символов, SHA1: %s): %s"
#, c-format
-msgid "deflate error (%d)"
-msgstr "ошибка сжатия (%d)"
-
-#, c-format
msgid "timestamp too large for this system: %<PRIuMAX>"
msgstr "отметка времени слишком большая для этой системы: %<PRIuMAX>"
@@ -1298,6 +1341,10 @@ msgid "cannot read '%s'"
msgstr "не удалось прочитать «%s»"
#, c-format
+msgid "pathspec '%s' matches files outside the current directory"
+msgstr ""
+
+#, c-format
msgid "pathspec '%s' did not match any files"
msgstr "спецификатор пути «%s» не соответствует ни одному файлу"
@@ -1313,9 +1360,6 @@ msgstr "недопустимое имя объекта: %s"
msgid "not a tree object: %s"
msgstr "недействительный объект дерева: %s"
-msgid "current working directory is untracked"
-msgstr "текущий рабочий каталог не отслеживается"
-
#, c-format
msgid "File not found: %s"
msgstr ""
@@ -1366,6 +1410,12 @@ msgstr "читать .gitattributes в рабочем каталоге"
msgid "report archived files on stderr"
msgstr "отчет об архивированных файлах в stderr"
+msgid "time"
+msgstr "время"
+
+msgid "set modification time of archive entries"
+msgstr ""
+
msgid "set compression level"
msgstr ""
@@ -1406,6 +1456,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 ""
+
#, c-format
msgid "%s not allowed: %s:%d"
msgstr "%s не разрешено: %s:%d"
@@ -1419,6 +1476,21 @@ msgstr ""
"«восклицательный знак»."
#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr ""
+
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr ""
+
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr ""
+
+msgid "bad --attr-source or GIT_ATTR_SOURCE"
+msgstr ""
+
+#, c-format
msgid "Badly quoted content in file '%s': %s"
msgstr "Плохое содержимое файла «%s»: %s"
@@ -1514,7 +1586,6 @@ msgstr[3] "(примерно %d шагов)"
#. TRANSLATORS: the last %s will be replaced with "(roughly %d
#. steps)" translation.
-#.
#, c-format
msgid "Bisecting: %d revision left to test after this %s\n"
msgid_plural "Bisecting: %d revisions left to test after this %s\n"
@@ -1526,9 +1597,6 @@ msgstr[3] "Бинарный поиск: %d редакций осталось п
msgid "--contents and --reverse do not blend well."
msgstr "--contents и --reverse не очень сочетаются."
-msgid "cannot use --contents with final commit object name"
-msgstr "нельзя использовать --contents с указанием финального имени объекта"
-
msgid "--reverse and --first-parent together require specified latest commit"
msgstr ""
"при --reverse и --first-parent вместе нужно указывать конкретный последний "
@@ -1597,20 +1665,17 @@ msgstr ""
#. 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
#. around.
-#.
#, c-format
msgid " %s\n"
msgstr ""
#. TRANSLATORS: The second argument is a \n-delimited list of
#. duplicate refspecs, composed above.
-#.
#, c-format
msgid ""
"There are multiple remotes whose fetch refspecs map to the remote\n"
@@ -1680,8 +1745,8 @@ msgstr ""
#, 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 ""
#, c-format
@@ -1692,10 +1757,6 @@ msgstr ""
msgid "'%s' is already checked out at '%s'"
msgstr "«%s» уже находится на «%s»"
-#, c-format
-msgid "HEAD of working tree %s is not updated"
-msgstr "HEAD рабочего каталога %s не обновлён"
-
msgid "git add [<options>] [--] <pathspec>..."
msgstr "git add [<опции>] [--] <спецификатор-пути>..."
@@ -1717,6 +1778,11 @@ 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 ""
+
msgid "Could not read the index"
msgstr "Не удалось прочитать индекс"
@@ -2006,7 +2072,6 @@ msgstr "Тело коммита:"
#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
#. in your translation. The program will only accept English
#. input at this point.
-#.
#, c-format
msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: "
msgstr ""
@@ -2103,6 +2168,9 @@ 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 "историческая опция — ничего не делает"
@@ -2245,31 +2313,24 @@ msgstr "git archive: ошибка протокола"
msgid "git archive: expected a flush"
msgstr "git archive: ожидался сброс буфера"
-msgid "git bisect--helper --bisect-reset [<commit>]"
-msgstr ""
-
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] [<плохая-редация> [<хорошая-"
-"редация>...]] [--] [<пути>...]"
-msgid "git bisect--helper --bisect-state (bad|new) [<rev>]"
+msgid "git bisect (good|bad) [<rev>...]"
msgstr ""
-msgid "git bisect--helper --bisect-state (good|old) [<rev>...]"
+msgid "git bisect skip [(<rev>|<range>)...]"
msgstr ""
-msgid "git bisect--helper --bisect-replay <filename>"
+msgid "git bisect reset [<commit>]"
msgstr ""
-msgid "git bisect--helper --bisect-skip [(<rev>|<range>)...]"
+msgid "git bisect replay <logfile>"
msgstr ""
-msgid "git bisect--helper --bisect-run <cmd>..."
+msgid "git bisect run <cmd>..."
msgstr ""
#, c-format
@@ -2348,7 +2409,6 @@ msgstr ""
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
-#.
msgid "Are you sure [Y/n]? "
msgstr "Вы уверены [Y - да/n - нет]? "
@@ -2406,9 +2466,6 @@ msgstr ""
msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
msgstr ""
-msgid "won't bisect on cg-seek'ed tree"
-msgstr "нельзя выполнить двоичный поиск на дереве после cg-seek"
-
msgid "bad HEAD - strange symbolic ref"
msgstr ""
@@ -2422,7 +2479,6 @@ msgstr ""
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
-#.
msgid "Do you want me to do it for you [Y/n]? "
msgstr "Вы уверены, что хотите, чтобы я сделал это [Y] - да/[n] - нет? "
@@ -2460,7 +2516,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 ""
#, c-format
@@ -2468,7 +2524,7 @@ msgid "bogus exit code %d for good revision"
msgstr ""
#, 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 ""
#, c-format
@@ -2478,74 +2534,48 @@ msgstr ""
msgid "bisect run cannot continue any more"
msgstr "bisect run больше не может продолжать"
-#, c-format
msgid "bisect run success"
msgstr "bisect run выполнен успешно"
-#, 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"
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
msgstr ""
-msgid "reset the bisection state"
-msgstr ""
-
-msgid "check whether bad or good terms exist"
-msgstr ""
-
-msgid "print out the bisect terms"
-msgstr ""
-
-msgid "start the bisect session"
-msgstr ""
-
-msgid "find the next bisection commit"
-msgstr ""
-
-msgid "mark the state of ref (or refs)"
-msgstr ""
-
-msgid "list the bisection steps so far"
-msgstr ""
-
-msgid "replay the bisection process from the given file"
-msgstr ""
-
-msgid "skip some commits for checkout"
-msgstr ""
-
-msgid "visualize the bisection"
-msgstr ""
-
-msgid "use <cmd>... to automatically bisect"
+#, c-format
+msgid "'%s' requires either no argument or a commit"
msgstr ""
-msgid "no log for BISECT_WRITE"
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
msgstr ""
-msgid "--bisect-reset requires either no argument or a commit"
+#, c-format
+msgid "'%s' requires 0 arguments"
msgstr ""
-msgid "--bisect-terms requires 0 or 1 argument"
+msgid "no logfile given"
msgstr ""
-msgid "--bisect-next requires 0 arguments"
+#, c-format
+msgid "'%s' failed: no command provided."
msgstr ""
-msgid "--bisect-log requires 0 arguments"
+msgid "need a command"
msgstr ""
-msgid "no logfile given"
+#, c-format
+msgid "unknown command: '%s'"
msgstr ""
msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
msgstr "git blame [<опции>] [<опции-редакции>] [<редакция>] [--] <файл>"
+msgid "git annotate [<options>] [<rev-opts>] [<rev>] [--] <file>"
+msgstr ""
+
msgid "<rev-opts> are documented in git-rev-list(1)"
msgstr "<опции-rev-list> документированы в git-rev-list(1)"
@@ -2659,7 +2689,6 @@ msgstr ""
#. among various forms of relative timestamps, but
#. your language may need more or fewer display
#. columns.
-#.
msgid "4 years, 11 months ago"
msgstr "4 года и 11 месяцев назад"
@@ -2734,9 +2763,6 @@ msgstr "Не удалось обновить файл конфигурации"
msgid "cannot use -a with -d"
msgstr "нельзя использовать одновременно ключи -a и -d"
-msgid "Couldn't look up commit object for HEAD"
-msgstr "Не удалось найти объект коммита для HEAD"
-
#, c-format
msgid "Cannot delete branch '%s' checked out at '%s'"
msgstr "Нельзя удалить ветку «%s» т.к. она активна на «%s»"
@@ -2746,6 +2772,12 @@ msgid "remote-tracking branch '%s' not found."
msgstr "внешняя отслеживаемая ветка «%s» не найдена."
#, c-format
+msgid ""
+"branch '%s' not found.\n"
+"Did you forget --remote?"
+msgstr ""
+
+#, c-format
msgid "branch '%s' not found."
msgstr "ветка «%s» не найдена."
@@ -2775,20 +2807,22 @@ msgstr "Производится перемещение ветки %s на %s"
msgid "Branch %s is being bisected at %s"
msgstr "Производится двоичный поиск в ветке %s на %s"
-msgid "cannot copy the current branch while not on any."
-msgstr ""
-"невозможно скопировать текущую ветку, если вы не находитесь ни на одной из "
-"веток."
-
-msgid "cannot rename the current branch while not on any."
-msgstr ""
-"невозможно переименовать текущую ветку, если вы не находитесь ни на одной из "
-"них."
+#, c-format
+msgid "HEAD of working tree %s is not updated"
+msgstr "HEAD рабочего каталога %s не обновлён"
#, c-format
msgid "Invalid branch name: '%s'"
msgstr "Недействительное имя ветки: «%s»"
+#, c-format
+msgid "No commit on branch '%s' yet."
+msgstr "Еще нет коммита на ветке «%s»."
+
+#, c-format
+msgid "No branch named '%s'."
+msgstr "Нет ветки с именем «%s»."
+
msgid "Branch rename failed"
msgstr "Сбой переименования ветки"
@@ -2877,6 +2911,9 @@ msgstr "переместить/переименовать ветки и ее ж
msgid "move/rename a branch, even if target exists"
msgstr "переместить/переименовать ветку, даже если целевое имя уже существует"
+msgid "do not output a newline after empty formatted refs"
+msgstr ""
+
msgid "copy a branch and its reflog"
msgstr "скопировать ветку и её журнал ссылок"
@@ -2945,13 +2982,15 @@ msgstr "Нельзя дать описание отсоединённому ук
msgid "cannot edit description of more than one branch"
msgstr "нельзя изменить описание более одной ветки за раз"
-#, c-format
-msgid "No commit on branch '%s' yet."
-msgstr "Еще нет коммита на ветке «%s»."
+msgid "cannot copy the current branch while not on any."
+msgstr ""
+"невозможно скопировать текущую ветку, если вы не находитесь ни на одной из "
+"веток."
-#, c-format
-msgid "No branch named '%s'."
-msgstr "Нет ветки с именем «%s»."
+msgid "cannot rename the current branch while not on any."
+msgstr ""
+"невозможно переименовать текущую ветку, если вы не находитесь ни на одной из "
+"них."
msgid "too many branches for a copy operation"
msgstr "слишком много веток для операции копирования"
@@ -3017,7 +3056,9 @@ msgstr ""
msgid "not run from a git repository - no hooks to show\n"
msgstr ""
-msgid "git bugreport [-o|--output-directory <file>] [-s|--suffix <format>]"
+msgid ""
+"git bugreport [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n"
+" [--diagnose[=<mode>]]"
msgstr ""
msgid ""
@@ -3038,16 +3079,27 @@ msgid ""
"You can delete any lines you don't wish to share.\n"
msgstr ""
-msgid "specify a destination for the bugreport file"
+msgid "mode"
+msgstr "режим"
+
+msgid ""
+"create an additional zip archive of detailed diagnostics (default 'stats')"
msgstr ""
-msgid "specify a strftime format suffix for the filename"
+msgid "specify a destination for the bugreport file(s)"
+msgstr ""
+
+msgid "specify a strftime format suffix for the filename(s)"
msgstr ""
#, c-format
msgid "could not create leading directories for '%s'"
msgstr ""
+#, c-format
+msgid "unable to create diagnostics archive %s"
+msgstr ""
+
msgid "System Info"
msgstr ""
@@ -3062,16 +3114,21 @@ msgstr ""
msgid "Created new report at '%s'.\n"
msgstr ""
-msgid "git bundle create [<options>] <file> <git-rev-list args>"
+msgid ""
+"git bundle create [-q | --quiet | --progress]\n"
+" [--version=<version>] <file> <git-rev-list-args>"
msgstr ""
-msgid "git bundle verify [<options>] <file>"
+msgid "git bundle verify [-q | --quiet] <file>"
msgstr ""
msgid "git bundle list-heads <file> [<refname>...]"
msgstr ""
-msgid "git bundle unbundle <file> [<refname>...]"
+msgid "git bundle unbundle [--progress] <file> [<refname>...]"
+msgstr ""
+
+msgid "need a <file> argument"
msgstr ""
msgid "do not show progress meter"
@@ -3080,11 +3137,11 @@ msgstr "не выводить прогресс выполнения"
msgid "show progress meter"
msgstr "показать прогресс выполнения"
-msgid "show progress meter during object writing phase"
-msgstr "показать прогресс выполнения во время записи объектов"
+msgid "historical; same as --progress"
+msgstr ""
-msgid "similar to --all-progress when progress meter is shown"
-msgstr "похоже на --all-progress при включенном прогрессе выполнения"
+msgid "historical; does nothing"
+msgstr ""
msgid "specify bundle format version"
msgstr ""
@@ -3106,10 +3163,6 @@ msgid "Unbundling objects"
msgstr ""
#, c-format
-msgid "Unknown subcommand: %s"
-msgstr "Неизвестная подкоманда: %s"
-
-#, c-format
msgid "cannot read object %s '%s'"
msgstr "невозможно прочитать объект %s «%s»"
@@ -3131,10 +3184,6 @@ msgstr ""
msgid "%s takes no arguments"
msgstr ""
-#, c-format
-msgid "unknown command: '%s'"
-msgstr ""
-
msgid "only one batch option may be specified"
msgstr ""
@@ -3151,7 +3200,7 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters]"
+" [--textconv | --filters] [-z]"
msgstr ""
msgid ""
@@ -3180,6 +3229,9 @@ msgstr "показать размер объекта"
msgid "allow -s and -t to work with broken/corrupt objects"
msgstr "разрешить -s и -t работать с повреждёнными объектами"
+msgid "use mail map file"
+msgstr ""
+
msgid "Batch objects requested on stdin (or --batch-all-objects)"
msgstr ""
@@ -3189,6 +3241,9 @@ msgstr ""
msgid "like --batch, but don't emit <contents>"
msgstr ""
+msgid "stdin is NUL-terminated"
+msgstr ""
+
msgid "read commands from stdin"
msgstr ""
@@ -3250,18 +3305,18 @@ msgstr ""
msgid "<object> required with '-%c'"
msgstr ""
-msgid "too many arguments"
-msgstr ""
-
#, c-format
msgid "only two arguments allowed in <type> <object> mode, not %d"
msgstr ""
-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 ""
-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 ""
msgid "report all attributes set on file"
msgstr "вывести все атрибуты установленные для файла"
@@ -3275,6 +3330,12 @@ msgstr "прочитать имена файлов из стандартного
msgid "terminate input and output records by a NUL character"
msgstr "окончание ввода и вывода записей по НУЛЕВОМУ символу"
+msgid "<tree-ish>"
+msgstr ""
+
+msgid "which tree-ish to check attributes at"
+msgstr ""
+
msgid "suppress progress reporting"
msgstr "не выводить прогресс выполнения"
@@ -3787,9 +3848,9 @@ msgid "use overlay mode"
msgstr ""
msgid ""
-"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>..."
+"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] "
+"[<pathspec>...]"
msgstr ""
-"git clean [-d] [-f] [-i] [-n] [-q] [-e <шаблон>] [-x | -X] [--] <пути>..."
#, c-format
msgid "Removing %s\n"
@@ -3853,7 +3914,7 @@ msgstr ""
"* - выбрать все элементы\n"
" - (пусто) завершить выделение\n"
-#, c-format, perl-format
+#, c-format
msgid "Huh (%s)?\n"
msgstr "Хм (%s)?\n"
@@ -4006,9 +4067,6 @@ msgstr "глубина"
msgid "create a shallow clone of that depth"
msgstr "сделать частичный клон указанной глубины"
-msgid "time"
-msgstr "время"
-
msgid "create a shallow clone since a specific time"
msgstr "сделать частичный клон до определенного времени"
@@ -4062,6 +4120,12 @@ msgstr ""
msgid "initialize sparse-checkout file to include only files at root"
msgstr ""
+msgid "uri"
+msgstr ""
+
+msgid "a URI for downloading bundles before fetching from origin remote"
+msgstr ""
+
#, c-format
msgid "info: Could not add alternate for '%s': %s\n"
msgstr "информация: Не удалось добавить альтернативу для «%s»: %s\n"
@@ -4075,10 +4139,18 @@ msgid "%s exists and is not a directory"
msgstr "%s уже существует и не является каталогом"
#, c-format
+msgid "'%s' is a symlink, refusing to clone with --local"
+msgstr ""
+
+#, c-format
msgid "failed to start iterator over '%s'"
msgstr ""
#, c-format
+msgid "symlink '%s' exists, refusing to clone with --local"
+msgstr ""
+
+#, c-format
msgid "failed to unlink '%s'"
msgstr "сбой отсоединения «%s»"
@@ -4124,10 +4196,8 @@ msgstr "не удалось обновить %s"
msgid "failed to initialize sparse-checkout"
msgstr ""
-msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
+msgid "remote HEAD refers to nonexistent ref, unable to checkout"
msgstr ""
-"внешний HEAD ссылается на несуществующую ссылку, нельзя переключиться на "
-"такое состояние.\n"
msgid "unable to checkout working tree"
msgstr "не удалось переключиться на версию в рабочем каталоге"
@@ -4147,8 +4217,9 @@ msgstr "Слишком много аргументов."
msgid "You must specify a repository to clone."
msgstr "Вы должны указать репозиторий для клонирования."
-#, c-format
-msgid "options '%s' and '%s %s' cannot be used together"
+msgid ""
+"--bundle-uri is incompatible with --depth, --shallow-since, and --shallow-"
+"exclude"
msgstr ""
#, c-format
@@ -4227,6 +4298,16 @@ msgstr "--local игнорируется"
msgid "cannot clone from filtered bundle"
msgstr ""
+msgid "failed to initialize the repo, skipping bundle URI"
+msgstr ""
+
+#, c-format
+msgid "failed to fetch objects from bundle URI '%s'"
+msgstr ""
+
+msgid "failed to fetch advertised bundles"
+msgstr ""
+
msgid "remote transport reported error"
msgstr ""
@@ -4262,13 +4343,16 @@ msgid "--command must be the first argument"
msgstr "параметр --command должен быть первым"
msgid ""
-"git commit-graph verify [--object-dir <objdir>] [--shallow] [--[no-]progress]"
+"git commit-graph verify [--object-dir <dir>] [--shallow] [--[no-]progress]"
msgstr ""
msgid ""
-"git commit-graph write [--object-dir <objdir>] [--append] [--"
-"split[=<strategy>]] [--reachable|--stdin-packs|--stdin-commits] [--changed-"
-"paths] [--[no-]max-new-filters <n>] [--[no-]progress] <split options>"
+"git commit-graph write [--object-dir <dir>] [--append]\n"
+" [--split[=<strategy>]] [--reachable | --stdin-packs | "
+"--stdin-commits]\n"
+" [--changed-paths] [--[no-]max-new-filters <n>] [--"
+"[no-]progress]\n"
+" <split options>"
msgstr ""
msgid "dir"
@@ -4337,13 +4421,12 @@ msgstr ""
msgid "Collecting commits from input"
msgstr ""
-#, c-format
-msgid "unrecognized subcommand: %s"
+msgid "git commit-tree <tree> [(-p <parent>)...]"
msgstr ""
msgid ""
-"git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...] [(-F "
-"<file>)...] <tree>"
+"git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
+" [(-F <file>)...] <tree>"
msgstr ""
#, c-format
@@ -4386,11 +4469,20 @@ msgstr "необходимо указать одно дерево"
msgid "git commit-tree: failed to read"
msgstr "git commit-tree: сбой при чтении"
-msgid "git commit [<options>] [--] <pathspec>..."
-msgstr "git commit [<опции>] [--] <спецификатор-пути>..."
+msgid ""
+"git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]\n"
+" [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|"
+"reword):]<commit>)]\n"
+" [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n"
+" [--allow-empty-message] [--no-verify] [-e] [--author=<author>]\n"
+" [--date=<date>] [--cleanup=<mode>] [--[no-]status]\n"
+" [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+" [(--trailer <token>[(=|:)<value>])...] [-S[<keyid>]]\n"
+" [--] [<pathspec>...]"
+msgstr ""
-msgid "git status [<options>] [--] <pathspec>..."
-msgstr "git status [<опции>] [--] <спецификатор-пути>..."
+msgid "git status [<options>] [--] [<pathspec>...]"
+msgstr ""
msgid ""
"You asked to amend the most recent commit, but doing so would make\n"
@@ -4672,9 +4764,6 @@ msgstr "показать статус в длинном формате (по у
msgid "terminate entries with NUL"
msgstr "завершать записи НУЛЕВЫМ байтом"
-msgid "mode"
-msgstr "режим"
-
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
"показать неотслеживаемые файлы, опциональные режимы: all (все), normal (как "
@@ -4747,7 +4836,6 @@ msgstr "использовать сообщение указанного ком
#. TRANSLATORS: Leave "[(amend|reword):]" as-is,
#. and only translate <commit>.
-#.
msgid "[(amend|reword):]commit"
msgstr ""
@@ -5136,11 +5224,16 @@ msgstr ""
msgid "unable to get credential storage lock in %d ms"
msgstr ""
-msgid "git describe [<options>] [<commit-ish>...]"
-msgstr "git describe [<опции>] [<указатель-коммита>...]"
+msgid ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]"
+msgstr ""
-msgid "git describe [<options>] --dirty"
-msgstr "git describe [<опции>] --dirty"
+msgid ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]"
+msgstr ""
+
+msgid "git describe <blob>"
+msgstr ""
msgid "head"
msgstr "указатель на ветку"
@@ -5262,6 +5355,20 @@ msgstr "Имена не найдены, не могу ничего описат
msgid "option '%s' and commit-ishes cannot be used together"
msgstr ""
+msgid ""
+"git diagnose [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n"
+" [--mode=<mode>]"
+msgstr ""
+
+msgid "specify a destination for the diagnostics archive"
+msgstr ""
+
+msgid "specify a strftime format suffix for the filename"
+msgstr ""
+
+msgid "specify the content of the diagnostic archive"
+msgstr ""
+
msgid "--merge-base only works with two commits"
msgstr ""
@@ -5269,6 +5376,9 @@ msgstr ""
msgid "'%s': not a regular file or symlink"
msgstr "«%s»: не является обычным файлом или символьной ссылкой"
+msgid "no merge given, only parents."
+msgstr ""
+
#, c-format
msgid "invalid option: %s"
msgstr "неправильный параметр: %s"
@@ -5380,25 +5490,6 @@ msgstr "не передана <утилита> для --tool=<утилита>"
msgid "no <cmd> given for --extcmd=<cmd>"
msgstr "не передана <команда> для --extcmd=<команда>"
-msgid "git env--helper --type=[bool|ulong] <options> <env-var>"
-msgstr ""
-
-msgid "default for git_env_*(...) to fall back on"
-msgstr ""
-
-msgid "be quiet only use git_env_*() value as exit code"
-msgstr ""
-
-#, c-format
-msgid "option `--default' expects a boolean value with `--type=bool`, not `%s`"
-msgstr ""
-
-#, c-format
-msgid ""
-"option `--default' expects an unsigned long value with `--type=ulong`, not `"
-"%s`"
-msgstr ""
-
msgid "git fast-export [<rev-list-opts>]"
msgstr ""
@@ -5507,114 +5598,14 @@ msgstr "git fetch --all [<опции>]"
msgid "fetch.parallel cannot be negative"
msgstr ""
-msgid "fetch from all remotes"
-msgstr "извлечь со всех внешних репозиториев"
-
-msgid "set upstream for git pull/fetch"
-msgstr ""
-
-msgid "append to .git/FETCH_HEAD instead of overwriting"
-msgstr "дописать к .git/FETCH_HEAD вместо перезаписи"
-
-msgid "use atomic transaction to update references"
-msgstr ""
-
-msgid "path to upload pack on remote end"
-msgstr "путь к программе упаковки пакета на машине с внешним репозиторием"
-
-msgid "force overwrite of local reference"
-msgstr ""
-
-msgid "fetch from multiple remotes"
-msgstr "извлечь с нескольких внешних репозиториев"
-
-msgid "fetch all tags and associated objects"
-msgstr "извлечь все метки и связанные объекты"
-
-msgid "do not fetch all tags (--no-tags)"
-msgstr "не извлекать все метки (--no-tags)"
-
-msgid "number of submodules fetched in parallel"
-msgstr "количество подмодулей, которые будут скачаны парралельно"
-
-msgid "modify the refspec to place all refs within refs/prefetch/"
-msgstr ""
-
-msgid "prune remote-tracking branches no longer on remote"
-msgstr ""
-"почистить отслеживаемые внешние ветки, которых уже нет на внешнем репозитории"
-
-msgid "prune local tags no longer on remote and clobber changed tags"
-msgstr ""
-
-msgid "on-demand"
-msgstr "по требованию"
-
-msgid "control recursive fetching of submodules"
-msgstr "управление рекурсивным извлечением подмодулей"
-
-msgid "write fetched references to the FETCH_HEAD file"
-msgstr ""
-
-msgid "keep downloaded pack"
-msgstr "оставить загруженный пакет данных"
-
-msgid "allow updating of HEAD ref"
-msgstr "разрешить обновление указателя HEAD"
-
-msgid "deepen history of shallow clone"
-msgstr "углубить историю частичного клона"
-
-msgid "deepen history of shallow repository based on time"
-msgstr "углубить историю частичного клона основываясь на времени"
-
-msgid "convert to a complete repository"
-msgstr "преобразовать в полный репозиторий"
-
-msgid "re-fetch without negotiating common commits"
-msgstr ""
-
-msgid "prepend this to submodule path output"
-msgstr "присоединять это спереди к выводу путей подмодуля"
-
-msgid ""
-"default for recursive fetching of submodules (lower priority than config "
-"files)"
-msgstr ""
-"настроить по умолчанию рекурсивное извлечение подмодулей (более низкий "
-"приоритет, чем файлы конфигурации)"
-
-msgid "accept refs that update .git/shallow"
-msgstr "принимать ссылки, которые обновляют .git/shallow"
-
-msgid "refmap"
-msgstr "соответствие-ссылок"
-
-msgid "specify fetch refmap"
-msgstr "указать соответствие ссылок при извлечении"
-
-msgid "report that we have only objects reachable from this object"
-msgstr ""
-
-msgid "do not fetch a packfile; instead, print ancestors of negotiation tips"
-msgstr ""
-
-msgid "run 'maintenance --auto' after fetching"
-msgstr ""
-
-msgid "check for forced-updates on all updated branches"
-msgstr ""
-
-msgid "write the commit-graph after fetching"
-msgstr ""
-
-msgid "accept refspecs from stdin"
-msgstr ""
-
msgid "couldn't find remote ref HEAD"
msgstr ""
#, c-format
+msgid "From %.*s\n"
+msgstr "Из %.*s\n"
+
+#, c-format
msgid "object %s not found"
msgstr "объект %s не найден"
@@ -5624,10 +5615,7 @@ msgstr "[актуально]"
msgid "[rejected]"
msgstr "[отклонено]"
-msgid "can't fetch in current branch"
-msgstr "нельзя извлечь текущую ветку"
-
-msgid "checked out in another worktree"
+msgid "can't fetch into checked-out branch"
msgstr ""
msgid "[tag update]"
@@ -5681,10 +5669,6 @@ msgid "rejected %s because shallow roots are not allowed to be updated"
msgstr ""
#, c-format
-msgid "From %.*s\n"
-msgstr "Из %.*s\n"
-
-#, c-format
msgid ""
"some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting branches"
@@ -5769,6 +5753,110 @@ msgstr ""
msgid "you need to specify a tag name"
msgstr ""
+msgid "fetch from all remotes"
+msgstr "извлечь со всех внешних репозиториев"
+
+msgid "set upstream for git pull/fetch"
+msgstr ""
+
+msgid "append to .git/FETCH_HEAD instead of overwriting"
+msgstr "дописать к .git/FETCH_HEAD вместо перезаписи"
+
+msgid "use atomic transaction to update references"
+msgstr ""
+
+msgid "path to upload pack on remote end"
+msgstr "путь к программе упаковки пакета на машине с внешним репозиторием"
+
+msgid "force overwrite of local reference"
+msgstr ""
+
+msgid "fetch from multiple remotes"
+msgstr "извлечь с нескольких внешних репозиториев"
+
+msgid "fetch all tags and associated objects"
+msgstr "извлечь все метки и связанные объекты"
+
+msgid "do not fetch all tags (--no-tags)"
+msgstr "не извлекать все метки (--no-tags)"
+
+msgid "number of submodules fetched in parallel"
+msgstr "количество подмодулей, которые будут скачаны парралельно"
+
+msgid "modify the refspec to place all refs within refs/prefetch/"
+msgstr ""
+
+msgid "prune remote-tracking branches no longer on remote"
+msgstr ""
+"почистить отслеживаемые внешние ветки, которых уже нет на внешнем репозитории"
+
+msgid "prune local tags no longer on remote and clobber changed tags"
+msgstr ""
+
+msgid "on-demand"
+msgstr "по требованию"
+
+msgid "control recursive fetching of submodules"
+msgstr "управление рекурсивным извлечением подмодулей"
+
+msgid "write fetched references to the FETCH_HEAD file"
+msgstr ""
+
+msgid "keep downloaded pack"
+msgstr "оставить загруженный пакет данных"
+
+msgid "allow updating of HEAD ref"
+msgstr "разрешить обновление указателя HEAD"
+
+msgid "deepen history of shallow clone"
+msgstr "углубить историю частичного клона"
+
+msgid "deepen history of shallow repository based on time"
+msgstr "углубить историю частичного клона основываясь на времени"
+
+msgid "convert to a complete repository"
+msgstr "преобразовать в полный репозиторий"
+
+msgid "re-fetch without negotiating common commits"
+msgstr ""
+
+msgid "prepend this to submodule path output"
+msgstr "присоединять это спереди к выводу путей подмодуля"
+
+msgid ""
+"default for recursive fetching of submodules (lower priority than config "
+"files)"
+msgstr ""
+"настроить по умолчанию рекурсивное извлечение подмодулей (более низкий "
+"приоритет, чем файлы конфигурации)"
+
+msgid "accept refs that update .git/shallow"
+msgstr "принимать ссылки, которые обновляют .git/shallow"
+
+msgid "refmap"
+msgstr "соответствие-ссылок"
+
+msgid "specify fetch refmap"
+msgstr "указать соответствие ссылок при извлечении"
+
+msgid "report that we have only objects reachable from this object"
+msgstr ""
+
+msgid "do not fetch a packfile; instead, print ancestors of negotiation tips"
+msgstr ""
+
+msgid "run 'maintenance --auto' after fetching"
+msgstr ""
+
+msgid "check for forced-updates on all updated branches"
+msgstr ""
+
+msgid "write the commit-graph after fetching"
+msgstr ""
+
+msgid "accept refspecs from stdin"
+msgstr ""
+
msgid "--negotiate-only needs one or more --negotiation-tip=*"
msgstr ""
@@ -5778,6 +5866,10 @@ msgstr ""
msgid "--unshallow on a complete repository does not make sense"
msgstr "--unshallow не имеет смысла на полном репозитории"
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr ""
+
msgid "fetch --all does not take a repository argument"
msgstr "fetch --all не принимает имя репозитория как аргумент"
@@ -5878,7 +5970,13 @@ msgstr "вывод только ссылок, которые содержат к
msgid "print only refs which don't contain the commit"
msgstr "вывод только ссылок, которые не содержат коммит"
-msgid "git for-each-repo --config=<config> <command-args>"
+msgid "read reference patterns from stdin"
+msgstr ""
+
+msgid "unknown arguments supplied with --stdin"
+msgstr ""
+
+msgid "git for-each-repo --config=<config> [--] <arguments>"
msgstr ""
msgid "config"
@@ -5890,6 +5988,10 @@ msgstr ""
msgid "missing --config=<config>"
msgstr ""
+#, c-format
+msgid "got bad config --config=%s"
+msgstr ""
+
msgid "unknown"
msgstr ""
@@ -6034,18 +6136,35 @@ msgstr "%s: отсоединённый указатель HEAD ни на что
msgid "notice: %s points to an unborn branch (%s)"
msgstr ""
-msgid "Checking cache tree"
+#, c-format
+msgid "Checking cache tree of %s"
msgstr ""
#, c-format
-msgid "%s: invalid sha1 pointer in cache-tree"
+msgid "%s: invalid sha1 pointer in cache-tree of %s"
msgstr ""
msgid "non-tree in cache-tree"
msgstr ""
-msgid "git fsck [<options>] [<object>...]"
-msgstr "git fsck [<опции>] [<объект>...]"
+#, c-format
+msgid "%s: invalid sha1 pointer in resolve-undo of %s"
+msgstr ""
+
+#, c-format
+msgid "unable to load rev-index for pack '%s'"
+msgstr ""
+
+#, c-format
+msgid "invalid rev-index for pack '%s'"
+msgstr ""
+
+msgid ""
+"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
+" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
+" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
+" [--[no-]name-objects] [<object>...]"
+msgstr ""
msgid "show unreachable objects"
msgstr "показать недоступные объекты"
@@ -6100,12 +6219,6 @@ msgstr ""
msgid "git fsmonitor--daemon run [<options>]"
msgstr ""
-msgid "git fsmonitor--daemon stop"
-msgstr ""
-
-msgid "git fsmonitor--daemon status"
-msgstr ""
-
#, c-format
msgid "value of '%s' out of range: %d"
msgstr ""
@@ -6342,7 +6455,19 @@ msgstr ""
msgid "use at most one of --auto and --schedule=<frequency>"
msgstr ""
-msgid "failed to run 'git config'"
+#, c-format
+msgid "unable to add '%s' value of '%s'"
+msgstr ""
+
+msgid "return success even if repository was not registered"
+msgstr ""
+
+#, c-format
+msgid "unable to unset '%s' value of '%s'"
+msgstr ""
+
+#, c-format
+msgid "repository '%s' is not registered"
msgstr ""
#, c-format
@@ -6369,10 +6494,13 @@ msgstr ""
msgid "failed to run 'crontab -l'; your system might not support 'cron'"
msgstr ""
-msgid "failed to run 'crontab'; your system might not support 'cron'"
+msgid "failed to create crontab temporary file"
msgstr ""
-msgid "failed to open stdin of 'crontab'"
+msgid "failed to open temporary file"
+msgstr ""
+
+msgid "failed to run 'crontab'; your system might not support 'cron'"
msgstr ""
msgid "'crontab' died"
@@ -6421,10 +6549,6 @@ msgstr ""
msgid "git maintenance <subcommand> [<options>]"
msgstr ""
-#, c-format
-msgid "invalid subcommand: %s"
-msgstr ""
-
msgid "git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"
msgstr "git grep [<опции>] [-e] <шаблон> [<редакция>...] [[--] <путь>...]"
@@ -6440,7 +6564,6 @@ msgstr "указано недопустимое количество поток
#. TRANSLATORS: %s is the configuration
#. variable for tweaking threads, currently
#. grep.threads
-#.
#, c-format
msgid "no threads support, ignoring %s"
msgstr "нет поддержки потоков, игнорирование %s"
@@ -6595,6 +6718,9 @@ msgstr "показать совпадающие файлы с помощью п
msgid "allow calling of grep(1) (ignored by this build)"
msgstr "разрешить вызов grep(1) (игнорируется в этой сборке)"
+msgid "maximum number of results per file"
+msgstr ""
+
msgid "no pattern given"
msgstr ""
@@ -6630,11 +6756,12 @@ msgid "both --cached and trees are given"
msgstr ""
msgid ""
-"git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] "
-"[--] <file>..."
+"git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
+" [--stdin [--literally]] [--] <file>..."
+msgstr ""
+
+msgid "git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]"
msgstr ""
-"git hash-object [-t <тип>] [-w] [--path=<файл> | --no-filters] [--stdin] "
-"[--] <файл>..."
msgid "object type"
msgstr "тип объекта"
@@ -6683,10 +6810,16 @@ msgstr ""
msgid "print list of useful guides"
msgstr "вывести список полезных руководств"
+msgid "print list of user-facing repository, command and file interfaces"
+msgstr ""
+
+msgid "print list of file formats, protocols and other developer interfaces"
+msgstr ""
+
msgid "print all configuration variable names"
msgstr ""
-msgid "git help [[-i|--info] [-m|--man] [-w|--web]] [<command>]"
+msgid "git help [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]"
msgstr ""
#, c-format
@@ -6756,12 +6889,17 @@ msgstr "использование: %s%s"
msgid "'git help config' for more information"
msgstr ""
-msgid "git hook run [--ignore-missing] <hook-name> [-- <hook-args>]"
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
msgstr ""
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"
@@ -7065,11 +7203,11 @@ msgid "Initialized empty Git repository in %s%s\n"
msgstr "Инициализирован пустой репозиторий Git в %s%s\n"
msgid ""
-"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--"
-"shared[=<permissions>]] [<directory>]"
+"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
+" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
+" [-b <branch-name> | --initial-branch=<branch-name>]\n"
+" [--shared[=<permissions>]] [<directory>]"
msgstr ""
-"git init [-q | --quiet] [--bare] [--template=<каталог-шаблонов>] [--"
-"shared[=<права-доступа>]] [<каталог>]"
msgid "permissions"
msgstr "права-доступа"
@@ -7111,11 +7249,10 @@ msgid "--separate-git-dir incompatible with bare repository"
msgstr ""
msgid ""
-"git interpret-trailers [--in-place] [--trim-empty] [(--trailer "
-"<token>[(=|:)<value>])...] [<file>...]"
+"git interpret-trailers [--in-place] [--trim-empty]\n"
+" [(--trailer <token>[(=|:)<value>])...]\n"
+" [--parse] [<file>...]"
msgstr ""
-"git interpret-trailers [--in-place] [--trim-empty] [(--trailer "
-"<ключ>[(=|:)<значение>])...] [<файл>...]"
msgid "edit files in place"
msgstr "редактировать файлы на месте"
@@ -7172,7 +7309,7 @@ msgstr "не выводить список изменений"
msgid "show source"
msgstr "показать источник"
-msgid "use mail map file"
+msgid "clear all previously-defined decoration filters"
msgstr ""
msgid "only decorate refs that match <pattern>"
@@ -7422,6 +7559,9 @@ msgstr ""
msgid "percentage by which creation is weighted"
msgstr ""
+msgid "show in-body From: even if identical to the e-mail header"
+msgstr ""
+
#, c-format
msgid "invalid ident line: %s"
msgstr "неправильная строка идентификации: %s"
@@ -7482,6 +7622,18 @@ msgstr ""
"Не удалось найти отслеживаемую внешнюю ветку, укажите <вышестоящую-ветку> "
"вручную.\n"
+#, c-format
+msgid "bad ls-files format: element '%s' does not start with '('"
+msgstr ""
+
+#, c-format
+msgid "bad ls-files format: element '%s' does not end in ')'"
+msgstr ""
+
+#, c-format
+msgid "bad ls-files format: %%%.*s"
+msgstr ""
+
msgid "git ls-files [<options>] [<file>...]"
msgstr "git ls-files [<опции>] [<файл>...]"
@@ -7569,9 +7721,14 @@ msgid "show sparse directories in the presence of a sparse index"
msgstr ""
msgid ""
+"--format cannot be used with -s, -o, -k, -t, --resolve-undo, --deduplicate, "
+"--eol"
+msgstr ""
+
+msgid ""
"git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
-" [-q | --quiet] [--exit-code] [--get-url]\n"
-" [--symref] [<repository> [<refs>...]]"
+" [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
+" [--symref] [<repository> [<patterns>...]]"
msgstr ""
msgid "do not print remote URL"
@@ -7704,12 +7861,12 @@ msgstr "git merge-base [-a | --all] <коммит> <коммит>..."
msgid "git merge-base [-a | --all] --octopus <commit>..."
msgstr "git merge-base [-a | --all] --octopus <коммит>..."
-msgid "git merge-base --independent <commit>..."
-msgstr "git merge-base --independent <коммит>..."
-
msgid "git merge-base --is-ancestor <commit> <commit>"
msgstr "git merge-base --is-ancestor <коммит> <коммит>"
+msgid "git merge-base --independent <commit>..."
+msgstr "git merge-base --independent <коммит>..."
+
msgid "git merge-base --fork-point <ref> [<commit>]"
msgstr "git merge-base --fork-point <ссылка> [<коммит>]"
@@ -7789,6 +7946,56 @@ msgstr "не удалось распознать ссылку «%s»"
msgid "Merging %s with %s\n"
msgstr "Слияние %s и %s\n"
+msgid "not something we can merge"
+msgstr "не является тем, что можно слить"
+
+msgid "refusing to merge unrelated histories"
+msgstr "отказ слияния несвязанных историй изменений"
+
+msgid "failure to merge"
+msgstr ""
+
+msgid "git merge-tree [--write-tree] [<options>] <branch1> <branch2>"
+msgstr ""
+
+msgid "git merge-tree [--trivial-merge] <base-tree> <branch1> <branch2>"
+msgstr ""
+
+msgid "do a real merge instead of a trivial merge"
+msgstr ""
+
+msgid "do a trivial merge only"
+msgstr ""
+
+msgid "also show informational/conflict messages"
+msgstr ""
+
+msgid "list filenames without modes/oids/stages"
+msgstr ""
+
+msgid "allow merging unrelated histories"
+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 ""
+
+msgid "--merge-base is incompatible with --stdin"
+msgstr ""
+
+#, c-format
+msgid "malformed input line: '%s'."
+msgstr "неправильная введенная строка: «%s»."
+
+#, c-format
+msgid "merging cannot continue; got unclean result of %d"
+msgstr ""
+
msgid "git merge [<options>] [<commit>...]"
msgstr "git merge [<опции>] [<коммит>...]"
@@ -7870,9 +8077,6 @@ msgstr ""
msgid "continue the current in-progress merge"
msgstr "продолжить выполнение происходящего слияния"
-msgid "allow merging unrelated histories"
-msgstr "разрешить слияние несвязанных историй изменений"
-
msgid "bypass pre-merge-commit and commit-msg hooks"
msgstr ""
@@ -7994,9 +8198,6 @@ msgstr "не удалось закрыть «%s»"
msgid "not something we can merge in %s: %s"
msgstr "не является тем, что можно слить в %s: %s"
-msgid "not something we can merge"
-msgstr "не является тем, что можно слить"
-
msgid "--abort expects no arguments"
msgstr "опция --abort не принимает аргументы"
@@ -8046,14 +8247,17 @@ msgstr "%s не является тем, что можно слить"
msgid "Can merge only exactly one commit into empty head"
msgstr "Можно только один коммит в пустую ветку."
-msgid "refusing to merge unrelated histories"
-msgstr "отказ слияния несвязанных историй изменений"
-
#, c-format
msgid "Updating %s..%s\n"
msgstr "Обновление %s..%s\n"
#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by merge:\n"
+" %s"
+msgstr ""
+
+#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr "Попытка тривиального слияния в индексе...\n"
@@ -8088,6 +8292,10 @@ msgstr ""
"выполнением коммита\n"
#, c-format
+msgid "When finished, apply stashed changes with `git stash pop`\n"
+msgstr ""
+
+#, c-format
msgid "warning: tag input does not pass fsck: %s"
msgstr ""
@@ -8201,6 +8409,9 @@ msgstr "Проверка переименования из «%s» в «%s»\n"
msgid "bad source"
msgstr "плохой источник"
+msgid "destination exists"
+msgstr "целевой путь уже существует"
+
msgid "can not move directory into itself"
msgstr "нельзя переместить каталог в самого себя"
@@ -8216,9 +8427,6 @@ msgstr "не под версионным контролем"
msgid "conflicted"
msgstr ""
-msgid "destination exists"
-msgstr "целевой путь уже существует"
-
#, c-format
msgid "overwriting '%s'"
msgstr "перезапись «%s»"
@@ -8232,6 +8440,9 @@ msgstr "несколько источников для одного целево
msgid "destination directory does not exist"
msgstr "целевой каталог не существует"
+msgid "destination exists in the index"
+msgstr ""
+
#, c-format
msgid "%s, source=%s, destination=%s"
msgstr "%s, откуда=%s, куда=%s"
@@ -8399,16 +8610,11 @@ msgid "cannot read note data from non-blob object '%s'."
msgstr "не удалось прочитать данные заметки из недвоичного объекта «%s»."
#, c-format
-msgid "malformed input line: '%s'."
-msgstr "неправильная введенная строка: «%s»."
-
-#, c-format
msgid "failed to copy notes from '%s' to '%s'"
msgstr "не удалось скопировать заметку из «%s» в «%s»"
#. TRANSLATORS: the first %s will be replaced by a git
#. notes command: 'add', 'merge', 'remove', etc.
-#.
#, c-format
msgid "refusing to %s notes in %s (outside of refs/notes/)"
msgstr "отказ в перезаписи %s заметок в %s (за пределами refs/notes/)"
@@ -8590,20 +8796,15 @@ msgid "use notes from <notes-ref>"
msgstr "использовать заметку из <ссылка-на-заметку>"
#, c-format
-msgid "unknown subcommand: %s"
-msgstr "неизвестная подкоманда: %s"
+msgid "unknown subcommand: `%s'"
+msgstr ""
-msgid ""
-"git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]"
+msgid "git pack-objects --stdout [<options>] [< <ref-list> | < <object-list>]"
msgstr ""
-"git pack-objects --stdout [<опции>...] [< <список-ссылок> | < <список-"
-"объектов>]"
msgid ""
-"git pack-objects [<options>...] <base-name> [< <ref-list> | < <object-list>]"
+"git pack-objects [<options>] <base-name> [< <ref-list> | < <object-list>]"
msgstr ""
-"git pack-objects [<опции>...] <имя-базы> [< <список-ссылок> | < <список-"
-"объектов>]"
#, c-format
msgid ""
@@ -8782,6 +8983,12 @@ msgstr "неподдерживаемая версия индекса %s"
msgid "bad index version '%s'"
msgstr "плохая версия индекса «%s»"
+msgid "show progress meter during object writing phase"
+msgstr "показать прогресс выполнения во время записи объектов"
+
+msgid "similar to --all-progress when progress meter is shown"
+msgstr "похоже на --all-progress при включенном прогрессе выполнения"
+
msgid "<version>[,<offset>]"
msgstr ""
@@ -8967,8 +9174,11 @@ msgid ""
"to <git@vger.kernel.org>. Thanks.\n"
msgstr ""
-msgid "git pack-refs [<options>]"
-msgstr "git pack-refs [<опции>]"
+msgid "refusing to run without --i-still-use-this"
+msgstr ""
+
+msgid "git pack-refs [--all] [--no-prune]"
+msgstr ""
msgid "pack everything"
msgstr "паковать всё"
@@ -8976,6 +9186,18 @@ msgstr "паковать всё"
msgid "prune loose refs (default)"
msgstr "почистить слабые ссылки (по умолчанию)"
+msgid "git patch-id [--stable | --unstable | --verbatim]"
+msgstr ""
+
+msgid "use the unstable patch-id algorithm"
+msgstr ""
+
+msgid "use the stable patch-id algorithm"
+msgstr ""
+
+msgid "don't strip whitespace from the patch"
+msgstr ""
+
msgid "git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]"
msgstr ""
"git prune [-n] [-v] [--progress] [--expire <время>] [--] [<редакция>...]"
@@ -9114,8 +9336,8 @@ msgstr ""
msgid "pull with rebase"
msgstr "получение с перемещением"
-msgid "please commit or stash them."
-msgstr "сделайте коммит или спрячьте их."
+msgid "Please commit or stash them."
+msgstr "Сделайте коммит или спрячьте их."
#, c-format
msgid ""
@@ -9175,9 +9397,8 @@ msgstr ""
msgid ""
"\n"
-"To avoid automatically configuring upstream branches when their name\n"
-"doesn't match the local branch, see option 'simple' of branch."
-"autoSetupMerge\n"
+"To avoid automatically configuring an upstream branch when its name\n"
+"won't match the local branch, see option 'simple' of branch.autoSetupMerge\n"
"in 'git help config'.\n"
msgstr ""
@@ -9321,6 +9542,11 @@ msgstr "Отправка в %s\n"
msgid "failed to push some refs to '%s'"
msgstr "не удалось отправить некоторые ссылки в «%s»"
+msgid ""
+"recursing into submodule with push.recurseSubmodules=only; using on-demand "
+"instead"
+msgstr ""
+
#, c-format
msgid "invalid value for '%s'"
msgstr ""
@@ -9328,8 +9554,8 @@ msgstr ""
msgid "repository"
msgstr "репозиторий"
-msgid "push all refs"
-msgstr "отправить все ссылки"
+msgid "push all branches"
+msgstr ""
msgid "mirror all refs"
msgstr "сделать зеркало всех ссылок"
@@ -9337,8 +9563,8 @@ msgstr "сделать зеркало всех ссылок"
msgid "delete refs"
msgstr "удалить ссылки"
-msgid "push tags (can't be used with --all or --mirror)"
-msgstr "отправить метки (нельзя использовать вместе с --all или --mirror)"
+msgid "push tags (can't be used with --all or --branches or --mirror)"
+msgstr ""
msgid "force updates"
msgstr "принудительное обновление"
@@ -9441,19 +9667,25 @@ msgid "only emit output related to the second range"
msgstr ""
#, c-format
+msgid "not a revision: '%s'"
+msgstr ""
+
+#, c-format
msgid "not a commit range: '%s'"
msgstr ""
-msgid "single arg format must be symmetric range"
+#, c-format
+msgid "not a symmetric range: '%s'"
msgstr ""
msgid "need two commit ranges"
msgstr ""
msgid ""
-"git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>) "
-"[-u | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-"
-"ish1> [<tree-ish2> [<tree-ish3>]])"
+"git read-tree [(-m [--trivial] [--aggressive] | --reset | --"
+"prefix=<prefix>)\n"
+" [-u | -i]] [--index-output=<file>] [--no-sparse-checkout]\n"
+" (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"
msgstr ""
msgid "write resulting index to <file>"
@@ -9542,7 +9774,7 @@ msgid "%s requires the merge backend"
msgstr ""
#, c-format
-msgid "could not get 'onto': '%s'"
+msgid "invalid onto: '%s'"
msgstr ""
#, c-format
@@ -9582,13 +9814,26 @@ msgid ""
msgstr ""
#, c-format
+msgid "Unknown rebase-merges mode: %s"
+msgstr ""
+
+#, c-format
msgid "could not switch to %s"
msgstr ""
+msgid "apply options and merge options cannot be used together"
+msgstr ""
+
#, c-format
msgid ""
-"unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and \"ask"
-"\"."
+"unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
+"\"ask\"."
+msgstr ""
+
+msgid ""
+"--rebase-merges with an empty string argument is deprecated and will stop "
+"working in a future version of Git. Use --rebase-merges without an argument "
+"instead, which does the same thing."
msgstr ""
#, c-format
@@ -9693,6 +9938,9 @@ msgstr ""
msgid "move commits that begin with squash!/fixup! under -i"
msgstr ""
+msgid "update branches that point to commits that are being rebased"
+msgstr ""
+
msgid "add exec lines after each commit of the editable list"
msgstr ""
@@ -9779,14 +10027,22 @@ msgstr ""
msgid "switch `C' expects a numerical value"
msgstr ""
-#, c-format
-msgid "Unknown mode: %s"
+msgid "--strategy requires --merge or --interactive"
msgstr ""
-msgid "--strategy requires --merge or --interactive"
+msgid ""
+"apply options are incompatible with rebase.autoSquash. Consider adding --no-"
+"autosquash"
msgstr ""
-msgid "apply options and merge options cannot be used together"
+msgid ""
+"apply options are incompatible with rebase.rebaseMerges. Consider adding --"
+"no-rebase-merges"
+msgstr ""
+
+msgid ""
+"apply options are incompatible with rebase.updateRefs. Consider adding --no-"
+"update-refs"
msgstr ""
#, c-format
@@ -9811,7 +10067,7 @@ msgstr ""
msgid "No such ref: %s"
msgstr "Нет такой ссылки: %s"
-msgid "Could not resolve HEAD to a revision"
+msgid "Could not resolve HEAD to a commit"
msgstr ""
#, c-format
@@ -9826,9 +10082,6 @@ msgstr ""
msgid "Does not point to a valid commit '%s'"
msgstr ""
-msgid "Please commit or stash them."
-msgstr "Сделайте коммит или спрячьте их."
-
msgid "HEAD is up to date."
msgstr "HEAD уже в актуальном состоянии."
@@ -10203,6 +10456,9 @@ msgstr " новая (следующее извлечение сохранит е
msgid " tracked"
msgstr " отслеживается"
+msgid " skipped"
+msgstr ""
+
msgid " stale (use 'git remote prune' to remove)"
msgstr " недействительна (используйте «git remote prune», чтобы удалить)"
@@ -10287,7 +10543,6 @@ msgstr "(нет URL)"
#. TRANSLATORS: the colon ':' should align
#. with the one in " Fetch URL: %s"
#. translation.
-#.
#, c-format
msgid " Push URL: %s"
msgstr " URL для отправки: %s"
@@ -10472,6 +10727,10 @@ msgstr ""
msgid "could not close refs snapshot tempfile"
msgstr ""
+#, c-format
+msgid "could not remove stale bitmap: %s"
+msgstr ""
+
msgid "pack everything in a single pack"
msgstr "упаковать всё в один пакет"
@@ -10484,7 +10743,7 @@ msgstr ""
msgid "approxidate"
msgstr "примерная-дата"
-msgid "with -C, expire objects older than this"
+msgid "with --cruft, expire objects older than this"
msgstr ""
msgid "remove redundant packs, and run git-prune-packed"
@@ -10544,6 +10803,9 @@ msgstr ""
msgid "write a multi-pack index of the resulting packs"
msgstr ""
+msgid "pack prefix to store a pack containing pruned objects"
+msgstr ""
+
msgid "cannot delete packs in a precious-objects repo"
msgstr "нельзя удалять пакеты в precious-objects репозитории"
@@ -10555,7 +10817,11 @@ msgid "pack prefix %s does not begin with objdir %s"
msgstr ""
#, c-format
-msgid "missing required file: %s"
+msgid "renaming pack to '%s' failed"
+msgstr ""
+
+#, c-format
+msgid "pack-objects did not write a '%s' file for pack %s-%s"
msgstr ""
#, c-format
@@ -10743,8 +11009,9 @@ msgstr ""
msgid "only one pattern can be given with -l"
msgstr ""
-msgid "git rerere [clear | forget <path>... | status | remaining | diff | gc]"
-msgstr "git rerere [clear | forget <путь>... | status | remaining | diff | gc]"
+msgid ""
+"git rerere [clear | forget <pathspec>... | diff | status | remaining | gc]"
+msgstr ""
msgid "register clean resolutions in index"
msgstr "записать чистые разрешения конфликтов в индекс"
@@ -10866,6 +11133,10 @@ msgstr "Не удалось записать новый файл индекса.
msgid "unable to get disk usage of %s"
msgstr ""
+#, c-format
+msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
+msgstr ""
+
msgid "rev-list does not support display of notes"
msgstr "rev-list не поддерживает отображение заметок"
@@ -10891,6 +11162,9 @@ msgstr ""
msgid "no usage string given before the `--' separator"
msgstr ""
+msgid "missing opt-spec before option flags"
+msgstr ""
+
msgid "Needed a single revision"
msgstr ""
@@ -10938,6 +11212,15 @@ msgstr ""
msgid "unknown mode for --abbrev-ref: %s"
msgstr ""
+msgid "--exclude-hidden cannot be used together with --branches"
+msgstr ""
+
+msgid "--exclude-hidden cannot be used together with --tags"
+msgstr ""
+
+msgid "--exclude-hidden cannot be used together with --remotes"
+msgstr ""
+
msgid "this operation must be run in a work tree"
msgstr ""
@@ -10945,17 +11228,21 @@ msgstr ""
msgid "unknown mode for --show-object-format: %s"
msgstr ""
-msgid "git revert [<options>] <commit-ish>..."
-msgstr "git revert [<опции>] <указатель-коммита>..."
+msgid ""
+"git revert [--[no-]edit] [-n] [-m <parent-number>] [-s] [-S[<keyid>]] "
+"<commit>..."
+msgstr ""
-msgid "git revert <subcommand>"
-msgstr "git revert <подкоманда>"
+msgid "git revert (--continue | --skip | --abort | --quit)"
+msgstr ""
-msgid "git cherry-pick [<options>] <commit-ish>..."
-msgstr "git cherry-pick [<опции>] <указатель-коммита>..."
+msgid ""
+"git cherry-pick [--edit] [-n] [-m <parent-number>] [-s] [-x] [--ff]\n"
+" [-S[<keyid>]] <commit>..."
+msgstr ""
-msgid "git cherry-pick <subcommand>"
-msgstr "git cherry-pick <подкоманда>"
+msgid "git cherry-pick (--continue | --skip | --abort | --quit)"
+msgstr ""
#, c-format
msgid "option `%s' expects a number greater than zero"
@@ -11017,8 +11304,11 @@ msgstr "сбой обращения изменений коммита"
msgid "cherry-pick failed"
msgstr "сбой при копировании коммита"
-msgid "git rm [<options>] [--] <file>..."
-msgstr "git rm [<опции>] [--] <файл>..."
+msgid ""
+"git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]\n"
+" [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+" [--] [<pathspec>...]"
+msgstr ""
msgid ""
"the following file has staged content different from both the\n"
@@ -11101,12 +11391,16 @@ msgid ""
"git send-pack [--mirror] [--dry-run] [--force]\n"
" [--receive-pack=<git-receive-pack>]\n"
" [--verbose] [--thin] [--atomic]\n"
+" [--[no-]signed | --signed=(true|false|if-asked)]\n"
" [<host>:]<directory> (--all | <ref>...)"
msgstr ""
msgid "remote name"
msgstr "имя внешнего репозитория"
+msgid "push all refs"
+msgstr "отправить все ссылки"
+
msgid "use stateless RPC protocol"
msgstr "протокол без сохранения состояния для RPC"
@@ -11125,7 +11419,8 @@ msgstr "git log --pretty=short | git shortlog [<опции>]"
msgid "using multiple --group options with stdin is not supported"
msgstr ""
-msgid "using --group=trailer with stdin is not supported"
+#, c-format
+msgid "using %s with stdin is not supported"
msgstr ""
#, c-format
@@ -11163,7 +11458,8 @@ msgid ""
"git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
" [--current] [--color[=<when>] | --no-color] [--sparse]\n"
" [--more=<n> | --list | --independent | --merge-base]\n"
-" [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"
+" [--no-name | --sha1-name] [--topics]\n"
+" [(<rev> | <glob>)...]"
msgstr ""
msgid "git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"
@@ -11270,11 +11566,10 @@ msgid "Unknown hash algorithm"
msgstr ""
msgid ""
-"git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --"
-"hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]"
+"git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference]\n"
+" [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags]\n"
+" [--heads] [--] [<pattern>...]"
msgstr ""
-"git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --"
-"hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<шаблон>...]"
msgid "git show-ref --exclude-existing[=<pattern>]"
msgstr "git show-ref --exclude-existing[=<шаблон>]"
@@ -11305,7 +11600,9 @@ msgid "show refs from stdin that aren't in local repository"
msgstr ""
"вывести ссылки со стандартного ввода, которых нет в локальном репозитории"
-msgid "git sparse-checkout (init|list|set|add|reapply|disable) <options>"
+msgid ""
+"git sparse-checkout (init | list | set | add | reapply | disable | check-"
+"rules) [<options>]"
msgstr ""
msgid "this worktree is not sparse"
@@ -11413,57 +11710,59 @@ msgstr ""
msgid "error while refreshing working directory"
msgstr ""
-msgid "git stash list [<options>]"
-msgstr "git stash list [<опции>]"
+msgid ""
+"git sparse-checkout check-rules [-z] [--skip-checks][--[no-]cone] [--rules-"
+"file <file>]"
+msgstr ""
-msgid "git stash show [<options>] [<stash>]"
-msgstr "git stash show [<опциии>] [<спрятанные-изменения>]"
+msgid "terminate input and output files by a NUL character"
+msgstr ""
-msgid "git stash drop [-q|--quiet] [<stash>]"
-msgstr "git stash drop [-q|--quiet] [<спрятанные-изменения>]"
+msgid "when used with --rules-file interpret patterns as cone mode patterns"
+msgstr ""
-msgid "git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]"
+msgid "use patterns in <file> instead of the current ones."
msgstr ""
-"git stash ( pop | apply ) [--index] [-q|--quiet] [<спрятанные-изменения>]"
-msgid "git stash branch <branchname> [<stash>]"
-msgstr "git stash branch <имя-ветки> [<спрятанные-изменения>]"
+msgid "git stash list [<log-options>]"
+msgstr ""
msgid ""
-"git stash [push [-p|--patch] [-S|--staged] [-k|--[no-]keep-index] [-q|--"
-"quiet]\n"
-" [-u|--include-untracked] [-a|--all] [-m|--message <message>]\n"
-" [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
-" [--] [<pathspec>...]]"
+"git stash show [-u | --include-untracked | --only-untracked] [<diff-"
+"options>] [<stash>]"
msgstr ""
-msgid ""
-"git stash save [-p|--patch] [-S|--staged] [-k|--[no-]keep-index] [-q|--"
-"quiet]\n"
-" [-u|--include-untracked] [-a|--all] [<message>]"
+msgid "git stash drop [-q | --quiet] [<stash>]"
msgstr ""
-msgid "git stash pop [--index] [-q|--quiet] [<stash>]"
-msgstr "git stash pop [--index] [-q|--quiet] [<спрятанные-изменения>]"
+msgid "git stash pop [--index] [-q | --quiet] [<stash>]"
+msgstr ""
-msgid "git stash apply [--index] [-q|--quiet] [<stash>]"
-msgstr "git stash apply [--index] [-q|--quiet] [<спрятанные-изменения>]"
+msgid "git stash apply [--index] [-q | --quiet] [<stash>]"
+msgstr ""
+
+msgid "git stash branch <branchname> [<stash>]"
+msgstr "git stash branch <имя-ветки> [<спрятанные-изменения>]"
-msgid "git stash store [-m|--message <message>] [-q|--quiet] <commit>"
-msgstr "git stash store [-m|--message <сообщение>] [-q|--quiet] <коммит>"
+msgid "git stash store [(-m | --message) <message>] [-q | --quiet] <commit>"
+msgstr ""
msgid ""
-"git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-" [-u|--include-untracked] [-a|--all] [-m|--message <message>]\n"
+"git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q "
+"| --quiet]\n"
+" [-u | --include-untracked] [-a | --all] [(-m | --message) "
+"<message>]\n"
+" [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
" [--] [<pathspec>...]]"
msgstr ""
-"git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-" [-u|--include-untracked] [-a|--all] [-m|--message <сообщение>]\n"
-" [--] [<спецификатор-пути>...]]"
msgid ""
-"git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n"
-" [-u|--include-untracked] [-a|--all] [<message>]"
+"git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | "
+"--quiet]\n"
+" [-u | --include-untracked] [-a | --all] [<message>]"
+msgstr ""
+
+msgid "git stash create [<message>]"
msgstr ""
#, c-format
@@ -11637,17 +11936,15 @@ msgid "Expecting a full ref name, got %s"
msgstr "Ожидалось полное имя ссылки, а получено %s"
#, c-format
+msgid "could not get a repository handle for submodule '%s'"
+msgstr ""
+
+#, c-format
msgid ""
"could not look up configuration '%s'. Assuming this repository is its own "
"authoritative upstream."
msgstr ""
-msgid "alternative anchor for relative paths"
-msgstr "альтернативный символ для относительных путей"
-
-msgid "git submodule--helper list [--prefix=<path>] [<path>...]"
-msgstr "git submodule--helper list [--prefix=<путь>] [<путь>...]"
-
#, c-format
msgid "No url found for submodule path '%s' in .gitmodules"
msgstr "URL для подмодуля по пути «%s» не найден в .gitmodules"
@@ -11675,7 +11972,7 @@ msgstr ""
msgid "recurse into nested submodules"
msgstr "проходить вглубь вложенных подмодулей"
-msgid "git submodule--helper foreach [--quiet] [--recursive] [--] <command>"
+msgid "git submodule foreach [--quiet] [--recursive] [--] <command>"
msgstr ""
#, c-format
@@ -11697,7 +11994,7 @@ msgstr "Сбой регистрации режима обновления для
msgid "suppress output for initializing a submodule"
msgstr ""
-msgid "git submodule--helper init [<options>] [<path>]"
+msgid "git submodule init [<options>] [<path>]"
msgstr ""
#, c-format
@@ -11723,9 +12020,6 @@ msgstr ""
msgid "git submodule status [--quiet] [--cached] [--recursive] [<path>...]"
msgstr "git submodule status [--quiet] [--cached] [--recursive] [<путь>...]"
-msgid "git submodule--helper name <path>"
-msgstr "git submodule--helper name <путь>"
-
#, c-format
msgid "* %s %s(blob)->%s(submodule)"
msgstr ""
@@ -11758,7 +12052,7 @@ msgstr ""
msgid "limit the summary size"
msgstr ""
-msgid "git submodule--helper summary [<options>] [<commit>] [--] [<path>]"
+msgid "git submodule summary [<options>] [<commit>] [--] [<path>]"
msgstr ""
msgid "could not fetch a revision for HEAD"
@@ -11773,18 +12067,14 @@ msgid "failed to register url for submodule path '%s'"
msgstr ""
#, c-format
-msgid "failed to get the default remote for submodule '%s'"
-msgstr ""
-
-#, c-format
msgid "failed to update remote for submodule '%s'"
msgstr ""
msgid "suppress output of synchronizing submodule url"
msgstr ""
-msgid "git submodule--helper sync [--quiet] [--recursive] [<path>]"
-msgstr "git submodule--helper sync [--quiet] [--recursive] [<путь>]"
+msgid "git submodule sync [--quiet] [--recursive] [<path>]"
+msgstr ""
#, c-format
msgid ""
@@ -11838,6 +12128,10 @@ msgid ""
msgstr ""
#, c-format
+msgid "could not get a repository handle for gitdir '%s'"
+msgstr ""
+
+#, c-format
msgid "submodule '%s' cannot add alternate: %s"
msgstr "подмодулю «%s» не удалось добавить альтернативу: %s"
@@ -11866,6 +12160,9 @@ msgstr ""
msgid "could not get submodule directory for '%s'"
msgstr "не удалось получить каталог для подмодуля «%s»"
+msgid "alternative anchor for relative paths"
+msgstr "альтернативный символ для относительных путей"
+
msgid "where the new submodule will be cloned to"
msgstr "куда должен быть склонирован новый подмодуль"
@@ -11891,10 +12188,6 @@ msgid ""
msgstr ""
#, c-format
-msgid "Invalid update mode '%s' for submodule path '%s'"
-msgstr ""
-
-#, c-format
msgid "Invalid update mode '%s' configured for submodule path '%s'"
msgstr ""
@@ -11964,6 +12257,10 @@ msgid ""
msgstr ""
#, c-format
+msgid "could not initialize submodule at path '%s'"
+msgstr ""
+
+#, c-format
msgid ""
"Submodule (%s) branch configured to inherit branch from superproject, but "
"the superproject is not on any branch"
@@ -11972,10 +12269,6 @@ msgstr ""
"проекта, но он не находится ни на одной ветке"
#, c-format
-msgid "could not get a repository handle for submodule '%s'"
-msgstr ""
-
-#, c-format
msgid "Unable to find current revision in submodule path '%s'"
msgstr ""
@@ -12006,14 +12299,14 @@ msgstr ""
msgid "don't fetch new objects from the remote site"
msgstr ""
-msgid "path into the working tree"
-msgstr "путь в рабочем каталоге"
+msgid "use the 'checkout' update strategy (default)"
+msgstr ""
-msgid "path into the working tree, across nested submodule boundaries"
-msgstr "путь в рабочем каталоге, в пределах границ подмодуля"
+msgid "use the 'merge' update strategy"
+msgstr ""
-msgid "rebase, merge, checkout or none"
-msgstr "rebase, merge, checkout или none"
+msgid "use the 'rebase' update strategy"
+msgstr ""
msgid "create a shallow clone truncated to the specified number of revisions"
msgstr ""
@@ -12029,6 +12322,9 @@ msgstr ""
msgid "don't print cloning progress"
msgstr "вы выводить прогресс клонирования"
+msgid "disallow cloning into non-empty directory, implies --init"
+msgstr ""
+
msgid ""
"git submodule [--quiet] update [--init [--filter=<filter-spec>]] [--remote] "
"[-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-"
@@ -12036,34 +12332,13 @@ msgid ""
"[--] [<path>...]"
msgstr ""
-msgid "bad value for update parameter"
-msgstr "плохое значение для параметра update"
-
-msgid "recurse into submodules"
-msgstr "рекурсивно по подмодулям"
-
-msgid "git submodule--helper absorb-git-dirs [<options>] [<path>...]"
-msgstr "git submodule--helper absorb-git-dirs [<опции>] [<путь>...]"
-
-msgid "check if it is safe to write to the .gitmodules file"
-msgstr ""
-
-msgid "unset the config in the .gitmodules file"
-msgstr ""
-
-msgid "git submodule--helper config <name> [<value>]"
-msgstr "git submodule--helper config <имя> [<значение>]"
-
-msgid "git submodule--helper config --unset <name>"
-msgstr "git submodule--helper config --unset <имя>"
-
-msgid "please make sure that the .gitmodules file is in the working tree"
+msgid "git submodule absorbgitdirs [<options>] [<path>...]"
msgstr ""
msgid "suppress output for setting url of a submodule"
msgstr ""
-msgid "git submodule--helper set-url [--quiet] <path> <newurl>"
+msgid "git submodule set-url [--quiet] <path> <newurl>"
msgstr ""
msgid "set the default tracking branch to master"
@@ -12072,11 +12347,10 @@ msgstr ""
msgid "set the default tracking branch"
msgstr ""
-msgid "git submodule--helper set-branch [-q|--quiet] (-d|--default) <path>"
+msgid "git submodule set-branch [-q|--quiet] (-d|--default) <path>"
msgstr ""
-msgid ""
-"git submodule--helper set-branch [-q|--quiet] (-b|--branch) <branch> <path>"
+msgid "git submodule set-branch [-q|--quiet] (-b|--branch) <branch> <path>"
msgstr ""
msgid "--branch or --default required"
@@ -12130,6 +12404,9 @@ msgstr ""
msgid "unable to checkout submodule '%s'"
msgstr ""
+msgid "please make sure that the .gitmodules file is in the working tree"
+msgstr ""
+
#, c-format
msgid "Failed to add submodule '%s'"
msgstr ""
@@ -12164,7 +12441,7 @@ msgid ""
"path"
msgstr ""
-msgid "git submodule--helper add [<options>] [--] <repository> [<path>]"
+msgid "git submodule add [<options>] [--] <repository> [<path>]"
msgstr ""
msgid "Relative path can only be used from the toplevel of the working tree"
@@ -12180,19 +12457,17 @@ msgstr ""
msgid "'%s' is not a valid submodule name"
msgstr ""
-#, c-format
-msgid "%s doesn't support --super-prefix"
-msgstr "%s не поддерживает параметр --super-prefix"
+msgid "git submodule--helper <command>"
+msgstr ""
-#, c-format
-msgid "'%s' is not a valid submodule--helper subcommand"
-msgstr "«%s» не является подкомандой submodule--helper"
+msgid "git symbolic-ref [-m <reason>] <name> <ref>"
+msgstr ""
-msgid "git symbolic-ref [<options>] <name> [<ref>]"
-msgstr "git symbolic-ref [<опции>] <имя> [<ссылка>]"
+msgid "git symbolic-ref [-q] [--short] [--no-recurse] <name>"
+msgstr ""
-msgid "git symbolic-ref -d [-q] <name>"
-msgstr "git symbolic-ref -d [-q] <имя>"
+msgid "git symbolic-ref --delete [-q] <name>"
+msgstr ""
msgid "suppress error message for non-symbolic (detached) refs"
msgstr ""
@@ -12204,6 +12479,9 @@ msgstr "удалить символьные ссылки"
msgid "shorten ref output"
msgstr "укороченный вывод ссылок"
+msgid "recursively dereference (default)"
+msgstr ""
+
msgid "reason"
msgstr "причина"
@@ -12211,18 +12489,18 @@ msgid "reason of the update"
msgstr "причина обновления"
msgid ""
-"git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]\n"
-" <tagname> [<head>]"
+"git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]\n"
+" <tagname> [<commit> | <object>]"
msgstr ""
msgid "git tag -d <tagname>..."
msgstr "git tag -d <имя-метки>..."
msgid ""
-"git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--"
-"points-at <object>]\n"
-" [--format=<format>] [--merged <commit>] [--no-merged <commit>] "
-"[<pattern>...]"
+"git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]\n"
+" [--points-at <object>] [--column[=<options>] | --no-column]\n"
+" [--create-reflog] [--sort=<key>] [--format=<format>]\n"
+" [--merged <commit>] [--no-merged <commit>] [<pattern>...]"
msgstr ""
msgid "git tag -v [--format=<format>] <tagname>..."
@@ -12363,6 +12641,16 @@ msgstr "Метка «%s» обновлена (была %s)\n"
msgid "pack exceeds maximum allowed size"
msgstr "размер пакета превышает максимальный допустимый"
+msgid "failed to write object in stream"
+msgstr ""
+
+#, c-format
+msgid "inflate returned (%d)"
+msgstr ""
+
+msgid "invalid blob object from stream"
+msgstr ""
+
msgid "Unpacking objects"
msgstr "Распаковка объектов"
@@ -12592,8 +12880,10 @@ msgstr "прочитать обновления из стандартного в
msgid "update the info files from scratch"
msgstr "обновить информацию о серверах с нуля"
-msgid "git upload-pack [<options>] <dir>"
-msgstr "git upload-pack [<опции>] <каталог>"
+msgid ""
+"git-upload-pack [--[no-]strict] [--timeout=<n>] [--stateless-rpc]\n"
+" [--advertise-refs] <directory>"
+msgstr ""
msgid "quit after a single request/response exchange"
msgstr "выход после обмена одним запросом/ответом"
@@ -12607,8 +12897,8 @@ msgstr "не проверять <каталог>/.git/ если <каталог>
msgid "interrupt transfer after <n> seconds of inactivity"
msgstr "прервать передачу после <кол> секунд простоя"
-msgid "git verify-commit [-v | --verbose] <commit>..."
-msgstr "git verify-commit [-v | --verbose] <коммит>..."
+msgid "git verify-commit [-v | --verbose] [--raw] <commit>..."
+msgstr ""
msgid "print commit contents"
msgstr "вывести содержимое коммита"
@@ -12616,8 +12906,8 @@ msgstr "вывести содержимое коммита"
msgid "print raw gpg status output"
msgstr "выводить сырой вывод статуса от gpg"
-msgid "git verify-pack [-v | --verbose] [-s | --stat-only] <pack>..."
-msgstr "git verify-pack [-v | --verbose] [-s | --stat-only] <пакет>..."
+msgid "git verify-pack [-v | --verbose] [-s | --stat-only] [--] <pack>.idx..."
+msgstr ""
msgid "verbose"
msgstr "быть многословнее"
@@ -12625,35 +12915,37 @@ msgstr "быть многословнее"
msgid "show statistics only"
msgstr "вывести только статистику"
-msgid "git verify-tag [-v | --verbose] [--format=<format>] <tag>..."
-msgstr "git verify-tag [-v | --verbose] [--format=<формат>] <метка>..."
+msgid "git verify-tag [-v | --verbose] [--format=<format>] [--raw] <tag>..."
+msgstr ""
msgid "print tag contents"
msgstr "вывести содержимое метки"
-msgid "git worktree add [<options>] <path> [<commit-ish>]"
-msgstr "git worktree add [<опции>] <путь> [<указатель-коммита>]"
+msgid ""
+"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
+" [-b <new-branch>] <path> [<commit-ish>]"
+msgstr ""
-msgid "git worktree list [<options>]"
-msgstr "git worktree list [<опции>]"
+msgid "git worktree list [-v | --porcelain [-z]]"
+msgstr ""
-msgid "git worktree lock [<options>] <path>"
-msgstr "git worktree lock [<опции>] <путь>"
+msgid "git worktree lock [--reason <string>] <worktree>"
+msgstr ""
msgid "git worktree move <worktree> <new-path>"
msgstr "git worktree move <рабочий-каталог> <новый-путь>"
-msgid "git worktree prune [<options>]"
-msgstr "git worktree prune [<опции>]"
+msgid "git worktree prune [-n] [-v] [--expire <expire>]"
+msgstr ""
-msgid "git worktree remove [<options>] <worktree>"
-msgstr "git worktree remove [<опции>] <рабочий-каталог>"
+msgid "git worktree remove [-f] <worktree>"
+msgstr ""
msgid "git worktree repair [<path>...]"
msgstr ""
-msgid "git worktree unlock <path>"
-msgstr "git worktree unlock <путь>"
+msgid "git worktree unlock <worktree>"
+msgstr ""
#, c-format
msgid "Removing %s/%s: %s"
@@ -12722,7 +13014,7 @@ msgstr "Готовится рабочая копия (отсоединённый
msgid "checkout <branch> even if already checked out in other worktree"
msgstr ""
-"переключиться на <ветка> даже если она уже активна в другом рабочесм каталоге"
+"переключиться на <ветка> даже если она уже активна в другом рабочем каталоге"
msgid "create a new branch"
msgstr "создать новую ветку"
@@ -12866,6 +13158,62 @@ msgstr "вывести объект дерева для подкаталога
msgid "only useful for debugging"
msgstr "используется только при отладке"
+msgid "core.fsyncMethod = batch is unsupported on this platform"
+msgstr ""
+
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr ""
+
+#, c-format
+msgid "bundle list at '%s' has no mode"
+msgstr ""
+
+msgid "failed to create temporary file"
+msgstr ""
+
+msgid "insufficient capabilities"
+msgstr ""
+
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr ""
+
+msgid "failed to store maximum creation token"
+msgstr ""
+
+#, c-format
+msgid "unrecognized bundle mode from URI '%s'"
+msgstr ""
+
+#, c-format
+msgid "exceeded bundle URI recursion limit (%d)"
+msgstr ""
+
+#, c-format
+msgid "failed to download bundle from URI '%s'"
+msgstr ""
+
+#, c-format
+msgid "file at URI '%s' is not a bundle or bundle list"
+msgstr ""
+
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr ""
+
+msgid "bundle-uri: expected flush after arguments"
+msgstr ""
+
+msgid "bundle-uri: got an empty line"
+msgstr ""
+
+msgid "bundle-uri: line is not of the form 'key=value'"
+msgstr ""
+
+msgid "bundle-uri: line has empty key or value"
+msgstr ""
+
#, c-format
msgid "unrecognized bundle hash algorithm: %s"
msgstr ""
@@ -12888,6 +13236,11 @@ 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:"
@@ -13072,6 +13425,9 @@ msgstr "Очень простой сервер для Git репозиторие
msgid "Give an object a human readable name based on an available ref"
msgstr "Присвоение объекту удобочитаемое имя на основе доступной ссылки"
+msgid "Generate a zip archive of diagnostic information"
+msgstr ""
+
msgid "Show changes between commits, commit and working tree, etc"
msgstr "Вывод разницы между коммитами, коммитом и рабочим каталогом и т.д."
@@ -13205,8 +13561,8 @@ msgid "The standard helper program to use with git-merge-index"
msgstr ""
"Стандартная программа-помощник для использования совместно с git-merge-index"
-msgid "Show three-way merge without touching index"
-msgstr "Вывод трёхходового слияние без затрагивания индекса"
+msgid "Perform merge without touching index or working tree"
+msgstr ""
msgid "Run merge conflict resolution tools to resolve merge conflicts"
msgstr "Запуск инструментов разрешения конфликтов слияния"
@@ -13405,6 +13761,9 @@ msgstr "Проверка файлов упакованных архивов Git"
msgid "Check the GPG signature of tags"
msgstr "Проверка подписи GPG меток"
+msgid "Display version information about Git"
+msgstr ""
+
msgid "Show logs with difference each commit introduces"
msgstr "Вывод журнала с изменениями, которые вводил каждый из коммитов"
@@ -13438,6 +13797,24 @@ msgstr "Полезный минимум команд для каждодневн
msgid "Frequently asked questions about using Git"
msgstr ""
+msgid "The bundle file format"
+msgstr ""
+
+msgid "Chunk-based file formats"
+msgstr ""
+
+msgid "Git commit-graph format"
+msgstr ""
+
+msgid "Git index format"
+msgstr ""
+
+msgid "Git pack format"
+msgstr ""
+
+msgid "Git cryptographic signature formats"
+msgstr ""
+
msgid "A Git Glossary"
msgstr "Глоссарий Git"
@@ -13459,6 +13836,21 @@ msgstr "Определение свойств подмодулей"
msgid "Git namespaces"
msgstr "Пространства имён Git"
+msgid "Protocol v0 and v1 capabilities"
+msgstr ""
+
+msgid "Things common to various protocols"
+msgstr ""
+
+msgid "Git HTTP-based protocols"
+msgstr ""
+
+msgid "How packs are transferred over-the-wire"
+msgstr ""
+
+msgid "Git Wire Protocol, Version 2"
+msgstr ""
+
msgid "Helper programs to interact with remote repositories"
msgstr ""
@@ -13483,6 +13875,9 @@ msgstr "Веб интерфейс Git (веб-интерфейс для Git ре
msgid "An overview of recommended workflows with Git"
msgstr "Обзор рекомендуемых последовательностей выполняемых действий с Git"
+msgid "A tool for managing large Git repositories"
+msgstr ""
+
msgid "commit-graph file is too small"
msgstr "файл commit-graph слишком маленький"
@@ -13724,6 +14119,14 @@ msgid "no libc information available\n"
msgstr ""
#, c-format
+msgid "could not determine free disk size for '%s'"
+msgstr ""
+
+#, c-format
+msgid "could not get info for '%s'"
+msgstr ""
+
+#, c-format
msgid "[GLE %ld] health thread could not open '%ls'"
msgstr ""
@@ -13747,6 +14150,10 @@ msgstr ""
msgid "health thread wait failed [GLE %ld]"
msgstr ""
+#, c-format
+msgid "Invalid path: %s"
+msgstr ""
+
msgid "Unable to create FSEventStream."
msgstr ""
@@ -13778,6 +14185,30 @@ msgid "could not read directory changes [GLE %ld]"
msgstr ""
#, c-format
+msgid "opendir('%s') failed"
+msgstr ""
+
+#, c-format
+msgid "lstat('%s') failed"
+msgstr ""
+
+#, c-format
+msgid "strbuf_readlink('%s') failed"
+msgstr ""
+
+#, c-format
+msgid "closedir('%s') failed"
+msgstr ""
+
+#, c-format
+msgid "[GLE %ld] unable to open for read '%ls'"
+msgstr ""
+
+#, c-format
+msgid "[GLE %ld] unable to get protocol information for '%ls'"
+msgstr ""
+
+#, c-format
msgid "failed to copy SID (%ld)"
msgstr ""
@@ -14047,7 +14478,7 @@ msgstr ""
msgid "bad zlib compression level %d"
msgstr "неправильный уровень сжатия zlib %d"
-msgid "core.commentChar should only be one character"
+msgid "core.commentChar should only be one ASCII character"
msgstr ""
#, c-format
@@ -14159,6 +14590,10 @@ msgid "invalid section name: %s"
msgstr ""
#, c-format
+msgid "refusing to work with overly long line in '%s' on line %<PRIuMAX>"
+msgstr ""
+
+#, c-format
msgid "missing value for '%s'"
msgstr ""
@@ -14213,16 +14648,23 @@ msgid "unknown object format '%s' specified by server"
msgstr ""
#, c-format
-msgid "invalid ls-refs response: %s"
+msgid "error on bundle-uri response line %d: %s"
msgstr ""
-msgid "expected flush after ref listing"
+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 ""
+
+msgid "expected flush after ref listing"
+msgstr ""
+
+#, c-format
msgid "protocol '%s' is not supported"
msgstr ""
@@ -14306,175 +14748,6 @@ msgid "failed to close rev-list's stdin"
msgstr "сбой закрытия стандартного ввода у rev-list"
#, c-format
-msgid "'%s' does not exist"
-msgstr "«%s» не существует"
-
-msgid "need a working directory"
-msgstr ""
-
-msgid "could not find enlistment root"
-msgstr ""
-
-#, c-format
-msgid "could not switch to '%s'"
-msgstr ""
-
-#, c-format
-msgid "could not configure %s=%s"
-msgstr ""
-
-msgid "could not configure log.excludeDecoration"
-msgstr ""
-
-msgid "Scalar enlistments require a worktree"
-msgstr ""
-
-#, c-format
-msgid "could not open directory '%s'"
-msgstr "не удалось открыть каталог «%s»"
-
-#, c-format
-msgid "skipping '%s', which is neither file nor directory"
-msgstr ""
-
-#, c-format
-msgid "could not determine free disk size for '%s'"
-msgstr ""
-
-#, c-format
-msgid "could not get info for '%s'"
-msgstr ""
-
-#, c-format
-msgid "remote HEAD is not a branch: '%.*s'"
-msgstr ""
-
-msgid "failed to get default branch name from remote; using local default"
-msgstr ""
-
-msgid "failed to get default branch name"
-msgstr ""
-
-msgid "failed to unregister repository"
-msgstr ""
-
-msgid "failed to delete enlistment directory"
-msgstr ""
-
-msgid "branch to checkout after clone"
-msgstr ""
-
-msgid "when cloning, create full working directory"
-msgstr ""
-
-msgid "only download metadata for the branch that will be checked out"
-msgstr ""
-
-msgid "scalar clone [<options>] [--] <repo> [<dir>]"
-msgstr ""
-
-#, c-format
-msgid "cannot deduce worktree name from '%s'"
-msgstr ""
-
-#, c-format
-msgid "directory '%s' exists already"
-msgstr ""
-
-#, c-format
-msgid "failed to get default branch for '%s'"
-msgstr ""
-
-#, c-format
-msgid "could not configure remote in '%s'"
-msgstr ""
-
-#, c-format
-msgid "could not configure '%s'"
-msgstr ""
-
-msgid "partial clone failed; attempting full clone"
-msgstr ""
-
-msgid "could not configure for full clone"
-msgstr ""
-
-msgid "scalar diagnose [<enlistment>]"
-msgstr ""
-
-#, c-format
-msgid "could not create directory for '%s'"
-msgstr ""
-
-msgid "could not duplicate stdout"
-msgstr ""
-
-msgid "failed to write archive"
-msgstr ""
-
-msgid "`scalar list` does not take arguments"
-msgstr ""
-
-msgid "scalar register [<enlistment>]"
-msgstr ""
-
-msgid "reconfigure all registered enlistments"
-msgstr ""
-
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr ""
-
-msgid "--all or <enlistment>, but not both"
-msgstr ""
-
-#, c-format
-msgid "git repository gone in '%s'"
-msgstr ""
-
-msgid ""
-"scalar run <task> [<enlistment>]\n"
-"Tasks:\n"
-msgstr ""
-
-#, c-format
-msgid "no such task: '%s'"
-msgstr ""
-
-msgid "scalar unregister [<enlistment>]"
-msgstr ""
-
-msgid "scalar delete <enlistment>"
-msgstr ""
-
-msgid "refusing to delete current working directory"
-msgstr ""
-
-msgid "include Git version"
-msgstr ""
-
-msgid "include Git's build options"
-msgstr ""
-
-msgid "scalar verbose [-v | --verbose] [--build-options]"
-msgstr ""
-
-msgid "-C requires a <directory>"
-msgstr ""
-
-#, c-format
-msgid "could not change to '%s'"
-msgstr ""
-
-msgid "-c requires a <key>=<value> argument"
-msgstr ""
-
-msgid ""
-"scalar [-C <directory>] [-c <key>=<value>] <command> [<options>]\n"
-"\n"
-"Commands:\n"
-msgstr ""
-
-#, c-format
msgid "illegal crlf_action %d"
msgstr ""
@@ -14689,6 +14962,32 @@ msgstr ""
msgid "Marked %d islands, done.\n"
msgstr ""
+#, c-format
+msgid "invalid --%s value '%s'"
+msgstr ""
+
+#, c-format
+msgid "could not archive missing directory '%s'"
+msgstr ""
+
+#, c-format
+msgid "could not open directory '%s'"
+msgstr "не удалось открыть каталог «%s»"
+
+#, c-format
+msgid "skipping '%s', which is neither file nor directory"
+msgstr ""
+
+msgid "could not duplicate stdout"
+msgstr ""
+
+#, c-format
+msgid "could not add directory '%s' to archiver"
+msgstr ""
+
+msgid "failed to write archive"
+msgstr ""
+
msgid "--merge-base does not work with ranges"
msgstr ""
@@ -14951,6 +15250,9 @@ msgstr ""
msgid "do not show any source or destination prefix"
msgstr ""
+msgid "use default prefixes a/ and b/"
+msgstr ""
+
msgid "show context between diff hunks up to the specified number of lines"
msgstr ""
@@ -15238,6 +15540,14 @@ msgstr "не удалось переместить каталог git с «%s»
msgid "hint: Waiting for your editor to close the file...%c"
msgstr "подсказка: Ожидание, пока вы закроете редактор с файлом...%c"
+#, c-format
+msgid "could not write to '%s'"
+msgstr "не удалось записать в «%s»"
+
+#, c-format
+msgid "could not edit '%s'"
+msgstr ""
+
msgid "Filtering content"
msgstr "Фильтруется содержимое"
@@ -15269,6 +15579,9 @@ msgstr "git fetch-pack: ожидается ACK/NAK, а получено «%s»"
msgid "unable to write to remote"
msgstr ""
+msgid "Server supports filter"
+msgstr "Сервер поддерживает фильтрацию"
+
#, c-format
msgid "invalid shallow line: %s"
msgstr "неправильная строка частичного получения: %s"
@@ -15379,9 +15692,6 @@ msgstr ""
msgid "Server does not support shallow requests"
msgstr "Сервер не поддерживает частичные запросы"
-msgid "Server supports filter"
-msgstr "Сервер поддерживает фильтрацию"
-
msgid "unable to write request to remote"
msgstr ""
@@ -15403,14 +15713,12 @@ msgstr ""
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
-#.
#, c-format
msgid "expected packfile to be sent after '%s'"
msgstr ""
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
-#.
#, c-format
msgid "expected no other sections to be sent after no '%s'"
msgstr ""
@@ -15481,7 +15789,8 @@ msgstr ""
#, c-format
msgid ""
-"repository '%s' is incompatible with fsmonitor due to lack of Unix sockets"
+"socket directory '%s' is incompatible with fsmonitor due to lack of Unix "
+"sockets support"
msgstr ""
msgid ""
@@ -15490,8 +15799,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 ""
msgid ""
@@ -15519,15 +15827,15 @@ msgid "no namespace given for --namespace\n"
msgstr ""
#, c-format
-msgid "no prefix given for --super-prefix\n"
+msgid "-c expects a configuration string\n"
msgstr ""
#, c-format
-msgid "-c expects a configuration string\n"
+msgid "no config key given for --config-env\n"
msgstr ""
#, c-format
-msgid "no config key given for --config-env\n"
+msgid "no attribute source given for --attr-source\n"
msgstr ""
#, c-format
@@ -15626,8 +15934,11 @@ msgstr ""
msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
msgstr ""
-msgid "gpg failed to sign the data"
-msgstr "gpg не удалось подписать данные"
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
msgid "user.signingKey needs to be set for ssh signing"
msgstr ""
@@ -15706,6 +16017,12 @@ msgstr ""
msgid "Low-level Commands / Internal Helpers"
msgstr "Низкоуровневые команды / Внутренние вспомогательные"
+msgid "User-facing repository, command and file interfaces"
+msgstr ""
+
+msgid "Developer-facing file formats, protocols and other interfaces"
+msgstr ""
+
#, c-format
msgid "available git commands in '%s'"
msgstr "доступные команды git в «%s»"
@@ -15719,6 +16036,12 @@ msgstr "Стандартные команды Git используемые в р
msgid "The Git concept guides are:"
msgstr ""
+msgid "User-facing repository, command and file interfaces:"
+msgstr ""
+
+msgid "File formats, protocols and other developer interfaces:"
+msgstr ""
+
msgid "External commands"
msgstr ""
@@ -15778,8 +16101,8 @@ msgstr[3] ""
"\n"
"Самые похожие команды:"
-msgid "git version [<options>]"
-msgstr "git version [<options>]"
+msgid "git version [--build-options]"
+msgstr ""
#, c-format
msgid "%s: %s - %s"
@@ -15815,10 +16138,6 @@ msgstr ""
"ignoredHook false»."
#, c-format
-msgid "Couldn't start hook '%s'\n"
-msgstr ""
-
-#, c-format
msgid "argument to --packfile must be a valid hash (got '%s')"
msgstr ""
@@ -16002,16 +16321,14 @@ msgid "quoted CRLF detected"
msgstr ""
#, c-format
-msgid ""
-"Your local changes to the following files would be overwritten by merge:\n"
-" %s"
-msgstr ""
-
-#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "Не удалось слить подмодуль %s (состояние не забрано)"
#, c-format
+msgid "Failed to merge submodule %s (no merge base)"
+msgstr ""
+
+#, c-format
msgid "Failed to merge submodule %s (commits not present)"
msgstr "Не удалось слить подмодуль %s (нет коммитов)"
@@ -16029,27 +16346,11 @@ msgstr ""
#, c-format
msgid ""
-"Failed to merge submodule %s, but a possible merge resolution exists:\n"
-"%s\n"
+"Failed to merge submodule %s, but a possible merge resolution exists: %s"
msgstr ""
#, c-format
msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Если оно верное, то просто добавьте его в индекс, например так:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"тем самым принимая это предположение.\n"
-
-#, c-format
-msgid ""
"Failed to merge submodule %s, but multiple possible merges exist:\n"
"%s"
msgstr ""
@@ -16174,15 +16475,33 @@ msgid ""
"of %s left in tree."
msgstr ""
+#. TRANSLATORS: This is a line of advice to resolve a merge
+#. 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"
#, c-format
msgid ""
-"Note: %s not up to date and in way of checking out conflicted version; old "
-"copy renamed to %s"
+" - go to submodule (%s), and either merge commit %s\n"
+" or update to an existing commit which has merged those changes\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"Recursive merging with submodules currently only supports trivial cases.\n"
+"Please manually handle the merging of each conflicted submodule.\n"
+"This can be accomplished with the following steps:\n"
+"%s - come back to superproject and run:\n"
+"\n"
+" git add %s\n"
+"\n"
+" to record the above merge or update\n"
+" - resolve any other conflicts in the superproject\n"
+" - commit the resulting index in the superproject\n"
msgstr ""
#. TRANSLATORS: The %s arguments are: 1) tree hash of a merge
#. base, and 2-3) the trees for the two trees we're merging.
-#.
#, c-format
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr ""
@@ -16249,6 +16568,21 @@ msgid "Found a possible merge resolution for the submodule:\n"
msgstr "Найдено возможное разрешение слиятия для подмодуля:\n"
#, c-format
+msgid ""
+"If this is correct simply add it to the index for example\n"
+"by using:\n"
+"\n"
+" git update-index --cacheinfo 160000 %s \"%s\"\n"
+"\n"
+"which will accept this suggestion.\n"
+msgstr ""
+"Если оно верное, то просто добавьте его в индекс, например так:\n"
+"\n"
+" git update-index --cacheinfo 160000 %s \"%s\"\n"
+"\n"
+"тем самым принимая это предположение.\n"
+
+#, c-format
msgid "Failed to merge submodule %s (multiple merges found)"
msgstr "Не удалось слить подмодуль %s (найдено несколько слияний)"
@@ -16316,8 +16650,8 @@ msgstr "Отказ потери неотслеживаемого файла %s;
#, c-format
msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s"
-"\"->\"%s\" in \"%s\"%s"
+"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
+"\"%s\"->\"%s\" in \"%s\"%s"
msgstr ""
"КОНФЛИКТ (переименование/переименование): Переименование «%s»→«%s» в ветке "
"«%s» и переименование «%s»→«%s» в ветке «%s»%s"
@@ -16612,7 +16946,6 @@ msgstr "Отказ в перезаписи заметок в %s (за преде
#. TRANSLATORS: The first %s is the name of
#. the environment variable, the second %s is
#. its value.
-#.
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Неправильное значение переменной %s: «%s»"
@@ -16629,10 +16962,6 @@ msgstr ""
msgid "%s: ignoring alternate object stores, nesting too deep"
msgstr ""
-#, c-format
-msgid "unable to normalize object directory: %s"
-msgstr ""
-
msgid "unable to fdopen alternates lockfile"
msgstr ""
@@ -16692,6 +17021,10 @@ msgid "garbage at end of loose object '%s'"
msgstr ""
#, c-format
+msgid "unable to open loose object %s"
+msgstr ""
+
+#, c-format
msgid "unable to parse %s header"
msgstr ""
@@ -16707,7 +17040,7 @@ msgid "header for %s too long, exceeds %d bytes"
msgstr ""
#, c-format
-msgid "failed to read object %s"
+msgid "loose object %s (stored in %s) is corrupt"
msgstr ""
#, c-format
@@ -16715,10 +17048,6 @@ msgid "replacement %s not found for %s"
msgstr ""
#, c-format
-msgid "loose object %s (stored in %s) is corrupt"
-msgstr ""
-
-#, c-format
msgid "packed object %s (stored in %s) is corrupt"
msgstr ""
@@ -16730,9 +17059,6 @@ msgstr ""
msgid "unable to set permission to '%s'"
msgstr ""
-msgid "file write error"
-msgstr ""
-
msgid "error when closing loose object file"
msgstr ""
@@ -16759,13 +17085,30 @@ msgid "confused by unstable object source data for %s"
msgstr ""
#, c-format
+msgid "write stream object %ld != %<PRIuMAX>"
+msgstr ""
+
+#, c-format
+msgid "unable to stream deflate new object (%d)"
+msgstr ""
+
+#, c-format
+msgid "deflateEnd on stream object failed (%d)"
+msgstr ""
+
+#, c-format
+msgid "unable to create directory %s"
+msgstr ""
+
+#, c-format
msgid "cannot read object for %s"
msgstr ""
-msgid "corrupt commit"
+#, c-format
+msgid "object fails fsck: %s"
msgstr ""
-msgid "corrupt tag"
+msgid "refusing to create malformed object"
msgstr ""
#, c-format
@@ -16815,7 +17158,6 @@ msgstr ""
#. TRANSLATORS: This is a line of ambiguous object
#. output shown when we cannot look up or parse the
#. object in question. E.g. "deadbeef [bad object]".
-#.
#, c-format
msgid "%s [bad object]"
msgstr ""
@@ -16824,7 +17166,6 @@ msgstr ""
#. object output. E.g.:
#. *
#. "deadbeef commit 2021-01-01 - Some Commit Message"
-#.
#, c-format
msgid "%s commit %s - %s"
msgstr ""
@@ -16839,7 +17180,6 @@ msgstr ""
#. *
#. The third argument is the "tag" string
#. from object.c.
-#.
#, c-format
msgid "%s tag %s - %s"
msgstr ""
@@ -16849,21 +17189,18 @@ msgstr ""
#. the tag itself. E.g.:
#. *
#. "deadbeef [bad tag, could not parse it]"
-#.
#, c-format
msgid "%s [bad tag, could not parse it]"
msgstr ""
#. TRANSLATORS: This is a line of ambiguous <type>
#. object output. E.g. "deadbeef tree".
-#.
#, c-format
msgid "%s tree"
msgstr ""
#. TRANSLATORS: This is a line of ambiguous <type>
#. object output. E.g. "deadbeef blob".
-#.
#, c-format
msgid "%s blob"
msgstr ""
@@ -16875,7 +17212,6 @@ msgstr ""
#. TRANSLATORS: The argument is the list of ambiguous
#. objects composed in show_ambiguous_object(). See
#. its "TRANSLATORS" comments for details.
-#.
#, c-format
msgid ""
"The candidates are:\n"
@@ -16967,6 +17303,52 @@ msgstr "не удалось разобрать объект: %s"
msgid "hash mismatch %s"
msgstr "несоответствие хэш-кода %s"
+msgid "trying to write commit not in index"
+msgstr ""
+
+msgid "failed to load bitmap index (corrupted?)"
+msgstr ""
+
+msgid "corrupted bitmap index (too small)"
+msgstr ""
+
+msgid "corrupted bitmap index file (wrong header)"
+msgstr ""
+
+#, c-format
+msgid "unsupported version '%d' for bitmap index file"
+msgstr ""
+
+msgid "corrupted bitmap index file (too short to fit hash cache)"
+msgstr ""
+
+msgid "corrupted bitmap index file (too short to fit lookup table)"
+msgstr ""
+
+#, c-format
+msgid "duplicate entry in bitmap index: '%s'"
+msgstr ""
+
+#, c-format
+msgid "corrupt ewah bitmap: truncated header for entry %d"
+msgstr ""
+
+#, c-format
+msgid "corrupt ewah bitmap: commit index %u out of range"
+msgstr ""
+
+msgid "corrupted bitmap pack index"
+msgstr ""
+
+msgid "invalid XOR offset in bitmap pack index"
+msgstr ""
+
+msgid "cannot fstat bitmap file"
+msgstr ""
+
+msgid "checksum doesn't match in MIDX and bitmap"
+msgstr ""
+
msgid "multi-pack bitmap is missing required reverse index"
msgstr ""
@@ -16978,8 +17360,59 @@ msgstr ""
msgid "preferred pack (%s) is invalid"
msgstr ""
+msgid "corrupt bitmap lookup table: triplet position out of index"
+msgstr ""
+
+msgid "corrupt bitmap lookup table: xor chain exceeds entry count"
+msgstr ""
+
#, c-format
-msgid "could not find %s in pack %s at offset %<PRIuMAX>"
+msgid "corrupt bitmap lookup table: commit index %u out of range"
+msgstr ""
+
+#, c-format
+msgid "corrupt ewah bitmap: truncated header for bitmap of commit \"%s\""
+msgstr ""
+
+#, c-format
+msgid "object '%s' not found in type bitmaps"
+msgstr ""
+
+#, c-format
+msgid "object '%s' does not have a unique type"
+msgstr ""
+
+#, c-format
+msgid "object '%s': real type '%s', expected: '%s'"
+msgstr ""
+
+#, c-format
+msgid "object not in bitmap: '%s'"
+msgstr ""
+
+msgid "failed to load bitmap indexes"
+msgstr ""
+
+msgid "you must specify exactly one commit to test"
+msgstr ""
+
+#, c-format
+msgid "commit '%s' doesn't have an indexed bitmap"
+msgstr ""
+
+msgid "mismatch in bitmap results"
+msgstr ""
+
+#, c-format
+msgid "could not find '%s' in pack '%s' at offset %<PRIuMAX>"
+msgstr ""
+
+#, c-format
+msgid "unable to get disk usage of '%s'"
+msgstr ""
+
+#, c-format
+msgid "bitmap file '%s' has invalid checksum"
msgstr ""
#, c-format
@@ -17022,6 +17455,13 @@ msgstr ""
msgid "reverse-index file %s has unsupported hash id %<PRIu32>"
msgstr ""
+msgid "invalid checksum"
+msgstr ""
+
+#, c-format
+msgid "invalid rev-index position at %<PRIu64>: %<PRIu32> != %<PRIu32>"
+msgstr ""
+
msgid "cannot both write and verify reverse index"
msgstr ""
@@ -17104,6 +17544,9 @@ msgstr "имелось в виду `--%s` (с двумя дефисами)?"
msgid "alias of --%s"
msgstr ""
+msgid "need a subcommand"
+msgstr ""
+
#, c-format
msgid "unknown option `%s'"
msgstr ""
@@ -17125,7 +17568,6 @@ msgstr "использование: %s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation.
-#.
#, c-format
msgid " or: %s"
msgstr " или: %s"
@@ -17148,7 +17590,6 @@ msgstr " или: %s"
#. function. The "%s" is a line in the (hopefully already
#. translated) N_() usage string, which contained embedded
#. newlines before we split it up.
-#.
#, c-format
msgid "%*s%s"
msgstr ""
@@ -17175,6 +17616,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 "как удалять пробелы и #комментарии из сообщения коммита"
@@ -17322,6 +17766,10 @@ msgstr ""
msgid "promisor remote name cannot begin with '/': %s"
msgstr ""
+#, c-format
+msgid "could not fetch %s from promisor remote"
+msgstr ""
+
msgid "object-info: expected flush after arguments"
msgstr ""
@@ -17537,9 +17985,12 @@ msgid ""
"l, label <label> = label current HEAD with a name\n"
"t, reset <label> = reset HEAD to a label\n"
"m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]\n"
-". create a merge commit using the original merge commit's\n"
-". message (or the oneline, if no original merge commit was\n"
-". specified); use -c <commit> to reword the commit message\n"
+" create a merge commit using the original merge commit's\n"
+" message (or the oneline, if no original merge commit was\n"
+" specified); use -c <commit> to reword the commit message\n"
+"u, update-ref <ref> = track a placeholder for the <ref> to be updated\n"
+" to this position in the new commits. The <ref> is\n"
+" updated at the end of the rebase\n"
"\n"
"These lines can be re-ordered; they are executed from top to bottom.\n"
msgstr ""
@@ -17637,6 +18088,14 @@ msgid "ahead %d, behind %d"
msgstr "впереди %d, позади %d"
#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr ""
+
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr ""
+
+#, c-format
msgid "expected format: %%(color:<color>)"
msgstr "ожидаемый формат: %%(color:<color>)"
@@ -17653,22 +18112,6 @@ 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 ""
-
-#, c-format
-msgid "%%(deltabase) does not take arguments"
-msgstr ""
-
-#, c-format
-msgid "%%(body) does not take arguments"
-msgstr "параметр %%(body) не принимает аргументы"
-
-#, c-format
msgid "expected %%(trailers:key=<value>)"
msgstr ""
@@ -17685,10 +18128,6 @@ msgid "positive value expected '%s' in %%(%s)"
msgstr ""
#, c-format
-msgid "unrecognized email option: %s"
-msgstr ""
-
-#, c-format
msgid "expected format: %%(align:<width>,<position>)"
msgstr "ожидаемый формат: %%(align:<width>,<position>)"
@@ -17701,11 +18140,15 @@ msgid "unrecognized width:%s"
msgstr "неопознанная ширина:%s"
#, c-format
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "неопознанный аргумент %%(%s): %s"
+
+#, c-format
msgid "positive width expected with the %%(align) atom"
msgstr "ожидается положительная ширина с указанием частицы %%(align)"
#, c-format
-msgid "%%(rest) does not take arguments"
+msgid "expected format: %%(ahead-behind:<committish>)"
msgstr ""
#, c-format
@@ -17997,6 +18440,13 @@ msgstr ""
msgid "http transport does not support %s"
msgstr ""
+msgid "protocol error: expected '<url> <path>', missing space"
+msgstr ""
+
+#, c-format
+msgid "failed to download file at URL '%s'"
+msgstr ""
+
msgid "git-http-push failed"
msgstr ""
@@ -18063,7 +18513,6 @@ msgstr "src refspec %s соответствует более чем одному
#. TRANSLATORS: "matches '%s'%" is the <dst> part of "git push
#. <remote> <src>:<dst>" push, and "being pushed ('%s')" is
#. the <src>.
-#.
#, c-format
msgid ""
"The destination you provided is not a full refname (i.e.,\n"
@@ -18306,10 +18755,6 @@ msgid "no remembered resolution for '%s'"
msgstr ""
#, c-format
-msgid "cannot unlink '%s'"
-msgstr ""
-
-#, c-format
msgid "Updated preimage for '%s'"
msgstr ""
@@ -18332,6 +18777,21 @@ msgstr ""
msgid "failed to find tree of %s"
msgstr "не удалось найти дерево для %s"
+#, c-format
+msgid "unsupported section for hidden refs: %s"
+msgstr ""
+
+msgid "--exclude-hidden= passed more than once"
+msgstr ""
+
+#, c-format
+msgid "resolve-undo records `%s` which is missing"
+msgstr ""
+
+#, c-format
+msgid "could not get commit for ancestry-path argument %s"
+msgstr ""
+
msgid "--unpacked=<packfile> no longer supported"
msgstr ""
@@ -18352,6 +18812,175 @@ msgstr ""
msgid "cannot create async thread: %s"
msgstr ""
+#, c-format
+msgid "'%s' does not exist"
+msgstr "«%s» не существует"
+
+#, c-format
+msgid "could not switch to '%s'"
+msgstr ""
+
+msgid "need a working directory"
+msgstr ""
+
+msgid "Scalar enlistments require a worktree"
+msgstr ""
+
+#, c-format
+msgid "could not configure %s=%s"
+msgstr ""
+
+msgid "could not configure log.excludeDecoration"
+msgstr ""
+
+msgid "could not add enlistment"
+msgstr ""
+
+msgid "could not set recommended config"
+msgstr ""
+
+msgid "could not turn on maintenance"
+msgstr ""
+
+msgid "could not start the FSMonitor daemon"
+msgstr ""
+
+msgid "could not turn off maintenance"
+msgstr ""
+
+msgid "could not remove enlistment"
+msgstr ""
+
+#, c-format
+msgid "remote HEAD is not a branch: '%.*s'"
+msgstr ""
+
+msgid "failed to get default branch name from remote; using local default"
+msgstr ""
+
+msgid "failed to get default branch name"
+msgstr ""
+
+msgid "failed to unregister repository"
+msgstr ""
+
+msgid "failed to stop the FSMonitor daemon"
+msgstr ""
+
+msgid "failed to delete enlistment directory"
+msgstr ""
+
+msgid "branch to checkout after clone"
+msgstr ""
+
+msgid "when cloning, create full working directory"
+msgstr ""
+
+msgid "only download metadata for the branch that will be checked out"
+msgstr ""
+
+msgid "scalar clone [<options>] [--] <repo> [<dir>]"
+msgstr ""
+
+#, c-format
+msgid "cannot deduce worktree name from '%s'"
+msgstr ""
+
+#, c-format
+msgid "directory '%s' exists already"
+msgstr ""
+
+#, c-format
+msgid "failed to get default branch for '%s'"
+msgstr ""
+
+#, c-format
+msgid "could not configure remote in '%s'"
+msgstr ""
+
+#, c-format
+msgid "could not configure '%s'"
+msgstr ""
+
+msgid "partial clone failed; attempting full clone"
+msgstr ""
+
+msgid "could not configure for full clone"
+msgstr ""
+
+msgid "scalar diagnose [<enlistment>]"
+msgstr ""
+
+msgid "`scalar list` does not take arguments"
+msgstr ""
+
+msgid "scalar register [<enlistment>]"
+msgstr ""
+
+msgid "reconfigure all registered enlistments"
+msgstr ""
+
+msgid "scalar reconfigure [--all | <enlistment>]"
+msgstr ""
+
+msgid "--all or <enlistment>, but not both"
+msgstr ""
+
+#, c-format
+msgid "could not remove stale scalar.repo '%s'"
+msgstr ""
+
+#, c-format
+msgid "removing stale scalar.repo '%s'"
+msgstr ""
+
+#, c-format
+msgid "git repository gone in '%s'"
+msgstr ""
+
+msgid ""
+"scalar run <task> [<enlistment>]\n"
+"Tasks:\n"
+msgstr ""
+
+#, c-format
+msgid "no such task: '%s'"
+msgstr ""
+
+msgid "scalar unregister [<enlistment>]"
+msgstr ""
+
+msgid "scalar delete <enlistment>"
+msgstr ""
+
+msgid "refusing to delete current working directory"
+msgstr ""
+
+msgid "include Git version"
+msgstr ""
+
+msgid "include Git's build options"
+msgstr ""
+
+msgid "scalar verbose [-v | --verbose] [--build-options]"
+msgstr ""
+
+msgid "-C requires a <directory>"
+msgstr ""
+
+#, c-format
+msgid "could not change to '%s'"
+msgstr ""
+
+msgid "-c requires a <key>=<value> argument"
+msgstr ""
+
+msgid ""
+"scalar [-C <directory>] [-c <key>=<value>] <command> [<options>]\n"
+"\n"
+"Commands:\n"
+msgstr ""
+
msgid "unexpected flush packet while reading remote unpack status"
msgstr "неожиданный пустой пакет при чтении статуса внешней распаковки"
@@ -18442,10 +19071,6 @@ msgid "could not lock '%s'"
msgstr "не удалось заблокировать «%s»"
#, c-format
-msgid "could not write to '%s'"
-msgstr "не удалось записать в «%s»"
-
-#, c-format
msgid "could not write eol to '%s'"
msgstr "не удалось записать eol в «%s»"
@@ -18460,13 +19085,8 @@ msgstr "ваши локальные изменения будут перезап
msgid "commit your changes or stash them to proceed."
msgstr "для продолжения закоммитьте ваши изменения или спрячьте их."
-#, c-format
-msgid "%s: fast-forward"
-msgstr "%s: быстрая перемотка"
-
#. TRANSLATORS: %s will be "revert", "cherry-pick" or
#. "rebase".
-#.
#, c-format
msgid "%s: Unable to write new index file"
msgstr "%s: Не удалось записать файл индекса"
@@ -18726,6 +19346,22 @@ msgid "git %s: failed to refresh the index"
msgstr "git %s: сбой обновления индекса"
#, c-format
+msgid "'%s' is not a valid label"
+msgstr ""
+
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr ""
+
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr ""
+
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr ""
+
+#, c-format
msgid "%s does not accept arguments: '%s'"
msgstr "параметр %s не принимает аргументы: «%s»"
@@ -18795,11 +19431,8 @@ msgstr ""
msgid "could not create sequencer directory '%s'"
msgstr "не удалось создать каталог для указателя следования коммитов «%s»"
-msgid "could not lock HEAD"
-msgstr "не удалось заблокировать HEAD"
-
msgid "no cherry-pick or revert in progress"
-msgstr "копирование или обращение изменений коммита уже выполняются"
+msgstr "копирование или обращение изменений коммита сейчас не выполняются"
msgid "cannot resolve HEAD"
msgstr "не удалось определить HEAD"
@@ -18885,39 +19518,33 @@ msgstr ""
" git rebase --continue\n"
"\n"
-msgid "and made changes to the index and/or the working tree\n"
-msgstr "и были сделаны изменения в индексе и/или в рабочем каталоге\n"
+msgid "and made changes to the index and/or the working tree.\n"
+msgstr ""
#, c-format
msgid ""
"execution succeeded: %s\n"
-"but left changes to the index and/or the working tree\n"
+"but left changes to the index and/or the working tree.\n"
"Commit or stash your changes, and then run\n"
"\n"
" git rebase --continue\n"
"\n"
msgstr ""
-"успешное выполнение: %s\n"
-"но остались изменения в индексе и/или в рабочем каталоге\n"
-"Сделайте коммит или спрячьте ваши изменения, а затем выполните\n"
-"\n"
-" git rebase --continue\n"
-"\n"
#, c-format
msgid "illegal label name: '%.*s'"
msgstr ""
+#, c-format
+msgid "could not resolve '%s'"
+msgstr "не удалось распознать «%s»"
+
msgid "writing fake root commit"
msgstr "запись поддельного корневого коммита"
msgid "writing squash-onto"
msgstr "запить уплотнить-над"
-#, c-format
-msgid "could not resolve '%s'"
-msgstr "не удалось распознать «%s»"
-
msgid "cannot merge without a current revision"
msgstr "нельзя слить без текущей редакции"
@@ -18943,6 +19570,23 @@ msgstr "не удалось даже попытаться слить «%.*s»"
msgid "merge: Unable to write new index file"
msgstr "слияние: Не удалось записать файл индекса"
+#, c-format
+msgid ""
+"another 'rebase' process appears to be running; '%s.lock' already exists"
+msgstr ""
+
+#, c-format
+msgid ""
+"Updated the following refs with %s:\n"
+"%s"
+msgstr ""
+
+#, c-format
+msgid ""
+"Failed to update the following refs with %s:\n"
+"%s"
+msgstr ""
+
msgid "Cannot autostash"
msgstr "Не удалось автоматически спрятать изменения"
@@ -19100,6 +19744,10 @@ msgid "the script was already rearranged."
msgstr "сценарий уже был перестроен."
#, c-format
+msgid "update-refs file at '%s' is invalid"
+msgstr ""
+
+#, c-format
msgid "'%s' is outside repository at '%s'"
msgstr ""
@@ -19225,13 +19873,17 @@ msgstr ""
#, c-format
msgid ""
-"unsafe repository ('%s' is owned by someone else)\n"
-"To add an exception for this directory, call:\n"
+"detected dubious ownership in repository at '%s'\n"
+"%sTo add an exception for this directory, call:\n"
"\n"
"\tgit config --global --add safe.directory %s"
msgstr ""
#, c-format
+msgid "cannot use bare repository '%s' (safe.bareRepository is '%s')"
+msgstr ""
+
+#, c-format
msgid ""
"problem with core.sharedRepository filemode value (0%.3o).\n"
"The owner of files must always have read and write permissions."
@@ -19299,15 +19951,11 @@ msgstr[2] "%u байтов/с"
msgstr[3] "%u байта/с"
#, c-format
-msgid "could not edit '%s'"
-msgstr ""
-
-#, c-format
msgid "ignoring suspicious submodule name: %s"
msgstr "игнорирую подозрительный подмодуль с именем: %s"
msgid "negative values not allowed for submodule.fetchJobs"
-msgstr "нельзя использовать отприцательные значения для submodule.fetchJobs"
+msgstr "нельзя использовать отрицательные значения для submodule.fetchJobs"
#, c-format
msgid "ignoring '%s' which may be interpreted as a command-line option: %s"
@@ -19472,6 +20120,25 @@ msgstr "ls-tree вернул неожиданный код %d"
msgid "failed to lstat '%s'"
msgstr ""
+msgid "no remote configured to get bundle URIs from"
+msgstr ""
+
+#, c-format
+msgid "remote '%s' has no configured URL"
+msgstr ""
+
+msgid "could not get the bundle-uri list"
+msgstr ""
+
+msgid "test-tool cache-tree <options> (control|prime|update)"
+msgstr ""
+
+msgid "clear the cache tree before each iteration"
+msgstr ""
+
+msgid "number of entries in the cache tree to invalidate (default 0)"
+msgstr ""
+
msgid "unhandled options"
msgstr ""
@@ -19806,6 +20473,12 @@ msgstr "Прерываю."
msgid "failed to push all needed submodules"
msgstr ""
+msgid "bundle-uri operation not supported by protocol"
+msgstr ""
+
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr ""
+
msgid "too-short tree object"
msgstr "слишком короткий объект дерева"
@@ -20077,6 +20750,18 @@ msgstr "неправильный номер порта"
msgid "invalid '..' path segment"
msgstr "неправильная часть пути «..»"
+msgid "usage: "
+msgstr ""
+
+msgid "fatal: "
+msgstr ""
+
+msgid "error: "
+msgstr ""
+
+msgid "warning: "
+msgstr ""
+
msgid "Fetching objects"
msgstr ""
@@ -20530,14 +21215,16 @@ 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 ""
+
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr ""
+
+msgid "See 'git help status' for information on how to improve this."
msgstr ""
-"%.2f сек занял вывод списка неотслеживаемых файлов.\n"
-"«status -uno» возможно ускорит это, но будьте внимательны\n"
-"и не забудьте добавить новые файлы вручную\n"
-"(смотрите «git help status» для подробностей)."
#, c-format
msgid "Untracked files not listed%s"
@@ -20687,296 +21374,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
-#, 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 путь\n"
-msgstr[1] "тронуты %d пути\n"
-msgstr[2] "тронуты %d путей\n"
-msgstr[3] "тронуты %d пути\n"
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for staging."
-msgstr ""
-"Если патч применяется без ошибок, то изменённый блок будет сразу помечен для "
-"индексирования."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for stashing."
-msgstr ""
-"Если патч применяется без ошибок, то изменённый блок будет сразу помечен для "
-"прятанья."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for unstaging."
-msgstr ""
-"Если патч применяется без ошибок, то изменённый блок будет сразу помечен для "
-"убирания из индекса."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for applying."
-msgstr ""
-"Если патч применяется без ошибок, то изменённый блок будет сразу помечен для "
-"применения."
-
-msgid ""
-"If the patch applies cleanly, the edited hunk will immediately be\n"
-"marked for discarding."
-msgstr ""
-"Если патч применяется без ошибок, то изменённый блок будет сразу помечен для "
-"отмены изменений."
-
-#, 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"
-
-#, perl-format
-msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
-msgstr ""
-
-#, perl-format
-msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
-msgstr ""
-
-#, perl-format
-msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
-msgstr ""
-
-#, perl-format
-msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
-msgstr "Принять этот блок в рабочее дерево [y,n,q,a,d%s,?]? "
-
-msgid "No other hunks to goto\n"
-msgstr ""
-
-#, 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"
-msgstr[2] "Простите, но только %d блоков изменений доступно.\n"
-msgstr[3] "Простите, но только %d блока изменений доступно.\n"
-
-msgid "No other hunks to search\n"
-msgstr ""
-
-#, 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 ""
-
-#, perl-format
-msgid "Split into %d hunk.\n"
-msgid_plural "Split into %d hunks.\n"
-msgstr[0] "Разбито на %d блок изменений.\n"
-msgstr[1] "Разбито на %d блока изменений.\n"
-msgstr[2] "Разбито на %d блоков изменений.\n"
-msgstr[3] "Разбито на %d блока изменений.\n"
-
-msgid "Sorry, cannot edit this hunk\n"
-msgstr ""
-
-#. 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"
-"revert - вернуть проиндексированный набор изменений к HEAD-версии\n"
-"patch - выбрать и выборочно обновить блоки\n"
-"diff - просмотреть различия между HEAD и индексом\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"
@@ -21255,13 +21652,17 @@ msgid "(%s) Could not execute '%s'"
msgstr "(%s) Не удалось выполнить «%s»"
#, perl-format
-msgid "(%s) Adding %s: %s from: '%s'\n"
-msgstr "(%s) Добавление %s: %s из: «%s»\n"
+msgid "(%s) Malformed output from '%s'"
+msgstr ""
#, perl-format
msgid "(%s) failed to close pipe to '%s'"
msgstr "(%s) не удалось закрыть поток к «%s»"
+#, perl-format
+msgid "(%s) Adding %s: %s from: '%s'\n"
+msgstr "(%s) Добавление %s: %s из: «%s»\n"
+
msgid "cannot send message as 7bit"
msgstr "не удалось отправить сообщение в 7 битной кодировке"
diff --git a/po/sv.po b/po/sv.po
index 284da90618..a14d0d6f38 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -5,12 +5,12 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: git 2.41.0\n"
+"Project-Id-Version: git 2.42.0\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2023-05-31 13:14+0100\n"
-"PO-Revision-Date: 2023-05-31 13:15+0100\n"
+"POT-Creation-Date: 2023-08-16 07:40+0100\n"
+"PO-Revision-Date: 2023-08-16 07:42+0100\n"
"Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
-"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language-Team: Svenska <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -619,13 +619,11 @@ msgstr "%stips: %.*s%s\n"
msgid "Cherry-picking is not possible because you have unmerged files."
msgstr ""
-"Du kan inte utföra en cherry-pick eftersom du har filer som inte slagits "
+"Du kan inte utföra en \"cherry-pick\" eftersom du har filer som inte slagits "
"samman."
msgid "Committing is not possible because you have unmerged files."
-msgstr ""
-"Du kan inte utföra en incheckning eftersom du har filer som inte slagits "
-"samman."
+msgstr "Du kan inte checka in eftersom du har filer som inte slagits samman."
msgid "Merging is not possible because you have unmerged files."
msgstr ""
@@ -637,14 +635,10 @@ msgstr ""
"Du kan inte utföra en \"pull\" eftersom du har filer som inte slagits samman."
msgid "Reverting is not possible because you have unmerged files."
-msgstr ""
-"Du kan inte utföra en \"revert\" eftersom du har filer som inte slagits "
-"samman."
+msgstr "Du kan inte återställa eftersom du har filer som inte slagits samman."
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr ""
-"Du kan inte utföra en \"%s\" eftersom du har filer som inte slagits samman."
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr "Du kan inte ombasera eftersom du har filer som inte slagits samman."
msgid ""
"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
@@ -790,6 +784,12 @@ msgstr "flaggorna \"%s\" och \"%s\" kan inte användas samtidigt"
msgid "'%s' outside a repository"
msgstr "\"%s\" utanför arkiv"
+msgid "failed to read patch"
+msgstr "misslyckades läsa patchen"
+
+msgid "patch too large"
+msgstr "patchen är för stor"
+
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "Kan inte förbereda reguljärt uttryck för tidsstämpeln %s"
@@ -1689,9 +1689,10 @@ msgid "a branch named '%s' already exists"
msgstr "det finns redan en gren som heter \"%s\""
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
msgstr ""
-"kan inte tvinga uppdatering av grenen \"%s\" som är utcheckad på \"%s\""
+"kan inte tvinga uppdatering av grenen \"%s\" som används av arbetskatalogen "
+"på \"%s\""
#, c-format
msgid "cannot set up tracking information; starting point '%s' is not a branch"
@@ -1760,17 +1761,6 @@ msgstr "git add [<flaggor>] [--] <sökväg>..."
msgid "cannot chmod %cx '%s'"
msgstr "kan inte utföra chmod %cx \"%s\""
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "diff-status %c förväntades inte"
-
-msgid "updating files failed"
-msgstr "misslyckades uppdatera filer"
-
-#, c-format
-msgid "remove '%s'\n"
-msgstr "ta bort \"%s\"\n"
-
msgid "Unstaged changes after refreshing the index:"
msgstr "Oköade ändringar efter att ha uppdaterat indexet:"
@@ -2195,9 +2185,6 @@ msgstr "sänd flaggan -m till git-mailinfo"
msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "sänd flaggan --keep-cr till git-mailsplit för mbox-formatet"
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr "sänd inte flaggan --keep-cr till git-mailsplit oberoende av am.keepcr"
-
msgid "strip everything before a scissors line"
msgstr "ta bort allting före en saxlinje"
@@ -3235,12 +3222,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3286,6 +3273,9 @@ msgstr "som --batch, men mata inte ut <innehåll>"
msgid "stdin is NUL-terminated"
msgstr "standard in är NUL-terminerad"
+msgid "stdin and stdout is NUL-terminated"
+msgstr "standard in och standard ut är NUL-terminerade"
+
msgid "read commands from stdin"
msgstr "läs kommandon från standard in"
@@ -4145,12 +4135,6 @@ msgstr "serverspecifik"
msgid "option to transmit"
msgstr "flagga att sända"
-msgid "use IPv4 addresses only"
-msgstr "använd endast IPv4-adresser"
-
-msgid "use IPv6 addresses only"
-msgstr "använd endast IPv6-adresser"
-
msgid "apply partial clone filters to submodules"
msgstr "tillämpa delvisa klonfilter på undermoduler"
@@ -4587,6 +4571,9 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+msgid "updating files failed"
+msgstr "misslyckades uppdatera filer"
+
msgid "failed to unpack HEAD tree object"
msgstr "misslyckades packa upp HEAD:s trädobjekt"
@@ -4646,8 +4633,8 @@ msgstr ""
"i det befintliga incheckningsmeddelandet"
#, c-format
-msgid "could not lookup commit %s"
-msgstr "kunde inte slå upp incheckningen %s"
+msgid "could not lookup commit '%s'"
+msgstr "kunde inte slå upp incheckningen \"%s\""
#, c-format
msgid "(reading log message from standard input)\n"
@@ -7243,77 +7230,6 @@ msgstr "--verify angavs utan paketfilnamn"
msgid "fsck error in pack objects"
msgstr "fsck-fel i packat objekt"
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "kan inte ta status på mallen \"%s\""
-
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "kan inte öppna katalogen (opendir) \"%s\""
-
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "kan inte läsa länk (readlink) \"%s\""
-
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "kan inte skapa symbolisk länk \"%s\" \"%s\""
-
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "kan inte kopiera \"%s\" till \"%s\""
-
-#, c-format
-msgid "ignoring template %s"
-msgstr "ignorerar mallen %s"
-
-#, c-format
-msgid "templates not found in %s"
-msgstr "mallarna hittades inte i %s"
-
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "kopierade inte mallar från \"%s\": %s"
-
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "ogiltigt namn på första gren: \"%s\""
-
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "kan inte hantera filtyp %d"
-
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "kan inte flytta %s till %s"
-
-msgid "attempt to reinitialize repository with different hash"
-msgstr "försöker initiera arkivet på nytt med annan hash"
-
-#, c-format
-msgid "%s already exists"
-msgstr "%s finns redan"
-
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "re-init: ignorerade --initial-branch=%s"
-
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "Ominitierade befintligt delat Git-arkiv i %s%s\n"
-
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "Ominitierade befintligt Git-arkiv i %s%s\n"
-
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "Initierade tomt delat Git-arkiv i %s%s\n"
-
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "Initierade tomt Git-arkiv i %s%s\n"
-
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -7741,6 +7657,10 @@ msgid ""
msgstr "Kunde inte hitta en spårad fjärrgren, ange <uppström> manuellt.\n"
#, c-format
+msgid "could not get object info about '%s'"
+msgstr "kunde inte hämta objektinfo om \"%s\""
+
+#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
msgstr "felaktigt ls-files-format: elementet \"%s\" börjar inte med \"(\""
@@ -7883,10 +7803,6 @@ msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
msgstr "git ls-tree [<flaggor>] <träd-igt> [<sökväg>...]"
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "kunde inte hämta objektinfo om \"%s\""
-
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "felaktigt ls-tree-format: elementet \"%s\" börjar inte med \"(\""
@@ -8612,22 +8528,26 @@ msgid "git notes [--ref <notes-ref>] [list [<object>]]"
msgstr "git notes [--ref <anteckningsref>] [list [<objekt>]]"
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <anteckningsref>] add [-f] [--allow-empty] [-m <medd> | -F "
-"<fil> | (-c | -C) <objekt>] [<objekt>]"
+"git notes [--ref <anteckningsref>] add [-f] [--allow-empty] [--"
+"[no-]separator|--separator=<styckebrytning>] [--[no-]stripspace] [-m <medd> "
+"| -F <fil> | (-c | -C) <objekt>] [<objekt>]"
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
msgstr ""
"git notes [--ref <anteckningsref>] copy [-f] <från-objekt> <till-objekt>"
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <anteckningsref>] append [--allow-empty] [-m <medd> | -F "
-"<fil> | (-c | -C) <objekt>] [<objekt>]"
+"git notes [--ref <anteckningsref>] append [--allow-empty] [--"
+"[no-]separator|--separator=<styckebrytning>] [--[no-]stripspace] [-m <medd> "
+"| -F <fil> | (-c | -C) <objekt>] [<objekt>]"
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
msgstr "git notes [--ref <anteckningsref>] edit [--allow-empty] [<objekt>]"
@@ -8759,6 +8679,15 @@ msgstr "tillåt lagra tom anteckning"
msgid "replace existing notes"
msgstr "ersätt befintliga anteckningar"
+msgid "<paragraph-break>"
+msgstr "<styckebrytning>"
+
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "sätt in <styckebrytning> mellan stycken"
+
+msgid "remove unnecessary whitespace"
+msgstr "ta bort onödiga blanksteg"
+
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -9306,8 +9235,12 @@ msgstr ""
msgid "refusing to run without --i-still-use-this"
msgstr "vägrar köra utan --i-still-use-this"
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <mönster>] [--exclude "
+"<mönster>]"
msgid "pack everything"
msgstr "packa allt"
@@ -9315,6 +9248,12 @@ msgstr "packa allt"
msgid "prune loose refs (default)"
msgstr "ta bort lösa referenser (standard)"
+msgid "references to include"
+msgstr "referenser att ta med"
+
+msgid "references to exclude"
+msgstr "referenser att utesluta"
+
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -9372,6 +9311,12 @@ msgstr "tvinga överskrivning av lokal gren"
msgid "number of submodules pulled in parallel"
msgstr "antal undermoduler som hämtas parallellt"
+msgid "use IPv4 addresses only"
+msgstr "använd endast IPv4-adresser"
+
+msgid "use IPv6 addresses only"
+msgstr "använd endast IPv6-adresser"
+
msgid ""
"There is no candidate for rebasing against among the refs that you just "
"fetched."
@@ -9632,37 +9577,38 @@ msgstr ""
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Uppdateringar avvisades då änden på din befintliga gren är bakom\n"
-"dess fjärrmotsvarighet. Integrera fjärrändringarna (t.ex\n"
-"\"git pull ....\") innan du sänder igen.\n"
+"dess fjärrmotsvarighet. Om du vill integrera fjärrändringarna,\n"
+"använd \"git pull\" innan du sänder igen.\t\n"
"Se avsnittet \"Note about fast-forward\" i \"git push --help\" för detaljer."
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Uppdateringar avvisades då änden på en gren som sänds in är bakom dess\n"
-"fjärrmotsvarighet. Checka ut grenen och integrera fjärrändringarna (t.ex.\n"
-"\"git pull ...\") innan du sänder igen.\n"
+"fjärrmotsvarighet. Om du vill integrera fjärrändringarna, använd \"git pull"
+"\"\n"
+"innan du sänder igen.\n"
"Se avsnittet \"Note about fast-forward\" i \"git push --help\" för detaljer."
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Uppdateringar avvisades då fjärren innehåller ändringar som du inte\n"
"har lokalt. Det beror oftast på att ett annat arkiv har sänt in samma\n"
-"referenser. Det kan vara en idé att först integrera fjärrändringarna\n"
-"(t.ex. \"git pull ...\") innan du sänder igen.\n"
+"referenser. Om du vill integrera fjärrändringarna, använd \"git pull\"\n"
+"innan du sänder igen.\n"
"Se avsnittet \"Note about fast-forwards\" i \"git push --help\" för detaljer."
msgid "Updates were rejected because the tag already exists in the remote."
@@ -9679,15 +9625,15 @@ msgstr ""
"\"--force\".\n"
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Uppdateringar avvisades då änden på den fjärrspårande grenen\n"
-"har uppdaterats sedan senaste utcheckning. Integrera\n"
-"fjärrändringarna lokalt (t.ex \"git pull ....\") innan du\n"
-"tvingar en uppdatering.\n"
+"Uppdateringar avvisades då änden på din befintliga gren är bakom\n"
+"dess fjärrmotsvarighet. Om du vill integrera fjärrändringarna,\n"
+"använd \"git pull\" innan du sänder igen.\n"
+"Se avsnittet \"Note about fast-forward\" i \"git push --help\" för detaljer."
#, c-format
msgid "Pushing to %s\n"
@@ -10541,11 +10487,12 @@ msgstr "okänt argument till mirror: %s"
msgid "fetch the remote branches"
msgstr "hämta fjärrgrenarna"
-msgid "import all tags and associated objects when fetching"
-msgstr "importera alla taggar och associerade objekt vid hämtning"
-
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "eller hämta inte några taggar alls (--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"importera alla taggar och associerade objekt vid hämtning\n"
+"eller hämta inte några taggar alls (--no-tags)"
msgid "branch(es) to track"
msgstr "gren(ar) att spåra"
@@ -12468,6 +12415,10 @@ msgid "Skipping submodule '%s'"
msgstr "Hoppar över undermodulen \"%s\""
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "kan inte klona undermodulen \"%s\" utan en URL"
+
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "Misslyckades klona \"%s\". Nytt försök planlagt"
@@ -13203,10 +13154,11 @@ msgstr "visa innehåll för tag"
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <sträng>]]\n"
-" [-b <ny-gren>] <sökväg> [<incheckning-igt>]"
+" [--orphan] [(-b | -B) <ny-gren>] <sökväg> [<incheckning-"
+"igt>]"
msgid "git worktree list [-v | --porcelain [-z]]"
msgstr "git worktree list [-v | --porcelain [-z]]"
@@ -13229,6 +13181,37 @@ msgstr "git worktree repair [<sökväg>...]"
msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <arbetskatalog>"
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Ingen möjlig källgren, använder \"--orphan\""
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Om meningen var att skapa en arbetskatalog från en ny föräldrals\n"
+"gren (gren utan incheckningar) för det här arkivet kan du göra\n"
+"det med flaggan --orphan:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Om meningen var att skapa en arbetskatalog från en ny föräldrals\n"
+"gren (gren utan incheckningar) för det här arkivet kan du göra\n"
+"det med flaggan --orphan:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
#, c-format
msgid "Removing %s/%s: %s"
msgstr "Tar bort %s/%s: %s"
@@ -13300,9 +13283,35 @@ msgid "Preparing worktree (checking out '%s')"
msgstr "Förbereder arbetskatalog (checkar ut \"%s\")"
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "onåbar: felaktig referens: %s"
+
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "Förbereder arbetskatalog (frånkopplat HEAD %s)"
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD pekar på en ogiltig (eller övergiven) referens.\n"
+"HEAD-sökväg: \"%s\"\n"
+"HEAD-innehåll: \"%s\""
+
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"Ingen lokal eller fjärr-referens finns trots att åtminstone en fjärr\n"
+"finns, avslutar; använd \"add -f\" för att överstyra eller hämta från en "
+"fjärr först"
+
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "\"%s\" och \"%s\" kan inte användas samtidigt"
+
msgid "checkout <branch> even if already checked out in other worktree"
msgstr ""
"checka ut <gren> även om den redan är utcheckad i en annan arbetskatalog"
@@ -13313,6 +13322,9 @@ msgstr "skapa en ny gren"
msgid "create or reset a branch"
msgstr "skapa eller återställ en gren"
+msgid "create unborn/orphaned branch"
+msgstr "skapa en ofödd/övergiven gren"
+
msgid "populate the new working tree"
msgstr "befolka den nya arbetskatalogen"
@@ -13332,6 +13344,13 @@ msgstr "försök träffa namn på ny gren mot en fjärrspårande gren"
msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "flaggorna \"%s\", \"%s\" och \"%s\" kan inte användas samtidigt"
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "flaggorna \"%s\" och \"%s\" kan inte användas samtidigt"
+
+msgid "<commit-ish>"
+msgstr "<incheckning-igt>"
+
msgid "added with --lock"
msgstr "lagt till med --lock"
@@ -13560,6 +13579,14 @@ msgid_plural "The bundle requires these %<PRIuMAX> refs:"
msgstr[0] "Bunten kräver denna referens:"
msgstr[1] "Bunten kräver dessa %<PRIuMAX> referenser:"
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "Bunten använder denna hashningsalgoritm: %s"
+
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Bunten använder detta filter. %s"
+
msgid "unable to dup bundle descriptor"
msgstr "kan inte duplicera bunthandtag"
@@ -13785,8 +13812,8 @@ msgstr "Visa rader som motsvarar mönster"
msgid "A portable graphical interface to Git"
msgstr "Ett portabelt grafiskt gränssnitt för Git"
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr "Beräkna objekt-id och möjligen skapa en blob från en fil"
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "Beräkna objekt-ID och möjligen skapa ett objekt från en fil"
msgid "Display help information about Git"
msgstr "Visa hjälpinformation om Git"
@@ -14193,6 +14220,10 @@ msgid "commit-graph chain does not match"
msgstr "incheckningsgrafens kedja stämmer inte"
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "antalet incheckningar i basgrafen för högt: %<PRIuMAX>"
+
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr "ogiltig incheckingsgrafkedja: rad \"%s\" är inte ett hash-värde"
@@ -14275,6 +14306,14 @@ msgstr "kunde inte byta namn på bas-incheckingsgraffilen"
msgid "failed to rename temporary commit-graph file"
msgstr "kunde inte byta namn på temporär incheckningsgraffil"
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "kan inte slå ihop grafer med %<PRIuMAX>, %<PRIuMAX> incheckningar"
+
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "kan inte slå ihop grafen %s, med för många incheckningar: %<PRIuMAX>"
+
msgid "Scanning merged commits"
msgstr "Söker sammanslagna incheckningar"
@@ -14306,9 +14345,6 @@ msgstr ""
msgid "failed to parse commit %s from commit-graph"
msgstr "kunde inte tolka incheckning %s från incheckningsgraf"
-msgid "Verifying commits in commit graph"
-msgstr "Bekräftar incheckningar i incheckningsgrafen"
-
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr ""
@@ -14357,6 +14393,9 @@ msgstr ""
"incheckningsdatumet för incheckningen %s i incheckningsgrafen är %<PRIuMAX> !"
"= %<PRIuMAX>"
+msgid "Verifying commits in commit graph"
+msgstr "Bekräftar incheckningar i incheckningsgrafen"
+
#, c-format
msgid "%s %s is not a commit!"
msgstr "%s %s är inte en incheckning!"
@@ -15301,6 +15340,12 @@ msgstr "ingen sammanslagningsbas hittades"
msgid "multiple merge bases found"
msgstr "flera sammanslagningsbaser hittades"
+msgid "cannot compare stdin to a directory"
+msgstr "kan inte jämföra standard in med en katalog"
+
+msgid "cannot compare a named pipe to a directory"
+msgstr "kan inte jämföra ett namngivet rör med en katalog"
+
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<flaggor>] <sökväg> <sökväg>"
@@ -15358,6 +15403,13 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "extern diff dog, stannar vid %s"
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow kräver exakt en sökvägsangivelse"
+
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "sökvägs-magi stöds inte av --follow: %s"
+
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
msgstr ""
@@ -15376,9 +15428,6 @@ msgstr ""
"flaggorna \"%s\" och \"%s\" kan inte användas samtidigt, använd \"%s\" med "
"\"%s\" och \"%s\""
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow kräver exakt en sökvägsangivelse"
-
#, c-format
msgid "invalid --stat value: %s"
msgstr "ogiltigt värde för --stat: %s"
@@ -18227,6 +18276,13 @@ msgid "could not parse log for '%s'"
msgstr "kunde inte tolka loggen för \"%s\""
#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "ogiltig extra överbliven ände: \"%s\""
+
+msgid "unable to enumerate additional recent objects"
+msgstr "kan inte räkna ytterligare nyliga objekt"
+
+#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
msgstr "lägger inte till filalias \"%s\" (\"%s\" finns redan i indexet)"
@@ -18377,6 +18433,14 @@ msgstr "kan inte rätta behörighetsbitar på \"%s\""
msgid "%s: cannot drop to stage #0"
msgstr "%s: kan inte återgå till kö 0"
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "diff-status %c förväntades inte"
+
+#, c-format
+msgid "remove '%s'\n"
+msgstr "ta bort \"%s\"\n"
+
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
"continue'.\n"
@@ -18581,6 +18645,22 @@ msgid "positive value expected contents:lines=%s"
msgstr "positivt värde förväntat contents:lines=%s"
#, c-format
+msgid "argument expected for %s"
+msgstr "argument förväntades för %s"
+
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "positivt värde förväntat %s=%s"
+
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "kan inte helt tolka %s=%s"
+
+#, c-format
+msgid "value expected %s="
+msgstr "vädre förväntades %s="
+
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "positivt värde förväntat \"%s\" i %%(%s)"
@@ -18654,6 +18734,9 @@ msgstr "kommandot förkastar atom %%(%.*s)"
msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s kan inte användas med --python, --shell, --tcl"
+msgid "failed to run 'describe'"
+msgstr "misslyckades att köra \"describe\""
+
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(ingen gren, ombaserar %s)"
@@ -18715,6 +18798,9 @@ msgstr "nyckel"
msgid "field name to sort on"
msgstr "fältnamn att sortera på"
+msgid "exclude refs which match pattern"
+msgstr "uteslut referenser som motsvarar mönster"
+
#, c-format
msgid "not a reflog: %s"
msgstr "inte en referenslogg: %s"
@@ -19154,8 +19240,10 @@ msgstr[1] ""
"Din gren och \"%s\" har divergerat,\n"
"och har %d respektive %d olika incheckningar.\n"
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (använd \"git pull\" för att slå ihop fjärrgrenen med din egen)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr ""
+" (använd \"git pull\" om du vill integrera fjärrgrenen med din egen)\n"
#, c-format
msgid "cannot parse expected object name '%s'"
@@ -19266,6 +19354,10 @@ msgstr "kunde inte hämta incheckning för \"ancestry-path\"-argumentet %s"
msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<paketfil> stöds inte längre"
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "ogiltig flagga \"%s\" i --stdin-läge"
+
msgid "your current branch appears to be broken"
msgstr "din nuvarande gren verkar vara trasig"
@@ -20412,6 +20504,77 @@ msgid "setsid failed"
msgstr "\"setsid\" misslyckades"
#, c-format
+msgid "cannot stat template '%s'"
+msgstr "kan inte ta status på mallen \"%s\""
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "kan inte öppna katalogen (opendir) \"%s\""
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "kan inte läsa länk (readlink) \"%s\""
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "kan inte skapa symbolisk länk \"%s\" \"%s\""
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "kan inte kopiera \"%s\" till \"%s\""
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "ignorerar mallen %s"
+
+#, c-format
+msgid "templates not found in %s"
+msgstr "mallarna hittades inte i %s"
+
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "kopierade inte mallar från \"%s\": %s"
+
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "ogiltigt namn på första gren: \"%s\""
+
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "kan inte hantera filtyp %d"
+
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "kan inte flytta %s till %s"
+
+msgid "attempt to reinitialize repository with different hash"
+msgstr "försöker initiera arkivet på nytt med annan hash"
+
+#, c-format
+msgid "%s already exists"
+msgstr "%s finns redan"
+
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-init: ignorerade --initial-branch=%s"
+
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "Ominitierade befintligt delat Git-arkiv i %s%s\n"
+
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "Ominitierade befintligt Git-arkiv i %s%s\n"
+
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "Initierade tomt delat Git-arkiv i %s%s\n"
+
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "Initierade tomt Git-arkiv i %s%s\n"
+
+#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
msgstr "indexposten är en katalog, men inte gles (%08x)"
diff --git a/po/tr.po b/po/tr.po
index d788dfe93e..bc3acbcc84 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -39,6 +39,8 @@
# mark | im(lemek) #
# merge | birleştirme(k) #
# octopus | ahtapot #
+# orphan | yetim #
+# orphaned | yetim bırakılmış #
# overlay | yerpaylaşım #
# pack | paket #
# parent | üst öge #
@@ -92,8 +94,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: 2023-05-20 12:55+0300\n"
-"PO-Revision-Date: 2023-05-20 14:00+0300\n"
+"POT-Creation-Date: 2023-08-16 14:34+0300\n"
+"PO-Revision-Date: 2023-08-16 15:00+0300\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: Turkish (https://github.com/bitigchi/git-po/)\n"
"Language: tr\n"
@@ -718,9 +720,10 @@ msgstr "Çekme yapılamaz; birleştirmesi tamamlanmamış dosyalarınız var."
msgid "Reverting is not possible because you have unmerged files."
msgstr "Geriye al yapılamaz; birleştirmesi tamamlanmamış dosyalarınız var."
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "%s yapılamıyor; birleştirmesi tamamlanmamış dosyalarınız var."
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr ""
+"Yeniden temellendirme yapılamaz; birleştirmesi tamamlanmamış dosyalarınız "
+"var."
msgid ""
"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
@@ -866,6 +869,12 @@ msgstr "'%s' ve '%s' seçenekleri birlikte kullanılamaz"
msgid "'%s' outside a repository"
msgstr "'%s' bir depo dışında"
+msgid "failed to read patch"
+msgstr "yama okunamadı"
+
+msgid "patch too large"
+msgstr "yama pek büyük"
+
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "Zaman damgası düzenli ifadesi %s hazırlanamıyor"
@@ -1760,8 +1769,10 @@ msgid "a branch named '%s' already exists"
msgstr "'%s' adında bir dal halihazırda var"
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
-msgstr "'%s' dalı zorla güncellenemiyor, '%s' konumunda çıkış yapılmış"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr ""
+"şuradaki çalışma ağacı tarafından kullanılan '%s' dalı zorla "
+"güncellenemiyor: '%s'"
#, c-format
msgid "cannot set up tracking information; starting point '%s' is not a branch"
@@ -1829,17 +1840,6 @@ msgstr "git add [<seçenekler>] [--] <yol-blrtç>..."
msgid "cannot chmod %cx '%s'"
msgstr "%cx '%s' chmod yapılamıyor"
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "beklenmedik diff durumu %c"
-
-msgid "updating files failed"
-msgstr "dosyaları güncelleme başarısız"
-
-#, c-format
-msgid "remove '%s'\n"
-msgstr "kaldır: '%s'\n"
-
msgid "Unstaged changes after refreshing the index:"
msgstr "İndeksi yeniledikten sonra hazırlanmamış değişiklikler:"
@@ -2270,10 +2270,6 @@ msgstr "'git-mailinfo'ya -m bayrağını geçir"
msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "'git-mailsplit'e mbox biçimi için --keep-cr bayrağını geçir"
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr ""
-"'git-mailsplit'e 'am.keepcr'dan bağımsız olarak --keep-cr bayrağını geçirme"
-
msgid "strip everything before a scissors line"
msgstr "bir kesim çizgisinden önceki her şeyi çıkar"
@@ -3305,12 +3301,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3355,6 +3351,9 @@ msgstr "--batch gibi; ancak <içerik> yayma"
msgid "stdin is NUL-terminated"
msgstr "stdin, NUL ile sonlandırılmış"
+msgid "stdin and stdout is NUL-terminated"
+msgstr "stdin ve stdout NUL ile sonlandırılmış"
+
msgid "read commands from stdin"
msgstr "komutları stdin'den oku"
@@ -4216,12 +4215,6 @@ msgstr "sunucuya özel"
msgid "option to transmit"
msgstr "iletme seçeneği"
-msgid "use IPv4 addresses only"
-msgstr "yalnızca IPv4 adresleri kullan"
-
-msgid "use IPv6 addresses only"
-msgstr "yalnızca IPv6 adresleri kullan"
-
msgid "apply partial clone filters to submodules"
msgstr "altmodüllere kısımsal klon süzgeçlerini uygula"
@@ -4661,6 +4654,9 @@ msgstr ""
"\tgit cherry-pick --skip\n"
"\n"
+msgid "updating files failed"
+msgstr "dosyaları güncelleme başarısız"
+
msgid "failed to unpack HEAD tree object"
msgstr "HEAD ağaç nesnesi açılamadı"
@@ -4720,8 +4716,8 @@ msgstr ""
"karakteri seçilemiyor"
#, c-format
-msgid "could not lookup commit %s"
-msgstr "%s işlemesi aranamadı"
+msgid "could not lookup commit '%s'"
+msgstr "'%s' işlemesi aranamadı"
#, c-format
msgid "(reading log message from standard input)\n"
@@ -7325,77 +7321,6 @@ msgstr "--verify ile bir paket dosyası adı verilmedi"
msgid "fsck error in pack objects"
msgstr "paket nesnelerinde fsck hatası"
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "'%s' şablonunun bilgileri alınamıyor"
-
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "'%s' opendir yapılamıyor"
-
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "'%s' readlink yapılamıyor"
-
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "'%s', '%s' ögesine sembolik bağla bağlanamıyor"
-
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "'%s' şuraya kopyalanamıyor: '%s'"
-
-#, c-format
-msgid "ignoring template %s"
-msgstr "%s şablonu yok sayılıyor"
-
-#, c-format
-msgid "templates not found in %s"
-msgstr "şablonlar %s içinde bulunamadı"
-
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "şablonlar '%s' konumundan kopyalanmıyor: %s"
-
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "geçersiz başlangıç dalı adı: '%s'"
-
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "%d dosya türü ele alınamıyor"
-
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "%s şuraya taşınamıyor: %s"
-
-msgid "attempt to reinitialize repository with different hash"
-msgstr "depoyu başka bir sağlama ile yeniden ilklendirme deneniyor"
-
-#, c-format
-msgid "%s already exists"
-msgstr "%s halihazırda var"
-
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "re-init: --initial-branch=%s yok sayıldı"
-
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "%s%s içindeki var olan paylaşılan Git deposu yeniden ilklendirildi\n"
-
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "%s%s içindeki var olan Git deposu yeniden ilklendirildi\n"
-
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "%s%s içinde paylaşılan boş Git deposu ilklendirildi\n"
-
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "%s%s içinde boş Git deposu ilklendirildi\n"
-
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -7826,6 +7751,10 @@ msgid ""
msgstr "İzlenen bir uzak dal bulunamadı, lütfen el ile <üstkaynak> belirtin.\n"
#, c-format
+msgid "could not get object info about '%s'"
+msgstr "'%s' hakkında nesne bilgisi alınamadı"
+
+#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
msgstr "hatalı ls-files biçimi: '%s' ögesi, '(' ile başlamıyor"
@@ -7968,10 +7897,6 @@ msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
msgstr "git ls-tree [<seçenekler>] <ağacımsı> [<yol>...]"
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "'%s' hakkında nesne bilgisi alınamadı"
-
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "hatalı ls-tree biçimi: '%s' ögesi '(' ile başlamıyor"
@@ -8695,21 +8620,25 @@ msgid "git notes [--ref <notes-ref>] [list [<object>]]"
msgstr "git notes [--ref <not-bşvr>] [list [<nesne>]]"
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <not-bşvr>] add [-f] [--allow-empty] [-m <ileti> | -F "
-"<dosya> | (-c | -C) <nesne>] [<nesne>]"
+"git notes [--ref <not-bşv>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraf-sonu>] [--[no-]stripspace] [-m <ilet> | -F <dosya> | (-c "
+"| -C) <nesne>] [<nesne>]"
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
msgstr "git notes [--ref <not-bşvr>] copy [-f] <nesneden> <nesneye>"
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <not-bşvr>] append [--allow-empty] [-m <ileti> | -F <dosya> "
-"| (-c | -C) <nesne>] [<nesne>]"
+"git notes [--ref <not-bşv>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraf-sonu>] [--[no-]stripspace] [-m <ileti> | -F <dosya> | (-"
+"c | -C) <nesne>] [<nesne>]"
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
msgstr "git notes [--ref <not-bşvr>] edit [--allow-empty] [<nesne>]"
@@ -8840,6 +8769,15 @@ msgstr "boş not depolamasına izin ver"
msgid "replace existing notes"
msgstr "var olan notları başkalarıyla değiştir"
+msgid "<paragraph-break>"
+msgstr "<paragraf-sonu>"
+
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "paragraflar arasında <paragraf-sonu> ekle"
+
+msgid "remove unnecessary whitespace"
+msgstr "gereksiz boşlukları kaldır"
+
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -9392,8 +9330,12 @@ msgstr ""
msgid "refusing to run without --i-still-use-this"
msgstr "--i-still-use-this olmadan çalıştırma reddediliyor"
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune]git pack-refs [--all] [--no-prune] [--"
+"include <dizgi>] [--exclude <dizgi>]"
msgid "pack everything"
msgstr "her şeyi paketle"
@@ -9401,6 +9343,12 @@ msgstr "her şeyi paketle"
msgid "prune loose refs (default)"
msgstr "gevşek başvuruları buda (öntanımlı)"
+msgid "references to include"
+msgstr "içerilecek başvurular"
+
+msgid "references to exclude"
+msgstr "dışarıda tutulacak başvurular"
+
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -9459,6 +9407,12 @@ msgstr "zorla yerel dalın üzerine yaz"
msgid "number of submodules pulled in parallel"
msgstr "paralelde çekilen altmodüllerin sayısı"
+msgid "use IPv4 addresses only"
+msgstr "yalnızca IPv4 adresleri kullan"
+
+msgid "use IPv6 addresses only"
+msgstr "yalnızca IPv6 adresleri kullan"
+
msgid ""
"There is no candidate for rebasing against among the refs that you just "
"fetched."
@@ -9717,39 +9671,39 @@ msgstr ""
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Güncellemeler reddedildi; çünkü geçerli dalınızın ucu kendisinin\n"
-"uzak konum karşıtından geride. Yeniden itmeden önce uzak konumdaki\n"
-"değişiklikleri tümleştirin (örn. 'git pull ...').\n"
+"uzak konum karşıtından geride. Uzaktaki değişiklikleri tümleştirmek\n"
+"istiyorsanız yeniden itmeden önce 'git pull' yapın.\n"
"Ayrıntılar için 'git push --help' içinde 'Notes about fast-forwards'a\n"
"bakın."
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Güncellemeler reddedildi; çünkü itilmiş bir dal ucu kendisinin\n"
-"uzak konum karşıtından geride. Yeniden itmeden önce bu dalı çıkış\n"
-"yapın ve uzak konumdaki değişiklikleri tümleştirin (örn. 'git pull\n"
-"...'). Ayrıntılar için 'git push --help' içinde 'Notes about\n"
-"fast-forwards'a bakın."
+"uzak konum karşıtından geride. Uzaktaki değişiklikleri tümleştirmek\n"
+"istiyorsanız yeniden itmeden önce 'git pull' yapın.\n"
+"Ayrıntılar için 'git push --help' içinde 'Notes about fast-forwards'a\n"
+"bakın."
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"Güncellemeler reddedildi; çünkü uzak konumda henüz yerelde sizde olmayan\n"
"değişiklikler var. Bu genelde başka bir deponun aynı başvuruya itmesinden\n"
-"dolayı olur. Yeniden itmeden önce uzak konumdaki değişiklikleri tümleş-\n"
-"tirmek isteyebilirsiniz (örn. 'git pull ...').\n"
+"dolayı olur. Uzaktaki değişiklikleri tümleştirmek istiyorsanız yeniden\n"
+"itmeden önce 'git pull' yapın..\n"
"Ayrıntılar için 'git push --help' içinde 'Notes about fast-forwards'a\n"
"bakın."
@@ -9766,19 +9720,20 @@ msgstr ""
"olmayan bir nesneye işaret etmesini sağlaması için güncelleyemezsiniz.\n"
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Güncellemeler reddedildi; çünkü uzak izleme dalının ucu son\n"
-"çıkıştan bu yana güncellenmiş. Bir güncellemeyi zorlamadan\n"
-"önce bu değişiklikleri yerel olarak tümleştirmek isteye-\n"
-"bilirsiniz (örn. 'git pull ...'\n"
+"Güncellemeler reddedildi; çünkü geçerli dalınızın ucu kendisinin\n"
+"uzak konum karşıtından geride. Uzaktaki değişiklikleri tümleştirmek\n"
+"istiyorsanız yeniden itmeden önce 'git pull' yapın.\n"
+"Ayrıntılar için 'git push --help' içinde 'Notes about fast-forwards'a\n"
+"bakın."
#, c-format
msgid "Pushing to %s\n"
-msgstr "İtme konumu: %s\n"
+msgstr "Şuraya itiliyor: %s\n"
#, c-format
msgid "failed to push some refs to '%s'"
@@ -10636,11 +10591,12 @@ msgstr "bilinmeyen yansı argümanı: %s"
msgid "fetch the remote branches"
msgstr "uzak konum dallarını getir"
-msgid "import all tags and associated objects when fetching"
-msgstr "getirirken tüm etiketleri ve ilişkili nesneleri içe aktar"
-
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "veya hiçbir etiketi getirme (--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"getirirken tüm etiketleri ve ilişkili nesneleri\n"
+"içe aktar veya etiketleri hiç içe aktarma (--no-tags)"
msgid "branch(es) to track"
msgstr "izlenecek dal(lar)"
@@ -12570,6 +12526,10 @@ msgid "Skipping submodule '%s'"
msgstr "'%s' altmodülü atlanıyor"
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "bir URL olmadan '%s' altmodülü içe aktarılamıyor"
+
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "'%s' klonlanamadı. Yeniden deneme zamanlandı"
@@ -13306,10 +13266,10 @@ msgstr "etiket içeriğini yazdır"
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <dizi>]]\n"
-" [-b <yeni-dal>] <yol> [<işlememsi>]"
+" [--orphan] [(-b | -B) <yeni-dal>] <yol> [<işlememsi>]"
msgid "git worktree list [-v | --porcelain [-z]]"
msgstr "git worktree list [-v | --porcelain [-z]]"
@@ -13332,6 +13292,37 @@ msgstr "git worktree repair [<yol>...]"
msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <çalışma-ağacı>"
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Olası kaynak dal yok, '--orphan' anlamı çıkarılıyor"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Bu depo için yeni bir yetim dal içeren (işlemesiz dal) bir\n"
+"çalışma ağacı oluşturmak istediyseniz bunu --orphan bayrağı\n"
+"ile yapabilirsiniz:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Bu depo için yeni bir yetim dal içeren (işlemesiz dal) bir\n"
+"çalışma ağacı oluşturmak istediyseniz bunu --orphan bayrağı\n"
+"ile yapabilirsiniz:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
#, c-format
msgid "Removing %s/%s: %s"
msgstr "%s/%s kaldırılıyor: %s"
@@ -13399,9 +13390,35 @@ msgid "Preparing worktree (checking out '%s')"
msgstr "Çalışma ağacı hazırlanıyor ('%s' çıkış yapılıyor)"
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "erişilemiyor: geçersiz başvuru: %s"
+
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "Çalışma ağacı hazırlanıyor (ayrık HEAD %s)"
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD, geçersiz (veya yetim bırakılmış bir başvuruya işaret ediyor.\n"
+"HEAD yolu: '%s'\n"
+"HEAD içeriği: '%s'"
+
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"Bir uzak konum olmasına rağmen hiçbir yerel veya uzak başvuru\n"
+"yok, durduruluyor; geçersiz kılmak için 'add -f' kullanın veya\n"
+"önce bir uzak konum getirin"
+
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "'%s' ve '%s' birlikte kullanılamaz"
+
msgid "checkout <branch> even if already checked out in other worktree"
msgstr "diğer çalışma ağacında çıkış yapılmış olsa bile <dal> çıkışını yap"
@@ -13411,6 +13428,9 @@ msgstr "yeni bir dal oluştur"
msgid "create or reset a branch"
msgstr "yeni bir dal oluştur veya sıfırla"
+msgid "create unborn/orphaned branch"
+msgstr "doğmamış/yetim bırakılmış dal oluştur"
+
msgid "populate the new working tree"
msgstr "yeni çalışma ağacını doldur"
@@ -13430,6 +13450,13 @@ msgstr "yeni dalın adını bir uzak izleme dalıyla eşleştirmeyi dene"
msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "'%s', '%s' ve '%s' seçenekleri birlikte kullanılamaz"
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "'%s' ve '%s' seçenekleri birlikte kullanılamaz"
+
+msgid "<commit-ish>"
+msgstr "<işlememsi>"
+
msgid "added with --lock"
msgstr "--lock ile eklendi"
@@ -13657,6 +13684,14 @@ msgid_plural "The bundle requires these %<PRIuMAX> refs:"
msgstr[0] "Demet bu başvuruyu gerektiriyor:"
msgstr[1] "Demet bu %<PRIuMAX> başvuruyu gerektiriyor:"
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "Demet, bu sağlama algoritmasını kullanıyor: %s"
+
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Demet, bu süzgeci kullanıyor: %s"
+
msgid "unable to dup bundle descriptor"
msgstr "demet açıklayıcısı çoğaltılamıyor"
@@ -13881,8 +13916,8 @@ msgstr "Bir dizgi ile eşleşen satırları yazdır"
msgid "A portable graphical interface to Git"
msgstr "Git için taşınabilir bir grafik arabirim"
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr "Sağlamayı hesapla ve isteğe göre dosyadan ikili oluştur"
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "Nesne kimliğini hesapla/dosyadan isteğe bağlı nesne oluştur"
msgid "Display help information about Git"
msgstr "Git yardım bilgisini görüntüle"
@@ -14289,6 +14324,10 @@ msgid "commit-graph chain does not match"
msgstr "commit-graph zinciri eşleşmiyor"
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "temel grafikteki işleme sayısı pek yüksek: %<PRIuMAX>"
+
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr "geçersiz commit-graph zinciri: '%s'. satır bir sağlama değil"
@@ -14372,6 +14411,14 @@ msgstr "temel commit-graph dosyası yeniden adlandırılamadı"
msgid "failed to rename temporary commit-graph file"
msgstr "geçici commit-graph dosyası yeniden adlandırılamadı"
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "%<PRIuMAX>, %<PRIuMAX> işlemeli grafikler birleştirilemiyor"
+
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "%s grafiği birleştirilemiyor, pek çok işleme: %<PRIuMAX>"
+
msgid "Scanning merged commits"
msgstr "Birleştirilen işlemeler taranıyor"
@@ -14401,9 +14448,6 @@ msgstr "commit-graph hatalı fanout değerine iye: fanout[%d] = %u != %u"
msgid "failed to parse commit %s from commit-graph"
msgstr "%s işlemesi commit-graph'tan ayrıştırılamadı"
-msgid "Verifying commits in commit graph"
-msgstr "İşleme grafiğindeki işlemeler doğrulanıyor"
-
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr ""
@@ -14449,6 +14493,9 @@ msgid "commit date for commit %s in commit-graph is %<PRIuMAX> != %<PRIuMAX>"
msgstr ""
"%s işlemesi için commit-graph içindeki işleme tarihi %<PRIuMAX> != %<PRIuMAX>"
+msgid "Verifying commits in commit graph"
+msgstr "İşleme grafiğindeki işlemeler doğrulanıyor"
+
#, c-format
msgid "%s %s is not a commit!"
msgstr "%s %s bir işleme değil!"
@@ -15396,6 +15443,12 @@ msgstr "bir birleştirme temeli bulunamadı"
msgid "multiple merge bases found"
msgstr "birden çok birleştirme temeli bulundu"
+msgid "cannot compare stdin to a directory"
+msgstr "stdin, bir dizinle karşılaştırılamıyor"
+
+msgid "cannot compare a named pipe to a directory"
+msgstr "adlandırılmış bir veriyolu bir dizinle karşılaştırılamıyor"
+
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<seçenekler>] <yol> <yol>"
@@ -15452,6 +15505,13 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "dış diff sonlandı, %s konumunda durdu"
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow tam olarak yalnızca bir yol belirteci gerektiriyor"
+
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "yol belirteci sihri --follow tarafından desteklenmiyor: %s"
+
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
msgstr "'%s', '%s', '%s' ve '%s' seçenekleri birlikte kullanılamaz"
@@ -15469,9 +15529,6 @@ msgstr ""
"'%s' ve '%s' seçenekleri birlikte kullanılamaz, '%s' seçeneğini '%s' ve '%s' "
"ile kullanın"
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow tam olarak yalnızca bir yol belirteci gerektiriyor"
-
#, c-format
msgid "invalid --stat value: %s"
msgstr "geçersiz --stat değeri: %s"
@@ -18331,6 +18388,13 @@ msgid "could not parse log for '%s'"
msgstr "'%s' günlüğü ayrıştırılamadı"
#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "geçersiz ek süprüntü ucu: '%s'"
+
+msgid "unable to enumerate additional recent objects"
+msgstr "ek son kullanılan nesneler numaralandırılamıyor"
+
+#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
msgstr "dosya arması '%s' eklenmeyecek ('%s' indekste halihazırda var)"
@@ -18481,6 +18545,14 @@ msgstr "'%s' üzerindeki izin bitleri onarılamıyor"
msgid "%s: cannot drop to stage #0"
msgstr "%s: #0 numaralı hazırlama alanına bırakılamıyor"
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "beklenmedik diff durumu %c"
+
+#, c-format
+msgid "remove '%s'\n"
+msgstr "kaldır: '%s'\n"
+
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
"continue'.\n"
@@ -18677,6 +18749,22 @@ msgid "positive value expected contents:lines=%s"
msgstr "pozitif değer şunu bekliyordu: contents:lines=%s"
#, c-format
+msgid "argument expected for %s"
+msgstr "%s için argüman bekleniyordu"
+
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "pozitif değer şunu bekliyordu: %s=%s"
+
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "tümüyle ayrıştırılamıyor: %s=%s"
+
+#, c-format
+msgid "value expected %s="
+msgstr "değer şunu bekliyordu: %s="
+
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "pozitif değer şurada '%s' bekliyordu: %%(%s)"
@@ -18750,6 +18838,9 @@ msgstr "bu komut atom %%(%.*s) reddediyor"
msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s, --python, --shell ve --tcl ile kullanılamaz"
+msgid "failed to run 'describe'"
+msgstr "'describe' çalıştırılamadı"
+
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(dal yok, %s yeniden temellendiriliyor)"
@@ -18811,6 +18902,9 @@ msgstr "anahtar"
msgid "field name to sort on"
msgstr "üzerine sıralanacak alan adı"
+msgid "exclude refs which match pattern"
+msgstr "dizgiyle eşleşen başvuruları dışarıda bırak"
+
#, c-format
msgid "not a reflog: %s"
msgstr "bir başvuru günlüğü değil: %s"
@@ -19252,8 +19346,11 @@ msgstr[1] ""
"Sizin dalınız ve '%s' birbirinden uzaklaşmış ve sırasıyla\n"
"her birinde %d ve %d işleme var.\n"
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (uzak dalı kendi dalınıza birleştirmek için \"git pull\" kullanın)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr ""
+" (uzak dalı kendi dalınızla birleştirmek istiyorsanız \"git pull\" "
+"kullanın)\n"
#, c-format
msgid "cannot parse expected object name '%s'"
@@ -19365,6 +19462,10 @@ msgstr "soy yolu argümanı %s için işleme alınamadı"
msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<paketdosyası> artık desteklenmiyor"
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "--stdin kipinde geçersiz seçenek '%s'"
+
msgid "your current branch appears to be broken"
msgstr "geçerli dalınız bozuk gibi görünüyor"
@@ -20508,6 +20609,77 @@ msgid "setsid failed"
msgstr "setsid başarısız"
#, c-format
+msgid "cannot stat template '%s'"
+msgstr "'%s' şablonunun bilgileri alınamıyor"
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "'%s' opendir yapılamıyor"
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "'%s' readlink yapılamıyor"
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "'%s', '%s' ögesine sembolik bağla bağlanamıyor"
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "'%s' şuraya kopyalanamıyor: '%s'"
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "%s şablonu yok sayılıyor"
+
+#, c-format
+msgid "templates not found in %s"
+msgstr "şablonlar %s içinde bulunamadı"
+
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "şablonlar '%s' konumundan kopyalanmıyor: %s"
+
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "geçersiz başlangıç dalı adı: '%s'"
+
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "%d dosya türü ele alınamıyor"
+
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "%s şuraya taşınamıyor: %s"
+
+msgid "attempt to reinitialize repository with different hash"
+msgstr "depoyu başka bir sağlama ile yeniden ilklendirme deneniyor"
+
+#, c-format
+msgid "%s already exists"
+msgstr "%s halihazırda var"
+
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-init: --initial-branch=%s yok sayıldı"
+
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "%s%s içindeki var olan paylaşılan Git deposu yeniden ilklendirildi\n"
+
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "%s%s içindeki var olan Git deposu yeniden ilklendirildi\n"
+
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "%s%s içinde paylaşılan boş Git deposu ilklendirildi\n"
+
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "%s%s içinde boş Git deposu ilklendirildi\n"
+
+#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
msgstr "indeks girdisi bir dizin; ancak aralıklı değil (%08x)"
diff --git a/po/uk.po b/po/uk.po
index 11c57b958b..5a11cc6614 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -6,19 +6,19 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Git v2.41\n"
+"Project-Id-Version: Git v2.42.0\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2023-05-15 23:57+0000\n"
-"PO-Revision-Date: 2023-05-17 13:51-0700\n"
+"POT-Creation-Date: 2023-08-15 15:28-0700\n"
+"PO-Revision-Date: 2023-08-15 15:31-0700\n"
"Last-Translator: Arkadii Yakovets <ark@cho.red>\n"
-"Language-Team: Ukrainian <https://github.com/arkid15r/git-ukrainian-l10n/>\n"
+"Language-Team: Ukrainian <https://github.com/arkid15r/git-uk-l10n/>\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
-"X-Generator: Poedit 3.3.1\n"
+"X-Generator: Poedit 3.3.2\n"
#, c-format
msgid "Huh (%s)?"
@@ -41,7 +41,7 @@ msgstr "Оновити"
#, c-format
msgid "could not stage '%s'"
-msgstr "не вдалося додати до індекса %s"
+msgstr "не вдалося додати до індексу %s"
msgid "could not write index"
msgstr "не вдалося записати індекс"
@@ -59,7 +59,7 @@ msgstr "примітка: %s зараз не відстежується.\n"
#, c-format
msgid "make_cache_entry failed for path '%s'"
-msgstr "невдала спроба make_cache_entry для шляху '%s'"
+msgstr "невдала спроба make_cache_entry для шляху \"%s\""
msgid "Revert"
msgstr "Вивернути"
@@ -90,7 +90,7 @@ msgstr[2] "додано %d шляхів\n"
#, c-format
msgid "ignoring unmerged: %s"
-msgstr "ігноруються незлиті записи: %s"
+msgstr "ігноруються не злиті записи: %s"
#, c-format
msgid "Only binary files changed.\n"
@@ -101,7 +101,7 @@ msgid "No changes.\n"
msgstr "Нічого не змінено.\n"
msgid "Patch update"
-msgstr "Оновлення патча"
+msgstr "Оновлення латки"
msgid "Review diff"
msgstr "Переглянути різницю"
@@ -125,7 +125,7 @@ msgid "add contents of untracked files to the staged set of changes"
msgstr "додати вміст невідстежуваних файлів до індексу"
msgid "Prompt help:"
-msgstr "Інформація про опції:"
+msgstr "Підказка по опціям:"
msgid "select a single item"
msgstr "вибрати один елемент"
@@ -196,7 +196,7 @@ msgid ""
"If the patch applies cleanly, the edited hunk will immediately be marked for "
"staging."
msgstr ""
-"Якщо патч буде застосовано без помилок, відредагований шматок буде одразу ж "
+"Якщо латка буде застосована без помилок, відредагований шматок буде одразу ж "
"позначено для індексації."
msgid ""
@@ -232,7 +232,7 @@ msgid ""
"If the patch applies cleanly, the edited hunk will immediately be marked for "
"stashing."
msgstr ""
-"Якщо патч буде застосовано без помилок, відредагований шматок буде одразу ж "
+"Якщо латка буде застосована без помилок, відредагований шматок буде одразу ж "
"позначено для схову."
msgid ""
@@ -250,25 +250,25 @@ msgstr ""
#, c-format
msgid "Unstage mode change [y,n,q,a,d%s,?]? "
-msgstr "Розіндексувати зміну режиму [y,n,q,a,d%s,?]? "
+msgstr "Прибрати з індексу зміну режиму [y,n,q,a,d%s,?]? "
#, c-format
msgid "Unstage deletion [y,n,q,a,d%s,?]? "
-msgstr "Розіндексувати видалення [y,n,q,a,d%s,?]? "
+msgstr "Прибрати з індексу видалення [y,n,q,a,d%s,?]? "
#, c-format
msgid "Unstage addition [y,n,q,a,d%s,?]? "
-msgstr "Розіндексувати додавання [y,n,q,a,d%s,?]? "
+msgstr "Прибрати з індексу додавання [y,n,q,a,d%s,?]? "
#, c-format
msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
-msgstr "Розіндексувати цей шматок [y,n,q,a,d%s,?]? "
+msgstr "Прибрати з індексу цей шматок [y,n,q,a,d%s,?]? "
msgid ""
"If the patch applies cleanly, the edited hunk will immediately be marked for "
"unstaging."
msgstr ""
-"Якщо патч буде застосовано без помилок, відредагований шматок буде одразу ж "
+"Якщо латка буде застосована без помилок, відредагований шматок буде одразу ж "
"позначено для розіндексації."
msgid ""
@@ -278,11 +278,11 @@ msgid ""
"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\n"
msgstr ""
-"y - розіндексувати цей шматок\n"
-"n - не розіндексовувати цей шматок\n"
-"q - вийти; не розіндексовувати ні цей шматок, ні решту\n"
-"a - розіндексувати цей шматок і всі наступні шматки у файлі\n"
-"d - не розіндексувати цей шматок і всі наступні шматки у файлі\n"
+"y - прибрати з індексу цей шматок\n"
+"n - не прибирати з індексу цей шматок\n"
+"q - вийти; не прибирати з індексу ні цей шматок, ні решту\n"
+"a - прибрати з індексу цей шматок і всі наступні шматки у файлі\n"
+"d - не прибирати з індексу цей шматок і всі наступні шматки у файлі\n"
#, c-format
msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
@@ -304,7 +304,7 @@ msgid ""
"If the patch applies cleanly, the edited hunk will immediately be marked for "
"applying."
msgstr ""
-"Якщо патч буде застосовано без помилок, відредагований шматок буде одразу ж "
+"Якщо латка буде застосована без помилок, відредагований шматок буде одразу ж "
"позначено для застосування."
msgid ""
@@ -340,7 +340,7 @@ msgid ""
"If the patch applies cleanly, the edited hunk will immediately be marked for "
"discarding."
msgstr ""
-"Якщо патч буде застосовано без помилок, відредагований шматок буде одразу ж "
+"Якщо латка буде застосована без помилок, відредагований шматок буде одразу ж "
"позначено для відкидання."
msgid ""
@@ -586,9 +586,9 @@ msgstr "Неприпустиме число: \"%s\""
#, c-format
msgid "Sorry, only %d hunk available."
msgid_plural "Sorry, only %d hunks available."
-msgstr[0] "Вибачте, доступний лише %d шматок."
-msgstr[1] "Вибачте, доступно лише %d шматки."
-msgstr[2] "Вибачте, доступно лише %d шматків."
+msgstr[0] "Вибачайте, доступний лише %d шматок."
+msgstr[1] "Вибачайте, доступно лише %d шматки."
+msgstr[2] "Вибачайте, доступно лише %d шматків."
msgid "No other hunks to search"
msgstr "Немає інших шматків для пошуку"
@@ -604,14 +604,14 @@ msgid "No hunk matches the given pattern"
msgstr "Жоден шматок не відповідає заданому шаблону"
msgid "Sorry, cannot split this hunk"
-msgstr "Вибачте, не можу розділити цей шматок"
+msgstr "Вибачайте, не можу розщепити цей шматок"
#, c-format
msgid "Split into %d hunks."
-msgstr "Розділити на %d шматків."
+msgstr "Розщепити на %d шматків."
msgid "Sorry, cannot edit this hunk"
-msgstr "Вибачте, не можу редагувати цей шматок"
+msgstr "Вибачайте, не можу редагувати цей шматок"
msgid "'git apply' failed"
msgstr "\"git apply\" завершився невдало"
@@ -643,20 +643,19 @@ msgstr "Отримання неможливе, оскільки у вас є н
msgid "Reverting is not possible because you have unmerged files."
msgstr "Вивертання неможливе, оскільки у вас є не злиті файли."
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "Неможливо виконати %s, оскільки у вас є не злиті файли."
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr "Перебазування неможливе, оскільки у вас є не злиті файли."
msgid ""
"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
"as appropriate to mark resolution and make a commit."
msgstr ""
-"Виправте їх у робочому дереві, а потім скористайтеся командою \"git add/rm "
+"Виправте їх у робочому дереві, а потім скористайтесь командою \"git add/rm "
"<файл>\"\n"
-"щоб позначити розвʼязання і зробити коміт."
+"щоб позначити вирішення і зробити коміт."
msgid "Exiting because of an unresolved conflict."
-msgstr "Вихід через нерозв’язаний конфлікт."
+msgstr "Вихід через невирішений конфлікт."
msgid "You have not concluded your merge (MERGE_HEAD exists)."
msgstr "Ви не завершили злиття (існує MERGE_HEAD)."
@@ -695,7 +694,7 @@ msgid ""
"updated in the index:\n"
msgstr ""
"Наступні шляхи та/або визначники шляхів відповідають шляхам, які існують\n"
-"за межами визначення вашого часткового переходу, тому не будуть\n"
+"за межами визначення вашого розрідженого переходу, тому не будуть\n"
"оновлені в індексі:\n"
msgid ""
@@ -706,7 +705,7 @@ msgstr ""
"Якщо ви маєте намір оновити такі записи, спробуйте один із наведених нижче "
"способів:\n"
"* Використайте параметр --sparse.\n"
-"* Вимкніть або змініть правила частковості."
+"* Вимкніть або змініть правила розрідженості."
#, c-format
msgid ""
@@ -735,7 +734,7 @@ msgstr ""
"внести експериментальні\n"
"зміни і зробити коміт, також ви можете відкинути будь-які коміти, зроблені у "
"цьому\n"
-"стані, не впливаючи на інші гілки, просто перейшовши до іншної гілки.\n"
+"стані, не впливаючи на інші гілки, просто перейшовши до іншої гілки.\n"
"\n"
"Якщо ви хочете створити нову гілку для збереження зроблених вами комітів, ви "
"можете\n"
@@ -756,8 +755,8 @@ msgid ""
"sparse-checkout definition but are not sparse due to local\n"
"modifications.\n"
msgstr ""
-"Наступні шляхи, що було винесено за межі визначення часткового\n"
-"переходу, не є частковими через локальні\n"
+"Наступні шляхи, що було винесено за межі визначення розрідженого\n"
+"переходу, не є розрідженими через локальні\n"
"зміни.\n"
msgid ""
@@ -765,10 +764,10 @@ msgid ""
"* Use \"git add --sparse <paths>\" to update the index\n"
"* Use \"git sparse-checkout reapply\" to apply the sparsity rules"
msgstr ""
-"Щоб виправити частковість цих шляхів, виконайте наступне:\n"
+"Щоб виправити розрідженість цих шляхів, виконайте наступне:\n"
"* Використайте \"git add --sparse <шляхи>\" для оновлення індексу\n"
"* Використайте \"git sparse-checkout reapply\", щоб застосувати правила "
-"частковості"
+"розрідженості"
msgid "cmdline ends with \\"
msgstr "cmdline завершується символом \\"
@@ -789,12 +788,18 @@ msgstr "нерозпізнана опція ігнорування пробіл
#, c-format
msgid "options '%s' and '%s' cannot be used together"
-msgstr "опції '%s' і '%s' не можна використовувати разом"
+msgstr "опції \"%s\" і \"%s\" не можна використовувати разом"
#, c-format
msgid "'%s' outside a repository"
msgstr "\"%s\" поза сховищем"
+msgid "failed to read patch"
+msgstr "не вдалося прочитати латку"
+
+msgid "patch too large"
+msgstr "латка занадто велика"
+
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "Неможливо підготувати регвир позначки часу %s"
@@ -805,30 +810,30 @@ msgstr "regexec повернув %d для вводу: %s"
#, c-format
msgid "unable to find filename in patch at line %d"
-msgstr "не вдалося знайти ім’я файлу у латці в рядку %d"
+msgstr "не вдалося знайти назву файла в рядку %d латки"
#, c-format
msgid "git apply: bad git-diff - expected /dev/null, got %s on line %d"
msgstr ""
-"git apply: невірний git-diff - очікувався /dev/null, отримано %s у рядку %d"
+"git apply: невірний git-diff - очікувалось /dev/null, отримано %s у рядку %d"
#, c-format
msgid "git apply: bad git-diff - inconsistent new filename on line %d"
msgstr ""
-"git apply: невірний git-diff - невідповідне ім’я нового файлу у рядку %d"
+"git apply: невірний git-diff - невідповідна назва нового файлу в рядку %d"
#, c-format
msgid "git apply: bad git-diff - inconsistent old filename on line %d"
msgstr ""
-"git apply: невірний git-diff - невідповідне ім’я старого файлу у рядку %d"
+"git apply: невірний git-diff - невідповідна назва старого файлу в рядку %d"
#, c-format
msgid "git apply: bad git-diff - expected /dev/null on line %d"
-msgstr "git apply: невірний git-diff - очікувався /dev/null у рядку %d"
+msgstr "git apply: невірний git-diff - очікувалось /dev/null у рядку %d"
#, c-format
msgid "invalid mode on line %d: %s"
-msgstr "недійсний режим у рядку %d: %s"
+msgstr "неприпустимий режим у рядку %d: %s"
#, c-format
msgid "inconsistent header lines %d and %d"
@@ -965,7 +970,7 @@ msgstr "бінарна латка не застосовується до \"%s\""
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr ""
-"бінарна латка для \"%s\" призводить до некоректного результату (очікувалося "
+"бінарна латка для \"%s\" призводить до некоректного результату (очікувалось "
"%s, отримано %s)"
#, c-format
@@ -1033,7 +1038,7 @@ msgstr "%s: невірний тип"
#, c-format
msgid "%s has type %o, expected %o"
-msgstr "%s має тип %o, очікувався %o"
+msgstr "%s має тип %o, очікувалось %o"
#, c-format
msgid "invalid path '%s'"
@@ -1101,7 +1106,7 @@ msgstr "не вдалося отримати інформацію про щой
#, c-format
msgid "unable to create backing store for newly created file %s"
-msgstr "не вдалося створити підтримуюче сховище для щойно створеного файлу %s"
+msgstr "не вдалося зробити запис для щойно створеного файлу %s"
#, c-format
msgid "unable to add cache entry for %s"
@@ -1143,7 +1148,7 @@ msgstr "неможливо відкрити %s"
#, c-format
msgid "cannot unlink '%s'"
-msgstr "неможливо відʼєднати \"%s\""
+msgstr "неможливо видалити \"%s\""
#, c-format
msgid "Hunk #%d applied cleanly."
@@ -1232,7 +1237,7 @@ msgid "accept a patch that touches outside the working area"
msgstr "прийняти латку, яка виходить за межі робочого простору"
msgid "also apply the patch (use with --stat/--summary/--check)"
-msgstr "також застосувати патч (використовуйте з --stat/--summary/--check)"
+msgstr "також застосувати латку (використовуйте з --stat/--summary/--check)"
msgid "attempt three-way merge, fall back on normal patch if that fails"
msgstr ""
@@ -1320,12 +1325,12 @@ msgid "timestamp too large for this system: %<PRIuMAX>"
msgstr "позначка часу занадто велика для цієї системи: %<PRIuMAX>"
msgid "git archive [<options>] <tree-ish> [<path>...]"
-msgstr "git archive [<опції>] <деревоподібне джерело> [<шлях>...]"
+msgstr "git archive [<опції>] <деревоподібне-джерело> [<шлях>...]"
msgid ""
"git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...]"
msgstr ""
-"git archive --remote <сховище> [--exec <команда>] [<опції>] <деревоподібне "
+"git archive --remote <сховище> [--exec <команда>] [<опції>] <деревоподібне-"
"джерело> [<шлях>...]"
msgid "git archive --remote <repo> [--exec <cmd>] --list"
@@ -1337,7 +1342,7 @@ msgstr "неможливо прочитати \"%s\""
#, c-format
msgid "pathspec '%s' matches files outside the current directory"
-msgstr ""
+msgstr "визначник шляху \"%s\" відповідає файлам поза поточною директорією"
#, c-format
msgid "pathspec '%s' did not match any files"
@@ -1434,7 +1439,7 @@ msgstr "Неочікувана опція --remote"
#, c-format
msgid "the option '%s' requires '%s'"
-msgstr "опція \"%s\" вимагає \"%s\""
+msgstr "опція \"%s\" потребує \"%s\""
msgid "Unexpected option --output"
msgstr "Неочікувана опція --output"
@@ -1481,17 +1486,20 @@ msgstr "ігнорування надто великого файлу gitattribu
msgid "ignoring overly large gitattributes blob '%s'"
msgstr "ігнорування надто великих gitattributes blob \"%s\""
+msgid "bad --attr-source or GIT_ATTR_SOURCE"
+msgstr "невірний --attr-source або GIT_ATTR_SOURCE"
+
#, c-format
msgid "Badly quoted content in file '%s': %s"
msgstr "Невірно процитований вміст у файлі \"%s\": %s"
#, c-format
msgid "We cannot bisect more!\n"
-msgstr "Неможливо бісектувати більше!\n"
+msgstr "Подальше бісектування неможливо!\n"
#, c-format
msgid "Not a valid commit name %s"
-msgstr "Не є дійсною назвою коміта %s"
+msgstr "Не є дійсною назвою коміту %s"
#, c-format
msgid ""
@@ -1567,7 +1575,7 @@ msgid ""
"Maybe you started with bad path arguments?\n"
msgstr ""
"Не знайдено коміт для тестування.\n"
-"Можливо, ви почали з неправильних аргументів шляху?\n"
+"Можливо, ви почали з невірних аргументів шляху?\n"
#, c-format
msgid "(roughly %d step)"
@@ -1599,7 +1607,7 @@ msgstr "не вдалося налаштувати проходження по
msgid ""
"--reverse --first-parent together require range along first-parent chain"
msgstr ""
-"--reverse --first-parent разом вимагають вказівки діапазона вздовж ланцюжка "
+"--reverse --first-parent разом вимагають вказівки діапазону вздовж ланцюжка "
"першого батька"
#, c-format
@@ -1614,7 +1622,7 @@ msgid ""
"cannot inherit upstream tracking configuration of multiple refs when "
"rebasing is requested"
msgstr ""
-"неможливо успадковувати першоджерельну конфігурацію відстежування декількох "
+"неможливо успадкувати першоджерельну конфігурацію відстежування кількох "
"посилань при запиті перебазування"
#, c-format
@@ -1627,14 +1635,14 @@ msgstr "гілку \"%s\" налаштовано на відстежування
#, c-format
msgid "branch '%s' set up to track '%s'."
-msgstr "гілку \"%s\" налаштовано на відстежуваня \"%s\"."
+msgstr "гілку \"%s\" налаштовано на відстежування \"%s\"."
#, c-format
msgid "branch '%s' set up to track:"
msgstr "гілку \"%s\" налаштовано на відстежування:"
msgid "unable to write upstream branch configuration"
-msgstr "не вдалося записати конфігурацію гілки першоджерельного сховища"
+msgstr "не вдалося записати конфігурацію висхідної гілки"
msgid ""
"\n"
@@ -1689,16 +1697,16 @@ msgid ""
"different remotes' fetch refspecs map into different\n"
"tracking namespaces."
msgstr ""
-"Існує декілька віддалених призначень, визначники отримування посилань яких "
+"Існує кілька віддалених призначень, визначники отримання посилань яких "
"розвʼязуються у віддалено \n"
"відстежуване посилання \"%s\":\n"
"%s\n"
"Зазвичай це помилка конфігурації.\n"
"\n"
"Щоб підтримувати налаштування гілок відстежування, переконайтеся, що\n"
-"визначники отримування посилань різних віддалених призначень розвʼязуються у "
+"визначники отримання посилань різних віддалених призначень розвʼязуються у "
"різні\n"
-" простори імен відстежування."
+"простори імен відстежування."
#, c-format
msgid "'%s' is not a valid branch name"
@@ -1709,8 +1717,10 @@ msgid "a branch named '%s' already exists"
msgstr "гілка з ім’ям \"%s\" вже існує"
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
-msgstr "неможливо примусово оновити гілку \"%s\", розташовану в \"%s\""
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr ""
+"неможливо примусово оновити гілку \"%s\", яка використовується робочим "
+"деревом у \"%s\""
#, c-format
msgid "cannot set up tracking information; starting point '%s' is not a branch"
@@ -1720,7 +1730,7 @@ msgstr ""
#, c-format
msgid "the requested upstream branch '%s' does not exist"
-msgstr "запитувана гілка \"%s\" не існує у першоджерельному сховищі"
+msgstr "запитувана висхідна гілка \"%s\" не існує"
msgid ""
"\n"
@@ -1744,15 +1754,15 @@ msgstr ""
#, c-format
msgid "not a valid object name: '%s'"
-msgstr "не є допустимим ім’ям об’єкта: \"%s\""
+msgstr "не є допустимою назвою об’єкта: \"%s\""
#, c-format
msgid "ambiguous object name: '%s'"
-msgstr "неоднозначне ім’я об’єкта: \"%s\""
+msgstr "неоднозначна назва об’єкта: \"%s\""
#, c-format
msgid "not a valid branch point: '%s'"
-msgstr "не є допустимим ім’ям точки розгалуження: \"%s\""
+msgstr "не є допустимою точкою розгалуження: \"%s\""
#, c-format
msgid "submodule '%s': unable to find submodule"
@@ -1781,17 +1791,6 @@ msgstr "git add [<опції>] [--] <визначник шляху>..."
msgid "cannot chmod %cx '%s'"
msgstr "неможливо виконати chmod %cx \"%s\""
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "неочікуваний статус diff %c"
-
-msgid "updating files failed"
-msgstr "не вдалося оновити файли"
-
-#, c-format
-msgid "remove '%s'\n"
-msgstr "видалити \"%s\"\n"
-
msgid "Unstaged changes after refreshing the index:"
msgstr "Неіндексовані зміни після оновлення індексу:"
@@ -1850,7 +1849,7 @@ msgid "renormalize EOL of tracked files (implies -u)"
msgstr "перенормувати EOL відстежуваних файлів (мається на увазі -u)"
msgid "record only the fact that the path will be added later"
-msgstr "записати лише той факт, що шлях будe додано пізніше"
+msgstr "записати лише той факт, що шлях буде додано пізніше"
msgid "add changes from all tracked and untracked files"
msgstr "додати зміни з усіх відстежуваних і невідстежуваних файлів"
@@ -1870,7 +1869,7 @@ msgstr ""
"пробного запуску"
msgid "allow updating entries outside of the sparse-checkout cone"
-msgstr "дозволити оновлення записів за межами конуса часткового переходу"
+msgstr "дозволити оновлення записів за межами конуса розрідженого переходу"
msgid "override the executable bit of the listed files"
msgstr "перевизначити біт виконання для зазначених файлів"
@@ -1897,7 +1896,7 @@ msgstr ""
"Ви додали ще одне git сховище всередині вашого поточного сховища.\n"
"Клони зовнішнього сховища не міститимуть вмісту\n"
"вбудованого сховища і не знатимуть, як його отримати.\n"
-"Якщо ви хочете додати підмодуль, скористайтеся командою\n"
+"Якщо ви хочете додати підмодуль, скористайтесь командою\n"
"\n"
"\tgit submodule add <url> %s\n"
"\n"
@@ -2014,7 +2013,7 @@ msgid "failed to create directory '%s'"
msgstr "не вдалося створити директорію \"%s\""
msgid "Failed to split patches."
-msgstr "Не вдалося розділити латки."
+msgstr "Не вдалося розщепити латки."
#, c-format
msgid "When you have resolved this problem, run \"%s --continue\"."
@@ -2060,7 +2059,7 @@ msgstr ""
msgid "Using index info to reconstruct a base tree..."
msgstr ""
-"Використання індексної інформації для реконстрування базового дерева..."
+"Використання індексної інформації для реконструювання базового дерева..."
msgid ""
"Did you hand edit your patch?\n"
@@ -2133,7 +2132,7 @@ msgstr "Латання не вдалося на %s %.*s"
msgid "Use 'git am --show-current-patch=diff' to see the failed patch"
msgstr ""
-"Використовуйте \"git am --show-current-patch=diff\", щоб побачити невдалу "
+"Скористайтесь \"git am --show-current-patch=diff\", щоб побачити невдалу "
"латку"
msgid "No changes - recorded it as an empty commit."
@@ -2173,8 +2172,8 @@ msgid ""
"You seem to have moved HEAD since the last 'am' failure.\n"
"Not rewinding to ORIG_HEAD"
msgstr ""
-"Здається, ви пересунули HEAD після останньої невдачі з \"am\".\n"
-"Не відбувається перемотування до ORIG_HEAD"
+"Здається, ви перемістили HEAD після останньої невдачі з \"am\".\n"
+"Перемотування вперед до ORIG_HEAD не виконується"
#, c-format
msgid "failed to read '%s'"
@@ -2206,7 +2205,7 @@ msgid "be quiet"
msgstr "працювати тихесенько"
msgid "add a Signed-off-by trailer to the commit message"
-msgstr "додати Signed-off-by причеп у допис до коміту"
+msgstr "додати Signed-off-by причіп у допис до коміту"
msgid "recode into utf8 (default)"
msgstr "перекодувати в utf8 (за замовчуванням)"
@@ -2223,10 +2222,6 @@ msgstr "передати -m прапорець до git-mailinfo"
msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "передати --keep-cr прапорець до git-mailsplit для формату mbox"
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr ""
-"не передавати --keep-cr прапорець до git-mailsplit незалежно від am.keepcr"
-
msgid "strip everything before a scissors line"
msgstr "прибрати все раніше відрізної лінії"
@@ -2237,7 +2232,7 @@ msgid "pass it through git-apply"
msgstr "передати через git-apply"
msgid "n"
-msgstr "n"
+msgstr "н"
msgid "format"
msgstr "формат"
@@ -2249,7 +2244,7 @@ msgid "override error message when patch failure occurs"
msgstr "перевизначити повідомлення про помилку при збої латання"
msgid "continue applying patches after resolving a conflict"
-msgstr "продовжити застосування латки після розвʼязання конфлікту"
+msgstr "продовжити застосування латки після вирішення конфлікту"
msgid "synonyms for --continue"
msgstr "те ж саме, що й --continue"
@@ -2308,13 +2303,13 @@ msgid ""
"Use \"git am --abort\" to remove it."
msgstr ""
"Знайдено блукаючу директорію %s.\n"
-"Скористайтеся командою \"git am --abort\", щоб вилучити її."
+"скористайтесь командою \"git am --abort\", щоб вилучити її."
msgid "Resolve operation not in progress, we are not resuming."
-msgstr "Наразі не виконується операція розвʼязання, ми не продовжуємо."
+msgstr "Наразі не виконується операція вирішення, не поновлено."
msgid "interactive mode requires patches on the command line"
-msgstr "інтерактивний режим вимагає латки у командному рядку"
+msgstr "інтерактивний режим потребує латки у командному рядку"
msgid "git apply [<options>] [<patch>...]"
msgstr "git apply [<опції>] [<латка>...]"
@@ -2326,7 +2321,7 @@ msgid "git archive: Remote with no URL"
msgstr "git archive: віддалене призначення без URL"
msgid "git archive: expected ACK/NAK, got a flush packet"
-msgstr "git archive: очікувалося ACK/NAK, отримано flush-пакет"
+msgstr "git archive: очікувалось ACK/NAK, отримано flush-пакет"
#, c-format
msgid "git archive: NACK %s"
@@ -2336,7 +2331,7 @@ msgid "git archive: protocol error"
msgstr "git archive: помилка протоколу"
msgid "git archive: expected a flush"
-msgstr "git archive: очікувався flush"
+msgstr "git archive: очікувалось flush"
msgid ""
"git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>] [--no-"
@@ -2594,18 +2589,18 @@ msgstr ""
#, c-format
msgid "'%s' requires either no argument or a commit"
-msgstr "\"%s\" вимагає або відсутності аргументу, або коміт"
+msgstr "\"%s\" потребує або відсутності аргументу, або коміт"
#, c-format
msgid "'%s' requires 0 or 1 argument"
-msgstr "\"%s\" вимагає 0 або 1 аргумент"
+msgstr "\"%s\" потребує 0 або 1 аргумент"
#, c-format
msgid "'%s' requires 0 arguments"
-msgstr "\"%s\" вимагає 0 аргументів"
+msgstr "\"%s\" потребує 0 аргументів"
msgid "no logfile given"
-msgstr "не надано лог-файл"
+msgstr "не надано файл журналу"
#, c-format
msgid "'%s' failed: no command provided."
@@ -2645,13 +2640,13 @@ msgid "do not show object names of boundary commits (Default: off)"
msgstr "не показувати назви об’єктів межевих комітів (за замовчуванням: off)"
msgid "do not treat root commits as boundaries (Default: off)"
-msgstr "не розглядати кореневі коміти як межі (за замовчуванням: off)"
+msgstr "не обробляти кореневі коміти як межі (за замовчуванням: off)"
msgid "show work cost statistics"
msgstr "показати статистику вартості робіт"
msgid "force progress reporting"
-msgstr "примусово звітувати прогрес"
+msgstr "примусово звітувати про хід виконання"
msgid "show output score for blame entries"
msgstr "показати вихідний показник для blame записів"
@@ -2660,70 +2655,75 @@ msgid "show original filename (Default: auto)"
msgstr "показати оригінальне ім’я файлу (за замовчуванням: auto)"
msgid "show original linenumber (Default: off)"
-msgstr "показати початковий номер рядка (за замовчуванням: off)"
+msgstr "показувати початковий номер рядка (за замовчуванням: off)"
msgid "show in a format designed for machine consumption"
-msgstr ""
+msgstr "показувати у форматі, призначеному для машинного споживання"
msgid "show porcelain format with per-line commit information"
msgstr ""
+"показати у porcelain форматі з інформацією про кожен коміт в окремому рядку"
msgid "use the same output mode as git-annotate (Default: off)"
msgstr ""
+"використовувати той самий режим виводу, що і git-annotate (за замовчуванням: "
+"off)"
msgid "show raw timestamp (Default: off)"
-msgstr ""
+msgstr "показувати необроблену мітку часу (за замовчуванням: off)"
msgid "show long commit SHA1 (Default: off)"
-msgstr ""
+msgstr "показувати довгу версію SHA1 коміту (за замовчуванням: off)"
msgid "suppress author name and timestamp (Default: off)"
-msgstr ""
+msgstr "приховати ім’я автора та мітку часу (за замовчуванням: off)"
msgid "show author email instead of name (Default: off)"
-msgstr ""
+msgstr "показувати email автора замість імені (за замовчуванням: off)"
msgid "ignore whitespace differences"
-msgstr ""
+msgstr "ігнорувати різницю між пробільними символами"
msgid "rev"
-msgstr ""
+msgstr "ревізія"
msgid "ignore <rev> when blaming"
-msgstr ""
+msgstr "ігнорувати <ревізію> при blame"
msgid "ignore revisions from <file>"
-msgstr ""
+msgstr "ігнорувати ревізії з <файлу>"
msgid "color redundant metadata from previous line differently"
-msgstr ""
+msgstr "розфарбувати надлишкові метадані з попереднього рядка інакше"
msgid "color lines by age"
-msgstr ""
+msgstr "розфарбувати рядки за віком"
msgid "spend extra cycles to find better match"
-msgstr ""
+msgstr "витрачати додаткові цикли для пошуку кращого варіанта"
msgid "use revisions from <file> instead of calling git-rev-list"
-msgstr ""
+msgstr "використовувати ревізії з <файлу> замість виклику git-rev-list"
msgid "use <file>'s contents as the final image"
-msgstr ""
+msgstr "використовувати вміст <файлу> як кінцевий образ"
msgid "score"
-msgstr ""
+msgstr "показник"
msgid "find line copies within and across files"
-msgstr ""
+msgstr "знаходити копії рядків у файлах та між ними"
msgid "find line movements within and across files"
-msgstr ""
+msgstr "знаходити переміщення рядків у файлі та між ними"
msgid "range"
-msgstr ""
+msgstr "діапазон"
msgid "process only line range <start>,<end> or function :<funcname>"
msgstr ""
+"обробити тільки діапазон рядків <початок>,<кінець> або функцію :<назва-"
+"функції>"
msgid "--progress can't be used with --incremental or porcelain formats"
msgstr ""
@@ -2739,25 +2739,27 @@ msgstr ""
#.
msgid "4 years, 11 months ago"
-msgstr ""
+msgstr "4 роки, 11 місяців тому"
#, c-format
msgid "file %s has only %lu line"
msgid_plural "file %s has only %lu lines"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "файл %s містить лише %lu рядок"
+msgstr[1] "файл %s містить лише %lu рядки"
+msgstr[2] "файл %s містить лише %lu рядків"
msgid "Blaming lines"
-msgstr ""
+msgstr "Blaming рядки"
msgid "git branch [<options>] [-r | -a] [--merged] [--no-merged]"
-msgstr ""
+msgstr "git branch [<опції>] [-r | -a] [--merged] [--no-merged]"
msgid ""
"git branch [<options>] [-f] [--recurse-submodules] <branch-name> [<start-"
"point>]"
msgstr ""
+"git branch [<опції>] [-f] [--recurse-submodules] <назва-гілки> [<початкова-"
+"точка>]"
msgid "git branch [<options>] [-l] [<pattern>...]"
msgstr "git branch [<опції>] [-l] [<шаблон>...]"
@@ -2782,12 +2784,16 @@ msgid ""
"deleting branch '%s' that has been merged to\n"
" '%s', but not yet merged to HEAD."
msgstr ""
+"видалення гілки \"%s\", яка була злита з\n"
+" \"%s\", але ще не злита з HEAD."
#, c-format
msgid ""
"not deleting branch '%s' that is not yet merged to\n"
" '%s', even though it is merged to HEAD."
msgstr ""
+"утримання гілки \"%s\", яка ще не була злита з\n"
+" \"%s\", незважаючи на те, що вже злита з HEAD."
#, c-format
msgid "Couldn't look up commit object for '%s'"
@@ -2798,9 +2804,11 @@ msgid ""
"The branch '%s' is not fully merged.\n"
"If you are sure you want to delete it, run 'git branch -D %s'."
msgstr ""
+"Гілка \"%s\" злита не повністю.\n"
+"Якщо ви впевнені, що хочете її видалити, виконайте \"git branch -D %s\"."
msgid "Update of config-file failed"
-msgstr ""
+msgstr "Не вдалося оновити конфігураційний файл"
msgid "cannot use -a with -d"
msgstr "не можна використовувати -a з -d"
@@ -2827,7 +2835,7 @@ msgstr "гілка \"%s\" не знайдена."
#, c-format
msgid "Deleted remote-tracking branch %s (was %s).\n"
-msgstr ""
+msgstr "Видалено гілку віддаленого відстеження %s (була %s).\n"
#, c-format
msgid "Deleted branch %s (was %s).\n"
@@ -2845,7 +2853,7 @@ msgstr "HEAD (%s) пунктів за межами refs/heads/"
#, c-format
msgid "Branch %s is being rebased at %s"
-msgstr ""
+msgstr "Гілка %s перебазується на %s"
#, c-format
msgid "Branch %s is being bisected at %s"
@@ -2868,28 +2876,28 @@ msgid "No branch named '%s'."
msgstr "Немає гілки з ім’ям \"%s\"."
msgid "Branch rename failed"
-msgstr ""
+msgstr "Не вдалося перейменувати гілку"
msgid "Branch copy failed"
-msgstr ""
+msgstr "Не вдалося створити копію гілки"
#, c-format
msgid "Created a copy of a misnamed branch '%s'"
-msgstr "Створено копію неправильно названої гілки \"%s\""
+msgstr "Створено копію невірно названої гілки \"%s\""
#, c-format
msgid "Renamed a misnamed branch '%s' away"
-msgstr "Перейменовано неправильно названу гілку \"%s\""
+msgstr "Перейменовано невірно названу гілку \"%s\""
#, c-format
msgid "Branch renamed to %s, but HEAD is not updated!"
-msgstr ""
+msgstr "Гілку перейменовано на %s, але HEAD не оновлено!"
msgid "Branch is renamed, but update of config-file failed"
-msgstr ""
+msgstr "Гілку перейменовано, але не вдалося оновити конфігураційний файл"
msgid "Branch is copied, but update of config-file failed"
-msgstr ""
+msgstr "Гілку скопійовано, але не вдалося оновити конфігураційний файл"
#, c-format
msgid ""
@@ -2897,69 +2905,73 @@ msgid ""
" %s\n"
"Lines starting with '%c' will be stripped.\n"
msgstr ""
+"Будь ласка, відредагуйте опис гілки\n"
+" %s\n"
+"Рядки, що починаються з \"%c\", будуть вилучені.\n"
msgid "Generic options"
-msgstr ""
+msgstr "Загальні опції"
msgid "show hash and subject, give twice for upstream branch"
msgstr ""
+"показувати хеш і тему, додайте двічі, щоб застосувати для висхідної гілки"
msgid "suppress informational messages"
-msgstr ""
+msgstr "приховати інформаційні повідомлення"
msgid "set branch tracking configuration"
msgstr "налаштувати конфігурацію відстежуваних гілок"
msgid "do not use"
-msgstr ""
+msgstr "не використовувати"
msgid "upstream"
-msgstr ""
+msgstr "першоджерельне сховище"
msgid "change the upstream info"
-msgstr ""
+msgstr "змінити інформацію щодо першоджерельного сховища"
msgid "unset the upstream info"
-msgstr ""
+msgstr "скинути інформацію щодо першоджерельного сховища"
msgid "use colored output"
-msgstr ""
+msgstr "використовувати кольоровий вивід"
msgid "act on remote-tracking branches"
msgstr "працювати з віддалено відстежуваними гілками"
msgid "print only branches that contain the commit"
-msgstr ""
+msgstr "виводити тільки гілки, що містять цей коміт"
msgid "print only branches that don't contain the commit"
-msgstr ""
+msgstr "виводити тільки гілки, що не містять цей коміт"
msgid "Specific git-branch actions:"
-msgstr ""
+msgstr "Специфічні git-branch дії:"
msgid "list both remote-tracking and local branches"
-msgstr ""
+msgstr "показати як віддалено відстежувані, так і локальні гілки"
msgid "delete fully merged branch"
-msgstr ""
+msgstr "видалити повністю злиту гілку"
msgid "delete branch (even if not merged)"
-msgstr ""
+msgstr "видалити гілку (навіть не повністю злиту)"
msgid "move/rename a branch and its reflog"
-msgstr ""
+msgstr "перемістити/перейменувати гілку та її журнал посилань"
msgid "move/rename a branch, even if target exists"
-msgstr ""
+msgstr "перемістити/перейменувати гілку, навіть якщо призначення існує"
msgid "do not output a newline after empty formatted refs"
-msgstr ""
+msgstr "не виводити новий рядок після порожніх форматованих посилань"
msgid "copy a branch and its reflog"
-msgstr ""
+msgstr "скопіювати гілку та її журнал посилань"
msgid "copy a branch, even if target exists"
-msgstr ""
+msgstr "скопіювати гілку, навіть якщо призначення існує"
msgid "list branch names"
msgstr "показати назви гілок"
@@ -2968,80 +2980,84 @@ msgid "show current branch name"
msgstr "показати назву поточної гілки"
msgid "create the branch's reflog"
-msgstr ""
+msgstr "створити журнал посилань гілки"
msgid "edit the description for the branch"
msgstr "редагувати опис гілки"
msgid "force creation, move/rename, deletion"
-msgstr ""
+msgstr "примусове створення, переміщення/перейменування, видалення"
msgid "print only branches that are merged"
-msgstr ""
+msgstr "вивести тільки злиті гілки"
msgid "print only branches that are not merged"
-msgstr ""
+msgstr "вивести тільки не злиті гілки"
msgid "list branches in columns"
-msgstr ""
+msgstr "виводити гілки в стовпчиках"
msgid "object"
-msgstr ""
+msgstr "обʼєкт"
msgid "print only branches of the object"
-msgstr ""
+msgstr "виводити тільки гілки об’єкта"
msgid "sorting and filtering are case insensitive"
-msgstr ""
+msgstr "сортувати та фільтрувати незалежно від регістру"
msgid "recurse through submodules"
msgstr "рекурсивно через підмодулі"
msgid "format to use for the output"
-msgstr ""
+msgstr "формат, що використовувати для виводу"
msgid "Failed to resolve HEAD as a valid ref."
msgstr "Не вдалося розпізнати HEAD як дійсне посилання."
msgid "HEAD not found below refs/heads!"
-msgstr "HEAD не знайдено під посиланнями/заголовками!"
+msgstr "HEAD не знайдено під refs/heads!"
msgid ""
"branch with --recurse-submodules can only be used if submodule."
"propagateBranches is enabled"
msgstr ""
+"гілку з --recurse-submodules можна використовувати лише якщо увімкнено "
+"submodule.propagateBranches"
msgid "--recurse-submodules can only be used to create branches"
-msgstr ""
+msgstr "--recurse-submodules можна використовувати лише для створення гілок"
msgid "branch name required"
-msgstr ""
+msgstr "назва гілки є обовʼязковою"
msgid "Cannot give description to detached HEAD"
-msgstr ""
+msgstr "Неможливо встановити опис відокремленому HEAD"
msgid "cannot edit description of more than one branch"
-msgstr ""
+msgstr "неможливо редагувати опис більш ніж однієї гілки"
msgid "cannot copy the current branch while not on any."
-msgstr ""
+msgstr "неможливо скопіювати поточну гілку, не перебуваючи на жодній з них."
msgid "cannot rename the current branch while not on any."
-msgstr ""
+msgstr "неможливо перейменувати поточну гілку, не перебуваючи на жодній з них."
msgid "too many branches for a copy operation"
-msgstr ""
+msgstr "забагато гілок для операції копіювання"
msgid "too many arguments for a rename operation"
-msgstr ""
+msgstr "забагато аргументів для операції перейменування"
msgid "too many arguments to set new upstream"
-msgstr ""
+msgstr "забагато аргументів для встановлення нового першоджерельного сховища"
#, c-format
msgid ""
"could not set upstream of HEAD to %s when it does not point to any branch."
msgstr ""
+"не вдалося встановити першождерельне сховище HEAD у %s, який не вказує на "
+"жодну гілку."
#, c-format
msgid "no such branch '%s'"
@@ -3056,7 +3072,7 @@ msgstr "забагато аргументів для скидання значе
msgid "could not unset upstream of HEAD when it does not point to any branch."
msgstr ""
-"неможливво скинути значення першоджерельного сховища для HEAD, якщо він не "
+"неможливво скинути значення першоджерельного сховища для HEAD, який не "
"вказує на жодну гілку."
#, c-format
@@ -3067,32 +3083,38 @@ msgid ""
"The -a, and -r, options to 'git branch' do not take a branch name.\n"
"Did you mean to use: -a|-r --list <pattern>?"
msgstr ""
+"Опції -a та -r для \"git branch\" не приймають назву гілки.\n"
+"Ви хотіли використати -a|-r --list <шаблон>?"
msgid ""
"the '--set-upstream' option is no longer supported. Please use '--track' or "
"'--set-upstream-to' instead."
msgstr ""
+"опція \"--set-upstream\" більше не підтримується. Будь ласка, використовуйте "
+"\"--track\" або \"--set-upstream-to\"."
msgid "git version:\n"
-msgstr ""
+msgstr "версія git:\n"
#, c-format
msgid "uname() failed with error '%s' (%d)\n"
-msgstr ""
+msgstr "uname() завершився невдало з помилкою \"%s\" (%d)\n"
msgid "compiler info: "
-msgstr ""
+msgstr "інформація щодо компілятора: "
msgid "libc info: "
-msgstr ""
+msgstr "информація щодо libc: "
msgid "not run from a git repository - no hooks to show\n"
-msgstr ""
+msgstr "запущено не з git сховища - немає гачків для показу\n"
msgid ""
"git bugreport [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n"
" [--diagnose[=<mode>]]"
msgstr ""
+"git bugreport [(-o | --output-directory) <шлях>] [(-s | --suffix) <формат>]\n"
+" [--diagnose[=<режим>]]"
msgid ""
"Thank you for filling out a Git bug report!\n"
@@ -3111,19 +3133,38 @@ msgid ""
"Please review the rest of the bug report below.\n"
"You can delete any lines you don't wish to share.\n"
msgstr ""
+"Дякуємо, що заповнили звіт про помилку в Git!\n"
+"Будь ласка, дайте відповіді на наступні питання, щоб допомогти нам зрозуміти "
+"вашу проблему.\n"
+"\n"
+"Що ви робили до того, як сталася помилка (кроки для відтворення вашої "
+"проблеми)\n"
+"\n"
+"Який результат ви очікували? (Очікувана поведінка)\n"
+"\n"
+"Що сталося замість цього? (Фактична поведінка)\n"
+"\n"
+"Чим відрізняється те, що ви очікували, від того, що сталося насправді?\n"
+"\n"
+"Будь-що інше, що ви хочете додати:\n"
+"\n"
+"Будь ласка, перегляньте решту повідомлення про ваду нижче.\n"
+"Ви можете видалити будь-які рядки, якими не хочете ділитися.\n"
msgid "mode"
-msgstr ""
+msgstr "режим"
msgid ""
"create an additional zip archive of detailed diagnostics (default 'stats')"
msgstr ""
+"створити додатковий zip-архів з детальною діагностикою (за замовчуванням "
+"\"stats\")"
msgid "specify a destination for the bugreport file(s)"
-msgstr ""
+msgstr "вказати місце призначення для файла(-ів) звіта про помилку"
msgid "specify a strftime format suffix for the filename(s)"
-msgstr ""
+msgstr "вказати суфікс формату strftime для назви файла(-ів)"
#, c-format
msgid "could not create leading directories for '%s'"
@@ -3134,10 +3175,10 @@ msgid "unable to create diagnostics archive %s"
msgstr "не вдалося створити архів діагностики %s"
msgid "System Info"
-msgstr ""
+msgstr "Інформація про систему"
msgid "Enabled Hooks"
-msgstr ""
+msgstr "Увімкнені гачки"
#, c-format
msgid "unable to write to %s"
@@ -3145,49 +3186,51 @@ msgstr "не вдалося записати до %s"
#, c-format
msgid "Created new report at '%s'.\n"
-msgstr ""
+msgstr "Створено новий звіт в \"%s\".\n"
msgid ""
"git bundle create [-q | --quiet | --progress]\n"
" [--version=<version>] <file> <git-rev-list-args>"
msgstr ""
+"git bundle create [-q | --quiet | --progress]\n"
+" [--version=<версія>] <файл> <git-rev-list-агрументи>"
msgid "git bundle verify [-q | --quiet] <file>"
-msgstr ""
+msgstr "git bundle verify [-q | --quiet] <файл>"
msgid "git bundle list-heads <file> [<refname>...]"
-msgstr ""
+msgstr "git bundle list-heads <файл> [<назва-посилання>...]"
msgid "git bundle unbundle [--progress] <file> [<refname>...]"
-msgstr ""
+msgstr "git bundle unbundle [--progress] <файл> [<назва-посилання>...]"
msgid "need a <file> argument"
-msgstr ""
+msgstr "потрібен аргумент <файл>"
msgid "do not show progress meter"
-msgstr ""
+msgstr "не показувати хід виконання"
msgid "show progress meter"
-msgstr "показувати прогрес виконання"
+msgstr "показувати хід виконання"
msgid "historical; same as --progress"
-msgstr ""
+msgstr "історичний; те саме, що --progress"
msgid "historical; does nothing"
msgstr "історична; не робить нічогісенько"
msgid "specify bundle format version"
-msgstr ""
+msgstr "вказати версію формату пакунка"
msgid "Need a repository to create a bundle."
-msgstr ""
+msgstr "Для створення пакунка потрібне сховище."
msgid "do not show bundle details"
-msgstr ""
+msgstr "не показувати деталі пакунка"
#, c-format
msgid "%s is okay\n"
-msgstr ""
+msgstr "%s у порядку\n"
msgid "Need a repository to unbundle."
msgstr "Потрібне сховище для розділення."
@@ -3200,258 +3243,273 @@ msgid "cannot read object %s '%s'"
msgstr "неможливо прочитати об’єкт %s \"%s\""
msgid "flush is only for --buffer mode"
-msgstr ""
+msgstr "flush тільки для режиму --buffer"
msgid "empty command in input"
-msgstr ""
+msgstr "порожня команда на вході"
#, c-format
msgid "whitespace before command: '%s'"
-msgstr ""
+msgstr "пробільний символ перед командою: \"%s\""
#, c-format
msgid "%s requires arguments"
-msgstr ""
+msgstr "%s потребує аргументів"
#, c-format
msgid "%s takes no arguments"
msgstr "%s не потребує аргументів"
msgid "only one batch option may be specified"
-msgstr ""
+msgstr "можна вказати лише одну групову опцію"
msgid "git cat-file <type> <object>"
-msgstr ""
+msgstr "git cat-file <тип> <об’єкт>"
msgid "git cat-file (-e | -p) <object>"
-msgstr ""
+msgstr "git cat-file (-e | -p) <об’єкт>"
msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr ""
+msgstr "git cat-file (-t | -s) [--allow-unknown-type] <об’єкт>"
msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
+"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
+"objects]\n"
+" [--buffer] [--follow-symlinks] [--unordered]\n"
+" [--textconv | --filters] [-Z]"
msgid ""
"git cat-file (--textconv | --filters)\n"
" [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]"
msgstr ""
+"git cat-file (--textconv | --filters)\n"
+" [<ревізія>:<шлях|деревоподібне-джерело> | --path=<шлях|"
+"деревоподібне-джерело> <ревізія>]"
msgid "Check object existence or emit object contents"
-msgstr ""
+msgstr "Перевірити існування об’єкта або видати вміст об’єкта"
msgid "check if <object> exists"
msgstr "перевірити, чи існує <об’єкт>"
msgid "pretty-print <object> content"
-msgstr ""
+msgstr "pretty-print вміст <об’єкта>"
msgid "Emit [broken] object attributes"
-msgstr ""
+msgstr "Видати [пошкоджені] атрибути об’єкта"
msgid "show object type (one of 'blob', 'tree', 'commit', 'tag', ...)"
msgstr ""
+"показати тип об’єкта (один з \"blob\", \"tree\", \"commit\", \"tag\", ...)"
msgid "show object size"
-msgstr ""
+msgstr "показати розмір об’єкта"
msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr ""
+msgstr "дозволити -s та -t працювати з пошкодженими/зіпсованими об’єктами"
msgid "use mail map file"
-msgstr ""
+msgstr "використовувати файл відповідності поштових адрес"
msgid "Batch objects requested on stdin (or --batch-all-objects)"
-msgstr ""
+msgstr "Пакетний запит об’єктів з stdin (або --batch-all-objects)"
msgid "show full <object> or <rev> contents"
-msgstr ""
+msgstr "показати повний вміст <об’єкта> або <ревізії>"
msgid "like --batch, but don't emit <contents>"
-msgstr ""
+msgstr "як --batch, але не виводить <вміст>"
msgid "stdin is NUL-terminated"
-msgstr ""
+msgstr "stdin закінчується NUL"
+
+msgid "stdin and stdout is NUL-terminated"
+msgstr "stdin та stdout закінчуються NUL"
msgid "read commands from stdin"
msgstr "читати команди з stdin"
msgid "with --batch[-check]: ignores stdin, batches all known objects"
-msgstr ""
+msgstr "з --batch[-check]: ігнорує stdin, групує всі відомі об’єкти"
msgid "Change or optimize batch output"
-msgstr ""
+msgstr "Змінити або оптимізувати груповий вивід"
msgid "buffer --batch output"
-msgstr ""
+msgstr "буферизувати --batch вивід"
msgid "follow in-tree symlinks"
-msgstr ""
+msgstr "розвʼязувати символьні посилання в дереві"
msgid "do not order objects before emitting them"
-msgstr ""
+msgstr "не упорядковувати об’єкти перед випуском"
msgid ""
"Emit object (blob or tree) with conversion or filter (stand-alone, or with "
"batch)"
msgstr ""
+"Видавати об’єкт (blob або tree) з перетворенням або фільтром (окремо або з "
+"групою)"
msgid "run textconv on object's content"
-msgstr ""
+msgstr "виконати textconv над вмістом об’єкта"
msgid "run filters on object's content"
-msgstr ""
+msgstr "запустити фільтри на вміст об’єкта"
msgid "blob|tree"
-msgstr ""
+msgstr "blob|дерево"
msgid "use a <path> for (--textconv | --filters); Not with 'batch'"
-msgstr ""
+msgstr "використати <шлях> для (--textconv | --filters); не з \"batch\""
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
-msgstr ""
+msgstr "\"%s=<%s>\" потребує \"%s\" або \"%s\""
msgid "path|tree-ish"
-msgstr ""
+msgstr "шлях|деревоподібне-джерело"
#, c-format
msgid "'%s' requires a batch mode"
-msgstr ""
+msgstr "\"%s\" потребує групового режиму"
#, c-format
msgid "'-%c' is incompatible with batch mode"
-msgstr ""
+msgstr "\"-%c\" несумісний з груповим режимом"
msgid "batch modes take no arguments"
-msgstr ""
+msgstr "групові режими не потребують аргументів"
#, c-format
msgid "<rev> required with '%s'"
-msgstr ""
+msgstr "<ревізія> є обов’язковою для \"%s\""
#, c-format
msgid "<object> required with '-%c'"
-msgstr ""
+msgstr "<об’єкт> є обов’язковим для \"-%c\""
#, c-format
msgid "only two arguments allowed in <type> <object> mode, not %d"
-msgstr ""
+msgstr "у режимі <тип> <об’єкт> дозволено лише два аргументи, а не %d"
msgid ""
"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
"<pathname>..."
msgstr ""
+"git check-attr [--source <деревоподібне-джерело>] [-a | --all | "
+"<атрибут>...] [--] <назва-шляху>..."
msgid ""
"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
msgstr ""
-"git check-attr --stdin [-z] [--source <деревоподібне джерело>] [-a | --all | "
+"git check-attr --stdin [-z] [--source <деревоподібне-джерело>] [-a | --all | "
"<атрибут>...]"
msgid "report all attributes set on file"
-msgstr ""
+msgstr "звітувати про всі атрибути, встановлені у файлі"
msgid "use .gitattributes only from the index"
-msgstr ""
+msgstr "використовувати .gitattributes тільки з індексу"
msgid "read file names from stdin"
-msgstr ""
+msgstr "зчитувати назви файлів з stdin"
msgid "terminate input and output records by a NUL character"
-msgstr ""
+msgstr "завершувати вхідні та вихідні записи символом NUL"
msgid "<tree-ish>"
-msgstr ""
+msgstr "<деревоподібне-джерело>"
msgid "which tree-ish to check attributes at"
msgstr "атрибути якого деревоподібного джерела перевіряти"
msgid "suppress progress reporting"
-msgstr "не звітувати прогрес"
+msgstr "не звітувати про хід виконання"
msgid "show non-matching input paths"
-msgstr ""
+msgstr "показати неспівпадіння вхідних шляхів"
msgid "ignore index when checking"
-msgstr ""
+msgstr "ігнорувати індекс під час перевірки"
msgid "cannot specify pathnames with --stdin"
-msgstr ""
+msgstr "неможливо вказувати назви шляхів із --stdin"
msgid "-z only makes sense with --stdin"
-msgstr ""
+msgstr "-z має сенс тільки з --stdin"
msgid "no path specified"
-msgstr "шлях не вказано"
+msgstr "шлях не зазначено"
msgid "--quiet is only valid with a single pathname"
-msgstr ""
+msgstr "--quiet дійсний лише з однією назвою шляху"
msgid "cannot have both --quiet and --verbose"
-msgstr ""
+msgstr "неможливо мати одночасно --quiet і --verbose"
msgid "--non-matching is only valid with --verbose"
-msgstr ""
+msgstr "--non-matching діє тільки з --verbose"
msgid "git check-mailmap [<options>] <contact>..."
msgstr "git check-mailmap [<опції>] <контакт>..."
msgid "also read contacts from stdin"
-msgstr ""
+msgstr "також читати контакти з stdin"
#, c-format
msgid "unable to parse contact: %s"
msgstr "не вдалося розібрати контакт: %s"
msgid "no contacts specified"
-msgstr ""
+msgstr "контакти не вказані"
msgid "git checkout--worker [<options>]"
msgstr "git checkout--worker [<опції>]"
msgid "string"
-msgstr ""
+msgstr "строка"
msgid "when creating files, prepend <string>"
-msgstr ""
+msgstr "при створенні файлів додавати <строку> напочатку"
msgid "git checkout-index [<options>] [--] [<file>...]"
msgstr "git checkout-index [<опції>] [—] [<файл>...]"
msgid "stage should be between 1 and 3 or all"
-msgstr ""
+msgstr "стадія має бути від 1 до 3 або all"
msgid "check out all files in the index"
-msgstr ""
+msgstr "переключити стан для всіх файлів в індексі"
msgid "do not skip files with skip-worktree set"
-msgstr ""
+msgstr "не пропускати файли зі встановленим skip-worktree"
msgid "force overwrite of existing files"
-msgstr ""
+msgstr "примусово перезаписати існуючі файли"
msgid "no warning for existing files and files not in index"
-msgstr ""
+msgstr "не попереджувати про існуючі файли та файли, яких немає в індексі"
msgid "don't checkout new files"
-msgstr ""
+msgstr "не переключати стан для нових файлів"
msgid "update stat information in the index file"
msgstr "оновити статистичну інформацію в індексному файлі"
msgid "read list of paths from the standard input"
-msgstr ""
+msgstr "зчитати список шляхів зі стандартного вводу"
msgid "write the content to temporary files"
-msgstr ""
+msgstr "записати вміст у тимчасові файли"
msgid "copy out the files from named stage"
-msgstr ""
+msgstr "скопіювати файли з іменованої стадії"
msgid "git checkout [<options>] <branch>"
msgstr "git checkout [<опції>] <гілка>"
@@ -3467,27 +3525,27 @@ msgstr "git restore [<опції>] [--source=<гілка>] <файл>..."
#, c-format
msgid "path '%s' does not have our version"
-msgstr "шлях '%s' не містить нашої версії"
+msgstr "шлях \"%s\" не містить нашої версії"
#, c-format
msgid "path '%s' does not have their version"
-msgstr "шлях '%s' не містить їхньої версії"
+msgstr "шлях \"%s\" не містить їхньої версії"
#, c-format
msgid "path '%s' does not have all necessary versions"
-msgstr "шлях '%s' не містить всіх необхідних версій"
+msgstr "шлях \"%s\" не містить всіх необхідних версій"
#, c-format
msgid "path '%s' does not have necessary versions"
-msgstr "шлях '%s' не містить необхідних версій"
+msgstr "шлях \"%s\" не містить необхідних версій"
#, c-format
msgid "path '%s': cannot merge"
-msgstr "шлях '%s': неможливо злити"
+msgstr "шлях \"%s\": неможливо злити"
#, c-format
msgid "Unable to add merge result for '%s'"
-msgstr "Неможливо додати результат злиття для '%s'"
+msgstr "Неможливо додати результат злиття для \"%s\""
#, c-format
msgid "Recreated %d merge conflict"
@@ -3512,23 +3570,23 @@ msgstr[2] "Оновлено %d шляхів з індексу"
#, c-format
msgid "'%s' cannot be used with updating paths"
-msgstr "'%s' не можна використовувати зі шляхами оновлення"
+msgstr "\"%s\" не можна використовувати зі шляхами оновлення"
#, c-format
msgid "Cannot update paths and switch to branch '%s' at the same time."
-msgstr "Неможливо одночасно оновити шляхи та переключитись на гілку '%s'."
+msgstr "Неможливо одночасно оновити шляхи та переключитись на гілку \"%s\"."
#, c-format
msgid "neither '%s' or '%s' is specified"
-msgstr "не вказано ні '%s', ні '%s'"
+msgstr "не вказано ні \"%s\", ні \"%s\""
#, c-format
msgid "'%s' must be used when '%s' is not specified"
-msgstr "'%s' повинен використовуватися, якщо не вказано '%s'"
+msgstr "\"%s\" повинен використовуватися, якщо не вказано \"%s\""
#, c-format
msgid "'%s' or '%s' cannot be used with %s"
-msgstr "'%s' або '%s' не можна використовувати з %s"
+msgstr "\"%s\" або \"%s\" не можна використовувати з %s"
#, c-format
msgid "path '%s' is unmerged"
@@ -3547,7 +3605,7 @@ msgstr ""
#, c-format
msgid "Can not do reflog for '%s': %s\n"
-msgstr "Неможливо виконати reflog для '%s': %s\n"
+msgstr "Неможливо виконати reflog для \"%s\": %s\n"
msgid "HEAD is now at"
msgstr "HEAD зараз на"
@@ -3557,11 +3615,11 @@ msgstr "не вдалося оновити HEAD"
#, c-format
msgid "Reset branch '%s'\n"
-msgstr "Скинути гілку '%s'\n"
+msgstr "Скинути гілку \"%s\"\n"
#, c-format
msgid "Already on '%s'\n"
-msgstr "Вже на '%s'\n"
+msgstr "Вже на \"%s\"\n"
#, c-format
msgid "Switched to and reset branch '%s'\n"
@@ -3569,11 +3627,11 @@ msgstr "Переключено на та скинуто гілку '%s'\n"
#, c-format
msgid "Switched to a new branch '%s'\n"
-msgstr "Переключено на нову гілку '%s'\n"
+msgstr "Переключено на нову гілку \"%s\"\n"
#, c-format
msgid "Switched to branch '%s'\n"
-msgstr "Переключено на гілку '%s'\n"
+msgstr "Переключено на гілку \"%s\"\n"
#, c-format
msgid " ... and %d more.\n"
@@ -3596,7 +3654,7 @@ msgstr[0] ""
"\n"
"%s\n"
msgstr[1] ""
-"Попередження: ви залишаєте позаду %d коміта, не підключених до\n"
+"Попередження: ви залишаєте позаду %d коміти, не підключених до\n"
"жодної з ваших гілок:\n"
"\n"
"%s\n"
@@ -3677,7 +3735,7 @@ msgstr ""
#, c-format
msgid "'%s' matched multiple (%d) remote tracking branches"
-msgstr "\"%s\" відповідає декільком (%d) гілкам віддаленого відстежування"
+msgstr "\"%s\" відповідає кільком (%d) гілкам віддаленого відстежування"
msgid "only one reference expected"
msgstr "очікувалось тільки одне посилання"
@@ -3696,19 +3754,19 @@ msgstr "посилання не є деревом: %s"
#, c-format
msgid "a branch is expected, got tag '%s'"
-msgstr "очікувалась гілка, надано тег '%s'"
+msgstr "очікувалась гілка, надано тег \"%s\""
#, c-format
msgid "a branch is expected, got remote branch '%s'"
-msgstr "очікувалась гілка, надана віддалена гілка '%s'"
+msgstr "очікувалась гілка, надана віддалена гілка \"%s\""
#, c-format
msgid "a branch is expected, got '%s'"
-msgstr "очікувалась гілка, надано '%s'"
+msgstr "очікувалась гілка, надано \"%s\""
#, c-format
msgid "a branch is expected, got commit '%s'"
-msgstr "очікувалась гілка, надано коміт '%s'"
+msgstr "очікувалась гілка, надано коміт \"%s\""
msgid ""
"If you want to detach HEAD at the commit, try again with the --detach option."
@@ -3804,17 +3862,17 @@ msgid "do not check if another worktree is holding the given ref"
msgstr "не перевіряти, чи інше робоче дерево містить дане посилання"
msgid "checkout our version for unmerged files"
-msgstr "використовувати нашу версію для незлитих файлів"
+msgstr "використовувати нашу версію для не злитих файлів"
msgid "checkout their version for unmerged files"
-msgstr "використовувати їхню версію для незлитих файлів"
+msgstr "використовувати їхню версію для не злитих файлів"
msgid "do not limit pathspecs to sparse entries only"
msgstr "не обмежувати визначники шляхів лише розрідженими записами"
#, c-format
msgid "options '-%c', '-%c', and '%s' cannot be used together"
-msgstr "опції '-%c', '-%c' та '%s' не можуть використовуватись разом"
+msgstr "опції \"-%c\", \"-%c\" та \"%s\" не можна використовувати разом"
msgid "--track needs a branch name"
msgstr "--track потребує назви гілки"
@@ -3858,7 +3916,7 @@ msgid "create/reset and checkout a branch"
msgstr "створити/скинути та перейти до нової гілки"
msgid "create reflog for new branch"
-msgstr "створити reflog для нової гілки"
+msgstr "створити журнал посилань для нової гілки"
msgid "second guess 'git checkout <no-such-branch>' (default)"
msgstr "друга здогадка \"git checkout <гілка-не-існує>\" (за замовчуванням)"
@@ -3888,7 +3946,7 @@ msgid "restore the working tree (default)"
msgstr "відновити робоче дерево (за замовчуванням)"
msgid "ignore unmerged entries"
-msgstr "ігнорувати незлиті записи"
+msgstr "ігнорувати не злиті записи"
msgid "use overlay mode"
msgstr "використовувати режим накладення"
@@ -3897,6 +3955,8 @@ msgid ""
"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] "
"[<pathspec>...]"
msgstr ""
+"git clean [-d] [-f] [-i] [-n] [-q] [-e <шаблон>] [-x | -X] [--] [<визначник "
+"шляху>...]"
#, c-format
msgid "Removing %s\n"
@@ -3923,10 +3983,10 @@ msgid "could not lstat %s\n"
msgstr "не вдалося виконати lstat %s\n"
msgid "Refusing to remove current working directory\n"
-msgstr "Відмова в видаленні поточної робочої директорії\n"
+msgstr "Відмовлено у видаленні поточної робочої директорії\n"
msgid "Would refuse to remove current working directory\n"
-msgstr "Було б відмовлено в видаленні поточної робочої директорії\n"
+msgstr "Було б відмовлено у видаленні поточної робочої директорії\n"
#, c-format
msgid ""
@@ -3935,6 +3995,10 @@ msgid ""
"foo - select item based on unique prefix\n"
" - (empty) select nothing\n"
msgstr ""
+"Підказка по опціям:\n"
+"1 - вибрати пронумерований елемент\n"
+"foo - вибрати елемент за унікальним префіксом\n"
+" - (порожньо) - не вибирати нічого\n"
#, c-format
msgid ""
@@ -3947,27 +4011,35 @@ msgid ""
"* - choose all items\n"
" - (empty) finish selecting\n"
msgstr ""
+"Підказка по опціям:\n"
+"1 - вибрати один елемент\n"
+"3-5 - вибрати діапазон елементів\n"
+"2-3,6-9 - вибрати кілька діапазонів\n"
+"foo - вибрати елемент за унікальним префіксом\n"
+"-... - скасувати вибір вказаних елементів\n"
+"* - вибрати всі елементи\n"
+" - (порожньо) завершити вибір\n"
#, c-format
msgid "Huh (%s)?\n"
-msgstr ""
+msgstr "Га (%s)?\n"
#, c-format
msgid "Input ignore patterns>> "
-msgstr ""
+msgstr "Введіть шаблони ігнорування>> "
#, c-format
msgid "WARNING: Cannot find items matched by: %s"
-msgstr ""
+msgstr "ПОПЕРЕДЖЕННЯ: Не вдалося знайти елементи, що відповідають: %s"
msgid "Select items to delete"
-msgstr ""
+msgstr "Виберіть елементи для видалення"
#. TRANSLATORS: Make sure to keep [y/N] as is
#, c-format
msgid "Remove %s [y/N]? "
-msgstr ""
+msgstr "Видалити %s [y/N]? "
msgid ""
"clean - start cleaning\n"
@@ -3978,33 +4050,40 @@ msgid ""
"help - this screen\n"
"? - help for prompt selection"
msgstr ""
+"clean - розпочати прибирання\n"
+"filter by pattern - виключити елементи з прибирання\n"
+"select by numbers - вибрати елементи для прибирання за номерами\n"
+"ask each - підтверджувати кожне видалення (як \"rm -i\")\n"
+"quit - припинити прибирання\n"
+"help - показати цей екран\n"
+"? - підказка для швидкого вибору"
msgid "Would remove the following item:"
msgid_plural "Would remove the following items:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Видалить наступний елемент:"
+msgstr[1] "Видалить наступні елементи:"
+msgstr[2] "Видалить наступні елементи:"
msgid "No more files to clean, exiting."
-msgstr ""
+msgstr "Більше немає файлів для прибирання, вихід."
msgid "do not print names of files removed"
-msgstr ""
+msgstr "не виводити назви видалених файлів"
msgid "force"
-msgstr ""
+msgstr "примусово"
msgid "interactive cleaning"
-msgstr ""
+msgstr "інтерактивне прибирання"
msgid "remove whole directories"
-msgstr ""
+msgstr "видаляти цілі директорії"
msgid "pattern"
-msgstr ""
+msgstr "шаблон"
msgid "add <pattern> to ignore rules"
-msgstr ""
+msgstr "додати <шаблон> в правила ігнорування"
msgid "remove ignored files, too"
msgstr "видалити також ігноровані файли"
@@ -4016,11 +4095,15 @@ msgid ""
"clean.requireForce set to true and neither -i, -n, nor -f given; refusing to "
"clean"
msgstr ""
+"clean.requireForce встановлено у true і не задано ні -i, ні -n, ні -f; "
+"відмовлено в прибиранні"
msgid ""
"clean.requireForce defaults to true and neither -i, -n, nor -f given; "
"refusing to clean"
msgstr ""
+"clean.requireForce встановлено у true за замовчуванням і не задано ні -i, ні "
+"-n, ні -f; відмовлено в прибиранні"
msgid "-x and -X cannot be used together"
msgstr "-x та -X не можна використовувати разом"
@@ -4032,7 +4115,7 @@ msgid "don't clone shallow repository"
msgstr "не клонувати неглибоке сховище"
msgid "don't create a checkout"
-msgstr "не переходити до гілки"
+msgstr "не переходити на гілку"
msgid "create a bare repository"
msgstr "створити порожнє сховище"
@@ -4088,16 +4171,16 @@ msgid "depth"
msgstr "глибина"
msgid "create a shallow clone of that depth"
-msgstr "створити поверхневий клон вказаної глибини"
+msgstr "створити неглибокий клон вказаної глибини"
msgid "create a shallow clone since a specific time"
-msgstr "створити поверхневий клон з певного часу"
+msgstr "створити неглибокий клон з певного часу"
msgid "revision"
msgstr "ревізія"
msgid "deepen history of shallow clone, excluding rev"
-msgstr "поглибити історію поверхневого клону, за винятком rev"
+msgstr "поглибити історію неглибокого клону, за винятком ревізії"
msgid "clone only one branch, HEAD or --branch"
msgstr "клонувати лише одну гілку, HEAD або --branch"
@@ -4107,10 +4190,10 @@ msgstr ""
"не клонувати жодних тегів і не слідувати за ними під час отримувань пізніше"
msgid "any cloned submodules will be shallow"
-msgstr "будь-які клоновані підмодулі будуть поверхневими"
+msgstr "будь-які клоновані підмодулі будуть неглибокими"
msgid "gitdir"
-msgstr "git-директорія"
+msgstr "git директорія"
msgid "separate git dir from working tree"
msgstr "відокремити git-директорію від робочого дерева"
@@ -4127,14 +4210,8 @@ msgstr "тільки для сервера"
msgid "option to transmit"
msgstr "опція для передачі"
-msgid "use IPv4 addresses only"
-msgstr "використовувати тільки IPv4 адреси"
-
-msgid "use IPv6 addresses only"
-msgstr "використовувати тільки IPv6 адреси"
-
msgid "apply partial clone filters to submodules"
-msgstr "застосувати часткові фільтри клонів до підмодулів"
+msgstr "застосувати фільтри часткового клонування до підмодулів"
msgid "any cloned submodules will use their remote-tracking branch"
msgstr ""
@@ -4143,7 +4220,7 @@ msgstr ""
msgid "initialize sparse-checkout file to include only files at root"
msgstr ""
-"ініціалізувати, щоб файл часткового переходу включав лише файли в корені"
+"ініціалізувати, щоб файл розрідженого переходу включав лише файли в корені"
msgid "uri"
msgstr "uri"
@@ -4153,11 +4230,11 @@ msgstr "URI для завантаження пакунків перед отри
#, c-format
msgid "info: Could not add alternate for '%s': %s\n"
-msgstr "инфо: Не вдалося додати альтернативу для '%s': %s\n"
+msgstr "инфо: Не вдалося додати запозичений обʼєкт для \"%s\": %s\n"
#, c-format
msgid "failed to stat '%s'"
-msgstr "не вдалося виконати stat '%s'"
+msgstr "не вдалося виконати stat \"%s\""
#, c-format
msgid "%s exists and is not a directory"
@@ -4165,31 +4242,31 @@ msgstr "%s існує і не є директорією"
#, c-format
msgid "'%s' is a symlink, refusing to clone with --local"
-msgstr "\"%s\" є символьним посиланням, відмова від клонування з --local"
+msgstr "\"%s\" є символьним посиланням, відмовлено в клонуванні з --local"
#, c-format
msgid "failed to start iterator over '%s'"
-msgstr "не вдалося запустити перебір для '%s'"
+msgstr "не вдалося запустити перебір для \"%s\""
#, c-format
msgid "symlink '%s' exists, refusing to clone with --local"
-msgstr "символьне посилання '%s' існує, не можу клонувати з --local"
+msgstr "символьне посилання \"%s\" існує, не можу клонувати з --local"
#, c-format
msgid "failed to unlink '%s'"
-msgstr "не вдалося розʼєднати '%s'"
+msgstr "не вдалося видалити \"%s\""
#, c-format
msgid "failed to create link '%s'"
-msgstr "не вдалося створити посилання '%s'"
+msgstr "не вдалося створити посилання \"%s\""
#, c-format
msgid "failed to copy file to '%s'"
-msgstr "не вдалося скопіювати файл у '%s'"
+msgstr "не вдалося скопіювати файл у \"%s\""
#, c-format
msgid "failed to iterate over '%s'"
-msgstr "не вдалося перебрати '%s'"
+msgstr "не вдалося перебрати \"%s\""
#, c-format
msgid "done.\n"
@@ -4200,7 +4277,7 @@ msgid ""
"You can inspect what was checked out with 'git status'\n"
"and retry with 'git restore --source=HEAD :/'\n"
msgstr ""
-"Клонування пройшло успішно, але не вдалося перейти до гілки.\n"
+"Клонування пройшло успішно, але не вдалося перейти на гілку.\n"
"Ви можете перевірити, що було додано за допомогою 'git status'\n"
"і повторити спробу за допомогою 'git restore --source=HEAD :/'\n"
@@ -4216,7 +4293,7 @@ msgid "unable to update %s"
msgstr "не вдалося оновити %s"
msgid "failed to initialize sparse-checkout"
-msgstr "не вдалося ініціалізувати частковий перехід"
+msgstr "не вдалося ініціалізувати розріджений перехід"
msgid "remote HEAD refers to nonexistent ref, unable to checkout"
msgstr "віддалений HEAD посилається на неіснуючого рефа, неможливо перейти"
@@ -4231,7 +4308,7 @@ msgid "cannot repack to clean up"
msgstr "неможливо перепакувати, щоб очистити"
msgid "cannot unlink temporary alternates file"
-msgstr "не вдається розʼєднати файл тимчасових альтернатив"
+msgstr "неможливо видалити тимчасовий файл запозичених обʼєктів"
msgid "Too many arguments."
msgstr "Забагато аргументів."
@@ -4247,7 +4324,7 @@ msgstr ""
#, c-format
msgid "repository '%s' does not exist"
-msgstr "сховище '%s' не існує"
+msgstr "сховище \"%s\" не існує"
#, c-format
msgid "depth %s is not a positive number"
@@ -4255,31 +4332,31 @@ msgstr "глибина %s не є додатнім числом"
#, c-format
msgid "destination path '%s' already exists and is not an empty directory."
-msgstr "шлях призначення '%s' вже існує і не є порожньою директорією."
+msgstr "шлях призначення \"%s\" вже існує і не є порожньою директорією."
#, c-format
msgid "repository path '%s' already exists and is not an empty directory."
-msgstr "шлях до сховища '%s' вже існує і не є порожньою директорією."
+msgstr "шлях до сховища \"%s\" вже існує і не є порожньою директорією."
#, c-format
msgid "working tree '%s' already exists."
-msgstr "робоче дерево '%s' вже існує."
+msgstr "робоче дерево \"%s\" вже існує."
#, c-format
msgid "could not create leading directories of '%s'"
-msgstr "не вдалося створити провідні директорії для '%s'"
+msgstr "не вдалося створити провідні директорії для \"%s\""
#, c-format
msgid "could not create work tree dir '%s'"
-msgstr "не вдалося створити директорію робочого дерева '%s'"
+msgstr "не вдалося створити директорію робочого дерева \"%s\""
#, c-format
msgid "Cloning into bare repository '%s'...\n"
-msgstr "Клонування у порожнє сховище '%s'...\n"
+msgstr "Клонування у порожнє сховище \"%s\"...\n"
#, c-format
msgid "Cloning into '%s'...\n"
-msgstr "Клонування в '%s'...\n"
+msgstr "Клонування в \"%s\"..\n"
msgid ""
"clone --recursive is not compatible with both --reference and --reference-if-"
@@ -4314,26 +4391,26 @@ msgid "source repository is shallow, reject to clone."
msgstr "джерельне сховище є неглибоким, клонування відхилено."
msgid "source repository is shallow, ignoring --local"
-msgstr "джерельне сховище є неглибоким, --local ігнорується"
+msgstr "джерельне сховище є неглибоким, --local ігноровано"
msgid "--local is ignored"
-msgstr "--local ігнорується"
+msgstr "--local ігноровано"
msgid "cannot clone from filtered bundle"
-msgstr "неможливо клонувати з відфільтрованого пакета"
+msgstr "неможливо клонувати з відфільтрованого пакунка"
msgid "failed to initialize the repo, skipping bundle URI"
-msgstr "не вдалося ініціалізувати репо, URI пакета пропускається"
+msgstr "не вдалося ініціалізувати сховище, URI пакунка пропущено"
#, c-format
msgid "failed to fetch objects from bundle URI '%s'"
-msgstr "не вдалося отримати об'єкти з пакету URI '%s'"
+msgstr "не вдалося отримати обʼєкти з пакунка URI '%s'"
msgid "failed to fetch advertised bundles"
-msgstr "не вдалося отримати обіцяні пакети"
+msgstr "не вдалося отримати обіцяні пакунки"
msgid "remote transport reported error"
-msgstr "операція віддаленного отримання повідомила про помилку"
+msgstr "операція віддаленого отримання повідомила про помилку"
#, c-format
msgid "Remote branch %s not found in upstream %s"
@@ -4346,29 +4423,31 @@ msgid "git column [<options>]"
msgstr "git column [<опції>]"
msgid "lookup config vars"
-msgstr ""
+msgstr "пошук параметрів конфігурації"
msgid "layout to use"
-msgstr ""
+msgstr "схема розташування"
msgid "maximum width"
-msgstr ""
+msgstr "максимальна ширина"
msgid "padding space on left border"
-msgstr ""
+msgstr "відступ по лівому краю"
msgid "padding space on right border"
-msgstr ""
+msgstr "відступ по правому краю"
msgid "padding space between columns"
-msgstr ""
+msgstr "відступ між стовпчиками"
msgid "--command must be the first argument"
-msgstr ""
+msgstr "--command має бути першим аргументом"
msgid ""
"git commit-graph verify [--object-dir <dir>] [--shallow] [--[no-]progress]"
msgstr ""
+"git commit-graph verify [--object-dir <директорія>] [--shallow] [--"
+"[no-]progress]"
msgid ""
"git commit-graph write [--object-dir <dir>] [--append]\n"
@@ -4378,15 +4457,22 @@ msgid ""
"[no-]progress]\n"
" <split options>"
msgstr ""
+"git commit-graph write [--object-dir <директорія>] [--append] [--object-dir "
+"<директорія>] [--append] [--object-dir <директорія>] [--append\n"
+" [--split[=<стратегія>]] [--reachable | --stdin-packs "
+"| --stdin-commits]\n"
+" [--changed-paths] [--[no-]max-new-filters <число>] [--"
+"[no-]progress]\n"
+" <опції розділення>"
msgid "dir"
-msgstr "dir"
+msgstr "директорія"
msgid "the object directory to store the graph"
-msgstr ""
+msgstr "директорія об’єктів для зберігання графу"
msgid "if the commit-graph is split, only verify the tip file"
-msgstr ""
+msgstr "якщо коміт-граф розщеплено, перевіряти тільки файл підказок"
#, c-format
msgid "Could not open commit-graph '%s'"
@@ -4394,11 +4480,11 @@ msgstr "Не вдалося відкрити коміт-граф \"%s\""
#, c-format
msgid "unrecognized --split argument, %s"
-msgstr ""
+msgstr "нерозпізнаний --split аргумент, %s"
#, c-format
msgid "unexpected non-hex object ID: %s"
-msgstr ""
+msgstr "неочікуваний не hex ідентифікатор обʼєкта: %s"
#, c-format
msgid "invalid object: %s"
@@ -4406,55 +4492,60 @@ msgstr "неприпустимий об’єкт: %s"
#, c-format
msgid "option `%s' expects a numerical value"
-msgstr ""
+msgstr "опція \"%s\" очікує числове значення"
msgid "start walk at all refs"
-msgstr ""
+msgstr "розпочати проходження по всім посиланням"
msgid "scan pack-indexes listed by stdin for commits"
-msgstr ""
+msgstr "просканувати pack-indexes зазначені через stdin для комітів"
msgid "start walk at commits listed by stdin"
-msgstr ""
+msgstr "розпочати проходження по всім комітам зазначеним через stdin"
msgid "include all commits already in the commit-graph file"
-msgstr ""
+msgstr "включити всі коміти, які вже є у файлі коміт-графа"
msgid "enable computation for changed paths"
-msgstr ""
+msgstr "увімкнути обчислення для змінених шляхів"
msgid "allow writing an incremental commit-graph file"
-msgstr ""
+msgstr "дозволити запис інкрементного файлу коміт-графа"
msgid "maximum number of commits in a non-base split commit-graph"
-msgstr ""
+msgstr "максимальна кількість комітів у безбазовому розщепленому коміт-графі"
msgid "maximum ratio between two levels of a split commit-graph"
-msgstr ""
+msgstr "максимальне співвідношення між двома рівнями розщепленого коміт-графа"
msgid "only expire files older than a given date-time"
-msgstr ""
+msgstr "видалити лише файли, старіші за вказану дату"
msgid "maximum number of changed-path Bloom filters to compute"
-msgstr ""
+msgstr "максимальна кількість фільтрів Блума зміненого шляху для обчислення"
msgid "use at most one of --reachable, --stdin-commits, or --stdin-packs"
msgstr ""
+"використовувати щонайбільше один з --reachable, --stdin-commits або --stdin-"
+"packs"
msgid "Collecting commits from input"
-msgstr ""
+msgstr "Збирання комітів з вхідних даних"
msgid "git commit-tree <tree> [(-p <parent>)...]"
-msgstr ""
+msgstr "git commit-tree <дерево> [(-p <батько>)...]"
msgid ""
"git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
" [(-F <file>)...] <tree>"
msgstr ""
+"git commit-tree [(-p <батько>)...] [-S[<ідентифікатор-ключа>]] [(-m "
+"<допис>)...]\n"
+" [(-F <файл>)...] <дерево>"
#, c-format
msgid "duplicate parent %s ignored"
-msgstr ""
+msgstr "проігноровано дубльований батьківський %s"
#, c-format
msgid "not a valid object name %s"
@@ -4462,35 +4553,35 @@ msgstr "невірне ім’я об’єкта %s"
#, c-format
msgid "git commit-tree: failed to read '%s'"
-msgstr ""
+msgstr "git commit-tree: не вдалося прочитати \"%s\""
#, c-format
msgid "git commit-tree: failed to close '%s'"
-msgstr ""
+msgstr "git commit-tree: не вдалося закрити \"%s\""
msgid "parent"
-msgstr ""
+msgstr "батько"
msgid "id of a parent commit object"
-msgstr ""
+msgstr "ідентифікатор обʼєкта батьківського коміту"
msgid "message"
-msgstr ""
+msgstr "допис"
msgid "commit message"
-msgstr ""
+msgstr "допис до коміту"
msgid "read commit log message from file"
-msgstr ""
+msgstr "читати допис до коміту з файлу"
msgid "GPG sign commit"
msgstr "підписати коміт за допомогою GPG"
msgid "must give exactly one tree"
-msgstr ""
+msgstr "має бути надано лишень одне дерево"
msgid "git commit-tree: failed to read"
-msgstr ""
+msgstr "git commit-tree: не вдалося прочитати"
msgid ""
"git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]\n"
@@ -4503,6 +4594,16 @@ msgid ""
" [(--trailer <token>[(=|:)<value>])...] [-S[<keyid>]]\n"
" [--] [<pathspec>...]"
msgstr ""
+"git commit [-a | --interactive | --patch] [-s] [-v] [-u<режим>] [--amend]\n"
+" [--dry-run] [(-c | -C | --squash) <коміт> | --fixup [(amend|"
+"reword):]<коміт>)]\n"
+" [-F <файл> | -m <допис>] [--reset-author] [--allow-empty]\n"
+" [--allow-empty-message] [--no-verify] [-e] [--author=<автор>]\n"
+" [--date=<дата>] [--cleanup=<режим>] [--[no-]status]\n"
+" [-i | -o] [--pathspec-from-file=<файл> [--pathspec-file-nul]]\n"
+" [(--trailer <токен>[(=|:)<значення>])...] [-S[<ідентифікатор "
+"ключа>]]\n"
+" [--] [<визначник шляху>...]"
msgid "git status [<options>] [--] [<pathspec>...]"
msgstr "git status [<опції>] [--] [<визначник шляху>...]"
@@ -4512,6 +4613,9 @@ msgid ""
"it empty. You can repeat your command with --allow-empty, or you can\n"
"remove the commit entirely with \"git reset HEAD^\".\n"
msgstr ""
+"Ви просили внести зміни до останнього коміту, але це зробить його\n"
+"порожнім. Ви можете повторити команду, скориставшись --allow-empty, або\n"
+"повністю видалити коміт за допомогою \"git reset HEAD^\".\n"
msgid ""
"The previous cherry-pick is now empty, possibly due to conflict resolution.\n"
@@ -4520,12 +4624,17 @@ msgid ""
" git commit --allow-empty\n"
"\n"
msgstr ""
+"Попереднє висмикування зараз порожнє, можливо, через вирішення конфлікту.\n"
+"Якщо ви все одно бажаєте додати його, скористайтесь командою\n"
+"\n"
+" git commit --allow-empty\n"
msgid "Otherwise, please use 'git rebase --skip'\n"
-msgstr ""
+msgstr "В іншому випадку, будь ласка, скористайтесь \"git rebase --skip\"\n"
msgid "Otherwise, please use 'git cherry-pick --skip'\n"
msgstr ""
+"В іншому випадку, будь ласка, скористайтесь \"git cherry-pick --skip\"\n"
msgid ""
"and then use:\n"
@@ -4538,24 +4647,35 @@ msgid ""
" git cherry-pick --skip\n"
"\n"
msgstr ""
+"а потім скористайтесь:\n"
+"\n"
+" git cherry-pick --continue\n"
+"\n"
+"щоб продовжити висмикування решти комітів.\n"
+"Якщо ви хочете пропустити цей коміт, скористайтесь\n"
+"\n"
+" git cherry-pick --skip\n"
+
+msgid "updating files failed"
+msgstr "не вдалося оновити файли"
msgid "failed to unpack HEAD tree object"
-msgstr ""
+msgstr "не вдалося розпакувати HEAD обʼєкт дерева"
msgid "No paths with --include/--only does not make sense."
-msgstr ""
+msgstr "Ніякі шляхи з --include/--only не мають сенсу."
msgid "unable to create temporary index"
msgstr "не вдалося створити тимчасовий індекс"
msgid "interactive add failed"
-msgstr ""
+msgstr "інтерактивне додавання не вдалося"
msgid "unable to update temporary index"
msgstr "не вдалося оновити тимчасовий індекс"
msgid "Failed to update main cache tree"
-msgstr ""
+msgstr "Не вдалося оновити головне дерево кешу"
msgid "unable to write new_index file"
msgstr "не вдалося записати new_index файл"
@@ -4564,7 +4684,7 @@ msgid "cannot do a partial commit during a merge."
msgstr "неможливо зробити частковий коміт під час злиття."
msgid "cannot do a partial commit during a cherry-pick."
-msgstr ""
+msgstr "неможливо зробити частковий коміт під час висмикування."
msgid "cannot do a partial commit during a rebase."
msgstr "неможливо зробити частковий коміт під час перебазування."
@@ -4577,14 +4697,14 @@ msgstr "не вдалося записати тимчасовий файл ін
#, c-format
msgid "commit '%s' lacks author header"
-msgstr ""
+msgstr "у коміті \"%s\" немає заголовка автора"
#, c-format
msgid "commit '%s' has malformed author line"
-msgstr ""
+msgstr "у коміті \"%s\" невірно сформовано рядок автора"
msgid "malformed --author parameter"
-msgstr ""
+msgstr "невірно сформований --author параметр"
#, c-format
msgid "invalid date format: %s"
@@ -4594,31 +4714,33 @@ msgid ""
"unable to select a comment character that is not used\n"
"in the current commit message"
msgstr ""
+"не вдалося вибрати символ коментаря, який не використовується\n"
+"у поточному дописі до коміту"
#, c-format
-msgid "could not lookup commit %s"
-msgstr "не вдалося знайти коміт %s"
+msgid "could not lookup commit '%s'"
+msgstr "не вдалося знайти коміт \"%s\""
#, c-format
msgid "(reading log message from standard input)\n"
-msgstr ""
+msgstr "(читання допису журналу зі стандартного вводу)\n"
msgid "could not read log from standard input"
-msgstr ""
+msgstr "не вдалося прочитати допис зі стандартного вводу"
#, c-format
msgid "could not read log file '%s'"
-msgstr "не вдалося прочитати лог файл \"%s\""
+msgstr "не вдалося прочитати допис з файлу \"%s\""
#, c-format
msgid "options '%s' and '%s:%s' cannot be used together"
msgstr "опції \"%s\" та \"%s:%s\" не можна використовувати разом"
msgid "could not read SQUASH_MSG"
-msgstr ""
+msgstr "не вдалося прочитати SQUASH_MSG"
msgid "could not read MERGE_MSG"
-msgstr ""
+msgstr "не вдалося прочитати MERGE_MSG"
#, c-format
msgid "could not open '%s'"
@@ -4632,18 +4754,24 @@ msgid ""
"Please enter the commit message for your changes. Lines starting\n"
"with '%c' will be ignored.\n"
msgstr ""
+"Будь ласка, введіть допис до коміту для ваших змін. Рядки, що починаються з\n"
+" \"%c\" будуть проігноровані.\n"
#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
+"Будь ласка, введіть допис до коміту для ваших змін. Рядки, що починаються з\n"
+" \"%c\" будуть проігноровані, а порожній допис перерве коміт.\n"
#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
"with '%c' will be kept; you may remove them yourself if you want to.\n"
msgstr ""
+"Будь ласка, введіть допис до коміту для ваших змін. Рядки, що починаються з\n"
+" \"%c\" будуть збережені; ви можете вилучити їх самостійно, якщо захочете.\n"
#, c-format
msgid ""
@@ -4651,6 +4779,9 @@ msgid ""
"with '%c' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
+"Будь ласка, введіть допис до коміту для ваших змін. Рядки, що починаються з\n"
+" \"%c\" будуть збережені; ви можете вилучити їх самостійно, якщо захочете.\n"
+"Порожній допис перериває коміт.\n"
msgid ""
"\n"
@@ -4659,6 +4790,11 @@ msgid ""
"\tgit update-ref -d MERGE_HEAD\n"
"and try again.\n"
msgstr ""
+"\n"
+"Схоже, що ви робите злиття.\n"
+"Якщо це не так, виконайте команду\n"
+"\tgit update-ref -d MERGE_HEAD\n"
+"і спробуйте ще раз.\n"
msgid ""
"\n"
@@ -4667,35 +4803,42 @@ msgid ""
"\tgit update-ref -d CHERRY_PICK_HEAD\n"
"and try again.\n"
msgstr ""
+"\n"
+"Схоже, що ви робите висмикування.\n"
+"Якщо це не так, виконайте\n"
+"\tgit update-ref -d CHERRY_PICK_HEAD\n"
+"і спробуйте ще раз.\n"
#, c-format
msgid "%sAuthor: %.*s <%.*s>"
-msgstr ""
+msgstr "%sАвтор: %.*s <%.*s>"
#, c-format
msgid "%sDate: %s"
-msgstr ""
+msgstr "%sДата: %s"
#, c-format
msgid "%sCommitter: %.*s <%.*s>"
-msgstr ""
+msgstr "%sКомітер: %.*s <%.*s>"
msgid "Cannot read index"
msgstr "Неможливо прочитати індекс"
msgid "unable to pass trailers to --trailers"
-msgstr "не вдалося передати trailers до --trailers"
+msgstr "не вдалося передати причепи до --trailers"
msgid "Error building trees"
-msgstr ""
+msgstr "Помилка при побудові дерев"
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
-msgstr ""
+msgstr "Будь ласка, надайте допис, використовуючи опцію -m або -F.\n"
#, c-format
msgid "--author '%s' is not 'Name <email>' and matches no existing author"
msgstr ""
+"--author \"%s\" не в форматі \"Імʼя <адреса електронної пошти>\" і не "
+"відповідає жодному існуючому автору"
#, c-format
msgid "Invalid ignored mode '%s'"
@@ -4706,55 +4849,54 @@ msgid "Invalid untracked files mode '%s'"
msgstr "Неприпустимий режим невідстежуваних файлів \"%s\""
msgid "You are in the middle of a merge -- cannot reword."
-msgstr "Ви перебуваєте в процесі злиття -- неможливо переформулювати."
+msgstr "Ви перебуваєте в процесі злиття -- неможливо перефразувати."
msgid "You are in the middle of a cherry-pick -- cannot reword."
-msgstr ""
-"Ви перебуваєте в середині процесу висмикування -- неможливо переформулювати."
+msgstr "Ви перебуваєте в процесі висмикування -- неможливо перефразувати."
#, c-format
msgid "reword option of '%s' and path '%s' cannot be used together"
msgstr ""
-"параметр переформулювання \"%s\" і шлях \"%s\" не можна використовувати разом"
+"параметр перефразування \"%s\" і шлях \"%s\" не можуть бути використані разом"
#, c-format
msgid "reword option of '%s' and '%s' cannot be used together"
-msgstr "опція переформулювання \"%s\" і \"%s\" не може бути використана разом"
+msgstr "опцію перефразування \"%s\" і \"%s\" не можна використовувати разом"
msgid "You have nothing to amend."
-msgstr ""
+msgstr "Вам немає до чого вносити зміни."
msgid "You are in the middle of a merge -- cannot amend."
-msgstr "Ви перебуваєте в процесі злиття -- не можна вносити зміни."
+msgstr "Ви перебуваєте в процесі злиття -- неможливо внести зміни."
msgid "You are in the middle of a cherry-pick -- cannot amend."
-msgstr "Ви перебуваєте в процесі висмикування - не можна вносити зміни."
+msgstr "Ви перебуваєте в процесі висмикування - неможливо внести зміни."
msgid "You are in the middle of a rebase -- cannot amend."
-msgstr "Ви перебуваєте в процесі перебазуавння -- не можна вносити зміни."
+msgstr "Ви перебуваєте в процесі перебазуавння -- неможливо внести зміни."
msgid "--reset-author can be used only with -C, -c or --amend."
-msgstr ""
+msgstr "--reset-author можна використовувати лише з -C, -c або --amend."
#, c-format
msgid "unknown option: --fixup=%s:%s"
-msgstr ""
+msgstr "невідомий параметр: --fixup=%s:%s"
#, c-format
msgid "paths '%s ...' with -a does not make sense"
msgstr "шляхи \"%s ...\" з -a не мають сенсу"
msgid "show status concisely"
-msgstr ""
+msgstr "показувати статус стисло"
msgid "show branch information"
msgstr "показати інформацію про гілку"
msgid "show stash information"
-msgstr ""
+msgstr "показати інформацію про схов"
msgid "compute full ahead/behind values"
-msgstr ""
+msgstr "обчислювати повні попереду/позаду значення"
msgid "version"
msgstr "версія"
@@ -4763,315 +4905,335 @@ msgid "machine-readable output"
msgstr "машинозчитуваний вивід"
msgid "show status in long format (default)"
-msgstr ""
+msgstr "показувати статус у повному форматі (за замовчуванням)"
msgid "terminate entries with NUL"
-msgstr ""
+msgstr "завершувати записи символом NUL"
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
+"показувати невідстежувані файли, варіанти режимів: all, normal, no (за "
+"замовчуванням: all)"
msgid ""
"show ignored files, optional modes: traditional, matching, no. (Default: "
"traditional)"
msgstr ""
+"показувати ігноровані файли, варіанти режимів: traditional, matching, no (за "
+"замовчуванням: traditional)."
msgid "when"
-msgstr ""
+msgstr "коли"
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
msgstr ""
+"ігнорувати зміни підмодулів, опціонально, якщо: all, dirty, untracked (за "
+"замовчуванням: all)."
msgid "list untracked files in columns"
msgstr "показати невідстежувані файли в стовпчиках"
msgid "do not detect renames"
-msgstr ""
+msgstr "не виявляти перейменування"
msgid "detect renames, optionally set similarity index"
-msgstr ""
+msgstr "виявляти перейменування, опціонально встановлювати індекс схожості"
msgid "Unsupported combination of ignored and untracked-files arguments"
msgstr ""
+"Непідтримувана комбінація аргументів для ігнорованих та невідстежуваних "
+"файлів"
msgid "suppress summary after successful commit"
-msgstr ""
+msgstr "не показувати підсумок після успішного коміту"
msgid "show diff in commit message template"
-msgstr ""
+msgstr "показувати різницю в шаблоні дописа до коміту"
msgid "Commit message options"
-msgstr ""
+msgstr "Опції дописа до коміту"
msgid "read message from file"
-msgstr ""
+msgstr "читати текст дописа з файлу"
msgid "author"
-msgstr ""
+msgstr "автор"
msgid "override author for commit"
-msgstr ""
+msgstr "перевизначити автора коміту"
msgid "date"
-msgstr ""
+msgstr "дата"
msgid "override date for commit"
-msgstr ""
+msgstr "перевизначити дату коміту"
msgid "commit"
msgstr "коміт"
msgid "reuse and edit message from specified commit"
-msgstr ""
+msgstr "повторно використати та редагувати допис зі вказаного коміту"
msgid "reuse message from specified commit"
-msgstr ""
+msgstr "повторно використати допис зі вказаного коміту"
#. TRANSLATORS: Leave "[(amend|reword):]" as-is,
#. and only translate <commit>.
#.
msgid "[(amend|reword):]commit"
-msgstr ""
+msgstr "[(amend|reword):]коміт"
msgid ""
"use autosquash formatted message to fixup or amend/reword specified commit"
msgstr ""
+"використовувати допис у форматі autosquash для виправлення або зміни/"
+"редагування вказаного коміту"
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
+"використовувати допис у форматі autosquash для зчавлювання вказаного коміту"
msgid "the commit is authored by me now (used with -C/-c/--amend)"
-msgstr ""
+msgstr "автором коміту тепер є я (використовується з -C/-c/--amend)"
msgid "trailer"
-msgstr ""
+msgstr "причіп"
msgid "add custom trailer(s)"
-msgstr ""
+msgstr "додати нестандартний причіп"
msgid "add a Signed-off-by trailer"
-msgstr ""
+msgstr "додати Signed-off-by причіп"
msgid "use specified template file"
-msgstr ""
+msgstr "використати зазначений файл шаблону"
msgid "force edit of commit"
msgstr "редагувати коміт примусово"
msgid "include status in commit message template"
-msgstr ""
+msgstr "включити статус у шаблон дописа до коміту"
msgid "Commit contents options"
-msgstr ""
+msgstr "Опції вмісту коміту"
msgid "commit all changed files"
-msgstr ""
+msgstr "закомітити всі змінені файли"
msgid "add specified files to index for commit"
-msgstr ""
+msgstr "додати вказані файли до індексу для коміту"
msgid "interactively add files"
msgstr "додавати файли інтерактивно"
msgid "interactively add changes"
-msgstr ""
+msgstr "додавати зміни інтерактивно"
msgid "commit only specified files"
-msgstr ""
+msgstr "комітити лише вказані файли"
msgid "bypass pre-commit and commit-msg hooks"
-msgstr ""
+msgstr "обходити pre-commit та commit-msg гачки"
msgid "show what would be committed"
-msgstr "показати, що буде додано до коміту"
+msgstr "показати, що буде закомічено"
msgid "amend previous commit"
-msgstr ""
+msgstr "внести зміни до попереднього коміту"
msgid "bypass post-rewrite hook"
msgstr "обійти post-rewrite гачок"
msgid "ok to record an empty change"
-msgstr ""
+msgstr "дозволити записати порожню зміну"
msgid "ok to record a change with an empty message"
-msgstr ""
+msgstr "дозволити записати зміну з порожнім дописом"
msgid "could not parse HEAD commit"
msgstr "не вдалося розібрати HEAD коміт"
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
-msgstr ""
+msgstr "Пошкоджений MERGE_HEAD (%s)"
msgid "could not read MERGE_MODE"
-msgstr ""
+msgstr "не вдалося прочитати MERGE_MODE"
#, c-format
msgid "could not read commit message: %s"
-msgstr "не вдалося прочитати допис до коміта: %s"
+msgstr "не вдалося прочитати допис до коміту: %s"
#, c-format
msgid "Aborting commit due to empty commit message.\n"
-msgstr ""
+msgstr "Переривання коміту через порожній допис до коміту.\n"
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
-msgstr ""
+msgstr "Переривання коміту; ви не відредагували допис.\n"
#, c-format
msgid "Aborting commit due to empty commit message body.\n"
-msgstr ""
+msgstr "Переривання коміту через порожнє тіло дописа до коміту.\n"
msgid ""
"repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full and quota is\n"
"not exceeded, and then \"git restore --staged :/\" to recover."
msgstr ""
+"сховище було оновлено, але не вдалося записати\n"
+"файл new_index. Переконайтеся, що диск не переповнений і квота\n"
+"не перевищена, а потім виконайте \"git restore --staged :/\" для відновлення."
msgid "git config [<options>]"
msgstr "git config [<опції>]"
#, c-format
msgid "unrecognized --type argument, %s"
-msgstr ""
+msgstr "нерозпізнаний аргумент --type, %s"
msgid "only one type at a time"
-msgstr ""
+msgstr "лише один тип за раз"
msgid "Config file location"
-msgstr ""
+msgstr "Розташування файлу конфігурації"
msgid "use global config file"
-msgstr ""
+msgstr "використовувати глобальний файл конфігурації"
msgid "use system config file"
-msgstr ""
+msgstr "використовувати файл конфігурації системи"
msgid "use repository config file"
-msgstr "використовувати конфігураційний файл сховища"
+msgstr "використовувати файл конфігурації сховища"
msgid "use per-worktree config file"
-msgstr "використовувати конфігураційний файл робочого дерева"
+msgstr "використовувати файл конфігурації робочого дерева"
msgid "use given config file"
-msgstr ""
+msgstr "використовувати наданий файл конфігурації"
msgid "blob-id"
-msgstr ""
+msgstr "blob-id"
msgid "read config from given blob object"
-msgstr ""
+msgstr "прочитати конфігурацію з наданого blob-обʼєкту"
msgid "Action"
-msgstr ""
+msgstr "Дія"
msgid "get value: name [value-pattern]"
-msgstr ""
+msgstr "отримати значення: назва [шаблон-значення]"
msgid "get all values: key [value-pattern]"
-msgstr ""
+msgstr "отримати всі значення: ключ [шаблон-значення]"
msgid "get values for regexp: name-regex [value-pattern]"
-msgstr ""
+msgstr "отримати значення для регвиру: регвир-назви [шаблон-значення]"
msgid "get value specific for the URL: section[.var] URL"
-msgstr ""
+msgstr "отримати значення для конкретної URL-адреси: розділ[.var] URL-адреса"
msgid "replace all matching variables: name value [value-pattern]"
-msgstr ""
+msgstr "замінити всі відповідні змінні: назва значення [шаблон-значення]"
msgid "add a new variable: name value"
-msgstr ""
+msgstr "додати нову змінну: назва значення"
msgid "remove a variable: name [value-pattern]"
-msgstr ""
+msgstr "видалити змінну: назва [шаблон-значення]"
msgid "remove all matches: name [value-pattern]"
-msgstr ""
+msgstr "видалити всі збіги: назва [шаблон-значення]"
msgid "rename section: old-name new-name"
-msgstr ""
+msgstr "перейменувати розділ: стара-назва нова-назва"
msgid "remove a section: name"
-msgstr ""
+msgstr "видалити розділ: назва"
msgid "list all"
-msgstr ""
+msgstr "показати всі змінні"
msgid "use string equality when comparing values to 'value-pattern'"
msgstr ""
+"використовувати рівність строк при порівнянні значень з \"шаблон-значенням\""
msgid "open an editor"
-msgstr ""
+msgstr "відкрити редактор"
msgid "find the color configured: slot [default]"
-msgstr ""
+msgstr "знайти налаштований колір: слот [за замовчуванням]"
msgid "find the color setting: slot [stdout-is-tty]"
-msgstr ""
+msgstr "знайти налаштування кольору: slot [stdout-is-tty]"
msgid "Type"
-msgstr ""
+msgstr "Тип"
msgid "type"
-msgstr ""
+msgstr "тип"
msgid "value is given this type"
-msgstr ""
+msgstr "тип значення"
msgid "value is \"true\" or \"false\""
-msgstr ""
+msgstr "значення \"true\" або \"false\""
msgid "value is decimal number"
-msgstr ""
+msgstr "значення десяткове число"
msgid "value is --bool or --int"
-msgstr ""
+msgstr "значення --bool або --int"
msgid "value is --bool or string"
-msgstr ""
+msgstr "значення --bool або string"
msgid "value is a path (file or directory name)"
-msgstr ""
+msgstr "значення шлях (файл або назва директорії)"
msgid "value is an expiry date"
-msgstr ""
+msgstr "значення - дата закінчення терміну дії"
msgid "Other"
-msgstr ""
+msgstr "Інше"
msgid "terminate values with NUL byte"
-msgstr ""
+msgstr "завершити значення байтом NUL"
msgid "show variable names only"
-msgstr ""
+msgstr "показувати тільки назви змінних"
msgid "respect include directives on lookup"
-msgstr ""
+msgstr "дотримуватись директив включення при пошуку"
msgid "show origin of config (file, standard input, blob, command line)"
msgstr ""
+"показати походження конфігурації (файл, стандартний ввід, blob, командний "
+"рядок)"
msgid "show scope of config (worktree, local, global, system, command)"
msgstr ""
+"показати межі дії конфігурації (робоче дерево, локально, глобально, система, "
+"команда)"
msgid "value"
msgstr "значення"
msgid "with --get, use default value when missing entry"
msgstr ""
+"з --get використовувати значення за замовчуванням, якщо запис відсутній"
#, c-format
msgid "wrong number of arguments, should be %d"
-msgstr ""
+msgstr "невірна кількість аргументів, має бути %d"
#, c-format
msgid "wrong number of arguments, should be from %d to %d"
-msgstr ""
+msgstr "невірна кількість аргументів, має бути від %d до %d"
#, c-format
msgid "invalid key pattern: %s"
@@ -5093,13 +5255,13 @@ msgid "unable to parse default color value"
msgstr "не вдалося розібрати початкове значення кольору"
msgid "not in a git directory"
-msgstr "не в директорії git"
+msgstr "не в git директорії"
msgid "writing to stdin is not supported"
-msgstr ""
+msgstr "запис до stdin не підтримується"
msgid "writing config blobs is not supported"
-msgstr ""
+msgstr "запис blob конфігурації не підтримується"
#, c-format
msgid ""
@@ -5109,9 +5271,14 @@ msgid ""
"#\tname = %s\n"
"#\temail = %s\n"
msgstr ""
+"# Це файл конфігурації Git для кожного користувача.\n"
+"[user]\n"
+"# Будь ласка, адаптуйте та розкоментуйте наступні рядки:\n"
+"# name = %s\n"
+"# email = %s\n"
msgid "only one config file at a time"
-msgstr ""
+msgstr "лише один конфігураційний файл за раз"
msgid "--local can only be used inside a git repository"
msgstr "--local можна використовувати лише всередині git сховища"
@@ -5123,33 +5290,39 @@ msgid "--worktree can only be used inside a git repository"
msgstr "--worktree можна використовувати лише всередині git сховища"
msgid "$HOME not set"
-msgstr ""
+msgstr "$HOME не встановлено"
msgid ""
"--worktree cannot be used with multiple working trees unless the config\n"
"extension worktreeConfig is enabled. Please read \"CONFIGURATION FILE\"\n"
"section in \"git help worktree\" for details"
msgstr ""
+"--worktree неможливо використовувати з кількома робочими деревами, якщо не "
+"увімкнено розширення\n"
+"конфігурації worktreeConfig. Будь ласка, прочитайте розділ \"КОНФІГУРАЦІЙНИЙ "
+"ФАЙЛ\"\n"
+"у \"git help worktree\" для більш детальної інформації"
msgid "--get-color and variable type are incoherent"
-msgstr ""
+msgstr "--get-color і тип змінної не узгоджуються"
msgid "only one action at a time"
-msgstr ""
+msgstr "лише одна дія за раз"
msgid "--name-only is only applicable to --list or --get-regexp"
-msgstr ""
+msgstr "--name-only застосовується лише до --list або --get-regexp"
msgid ""
"--show-origin is only applicable to --get, --get-all, --get-regexp, and --"
"list"
msgstr ""
+"--show-origin застосовується лише до --get, --get-all, --get-regexp та --list"
msgid "--default is only applicable to --get"
-msgstr ""
+msgstr "--default застосовується лише до --get"
msgid "--fixed-value only applies with 'value-pattern'"
-msgstr ""
+msgstr "--fixed-value застосовується лише з \"шаблоном-значення\""
#, c-format
msgid "unable to read config file '%s'"
@@ -5159,10 +5332,10 @@ msgid "error processing config file(s)"
msgstr "помилка при обробці файлу(ів) конфігурації"
msgid "editing stdin is not supported"
-msgstr ""
+msgstr "редагування stdin не підтримується"
msgid "editing blobs is not supported"
-msgstr ""
+msgstr "редагування blobs не підтримується"
#, c-format
msgid "cannot create configuration file %s"
@@ -5173,13 +5346,15 @@ msgid ""
"cannot overwrite multiple values with a single value\n"
" Use a regexp, --add or --replace-all to change %s."
msgstr ""
+"неможливо перезаписати кілька значень одним значенням\n"
+" Використовуйте regexp, --add або --replace-all для зміни %s."
#, c-format
msgid "no such section: %s"
msgstr "немає такого розділу: %s"
msgid "print sizes in human readable format"
-msgstr ""
+msgstr "показувати розмір у зручному для читання форматі"
#, c-format
msgid ""
@@ -5188,85 +5363,100 @@ msgid ""
"\n"
"\tchmod 0700 %s"
msgstr ""
+"Дозволи на вашу сокет директорію занадто вільні; інші\n"
+"користувачі можуть прочитати ваші кешовані облікові дані. Подумайте про "
+"запуск:\n"
+"\n"
+"\tchmod 0700 %s"
msgid "print debugging messages to stderr"
-msgstr ""
+msgstr "виводити відлагоджувальні повідомлення в stderr"
msgid "credential-cache--daemon unavailable; no unix socket support"
-msgstr ""
+msgstr "credential-cache--daemon недоступний; немає підтримки unix-сокетів"
msgid "credential-cache unavailable; no unix socket support"
-msgstr ""
+msgstr "credential-cache недоступний; немає підтримки unix-сокетів"
#, c-format
msgid "unable to get credential storage lock in %d ms"
-msgstr ""
+msgstr "не вдалося отримати файл блокування сховища облікових даних за %d мс"
msgid ""
"git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]"
msgstr ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<н>] "
+"[<комітоподібне>...]"
msgid ""
"git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]"
msgstr ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<н>] --"
+"dirty[=<позначка>]"
msgid "git describe <blob>"
-msgstr ""
+msgstr "git describe <blob>"
msgid "head"
msgstr "head"
msgid "lightweight"
-msgstr ""
+msgstr "lightweight"
msgid "annotated"
-msgstr ""
+msgstr "annotated"
#, c-format
msgid "annotated tag %s not available"
-msgstr ""
+msgstr "анотований тег %s недоступний"
#, c-format
msgid "tag '%s' is externally known as '%s'"
-msgstr ""
+msgstr "тег \"%s\" відомий зовні як \"%s\""
#, c-format
msgid "no tag exactly matches '%s'"
-msgstr ""
+msgstr "жоден тег не збігається точно з \"%s\""
#, c-format
msgid "No exact match on refs or tags, searching to describe\n"
-msgstr ""
+msgstr "Немає точного збігу за посиланнями або тегами, пошук для опису\n"
#, c-format
msgid "finished search at %s\n"
-msgstr ""
+msgstr "пошук завершено на %s\n"
#, c-format
msgid ""
"No annotated tags can describe '%s'.\n"
"However, there were unannotated tags: try --tags."
msgstr ""
+"Жоден анотований тег не може описати \"%s\".\n"
+"Однак існують неанотовані теги: спробуйте --tags."
#, c-format
msgid ""
"No tags can describe '%s'.\n"
"Try --always, or create some tags."
msgstr ""
+"Жоден тег не може описати \"%s\".\n"
+"Спробуйте --always або створіть кілька тегів."
#, c-format
msgid "traversed %lu commits\n"
-msgstr ""
+msgstr "пройдено через %lu комітів\n"
#, c-format
msgid ""
"more than %i tags found; listed %i most recent\n"
"gave up search at %s\n"
msgstr ""
+"знайдено більше %i тегів; показані %i останніх\n"
+"припинено пошук на %s\n"
#, c-format
msgid "describe %s\n"
-msgstr ""
+msgstr "описати %s\n"
#, c-format
msgid "Not a valid object name %s"
@@ -5274,53 +5464,56 @@ msgstr "Неприпустиме ім’я об’єкта %s"
#, c-format
msgid "%s is neither a commit nor blob"
-msgstr ""
+msgstr "%s не є commit чи blob"
msgid "find the tag that comes after the commit"
-msgstr ""
+msgstr "знайти тег, що йде після коміту"
msgid "debug search strategy on stderr"
-msgstr ""
+msgstr "виводити відлагоджувальні повідомлення стратегії пошуку в stderr"
msgid "use any ref"
msgstr "використати будь-яке посилання"
msgid "use any tag, even unannotated"
-msgstr ""
+msgstr "використати будь-який тег, навіть неанотований"
msgid "always use long format"
-msgstr ""
+msgstr "завжди використовувати довгий формат"
msgid "only follow first parent"
-msgstr ""
+msgstr "слідувати тільки за першим з батьків"
msgid "only output exact matches"
-msgstr ""
+msgstr "виводити лише точні збіги"
msgid "consider <n> most recent tags (default: 10)"
-msgstr ""
+msgstr "враховувати <н> останніх тегів (за замовчуванням: 10)"
msgid "only consider tags matching <pattern>"
-msgstr ""
+msgstr "враховувати лише теги, що відповідають <шаблону>"
msgid "do not consider tags matching <pattern>"
-msgstr ""
+msgstr "не враховувати теги, що відповідають <шаблону>"
msgid "show abbreviated commit object as fallback"
-msgstr ""
+msgstr "показувати скорочений обʼєкт коміту як запасний варіант"
msgid "mark"
-msgstr ""
+msgstr "позначка"
msgid "append <mark> on dirty working tree (default: \"-dirty\")"
msgstr ""
-"додати <mark> на брудному робочому дереві (за замовчуванням: \\”-dirty\\”)"
+"додати <позначку> до брудного робочого дерева (за замовчуванням: \\”-"
+"dirty\\”)"
msgid "append <mark> on broken working tree (default: \"-broken\")"
msgstr ""
+"додати <позначку> до пошкодженого робочого дерева (за замовчуванням: \"-"
+"broken\")"
msgid "No names found, cannot describe anything."
-msgstr ""
+msgstr "Назв не знайдено, неможливо нічого описати."
#, c-format
msgid "option '%s' and commit-ishes cannot be used together"
@@ -5330,25 +5523,27 @@ msgid ""
"git diagnose [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n"
" [--mode=<mode>]"
msgstr ""
+"git diagnose [(-o | --output-directory) <шлях>] [(-s | --suffix) <формат>]\n"
+" [--mode=<режим>]"
msgid "specify a destination for the diagnostics archive"
-msgstr ""
+msgstr "вказати місце призначення архіву діагностики"
msgid "specify a strftime format suffix for the filename"
-msgstr ""
+msgstr "вказати суфікс формату strftime для назви файлу"
msgid "specify the content of the diagnostic archive"
-msgstr ""
+msgstr "вказати вміст архіву діагностики"
msgid "--merge-base only works with two commits"
-msgstr ""
+msgstr "--merge-base працює лише з двома комітами"
#, c-format
msgid "'%s': not a regular file or symlink"
-msgstr ""
+msgstr "\"%s\": не звичайний файл або символьне посилання"
msgid "no merge given, only parents."
-msgstr ""
+msgstr "злиття не надано, лише батьки."
#, c-format
msgid "invalid option: %s"
@@ -5356,7 +5551,7 @@ msgstr "неприпустима опція %s"
#, c-format
msgid "%s...%s: no merge base"
-msgstr ""
+msgstr "%s...%s: немає бази злиття"
msgid "Not a git repository"
msgstr "Не є git сховищем"
@@ -5367,7 +5562,7 @@ msgstr "надано неприпустимий об’єкт \"%s\"."
#, c-format
msgid "more than two blobs given: '%s'"
-msgstr ""
+msgstr "надано більше двох blob: \"%s\""
#, c-format
msgid "unhandled object '%s' given."
@@ -5375,10 +5570,10 @@ msgstr "надано необроблений об’єкт \"%s\"."
#, c-format
msgid "%s...%s: multiple merge bases, using %s"
-msgstr ""
+msgstr "%s...%s: кілька баз злиття, використання %s"
msgid "git difftool [<options>] [<commit> [<commit>]] [--] [<path>...]"
-msgstr ""
+msgstr "git difftool [<опції>] [<коміт> [<коміт>]] [--] [<шлях>...]"
#, c-format
msgid "could not read symlink %s"
@@ -5396,13 +5591,15 @@ msgid ""
"combined diff formats ('-c' and '--cc') are not supported in\n"
"directory diff mode ('-d' and '--dir-diff')."
msgstr ""
+"комбіновані формати diff (\"-c\" і \"--cc\") не підтримуються у\n"
+"режимі порівняння директорій (\"-d\" і \"--dir-diff\")."
#, c-format
msgid "both files modified: '%s' and '%s'."
-msgstr ""
+msgstr "обидва файли змінено: \"%s\" і \"%s\"."
msgid "working tree file has been left."
-msgstr "залишено файл робочого дерева."
+msgstr "файл робочого дерева було залишено."
#, c-format
msgid "could not copy '%s' to '%s'"
@@ -5410,144 +5607,150 @@ msgstr "не вдалося скопіювати \"%s\" в \"%s\""
#, c-format
msgid "temporary files exist in '%s'."
-msgstr ""
+msgstr "тимчасові файли існують в \"%s\"."
msgid "you may want to cleanup or recover these."
-msgstr ""
+msgstr "можливо, ви захочете очистити або відновити їх."
#, c-format
msgid "failed: %d"
-msgstr ""
+msgstr "завершилось невдало: %d"
msgid "use `diff.guitool` instead of `diff.tool`"
-msgstr ""
+msgstr "використовувати \"diff.guitool\" замість \"diff.tool\""
msgid "perform a full-directory diff"
-msgstr ""
+msgstr "виконати порівняння всіх директорій"
msgid "do not prompt before launching a diff tool"
-msgstr ""
+msgstr "не запитувати перед запуском diff"
msgid "use symlinks in dir-diff mode"
-msgstr ""
+msgstr "використовувати символьні посилання у режимі dir-diff"
msgid "tool"
-msgstr ""
+msgstr "засіб"
msgid "use the specified diff tool"
-msgstr ""
+msgstr "використовувати вказаний diff засіб"
msgid "print a list of diff tools that may be used with `--tool`"
-msgstr ""
+msgstr "показати список diff засобів, які можна використовувати з \"--tool\""
msgid ""
"make 'git-difftool' exit when an invoked diff tool returns a non-zero exit "
"code"
msgstr ""
+"змусити \"git-difftool\" завершувати роботу, коли викликаний diff засіб "
+"повертає ненульовий код завершення"
msgid "specify a custom command for viewing diffs"
-msgstr ""
+msgstr "вказати нестандартну команду для перегляду різниць"
msgid "passed to `diff`"
-msgstr ""
+msgstr "передається до \"diff\""
msgid "difftool requires worktree or --no-index"
-msgstr ""
+msgstr "difftool потребує worktree або --no-index"
msgid "no <tool> given for --tool=<tool>"
-msgstr ""
+msgstr "не надано <засіб> для --tool=<засіб>"
msgid "no <cmd> given for --extcmd=<cmd>"
-msgstr ""
+msgstr "не надана <команда> для --extcmd=<команда>"
msgid "git fast-export [<rev-list-opts>]"
-msgstr ""
+msgstr "git fast-export [<rev-list-опції>]"
msgid "Error: Cannot export nested tags unless --mark-tags is specified."
msgstr ""
+"Помилка: неможливо експортувати вкладені теги, якщо не вказано --mark-tags."
msgid "--anonymize-map token cannot be empty"
-msgstr ""
+msgstr "--anonymize-map токен не може бути порожнім"
msgid "show progress after <n> objects"
-msgstr ""
+msgstr "показати прогрес після <н> обʼєктів"
msgid "select handling of signed tags"
-msgstr ""
+msgstr "вибрати обробку підписаних тегів"
msgid "select handling of tags that tag filtered objects"
-msgstr ""
+msgstr "вибрати обробку тегів, якими позначено відфільтровані обʼєкти"
msgid "select handling of commit messages in an alternate encoding"
-msgstr ""
+msgstr "вибрати обробку дописів до комітів в іншому кодуванні"
msgid "dump marks to this file"
-msgstr ""
+msgstr "експортувати позначки в цей файл"
msgid "import marks from this file"
-msgstr ""
+msgstr "імпортувати позначки з цього файлу"
msgid "import marks from this file if it exists"
-msgstr ""
+msgstr "імпортувати позначки з цього файлу, якщо він існує"
msgid "fake a tagger when tags lack one"
-msgstr ""
+msgstr "підробляти теггера, коли його не вказано для тега"
msgid "output full tree for each commit"
-msgstr ""
+msgstr "виводити повне дерево для кожного коміту"
msgid "use the done feature to terminate the stream"
-msgstr ""
+msgstr "використовувати особливість done для завершення потоку"
msgid "skip output of blob data"
-msgstr ""
+msgstr "пропускати виведення blob-даних"
msgid "refspec"
-msgstr ""
+msgstr "визначник посилання"
msgid "apply refspec to exported refs"
-msgstr ""
+msgstr "застосувати визначник посилання до експортованих посилань"
msgid "anonymize output"
-msgstr ""
+msgstr "анонімізувати вивід"
msgid "from:to"
-msgstr ""
+msgstr "від:до"
msgid "convert <from> to <to> in anonymized output"
-msgstr ""
+msgstr "конвертувати <від> в <до> в анонімізованому виводі"
msgid "reference parents which are not in fast-export stream by object id"
msgstr ""
+"батьки посилання, яких не знайдено в fast-export потоці за ідентифікатором "
+"обʼєкта"
msgid "show original object ids of blobs/commits"
-msgstr ""
+msgstr "показувати оригінальні ідентифікатори обʼєктів blob/комітів"
msgid "label tags with mark ids"
-msgstr ""
+msgstr "позначати теги ідентифікаторами позначок"
#, c-format
msgid "Missing from marks for submodule '%s'"
-msgstr ""
+msgstr "Відсутні \"від\" позначки для підмодуля \"%s\""
#, c-format
msgid "Missing to marks for submodule '%s'"
-msgstr ""
+msgstr "Відсутні \"до\" позначки для підмодуля \"%s\""
#, c-format
msgid "Expected 'mark' command, got %s"
-msgstr ""
+msgstr "Очікувалась команда \"mark\", отримано %s"
#, c-format
msgid "Expected 'to' command, got %s"
-msgstr ""
+msgstr "Очікувалась команда \"to\", отримано %s"
msgid "Expected format name:filename for submodule rewrite option"
-msgstr ""
+msgstr "Очікуваний формат назва:назва файлу для параметра перезапису підмодуля"
#, c-format
msgid "feature '%s' forbidden in input without --allow-unsafe-features"
msgstr ""
+"особливість \"%s\" не можна використовувати без --allow-unsafe-features"
#, c-format
msgid "Lockfile created but not reported: %s"
@@ -5566,39 +5769,39 @@ msgid "git fetch --all [<options>]"
msgstr "git fetch --all [<опції>]"
msgid "fetch.parallel cannot be negative"
-msgstr ""
+msgstr "fetch.parallel не може бути відʼємним"
msgid "couldn't find remote ref HEAD"
-msgstr "не вдалося знайти посилання віддаленого HEAD"
+msgstr "не вдалося знайти посилання для віддаленого HEAD"
#, c-format
msgid "From %.*s\n"
-msgstr ""
+msgstr "Від %.*s\n"
#, c-format
msgid "object %s not found"
msgstr "об’єкт %s не знайдено"
msgid "[up to date]"
-msgstr ""
+msgstr "[в актуальному стані]"
msgid "[rejected]"
-msgstr ""
+msgstr "[відхилено]"
msgid "can't fetch into checked-out branch"
msgstr "неможливо виконати отримання в активну гілку"
msgid "[tag update]"
-msgstr ""
+msgstr "[оновлення тегу]"
msgid "unable to update local ref"
msgstr "не вдалося оновити локальне посилання"
msgid "would clobber existing tag"
-msgstr ""
+msgstr "зруйнує існуючий тег"
msgid "[new tag]"
-msgstr ""
+msgstr "[новий тег]"
msgid "[new branch]"
msgstr "[нова гілка]"
@@ -5610,7 +5813,7 @@ msgid "forced update"
msgstr "примусове оновлення"
msgid "non-fast-forward"
-msgstr ""
+msgstr "без перемотування вперед"
#, c-format
msgid "cannot open '%s'"
@@ -5621,6 +5824,10 @@ msgid ""
"but that check has been disabled; to re-enable, use '--show-forced-updates'\n"
"flag or run 'git config fetch.showForcedUpdates true'"
msgstr ""
+"fetch зазвичай показує, які гілки було примусово оновлено,\n"
+"але цю перевірку було вимкнено; щоб увімкнути її знову, скористайтесь \"--"
+"show-forced-updates\"\n"
+"або виконайте \"git config fetch.showForcedUpdates true\""
#, c-format
msgid ""
@@ -5629,46 +5836,52 @@ msgid ""
"false'\n"
"to avoid this check\n"
msgstr ""
+"перевірка примусових оновлень зайняла %.2f секунд; ви можете скористатися\n"
+"\"--no-show-forced-updates\" або виконати \"git config fetch."
+"showForcedUpdates false\"\n"
+"щоб уникнути цієї перевірки\n"
#, c-format
msgid "%s did not send all necessary objects\n"
-msgstr "%s не надіслав всі необхідні обʼєкти\n"
+msgstr "%s не надіслав всіх необхідних обʼєктів\n"
#, c-format
msgid "rejected %s because shallow roots are not allowed to be updated"
-msgstr ""
+msgstr "відхилено %s, оскільки неглибокі корені не можна оновлювати"
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting branches"
msgstr ""
+"не вдалося оновити деякі локальні посилання; спробуйте виконати\n"
+" \"git remote prune %s\", щоб видалити всі старі конфліктні гілки"
#, c-format
msgid " (%s will become dangling)"
-msgstr ""
+msgstr " (%s стануть висячими)"
#, c-format
msgid " (%s has become dangling)"
-msgstr ""
+msgstr " (%s став висячим)"
msgid "[deleted]"
msgstr "[видалено]"
msgid "(none)"
-msgstr ""
+msgstr "(нічого)"
#, c-format
msgid "refusing to fetch into branch '%s' checked out at '%s'"
-msgstr ""
+msgstr "відмовлено в отримані в гілку \"%s\", що знаходиться в \"%s\""
#, c-format
msgid "option \"%s\" value \"%s\" is not valid for %s"
-msgstr ""
+msgstr "значення \"%s\" опції \"%s\" неприпустиме для %s"
#, c-format
msgid "option \"%s\" is ignored for %s\n"
-msgstr ""
+msgstr "опція \"%s\" ігнорується для %s\n"
#, c-format
msgid "%s is not a valid object"
@@ -5679,13 +5892,15 @@ msgid "the object %s does not exist"
msgstr "об’єкт %s не існує"
msgid "multiple branches detected, incompatible with --set-upstream"
-msgstr ""
+msgstr "виявлено кілька гілок, несумісних з --set-upstream"
#, c-format
msgid ""
"could not set upstream of HEAD to '%s' from '%s' when it does not point to "
"any branch."
msgstr ""
+"не вдалося встановити першоджерельне сховище для HEAD в \"%s\" з \"%s\", "
+"коли воно не вказує на жодну гілку."
msgid "not setting upstream for a remote remote-tracking branch"
msgstr ""
@@ -5701,6 +5916,8 @@ msgid ""
"no source branch found;\n"
"you need to specify exactly one branch with the --set-upstream option"
msgstr ""
+"джерельна гілка не знайдена;\n"
+"потрібно вказати лишень одну гілку з опцією --set-upstream"
#, c-format
msgid "Fetching %s\n"
@@ -5712,24 +5929,26 @@ msgstr "не вдалося отримати %s"
#, c-format
msgid "could not fetch '%s' (exit code: %d)\n"
-msgstr ""
+msgstr "не вдалося отримати \"%s\" (код завершення: %d)\n"
msgid ""
"no remote repository specified; please specify either a URL or a\n"
"remote name from which new revisions should be fetched"
msgstr ""
+"віддалене сховище не вказано; будь ласка, вкажіть або URL або\n"
+"назву віддаленого сховища, з якого слід отримувати нові ревізії"
msgid "you need to specify a tag name"
-msgstr ""
+msgstr "потрібно вказати назву тегу"
msgid "fetch from all remotes"
-msgstr ""
+msgstr "отримати з усіх віддалених призначень"
msgid "set upstream for git pull/fetch"
msgstr "встановити першоджерельне сховище для git pull/fetch"
msgid "append to .git/FETCH_HEAD instead of overwriting"
-msgstr ""
+msgstr "додати до .git/FETCH_HEAD замість перезапису"
msgid "use atomic transaction to update references"
msgstr "використати атомарну транзакцію для оновлення посилань"
@@ -5738,99 +5957,108 @@ msgid "path to upload pack on remote end"
msgstr "шлях для завантаження пакунка на віддаленій стороні"
msgid "force overwrite of local reference"
-msgstr ""
+msgstr "примусовий перезапис локального посилання"
msgid "fetch from multiple remotes"
-msgstr ""
+msgstr "отримати з кількох віддалених призначень"
msgid "fetch all tags and associated objects"
-msgstr ""
+msgstr "отримати всі теги і повʼязані з ними обʼєкти"
msgid "do not fetch all tags (--no-tags)"
-msgstr ""
+msgstr "не отримувати всі теги (--no-tags)"
msgid "number of submodules fetched in parallel"
msgstr "кількість підмодулів, що завантажуються паралельно"
msgid "modify the refspec to place all refs within refs/prefetch/"
msgstr ""
+"змінити визначник посилання, щоб помістити всі посилання в refs/prefetch/"
msgid "prune remote-tracking branches no longer on remote"
msgstr ""
+"видалити віддалено відстежувані гілки, що більше не існують у віддаленому "
+"призначенні"
msgid "prune local tags no longer on remote and clobber changed tags"
msgstr ""
+"видалити локальні теги, що більше не існують у віддаленому призначенні, і "
+"зруйнувати змінені теги"
msgid "on-demand"
-msgstr ""
+msgstr "на вимогу"
msgid "control recursive fetching of submodules"
msgstr "контролювати рекурсивне отримання підмодулів"
msgid "write fetched references to the FETCH_HEAD file"
-msgstr ""
+msgstr "записувати отримані посилання у файл FETCH_HEAD"
msgid "keep downloaded pack"
-msgstr ""
+msgstr "зберегти завантажений пакунок"
msgid "allow updating of HEAD ref"
-msgstr ""
+msgstr "дозволити оновлення HEAD посилання"
msgid "deepen history of shallow clone"
-msgstr "поглибити історію поверхневого клону"
+msgstr "поглибити історію неглибокого клону"
msgid "deepen history of shallow repository based on time"
-msgstr "поглибити історію поверхневого клону залежно від часу"
+msgstr "поглибити історію неглибокого клону залежно від часу"
msgid "convert to a complete repository"
msgstr "перетворити на повне сховище"
msgid "re-fetch without negotiating common commits"
-msgstr ""
+msgstr "повторне отримання без узгодження спільних комітів"
msgid "prepend this to submodule path output"
-msgstr ""
+msgstr "додавати це напочатку шляху до підмодуля при виведенні"
msgid ""
"default for recursive fetching of submodules (lower priority than config "
"files)"
msgstr ""
+"поведінка за замовчуванням для рекурсивного отримання підмодулів (нижчий "
+"пріоритет, ніж у конфігураційних файлів)"
msgid "accept refs that update .git/shallow"
-msgstr ""
+msgstr "приймати посилання, які оновлюють .git/shallow"
msgid "refmap"
-msgstr ""
+msgstr "refmap"
msgid "specify fetch refmap"
-msgstr ""
+msgstr "вказати мапу посилань для fetch"
msgid "report that we have only objects reachable from this object"
-msgstr ""
+msgstr "звітувати, що у нас є тільки обʼєкти, доступні з цього обʼєкта"
msgid "do not fetch a packfile; instead, print ancestors of negotiation tips"
msgstr ""
+"не отримувати файл пакунка; замість цього роздрукувати предків верхівок для "
+"узгодження"
msgid "run 'maintenance --auto' after fetching"
-msgstr ""
+msgstr "виконати \"maintenance --auto\" після отримуваання"
msgid "check for forced-updates on all updated branches"
-msgstr ""
+msgstr "перевірити на примусове оновлення для всіх оновлених гілок"
msgid "write the commit-graph after fetching"
-msgstr ""
+msgstr "записати коміт-граф після отримання"
msgid "accept refspecs from stdin"
-msgstr ""
+msgstr "приймати визначники посилань з stdin"
msgid "--negotiate-only needs one or more --negotiation-tip=*"
-msgstr ""
+msgstr "--negotiate-only потребує одного або кількох --negotiation-tip=*"
msgid "negative depth in --deepen is not supported"
-msgstr ""
+msgstr "відʼємна глибина в --deepen не підтримується"
msgid "--unshallow on a complete repository does not make sense"
-msgstr ""
+msgstr "--unshallow на повному сховищі не має сенсу"
#, c-format
msgid "failed to fetch bundles from '%s'"
@@ -5844,21 +6072,24 @@ msgstr "fetch --all не має сенсу з визначниками поси
#, c-format
msgid "no such remote or remote group: %s"
-msgstr ""
+msgstr "немає такого віддаленого призначення або віддаленої групи: %s"
msgid "fetching a group and specifying refspecs does not make sense"
-msgstr ""
+msgstr "отримання групи і вказівка визначників посилань не має сенсу"
msgid "must supply remote when using --negotiate-only"
msgstr ""
+"необхідно вказати віддалене призначення при використанні --negotiate-only"
msgid "protocol does not support --negotiate-only, exiting"
-msgstr ""
+msgstr "протокол не підтримує --negotiate-only, вихід"
msgid ""
"--filter can only be used with the remote configured in extensions."
"partialclone"
msgstr ""
+"--filter можна використовувати лише з віддаленим призначенням, налаштованим "
+"у extensions.partialclone"
msgid "--atomic can only be used when fetching from one remote"
msgstr ""
@@ -5867,22 +6098,24 @@ msgstr ""
msgid "--stdin can only be used when fetching from one remote"
msgstr ""
+"--stdin можна використовувати лише при отриманні одного віддаленого джерела"
msgid ""
"git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"
msgstr ""
+"git fmt-merge-msg [-m <допис>] [--log[=<н>] | --no-log] [--file <файл>]"
msgid "populate log with at most <n> entries from shortlog"
-msgstr ""
+msgstr "заповнити журнал не більше ніж <н> записами з shortlog"
msgid "alias for --log (deprecated)"
-msgstr ""
+msgstr "псевдонім для --log (застарілий)"
msgid "text"
-msgstr ""
+msgstr "текст"
msgid "use <text> as start of message"
-msgstr ""
+msgstr "використовувати <текст> як початок допису"
msgid "use <name> instead of the real target branch"
msgstr "використовувати <назва> замість реальної цільової гілки"
@@ -5894,68 +6127,68 @@ msgid "git for-each-ref [<options>] [<pattern>]"
msgstr "git for-each-ref [<опції>] [<шаблон>]"
msgid "git for-each-ref [--points-at <object>]"
-msgstr ""
+msgstr "git for-each-ref [--points-at <обʼєкт>]"
msgid "git for-each-ref [--merged [<commit>]] [--no-merged [<commit>]]"
-msgstr ""
+msgstr "git for-each-ref [--merged [<коміт>]] [--no-merged [<коміт>]]"
msgid "git for-each-ref [--contains [<commit>]] [--no-contains [<commit>]]"
-msgstr ""
+msgstr "git for-each-ref [--contains [<коміт>]] [--no-contains [<коміт>]]"
msgid "quote placeholders suitably for shells"
-msgstr ""
+msgstr "заповнювачі лапок для shell"
msgid "quote placeholders suitably for perl"
-msgstr ""
+msgstr "заповнювачі лапок для perl"
msgid "quote placeholders suitably for python"
-msgstr ""
+msgstr "заповнювачі лапок для python"
msgid "quote placeholders suitably for Tcl"
-msgstr ""
+msgstr "заповнювачі лапок для Tcl"
msgid "show only <n> matched refs"
-msgstr ""
+msgstr "показати тільки <н> відповідних посилань"
msgid "respect format colors"
-msgstr ""
+msgstr "дотримуватися кольорів формату"
msgid "print only refs which points at the given object"
-msgstr ""
+msgstr "виводити тільки посилання, які вказують на заданий об’єкт"
msgid "print only refs that are merged"
-msgstr ""
+msgstr "виводити тільки злиті посилання"
msgid "print only refs that are not merged"
-msgstr ""
+msgstr "виводити тільки не злиті посилання"
msgid "print only refs which contain the commit"
-msgstr ""
+msgstr "виводити тільки ті посилання, що містять коміт"
msgid "print only refs which don't contain the commit"
-msgstr ""
+msgstr "виводити тільки ті посилання, що не містять коміту"
msgid "read reference patterns from stdin"
msgstr "читати шаблони посилань з stdin"
msgid "unknown arguments supplied with --stdin"
-msgstr ""
+msgstr "невідомі аргументи надані через --stdin"
msgid "git for-each-repo --config=<config> [--] <arguments>"
-msgstr ""
+msgstr "git for-each-repo --config=<конфіг> [--] <аргументи>"
msgid "config"
-msgstr ""
+msgstr "конфіг"
msgid "config key storing a list of repository paths"
-msgstr ""
+msgstr "ключ конфігурації, в якому зберігається список шляхів до сховищ"
msgid "missing --config=<config>"
-msgstr ""
+msgstr "відсутній --config=<конфіг>"
#, c-format
msgid "got bad config --config=%s"
-msgstr ""
+msgstr "невірно задано параметр --config=%s"
msgid "unknown"
msgstr "невідомо"
@@ -5964,17 +6197,17 @@ msgstr "невідомо"
#, c-format
msgid "error in %s %s: %s"
-msgstr ""
+msgstr "помилка в %s %s: %s"
#. TRANSLATORS: e.g. warning in tree 01bfda: <more explanation>
#, c-format
msgid "warning in %s %s: %s"
-msgstr ""
+msgstr "попередження в %s %s: %s"
#, c-format
msgid "broken link from %7s %s"
-msgstr ""
+msgstr "пошкоджене посилання з %7s %s"
msgid "wrong object type in link"
msgstr "невірний тип об’єкта в посиланні"
@@ -5984,21 +6217,23 @@ msgid ""
"broken link from %7s %s\n"
" to %7s %s"
msgstr ""
+"пошкоджене посилання з %7s %s\n"
+" на %7s %s"
msgid "Checking connectivity"
msgstr "Перевірка підключення"
#, c-format
msgid "missing %s %s"
-msgstr ""
+msgstr "відсутній %s %s"
#, c-format
msgid "unreachable %s %s"
-msgstr ""
+msgstr "недосяжний %s %s"
#, c-format
msgid "dangling %s %s"
-msgstr ""
+msgstr "висячий %s %s"
msgid "could not create lost-found"
msgstr "не вдалося створити lost-found"
@@ -6024,27 +6259,27 @@ msgid "Checking %s %s"
msgstr "Перевірка %s %s"
msgid "broken links"
-msgstr ""
+msgstr "пошкоджені посилання"
#, c-format
msgid "root %s"
-msgstr ""
+msgstr "корінь %s"
#, c-format
msgid "tagged %s %s (%s) in %s"
-msgstr ""
+msgstr "з тегом %s %s (%s) в %s"
#, c-format
msgid "%s: object corrupt or missing"
-msgstr ""
+msgstr "%s: об’єкт пошкоджений або відсутній"
#, c-format
msgid "%s: invalid reflog entry %s"
-msgstr "%s: неприпустимий запис reflog %s"
+msgstr "%s: неприпустимий запис журналу посилань %s"
#, c-format
msgid "Checking reflog %s->%s"
-msgstr ""
+msgstr "Перевірка журналу посилань %s->%s"
#, c-format
msgid "%s: invalid sha1 pointer %s"
@@ -6055,27 +6290,27 @@ msgid "%s: not a commit"
msgstr "%s не є комітом"
msgid "notice: No default references"
-msgstr ""
+msgstr "повідомлення: Немає посилань за замовчуванням"
#, c-format
msgid "%s: hash-path mismatch, found at: %s"
-msgstr ""
+msgstr "%s: невідповідність хеш/шлях знайдена в: %s"
#, c-format
msgid "%s: object corrupt or missing: %s"
-msgstr ""
+msgstr "%s: об’єкт пошкоджений або відсутній: %s"
#, c-format
msgid "%s: object is of unknown type '%s': %s"
-msgstr ""
+msgstr "%s: об’єкт невідомого типу \"%s\": %s"
#, c-format
msgid "%s: object could not be parsed: %s"
-msgstr ""
+msgstr "%s: неможливо розібрати об’єкт: %s"
#, c-format
msgid "bad sha1 file: %s"
-msgstr ""
+msgstr "невірний sha1 файл: %s"
msgid "Checking object directory"
msgstr "Перевірка директорії об’єкта"
@@ -6093,15 +6328,15 @@ msgstr "неприпустимий %s"
#, c-format
msgid "%s points to something strange (%s)"
-msgstr ""
+msgstr "%s вказує на щось дивне (%s)"
#, c-format
msgid "%s: detached HEAD points at nothing"
-msgstr ""
+msgstr "%s: відокремлений HEAD вказує на ніщо"
#, c-format
msgid "notice: %s points to an unborn branch (%s)"
-msgstr ""
+msgstr "повідомлення: %s вказує на ненароджену гілку (%s)"
#, c-format
msgid "Checking cache tree of %s"
@@ -6112,7 +6347,7 @@ msgid "%s: invalid sha1 pointer in cache-tree of %s"
msgstr "%s: невірний sha1 вказівник в cache-tree для %s"
msgid "non-tree in cache-tree"
-msgstr ""
+msgstr "non-tree в cache-tree"
#, c-format
msgid "%s: invalid sha1 pointer in resolve-undo of %s"
@@ -6120,11 +6355,11 @@ msgstr "%s: невірний sha1 вказівник в resolve-undo для %s"
#, c-format
msgid "unable to load rev-index for pack '%s'"
-msgstr "не вдалося завантажити rev-index для пакуна \"%s\""
+msgstr "не вдалося завантажити rev-index для пакунку \"%s\""
#, c-format
msgid "invalid rev-index for pack '%s'"
-msgstr "невірний rev-index для пакуна \"%s\""
+msgstr "неприпустимий rev-index для \"%s\""
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
@@ -6132,75 +6367,79 @@ msgid ""
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
" [--[no-]name-objects] [<object>...]"
msgstr ""
+"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
+" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
+" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
+" [--[no-]name-objects] [<обʼєкт>...]"
msgid "show unreachable objects"
-msgstr ""
+msgstr "показати недосяжні об’єкти"
msgid "show dangling objects"
-msgstr "показувати висячі об’єкти"
+msgstr "показати висячі об’єкти"
msgid "report tags"
-msgstr ""
+msgstr "звітувати про теги"
msgid "report root nodes"
-msgstr ""
+msgstr "звітувати про кореневі вузли"
msgid "make index objects head nodes"
-msgstr ""
+msgstr "побудувати головні вузли об’єктів індексу"
msgid "make reflogs head nodes (default)"
-msgstr "зробити reflogs головними вузлами (за замовчуванням)"
+msgstr "побудувати головні вузли журналу посилань (за замовчуванням)"
msgid "also consider packs and alternate objects"
-msgstr ""
+msgstr "також розглядати пакунки та запозичені об’єкти"
msgid "check only connectivity"
-msgstr ""
+msgstr "перевірити лише звʼязність"
msgid "enable more strict checking"
-msgstr ""
+msgstr "увімкнути більш сувору перевірку"
msgid "write dangling objects in .git/lost-found"
-msgstr ""
+msgstr "записувати висячі об’єкти в .git/lost-found"
msgid "show progress"
-msgstr ""
+msgstr "показувати прогрес"
msgid "show verbose names for reachable objects"
-msgstr ""
+msgstr "показувати докладні назви для доступних об’єктів"
msgid "Checking objects"
msgstr "Перевірка обʼєктів"
#, c-format
msgid "%s: object missing"
-msgstr ""
+msgstr "%s: об’єкт відсутній"
#, c-format
msgid "invalid parameter: expected sha1, got '%s'"
-msgstr "неприпустимий параметр: очікувався sha1, надано \"%s\""
+msgstr "неприпустимий параметр: очікувалось sha1, надано \"%s\""
msgid "git fsmonitor--daemon start [<options>]"
-msgstr ""
+msgstr "git fsmonitor--daemon start [<опції>]"
msgid "git fsmonitor--daemon run [<options>]"
-msgstr ""
+msgstr "git fsmonitor--daemon run [<опції>]"
#, c-format
msgid "value of '%s' out of range: %d"
-msgstr ""
+msgstr "значення \"%s\" за межами діапазону: %d"
#, c-format
msgid "value of '%s' not bool or int: %d"
-msgstr ""
+msgstr "значення \"%s\" не є bool або int: %d"
#, c-format
msgid "fsmonitor-daemon is watching '%s'\n"
-msgstr ""
+msgstr "fsmonitor-daemon стежить за \"%s\"\n"
#, c-format
msgid "fsmonitor-daemon is not watching '%s'\n"
-msgstr ""
+msgstr "fsmonitor-daemon не стежить за \"%s\"\n"
#, c-format
msgid "could not create fsmonitor cookie '%s'"
@@ -6208,23 +6447,23 @@ msgstr "не вдалося створити fsmonitor cookie \"%s\""
#, c-format
msgid "fsmonitor: cookie_result '%d' != SEEN"
-msgstr ""
+msgstr "fsmonitor: cookie_result \"%d\" != SEEN"
#, c-format
msgid "could not start IPC thread pool on '%s'"
msgstr "не вдалося запустити пул потоків IPC на \"%s\""
msgid "could not start fsmonitor listener thread"
-msgstr ""
+msgstr "не вдалося запустити потік слухача fsmonitor"
msgid "could not start fsmonitor health thread"
-msgstr ""
+msgstr "не вдалося запустити потік стану fsmonitor"
msgid "could not initialize listener thread"
-msgstr ""
+msgstr "не вдалося ініціалізувати потік слухача"
msgid "could not initialize health thread"
-msgstr ""
+msgstr "не вдалося ініціалізувати потік стану"
#, c-format
msgid "could not cd home '%s'"
@@ -6232,33 +6471,33 @@ msgstr "не вдалося виконати cd home \"%s\""
#, c-format
msgid "fsmonitor--daemon is already running '%s'"
-msgstr ""
+msgstr "fsmonitor--daemon вже запущений \"%s\""
#, c-format
msgid "running fsmonitor-daemon in '%s'\n"
-msgstr ""
+msgstr "запуск fsmonitor-daemon в \"%s\"\n"
#, c-format
msgid "starting fsmonitor-daemon in '%s'\n"
-msgstr ""
+msgstr "старт fsmonitor-daemon в \"%s\"\n"
msgid "daemon failed to start"
msgstr "не вдалося запустити демон"
msgid "daemon not online yet"
-msgstr ""
+msgstr "демон ще не онлайн"
msgid "daemon terminated"
-msgstr ""
+msgstr "роботу демона припинено"
msgid "detach from console"
msgstr "від’єднати від консолі"
msgid "use <n> ipc worker threads"
-msgstr ""
+msgstr "використовувати <н> потоків IPC працівника"
msgid "max seconds to wait for background daemon startup"
-msgstr ""
+msgstr "максимальна кількість секунд для очікування запуску фонового демона"
#, c-format
msgid "invalid 'ipc-threads' value (%d)"
@@ -6266,10 +6505,10 @@ msgstr "невірне значення \"ipc-threads\" (%d)"
#, c-format
msgid "Unhandled subcommand '%s'"
-msgstr ""
+msgstr "Необроблена підкоманда \"%s\""
msgid "fsmonitor--daemon not supported on this platform"
-msgstr ""
+msgstr "fsmonitor--daemon не підтримується на цій платформі"
msgid "git gc [<options>]"
msgstr "git gc [<опції>]"
@@ -6294,24 +6533,29 @@ msgid ""
"\n"
"%s"
msgstr ""
+"Попередній запуск gc показав наступне. Будь ласка, виправте першопричину\n"
+"і видаліть %s\n"
+"Автоматичне очищення не буде виконано, доки файл не буде вилучено.\n"
+"\n"
+"%s"
msgid "prune unreferenced objects"
-msgstr "видалити об’єкти без посилань"
+msgstr "видалити об’єкти, на які немає посилань"
msgid "pack unreferenced objects separately"
-msgstr ""
+msgstr "пакувати об’єкти, на які немає посилань, окремо"
msgid "be more thorough (increased runtime)"
-msgstr ""
+msgstr "працювати ретельніше (збільшує час виконання)"
msgid "enable auto-gc mode"
-msgstr ""
+msgstr "увімкнути режим автоматичного збору сміття"
msgid "force running gc even if there may be another gc running"
-msgstr ""
+msgstr "примусово запускати збирач сміття, навіть якщо інший збирач вже працює"
msgid "repack all other packs except the largest pack"
-msgstr ""
+msgstr "перепакувати всі пакунки, крім найбільшого"
#, c-format
msgid "failed to parse gc.logExpiry value %s"
@@ -6320,38 +6564,47 @@ msgstr "не вдалося розібрати gc.logExpiry значення %s"
#, c-format
msgid "failed to parse prune expiry value %s"
msgstr ""
+"не вдалося розібрати значення дати закінчення терміну дії для видалення %s"
#, c-format
msgid "Auto packing the repository in background for optimum performance.\n"
msgstr ""
+"Автоматичне пакування сховища у фоновому режимі для оптимальної "
+"продуктивності.\n"
#, c-format
msgid "Auto packing the repository for optimum performance.\n"
-msgstr ""
+msgstr "Автоматичне пакування сховища для оптимальної продуктивності.\n"
#, c-format
msgid "See \"git help gc\" for manual housekeeping.\n"
msgstr ""
+"Дивіться \"git help gc\" для отримання інформації про налагодження вручну.\n"
#, c-format
msgid ""
"gc is already running on machine '%s' pid %<PRIuMAX> (use --force if not)"
msgstr ""
+"збір сміття вже запущено на машині \"%s\" pid %<PRIuMAX> (скористайтесь --"
+"force, якщо ні)"
msgid ""
"There are too many unreachable loose objects; run 'git prune' to remove them."
msgstr ""
+"Занадто багато недосяжних вільних об’єктів; запустіть \"git prune\", щоб "
+"вилучити їх."
msgid ""
"git maintenance run [--auto] [--[no-]quiet] [--task=<task>] [--schedule]"
msgstr ""
+"git maintenance run [--auto] [--[no-]quiet] [--task=<завдання>] [--schedule]"
msgid "--no-schedule is not allowed"
-msgstr ""
+msgstr "--no-schedule не дозволяється"
#, c-format
msgid "unrecognized --schedule argument '%s'"
-msgstr ""
+msgstr "нерозпізнаний аргумент --schedule \"%s\""
msgid "failed to write commit-graph"
msgstr "не вдалося записати граф комітів"
@@ -6360,31 +6613,32 @@ msgid "failed to prefetch remotes"
msgstr "не вдалося виконати попереднє отримання з віддалених сховищ"
msgid "failed to start 'git pack-objects' process"
-msgstr "не вдалося розпочати \"git pack-objects\" процес"
+msgstr "не вдалося запустити \"git pack-objects\" процес"
msgid "failed to finish 'git pack-objects' process"
-msgstr ""
+msgstr "не вдалося завершити \"git pack-objects\" процес"
msgid "failed to write multi-pack-index"
-msgstr ""
+msgstr "не вдалося записати multi-pack-index"
msgid "'git multi-pack-index expire' failed"
-msgstr ""
+msgstr "\"git multi-pack-index expire\" завершився невдало"
msgid "'git multi-pack-index repack' failed"
-msgstr ""
+msgstr "\"git multi-pack-index repack\" завершився невдало"
msgid ""
"skipping incremental-repack task because core.multiPackIndex is disabled"
msgstr ""
+"пропуск incremental-repack завдання, оскільки core.multiPackIndex вимкнено"
#, c-format
msgid "lock file '%s' exists, skipping maintenance"
-msgstr ""
+msgstr "файл блокування \"%s\" існує, пропуск обслуговування"
#, c-format
msgid "task '%s' failed"
-msgstr ""
+msgstr "завдання \"%s\" завершилося невдало"
#, c-format
msgid "'%s' is not a valid task"
@@ -6395,36 +6649,36 @@ msgid "task '%s' cannot be selected multiple times"
msgstr "завдання \"%s\" не можна вибрати кілька разів"
msgid "run tasks based on the state of the repository"
-msgstr ""
+msgstr "запускати завдання на основі стану сховища"
msgid "frequency"
-msgstr ""
+msgstr "частота"
msgid "run tasks based on frequency"
-msgstr ""
+msgstr "запускати задачі на основі частоти"
msgid "do not report progress or other information over stderr"
-msgstr ""
+msgstr "не показувати хід виконання та іншу інформацію в stderr"
msgid "task"
-msgstr ""
+msgstr "завдання"
msgid "run a specific task"
-msgstr ""
+msgstr "запустити певне завдання"
msgid "use at most one of --auto and --schedule=<frequency>"
-msgstr ""
+msgstr "використовуйте щонайбільше одну з опцій --auto та --schedule=<частота>"
#, c-format
msgid "unable to add '%s' value of '%s'"
-msgstr "не вдалося додати значення \"%s\" до \"%s\""
+msgstr "не вдалося додати \"%s\" значення до \"%s\""
msgid "return success even if repository was not registered"
-msgstr ""
+msgstr "повертати успіх, навіть якщо сховище не було зареєстровано"
#, c-format
msgid "unable to unset '%s' value of '%s'"
-msgstr "не вдалося скинути значення \"%s\" для \"%s\""
+msgstr "не вдалося скинути \"%s\" значення для \"%s\""
#, c-format
msgid "repository '%s' is not registered"
@@ -6453,6 +6707,8 @@ msgstr "не вдалося запустити schtasks"
msgid "failed to run 'crontab -l'; your system might not support 'cron'"
msgstr ""
+"не вдалося запустити \"crontab -l\"; можливо, ваша система не підтримує "
+"\"cron\""
msgid "failed to create crontab temporary file"
msgstr "не вдалося створити тимчасовий crontab файл"
@@ -6462,9 +6718,10 @@ msgstr "не вдалося відкрити тимчасовий файл"
msgid "failed to run 'crontab'; your system might not support 'cron'"
msgstr ""
+"не вдалося запустити \"crontab\"; можливо, ваша система не підтримує \"cron\""
msgid "'crontab' died"
-msgstr ""
+msgstr "\"crontab\" завершився невдало"
msgid "failed to start systemctl"
msgstr "не вдалося стартувати systemctl"
@@ -6482,32 +6739,32 @@ msgstr "не вдалося очистити \"%s\""
#, c-format
msgid "unrecognized --scheduler argument '%s'"
-msgstr ""
+msgstr "нерозпізнаний --scheduler аргумент \"%s\""
msgid "neither systemd timers nor crontab are available"
-msgstr ""
+msgstr "недоступні ні systemd таймери, ні crontab"
#, c-format
msgid "%s scheduler is not available"
-msgstr ""
+msgstr "%s планувальник недоступний"
msgid "another process is scheduling background maintenance"
-msgstr ""
+msgstr "ще один процес планує фонове обслуговування"
msgid "git maintenance start [--scheduler=<scheduler>]"
-msgstr ""
+msgstr "git maintenance start [--scheduler=<планувальник>]"
msgid "scheduler"
-msgstr ""
+msgstr "планувальник"
msgid "scheduler to trigger git maintenance run"
-msgstr ""
+msgstr "планувальник для запуску обслуговування git"
msgid "failed to add repo to global config"
-msgstr ""
+msgstr "не вдалося додати сховище до глобальної конфігурації"
msgid "git maintenance <subcommand> [<options>]"
-msgstr ""
+msgstr "git maintenance <підкоманда> [<опції>]"
msgid "git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"
msgstr "git grep [<опції>] [-e] <шаблон> [<ревізія>...] [[--] <шлях>...]"
@@ -6518,7 +6775,7 @@ msgstr "grep: не вдалося створити потік: %s"
#, c-format
msgid "invalid number of threads specified (%d) for %s"
-msgstr "невірно вказано кількість потоків (%d) для %s"
+msgstr "невірно вказана кількість потоків (%d) для %s"
#. TRANSLATORS: %s is the configuration
#. variable for tweaking threads, currently
@@ -6527,7 +6784,7 @@ msgstr "невірно вказано кількість потоків (%d) д
#, c-format
msgid "no threads support, ignoring %s"
-msgstr "немає підтримки потоків, ігноруються %s"
+msgstr "немає підтримки потоків, ігнорування %s"
#, c-format
msgid "unable to read tree (%s)"
@@ -6535,155 +6792,155 @@ msgstr "не вдалося прочитати дерево (%s)"
#, c-format
msgid "unable to grep from object of type %s"
-msgstr "не вдалося виконати grep з об’єкта типу %s"
+msgstr "не вдалося виконати grep для об’єкта типу %s"
#, c-format
msgid "switch `%c' expects a numerical value"
-msgstr ""
+msgstr "switch \"%c\" очікує числове значення"
msgid "search in index instead of in the work tree"
msgstr "шукати в індексі замість робочого дерева"
msgid "find in contents not managed by git"
-msgstr ""
+msgstr "шукати у вмісті, не індексованому git"
msgid "search in both tracked and untracked files"
msgstr "шукати як у відстежуваних, так і в невідстежуваних файлах"
msgid "ignore files specified via '.gitignore'"
-msgstr ""
+msgstr "ігнорувати файли, вказані через \".gitignore\""
msgid "recursively search in each submodule"
msgstr "шукати рекурсивно в кожному підмодулі"
msgid "show non-matching lines"
-msgstr ""
+msgstr "показувати рядки, що не збігаються"
msgid "case insensitive matching"
-msgstr ""
+msgstr "нечутливе до регістру зіставлення"
msgid "match patterns only at word boundaries"
-msgstr ""
+msgstr "зіставляти шаблони тільки на межі слів"
msgid "process binary files as text"
-msgstr ""
+msgstr "обробляти бінарні файли як текст"
msgid "don't match patterns in binary files"
-msgstr ""
+msgstr "не зіставляти шаблони в бінарних файлах"
msgid "process binary files with textconv filters"
-msgstr ""
+msgstr "обробляти бінарні файли за допомогою textconv фільтрів"
msgid "search in subdirectories (default)"
-msgstr ""
+msgstr "шукати в піддиректоріях (за замовчуванням)"
msgid "descend at most <depth> levels"
-msgstr ""
+msgstr "спускатися не більше ніж на <глибина> рівнів"
msgid "use extended POSIX regular expressions"
-msgstr ""
+msgstr "використовувати розширені POSIX регулярні вирази"
msgid "use basic POSIX regular expressions (default)"
-msgstr ""
+msgstr "використовувати базові регулярні вирази POSIX (за замовчуванням)"
msgid "interpret patterns as fixed strings"
-msgstr ""
+msgstr "інтерпретувати шаблони як фіксовані строки"
msgid "use Perl-compatible regular expressions"
-msgstr ""
+msgstr "використовувати Perl-сумісні регулярні вирази"
msgid "show line numbers"
-msgstr ""
+msgstr "показувати номери рядків"
msgid "show column number of first match"
-msgstr ""
+msgstr "показувати номер стовпця першого збігу"
msgid "don't show filenames"
-msgstr ""
+msgstr "не показувати назви файлів"
msgid "show filenames"
-msgstr ""
+msgstr "показувати назви файлів"
msgid "show filenames relative to top directory"
-msgstr ""
+msgstr "показувати назви файлів відносно верхнього каталогу"
msgid "show only filenames instead of matching lines"
-msgstr ""
+msgstr "показувати лише назви файлів замість відповідних рядків"
msgid "synonym for --files-with-matches"
-msgstr ""
+msgstr "синонім для --files-with-matches"
msgid "show only the names of files without match"
-msgstr ""
+msgstr "показувати лише назви файлів без збігу"
msgid "print NUL after filenames"
-msgstr ""
+msgstr "друкувати NUL після назв файлів"
msgid "show only matching parts of a line"
-msgstr ""
+msgstr "показувати лише частини рядка, що збігаються"
msgid "show the number of matches instead of matching lines"
-msgstr ""
+msgstr "показувати кількість збігів замість рядків, що збігаються"
msgid "highlight matches"
-msgstr ""
+msgstr "виділяти збіги"
msgid "print empty line between matches from different files"
-msgstr ""
+msgstr "друкувати порожній рядок між збігами з різних файлів"
msgid "show filename only once above matches from same file"
-msgstr ""
+msgstr "показувати назву файлу лише один раз над збігами з того файлу"
msgid "show <n> context lines before and after matches"
-msgstr ""
+msgstr "показувати <н> рядків до і після збігу"
msgid "show <n> context lines before matches"
-msgstr ""
+msgstr "показувати <н> рядків до збігу"
msgid "show <n> context lines after matches"
-msgstr ""
+msgstr "показувати <н> рядків після збігу"
msgid "use <n> worker threads"
-msgstr ""
+msgstr "використати <н> робочих потоків"
msgid "shortcut for -C NUM"
-msgstr ""
+msgstr "скорочення для -C номер"
msgid "show a line with the function name before matches"
-msgstr ""
+msgstr "показувати рядок з назвою функції перед збігами"
msgid "show the surrounding function"
-msgstr ""
+msgstr "показати навколишню функцію"
msgid "read patterns from file"
-msgstr ""
+msgstr "зчитувати шаблони з файлу"
msgid "match <pattern>"
-msgstr ""
+msgstr "зіставляти <шаблон>"
msgid "combine patterns specified with -e"
-msgstr ""
+msgstr "об’єднати шаблони, вказані через -e"
msgid "indicate hit with exit status without output"
-msgstr ""
+msgstr "позначати збіг кодом виходу без виводу"
msgid "show only matches from files that match all patterns"
-msgstr ""
+msgstr "показувати збіги лише з файлів, які відповідають усім шаблонам"
msgid "pager"
-msgstr ""
+msgstr "пейджер"
msgid "show matching files in the pager"
-msgstr ""
+msgstr "показати відповідні файли в пейджері"
msgid "allow calling of grep(1) (ignored by this build)"
-msgstr ""
+msgstr "дозволяти виклик grep(1) (ігнорується у цій збірці)"
msgid "maximum number of results per file"
-msgstr ""
+msgstr "максимальна кількість результатів у файлі"
msgid "no pattern given"
-msgstr ""
+msgstr "шаблон не надано"
msgid "--no-index or --untracked cannot be used with revs"
msgstr "--no-index або --untracked не можна використовувати з ревізіями"
@@ -6693,10 +6950,10 @@ msgid "unable to resolve revision: %s"
msgstr "не вдалося розвʼязати ревізію: %s"
msgid "--untracked not supported with --recurse-submodules"
-msgstr ""
+msgstr "--untracked не підтримується з --recurse-submodules"
msgid "invalid option combination, ignoring --threads"
-msgstr ""
+msgstr "неприпустима комбінація опцій, ігнорування --threads"
msgid "no threads support, ignoring --threads"
msgstr "немає підтримки потоків, ігнорування --threads"
@@ -6706,93 +6963,99 @@ msgid "invalid number of threads specified (%d)"
msgstr "вказано неприпустиму кількість потоків (%d)"
msgid "--open-files-in-pager only works on the worktree"
-msgstr ""
+msgstr "--open-files-in-pager працює тільки в робочому дереві"
msgid "--[no-]exclude-standard cannot be used for tracked contents"
msgstr ""
+"--[no-]exclude-standard не можна використовувати для відстежуваного вмісту"
msgid "both --cached and trees are given"
-msgstr ""
+msgstr "надані як --cached, так і дерева"
msgid ""
"git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
" [--stdin [--literally]] [--] <file>..."
msgstr ""
+"git hash-object [-t <тип>] [-w] [--path=<файл> | --no-filters]\n"
+" [--stdin [--literally]] [--] <файл>..."
msgid "git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]"
-msgstr ""
+msgstr "git hash-object [-t <тип>] [-w] --stdin-paths [--no-filters]"
msgid "object type"
msgstr "тип обʼєкта"
msgid "write the object into the object database"
-msgstr ""
+msgstr "записати об’єкт до бази даних об’єктів"
msgid "read the object from stdin"
-msgstr ""
+msgstr "прочитати об’єкт з stdin"
msgid "store file as is without filters"
-msgstr ""
+msgstr "зберегти файл як є без фільтрів"
msgid ""
"just hash any random garbage to create corrupt objects for debugging Git"
msgstr ""
+"просто хешувати будь-який випадковий непотріб, щоб створити пошкоджені "
+"об’єкти для відлагодження Git"
msgid "process file as it were from this path"
-msgstr ""
+msgstr "оброблювати файл, наче він з цього шляху"
msgid "print all available commands"
-msgstr ""
+msgstr "показати всі доступні команди"
msgid "show external commands in --all"
-msgstr ""
+msgstr "показати зовнішні команди в --all"
msgid "show aliases in --all"
-msgstr ""
+msgstr "показати псевдоніми в --all"
msgid "exclude guides"
-msgstr ""
+msgstr "виключити посібники"
msgid "show man page"
-msgstr ""
+msgstr "показати сторінку керівництва користувача"
msgid "show manual in web browser"
-msgstr ""
+msgstr "показати сторінку керівництва користувача в веб-браузері"
msgid "show info page"
-msgstr ""
+msgstr "показати інформаційну сторінку"
msgid "print command description"
-msgstr ""
+msgstr "показати опис команди"
msgid "print list of useful guides"
-msgstr ""
+msgstr "показати список корисних посібників"
msgid "print list of user-facing repository, command and file interfaces"
-msgstr ""
+msgstr "показати список інтерфейсів користувача для сховищ, команд та файлів"
msgid "print list of file formats, protocols and other developer interfaces"
msgstr ""
+"показати список форматів файлів, протоколів та інших інтерфейсів розробника"
msgid "print all configuration variable names"
-msgstr ""
+msgstr "показати всі назви конфігураційних змінних"
msgid "git help [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]"
-msgstr ""
+msgstr "git help [[-i|--info] [-m|--man] [-w|--web]] [<команда>|<док>]"
#, c-format
msgid "unrecognized help format '%s'"
-msgstr ""
+msgstr "нерозпізнаний формат довідки \"%s\""
msgid "Failed to start emacsclient."
-msgstr "Не вдалося запустити emacs клієнт."
+msgstr "Не вдалося запустити emacsclient."
msgid "Failed to parse emacsclient version."
-msgstr "Не вдалося розібрати версію emacs клієнта."
+msgstr "Не вдалося розібрати версію emacsclient."
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
-msgstr ""
+msgstr "версія emacsclient \"%d\" застаріла (< 22)."
#, c-format
msgid "failed to exec '%s'"
@@ -6803,22 +7066,26 @@ msgid ""
"'%s': path for unsupported man viewer.\n"
"Please consider using 'man.<tool>.cmd' instead."
msgstr ""
+"\"%s\": шлях до непідтримуваного переглядача керівництва користувача.\n"
+"Будь ласка, скористайтесь \"man.<tool>.cmd\" замість цього."
#, c-format
msgid ""
"'%s': cmd for supported man viewer.\n"
"Please consider using 'man.<tool>.path' instead."
msgstr ""
+"\"%s\": команда для підтримуваного переглядача керівництва користувача.\n"
+"Будь ласка, скористайтесь \"man.<tool>.path\" замість цього."
#, c-format
msgid "'%s': unknown man viewer."
-msgstr ""
+msgstr "\"%s\": невідомий переглядач керівництва користувача."
msgid "no man viewer handled the request"
-msgstr ""
+msgstr "жоден з переглядачів керівництва користувача не обробив запит"
msgid "no info viewer handled the request"
-msgstr ""
+msgstr "жоден з переглядачів інформації не обробив запит"
#, c-format
msgid "'%s' is aliased to '%s'"
@@ -6826,30 +7093,34 @@ msgstr "\"%s\" є псевдонімом для \"%s\""
#, c-format
msgid "bad alias.%s string: %s"
-msgstr ""
+msgstr "невірний псевдонім.%s рядок: %s"
#, c-format
msgid "the '%s' option doesn't take any non-option arguments"
-msgstr ""
+msgstr "опція \"%s\" не приймає жодних неопціональних аргументів"
msgid ""
"the '--no-[external-commands|aliases]' options can only be used with '--all'"
msgstr ""
+"опції \"--no-[external-commands|aliases]\" можна використовувати лише з \"--"
+"all\""
#, c-format
msgid "usage: %s%s"
-msgstr ""
+msgstr "використання: %s%s"
msgid "'git help config' for more information"
-msgstr ""
+msgstr "\"git help config\" для додаткової інформації"
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 ""
+msgstr "мовчки ігнорувати відсутній <назва-гачка>"
msgid "file to read into hooks' stdin"
msgstr "файл, з якого читати stdin хука"
@@ -6999,9 +7270,9 @@ msgstr "Неочікувана контрольна сума наприкінц
#, c-format
msgid "pack has %d unresolved delta"
msgid_plural "pack has %d unresolved deltas"
-msgstr[0] "пакунок має %d невирішену дельту"
-msgstr[1] "пакунок має %d невирішених дельти"
-msgstr[2] "пакунок має %d невирішених дельт"
+msgstr[0] "пакунок має %d нерозвʼязану дельту"
+msgstr[1] "пакунок має %d нерозвʼязаних дельти"
+msgstr[2] "пакунок має %d нерозвʼязаних дельт"
#, c-format
msgid "unable to deflate appended object (%d)"
@@ -7068,7 +7339,7 @@ msgid "unknown hash algorithm '%s'"
msgstr "невідомий хеш-алгоритм '%s'"
msgid "--stdin requires a git repository"
-msgstr "--stdin вимагає наявності git сховища"
+msgstr "--stdin потребує наявності git сховища"
msgid "--verify with no packfile name given"
msgstr "--verify без зазначення имені файла пакунка"
@@ -7076,116 +7347,51 @@ msgstr "--verify без зазначення имені файла пакунк
msgid "fsck error in pack objects"
msgstr "помилка fsck в об’єктах пакунка"
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "неможливо виконати stat шаблона \"%s\""
-
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "неможливо виконати opendir \"%s\""
-
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "неможливо виконати readlink \"%s\""
-
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "неможливо виконати symlink \"%s\" \"%s\""
-
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "неможливо скопіювати \"%s\" до \"%s\""
-
-#, c-format
-msgid "ignoring template %s"
-msgstr ""
-
-#, c-format
-msgid "templates not found in %s"
-msgstr "шаблонів не знайдено в %s"
-
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "не копіюються шаблони з \"%s\": %s"
-
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "неприпустиме початкове ім’я гілки: \"%s\""
-
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "не вдалося обробити тип файлу %d"
-
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "не вдалося перемістити %s на %s"
-
-msgid "attempt to reinitialize repository with different hash"
-msgstr ""
-
-#, c-format
-msgid "%s already exists"
-msgstr "%s вже існує"
-
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr ""
-
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr ""
-
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr ""
-
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr ""
-
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr ""
-
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
" [-b <branch-name> | --initial-branch=<branch-name>]\n"
" [--shared[=<permissions>]] [<directory>]"
msgstr ""
+"git init [-q | --quiet] [--bare] [--template=<шаблон-директорія>]\n"
+" [--separate-git-dir <git-директорія>] [--object-format=<формат>]\n"
+" [-b <назва-гілки> | --initial-branch=<назва-гілки>]\n"
+" [--shared[=<дозволи>]] [<директорія>]"
msgid "permissions"
-msgstr "права доступу"
+msgstr "дозволи"
msgid "specify that the git repository is to be shared amongst several users"
-msgstr ""
+msgstr "вказати, що git сховище буде спільним для кількох користувачів"
msgid "override the name of the initial branch"
-msgstr ""
+msgstr "перевизначити назву початкової гілки"
msgid "hash"
-msgstr ""
+msgstr "хеш"
msgid "specify the hash algorithm to use"
-msgstr ""
+msgstr "вказати, який алгоритм хешування використовувати"
#, c-format
msgid "cannot mkdir %s"
-msgstr ""
+msgstr "не вдалося виконати mkdir %s"
#, c-format
msgid "cannot chdir to %s"
-msgstr ""
+msgstr "не вдалося виконати chdir %s"
#, c-format
msgid ""
"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
"dir=<directory>)"
msgstr ""
+"%s (або --work-tree=<директорія>) не дозволено без вказівки %s (або --git-"
+"dir=<каталог>)"
#, c-format
msgid "Cannot access work tree '%s'"
-msgstr "Не вдається отримати доступ до робочого дерева \"%s\""
+msgstr "Неможливо отримати доступ до робочого дерева \"%s\""
msgid "--separate-git-dir incompatible with bare repository"
msgstr "--separate-git-dir несумісна з порожнім сховищем"
@@ -7195,45 +7401,48 @@ msgid ""
" [(--trailer <token>[(=|:)<value>])...]\n"
" [--parse] [<file>...]"
msgstr ""
+"git interpret-trailers [--in-place] [--trim-empty]\n"
+" [(--trailer <токен>[(=|:)<значення>])...]\n"
+" [--parse] [<файл>...]"
msgid "edit files in place"
-msgstr ""
+msgstr "редагувати файли на місцях"
msgid "trim empty trailers"
-msgstr ""
+msgstr "обрізати порожні причепи"
msgid "where to place the new trailer"
-msgstr ""
+msgstr "де розмістити новий причіп"
msgid "action if trailer already exists"
-msgstr "що робити, якщо trailer вже існує"
+msgstr "що робити, якщо причіп вже існує"
msgid "action if trailer is missing"
-msgstr ""
+msgstr "що робити, якщо причіп відсутній"
msgid "output only the trailers"
-msgstr ""
+msgstr "виводити лише причепи"
msgid "do not apply config rules"
-msgstr ""
+msgstr "не застосовувати правила конфігурації"
msgid "join whitespace-continued values"
-msgstr ""
+msgstr "об’єднати значення, що продовжуються через пробіл"
msgid "set parsing options"
-msgstr ""
+msgstr "встановити параметри розбору"
msgid "do not treat --- specially"
-msgstr ""
+msgstr "не обробляти --- особливим чином"
msgid "trailer(s) to add"
-msgstr ""
+msgstr "причіп(и) для додавання"
msgid "--trailer with --only-input does not make sense"
-msgstr ""
+msgstr "--trailer з --only-input не має сенсу"
msgid "no input file given for in-place editing"
-msgstr ""
+msgstr "не надано вхідного файлу для редагування на місці"
msgid "git log [<options>] [<revision-range>] [[--] <path>...]"
msgstr "git log [<опції>] [<діапазон-ревізій>] [[--] <шлях>...]"
@@ -7246,45 +7455,47 @@ msgid "invalid --decorate option: %s"
msgstr "неприпустима --decorate опція: %s"
msgid "suppress diff output"
-msgstr ""
+msgstr "приховати вивід diff"
msgid "show source"
-msgstr ""
+msgstr "показати джерело"
msgid "clear all previously-defined decoration filters"
-msgstr ""
+msgstr "очистити всі раніше визначені фільтри оздоблення"
msgid "only decorate refs that match <pattern>"
-msgstr ""
+msgstr "оздоблювати лише посилання, що відповідають <шаблону>"
msgid "do not decorate refs that match <pattern>"
-msgstr ""
+msgstr "не оздоблювати посилання, що відповідають <шаблону>"
msgid "decorate options"
-msgstr ""
+msgstr "опції оздоблення"
msgid ""
"trace the evolution of line range <start>,<end> or function :<funcname> in "
"<file>"
msgstr ""
+"простежити еволюцію діапазону рядків <початок>,<кінець> або функції :<назва-"
+"функції> в <файлі>"
#, c-format
msgid "unrecognized argument: %s"
-msgstr ""
+msgstr "нерозпізнаний аргумент: %s"
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<діапазон>:<файл> не можна використовувати з визначником шляху"
#, c-format
msgid "Final output: %d %s\n"
-msgstr ""
+msgstr "Кінцевий результат: %d %s\n"
msgid "unable to create temporary object directory"
msgstr "не вдалося створити тимчасову директорію об’єкта"
#, c-format
msgid "git show %s: bad file"
-msgstr ""
+msgstr "git show %s: невірний файл"
#, c-format
msgid "could not read object %s"
@@ -7296,36 +7507,36 @@ msgstr "невідомий тип: %d"
#, c-format
msgid "%s: invalid cover from description mode"
-msgstr ""
+msgstr "%s: невірна обкладинка з режиму опису"
msgid "format.headers without value"
-msgstr ""
+msgstr "format.headers без значення"
#, c-format
msgid "cannot open patch file %s"
msgstr "не вдається відкрити файл латки %s"
msgid "need exactly one range"
-msgstr ""
+msgstr "потрібен лишень один діапазон"
msgid "not a range"
-msgstr ""
+msgstr "не діапазон"
msgid "cover letter needs email format"
-msgstr ""
+msgstr "супровідний лист має бути у форматі електронної пошти"
msgid "failed to create cover-letter file"
msgstr "не вдалося створити файл супровідного листа"
#, c-format
msgid "insane in-reply-to: %s"
-msgstr ""
+msgstr "неприпустимий in-reply-to: %s"
msgid "git format-patch [<options>] [<since> | <revision-range>]"
msgstr "git format-patch [<опції>] [<відколи> | <діапазон-ревізій>]"
msgid "two output directories?"
-msgstr ""
+msgstr "дві вихідні директорії?"
#, c-format
msgid "unknown commit %s"
@@ -7343,203 +7554,215 @@ msgid ""
"please use git branch --set-upstream-to to track a remote branch.\n"
"Or you could specify base commit by --base=<base-commit-id> manually"
msgstr ""
+"не вдалося отримати першоджерельне сховище. Якщо ви хочете записати базовий "
+"коміт автоматично,\n"
+"будь ласка, скористайтесь git branch --set-upstream-to для відстежування "
+"віддаленої гілки.\n"
+"Або ви можете вказати базовий коміт вручну за допомогою --"
+"base=<ідентифікатор-базового-коміту>"
msgid "failed to find exact merge base"
msgstr "не вдалося знайти точну базу для злиття"
msgid "base commit should be the ancestor of revision list"
-msgstr ""
+msgstr "базовий коміт має бути предком списку ревізій"
msgid "base commit shouldn't be in revision list"
-msgstr ""
+msgstr "базового коміту не має бути в списку ревізій"
msgid "cannot get patch id"
msgstr "неможливо отримати ідентифікатор латки"
msgid "failed to infer range-diff origin of current series"
-msgstr ""
+msgstr "не вдалося визначити походження різниці діапазонів поточного ряду"
#, c-format
msgid "using '%s' as range-diff origin of current series"
-msgstr ""
+msgstr "використання \"%s\" як походження різниці діапазонів поточного ряду"
msgid "use [PATCH n/m] even with a single patch"
-msgstr ""
+msgstr "використовуйте [PATCH n/m] навіть з однією латкою"
msgid "use [PATCH] even with multiple patches"
-msgstr ""
+msgstr "використовуйте [PATCH] навіть з кількома латками"
msgid "print patches to standard out"
-msgstr ""
+msgstr "вивести латки на стандартний вивід"
msgid "generate a cover letter"
-msgstr ""
+msgstr "скласти супровідний лист"
msgid "use simple number sequence for output file names"
-msgstr ""
+msgstr "використати просту послідовність чисел для назв вихідних файлів"
msgid "sfx"
-msgstr ""
+msgstr "суфікс"
msgid "use <sfx> instead of '.patch'"
-msgstr ""
+msgstr "використати <суфікс> замість \".patch\""
msgid "start numbering patches at <n> instead of 1"
-msgstr ""
+msgstr "почати нумерацію латок з <н> замість 1"
msgid "reroll-count"
-msgstr ""
+msgstr "кількість перекидань"
msgid "mark the series as Nth re-roll"
-msgstr ""
+msgstr "позначити ряд як N-не перекидання"
msgid "max length of output filename"
-msgstr ""
+msgstr "максимальна довжина назви вихідного файлу"
msgid "use [RFC PATCH] instead of [PATCH]"
-msgstr ""
+msgstr "використати [RFC PATCH] замість [PATCH]"
msgid "cover-from-description-mode"
-msgstr ""
+msgstr "cover-from-description-mode"
msgid "generate parts of a cover letter based on a branch's description"
-msgstr ""
+msgstr "скласти частини супровідного листа на основі опису гілки"
msgid "use [<prefix>] instead of [PATCH]"
-msgstr ""
+msgstr "використати [<префікс>] замість [PATCH]"
msgid "store resulting files in <dir>"
-msgstr ""
+msgstr "зберегти результуючі файли в <директорії>"
msgid "don't strip/add [PATCH]"
-msgstr ""
+msgstr "не видаляти/додавати [PATCH]"
msgid "don't output binary diffs"
-msgstr ""
+msgstr "не виводити бінарні різниці"
msgid "output all-zero hash in From header"
-msgstr ""
+msgstr "вивести хеш з усіма нулями в заголовку From"
msgid "don't include a patch matching a commit upstream"
msgstr ""
+"не включати латки, які мають відповідні коміти в першоджерельному сховищі"
msgid "show patch format instead of default (patch + stat)"
-msgstr ""
+msgstr "показати формат латки замість стандартного (латка + підсумок)"
msgid "Messaging"
-msgstr ""
+msgstr "Повідомлення"
msgid "header"
msgstr "заголовок"
msgid "add email header"
-msgstr ""
+msgstr "додати заголовок листа"
msgid "email"
-msgstr ""
+msgstr "електронна адреса"
msgid "add To: header"
-msgstr ""
+msgstr "додати To: заголовок"
msgid "add Cc: header"
-msgstr ""
+msgstr "додати Cc: заголовок"
msgid "ident"
-msgstr ""
+msgstr "особистість"
msgid "set From address to <ident> (or committer ident if absent)"
msgstr ""
+"встановити From адресу в <особистість> (або особистість комітера, якщо "
+"відсутня)"
msgid "message-id"
-msgstr ""
+msgstr "ідентифікатор-повідомлення"
msgid "make first mail a reply to <message-id>"
-msgstr ""
+msgstr "зробити перший лист відповіддю на <id-повідомлення>"
msgid "boundary"
-msgstr ""
+msgstr "межа"
msgid "attach the patch"
-msgstr ""
+msgstr "прикріпити латку"
msgid "inline the patch"
-msgstr ""
+msgstr "вставити латку"
msgid "enable message threading, styles: shallow, deep"
-msgstr ""
+msgstr "увімкнути потік повідомлень, стилі: дрібний, глибокий"
msgid "signature"
-msgstr ""
+msgstr "підпис"
msgid "add a signature"
-msgstr ""
+msgstr "додати підпис"
msgid "base-commit"
-msgstr ""
+msgstr "базовий коміт"
msgid "add prerequisite tree info to the patch series"
-msgstr ""
+msgstr "додати інформацію про дерево передумов до серії латок"
msgid "add a signature from a file"
-msgstr ""
+msgstr "додати підпис з файлу"
msgid "don't print the patch filenames"
-msgstr ""
+msgstr "не виводити назви файлів латок"
msgid "show progress while generating patches"
-msgstr ""
+msgstr "показувати прогрес під час генерації патчів"
msgid "show changes against <rev> in cover letter or single patch"
msgstr ""
+"показувати зміни проти <ревізія> у супровідному листі або окремій латці"
msgid "show changes against <refspec> in cover letter or single patch"
msgstr ""
+"показувати зміни проти <визначник-посилання> у супровідному листі або "
+"окремій латці"
msgid "percentage by which creation is weighted"
-msgstr ""
+msgstr "відсоток, за яким зважується створення"
msgid "show in-body From: even if identical to the e-mail header"
-msgstr ""
+msgstr "показувати in-body From: навіть якщо він ідентичний заголовку листа"
#, c-format
msgid "invalid ident line: %s"
-msgstr "неприпустимий рядок ідентифікатора: %s"
+msgstr "неприпустимий рядок особистості: %s"
msgid "--name-only does not make sense"
-msgstr ""
+msgstr "--name-only не має сенсу"
msgid "--name-status does not make sense"
-msgstr ""
+msgstr "--name-status не має сенсу"
msgid "--check does not make sense"
-msgstr ""
+msgstr "--check не має сенсу"
msgid "--remerge-diff does not make sense"
-msgstr ""
+msgstr "--remerge-diff не має сенсу"
#, c-format
msgid "could not create directory '%s'"
msgstr "не вдалося створити директорію \"%s\""
msgid "--interdiff requires --cover-letter or single patch"
-msgstr ""
+msgstr "--interdiff вимагає --cover-letter або окремої латки"
msgid "Interdiff:"
-msgstr ""
+msgstr "Різниця з попередньою серією латок:"
#, c-format
msgid "Interdiff against v%d:"
-msgstr ""
+msgstr "Різниця з v%d:"
msgid "--range-diff requires --cover-letter or single patch"
-msgstr ""
+msgstr "--range-diff потребує --cover-letter або окремої латки"
msgid "Range-diff:"
-msgstr ""
+msgstr "Різниця діапазону з попередньою серією латок:"
#, c-format
msgid "Range-diff against v%d:"
-msgstr ""
+msgstr "Різниця діапазону з v%d:"
#, c-format
msgid "unable to read signature file '%s'"
@@ -7552,192 +7775,202 @@ msgid "failed to create output files"
msgstr "не вдалося створити вихідні файли"
msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]"
-msgstr ""
+msgstr "git cherry [-v] [<першоджерельне-сховище> [<голова> [<ліміт>]]]]"
#, c-format
msgid ""
"Could not find a tracked remote branch, please specify <upstream> manually.\n"
msgstr ""
+"Не вдалося знайти віддалено відстежувану гілку, будь ласка, вкажіть "
+"<першоджерельне-сховище> вручну.\n"
+
+#, c-format
+msgid "could not get object info about '%s'"
+msgstr "не вдалося отримати інформацію про обʼєкт \"%s\""
#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
-msgstr "невірний формат ls-файлів: елемент \"%s\" не починається з \"(\""
+msgstr "невірний ls-files формат: елемент \"%s\" не починається з \"(\""
#, c-format
msgid "bad ls-files format: element '%s' does not end in ')'"
-msgstr "невірний формат ls-файлів: елемент \"%s\" не закінчується на \")\""
+msgstr "невірний ls-files формат: елемент \"%s\" не закінчується на \")\""
#, c-format
msgid "bad ls-files format: %%%.*s"
-msgstr ""
+msgstr "невірний ls-files формат: %%%.*s"
msgid "git ls-files [<options>] [<file>...]"
msgstr "git ls-files [<опції>] [<файл>...]"
msgid "separate paths with the NUL character"
-msgstr ""
+msgstr "відокремити шляхи символом NUL"
msgid "identify the file status with tags"
-msgstr ""
+msgstr "визначити стан файлу за допомогою тегів"
msgid "use lowercase letters for 'assume unchanged' files"
-msgstr ""
+msgstr "використати малі літери для \"вважати незмінними\" файлів"
msgid "use lowercase letters for 'fsmonitor clean' files"
-msgstr ""
+msgstr "використати малі літери для \"fsmonitor clean\" файлів"
msgid "show cached files in the output (default)"
-msgstr ""
+msgstr "показати кешовані файли у виводі (за замовчуванням)"
msgid "show deleted files in the output"
-msgstr ""
+msgstr "показати видалені файли у виводі"
msgid "show modified files in the output"
-msgstr ""
+msgstr "показати змінені файли у виводі"
msgid "show other files in the output"
-msgstr ""
+msgstr "показати інші файли у виводі"
msgid "show ignored files in the output"
-msgstr ""
+msgstr "показати ігноровані файли у виводі"
msgid "show staged contents' object name in the output"
-msgstr ""
+msgstr "показати назву обʼєкта індексованого вмісту у виводі"
msgid "show files on the filesystem that need to be removed"
-msgstr ""
+msgstr "показати файли файлової системи, які потрібно видалити"
msgid "show 'other' directories' names only"
-msgstr ""
+msgstr "показати тільки назви \"інших\" директорій"
msgid "show line endings of files"
-msgstr ""
+msgstr "показати закінчення рядків файлів"
msgid "don't show empty directories"
-msgstr ""
+msgstr "не показувати порожні директорії"
msgid "show unmerged files in the output"
-msgstr ""
+msgstr "показати не злиті файли у виводі"
msgid "show resolve-undo information"
-msgstr ""
+msgstr "показати resolve-undo інформацію"
msgid "skip files matching pattern"
-msgstr ""
+msgstr "пропустити файли, які відповідають шаблону"
msgid "read exclude patterns from <file>"
-msgstr ""
+msgstr "читати шаблони виключення з <файлу>"
msgid "read additional per-directory exclude patterns in <file>"
-msgstr ""
+msgstr "читати додаткові шаблони виключення для кожної директорії з <файлу>"
msgid "add the standard git exclusions"
-msgstr ""
+msgstr "додати стандартні git виключення"
msgid "make the output relative to the project top directory"
-msgstr ""
+msgstr "зробити виведення відносно верхньої директорії проекту"
msgid "if any <file> is not in the index, treat this as an error"
-msgstr ""
+msgstr "якщо якогось <файлу> немає в індексі, вважати це помилкою"
msgid "tree-ish"
-msgstr ""
+msgstr "деревоподібне-джерело"
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr ""
+"вдавати, що шляхи, видалені після <деревоподібного-джерела>, все ще присутні"
msgid "show debugging data"
-msgstr ""
+msgstr "показати дані відлагодження"
msgid "suppress duplicate entries"
-msgstr ""
+msgstr "не показувати дублікати записів"
msgid "show sparse directories in the presence of a sparse index"
-msgstr ""
+msgstr "показувати розріджені директорії при наявності розрідженого індексу"
msgid ""
"--format cannot be used with -s, -o, -k, -t, --resolve-undo, --deduplicate, "
"--eol"
msgstr ""
+"--format не можна використовувати з -s, -o, -k, -t, --resolve-undo, --"
+"deduplicate, --eol"
msgid ""
"git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
" [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
" [--symref] [<repository> [<patterns>...]]"
msgstr ""
+"git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<виконавчий-файл>]\n"
+" [-q | --quiet] [--exit-code] [--get-url] [--sort=<ключ>]\n"
+" [--symref] [<сховище> [<шаблони>...]]"
msgid "do not print remote URL"
-msgstr ""
+msgstr "не виводити віддалену URL-адресу"
msgid "exec"
-msgstr ""
+msgstr "виконавчий файл"
msgid "path of git-upload-pack on the remote host"
msgstr "шлях до git-upload-pack на віддаленому сервері"
msgid "limit to tags"
-msgstr ""
+msgstr "обмежити до тегів"
msgid "limit to heads"
-msgstr ""
+msgstr "обмежити до голів"
msgid "do not show peeled tags"
-msgstr ""
+msgstr "не показувати очищені теги"
msgid "take url.<base>.insteadOf into account"
-msgstr ""
+msgstr "враховувати url.<база>.insteadOf"
msgid "exit with exit code 2 if no matching refs are found"
-msgstr ""
+msgstr "вийти з кодом виходу 2, якщо не знайдено відповідних посилань"
msgid "show underlying ref in addition to the object pointed by it"
-msgstr ""
+msgstr "показувати базове посилання на додаток до об’єкта, на який воно вказує"
msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
msgstr "git ls-tree [<опції>] <деревоподібне-джерело> [<шлях>...]"
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "не вдалося отримати інформацію про обʼєкт \"%s\""
-
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
-msgstr "невірний формат ls-дерева: елемент \"%s\" не починається з \"(\""
+msgstr "невірний формат ls-tree: елемент \"%s\" не починається з \"(\""
#, c-format
msgid "bad ls-tree format: element '%s' does not end in ')'"
-msgstr "невірний формат ls-дерева: елемент \"%s\" не закінчується на \")\""
+msgstr "невірний формат ls-tree: елемент \"%s\" не закінчується на \")\""
#, c-format
msgid "bad ls-tree format: %%%.*s"
-msgstr ""
+msgstr "невірний формат ls-tree: %%%.*s"
msgid "only show trees"
-msgstr ""
+msgstr "показувати тільки дерева"
msgid "recurse into subtrees"
-msgstr ""
+msgstr "рекурсивно в піддеревах"
msgid "show trees when recursing"
-msgstr ""
+msgstr "відображати дерева при рекурсії"
msgid "terminate entries with NUL byte"
-msgstr ""
+msgstr "завершувати записи байтом NUL"
msgid "include object size"
msgstr "включити розмір об’єкта"
msgid "list only filenames"
-msgstr ""
+msgstr "показувати лише назви файлів"
msgid "list only objects"
msgstr "показати лише обʼєкти"
msgid "use full path names"
-msgstr ""
+msgstr "використовувати повні назви шляхів"
msgid "list entire tree; not just current directory (implies --full-name)"
msgstr ""
+"показувати все дерево, а не лише поточну директорію (мається на увазі --full-"
+"name)."
msgid "--format can't be combined with other format-altering options"
msgstr "--format не можна комбінувати з іншими опціями зміни формату"
@@ -7745,109 +7978,111 @@ msgstr "--format не можна комбінувати з іншими опці
#. TRANSLATORS: keep <> in "<" mail ">" info.
msgid "git mailinfo [<options>] <msg> <patch> < mail >info"
-msgstr ""
+msgstr "git mailinfo [<опції>] <допис> <латка> < mail >info"
msgid "keep subject"
-msgstr ""
+msgstr "не змінювати тему"
msgid "keep non patch brackets in subject"
-msgstr ""
+msgstr "зберігати дужки, що не стосуються латок, в темі"
msgid "copy Message-ID to the end of commit message"
-msgstr ""
+msgstr "копіювати Message-ID в кінець допису до коміту"
msgid "re-code metadata to i18n.commitEncoding"
-msgstr ""
+msgstr "перекодувати метадані в i18n.commitEncoding"
msgid "disable charset re-coding of metadata"
-msgstr ""
+msgstr "вимкнути перекодування метаданих"
msgid "encoding"
-msgstr ""
+msgstr "кодування"
msgid "re-code metadata to this encoding"
-msgstr ""
+msgstr "перекодувати метадані в це кодування"
msgid "use scissors"
-msgstr ""
+msgstr "використовувати ножиці"
msgid "<action>"
-msgstr ""
+msgstr "<дія>"
msgid "action when quoted CR is found"
-msgstr ""
+msgstr "дія при знаходженні цитованого CR"
msgid "use headers in message's body"
-msgstr ""
+msgstr "використовувати заголовки в тілі повідомлення"
msgid "reading patches from stdin/tty..."
-msgstr ""
+msgstr "читання латок з stdin/tty..."
#, c-format
msgid "empty mbox: '%s'"
-msgstr ""
+msgstr "порожній mbox: \"%s\""
msgid "git merge-base [-a | --all] <commit> <commit>..."
-msgstr ""
+msgstr "git merge-base [-a | --all] <коміт> <коміт>..."
msgid "git merge-base [-a | --all] --octopus <commit>..."
-msgstr ""
+msgstr "git merge-base [-a | --all] --octopus <коміт>..."
msgid "git merge-base --is-ancestor <commit> <commit>"
-msgstr ""
+msgstr "git merge-base --is-ancestor <коміт> <коміт>"
msgid "git merge-base --independent <commit>..."
-msgstr ""
+msgstr "git merge-base --independent <коміт>..."
msgid "git merge-base --fork-point <ref> [<commit>]"
-msgstr ""
+msgstr "git merge-base --fork-point <посилання> [<коміт>]"
msgid "output all common ancestors"
-msgstr ""
+msgstr "вивести всіх спільних предків"
msgid "find ancestors for a single n-way merge"
-msgstr ""
+msgstr "знайти предків для одного n-стороннього злиття"
msgid "list revs not reachable from others"
-msgstr ""
+msgstr "показати ревізії, недоступні з інших джерел"
msgid "is the first one ancestor of the other?"
-msgstr ""
+msgstr "чи є перша з них предком другої?"
msgid "find where <commit> forked from reflog of <ref>"
-msgstr ""
+msgstr "знайти, де <коміт> відгалузився від журналу посилань <посилання>"
msgid ""
"git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> "
"<orig-file> <file2>"
msgstr ""
+"git merge-file [<опції>] [-L <назва1> [-L <оріг> [-L <назва2>]]] <файл1> "
+"<оріг-файл> <файл2>"
msgid "send results to standard output"
-msgstr ""
+msgstr "надсилати результати до стандартного виводу"
msgid "use a diff3 based merge"
-msgstr ""
+msgstr "використовувати злиття на основі diff3"
msgid "use a zealous diff3 based merge"
-msgstr ""
+msgstr "використовувати ретельне злиття на основі diff3"
msgid "for conflicts, use our version"
-msgstr ""
+msgstr "у разі конфліктів використовувати нашу версію"
msgid "for conflicts, use their version"
-msgstr ""
+msgstr "у разі конфліктів використовувати їхню версію"
msgid "for conflicts, use a union version"
-msgstr ""
+msgstr "у разі конфліктів використовувати об’єднану версію"
msgid "for conflicts, use this marker size"
-msgstr ""
+msgstr "у разі конфліктів використовувати цей розмір маркера"
msgid "do not warn about conflicts"
-msgstr ""
+msgstr "не попереджати про конфлікти"
msgid "set labels for file1/orig-file/file2"
-msgstr ""
+msgstr "встановити мітки для файл1/оріг-файл/файл2"
#, c-format
msgid "unknown option %s"
@@ -7860,12 +8095,12 @@ msgstr "не вдалося розібрати обʼєкт \"%s\""
#, c-format
msgid "cannot handle more than %d base. Ignoring %s."
msgid_plural "cannot handle more than %d bases. Ignoring %s."
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "неможливо обробити більш ніж %d базу. Ігнорування %s."
+msgstr[1] "неможливо обробити більш ніж %d бази. Ігнорування %s."
+msgstr[2] "неможливо обробити більш ніж %d баз. Ігнорування %s."
msgid "not handling anything other than two heads merge."
-msgstr ""
+msgstr "не оброблюється нічого, окрім злиття двох верхівок."
#, c-format
msgid "could not resolve ref '%s'"
@@ -7873,49 +8108,49 @@ msgstr "не вдалося розвʼязати посилання \"%s\""
#, c-format
msgid "Merging %s with %s\n"
-msgstr ""
+msgstr "Злиття %s з %s\n"
msgid "not something we can merge"
-msgstr ""
+msgstr "не те, що ми в змозі об’єднати"
msgid "refusing to merge unrelated histories"
-msgstr ""
+msgstr "відмовлено в об’єднанні непов’язаних історій"
msgid "failure to merge"
-msgstr ""
+msgstr "не вдалося злити"
msgid "git merge-tree [--write-tree] [<options>] <branch1> <branch2>"
-msgstr ""
+msgstr "git merge-tree [--write-tree] [<опції>] <гілка1> <гілка2>"
msgid "git merge-tree [--trivial-merge] <base-tree> <branch1> <branch2>"
-msgstr ""
+msgstr "git merge-tree [--trivial-merge] <базове-дерево> <гілка1> <гілка2>"
msgid "do a real merge instead of a trivial merge"
-msgstr ""
+msgstr "зробити справжнє злиття замість тривіального злиття"
msgid "do a trivial merge only"
-msgstr ""
+msgstr "зробити лише тривіальне злиття"
msgid "also show informational/conflict messages"
-msgstr ""
+msgstr "також показувати інформаційні/конфліктні повідомлення"
msgid "list filenames without modes/oids/stages"
-msgstr ""
+msgstr "вивести назви файлів без режимів/oid/стадій"
msgid "allow merging unrelated histories"
-msgstr ""
+msgstr "дозволити злиття непов’язаних історій"
msgid "perform multiple merges, one per line of input"
-msgstr ""
+msgstr "виконати кілька злиттів, по одному на кожен рядок вводу"
msgid "specify a merge-base for the merge"
msgstr "вказати базу для злиття"
msgid "--trivial-merge is incompatible with all other options"
-msgstr ""
+msgstr "--trivial-merge несумісна з усіма іншими опціями"
msgid "--merge-base is incompatible with --stdin"
-msgstr ""
+msgstr "--merge-base несумісна з --stdin"
#, c-format
msgid "malformed input line: '%s'."
@@ -7923,17 +8158,17 @@ msgstr "невірно сформований рядок вводу: \"%s\"."
#, c-format
msgid "merging cannot continue; got unclean result of %d"
-msgstr ""
+msgstr "неможливо продовжити злиття; отримано брудний результат для %d"
msgid "git merge [<options>] [<commit>...]"
msgstr "git merge [<опції>] [<коміт>...]"
msgid "switch `m' requires a value"
-msgstr ""
+msgstr "перемикач \"m\" потребує значення"
#, c-format
msgid "option `%s' requires a value"
-msgstr "опція \"%s\" вимагає значення"
+msgstr "опція \"%s\" потребує значення"
#, c-format
msgid "Could not find merge strategy '%s'.\n"
@@ -7941,98 +8176,99 @@ msgstr "Не вдалося знайти стратегію злиття \"%s\".
#, c-format
msgid "Available strategies are:"
-msgstr ""
+msgstr "Доступні стратегії:"
#, c-format
msgid "Available custom strategies are:"
-msgstr ""
+msgstr "Доступні спеціальні стратегії:"
msgid "do not show a diffstat at the end of the merge"
-msgstr ""
+msgstr "не показувати diffstat наприкінці злиття"
msgid "show a diffstat at the end of the merge"
-msgstr ""
+msgstr "показувати diffstat наприкінці злиття"
msgid "(synonym to --stat)"
-msgstr ""
+msgstr "(синонім до --stat)"
msgid "add (at most <n>) entries from shortlog to merge commit message"
msgstr ""
+"додати (не більше <н>) записів з короткого журналу у допис до коміту злиття"
msgid "create a single commit instead of doing a merge"
-msgstr ""
+msgstr "створити єдиний коміт замість злиття"
msgid "perform a commit if the merge succeeds (default)"
-msgstr ""
+msgstr "виконати коміт, якщо злиття пройшло успішно (за замовчуванням)"
msgid "edit message before committing"
-msgstr "редагувати повідомлення перед комітом"
+msgstr "редагувати допис перед комітом"
msgid "allow fast-forward (default)"
-msgstr ""
+msgstr "дозволити перемотування вперед (за замовчуванням)"
msgid "abort if fast-forward is not possible"
-msgstr ""
+msgstr "перервати, якщо перемотування вперед неможливе"
msgid "verify that the named commit has a valid GPG signature"
-msgstr ""
+msgstr "перевіряти, чи має коміт дійсний GPG-підпис"
msgid "strategy"
-msgstr ""
+msgstr "стратегія"
msgid "merge strategy to use"
-msgstr ""
+msgstr "яку стратегію злиття використовувати"
msgid "option=value"
-msgstr ""
+msgstr "опція=значення"
msgid "option for selected merge strategy"
-msgstr ""
+msgstr "опція для обраної стратегії злиття"
msgid "merge commit message (for a non-fast-forward merge)"
-msgstr ""
+msgstr "допис до коміту злиття (для злиття без перемотування вперед)"
msgid "use <name> instead of the real target"
-msgstr "використовувати <назва> замість реальної цілі"
+msgstr "використовувати <назву> замість реальної цілі"
msgid "abort the current in-progress merge"
msgstr "перервати поточне злиття"
msgid "--abort but leave index and working tree alone"
-msgstr "--abort, але зберегти стан індекса і робочого дерева"
+msgstr "--abort, але зберегти стан індексу і робочого дерева"
msgid "continue the current in-progress merge"
msgstr "продовжити поточний процес злиття"
msgid "bypass pre-merge-commit and commit-msg hooks"
-msgstr ""
+msgstr "обходити pre-merge-commit та commit-msg гачки"
msgid "could not run stash."
msgstr "не вдалося виконати stash."
msgid "stash failed"
-msgstr ""
+msgstr "не вдалося додати до схову"
#, c-format
msgid "not a valid object: %s"
msgstr "не є припустимим обʼєктом: %s"
msgid "read-tree failed"
-msgstr ""
+msgstr "read-tree завершився невдало"
msgid "Already up to date. (nothing to squash)"
-msgstr ""
+msgstr "Вже в актуальному стані. (нічого зчавлювати)"
msgid "Already up to date."
-msgstr ""
+msgstr "Вже в актуальному стані."
#, c-format
msgid "Squash commit -- not updating HEAD\n"
-msgstr ""
+msgstr "Коміт зчавлювання -- HEAD не оновлюється\n"
#, c-format
msgid "No merge message -- not updating HEAD\n"
-msgstr ""
+msgstr "Немає допису до злиття -- HEAD не оновлюється\n"
#, c-format
msgid "'%s' does not point to a commit"
@@ -8040,17 +8276,17 @@ msgstr "\"%s\" не вказує на коміт"
#, c-format
msgid "Bad branch.%s.mergeoptions string: %s"
-msgstr ""
+msgstr "Невірна branch.%s.mergeoptions строка: %s"
msgid "Unable to write index."
msgstr "Не вдалося записати індекс."
msgid "Not handling anything other than two heads merge."
-msgstr ""
+msgstr "Не оброблюється нічого, окрім злиття двох верхівок."
#, c-format
msgid "unknown strategy option: -X%s"
-msgstr ""
+msgstr "невідомий варіант стратегії: -X%s"
#, c-format
msgid "unable to write %s"
@@ -8063,33 +8299,41 @@ msgstr "Не вдалося прочитати з \"%s\""
#, c-format
msgid "Not committing merge; use 'git commit' to complete the merge.\n"
msgstr ""
-"Не виконується злиття; використовуйте \"git commit\" для завершення злиття.\n"
+"Не додано коміт злиття; скористайтесь \"git commit\", щоб завершити злиття.\n"
msgid ""
"Please enter a commit message to explain why this merge is necessary,\n"
"especially if it merges an updated upstream into a topic branch.\n"
"\n"
msgstr ""
+"Будь ласка, введіть допис до коміту, щоб пояснити, чому це злиття є "
+"необхідним,\n"
+"особливо якщо воно об’єднує першоджерельні оновлення з тематичною гілкою.\n"
msgid "An empty message aborts the commit.\n"
-msgstr ""
+msgstr "Порожній допис перерве процес коміту.\n"
#, c-format
msgid ""
"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
+"Рядки, що починаються з \"%c\", будуть проігноровані, а порожній допис "
+"перерве\n"
+"процес коміту.\n"
msgid "Empty commit message."
-msgstr ""
+msgstr "Порожній допис до коміту."
#, c-format
msgid "Wonderful.\n"
-msgstr ""
+msgstr "Чудово.\n"
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
+"Автоматичне злиття не вдалося; виправте конфлікти і потім зробіть коміт "
+"результату.\n"
msgid "No current branch."
msgstr "Немає поточної гілки."
@@ -8099,14 +8343,15 @@ msgstr "Немає віддаленого призначення для пото
msgid "No default upstream defined for the current branch."
msgstr ""
+"Для поточної гілки не визначено першоджерельне сховище за замовчуванням."
#, c-format
msgid "No remote-tracking branch for %s from %s"
-msgstr ""
+msgstr "Немає віддалено відстежуваної гілки для %s з %s"
#, c-format
msgid "Bad value '%s' in environment '%s'"
-msgstr ""
+msgstr "Невірне значення \"%s\" в оточенні \"%s\""
#, c-format
msgid "could not close '%s'"
@@ -8114,109 +8359,117 @@ msgstr "не вдалося закрити \"%s\""
#, c-format
msgid "not something we can merge in %s: %s"
-msgstr ""
+msgstr "не те, що можна злити в %s: %s"
msgid "--abort expects no arguments"
-msgstr ""
+msgstr "--abort не очікує жодних аргументів"
msgid "There is no merge to abort (MERGE_HEAD missing)."
-msgstr ""
+msgstr "Неможливо перервати злиття (відсутній MERGE_HEAD)."
msgid "--quit expects no arguments"
-msgstr ""
+msgstr "--quit не очікує жодних аргументів"
msgid "--continue expects no arguments"
-msgstr ""
+msgstr "--continue не очікує жодних аргументів"
msgid "There is no merge in progress (MERGE_HEAD missing)."
-msgstr ""
+msgstr "Злиття не виконується (відсутній MERGE_HEAD)."
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you merge."
msgstr ""
+"Ви не завершили злиття (існує MERGE_HEAD).\n"
+"Будь ласка, зробіть коміт для ваших змін перед злиттям."
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you merge."
msgstr ""
+"Ви не завершили висмикування (існує CHERRY_PICK_HEAD).\n"
+"Будь ласка, зробіть коміт для ваших змін перед злиттям."
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
-msgstr ""
+msgstr "Ви не завершили висмикування (існує CHERRY_PICK_HEAD)."
msgid "No commit specified and merge.defaultToUpstream not set."
-msgstr ""
+msgstr "Не вказано коміт і не встановлено merge.defaultToUpstream."
msgid "Squash commit into empty head not supported yet"
-msgstr ""
+msgstr "Поки що немає підтримки комітів зчавлювання в порожню верхівку"
msgid "Non-fast-forward commit does not make sense into an empty head"
-msgstr "Не fast-forward коміт не має сенсу з порожнім HEAD"
+msgstr "Коміт без перемотування вперед у порожню верхівку не має сенсу"
#, c-format
msgid "%s - not something we can merge"
-msgstr ""
+msgstr "%s - не те, що можна злити"
msgid "Can merge only exactly one commit into empty head"
-msgstr ""
+msgstr "Можна злити лишень один коміт у порожню верхівку"
#, c-format
msgid "Updating %s..%s\n"
-msgstr ""
+msgstr "Оновлення %s..%s\n"
#, c-format
msgid ""
"Your local changes to the following files would be overwritten by merge:\n"
" %s"
msgstr ""
+"Ваші локальні зміни у наступних файлах буде замінено злиттям:\n"
+" %s"
#, c-format
msgid "Trying really trivial in-index merge...\n"
-msgstr ""
+msgstr "Спроба справді тривіального внутрішньо-індексного злиття...\n"
#, c-format
msgid "Nope.\n"
-msgstr ""
+msgstr "Ні.\n"
#, c-format
msgid "Rewinding the tree to pristine...\n"
-msgstr ""
+msgstr "Приведення дерева до початкового стану...\n"
#, c-format
msgid "Trying merge strategy %s...\n"
-msgstr ""
+msgstr "Спроба стратегії злиття %s...\n"
#, c-format
msgid "No merge strategy handled the merge.\n"
-msgstr ""
+msgstr "Жодна стратегія злиття не впоралася зі злиттям.\n"
#, c-format
msgid "Merge with strategy %s failed.\n"
-msgstr ""
+msgstr "Злиття зі стратегією %s не вдалося.\n"
#, c-format
msgid "Using the %s strategy to prepare resolving by hand.\n"
-msgstr ""
+msgstr "Використання стратегії %s для підготовки вирішення вручну.\n"
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
+"Автоматичне злиття пройшло добре; зупинка перед комітом, як було вказано\n"
#, c-format
msgid "When finished, apply stashed changes with `git stash pop`\n"
msgstr ""
+"Закінчивши, застосуйте збережені зміни за допомогою \"git stash pop\"\n"
#, c-format
msgid "warning: tag input does not pass fsck: %s"
-msgstr ""
+msgstr "попередження: вхідний тег не пройшов fsck: %s"
#, c-format
msgid "error: tag input does not pass fsck: %s"
-msgstr ""
+msgstr "помилка: вхідний тег не пройшов fsck: %s"
#, c-format
msgid "%d (FSCK_IGNORE?) should never trigger this callback"
-msgstr ""
+msgstr "%d (FSCK_IGNORE?) ніколи не мав спричинити цей зворотній виклик"
#, c-format
msgid "could not read tagged object '%s'"
@@ -8224,33 +8477,35 @@ msgstr "не вдалося прочитати тегований об’єкт
#, c-format
msgid "object '%s' tagged as '%s', but is a '%s' type"
-msgstr ""
+msgstr "об’єкт \"%s\", позначений як \"%s\", але має тип \"%s\""
msgid "could not read from stdin"
msgstr "не вдалося прочитати з stdin"
msgid "tag on stdin did not pass our strict fsck check"
-msgstr ""
+msgstr "тег з stdin не пройшов нашу сувору перевірку fsck"
msgid "tag on stdin did not refer to a valid object"
-msgstr ""
+msgstr "тег з stdin не посилався на дійсний об’єкт"
msgid "unable to write tag file"
msgstr "не вдалося записати файл тегів"
msgid "input is NUL terminated"
-msgstr ""
+msgstr "ввід завершено символом NUL"
msgid "allow missing objects"
-msgstr "дозволити відсутні об’єкти"
+msgstr "дозволяти відсутні об’єкти"
msgid "allow creation of more than one tree"
-msgstr ""
+msgstr "дозволяти створення більш ніж одного дерева"
msgid ""
"git multi-pack-index [<options>] write [--preferred-pack=<pack>][--refs-"
"snapshot=<path>]"
msgstr ""
+"git multi-pack-index [<опції>] write [--preferred-pack=<пакунок>] [--refs-"
+"snapshot=<шлях>]"
msgid "git multi-pack-index [<options>] verify"
msgstr "git multi-pack-index [<опції>] verify"
@@ -8259,53 +8514,58 @@ msgid "git multi-pack-index [<options>] expire"
msgstr "git multi-pack-index [<опції>] expire"
msgid "git multi-pack-index [<options>] repack [--batch-size=<size>]"
-msgstr ""
+msgstr "git multi-pack-index [<опції>] repack [--batch-size=<розмір>]"
msgid "directory"
msgstr "директорія"
msgid "object directory containing set of packfile and pack-index pairs"
-msgstr ""
+msgstr "директорія об’єктів, що містить набір packfile та pack-index пар"
msgid "preferred-pack"
-msgstr ""
+msgstr "preferred-pack"
msgid "pack for reuse when computing a multi-pack bitmap"
msgstr ""
+"пакунок для повторного використання під час обчислення multi-pack bitmap"
msgid "write multi-pack bitmap"
-msgstr ""
+msgstr "записати multi-pack bitmap"
msgid "write multi-pack index containing only given indexes"
-msgstr ""
+msgstr "записати multi-pack індекс, що містить лише задані індекси"
msgid "refs snapshot for selecting bitmap commits"
-msgstr ""
+msgstr "знімок посилань для вибору bitmap комітів"
msgid ""
"during repack, collect pack-files of smaller size into a batch that is "
"larger than this size"
msgstr ""
+"під час перепакування збирати пакувальні файли меншого розміру в партію, "
+"більшу за цей розмір"
msgid "git mv [<options>] <source>... <destination>"
msgstr "git mv [<опції>] <джерело>... <призначення>"
#, c-format
msgid "Directory %s is in index and no submodule?"
-msgstr ""
+msgstr "Директорія %s в індексі, але без підмодуля?"
msgid "Please stage your changes to .gitmodules or stash them to proceed"
msgstr ""
+"Будь ласка, додайте змінений .gitmodules до індексу або до схову, щоб "
+"продовжити"
#, c-format
msgid "%.*s is in index"
-msgstr ""
+msgstr "%.*s в індексі"
msgid "force move/rename even if target exists"
-msgstr ""
+msgstr "примусово переміщувати/перейменовувати, навіть якщо ціль існує"
msgid "skip move/rename errors"
-msgstr ""
+msgstr "пропускати помилки переміщення/перейменування"
#, c-format
msgid "destination '%s' is not a directory"
@@ -8313,38 +8573,38 @@ msgstr "місце призначення \"%s\" не є директорією"
#, c-format
msgid "Checking rename of '%s' to '%s'\n"
-msgstr ""
+msgstr "Перевірка перейменування \"%s\" на \"%s\"\n"
msgid "bad source"
msgstr "невірне джерело"
msgid "destination exists"
-msgstr ""
+msgstr "призначення існує"
msgid "can not move directory into itself"
-msgstr ""
+msgstr "неможливо перемістити директорію в саму себе"
msgid "cannot move directory over file"
-msgstr ""
+msgstr "неможливо перемістити директорію поверх файлу"
msgid "source directory is empty"
-msgstr ""
+msgstr "директорія джерела порожня"
msgid "not under version control"
-msgstr ""
+msgstr "не під контролем версій"
msgid "conflicted"
-msgstr ""
+msgstr "конфлікт"
#, c-format
msgid "overwriting '%s'"
-msgstr ""
+msgstr "перезапис \"%s\""
msgid "Cannot overwrite"
-msgstr ""
+msgstr "Неможливо перезаписати"
msgid "multiple sources for the same target"
-msgstr ""
+msgstr "кілька джерел для однієї цілі"
msgid "destination directory does not exist"
msgstr "директорія призначення не існує"
@@ -8354,7 +8614,7 @@ msgstr "призначення існує в індексі"
#, c-format
msgid "%s, source=%s, destination=%s"
-msgstr ""
+msgstr "%s, джерело=%s, призначення=%s"
#, c-format
msgid "Renaming %s to %s\n"
@@ -8362,7 +8622,7 @@ msgstr "Перейменування %s на %s\n"
#, c-format
msgid "renaming '%s' failed"
-msgstr ""
+msgstr "перейменування \"%s\" завершилося невдало"
msgid "git name-rev [<options>] <commit>..."
msgstr "git name-rev [<опції>] <коміт>..."
@@ -8371,108 +8631,119 @@ msgid "git name-rev [<options>] --all"
msgstr "git name-rev [<опції>] --all"
msgid "git name-rev [<options>] --annotate-stdin"
-msgstr ""
+msgstr "git name-rev [<опції>] --annotate-stdin"
msgid "print only ref-based names (no object names)"
-msgstr ""
+msgstr "виводити тільки назви на основі посилань (без назв об’єктів)"
msgid "only use tags to name the commits"
-msgstr ""
+msgstr "використовувати теги лише для назв комітів"
msgid "only use refs matching <pattern>"
-msgstr ""
+msgstr "використовувати лише посилання, що збігаються з <шаблоном>"
msgid "ignore refs matching <pattern>"
-msgstr ""
+msgstr "ігнорувати посилання, що збігаються з <шаблоном>"
msgid "list all commits reachable from all refs"
-msgstr ""
+msgstr "вивести всі коміти, доступні з усіх посилань"
msgid "deprecated: use --annotate-stdin instead"
-msgstr ""
+msgstr "застаріле: замість цього використовуйте --annotate-stdin"
msgid "annotate text from stdin"
-msgstr ""
+msgstr "анотувати текст зі stdin"
msgid "allow to print `undefined` names (default)"
-msgstr ""
+msgstr "дозволити виводити \"невизначені\" назви (за замовчуванням)"
msgid "dereference tags in the input (internal use)"
-msgstr ""
+msgstr "розіменувати теги на вході (внутрішнє використання)"
msgid "git notes [--ref <notes-ref>] [list [<object>]]"
-msgstr ""
+msgstr "git notes [--ref <посилання-нотатки>] [list [<об’єкт>]]"
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
+"git notes [--ref <посилання-нотатки>] add [-f] [--allow-empty] [--"
+"[no-]separator|--separator=<розділювач-абзаців>] [--[no-]stripspace] [-m "
+"<допис> | -F <файл> | (-c | -C) <обʼєкт>] [<обʼєкт>]"
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
msgstr ""
+"git notes [--ref <посилання-нотатки>] copy [-f] <з-об’єкта> <до-об’єкта>"
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
+"git notes [--ref <посилання-нотатки>] append [--allow-empty] [--"
+"[no-]separator|--separator=<розділювач-абзаців>] [--[no-]stripspace] [-m "
+"<допис> | -F <файл> | (-c | -C) <обʼєкт>] [<обʼєкт>]"
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
-msgstr ""
+msgstr "git notes [--ref <посилання-нотатки>] edit [--allow-empty] [<об’єкт>]"
msgid "git notes [--ref <notes-ref>] show [<object>]"
-msgstr ""
+msgstr "git notes [--ref <посилання-нотатки>] show [<об’єкт>]"
msgid ""
"git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"
msgstr ""
+"git notes [--ref <посилання-нотатки>] merge [-v | -q] [-s <стратегія>] "
+"<посилання-нотатки>"
msgid "git notes [--ref <notes-ref>] remove [<object>...]"
-msgstr ""
+msgstr "git notes [--ref <посилання-нотатки>] remove [<об’єкт>...]"
msgid "git notes [--ref <notes-ref>] prune [-n] [-v]"
-msgstr ""
+msgstr "git notes [--ref <посилання-нотатки>] prune [-n] [-v]."
msgid "git notes [--ref <notes-ref>] get-ref"
-msgstr ""
+msgstr "git notes [--ref <посилання-нотатки>] get-ref"
msgid "git notes [list [<object>]]"
-msgstr ""
+msgstr "git notes [list [<об’єкт>]]"
msgid "git notes add [<options>] [<object>]"
msgstr "git notes add [<опції>] [<обʼєкт>]"
msgid "git notes copy [<options>] <from-object> <to-object>"
-msgstr ""
+msgstr "git notes copy [<опції>] <з-об’єкта> <до-об’єкта"
msgid "git notes copy --stdin [<from-object> <to-object>]..."
-msgstr ""
+msgstr "git notes copy --stdin [<з-об’єкта> <до-об’єкта>]..."
msgid "git notes append [<options>] [<object>]"
msgstr "git notes append [<опції>] [<обʼєкт>]"
msgid "git notes edit [<object>]"
-msgstr ""
+msgstr "git notes edit [<об’єкт>]"
msgid "git notes show [<object>]"
-msgstr ""
+msgstr "git notes show [<об’єкт>]"
msgid "git notes merge [<options>] <notes-ref>"
msgstr "git notes merge [<опції>] <посилання-нотатки>"
msgid "git notes merge --commit [<options>]"
-msgstr ""
+msgstr "git notes merge --commit [<опції>]"
msgid "git notes merge --abort [<options>]"
-msgstr ""
+msgstr "git notes merge --abort [<опції>]"
msgid "git notes remove [<object>]"
-msgstr ""
+msgstr "git notes remove [<об’єкт>]"
msgid "git notes prune [<options>]"
msgstr "git notes prune [<опції>]"
msgid "Write/edit the notes for the following object:"
-msgstr ""
+msgstr "Записати/відредагувати нотатки для наступного обʼєкта:"
#, c-format
msgid "unable to start 'show' for object '%s'"
@@ -8486,14 +8757,14 @@ msgid "failed to finish 'show' for object '%s'"
msgstr "не вдалося завершити \"show\" для об’єкта \"%s\""
msgid "please supply the note contents using either -m or -F option"
-msgstr ""
+msgstr "будь ласка, надайте зміст нотатки, використовуючи опцію -m або -F"
msgid "unable to write note object"
msgstr "не вдалося записати об’єкт нотатки"
#, c-format
msgid "the note contents have been left in %s"
-msgstr ""
+msgstr "вміст нотатки залишено в %s"
#, c-format
msgid "could not open or read '%s'"
@@ -8521,49 +8792,61 @@ msgstr "не вдалося скопіювати нотатки з \"%s\" в \"%
#, c-format
msgid "refusing to %s notes in %s (outside of refs/notes/)"
-msgstr ""
+msgstr "відмовлено в %s нотаток у %s (за межами refs/notes/)"
#, c-format
msgid "no note found for object %s."
msgstr "для обʼєкта %s не знайдено жодної нотатки."
msgid "note contents as a string"
-msgstr ""
+msgstr "вміст нотатки як строка"
msgid "note contents in a file"
-msgstr ""
+msgstr "вміст нотатки у файлі"
msgid "reuse and edit specified note object"
-msgstr ""
+msgstr "повторно використати та редагувати вказаний обʼєкт нотатки"
msgid "reuse specified note object"
-msgstr ""
+msgstr "повторно використати вказаний обʼєкт нотатки"
msgid "allow storing empty note"
-msgstr ""
+msgstr "дозволити збереження порожньої нотатки"
msgid "replace existing notes"
msgstr "замінити існуючі нотатки"
+msgid "<paragraph-break>"
+msgstr "<розділювач-абзаців>"
+
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "вставити <розділювач-абзаців> між абзацами"
+
+msgid "remove unnecessary whitespace"
+msgstr "видалити зайві пробіли"
+
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr ""
+"Неможливо додати нотатки. Знайдено існуючі нотатки для обʼєкта %s. "
+"Скористайтесь \"-f\" для перезапису існуючих нотаток"
#, c-format
msgid "Overwriting existing notes for object %s\n"
-msgstr ""
+msgstr "Перезапис існуючих нотаток для обʼєкта %s\n"
#, c-format
msgid "Removing note for object %s\n"
msgstr "Видалення нотатки для обʼєкта %s\n"
msgid "read objects from stdin"
-msgstr ""
+msgstr "зчитати обʼєкти з stdin"
msgid "load rewriting config for <command> (implies --stdin)"
msgstr ""
+"завантажити перезапис конфігурації для <команда> (мається на увазі --stdin)"
msgid "too few arguments"
msgstr "замало аргументів"
@@ -8573,81 +8856,87 @@ msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr ""
+"Неможливо скопіювати нотатки. Знайдено існуючі нотатки для обʼєкта %s. "
+"Скористайтесь \"-f\", щоб перезаписати існуючі нотатки"
#, c-format
msgid "missing notes on source object %s. Cannot copy."
-msgstr ""
+msgstr "нотатки джерельного обʼєкта %s відсутні. Неможливо скопіювати."
#, c-format
msgid ""
"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
"Please use 'git notes add -f -m/-F/-c/-C' instead.\n"
msgstr ""
+"Опції -m/-F/-c/-C застаріли для підкоманди \"edit\".\n"
+"Будь ласка, скористайтесь \"git notes add -f -m/-F/-c/-C\" замість цього.\n"
msgid "failed to delete ref NOTES_MERGE_PARTIAL"
-msgstr ""
+msgstr "не вдалося видалити посилання NOTES_MERGE_PARTIAL"
msgid "failed to delete ref NOTES_MERGE_REF"
-msgstr ""
+msgstr "не вдалося видалити посилання NOTES_MERGE_REF"
msgid "failed to remove 'git notes merge' worktree"
-msgstr ""
+msgstr "не вдалося видалити \"git notes merge\" робоче дерево"
msgid "failed to read ref NOTES_MERGE_PARTIAL"
-msgstr ""
+msgstr "не вдалося прочитати посилання NOTES_MERGE_PARTIAL"
msgid "could not find commit from NOTES_MERGE_PARTIAL."
-msgstr ""
+msgstr "не вдалося знайти коміт з NOTES_MERGE_PARTIAL."
msgid "could not parse commit from NOTES_MERGE_PARTIAL."
-msgstr ""
+msgstr "не вдалося розібрати коміт з NOTES_MERGE_PARTIAL."
msgid "failed to resolve NOTES_MERGE_REF"
-msgstr ""
+msgstr "не вдалося розвʼязати NOTES_MERGE_REF"
msgid "failed to finalize notes merge"
msgstr "не вдалося завершити злиття нотаток"
#, c-format
msgid "unknown notes merge strategy %s"
-msgstr ""
+msgstr "невідома стратегія злиття нотаток %s"
msgid "General options"
-msgstr ""
+msgstr "Основні опції"
msgid "Merge options"
-msgstr ""
+msgstr "Опції злиття"
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
msgstr ""
+"вирішити конфлікти нотаток, використовуючи задану стратегію (manual/our/"
+"their/union/cat_sort_uniq)"
msgid "Committing unmerged notes"
-msgstr "Виконнання коміту незлитих нотаток"
+msgstr "Виконнання коміту не злитих нотаток"
msgid "finalize notes merge by committing unmerged notes"
-msgstr ""
+msgstr "завершити злиття комітом не злитих нотаток"
msgid "Aborting notes merge resolution"
-msgstr ""
+msgstr "Переривання злиття нотаток"
msgid "abort notes merge"
msgstr "перервати злиття нотаток"
msgid "cannot mix --commit, --abort or -s/--strategy"
-msgstr ""
+msgstr "не можна змішувати --commit, --abort або -s/--strategy"
msgid "must specify a notes ref to merge"
msgstr "необхідно вказати посилання нотаток для злиття"
#, c-format
msgid "unknown -s/--strategy: %s"
-msgstr ""
+msgstr "невідома -s/--strategy: %s"
#, c-format
msgid "a notes merge into %s is already in-progress at %s"
-msgstr ""
+msgstr "злиття нотаток у %s вже виконується в %s"
#, c-format
msgid "failed to store link to current notes ref (%s)"
@@ -8659,6 +8948,9 @@ msgid ""
"'git notes merge --commit', or abort the merge with 'git notes merge --"
"abort'.\n"
msgstr ""
+"Автоматичне злиття нотаток не вдалося. Виправте конфлікти у %s і зробіть "
+"коміт змін командою \"git notes merge --commit\" або перервіть злиття "
+"командою \"git notes merge --abort\".\n"
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
@@ -8666,46 +8958,52 @@ msgstr "Не вдалося розвʼязати \"%s\" як припустим
#, c-format
msgid "Object %s has no note\n"
-msgstr ""
+msgstr "Обʼєкт %s не має нотатки\n"
msgid "attempt to remove non-existent note is not an error"
-msgstr ""
+msgstr "спроба видалити неіснуючу нотатку не є помилкою"
msgid "read object names from the standard input"
-msgstr ""
+msgstr "зчитати імена обʼєктів зі стандартного вводу"
msgid "do not remove, show only"
-msgstr ""
+msgstr "не видаляти, тільки показувати"
msgid "report pruned notes"
-msgstr ""
+msgstr "звітувати про видалені нотатки"
msgid "notes-ref"
-msgstr ""
+msgstr "посилання-нотатки"
msgid "use notes from <notes-ref>"
-msgstr ""
+msgstr "використовувати нотатки з <посилання-нотатки>"
#, c-format
msgid "unknown subcommand: `%s'"
-msgstr ""
+msgstr "невідома підкоманда: \"%s\""
msgid "git pack-objects --stdout [<options>] [< <ref-list> | < <object-list>]"
msgstr ""
+"git pack-objects --stdout [<опції>] [< <список-посилань> | < <список-"
+"обʼєктів>]"
msgid ""
"git pack-objects [<options>] <base-name> [< <ref-list> | < <object-list>]"
msgstr ""
+"git pack-objects [<опції>] <базова-назва> [< <список-посилань> | < <список-"
+"обʼєктів>]"
#, c-format
msgid ""
"write_reuse_object: could not locate %s, expected at offset %<PRIuMAX> in "
"pack %s"
msgstr ""
+"write_reuse_object: не вдалося знайти %s, очікуваний зі зміщенням %<PRIuMAX> "
+"у пакунку %s"
#, c-format
msgid "bad packed object CRC for %s"
-msgstr ""
+msgstr "невірна CRC запакованого обʼєкта %s"
#, c-format
msgid "corrupt packed object for %s"
@@ -8717,7 +9015,7 @@ msgstr "виявлено рекурсивну дельту для обʼєкта
#, c-format
msgid "ordered %u objects, expected %<PRIu32>"
-msgstr ""
+msgstr "замовлено %u обʼєктів, очікувалось %<PRIu32>"
#, c-format
msgid "expected object at offset %<PRIuMAX> in pack %s"
@@ -8725,6 +9023,8 @@ msgstr "очікувався обʼєкт на зміщенні %<PRIuMAX> па
msgid "disabling bitmap writing, packs are split due to pack.packSizeLimit"
msgstr ""
+"вимкнення bitmap запису, пакунки розбиваються на частини через pack."
+"packSizeLimit"
msgid "Writing objects"
msgstr "Запис обʼєктів"
@@ -8742,10 +9042,10 @@ msgstr "не вдалося записати bitmap індекс"
#, c-format
msgid "wrote %<PRIu32> objects while expecting %<PRIu32>"
-msgstr ""
+msgstr "записано %<PRIu32> обʼєкти при очікуванні %<PRIu32>"
msgid "disabling bitmap writing, as some objects are not being packed"
-msgstr ""
+msgstr "вимкнення bitmap запису, оскільки деякі обʼєкти не упаковуються"
#, c-format
msgid "delta base offset overflow in pack for %s"
@@ -8772,14 +9072,14 @@ msgstr "обʼєкт %s не може бути прочитаний"
#, c-format
msgid "object %s inconsistent object length (%<PRIuMAX> vs %<PRIuMAX>)"
-msgstr ""
+msgstr "обʼєкт %s має невідповідну довжину (%<PRIuMAX> проти %<PRIuMAX>)"
msgid "suboptimal pack - out of memory"
-msgstr ""
+msgstr "неоптимальний пакунок - не вистачає памʼяті"
#, c-format
msgid "Delta compression using up to %d threads"
-msgstr ""
+msgstr "Дельта компресія з використанням до %d потоків"
#, c-format
msgid "unable to pack objects reachable from tag %s"
@@ -8793,18 +9093,22 @@ msgid "Compressing objects"
msgstr "Компресія обʼєктів"
msgid "inconsistency with delta count"
-msgstr ""
+msgstr "неспівпадіння з підрахунком дельти"
#, c-format
msgid ""
"value of uploadpack.blobpackfileuri must be of the form '<object-hash> <pack-"
"hash> <uri>' (got '%s')"
msgstr ""
+"значення uploadpack.blobpackfileuri повинно мати вигляд \"<хеш-обʼєкта> <хеш-"
+"пакунка> <uri>\" (отримано \"%s\")"
#, c-format
msgid ""
"object already configured in another uploadpack.blobpackfileuri (got '%s')"
msgstr ""
+"обʼєкт вже сконфігуровано в іншому uploadpack.blobpackfileuri (отримано "
+"\"%s\")"
#, c-format
msgid "could not get type of object %s in pack %s"
@@ -8816,7 +9120,7 @@ msgstr "не вдалося знайти пакунок \"%s\""
#, c-format
msgid "packfile %s cannot be accessed"
-msgstr ""
+msgstr "неможливо отримати доступ до файлу пакунку %s"
msgid "Enumerating cruft objects"
msgstr "Перерахування марних обʼєктів"
@@ -8832,29 +9136,33 @@ msgid ""
"expected edge object ID, got garbage:\n"
" %s"
msgstr ""
+"очікувався ідентифікатор реберного обʼєкту, отримано непотріб:\n"
+" %s"
#, c-format
msgid ""
"expected object ID, got garbage:\n"
" %s"
msgstr ""
+"очікувався ідентифікатор обʼєкта, отримано непотріб:\n"
+" %s"
msgid "could not load cruft pack .mtimes"
-msgstr ""
+msgstr "не вдалося завантажити марний пакунок .mtimes"
msgid "cannot open pack index"
msgstr "не вдалося відкрити індекс пакунка"
#, c-format
msgid "loose object at %s could not be examined"
-msgstr ""
+msgstr "не вдалося розглянути вільний обʼєкт у %s"
msgid "unable to force loose object"
msgstr "не вдалося примусово вивільнити обʼєкт"
#, c-format
msgid "not a rev '%s'"
-msgstr ""
+msgstr "не є ревізією \"%s\""
#, c-format
msgid "bad revision '%s'"
@@ -8865,41 +9173,41 @@ msgstr "не вдалося додати нещодавні обʼєкти"
#, c-format
msgid "unsupported index version %s"
-msgstr ""
+msgstr "непідтримувана версія індексу %s"
#, c-format
msgid "bad index version '%s'"
msgstr "невірна версія індексу \"%s\""
msgid "show progress meter during object writing phase"
-msgstr ""
+msgstr "показувати хід виконання під час фази запису обʼєкта"
msgid "similar to --all-progress when progress meter is shown"
-msgstr ""
+msgstr "подібно до --all-progress, коли показано хід виконання"
msgid "<version>[,<offset>]"
-msgstr ""
+msgstr "<версія>[, <зміщення>]"
msgid "write the pack index file in the specified idx format version"
-msgstr ""
+msgstr "записати індексний файл пакунка у вказаній версії idx формату"
msgid "maximum size of each output pack file"
-msgstr ""
+msgstr "максимальний розмір кожного файлу вихідного пакунку"
msgid "ignore borrowed objects from alternate object store"
-msgstr ""
+msgstr "ігнорувати запозичені обʼєкти з місця збереження запозичених об’єктів"
msgid "ignore packed objects"
msgstr "ігнорувати запаковані обʼєкти"
msgid "limit pack window by objects"
-msgstr ""
+msgstr "обмежити вікно пакування за обʼєктами"
msgid "limit pack window by memory in addition to object limit"
-msgstr ""
+msgstr "обмежити вікно пакування за памʼяттю на додаток до ліміту обʼєкта"
msgid "maximum length of delta chain allowed in the resulting pack"
-msgstr ""
+msgstr "максимальна довжина дельта ланцюжка, дозволена в результуючому пакунку"
msgid "reuse existing deltas"
msgstr "повторно використати існуючі дельти"
@@ -8908,136 +9216,140 @@ msgid "reuse existing objects"
msgstr "повторно використати існуючі обʼєкти"
msgid "use OFS_DELTA objects"
-msgstr ""
+msgstr "використати OFS_DELTA обʼєкти"
msgid "use threads when searching for best delta matches"
-msgstr ""
+msgstr "використовувати потоки під час пошуку найкращих дельта збігів"
msgid "do not create an empty pack output"
msgstr "не створювати вивід порожнього пакунка"
msgid "read revision arguments from standard input"
-msgstr ""
+msgstr "зчитувати аргументи ревізії зі стандартного вводу"
msgid "limit the objects to those that are not yet packed"
-msgstr ""
+msgstr "обмежувати обʼєкти тільки тими, які ще не запаковані"
msgid "include objects reachable from any reference"
-msgstr ""
+msgstr "включати обʼєкти, досяжні з будь-якого посилання"
msgid "include objects referred by reflog entries"
-msgstr ""
+msgstr "включати обʼєкти, на які посилаються записи журналу посилань"
msgid "include objects referred to by the index"
-msgstr ""
+msgstr "включати обʼєкти, на які посилається індекс"
msgid "read packs from stdin"
-msgstr ""
+msgstr "прочитати пакунки з stdin"
msgid "output pack to stdout"
-msgstr ""
+msgstr "вивести пакунок у stdout"
msgid "include tag objects that refer to objects to be packed"
msgstr ""
+"включати обʼєкти тегів, які посилаються на обʼєкти, що будуть запаковані"
msgid "keep unreachable objects"
-msgstr ""
+msgstr "зберігати недосяжні обʼєкти"
msgid "pack loose unreachable objects"
-msgstr ""
+msgstr "запакувати вільні недосяжні обʼєкти"
msgid "unpack unreachable objects newer than <time>"
-msgstr ""
+msgstr "розпакувати недосяжні обʼєкти, новіші за <час>"
msgid "create a cruft pack"
-msgstr ""
+msgstr "створити марний пакунок"
msgid "expire cruft objects older than <time>"
-msgstr ""
+msgstr "видалити марні обʼєкти старіші за <час>"
msgid "use the sparse reachability algorithm"
-msgstr ""
+msgstr "використовувати алгоритм розрідженої досяжності"
msgid "create thin packs"
msgstr "створити тонкі пакунки"
msgid "create packs suitable for shallow fetches"
-msgstr ""
+msgstr "створювати пакунки, придатні для неглибокого отримання"
msgid "ignore packs that have companion .keep file"
-msgstr ""
+msgstr "ігнорувати пакунки, які мають супровідний .keep файл"
msgid "ignore this pack"
msgstr "ігнорувати цей пакунок"
msgid "pack compression level"
-msgstr ""
+msgstr "рівень стиснення пакунка"
msgid "do not hide commits by grafts"
-msgstr ""
+msgstr "не приховувати коміти через прищепи"
msgid "use a bitmap index if available to speed up counting objects"
msgstr ""
+"використовувати bitmap індекс, якщо він доступний, для прискорення "
+"підрахунку обʼєктів"
msgid "write a bitmap index together with the pack index"
-msgstr ""
+msgstr "записати bitmap індекс разом з індексом пакунка"
msgid "write a bitmap index if possible"
-msgstr ""
+msgstr "записати bitmap індекс, якщо це можливо"
msgid "handling for missing objects"
msgstr "обробка для відсутніх обʼєктів"
msgid "do not pack objects in promisor packfiles"
-msgstr ""
+msgstr "не пакувати обʼєкти у promisor пакунки"
msgid "respect islands during delta compression"
-msgstr ""
+msgstr "поважати острови під час дельта компресії"
msgid "protocol"
-msgstr ""
+msgstr "протокол"
msgid "exclude any configured uploadpack.blobpackfileuri with this protocol"
-msgstr ""
+msgstr "вилучити всі налаштовані uploadpack.blobpackfileuri з цим протоколом"
#, c-format
msgid "delta chain depth %d is too deep, forcing %d"
-msgstr ""
+msgstr "глибина дельта ланцюжка %d занадто глибока, примусове %d"
#, c-format
msgid "pack.deltaCacheLimit is too high, forcing %d"
-msgstr ""
+msgstr "pack.deltaCacheLimit занадто великий, примусове %d"
#, c-format
msgid "bad pack compression level %d"
-msgstr ""
+msgstr "невірний рівень стиснення пакунка %d"
msgid "--max-pack-size cannot be used to build a pack for transfer"
msgstr ""
+"--max-pack-size не можна використовувати для створення пакунка для передачі"
msgid "minimum pack size limit is 1 MiB"
-msgstr ""
+msgstr "мінімальний розмір пакунка - 1 МіБ"
msgid "--thin cannot be used to build an indexable pack"
-msgstr ""
+msgstr "--thin не можна використовувати для створення індексованого пакунка"
msgid "cannot use --filter without --stdout"
-msgstr ""
+msgstr "неможливо використовувати --filter без --stdout"
msgid "cannot use --filter with --stdin-packs"
-msgstr ""
+msgstr "неможливо використовувати --filter з --stdin-packs"
msgid "cannot use internal rev list with --stdin-packs"
-msgstr ""
+msgstr "неможливо використовувати внутрішній список ревізій з --stdin-packs"
msgid "cannot use internal rev list with --cruft"
-msgstr ""
+msgstr "неможливо використовувати внутрішній список ревізій з --cruft"
msgid "cannot use --stdin-packs with --cruft"
-msgstr ""
+msgstr "неможливо використовувати --stdin-packs з --cruft"
msgid "cannot use --max-pack-size with --cruft"
-msgstr ""
+msgstr "неможливо використовувати --max-pack-size з --cruft"
msgid "Enumerating objects"
msgstr "Перерахування обʼєктів"
@@ -9047,6 +9359,8 @@ msgid ""
"Total %<PRIu32> (delta %<PRIu32>), reused %<PRIu32> (delta %<PRIu32>), pack-"
"reused %<PRIu32>"
msgstr ""
+"Всього %<PRIu32> (дельта %<PRIu32>), повторно використано %<PRIu32> (дельта "
+"%<PRIu32>), повторно використано пакунків %<PRIu32>"
msgid ""
"'git pack-redundant' is nominated for removal.\n"
@@ -9055,42 +9369,57 @@ msgid ""
"and let us know you still use it by sending an e-mail\n"
"to <git@vger.kernel.org>. Thanks.\n"
msgstr ""
+"Команду \"git pack-redundant\" номіновано на вилучення.\n"
+"Якщо ви все ще використовуєте цю команду, будь ласка, додайте додатковий "
+"параметр\n"
+"\"--i-still-use-this\" у командному рядку\n"
+"і повідомте нам, що ви все ще використовуєте її, надіславши листа\n"
+"на адресу <git@vger.kernel.org>. Дякуємо.\n"
msgid "refusing to run without --i-still-use-this"
-msgstr ""
+msgstr "відмовлено в запуску без --i-still-use-this"
-msgid "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <шаблон>] [--exclude <шаблон>]"
msgid "pack everything"
-msgstr ""
+msgstr "запакувати все"
msgid "prune loose refs (default)"
msgstr "видалити вивільнені посилання (за замовчуванням)"
+msgid "references to include"
+msgstr "посилання для включення"
+
+msgid "references to exclude"
+msgstr "посилання для виключення"
+
msgid "git patch-id [--stable | --unstable | --verbatim]"
-msgstr ""
+msgstr "git patch-id [--stable | --unstable | --verbatim]"
msgid "use the unstable patch-id algorithm"
-msgstr ""
+msgstr "використовувати нестабільний алгоритм ідентифікатора латки"
msgid "use the stable patch-id algorithm"
-msgstr ""
+msgstr "використовувати стабільний алгоритм ідентифікатора латки"
msgid "don't strip whitespace from the patch"
-msgstr ""
+msgstr "не прибирати пробіли з латки"
msgid "git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]"
-msgstr ""
+msgstr "git prune [-n] [-v] [--progress] [--expire <час>] [--] [<верхівка>...]"
msgid "report pruned objects"
-msgstr ""
+msgstr "повідомляти про видалені обʼєкти"
msgid "expire objects older than <time>"
-msgstr ""
+msgstr "видалити обʼєкти старіші за <час>"
msgid "limit traversal to objects outside promisor packfiles"
-msgstr ""
+msgstr "обмежити обхід об’єктами за межами promisor пакунків"
msgid "cannot prune in a precious-objects repo"
msgstr "неможливо виконати видалення в precious-objects сховищі"
@@ -9102,42 +9431,52 @@ msgid "control for recursive fetching of submodules"
msgstr "управління рекурсивним отриманням підмодулів"
msgid "Options related to merging"
-msgstr ""
+msgstr "Опції, повʼязані зі злиттям"
msgid "incorporate changes by rebasing rather than merging"
-msgstr ""
+msgstr "вносити зміни через перебазування, а не злиття"
msgid "allow fast-forward"
-msgstr ""
+msgstr "дозволити перемотування вперед"
msgid "control use of pre-merge-commit and commit-msg hooks"
-msgstr ""
+msgstr "контролювати використання гачків pre-merge-commit та commit-msg"
msgid "automatically stash/stash pop before and after"
-msgstr ""
+msgstr "автоматично додавати до та забирати зі схову перед і після"
msgid "Options related to fetching"
-msgstr ""
+msgstr "Опції, пов’язані з отриманням"
msgid "force overwrite of local branch"
-msgstr ""
+msgstr "примусовий перезапис локальної гілки"
msgid "number of submodules pulled in parallel"
msgstr "кількість підмодулів, що затягуються паралельно"
+msgid "use IPv4 addresses only"
+msgstr "використовувати тільки IPv4 адреси"
+
+msgid "use IPv6 addresses only"
+msgstr "використовувати тільки IPv6 адреси"
+
msgid ""
"There is no candidate for rebasing against among the refs that you just "
"fetched."
msgstr ""
+"Серед щойно отриманих посилань немає кандидата, відносно якого можна "
+"виконати перебазування."
msgid ""
"There are no candidates for merging among the refs that you just fetched."
-msgstr ""
+msgstr "Серед щойно отриманих посилань немає кандидатів на злиття."
msgid ""
"Generally this means that you provided a wildcard refspec which had no\n"
"matches on the remote end."
msgstr ""
+"Зазвичай це означає, що для визначника посилання, ви ввели символ "
+"підстановки, який не має збігів на віддаленому призначені."
#, c-format
msgid ""
@@ -9145,44 +9484,52 @@ msgid ""
"a branch. Because this is not the default configured remote\n"
"for your current branch, you must specify a branch on the command line."
msgstr ""
+"Ви попросили затягнути з віддаленого \"%s\", але не вказали\n"
+"гілку. Оскільки це не типове віддалене призначення\n"
+"для вашої поточної гілки, вам треба вказати гілку у командному рядку."
msgid "You are not currently on a branch."
msgstr "Наразі ви не на гілці."
msgid "Please specify which branch you want to rebase against."
msgstr ""
+"Будь ласка, вкажіть, відносно якої гілки ви хочете виконати перебазування."
msgid "Please specify which branch you want to merge with."
-msgstr ""
+msgstr "Будь ласка, вкажіть, з якою гілкою ви хочете виконати злиття."
msgid "See git-pull(1) for details."
-msgstr ""
+msgstr "Дивіться git-pull(1) для більш детальної інформації."
msgid "<remote>"
-msgstr ""
+msgstr "<віддалене-призначення>"
msgid "<branch>"
msgstr "<гілка>"
msgid "There is no tracking information for the current branch."
-msgstr ""
+msgstr "Немає інформації для відстежування поточної гілки."
msgid ""
"If you wish to set tracking information for this branch you can do so with:"
msgstr ""
+"Якщо ви бажаєте встановити інформацію для відстежування цієї гілки, ви "
+"можете зробити це за допомогою:"
#, c-format
msgid ""
"Your configuration specifies to merge with the ref '%s'\n"
"from the remote, but no such ref was fetched."
msgstr ""
+"У вашій конфігурації вказано робити злиття з посиланням \"%s\"\n"
+"з віддаленого призначення, але такого посилання не було отримано."
#, c-format
msgid "unable to access commit %s"
msgstr "не вдалося отримати доступ до коміту %s"
msgid "ignoring --verify-signatures for rebase"
-msgstr ""
+msgstr "ігнорування --verify-signatures для перебазування"
msgid ""
"You have divergent branches and need to specify how to reconcile them.\n"
@@ -9199,15 +9546,29 @@ msgid ""
"or --ff-only on the command line to override the configured default per\n"
"invocation.\n"
msgstr ""
+"У вас є розбіжні гілки, і вам потрібно вказати, як їх узгодити.\n"
+"Ви можете зробити це, виконавши одну з наступних команд \n"
+"до вашого наступного затягування:\n"
+"\n"
+" git config pull.rebase false # merge\n"
+" git config pull.rebase true # rebase\n"
+" git config pull.ff only # fast-forward only\n"
+"\n"
+"Ви можете замінити \"git config\" на \"git config --global\", щоб встановити "
+"налаштування за замовчуванням\n"
+"для всіх сховищ. Ви також можете передати --rebase, --no-rebase,\n"
+"або --ff-only у командному рядку, щоб перевизначити налаштування за "
+"замовчуванням для кожного\n"
+"виклику.\n"
msgid "Updating an unborn branch with changes added to the index."
-msgstr ""
+msgstr "Оновлення ненародженої гілки зі змінами, доданими до індексу."
msgid "pull with rebase"
-msgstr ""
+msgstr "затягнути з перебазуванням"
msgid "Please commit or stash them."
-msgstr ""
+msgstr "Будь ласка, зробіть коміт або додайте зміни до схову."
#, c-format
msgid ""
@@ -9215,6 +9576,9 @@ msgid ""
"fast-forwarding your working tree from\n"
"commit %s."
msgstr ""
+"отримання оновило верхівку поточної гілки.\n"
+"перемотування вперед вашого робочого дерева з\n"
+"коміту %s."
#, c-format
msgid ""
@@ -9225,21 +9589,27 @@ msgid ""
"$ git reset --hard\n"
"to recover."
msgstr ""
+"Неможливо перемотати вперед ваше робоче дерево.\n"
+"Переконавшись, що ви зберегли все цінне з\n"
+"$ git diff %s\n"
+"виводу, виконайте\n"
+"$ git reset --hard\n"
+"для відновлення."
msgid "Cannot merge multiple branches into empty head."
-msgstr ""
+msgstr "Неможливо злити кілька гілок до порожньої верхівки."
msgid "Cannot rebase onto multiple branches."
-msgstr ""
+msgstr "Неможливо перебазувати на кілька гілок."
msgid "Cannot fast-forward to multiple branches."
-msgstr ""
+msgstr "Неможливо перемотати вперед кілька гілок."
msgid "Need to specify how to reconcile divergent branches."
-msgstr ""
+msgstr "Потрібно вказати, як узгоджувати розбіжні гілки."
msgid "cannot rebase with locally recorded submodule modifications"
-msgstr ""
+msgstr "неможливо перебазувати з локально записаними модифікаціями підмодуля"
msgid "git push [<options>] [<repository> [<refspec>...]]"
msgstr "git push [<опції>] [<сховище> [<визначник посилання>...]]"
@@ -9265,8 +9635,7 @@ msgid ""
"in 'git help config'.\n"
msgstr ""
"\n"
-"Щоб уникнути автоматичного налаштування гілки перводжерельного сховища, якщо "
-"її назва\n"
+"Щоб уникнути автоматичного налаштування висхідної гілки, якщо її назва\n"
"не збігається з назвою локальної гілки, скористайтесь опцією 'simple' для "
"branch.autoSetupMerge\n"
"у “git help config”.\n"
@@ -9284,10 +9653,9 @@ msgid ""
" git push %s HEAD\n"
"%s%s"
msgstr ""
-"Назва гілки перводжерельного сховища для вашої поточної гілки не збігається "
-"з\n"
-"назвою вашої поточної гілки. Щоб надіслати до гілки\n"
-"першоджерельного сховища, скористайтесь командою\n"
+"Назва висхідної гілки для вашої поточної гілки не збігається з\n"
+"назвою вашої поточної гілки. Щоб надіслати до висхідної гілки,\n"
+"скористайтесь командою\n"
"\n"
" git push %s HEAD:%s\n"
"\n"
@@ -9328,16 +9696,16 @@ msgid ""
" git push --set-upstream %s %s\n"
"%s"
msgstr ""
-"Поточна гілка %s не має гілки у першоджeрельному сховищі.\n"
+"Поточна гілка %s не має висхідної гілки.\n"
"Щоб надіслати поточну гілку і встановити віддалене призначення "
-"першоджерельним сховищем, скористайтеся\n"
+"першоджерельним сховищем, скористайтесь\n"
"\n"
" git push --set-upstream %s %s\n"
"%s"
#, c-format
msgid "The current branch %s has multiple upstream branches, refusing to push."
-msgstr "Поточна гілка %s має декілька висхідних гілок, відмова надсилання."
+msgstr "Поточна гілка %s має кілька висхідних гілок, відмовлено в надсиланні."
msgid ""
"You didn't specify any refspecs to push, and push.default is \"nothing\"."
@@ -9351,52 +9719,55 @@ msgid ""
"your current branch '%s', without telling me what to push\n"
"to update which remote branch."
msgstr ""
-"Ви надсилаєте до віддаленої гілки '%s', яка не є першоджерелом\n"
-"вашої поточної гілки '%s', не кажучі мені, що надсилати\n"
+"Ви надсилаєте до віддаленої гілки \"%s\", яка не є першоджерелом\n"
+"вашої поточної гілки \"%s\", не кажучі мені, що надсилати\n"
"і яку віддалену гілку оновлювати."
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Оновлення було відхилено, оскільки верхівка вашої поточної гілки знаходиться "
+"Оновлення були відхилені, оскільки верхівка вашої поточної гілки знаходиться "
"позаду\n"
-"її віддаленого аналога. Інтегруйте віддалені зміни (наприклад, через\n"
-"'git pull ...') перед повторним надсиланням.\n"
-"Докладніше у \"Примітці про перемотування\" команди \"git push --help\"."
+"її віддаленого аналога. Якщо ви хочете інтегрувати віддалені зміни,\n"
+"скористайтесь командою \"git pull\" перед повторним надсиланням.\n"
+"Докладні відомості наведено у розділі \"Зауваження щодо перемотування "
+"вперед\" команди \"git push --help\"."
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Оновлення було відхилено, оскільки верхівка вашої поточної гілки знаходиться "
+"Оновлення були відхилені, оскільки верхівка надісланої гілки знаходиться "
"позаду\n"
-"її віддаленого аналога. Стягнить цю гілку та інтегруйте віддалені зміни\n"
-"(наприклад, через 'git pull...') перед повторним надсиланням.\n"
-"Докладніше у \"Примітці про перемотування\" команди \"git push --help\"."
+"її віддаленого аналога. Якщо ви хочете інтегрувати віддалені зміни, "
+"скористайтесь командою \"git pull\"\n"
+"перед повторним надсиланням.\n"
+"Докладні відомості наведено у розділі \"Зауваження щодо перемотування "
+"вперед\" команди \"git push --help\"."
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Оновлення було відхилено, оскільки у віддаленому сховищі міститься робота, "
+"Оновлення були відхилені, оскільки у віддаленому сховищі міститься робота, "
"якої\n"
"немає локально. Зазвичай це стається, коли інше сховище надсилає\n"
-"до того самого посилання. Можливо, вам слід спочатку інтегрувати віддалені "
-"зміни\n"
-"(наприклад, через 'git pull ...') перед повторним надсиланням.\n"
-"Докладніше у \"Примітці про перемотування\" команди \"git push --help\"."
+"до того самого посилання. Якщо ви хочете інтегрувати віддалені зміни,\n"
+"скористайтесь командою \"git pull\" перед повторним надсиланням.\n"
+"Докладні відомості наведено у розділі \"Зауваження щодо перемотування "
+"вперед\" команди \"git push --help\"."
msgid "Updates were rejected because the tag already exists in the remote."
msgstr ""
-"Оновлення було відхилено, оскільки тег вже існує на віддаленому сховищі."
+"Оновлення були відхилені, оскільки тег вже існує на віддаленому сховищі."
msgid ""
"You cannot update a remote ref that points at a non-commit object,\n"
@@ -9407,18 +9778,21 @@ msgstr ""
"об’єктом коміту,\n"
"або оновити віддалене посилання так, щоб воно вказувало на об’єкт, що не є "
"об’єктом коміту,\n"
-"без використання опції '--force'.\n"
+"без використання опції \"--force\".\n"
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Оновлення було відхилено, оскільки верхівка віддалено відстежуваної \n"
-"гілки була оновлена з моменту останнього стягування. Можливо, ви захочете\n"
-"інтегрувати ці зміни локально (наприклад, через 'git pull ...')\n"
-"перед примусовим оновленням.\n"
+"Оновлення були відхилені, оскільки верхівка віддалено відстежуваної гілки "
+"була\n"
+"оновлена з часу останньої синхронізації. Якщо ви хочете інтегрувати "
+"віддалені зміни,\n"
+"скористайтесь командою \"git pull\" перед повторним надсиланням.\n"
+"Докладні відомості наведено у розділі \"Зауваження щодо перемотування "
+"вперед\" команди \"git push --help\"."
#, c-format
msgid "Pushing to %s\n"
@@ -9452,7 +9826,8 @@ msgid "delete refs"
msgstr "видалити посилання"
msgid "push tags (can't be used with --all or --branches or --mirror)"
-msgstr "надіслати теги (не може бути використано з --all, --branches або --mirror)"
+msgstr ""
+"надіслати теги (не можна використовувати з --all, --branches або --mirror)"
msgid "force updates"
msgstr "оновити примусово"
@@ -9470,7 +9845,7 @@ msgid "control recursive pushing of submodules"
msgstr "контролювати рекурсивне надсилання підмодулів"
msgid "use thin pack"
-msgstr "використовуйте тонке пакування"
+msgstr "використовувати тонке пакування"
msgid "receive pack program"
msgstr "отримати пакетну програму"
@@ -9494,7 +9869,7 @@ msgid "request atomic transaction on remote side"
msgstr "запросити атомарну транзакцію на віддаленій стороні"
msgid "--delete doesn't make sense without any refs"
-msgstr "--delete не має сенсу без рефів"
+msgstr "--delete не має сенсу без посилань"
#, c-format
msgid "bad repository '%s'"
@@ -9532,27 +9907,29 @@ msgstr "опції push не можуть містити символи ново
msgid "git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"
msgstr ""
+"git range-diff [<опції>] <стара-база>..<стара-верхівка> <нова-база>..<нова-"
+"верхівка>"
msgid "git range-diff [<options>] <old-tip>...<new-tip>"
-msgstr ""
+msgstr "git range-diff [<опції>] <стара-верхівка>...<нова-верхівка>"
msgid "git range-diff [<options>] <base> <old-tip> <new-tip>"
-msgstr ""
+msgstr "git range-diff [<опції>] <база> <стара-верхівка> <нова-верхівка>"
msgid "use simple diff colors"
-msgstr ""
+msgstr "використовувати прості кольори diff"
msgid "notes"
-msgstr ""
+msgstr "нотатки"
msgid "passed to 'git log'"
-msgstr ""
+msgstr "передано до \"git log\""
msgid "only emit output related to the first range"
-msgstr ""
+msgstr "видати тільки вивід, що відноситься до першого діапазону"
msgid "only emit output related to the second range"
-msgstr ""
+msgstr "видати тільки вивід, що відноситься до другого діапазону"
#, c-format
msgid "not a revision: '%s'"
@@ -9575,57 +9952,62 @@ msgid ""
" [-u | -i]] [--index-output=<file>] [--no-sparse-checkout]\n"
" (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"
msgstr ""
+"git read-tree [(-m [--trivial] [--aggressive] | --reset | --"
+"prefix=<префікс>)\n"
+" [-u | -i]] [--index-output=<файл>] [--no-sparse-checkout]\n"
+" (--empty | <деревоподібне-джерело1> [<деревоподібне-джерело2> "
+"[<деревоподібне-джерело3>]])"
msgid "write resulting index to <file>"
-msgstr ""
+msgstr "записати отриманий індекс у <файл>"
msgid "only empty the index"
msgstr "тільки очистити індекс"
msgid "Merging"
-msgstr ""
+msgstr "Злиття"
msgid "perform a merge in addition to a read"
msgstr "виконати злиття на додачу до читання"
msgid "3-way merge if no file level merging required"
-msgstr ""
+msgstr "3-стороннє злиття, при відсутності потреби в злитті на рівні файлів"
msgid "3-way merge in presence of adds and removes"
-msgstr ""
+msgstr "3-стороннє злиття за наявності додавання та видалення"
msgid "same as -m, but discard unmerged entries"
-msgstr "те саме, що й -m, але відкидає незлиті записи"
+msgstr "те саме, що й -m, але відкидає не злиті записи"
msgid "<subdirectory>/"
-msgstr ""
+msgstr "<піддиректорія>/"
msgid "read the tree into the index under <subdirectory>/"
-msgstr ""
+msgstr "зчитати дерево в індекс під <піддиректорію>/"
msgid "update working tree with merge result"
-msgstr ""
+msgstr "оновити робоче дерево результатом злиття"
msgid "gitignore"
-msgstr ""
+msgstr "gitignore"
msgid "allow explicitly ignored files to be overwritten"
-msgstr ""
+msgstr "дозволити перезапис явно проігнорованих файлів"
msgid "don't check the working tree after merging"
msgstr "не перевіряти робоче дерево після злиття"
msgid "don't update the index or the work tree"
-msgstr ""
+msgstr "не оновлювати індекс або робоче дерево"
msgid "skip applying sparse checkout filter"
msgstr "пропустити застосування sparse checkout фільтра"
msgid "debug unpack-trees"
-msgstr ""
+msgstr "відлагодити unpack-trees"
msgid "suppress feedback messages"
-msgstr ""
+msgstr "не показувати повідомлення зворотного звʼязку"
msgid "You need to resolve your current index first"
msgstr "Спочатку вам потрібно розвʼязати поточний індекс"
@@ -9634,10 +10016,14 @@ msgid ""
"git rebase [-i] [options] [--exec <cmd>] [--onto <newbase> | --keep-base] "
"[<upstream> [<branch>]]"
msgstr ""
+"git rebase [-i] [опції] [--exec <команда>] [--onto <нова-база> | --keep-"
+"base] [<першоджерельне-сховище> [<гілка>]]"
msgid ""
"git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]"
msgstr ""
+"git rebase [-i] [опції] [--exec <команда>] [--onto <нова-база>] --root "
+"[<гілка>]"
#, c-format
msgid "could not read '%s'."
@@ -9654,11 +10040,11 @@ msgid "could not generate todo list"
msgstr "не вдалося створити список справ"
msgid "a base commit must be provided with --upstream or --onto"
-msgstr ""
+msgstr "базовий коміт має бути наданий з --upstream або --onto"
#, c-format
msgid "%s requires the merge backend"
-msgstr ""
+msgstr "%s потребує обробника злиття"
#, c-format
msgid "invalid onto: '%s'"
@@ -9670,7 +10056,7 @@ msgstr "неприпустимий orig-head: \"%s\""
#, c-format
msgid "ignoring invalid allow_rerere_autoupdate: '%s'"
-msgstr ""
+msgstr "ігнорування неприпустимого allow_rerere_autoupdate: \"%s\""
#, c-format
msgid "could not remove '%s'"
@@ -9683,6 +10069,13 @@ msgid ""
"To abort and get back to the state before \"git rebase\", run \"git rebase --"
"abort\"."
msgstr ""
+"Вирішіть усі конфлікти вручну, позначте їх як вирішені за допомогою\n"
+"\"git add/rm <конфліктні_файли>\", а потім виконайте \"git rebase --"
+"continue\".\n"
+"Замість цього ви можете пропустити цей коміт: виконайте \"git rebase --"
+"skip\".\n"
+"Щоб перервати процес і повернутися до стану перед \"git rebase\", виконайте "
+"\"git rebase --abort\"."
#, c-format
msgid ""
@@ -9694,10 +10087,17 @@ msgid ""
"\n"
"As a result, git cannot rebase them."
msgstr ""
+"\n"
+"git зіткнувся з помилкою під час підготовки латок для відтворення\n"
+"цих ревізій:\n"
+"\n"
+" %s\n"
+"\n"
+"Внаслідок цього git не може їх перебазувати."
#, c-format
msgid "Unknown rebase-merges mode: %s"
-msgstr ""
+msgstr "Невідомий режим перебазування-злиття: %s"
#, c-format
msgid "could not switch to %s"
@@ -9711,12 +10111,17 @@ msgid ""
"unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
"\"ask\"."
msgstr ""
+"нерозпізнаний порожній тип \"%s\"; припустимими значеннями є \"drop\", "
+"\"keep\" та \"ask\"."
msgid ""
"--rebase-merges with an empty string argument is deprecated and will stop "
"working in a future version of Git. Use --rebase-merges without an argument "
"instead, which does the same thing."
msgstr ""
+"Команда --rebase-merges з порожнім строковим аргументом є застарілою і "
+"перестане працювати у наступній версії Git. Замість цього скористайтесь "
+"командою --rebase-merges без аргументу, який робить те саме."
#, c-format
msgid ""
@@ -9727,6 +10132,13 @@ msgid ""
" git rebase '<branch>'\n"
"\n"
msgstr ""
+"%s\n"
+"Будь ласка, вкажіть гілку, відносно якої ви хочете виконати перебазування.\n"
+"Дивіться git-rebase(1) для детальної інформації.\n"
+"\n"
+" git rebase \"<гілка>\"\n"
+"\n"
+"\n"
#, c-format
msgid ""
@@ -9742,152 +10154,169 @@ msgstr ""
"\n"
msgid "exec commands cannot contain newlines"
-msgstr ""
+msgstr "команди exec не можуть містити символи нового рядка"
msgid "empty exec command"
-msgstr ""
+msgstr "порожня команда exec"
msgid "rebase onto given branch instead of upstream"
-msgstr ""
+msgstr "перебазувати на задану гілку замість першоджерельного сховища"
msgid "use the merge-base of upstream and branch as the current base"
msgstr ""
+"використовувати базу злиття першоджерельного сховища та гілки як поточну базу"
msgid "allow pre-rebase hook to run"
-msgstr ""
+msgstr "дозволити запуск pre-rebase гачка"
msgid "be quiet. implies --no-stat"
-msgstr ""
+msgstr "працювати тихесенько. Мається на увазі --no-stat"
msgid "display a diffstat of what changed upstream"
-msgstr ""
+msgstr "відображати diffstat того, що змінилося у першоджерельному сховищі"
msgid "do not show diffstat of what changed upstream"
-msgstr ""
+msgstr "не відображати diffstat того, що змінилося у першоджерельному сховищі"
msgid "add a Signed-off-by trailer to each commit"
-msgstr ""
+msgstr "додати Signed-off-by причіп до кожного коміту"
msgid "make committer date match author date"
-msgstr ""
+msgstr "зробити так, щоб дата комітера збігалася з датою автора"
msgid "ignore author date and use current date"
-msgstr ""
+msgstr "ігнорувати дату автора та використати поточну дату"
msgid "synonym of --reset-author-date"
-msgstr ""
+msgstr "синонім --reset-author-date"
msgid "passed to 'git apply'"
-msgstr ""
+msgstr "передано в \"git apply\""
msgid "ignore changes in whitespace"
-msgstr ""
+msgstr "ігнорувати зміни в пробілах"
msgid "cherry-pick all commits, even if unchanged"
-msgstr ""
+msgstr "висмикнути всі коміти, навіть якщо вони не змінені"
msgid "continue"
-msgstr ""
+msgstr "продовжити"
msgid "skip current patch and continue"
-msgstr ""
+msgstr "пропустити поточну латку і продовжити"
msgid "abort and check out the original branch"
msgstr "перервати і перейти до початкової гілки"
msgid "abort but keep HEAD where it is"
-msgstr ""
+msgstr "перервати, але залишити HEAD на місці"
msgid "edit the todo list during an interactive rebase"
-msgstr ""
+msgstr "редагувати список справ під час інтерактивного перебазування"
msgid "show the patch file being applied or merged"
-msgstr ""
+msgstr "показати файл латки, який застосовується або зливається"
msgid "use apply strategies to rebase"
-msgstr ""
+msgstr "використовувати стратегії застосування для перебазування"
msgid "use merging strategies to rebase"
-msgstr ""
+msgstr "використовувати стратегії злиття для перебазування"
msgid "let the user edit the list of commits to rebase"
-msgstr ""
+msgstr "дозволити користувачеві редагувати список комітів для перебазування"
msgid "(REMOVED) was: try to recreate merges instead of ignoring them"
msgstr ""
+"(ВИДАЛЕНО) було: спробувати відтворити злиття замість того, щоб ігнорувати їх"
msgid "how to handle commits that become empty"
-msgstr ""
+msgstr "як обробляти порожні коміти"
msgid "keep commits which start empty"
-msgstr ""
+msgstr "зберігати коміти, які починаються порожніми"
msgid "move commits that begin with squash!/fixup! under -i"
-msgstr ""
+msgstr "перемістити коміти, які починаються з squash!/fixup! під -i"
msgid "update branches that point to commits that are being rebased"
msgstr ""
+"оновити гілки, які вказують на коміти, що знаходяться в стані перебазування"
msgid "add exec lines after each commit of the editable list"
-msgstr ""
+msgstr "додати exec рядки після кожного коміту редагованого списку"
msgid "allow rebasing commits with empty messages"
-msgstr ""
+msgstr "дозволити перебазування комітів з порожніми дописами"
msgid "try to rebase merges instead of skipping them"
-msgstr ""
+msgstr "спробувати перебазувати злиття замість того, щоб пропускати їх"
msgid "use 'merge-base --fork-point' to refine upstream"
msgstr ""
-"використовуйте \"merge-base --fork-point\" для уточнення першоджерельного "
-"сховища"
+"скористайтесь \"merge-base --fork-point\", щоб зазначиити першоджерельне "
+"сховище"
msgid "use the given merge strategy"
-msgstr ""
+msgstr "використати задану стратегію злиття"
msgid "option"
-msgstr ""
+msgstr "опція"
msgid "pass the argument through to the merge strategy"
-msgstr ""
+msgstr "передати аргумент до стратегії злиття"
msgid "rebase all reachable commits up to the root(s)"
-msgstr ""
+msgstr "перебазувати всі доступні коміти до кореня(ів)."
msgid "automatically re-schedule any `exec` that fails"
-msgstr ""
+msgstr "автоматично переносити будь-який \"exec\", який завершився невдало"
msgid "apply all changes, even those already present upstream"
msgstr ""
+"застосовувати всі зміни, навіть ті, що вже існують у першоджерельному сховищі"
msgid "It looks like 'git am' is in progress. Cannot rebase."
-msgstr ""
+msgstr "Схоже, що виконується команда \"git am\". Неможливо перебазувати."
msgid ""
"`rebase --preserve-merges` (-p) is no longer supported.\n"
"Use `git rebase --abort` to terminate current rebase.\n"
"Or downgrade to v2.33, or earlier, to complete the rebase."
msgstr ""
+"Команда \"rebase --preserve-merges\" (-p) більше не підтримується.\n"
+"Скористайтесь \"git rebase --abort\" для завершення поточного "
+"перебазування.\n"
+"Або поверніться до v2.33 або більш ранньої версії, щоб завершити "
+"перебазування."
msgid ""
"--preserve-merges was replaced by --rebase-merges\n"
"Note: Your `pull.rebase` configuration may also be set to 'preserve',\n"
"which is no longer supported; use 'merges' instead"
msgstr ""
+"--preserve-merges було замінено на --rebase-merges\n"
+"Примітка: У вашій конфігурації \"pull.rebase\" також може бути встановлено у "
+"значення \"preserve\",\n"
+"який більше не підтримується; натомість використовуйте \"merges\""
msgid "No rebase in progress?"
msgstr "Перебазування не відбувається?"
msgid "The --edit-todo action can only be used during interactive rebase."
msgstr ""
+"Дію --edit-todo можна використовувати лише під час інтерактивного "
+"перебазування."
msgid "Cannot read HEAD"
-msgstr ""
+msgstr "Неможливо прочитати HEAD"
msgid ""
"You must edit all merge conflicts and then\n"
"mark them as resolved using git add"
msgstr ""
+"Ви повинні відредагувати всі конфлікти злиття, а потім\n"
+"позначити їх як вирішені за допомогою git add"
msgid "could not discard worktree changes"
msgstr "не вдалося відкинути зміни робочого дерева"
@@ -9907,34 +10336,49 @@ msgid ""
"and run me again. I am stopping in case you still have something\n"
"valuable there.\n"
msgstr ""
+"Здається, що директорія %s вже існує, і\n"
+"можливо, ви перебуваєте у процесі іншого перебазування. Якщо це так,\n"
+"будь ласка, спробуйте\n"
+"\t%s\n"
+"Якщо це не так, спробуйте\n"
+"\t%s\n"
+"і запустіть команду ще раз. Зупинка на випадок, якщо там у вас все ще є "
+"щось\n"
+"цінне.\n"
msgid "switch `C' expects a numerical value"
-msgstr ""
+msgstr "перемикач \"C\" очікує числове значення"
msgid "--strategy requires --merge or --interactive"
-msgstr ""
+msgstr "--strategy потребує --merge або --interactive"
msgid ""
"apply options are incompatible with rebase.autoSquash. Consider adding --no-"
"autosquash"
msgstr ""
+"apply опції несумісні з rebase.autoSquash. Розгляньте можливість додавання "
+"--no-autosquash"
msgid ""
"apply options are incompatible with rebase.rebaseMerges. Consider adding --"
"no-rebase-merges"
msgstr ""
+"apply опції несумісні з rebase.rebaseMerges. Розгляньте можливість "
+"додавання --no-rebase-merges"
msgid ""
"apply options are incompatible with rebase.updateRefs. Consider adding --no-"
"update-refs"
msgstr ""
+"apply опції несумісні з rebase.updateRefs. Розгляньте можливість додавання "
+"--no-update-refs"
#, c-format
msgid "Unknown rebase backend: %s"
-msgstr ""
+msgstr "Невідомий обробник перебазування: %s"
msgid "--reschedule-failed-exec requires --exec or --interactive"
-msgstr ""
+msgstr "--reschedule-failed-exec потребує --exec або --interactive"
#, c-format
msgid "invalid upstream '%s'"
@@ -9956,11 +10400,11 @@ msgstr "Не вдалося розвʼязати HEAD у коміт"
#, c-format
msgid "'%s': need exactly one merge base with branch"
-msgstr ""
+msgstr "\"%s\": потрібна лишень одна база злиття з гілкою"
#, c-format
msgid "'%s': need exactly one merge base"
-msgstr ""
+msgstr "\"%s\": потрібна лишень одна база злиття"
#, c-format
msgid "Does not point to a valid commit '%s'"
@@ -9974,7 +10418,7 @@ msgid "Current branch %s is up to date.\n"
msgstr "Поточна гілка %s знаходиться в актуальному стані.\n"
msgid "HEAD is up to date, rebase forced."
-msgstr ""
+msgstr "HEAD знаходиться в актуальному стані, примусове перебазування."
#, c-format
msgid "Current branch %s is up to date, rebase forced.\n"
@@ -9982,7 +10426,7 @@ msgstr ""
"Поточна гілка %s знаходиться в актуальному стані, перебазовуйте примусово.\n"
msgid "The pre-rebase hook refused to rebase."
-msgstr ""
+msgstr "Гачок pre-rebase відмовився перебазувати."
#, c-format
msgid "Changes to %s:\n"
@@ -9990,18 +10434,18 @@ msgstr "Зміни у %s:\n"
#, c-format
msgid "Changes from %s to %s:\n"
-msgstr ""
+msgstr "Зміна з %s на %s:\n"
#, c-format
msgid "First, rewinding head to replay your work on top of it...\n"
-msgstr ""
+msgstr "Спочатку перемотуємо HEAD, щоб відтворити вашу роботу поверх того...\n"
msgid "Could not detach HEAD"
msgstr "Не вдалося відʼєднати HEAD"
#, c-format
msgid "Fast-forwarded %s to %s.\n"
-msgstr ""
+msgstr "Перемотано вперед %s на %s.\n"
msgid "git receive-pack <git-dir>"
msgstr "git receive-pack <git-директорія>"
@@ -10021,6 +10465,19 @@ msgid ""
"To squelch this message and still keep the default behaviour, set\n"
"'receive.denyCurrentBranch' configuration variable to 'refuse'."
msgstr ""
+"За замовчуванням, оновлення поточної гілки у непустому сховищі\n"
+"заборонено, оскільки це зробить індекс і робоче дерево невідповідними\n"
+"з тим, що ви надіслали, і вимагатиме виконання команди \"git reset --hard\" "
+"щоб співставити робоче дерево і HEAD.\n"
+"\n"
+"Ви можете встановити конфігураційну змінну \"receive.denyCurrentBranch\"\n"
+"на \"ignore\" або \"warn\" у віддаленому сховищі, щоб дозволити надсилання "
+"до поточної гілки; однак, це не рекомендується, якщо ви не\n"
+"налагодили оновлення його робочого дерева відповідно до того, що ви "
+"надіслали якимось іншим способом.\n"
+"\n"
+"Щоб ігнорувати це повідомлення і зберегти поведінку за замовчуванням, "
+"встановіть параметр \"receive.denyCurrentBranch\" у значення \"refuse\"."
msgid ""
"By default, deleting the current branch is denied, because the next\n"
@@ -10032,9 +10489,19 @@ msgid ""
"\n"
"To squelch this message, you can set it to 'refuse'."
msgstr ""
+"За замовчуванням, видалення поточної гілки заборонено, оскільки наступний\n"
+"\"git clone\" не призведе до переключення стану жодного файлу, що спричинить "
+"плутанину.\n"
+"\n"
+"Ви можете встановити конфігураційну змінну \"receive.denyDeleteCurrent\" у "
+"значення\n"
+"\"warn\" або \"ignore\" у віддаленому сховищі, щоб дозволити видалення\n"
+"поточної гілки, з попереджувальним повідомленням або без нього.\n"
+"\n"
+"Щоб ігнорувати це повідомлення, ви можете встановити значення \"refuse\"."
msgid "quiet"
-msgstr ""
+msgstr "тихо"
msgid "you must specify a directory"
msgstr "необхідно вказати директорію"
@@ -10048,62 +10515,70 @@ msgid ""
" [--dry-run | -n] [--verbose] [--all [--single-worktree] | "
"<refs>...]"
msgstr ""
+"git reflog expire [--expire=<час>] [--expire-unreachable=<час>]\n"
+" [--rewrite] [--updateref] [--stale-fix]\n"
+" [--dry-run | -n] [--verbose] [--all [--single-worktree] | "
+"<посилання>...]"
msgid ""
"git reflog delete [--rewrite] [--updateref]\n"
" [--dry-run | -n] [--verbose] <ref>@{<specifier>}..."
msgstr ""
+"git reflog delete [--rewrite] [--updateref]\n"
+" [--dry-run | -n] [--verbose] <посилання>@{<визначник>}..."
msgid "git reflog exists <ref>"
-msgstr ""
+msgstr "git reflog exists <посилання>"
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "неприпустима позначка часу \"%s\" передана до \"--%s\""
msgid "do not actually prune any entries"
-msgstr ""
+msgstr "насправді не видаляти жодного запису"
msgid ""
"rewrite the old SHA1 with the new SHA1 of the entry that now precedes it"
-msgstr ""
+msgstr "перезаписати старий SHA1 на новий SHA1 запису, який тепер передує йому"
msgid "update the reference to the value of the top reflog entry"
-msgstr ""
+msgstr "оновити посилання на значення верхнього запису журналу посилань"
msgid "print extra information on screen"
-msgstr ""
+msgstr "вивести додаткову інформацію на екран"
msgid "timestamp"
msgstr "позначка часу"
msgid "prune entries older than the specified time"
-msgstr ""
+msgstr "видалити записи, старіші за вказаний час"
msgid ""
"prune entries older than <time> that are not reachable from the current tip "
"of the branch"
msgstr ""
+"видалити записи, старіші за <час>, які недоступні з поточної верхівки гілки"
msgid "prune any reflog entries that point to broken commits"
msgstr ""
+"видалити всі записи журналу посилань, які вказують на пошкоджені коміти"
msgid "process the reflogs of all references"
-msgstr ""
+msgstr "обробляти журнали посилань всіх посилань"
msgid "limits processing to reflogs from the current worktree only"
-msgstr ""
+msgstr "обмежити обробку журналами посилань лише з поточного робочого дерева"
#, c-format
msgid "Marking reachable objects..."
-msgstr ""
+msgstr "Позначення досяжних обʼєктів..."
#, c-format
msgid "%s points nowhere!"
-msgstr ""
+msgstr "%s вказує в нікуди!"
msgid "no reflog specified to delete"
-msgstr ""
+msgstr "не вказано журнал посилань для видалення"
#, c-format
msgid "invalid ref format: %s"
@@ -10113,49 +10588,54 @@ msgid ""
"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
+"git remote add [-t <гілка>] [-m <мастер>] [-f] [--tags | --no-tags] [--"
+"mirror=<fetch|push>] <назва> <URL-адреса>"
msgid "git remote rename [--[no-]progress] <old> <new>"
-msgstr ""
+msgstr "git remote rename [--[no-]progress] <стара-назва> <нова-назва>"
msgid "git remote remove <name>"
-msgstr ""
+msgstr "git remote remove <назвa>"
msgid "git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"
-msgstr ""
+msgstr "git remote set-head <назва> (-a | --auto | -d | --delete | <гілка>)"
msgid "git remote [-v | --verbose] show [-n] <name>"
-msgstr ""
+msgstr "git remote [-v | --verbose] show [-n] <назва>"
msgid "git remote prune [-n | --dry-run] <name>"
-msgstr ""
+msgstr "git remote prune [-n | --dry-run] <назва>"
msgid ""
"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"
msgstr ""
+"git remote [-v | --verbose] update [-p | --prune] [(<група> | <віддалене-"
+"призначення>)...]"
msgid "git remote set-branches [--add] <name> <branch>..."
-msgstr ""
+msgstr "git remote set-branches [--add] <назва> <гілка>..."
msgid "git remote get-url [--push] [--all] <name>"
-msgstr ""
+msgstr "git remote get-url [--push] [--all] <назва>"
msgid "git remote set-url [--push] <name> <newurl> [<oldurl>]"
msgstr ""
+"git remote set-url [--push] <назва> <нова-url-адреса> [<стара-url-адреса>]"
msgid "git remote set-url --add <name> <newurl>"
-msgstr ""
+msgstr "git remote set-url --add <назва> <нова-url-адреса>"
msgid "git remote set-url --delete <name> <url>"
-msgstr ""
+msgstr "git remote set-url --delete <назва> <url-адреса>"
msgid "git remote add [<options>] <name> <url>"
msgstr "git remote add [<опції>] <назва> <url>"
msgid "git remote set-branches <name> <branch>..."
-msgstr ""
+msgstr "git remote set-branches <назва> <гілка>..."
msgid "git remote set-branches --add <name> <branch>..."
-msgstr ""
+msgstr "git remote set-branches --add <назва> <гілка>..."
msgid "git remote show [<options>] <name>"
msgstr "git remote show [<опції>] <назва>"
@@ -10168,7 +10648,7 @@ msgstr "git remote update [<опції>] [<група> | <віддаленe-пр
#, c-format
msgid "Updating %s"
-msgstr ""
+msgstr "Оновлення %s"
#, c-format
msgid "Could not fetch %s"
@@ -10178,34 +10658,40 @@ msgid ""
"--mirror is dangerous and deprecated; please\n"
"\t use --mirror=fetch or --mirror=push instead"
msgstr ""
+"--mirror небезпечний і застарілий; будь ласка, \n"
+"\t скористайтесь --mirror=fetch або --mirror=push"
#, c-format
msgid "unknown mirror argument: %s"
-msgstr ""
+msgstr "невідомий аргумент дзеркала: %s"
msgid "fetch the remote branches"
-msgstr ""
+msgstr "отримати віддалені гілки"
-msgid "import all tags and associated objects when fetching"
-msgstr ""
-
-msgid "or do not fetch any tag at all (--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
msgstr ""
+"імпортувати всі теги та повʼязані з ними обʼєкти під час отримання\n"
+"або не отримувати жодного тегу (--no-tags)"
msgid "branch(es) to track"
-msgstr ""
+msgstr "гілка(и) для відстежування"
msgid "master branch"
msgstr "master гілка"
msgid "set up remote as a mirror to push to or fetch from"
msgstr ""
+"налаштувати віддалене призначення як дзеркало, щоб надсилати до нього або "
+"отримувати з нього дані"
msgid "specifying a master branch makes no sense with --mirror"
-msgstr ""
+msgstr "вказівка головної гілки не має сенсу з --mirror"
msgid "specifying branches to track makes sense only with fetch mirrors"
msgstr ""
+"вказівка гілок для відстежування має сенс тільки з дзеркалами отримання"
#, c-format
msgid "remote %s already exists."
@@ -10217,18 +10703,18 @@ msgstr "Не вдалося налаштувати master \"%s\""
#, c-format
msgid "more than one %s"
-msgstr ""
+msgstr "більше одного %s"
#, c-format
msgid "unhandled branch.%s.rebase=%s; assuming 'true'"
-msgstr ""
+msgstr "unhandled branch.%s.rebase=%s; припускаю \"true\""
#, c-format
msgid "Could not get fetch map for refspec %s"
msgstr "Не вдалося забрати карту отримання для визначника посилання %s"
msgid "(matching)"
-msgstr ""
+msgstr "(збіг)"
msgid "(delete)"
msgstr "(видалити)"
@@ -10247,6 +10733,9 @@ msgid ""
"\t%s:%d\n"
"now names the non-existent remote '%s'"
msgstr ""
+"Конфігурація %s remote.pushDefault in:\n"
+"\t%s:%d\n"
+"тепер називає неіснуюче віддалене посилання \"%s\""
#, c-format
msgid "No such remote: '%s'"
@@ -10262,17 +10751,20 @@ msgid ""
"\t%s\n"
"\tPlease update the configuration manually if necessary."
msgstr ""
+"Не оновлюється нестандартний визначник отримання посилань\n"
+"%s\n"
+"Будь ласка, за потреби оновіть конфігурацію вручну."
msgid "Renaming remote references"
-msgstr ""
+msgstr "Перейменування віддалених посилань"
#, c-format
msgid "deleting '%s' failed"
-msgstr ""
+msgstr "не вдалося видалити \"%s\""
#, c-format
msgid "creating '%s' failed"
-msgstr ""
+msgstr "не вдалося створити \"%s\""
msgid ""
"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n"
@@ -10281,8 +10773,14 @@ msgid_plural ""
"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
"to delete them, use:"
msgstr[0] ""
+"Примітка: гілка поза межами refs/remotes/ ієрархії не була видалена;\n"
+"щоб видалити її, скористайтесь:"
msgstr[1] ""
+"Примітка: деякі гілки поза межами refs/remotes/ ієрархії не були видалені;\n"
+"щоб видалити їх, скористайтесь:"
msgstr[2] ""
+"Примітка: деякі гілки поза межами refs/remotes/ ієрархії не були видалені;\n"
+"щоб видалити їх, скористайтесь:"
#, c-format
msgid "Could not remove config section '%s'"
@@ -10290,50 +10788,50 @@ msgstr "Не вдалося видалити секцію конфігураці
#, c-format
msgid " new (next fetch will store in remotes/%s)"
-msgstr ""
+msgstr " нова (наступне отримання зберігатиметься у віддалених remotes/%s)"
msgid " tracked"
msgstr " відстежується"
msgid " skipped"
-msgstr ""
+msgstr " пропущена"
msgid " stale (use 'git remote prune' to remove)"
-msgstr ""
+msgstr " застаріла (скористайтесь \"git remote prune\", щоб видалити)"
msgid " ???"
-msgstr ""
+msgstr " ???"
#, c-format
msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch"
-msgstr ""
+msgstr "неприпустиме branch.%s.merge; неможливо перебазувати на > 1 гілку"
#, c-format
msgid "rebases interactively onto remote %s"
-msgstr "перебазувати інтерактивно у віддалену %s"
+msgstr "перебазувати інтерактивно на віддалене призначення %s"
#, c-format
msgid "rebases interactively (with merges) onto remote %s"
-msgstr ""
+msgstr "перебазувати інтерактивно (зі злиттям) на віддалене призначення %s"
#, c-format
msgid "rebases onto remote %s"
-msgstr ""
+msgstr "перебазувати на віддалене призначення %s"
#, c-format
msgid " merges with remote %s"
-msgstr ""
+msgstr " зливається з віддаленим призначенням %s"
#, c-format
msgid "merges with remote %s"
-msgstr ""
+msgstr "зливається з віддаленим призначенням %s"
#, c-format
msgid "%-*s and with remote %s\n"
-msgstr ""
+msgstr "%-*s та з віддаленим призначенням %s\n"
msgid "create"
-msgstr ""
+msgstr "створити"
msgid "delete"
msgstr "видалити"
@@ -10342,40 +10840,40 @@ msgid "up to date"
msgstr "в актуальному стані"
msgid "fast-forwardable"
-msgstr ""
+msgstr "з можливістю перемотування вперед"
msgid "local out of date"
-msgstr ""
+msgstr "локальне сховище застаріло"
#, c-format
msgid " %-*s forces to %-*s (%s)"
-msgstr ""
+msgstr " %-*s примусово надіслати до %-*s (%s)"
#, c-format
msgid " %-*s pushes to %-*s (%s)"
-msgstr ""
+msgstr " %-*s надіслати до %-*s (%s)"
#, c-format
msgid " %-*s forces to %s"
-msgstr ""
+msgstr " %-*s примусово надіслати до %s"
#, c-format
msgid " %-*s pushes to %s"
-msgstr ""
+msgstr " %-*s надіслати до %s"
msgid "do not query remotes"
-msgstr ""
+msgstr "не запитувати віддалені призначення"
#, c-format
msgid "* remote %s"
-msgstr ""
+msgstr "* віддалене %s"
#, c-format
msgid " Fetch URL: %s"
-msgstr ""
+msgstr " URL-адреса отримання: %s"
msgid "(no URL)"
-msgstr ""
+msgstr "(без URL-адреси)"
#. TRANSLATORS: the colon ':' should align
#. with the one in " Fetch URL: %s"
@@ -10384,14 +10882,14 @@ msgstr ""
#, c-format
msgid " Push URL: %s"
-msgstr ""
+msgstr " URL-адреса надсилання: %s"
#, c-format
msgid " HEAD branch: %s"
msgstr " HEAD гілка: %s"
msgid "(not queried)"
-msgstr ""
+msgstr "(не запитувалось)"
msgid "(unknown)"
msgstr "(невідомо)"
@@ -10400,6 +10898,7 @@ msgstr "(невідомо)"
msgid ""
" HEAD branch (remote HEAD is ambiguous, may be one of the following):\n"
msgstr ""
+" HEAD гілка (віддалений HEAD неоднозначний, може бути одним з наступних):\n"
#, c-format
msgid " Remote branch:%s"
@@ -10409,16 +10908,16 @@ msgstr[1] " Віддалені гілки:%s"
msgstr[2] " Віддалених гілок:%s"
msgid " (status not queried)"
-msgstr ""
+msgstr " (статус не запитувався)"
msgid " Local branch configured for 'git pull':"
msgid_plural " Local branches configured for 'git pull':"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] " Локальну гілку налаштовано на \"git pull\":"
+msgstr[1] " Локальні гілки налаштовано на \"git pull\":"
+msgstr[2] " Локальних гілок налаштовано на \"git pull\":"
msgid " Local refs will be mirrored by 'git push'"
-msgstr ""
+msgstr " Локальні посилання будуть віддзеркалені за допомогою \"git push\""
#, c-format
msgid " Local ref configured for 'git push'%s:"
@@ -10429,15 +10928,18 @@ msgstr[2] " Локальних посилань налаштовано для \
msgid "set refs/remotes/<name>/HEAD according to remote"
msgstr ""
+"встановити refs/remotes/<назва>/HEAD відповідно до віддаленого призначення"
msgid "delete refs/remotes/<name>/HEAD"
-msgstr ""
+msgstr "видалити refs/remotes/<назва>/HEAD"
msgid "Cannot determine remote HEAD"
-msgstr ""
+msgstr "Не вдалося визначити віддалений HEAD"
msgid "Multiple remote HEAD branches. Please choose one explicitly with:"
msgstr ""
+"Існує кілька віддалених HEAD гілок. Будь ласка, виберіть одну з них, "
+"скориставшись:"
#, c-format
msgid "Could not delete %s"
@@ -10453,11 +10955,11 @@ msgstr "Не вдалося налаштувати %s"
#, c-format
msgid " %s will become dangling!"
-msgstr ""
+msgstr " %s стануть висячими!"
#, c-format
msgid " %s has become dangling!"
-msgstr ""
+msgstr " %s став висячим!"
#, c-format
msgid "Pruning %s"
@@ -10465,18 +10967,18 @@ msgstr "Видалення %s"
#, c-format
msgid "URL: %s"
-msgstr ""
+msgstr "URL-адреса: %s"
#, c-format
msgid " * [would prune] %s"
-msgstr ""
+msgstr " * [буде видалено] %s"
#, c-format
msgid " * [pruned] %s"
-msgstr ""
+msgstr " * [видалено] %s"
msgid "prune remotes after fetching"
-msgstr ""
+msgstr "видалити віддалені призначення після отримання"
#, c-format
msgid "No such remote '%s'"
@@ -10486,23 +10988,23 @@ msgid "add branch"
msgstr "додати гілку"
msgid "no remote specified"
-msgstr ""
+msgstr "віддалене призначення не вказано"
msgid "query push URLs rather than fetch URLs"
-msgstr ""
+msgstr "запитувати URL-адреси надсилань замість URL-адрес отримання"
msgid "return all URLs"
-msgstr ""
+msgstr "повернути всі URL-адреси"
#, c-format
msgid "no URLs configured for remote '%s'"
msgstr "не налаштовано URL-адреси для віддаленого \"%s\""
msgid "manipulate push URLs"
-msgstr ""
+msgstr "маніпулювати URL-адресами надсилання"
msgid "add URL"
-msgstr ""
+msgstr "додати URL-адресу"
msgid "delete URLs"
msgstr "видалити URL-адреси"
@@ -10512,17 +11014,17 @@ msgstr "--add --delete не має сенсу"
#, c-format
msgid "Invalid old URL pattern: %s"
-msgstr ""
+msgstr "Неприпустимий шаблон старої URL-адреси: %s"
#, c-format
msgid "No such URL found: %s"
-msgstr ""
+msgstr "Такої URL-адреси не знайдено: %s"
msgid "Will not delete all non-push URLs"
-msgstr ""
+msgstr "Не видалятиме всі URL-адреси, що не є призначенням надсилань"
msgid "be verbose; must be placed before a subcommand"
-msgstr ""
+msgstr "розгорнутий вивід; має стояти перед підкомандою"
msgid "git repack [<options>]"
msgstr "git repack [<опції>]"
@@ -10531,15 +11033,20 @@ msgid ""
"Incremental repacks are incompatible with bitmap indexes. Use\n"
"--no-write-bitmap-index or disable the pack.writeBitmaps configuration."
msgstr ""
+"Поступові перепакування несумісні з bitmap індексами. Скористайтесь "
+"параметром\n"
+"--no-write-bitmap-index або вимкніть конфігурацію pack.writeBitmaps."
msgid "could not start pack-objects to repack promisor objects"
-msgstr ""
+msgstr "не вдалося розпочати pack-objects для перепакування promisor обʼєктів"
msgid "repack: Expecting full hex object ID lines only from pack-objects."
msgstr ""
+"перепакування: очікуються повні рядки hex ідентифікаторів обʼєктів тільки "
+"від pack-objects."
msgid "could not finish pack-objects to repack promisor objects"
-msgstr ""
+msgstr "не вдалося завершити pack-objects для перепакування promisor обʼєктів"
#, c-format
msgid "cannot open index for %s"
@@ -10547,103 +11054,104 @@ msgstr "неможливо відкрити індекс для %s"
#, c-format
msgid "pack %s too large to consider in geometric progression"
-msgstr ""
+msgstr "пакунок %s занадто великий, щоб враховувати в геометричній прогресії"
#, c-format
msgid "pack %s too large to roll up"
-msgstr ""
+msgstr "пакунок %s занадто великий для згортання"
#, c-format
msgid "could not open tempfile %s for writing"
-msgstr ""
+msgstr "не вдалося відкрити тимчасовий файл %s для запису"
msgid "could not close refs snapshot tempfile"
-msgstr ""
+msgstr "не вдалося закрити тимчасовий файл знімка посилань"
#, c-format
msgid "could not remove stale bitmap: %s"
msgstr "не вдалося видалити застарілий bitmap: %s"
msgid "pack everything in a single pack"
-msgstr ""
+msgstr "запакувати все в один пакунок"
msgid "same as -a, and turn unreachable objects loose"
-msgstr ""
+msgstr "те саме, що й -a, та звільняє недосяжні обʼєкти"
msgid "same as -a, pack unreachable cruft objects separately"
-msgstr ""
+msgstr "те саме, що й -a, пакує недосяжні марні обʼєкти окремо"
msgid "approxidate"
-msgstr ""
+msgstr "приблизна дата"
msgid "with --cruft, expire objects older than this"
-msgstr ""
+msgstr "з --cruft видалити обʼєкти, старіші за цей термін"
msgid "remove redundant packs, and run git-prune-packed"
-msgstr ""
+msgstr "видалити зайві пакунки і запустити git-prune-packed"
msgid "pass --no-reuse-delta to git-pack-objects"
-msgstr ""
+msgstr "передати --no-reuse-delta до git-pack-objects"
msgid "pass --no-reuse-object to git-pack-objects"
-msgstr ""
+msgstr "передати --no-reuse-object до git-pack-objects"
msgid "do not run git-update-server-info"
-msgstr ""
+msgstr "не запускати git-update-server-info"
msgid "pass --local to git-pack-objects"
-msgstr ""
+msgstr "передати --local до git-pack-objects"
msgid "write bitmap index"
msgstr "записати bitmap індекс"
msgid "pass --delta-islands to git-pack-objects"
-msgstr ""
+msgstr "передати --delta-islands до git-pack-objects"
msgid "with -A, do not loosen objects older than this"
-msgstr ""
+msgstr "з -A, не послабляти обʼєкти, старіші за це значення"
msgid "with -a, repack unreachable objects"
-msgstr ""
+msgstr "з -a, перепакувати недоступні обʼєкти"
msgid "size of the window used for delta compression"
-msgstr ""
+msgstr "розмір вікна, що використовується для дельта компресії"
msgid "bytes"
-msgstr ""
+msgstr "байти"
msgid "same as the above, but limit memory size instead of entries count"
msgstr ""
+"те саме, що й вище, але обмежує розмір памʼяті замість кількості записів"
msgid "limits the maximum delta depth"
-msgstr ""
+msgstr "обмежує максимальну глибину дельти"
msgid "limits the maximum number of threads"
-msgstr ""
+msgstr "обмежує максимальну кількість потоків"
msgid "maximum size of each packfile"
-msgstr ""
+msgstr "максимальний розмір кожного файла пакунка"
msgid "repack objects in packs marked with .keep"
-msgstr ""
+msgstr "перепакувати обʼєкти в пакунках, позначених .keep"
msgid "do not repack this pack"
-msgstr ""
+msgstr "не перепаковувати цей пакунок"
msgid "find a geometric progression with factor <N>"
-msgstr ""
+msgstr "знайти геометричну прогресію з фактором <Н>"
msgid "write a multi-pack index of the resulting packs"
-msgstr ""
+msgstr "записати multi-pack-index результуючих пакунків"
msgid "pack prefix to store a pack containing pruned objects"
-msgstr ""
+msgstr "префікс пакунка для зберігання пакунка з обрізаними обʼєктами"
msgid "cannot delete packs in a precious-objects repo"
-msgstr ""
+msgstr "неможливо видалити пакунки в precious-objects сховищі"
msgid "Nothing new to pack."
-msgstr ""
+msgstr "Немає нічого нового для пакування."
#, c-format
msgid "pack prefix %s does not begin with objdir %s"
@@ -10651,44 +11159,46 @@ msgstr "префікс пакунку %s не починається з objdir %
#, c-format
msgid "renaming pack to '%s' failed"
-msgstr ""
+msgstr "перейменування пакунка на \"%s\" завершилося невдало"
#, c-format
msgid "pack-objects did not write a '%s' file for pack %s-%s"
-msgstr ""
+msgstr "pack-objects не записав файл \"%s\" для пакунка %s-%s"
#, c-format
msgid "could not unlink: %s"
-msgstr "не вдалося відʼєднати %s"
+msgstr "не вдалося видалити: %s"
msgid "git replace [-f] <object> <replacement>"
-msgstr ""
+msgstr "git replace [-f] <обʼєкт> <заміна>"
msgid "git replace [-f] --edit <object>"
-msgstr ""
+msgstr "git replace [-f] --edit <обʼєкт>"
msgid "git replace [-f] --graft <commit> [<parent>...]"
-msgstr ""
+msgstr "git replace [-f] --graft <коміт> [<батько>...]"
msgid "git replace -d <object>..."
-msgstr ""
+msgstr "git replace -d <обʼєкт>..."
msgid "git replace [--format=<format>] [-l [<pattern>]]"
-msgstr ""
+msgstr "git replace [--format=<формат>] [-l [<шаблон>]]"
#, c-format
msgid ""
"invalid replace format '%s'\n"
"valid formats are 'short', 'medium' and 'long'"
msgstr ""
+"невірний формат заміни \"%s\"\n"
+"допустимі формати \"short\", \"medium\" та \"long\""
#, c-format
msgid "replace ref '%s' not found"
-msgstr ""
+msgstr "заміна посилання \"%s\" не знайдена"
#, c-format
msgid "Deleted replace ref '%s'"
-msgstr ""
+msgstr "Видалена заміна посилання \"%s\""
#, c-format
msgid "'%s' is not a valid ref name"
@@ -10696,7 +11206,7 @@ msgstr "\"%s\" не є припустимою назвою посилання"
#, c-format
msgid "replace ref '%s' already exists"
-msgstr "змінний ref \"%s\" вже існує"
+msgstr "заміна посилання \"%s\" вже існує"
#, c-format
msgid ""
@@ -10704,13 +11214,16 @@ msgid ""
"'%s' points to a replaced object of type '%s'\n"
"while '%s' points to a replacement object of type '%s'."
msgstr ""
+"Обʼєкти повинні бути одного типу.\n"
+"\"%s\" вказує на замінений обʼєкт типу \"%s\", \n"
+"тоді як \"%s\" вказує на обʼєкт заміни типу \"%s\"."
#, c-format
msgid "unable to open %s for writing"
msgstr "не вдалося відкрити %s для запису"
msgid "cat-file reported failure"
-msgstr ""
+msgstr "cat-file повідомила про збій"
#, c-format
msgid "unable to open %s for reading"
@@ -10723,7 +11236,7 @@ msgid "unable to read from mktree"
msgstr "не вдалося прочитати з mktree"
msgid "mktree reported failure"
-msgstr ""
+msgstr "mktree повідомила про збій"
msgid "mktree did not return an object name"
msgstr "mktree не повернув назву обʼєкта"
@@ -10740,11 +11253,11 @@ msgid "unable to get object type for %s"
msgstr "не вдалося отримати тип обʼєкта для %s"
msgid "editing object file failed"
-msgstr ""
+msgstr "редагування файла обʼєкта завершилося невдало"
#, c-format
msgid "new object is the same as the old one: '%s'"
-msgstr ""
+msgstr "новий обʼєкт такий самий, як і старий: \"%s\""
#, c-format
msgid "could not parse %s as a commit"
@@ -10752,24 +11265,26 @@ msgstr "не вдалося розібрати %s як коміт"
#, c-format
msgid "bad mergetag in commit '%s'"
-msgstr "неправильний mergetag в коміті \"%s\""
+msgstr "невірний mergetag в коміті \"%s\""
#, c-format
msgid "malformed mergetag in commit '%s'"
-msgstr ""
+msgstr "невірно сформований тег злиття у коміті \"%s\""
#, c-format
msgid ""
"original commit '%s' contains mergetag '%s' that is discarded; use --edit "
"instead of --graft"
msgstr ""
+"початковий коміт \"%s\" містить тег злиття \"%s\", який було відкинуто; "
+"скористайтесь --edit замість --graft"
#, c-format
msgid "the original commit '%s' has a gpg signature"
-msgstr ""
+msgstr "оригінальний коміт \"%s\" має підпис gpg"
msgid "the signature will be removed in the replacement commit!"
-msgstr ""
+msgstr "підпис буде видалено в коміті заміни!"
#, c-format
msgid "could not write replacement commit for: '%s'"
@@ -10777,38 +11292,40 @@ msgstr "не вдалося записати коміт заміни для: \"%
#, c-format
msgid "graft for '%s' unnecessary"
-msgstr ""
+msgstr "прищепа для \"%s\" не потрібна"
#, c-format
msgid "new commit is the same as the old one: '%s'"
-msgstr ""
+msgstr "новий коміт такий самий, як і старий: \"%s\""
#, c-format
msgid ""
"could not convert the following graft(s):\n"
"%s"
msgstr ""
+"не вдалося конвертувати наступні прищепи:\n"
+"%s"
msgid "list replace refs"
-msgstr ""
+msgstr "показати заміни посилань"
msgid "delete replace refs"
-msgstr "видалити змінні посилання"
+msgstr "видалити заміни посиланнь"
msgid "edit existing object"
msgstr "редагувати існуючий обʼєкт"
msgid "change a commit's parents"
-msgstr ""
+msgstr "змінити батьків коміту"
msgid "convert existing graft file"
-msgstr ""
+msgstr "конвертувати існуючий файл щеплення"
msgid "replace the ref if it exists"
-msgstr ""
+msgstr "замінити посилання, якщо воно існує"
msgid "do not pretty-print contents for --edit"
-msgstr ""
+msgstr "не прикрашати вивід вмісту для --edit"
msgid "use this format"
msgstr "використати цей формат"
@@ -10817,38 +11334,40 @@ msgid "--format cannot be used when not listing"
msgstr "--format не можна використовувати без list"
msgid "-f only makes sense when writing a replacement"
-msgstr ""
+msgstr "-f має сенс тільки при записі заміни"
msgid "--raw only makes sense with --edit"
-msgstr ""
+msgstr "--raw має сенс тільки з --edit"
msgid "-d needs at least one argument"
-msgstr ""
+msgstr "-d потребує принаймні одного аргументу"
msgid "bad number of arguments"
-msgstr ""
+msgstr "невірна кількість аргументів"
msgid "-e needs exactly one argument"
-msgstr ""
+msgstr "-e потребує лишень один аргумент"
msgid "-g needs at least one argument"
-msgstr ""
+msgstr "-g потребує принаймні одного аргументу"
msgid "--convert-graft-file takes no argument"
-msgstr ""
+msgstr "--convert-graft-file не потребує аргументів"
msgid "only one pattern can be given with -l"
-msgstr ""
+msgstr "тільки один шаблон може бути заданий з -l"
msgid ""
"git rerere [clear | forget <pathspec>... | diff | status | remaining | gc]"
msgstr ""
+"git rerere [clear | forget <визначник-шляху>... | diff | status | remaining "
+"| gc]"
msgid "register clean resolutions in index"
-msgstr ""
+msgstr "зареєструвати чисті вирішення в індексі"
msgid "'git rerere forget' without paths is deprecated"
-msgstr ""
+msgstr "команда \"git rerere forget\" без шляхів застаріла"
#, c-format
msgid "unable to generate diff for '%s'"
@@ -10860,17 +11379,17 @@ msgstr ""
"git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]"
msgid "git reset [-q] [<tree-ish>] [--] <pathspec>..."
-msgstr "git reset [-q] [<деревоподібне джерело>] [--] <визначник шляху>..."
+msgstr "git reset [-q] [<деревоподібне-джерело>] [--] <визначник шляху>..."
msgid ""
"git reset [-q] [--pathspec-from-file [--pathspec-file-nul]] [<tree-ish>]"
msgstr ""
-"git reset [-q] [--pathspec-from-file [--pathspec-file-nul]] [<деревоподібне "
+"git reset [-q] [--pathspec-from-file [--pathspec-file-nul]] [<деревоподібне-"
"джерело>]"
msgid "git reset --patch [<tree-ish>] [--] [<pathspec>...]"
msgstr ""
-"git reset --patch [<деревоподібне джерело>] [--] [<визначник шляху>...]"
+"git reset --patch [<деревоподібне-джерело>] [--] [<визначник шляху>...]"
msgid "mixed"
msgstr "змішане"
@@ -10973,9 +11492,10 @@ msgstr "не вдалося отримати дані про використа
#, c-format
msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
msgstr ""
+"неприпустиме значення для \"%s\": \"%s\", єдиним допустимим форматом є \"%s\""
msgid "rev-list does not support display of notes"
-msgstr ""
+msgstr "rev-list не підтримує відображення нотаток"
#, c-format
msgid "marked counting and '%s' cannot be used together"
@@ -10985,25 +11505,25 @@ msgid "git rev-parse --parseopt [<options>] -- [<args>...]"
msgstr "git rev-parse --parseopt [<опції>] -- [<аргументи>...]"
msgid "keep the `--` passed as an arg"
-msgstr ""
+msgstr "залишити \"--\" переданим як аргумент"
msgid "stop parsing after the first non-option argument"
-msgstr ""
+msgstr "зупинити розбір після першого неопціонального аргументу"
msgid "output in stuck long form"
-msgstr ""
+msgstr "виведення в застряглій довгій формі"
msgid "premature end of input"
msgstr "передчасне закінчення вхідних даних"
msgid "no usage string given before the `--' separator"
-msgstr ""
+msgstr "не вказана строка використання перед \"--\" розділювачем"
msgid "missing opt-spec before option flags"
-msgstr ""
+msgstr "відсутній opt-spec перед прапорцями опції"
msgid "Needed a single revision"
-msgstr ""
+msgstr "Необхідна одна ревізія"
msgid ""
"git rev-parse --parseopt [<options>] -- [<args>...]\n"
@@ -11012,133 +11532,147 @@ msgid ""
"\n"
"Run \"git rev-parse --parseopt -h\" for more information on the first usage."
msgstr ""
+"git rev-parse --parseopt [<опції>] -- [<аргументи>...]\n"
+" або: git rev-parse --sq-quote [<аргумент>...]\n"
+" або: git rev-parse [<опції>] [<аргумент>...]\n"
+"\n"
+"Запустіть \"git rev-parse --parseopt -h\" для отримання додаткової "
+"інформації про перше використання."
msgid "--resolve-git-dir requires an argument"
-msgstr ""
+msgstr "--resolve-git-dir потребує аргументу"
#, c-format
msgid "not a gitdir '%s'"
-msgstr ""
+msgstr "не є git директорією \"%s\""
msgid "--git-path requires an argument"
-msgstr ""
+msgstr "--git-path потребує аргументу"
msgid "-n requires an argument"
-msgstr "-n потребує аргумент"
+msgstr "-n потребує аргументу"
msgid "--path-format requires an argument"
-msgstr ""
+msgstr "--path-format потребує аргументу"
#, c-format
msgid "unknown argument to --path-format: %s"
-msgstr ""
+msgstr "невідомий аргумент до --path-format: %s"
msgid "--default requires an argument"
-msgstr ""
+msgstr "--default потребує аргументу"
msgid "--prefix requires an argument"
-msgstr ""
+msgstr "--prefix потребує аргументу"
#, c-format
msgid "unknown mode for --abbrev-ref: %s"
-msgstr ""
+msgstr "невідомий режим для --abbrev-ref: %s"
msgid "--exclude-hidden cannot be used together with --branches"
-msgstr "--exclude-hidden неможливо використати разом з --branches"
+msgstr "--exclude-hidden не можна використовувати разом з --branches"
msgid "--exclude-hidden cannot be used together with --tags"
-msgstr ""
+msgstr "--exclude-hidden неможливо використовувати разом з --tags"
msgid "--exclude-hidden cannot be used together with --remotes"
-msgstr ""
+msgstr "--exclude-hidden неможливо використовувати разом з --remotes"
msgid "this operation must be run in a work tree"
-msgstr ""
+msgstr "цю операцію треба виконувати в робочому дереві"
#, c-format
msgid "unknown mode for --show-object-format: %s"
-msgstr ""
+msgstr "невідомий режим для --show-object-format: %s"
msgid ""
"git revert [--[no-]edit] [-n] [-m <parent-number>] [-s] [-S[<keyid>]] "
"<commit>..."
msgstr ""
+"git revert [--[no-]edit] [-n] [-m <номер-батька>] [-s] [-S[<ідентифікатор-"
+"ключа>]] <коміт>..."
msgid "git revert (--continue | --skip | --abort | --quit)"
-msgstr ""
+msgstr "git revert (--continue | --skip | --abort | --quit)"
msgid ""
"git cherry-pick [--edit] [-n] [-m <parent-number>] [-s] [-x] [--ff]\n"
" [-S[<keyid>]] <commit>..."
msgstr ""
+"git cherry-pick [--edit] [-n] [-m <номер-батька>] [-s] [-x] [--ff].\n"
+" [-S[<ідентифікатор-ключа>]] <коміт>..."
msgid "git cherry-pick (--continue | --skip | --abort | --quit)"
msgstr "git cherry-pick (--continue | --skip | --abort | --quit)"
#, c-format
msgid "option `%s' expects a number greater than zero"
-msgstr ""
+msgstr "опція \"%s\" очікує число більше нуля"
#, c-format
msgid "%s: %s cannot be used with %s"
msgstr "%s: %s неможливо використовувати з %s"
msgid "end revert or cherry-pick sequence"
-msgstr ""
+msgstr "завершити процес вивертання або висмикування"
msgid "resume revert or cherry-pick sequence"
-msgstr ""
+msgstr "відновити процес вивертання або висмикування"
msgid "cancel revert or cherry-pick sequence"
-msgstr ""
+msgstr "скасувати процес вивертання або висмикування"
msgid "skip current commit and continue"
-msgstr ""
+msgstr "пропустити поточний коміт і продовжити"
msgid "don't automatically commit"
msgstr "не комітити автоматично"
msgid "edit the commit message"
-msgstr ""
+msgstr "редагувати допис до коміту"
msgid "parent-number"
-msgstr ""
+msgstr "номер батька"
msgid "select mainline parent"
-msgstr ""
+msgstr "вибрати основну батьківську лінію"
msgid "merge strategy"
-msgstr ""
+msgstr "стратегія злиття"
msgid "option for merge strategy"
msgstr "опція для стратегії злиття"
msgid "append commit name"
-msgstr ""
+msgstr "додати назву коміту"
msgid "preserve initially empty commits"
-msgstr ""
+msgstr "зберігати первинно порожні коміти"
msgid "allow commits with empty messages"
-msgstr ""
+msgstr "дозволити коміти з порожніми дописами"
msgid "keep redundant, empty commits"
-msgstr ""
+msgstr "зберігати зайві порожні коміти"
msgid "use the 'reference' format to refer to commits"
-msgstr ""
+msgstr "використовувати \"reference\" формат для посилань на коміти"
msgid "revert failed"
msgstr "вивертання не вдалося"
msgid "cherry-pick failed"
-msgstr ""
+msgstr "висмикування не вдалося"
msgid ""
"git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]\n"
" [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
" [--] [<pathspec>...]"
msgstr ""
+"git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--ignore-"
+"unmatch\n"
+" [--quiet] [--pathspec-from-file=<файл> [--pathspec-file-nul]]\n"
+" [--] [<визначник-шляху>...]"
msgid ""
"the following file has staged content different from both the\n"
@@ -11147,24 +11681,34 @@ msgid_plural ""
"the following files have staged content different from both the\n"
"file and the HEAD:"
msgstr[0] ""
+"наступний файл має доданий до індексу вміст, відмінний як від файла\n"
+"так й від HEAD:"
msgstr[1] ""
+"наступні файли мають доданий до індексу вміст, відмінний як від файла\n"
+"так й від HEAD:"
msgstr[2] ""
+"наступні файли мають доданий до індексу вміст, відмінний як від файла\n"
+"так й від HEAD:"
msgid ""
"\n"
"(use -f to force removal)"
msgstr ""
+"\n"
+"(використовуйте -f щоб видалити примусово)"
msgid "the following file has changes staged in the index:"
msgid_plural "the following files have changes staged in the index:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "у наступному файлі є зміни, додані до індексу:"
+msgstr[1] "у наступних файлах є зміни, додані до індексу:"
+msgstr[2] "у наступних файлах є зміни, додані до індексу:"
msgid ""
"\n"
"(use --cached to keep the file, or -f to force removal)"
msgstr ""
+"\n"
+"(використовуйте --cached, щоб зберегти файл, або -f, щоб видалити примусово)"
msgid "the following file has local modifications:"
msgid_plural "the following files have local modifications:"
@@ -11173,29 +11717,30 @@ msgstr[1] "наступні файли мають локальні зміни:"
msgstr[2] "наступних файлів мають локальні зміни:"
msgid "do not list removed files"
-msgstr ""
+msgstr "не показувати видалені файли"
msgid "only remove from the index"
msgstr "видалити тільки з індексу"
msgid "override the up-to-date check"
-msgstr ""
+msgstr "перевизначити перевірку на актуальність"
msgid "allow recursive removal"
-msgstr ""
+msgstr "дозволити рекурсивне видалення"
msgid "exit with a zero status even if nothing matched"
-msgstr ""
+msgstr "виходити з нульовим статусом, навіть якщо нічого не збігається"
msgid "No pathspec was given. Which files should I remove?"
-msgstr ""
+msgstr "Не було вказано визначник шляху. Які файли слід видалити?"
msgid "please stage your changes to .gitmodules or stash them to proceed"
msgstr ""
+"будь ласка, додайте ваші зміни до .gitmodules або схову, щоб продовжити"
#, c-format
msgid "not removing '%s' recursively without -r"
-msgstr ""
+msgstr "не видалено \"%s\" рекурсивно без -r"
#, c-format
msgid "git rm: unable to remove %s"
@@ -11208,6 +11753,11 @@ msgid ""
" [--[no-]signed | --signed=(true|false|if-asked)]\n"
" [<host>:]<directory> (--all | <ref>...)"
msgstr ""
+"git send-pack [--mirror] [--dry-run] [--force]\n"
+" [--receive-pack=<git-пакунок-отримання>]\n"
+" [--verbose] [--thin] [--atomic]\n"
+" [--[no-]signed | --signed=(true|false|if-asked)]\n"
+" [<хост>:]<директорія> (--all | <посилання>...)"
msgid "remote name"
msgstr "віддалена назва"
@@ -11216,57 +11766,57 @@ msgid "push all refs"
msgstr "надіслати всі посилання"
msgid "use stateless RPC protocol"
-msgstr ""
+msgstr "використовувати протокол RPC без збереження стану"
msgid "read refs from stdin"
-msgstr ""
+msgstr "прочитати посилання з stdin"
msgid "print status from remote helper"
-msgstr ""
+msgstr "вивести статус з віддаленого помічника"
msgid "git shortlog [<options>] [<revision-range>] [[--] <path>...]"
msgstr "git shortlog [<опції>] [<діапазон-ревізій>] [[--] <шлях>...]"
msgid "git log --pretty=short | git shortlog [<options>]"
-msgstr ""
+msgstr "git log --pretty=short | git shortlog [<опції>]"
msgid "using multiple --group options with stdin is not supported"
-msgstr ""
+msgstr "використання кількох --group опцій з stdin не підтримується"
#, c-format
msgid "using %s with stdin is not supported"
-msgstr ""
+msgstr "використання %s з stdin не підтримується"
#, c-format
msgid "unknown group type: %s"
msgstr "невідомий тип групи: %s"
msgid "group by committer rather than author"
-msgstr ""
+msgstr "групувати за комітером, а не за автором"
msgid "sort output according to the number of commits per author"
-msgstr ""
+msgstr "сортувати виведення за кількістю комітів на автора"
msgid "suppress commit descriptions, only provides commit count"
-msgstr ""
+msgstr "приховати описи комітів, показати лише кількість комітів"
msgid "show the email address of each author"
-msgstr ""
+msgstr "показати адресу електронної пошти кожного автора"
msgid "<w>[,<i1>[,<i2>]]"
-msgstr ""
+msgstr "<w>[,<i1>[,<i2>]]"
msgid "linewrap output"
msgstr "обгортати рядки виводу"
msgid "field"
-msgstr ""
+msgstr "поле"
msgid "group by field"
-msgstr ""
+msgstr "групувати за полем"
msgid "too many arguments given outside repository"
-msgstr ""
+msgstr "занадто багато аргументів надано поза сховищем"
msgid ""
"git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
@@ -11275,35 +11825,40 @@ msgid ""
" [--no-name | --sha1-name] [--topics]\n"
" [(<rev> | <glob>)...]"
msgstr ""
+"git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
+" [--current] [--color[=<коли>] | --no-color] [--sparse]\n"
+" [--more=<н> | --list | --independent | --merge-base]\n"
+" [--no-name | --sha1-name] [--topics]\n"
+" [(<ревізія> | <глоб>)...]"
msgid "git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"
-msgstr ""
+msgstr "git show-branch (-g | --reflog)[=<н>[,<база>]] [--list] [<посилання>]"
#, c-format
msgid "ignoring %s; cannot handle more than %d ref"
msgid_plural "ignoring %s; cannot handle more than %d refs"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "ігнорування %s; неможливо обробити більше %d посилання"
+msgstr[1] "ігнорування %s; неможливо обробити більше %d посилань"
+msgstr[2] "ігнорування %s; неможливо обробити більше %d посилань"
#, c-format
msgid "no matching refs with %s"
-msgstr ""
+msgstr "немає співпадаючих посилань з %s"
msgid "show remote-tracking and local branches"
-msgstr ""
+msgstr "показати віддалено відстежувані та локальні гілки"
msgid "show remote-tracking branches"
msgstr "показати віддалено відстежувані гілки"
msgid "color '*!+-' corresponding to the branch"
-msgstr ""
+msgstr "колір \"*!+-\" відповідно на гілку"
msgid "show <n> more commits after the common ancestor"
-msgstr ""
+msgstr "показати ще <н> комітів після спільного предка"
msgid "synonym to more=-1"
-msgstr ""
+msgstr "синонім до more=-1"
msgid "suppress naming strings"
msgstr "не показувати назву"
@@ -11312,34 +11867,34 @@ msgid "include the current branch"
msgstr "включити поточну гілку"
msgid "name commits with their object names"
-msgstr ""
+msgstr "називати коміти за іменами обʼєктів"
msgid "show possible merge bases"
-msgstr ""
+msgstr "показати можливі бази злиття"
msgid "show refs unreachable from any other ref"
-msgstr ""
+msgstr "показати посилання, недосяжні з жодного іншого посилання"
msgid "show commits in topological order"
-msgstr ""
+msgstr "показати коміти в топологічному порядку"
msgid "show only commits not on the first branch"
-msgstr ""
+msgstr "показати лише коміти не з найпершої гілки"
msgid "show merges reachable from only one tip"
-msgstr ""
+msgstr "показати злиття досяжні лише з однієї верхівки"
msgid "topologically sort, maintaining date order where possible"
-msgstr ""
+msgstr "сортувати топологічно, зберігаючи порядок дат, якщо це можливо"
msgid "<n>[,<base>]"
-msgstr ""
+msgstr "<н>[,<база>]"
msgid "show <n> most recent ref-log entries starting at base"
-msgstr ""
+msgstr "показати <н> останніх записів лога посилань, починаючи з бази"
msgid "no branches given, and HEAD is not valid"
-msgstr ""
+msgstr "не надано гілок, і HEAD не є дійсним"
msgid "--reflog option needs one branch name"
msgstr "--reflog потребує одну назву гілки"
@@ -11347,9 +11902,9 @@ msgstr "--reflog потребує одну назву гілки"
#, c-format
msgid "only %d entry can be shown at one time."
msgid_plural "only %d entries can be shown at one time."
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "одночасно може бути показаний лише %d запис."
+msgstr[1] "одночасно можуть бути показані лише %d записи."
+msgstr[2] "одночасно можуть бути показані лише %d записів."
#, c-format
msgid "no such ref %s"
@@ -11358,9 +11913,9 @@ msgstr "немає такого посилання %s"
#, c-format
msgid "cannot handle more than %d rev."
msgid_plural "cannot handle more than %d revs."
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "неможливо обробити більше %d ревізії."
+msgstr[1] "неможливо обробити більше %d ревізій."
+msgstr[2] "неможливо обробити більше %d ревізій."
#, c-format
msgid "'%s' is not a valid ref."
@@ -11368,7 +11923,7 @@ msgstr "\"%s\" не є припустимим посиланням."
#, c-format
msgid "cannot find commit %s (%s)"
-msgstr ""
+msgstr "не вдалося знайти коміт %s (%s)"
msgid "hash-algorithm"
msgstr "хеш-алгоритм"
@@ -11381,30 +11936,34 @@ msgid ""
" [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags]\n"
" [--heads] [--] [<pattern>...]"
msgstr ""
+"git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-d | --"
+"dereference]\n"
+" [-s | --hash[=<н>]] [--abbrev[=<н>]] [--tags]\n"
+" [--heads] [--] [<шаблон>...]"
msgid "git show-ref --exclude-existing[=<pattern>]"
-msgstr ""
+msgstr "git show-ref --exclude-existing[=<шаблон>]"
msgid "only show tags (can be combined with heads)"
-msgstr "показати тільки теги (можна комбінувати з heads)"
+msgstr "показати тільки теги (можна комбінувати з верхівками)"
msgid "only show heads (can be combined with tags)"
-msgstr "показати тільки верхівки (можна комбінувати з tags)"
+msgstr "показати тільки верхівки (можна комбінувати з тегами)"
msgid "stricter reference checking, requires exact ref path"
-msgstr ""
+msgstr "більш сувора перевірка посилань, потребує точного шляху до посилання"
msgid "show the HEAD reference, even if it would be filtered out"
-msgstr ""
+msgstr "показати HEAD посилання, навіть якщо воно було б відфільтроване"
msgid "dereference tags into object IDs"
msgstr "розіменувати теги в ідентифікатори обʼєктів"
msgid "only show SHA1 hash using <n> digits"
-msgstr ""
+msgstr "показати тільки SHA1 хеш з використанням <н> цифр"
msgid "do not print results to stdout (useful with --verify)"
-msgstr ""
+msgstr "не виводити результати у stdout (корисно з --verify)"
msgid "show refs from stdin that aren't in local repository"
msgstr "показати посилання з stdin, яких немає в локальному сховищі"
@@ -11413,25 +11972,31 @@ msgid ""
"git sparse-checkout (init | list | set | add | reapply | disable | check-"
"rules) [<options>]"
msgstr ""
+"git sparse-checkout (init | list | set | add | reapply | disable | check-"
+"rules) [<опції>]"
msgid "this worktree is not sparse"
-msgstr ""
+msgstr "це робоче дерево не є розрідженим"
msgid "this worktree is not sparse (sparse-checkout file may not exist)"
msgstr ""
+"це робоче дерево не є розрідженим (файл розрідженого переходу може не "
+"існувати)"
#, c-format
msgid ""
"directory '%s' contains untracked files, but is not in the sparse-checkout "
"cone"
msgstr ""
+"директорія \"%s\" містить невідстежувані файли, але не входить до конуса "
+"розрідженого переходу"
#, c-format
msgid "failed to remove directory '%s'"
msgstr "не вдалося видалити директорію \"%s\""
msgid "failed to create directory for sparse-checkout file"
-msgstr "не вдалося створити директорію для файлу часткового переходу"
+msgstr "не вдалося створити директорію для файлу розрідженого переходу"
msgid "failed to initialize worktree config"
msgstr "не вдалося ініціалізувати конфігурацію робочого дерева"
@@ -11440,10 +12005,10 @@ msgid "failed to modify sparse-index config"
msgstr "не вдалося змінити sparse-index конфігурацію"
msgid "initialize the sparse-checkout in cone mode"
-msgstr "ініціалізувати частковий перехід в режимі конуса"
+msgstr "ініціалізувати розріджений перехід в режимі конуса"
msgid "toggle the use of a sparse index"
-msgstr ""
+msgstr "перемкнути використання розрідженого індексу"
#, c-format
msgid "unable to create leading directories of %s"
@@ -11459,62 +12024,77 @@ msgstr "не вдалося нормалізувати шлях %s"
#, c-format
msgid "unable to unquote C-style string '%s'"
-msgstr ""
+msgstr "неможливо прибрати лапки з C-style строки \"%s\""
msgid "unable to load existing sparse-checkout patterns"
-msgstr "не вдалося завантажити існуючі шаблони часткових переходів"
+msgstr "не вдалося завантажити існуючі шаблони розріджених переходів"
msgid "existing sparse-checkout patterns do not use cone mode"
-msgstr ""
+msgstr "існуючі шаблони розрідженого переходу не використовують режим конуса"
msgid "please run from the toplevel directory in non-cone mode"
msgstr ""
+"будь ласка, запускайте з директорії верхнього рівня в не конусномі режимі"
msgid "specify directories rather than patterns (no leading slash)"
-msgstr ""
+msgstr "вказати директорії замість шаблонів (без першого слешу)"
msgid ""
"specify directories rather than patterns. If your directory starts with a "
"'!', pass --skip-checks"
msgstr ""
+"вказати директорії замість шаблонів. Якщо ваша директорія починається з \"!"
+"\", додайте --skip-checks"
msgid ""
"specify directories rather than patterns. If your directory really has any "
"of '*?[]\\' in it, pass --skip-checks"
msgstr ""
+"вказати директорії замість шаблонів. Якщо в назві вашої директорії дійсно є "
+"символи \"*?[]\\\", додайте --skip-checks"
#, c-format
msgid ""
"'%s' is not a directory; to treat it as a directory anyway, rerun with --"
"skip-checks"
msgstr ""
+"\"%s\" не є директорією; щоб вважати його директорією, повторіть запуск з --"
+"skip-checks"
#, c-format
msgid ""
"pass a leading slash before paths such as '%s' if you want a single file "
"(see NON-CONE PROBLEMS in the git-sparse-checkout manual)."
msgstr ""
+"додайте перший слеш перед такими шляхами, як \"%s\", якщо вам потрібен один "
+"файл (див. розділ НЕ КОНУСНІ ПРОБЛЕМИ у посібнику з git-sparse-checkout)."
msgid "git sparse-checkout add [--skip-checks] (--stdin | <patterns>)"
-msgstr ""
+msgstr "git sparse-checkout add [--skip-checks] (--stdin | <шаблони>)"
msgid ""
"skip some sanity checks on the given paths that might give false positives"
msgstr ""
+"пропустити деякі перевірки на заданих шляхах, які можуть давати хибні "
+"результати"
msgid "read patterns from standard in"
-msgstr ""
+msgstr "читати шаблони зі стандартного вводу"
msgid "no sparse-checkout to add to"
-msgstr ""
+msgstr "немає розрідженого переходу для додавання"
msgid ""
"git sparse-checkout set [--[no-]cone] [--[no-]sparse-index] [--skip-checks] "
"(--stdin | <patterns>)"
msgstr ""
+"git sparse-checkout set [--[no-]cone] [--[no-]sparse-index] [--skip-checks] "
+"(--stdin | <шаблони>)"
msgid "must be in a sparse-checkout to reapply sparsity patterns"
msgstr ""
+"має перебувати в розрідженому переході для повторного застосування шаблонів "
+"розрідженості"
msgid "error while refreshing working directory"
msgstr "помилка під час оновлення робочої директорії"
@@ -11523,12 +12103,16 @@ msgid ""
"git sparse-checkout check-rules [-z] [--skip-checks][--[no-]cone] [--rules-"
"file <file>]"
msgstr ""
+"git sparse-checkout check-rules [-z] [--skip-checks][--[no-]cone] [--rules-"
+"file <файл>]"
msgid "terminate input and output files by a NUL character"
-msgstr ""
+msgstr "завершити вхідні та вихідні файли символом NUL"
msgid "when used with --rules-file interpret patterns as cone mode patterns"
msgstr ""
+"при використанні з --rules-file інтерпретувати шаблони як шаблони конусного "
+"режиму"
msgid "use patterns in <file> instead of the current ones."
msgstr "використовувати шаблони з <file> замість поточних."
@@ -11540,21 +12124,23 @@ msgid ""
"git stash show [-u | --include-untracked | --only-untracked] [<diff-"
"options>] [<stash>]"
msgstr ""
+"git stash show [-u | --include-untracked | --only-untracked] [<опції-"
+"різниці>] [<схов>]"
msgid "git stash drop [-q | --quiet] [<stash>]"
-msgstr ""
+msgstr "git stash drop [-q | --quiet] [<схов>]"
msgid "git stash pop [--index] [-q | --quiet] [<stash>]"
-msgstr ""
+msgstr "git stash pop [--index] [-q | --quiet] [<схов>]"
msgid "git stash apply [--index] [-q | --quiet] [<stash>]"
-msgstr ""
+msgstr "git stash apply [--index] [-q | --quiet] [<схов>]"
msgid "git stash branch <branchname> [<stash>]"
-msgstr ""
+msgstr "git stash branch <назва-гілки> [<схов>]"
msgid "git stash store [(-m | --message) <message>] [-q | --quiet] <commit>"
-msgstr ""
+msgstr "git stash store [(-m | --message) <допис>] [-q | --quiet] <коміт>"
msgid ""
"git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q "
@@ -11564,15 +12150,24 @@ msgid ""
" [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
" [--] [<pathspec>...]]"
msgstr ""
+"git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q "
+"| --quiet]\n"
+" [-u | --include-untracked] [-a | --all] [(-m | --message) "
+"<допис>]\n"
+" [--pathspec-from-file=<файл> [--pathspec-file-nul]]\n"
+" [--] [<визначник-шляху>...]]"
msgid ""
"git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | "
"--quiet]\n"
" [-u | --include-untracked] [-a | --all] [<message>]"
msgstr ""
+"git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | "
+"--quiet]\n"
+" [-u | --include-untracked] [-a | --all] [<допис>]"
msgid "git stash create [<message>]"
-msgstr ""
+msgstr "git stash create [<допис>]"
#, c-format
msgid "'%s' is not a stash-like commit"
@@ -11580,17 +12175,17 @@ msgstr "\"%s\" не є сховоподібним комітом"
#, c-format
msgid "Too many revisions specified:%s"
-msgstr ""
+msgstr "Вказано забагато ревізій:%s"
msgid "No stash entries found."
-msgstr ""
+msgstr "Записи схова не знайдені."
#, c-format
msgid "%s is not a valid reference"
msgstr "%s не є припустимим посиланням"
msgid "git stash clear with arguments is unimplemented"
-msgstr ""
+msgstr "git stash clear з аргументами не реалізовано"
#, c-format
msgid ""
@@ -11598,6 +12193,9 @@ msgid ""
" %s -> %s\n"
" to make room.\n"
msgstr ""
+"ПОПЕРЕДЖЕННЯ: Невідстежуваний файл на шляху відстежуваного! Перейменування\n"
+" %s -> %s\n"
+" щоб звільнити місце.\n"
msgid "cannot apply a stash in the middle of a merge"
msgstr "неможливо застосувати схов посеред злиття"
@@ -11607,17 +12205,17 @@ msgid "could not generate diff %s^!."
msgstr "не вдалося згенерувати різницю %s^!."
msgid "conflicts in index. Try without --index."
-msgstr ""
+msgstr "конфлікти в індексі. Спробуйте без --index."
msgid "could not save index tree"
msgstr "не вдалося зберегти дерево індекса"
#, c-format
msgid "Merging %s with %s"
-msgstr ""
+msgstr "Злиття %s з %s"
msgid "Index was not unstashed."
-msgstr ""
+msgstr "Індекс не було вилучено зі схову."
msgid "could not restore untracked files from stash"
msgstr "не вдалося відновити невідстежувані файли зі схову"
@@ -11627,21 +12225,21 @@ msgstr "спроба відтворити індекс"
#, c-format
msgid "Dropped %s (%s)"
-msgstr ""
+msgstr "Скинуто %s (%s)"
#, c-format
msgid "%s: Could not drop stash entry"
-msgstr ""
+msgstr "%s: Не вдалося скинути запис схову"
#, c-format
msgid "'%s' is not a stash reference"
msgstr "\"%s\" не є посиланням схова"
msgid "The stash entry is kept in case you need it again."
-msgstr ""
+msgstr "Запис схову збережено на випадок, якщо він вам знову знадобиться."
msgid "No branch name specified"
-msgstr ""
+msgstr "Не вказана назва гілки"
msgid "failed to parse tree"
msgstr "не вдалося розібрати дерево"
@@ -11660,10 +12258,10 @@ msgid "Cannot update %s with %s"
msgstr "Неможливо оновити %s з %s"
msgid "stash message"
-msgstr ""
+msgstr "допис до запису схова"
msgid "\"git stash store\" requires one <commit> argument"
-msgstr ""
+msgstr "\"git stash store\" потребує одного <коміт> аргументу"
msgid "No staged changes"
msgstr "Немає індексованих змін"
@@ -11681,7 +12279,7 @@ msgid "Cannot save the untracked files"
msgstr "Неможливо зберегти невідстежувані файли"
msgid "Cannot save the current worktree state"
-msgstr ""
+msgstr "Не вдалося зберегти поточний стан робочого дерева"
msgid "Cannot save the current staged state"
msgstr "Неможливо зберегти поточний індексований стан"
@@ -11695,37 +12293,38 @@ msgstr ""
msgid "Can't use --staged and --include-untracked or --all at the same time"
msgstr ""
+"Не можна використовувати --staged і --include-untracked або --all одночасно"
msgid "Did you forget to 'git add'?"
-msgstr ""
+msgstr "Ви забули \"git add\"?"
msgid "No local changes to save"
-msgstr ""
+msgstr "Немає локальних змін для збереження"
msgid "Cannot initialize stash"
msgstr "Неможливо ініціалізувати схов"
msgid "Cannot save the current status"
-msgstr ""
+msgstr "Неможливо зберегти поточний стан"
#, c-format
msgid "Saved working directory and index state %s"
-msgstr ""
+msgstr "Збережено робочу директорію та стан індексу %s"
msgid "Cannot remove worktree changes"
-msgstr ""
+msgstr "Неможливо видалити зміни робочого дерева"
msgid "keep index"
-msgstr ""
+msgstr "зберегти індекс"
msgid "stash staged changes only"
-msgstr ""
+msgstr "додати до схову тільки індексовані зміни"
msgid "stash in patch mode"
-msgstr ""
+msgstr "додати до схову у режимі латання"
msgid "quiet mode"
-msgstr ""
+msgstr "тихий режим"
msgid "include untracked files in stash"
msgstr "в тому числі невідстежувані файли схову"
@@ -11734,38 +12333,42 @@ msgid "include ignore files"
msgstr "в тому числи файли ігнорування"
msgid "skip and remove all lines starting with comment character"
-msgstr ""
+msgstr "пропустити та видалити всі рядки, що починаються з символу коментаря"
msgid "prepend comment character and space to each line"
-msgstr ""
+msgstr "додати символ коментаря та пробіл до кожного рядка"
#, c-format
msgid "Expecting a full ref name, got %s"
-msgstr ""
+msgstr "Очікувалась повна назва посилання, отримано %s"
#, c-format
msgid "could not get a repository handle for submodule '%s'"
-msgstr ""
+msgstr "не вдалося отримати обʼєкт сховища для підмодуля \"%s\""
#, c-format
msgid ""
"could not look up configuration '%s'. Assuming this repository is its own "
"authoritative upstream."
msgstr ""
+"не вдалося знайти конфігурацію \"%s\". Мабуть, це сховище має власне "
+"першоджерельне сховище."
#, c-format
msgid "No url found for submodule path '%s' in .gitmodules"
-msgstr ""
+msgstr "Не знайдено URL для шляху підмодуля \"%s\" у .gitmodules"
#, c-format
msgid "Entering '%s'\n"
-msgstr ""
+msgstr "Введення \"%s\"\n"
#, c-format
msgid ""
"run_command returned non-zero status for %s\n"
"."
msgstr ""
+"run_command повернула ненульовий статус для %s\n"
+"."
#, c-format
msgid ""
@@ -11773,15 +12376,18 @@ msgid ""
"submodules of %s\n"
"."
msgstr ""
+"run_command повернула ненульовий статус під час рекурсії у вкладених "
+"підмодулях %s\n"
+"."
msgid "suppress output of entering each submodule command"
-msgstr ""
+msgstr "приховати вивід введення кожної команди підмодуля"
msgid "recurse into nested submodules"
msgstr "рекурсивно у вкладених підмодулях"
msgid "git submodule foreach [--quiet] [--recursive] [--] <command>"
-msgstr ""
+msgstr "git submodule foreach [--quiet] [--recursive] [--] <команда>"
#, c-format
msgid "Failed to register url for submodule path '%s'"
@@ -11789,11 +12395,12 @@ msgstr "Не вдалося зареєструвати url для підмоду
#, c-format
msgid "Submodule '%s' (%s) registered for path '%s'\n"
-msgstr ""
+msgstr "Підмодуль \"%s\" (%s) зареєстровано для шляху \"%s\"\n"
#, c-format
msgid "warning: command update mode suggested for submodule '%s'\n"
msgstr ""
+"попередження: запропоновано режим оновлення команд для підмодуля \"%s\"\n"
#, c-format
msgid "Failed to register update mode for submodule path '%s'"
@@ -11801,7 +12408,7 @@ msgstr ""
"Не вдалося зареєструвати режим оновлення для підмодуля за шляхом \"%s\""
msgid "suppress output for initializing a submodule"
-msgstr ""
+msgstr "приховати вивід для ініціалізації підмодуля"
msgid "git submodule init [<options>] [<path>]"
msgstr "git submodule init [<опції>] [<шлях>]"
@@ -11809,37 +12416,40 @@ msgstr "git submodule init [<опції>] [<шлях>]"
#, c-format
msgid "no submodule mapping found in .gitmodules for path '%s'"
msgstr ""
+"відповідне відображення підмодуля не знайдено у .gitmodules для шляху \"%s\""
#, c-format
msgid "could not resolve HEAD ref inside the submodule '%s'"
-msgstr ""
+msgstr "не вдалося розвʼязати HEAD посилання всередині підмодуля \"%s\""
#, c-format
msgid "failed to recurse into submodule '%s'"
msgstr "не вдалося обробити рекурсивно підмодуль \"%s\""
msgid "suppress submodule status output"
-msgstr ""
+msgstr "приховати вивід стану підмодуля"
msgid ""
"use commit stored in the index instead of the one stored in the submodule "
"HEAD"
msgstr ""
+"використати коміт, що зберігається в індексі, замість того, що зберігається "
+"в HEAD підмодуля"
msgid "git submodule status [--quiet] [--cached] [--recursive] [<path>...]"
-msgstr ""
+msgstr "git submodule status [--quiet] [--cached] [--recursive] [<шлях>...]"
#, c-format
msgid "* %s %s(blob)->%s(submodule)"
-msgstr ""
+msgstr "* %s %s(blob)->%s(підмодуль)"
#, c-format
msgid "* %s %s(submodule)->%s(blob)"
-msgstr ""
+msgstr "* %s %s(підмодуль)->%s(blob)"
#, c-format
msgid "%s"
-msgstr ""
+msgstr "%s"
#, c-format
msgid "couldn't hash object from '%s'"
@@ -11847,29 +12457,30 @@ msgstr "не вдалося хешувати обʼєкт з \"%s\""
#, c-format
msgid "unexpected mode %o\n"
-msgstr ""
+msgstr "неочікуваний режим %o\n"
msgid "use the commit stored in the index instead of the submodule HEAD"
msgstr "використати коміт, збережений в індексі, замість підмодуля HEAD"
msgid "compare the commit in the index with that in the submodule HEAD"
-msgstr ""
+msgstr "порівняти коміт в індексі з комітом у HEAD підмодуля"
msgid "skip submodules with 'ignore_config' value set to 'all'"
msgstr ""
+"пропускати підмодулі зі значенням \"ignore_config\" встановленим у \"all\""
msgid "limit the summary size"
-msgstr ""
+msgstr "обмежити розмір підсумку"
msgid "git submodule summary [<options>] [<commit>] [--] [<path>]"
-msgstr ""
+msgstr "git summary submodule [<опції>] [<коміт>] [--] [<шлях>]"
msgid "could not fetch a revision for HEAD"
-msgstr ""
+msgstr "не вдалося отримати ревізію для HEAD"
#, c-format
msgid "Synchronizing submodule url for '%s'\n"
-msgstr ""
+msgstr "Синхронізація url підмодуля для \"%s\"\n"
#, c-format
msgid "failed to register url for submodule path '%s'"
@@ -11880,22 +12491,26 @@ msgid "failed to update remote for submodule '%s'"
msgstr "не вдалося оновити віддалене призначення для підмодуля \"%s\""
msgid "suppress output of synchronizing submodule url"
-msgstr ""
+msgstr "приховати вивід процесу синхронізації url-адреси підмодуля"
msgid "git submodule sync [--quiet] [--recursive] [<path>]"
-msgstr ""
+msgstr "git submodule sync [--quiet] [--recursive] [<шлях>]"
#, c-format
msgid ""
"Submodule work tree '%s' contains a .git directory. This will be replaced "
"with a .git file by using absorbgitdirs."
msgstr ""
+"Робоче дерево підмодуля \"%s\" містить директорію .git. Її буде замінено на ."
+"git файл за допомогою absorbgitdirs."
#, c-format
msgid ""
"Submodule work tree '%s' contains local modifications; use '-f' to discard "
"them"
msgstr ""
+"Робоче дерево підмодуля \"%s\" містить локальні модифікації; скористайтесь "
+"\"-f\", щоб скасувати їх"
#, c-format
msgid "Cleared directory '%s'\n"
@@ -11911,20 +12526,23 @@ msgstr "не вдалося створити порожню директорію
#, c-format
msgid "Submodule '%s' (%s) unregistered for path '%s'\n"
-msgstr ""
+msgstr "Підмодуль \"%s\" (%s) не зареєстровано за шляхом \"%s\"\n"
msgid "remove submodule working trees even if they contain local changes"
msgstr ""
+"видалити робочі дерева підмодулів, навіть якщо вони містять локальні зміни"
msgid "unregister all submodules"
-msgstr ""
+msgstr "скасувати реєстрацію всіх підмодулів"
msgid ""
"git submodule deinit [--quiet] [-f | --force] [--all | [--] [<path>...]]"
msgstr ""
+"git submodule deinit [--quiet] [-f | --force] [--all | [--] [<шлях>...]]"
msgid "Use '--all' if you really want to deinitialize all submodules"
msgstr ""
+"Скористайтесь \"--all\", якщо ви дійсно хочете деініціалізувати всі підмодулі"
msgid ""
"An alternate computed from a superproject's alternate is invalid.\n"
@@ -11932,65 +12550,76 @@ msgid ""
"submodule.alternateErrorStrategy to 'info' or, equivalently, clone with\n"
"'--reference-if-able' instead of '--reference'."
msgstr ""
+"Запозичений обʼєкт, обчислений з запозиченого обʼєкту батьківського проекту, "
+"не є дійсним.\n"
+"Щоб дозволити Git клонувати без запозиченого обʼєкту в такому випадку, "
+"встановіть\n"
+"submodule.alternateErrorStrategy на \"info\" або, що еквівалентно, клонуйте "
+"з\n"
+"\"--reference-if-able\" замість \"--reference\"."
#, c-format
msgid "could not get a repository handle for gitdir '%s'"
-msgstr "не вдалося отримати дескриптор сховища для gitdir \"%s\""
+msgstr "не вдалося отримати дескриптор сховища для git директорії \"%s\""
#, c-format
msgid "submodule '%s' cannot add alternate: %s"
-msgstr "підмодуль \"%s\" не може додати спільний обʼєкт: %s"
+msgstr "підмодуль \"%s\" не може додати запозичених обʼєкт: %s"
#, c-format
msgid "Value '%s' for submodule.alternateErrorStrategy is not recognized"
-msgstr ""
+msgstr "Значення \"%s\" для submodule.alternateErrorStrategy не розпізнано"
#, c-format
msgid "Value '%s' for submodule.alternateLocation is not recognized"
-msgstr ""
+msgstr "Значення \"%s\" для submodule.alternateLocation не розпізнано"
#, c-format
msgid "refusing to create/use '%s' in another submodule's git dir"
msgstr ""
+"відмовлено в створенні/використанні \"%s\" у git директорії іншого підмодуля"
#, c-format
msgid "clone of '%s' into submodule path '%s' failed"
-msgstr ""
+msgstr "не вдалося клонувати \"%s\" у шлях підмодуля \"%s\""
#, c-format
msgid "directory not empty: '%s'"
-msgstr ""
+msgstr "директорія не порожня: \"%s\""
#, c-format
msgid "could not get submodule directory for '%s'"
msgstr "не вдалося отримати директорію підмодуля для \"%s\""
msgid "alternative anchor for relative paths"
-msgstr ""
+msgstr "альтернативний якір для відносних шляхів"
msgid "where the new submodule will be cloned to"
msgstr "куди буде клоновано новий підмодуль"
msgid "name of the new submodule"
-msgstr ""
+msgstr "назва нового підмодуля"
msgid "url where to clone the submodule from"
-msgstr ""
+msgstr "url адреса, звідки клонувати підмодуль"
msgid "depth for shallow clones"
-msgstr ""
+msgstr "глибина для неглибоких клонів"
msgid "force cloning progress"
msgstr "примусово звітувати прогрес клонування"
msgid "disallow cloning into non-empty directory"
-msgstr ""
+msgstr "заборонити клонування у непорожню директорію"
msgid ""
"git submodule--helper clone [--prefix=<path>] [--quiet] [--reference "
"<repository>] [--name <name>] [--depth <depth>] [--single-branch] [--filter "
"<filter-spec>] --url <url> --path <path>"
msgstr ""
+"git submodule--helper clone [--prefix=<шлях>] [--quiet] [--reference "
+"<сховище>] [--name <назва>] [--depth <глибина>] [--single-branch] [--filter "
+"<визначник-фільтру>] --url <url> --path <шлях>"
#, c-format
msgid "Invalid update mode '%s' configured for submodule path '%s'"
@@ -12000,30 +12629,34 @@ msgstr ""
#, c-format
msgid "Submodule path '%s' not initialized"
-msgstr ""
+msgstr "Підмодуль за шляхом \"%s\" не ініціалізовано"
msgid "Maybe you want to use 'update --init'?"
-msgstr ""
+msgstr "Можливо, ви хочете скористатись командою \"update --init\"?"
#, c-format
msgid "Skipping unmerged submodule %s"
-msgstr ""
+msgstr "Пропуск незлитого підмодуля %s"
#, c-format
msgid "Skipping submodule '%s'"
-msgstr ""
+msgstr "Пропуск підмодуля \"%s\""
+
+#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "неможливо клонувати підмодуль \"%s\" без URL-адреси"
#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
-msgstr ""
+msgstr "Не вдалося клонувати \"%s\". Запланована повторна спроба"
#, c-format
msgid "Failed to clone '%s' a second time, aborting"
-msgstr ""
+msgstr "Не вдалося клонувати \"%s\" вдруге, переривання"
#, c-format
msgid "Unable to checkout '%s' in submodule path '%s'"
-msgstr ""
+msgstr "Не вдалося переключитися на \"%s\" у підмодулі за шляхом \"%s\""
#, c-format
msgid "Unable to rebase '%s' in submodule path '%s'"
@@ -12035,33 +12668,37 @@ msgstr "Не вдалося злити \"%s\" в підмодулі за шля
#, c-format
msgid "Execution of '%s %s' failed in submodule path '%s'"
-msgstr ""
+msgstr "Не вдалося виконати \"%s %s\" у шляху підмодуля \"%s\""
#, c-format
msgid "Submodule path '%s': checked out '%s'\n"
-msgstr ""
+msgstr "Шлях підмодуля \"%s\": переключено стан \"%s\"\n"
#, c-format
msgid "Submodule path '%s': rebased into '%s'\n"
-msgstr ""
+msgstr "Шлях підмодуля \"%s\": перебазовано в \"%s\"\n"
#, c-format
msgid "Submodule path '%s': merged in '%s'\n"
-msgstr ""
+msgstr "Шлях підмодуля \"%s\": злито в \"%s\"\n"
#, c-format
msgid "Submodule path '%s': '%s %s'\n"
-msgstr ""
+msgstr "Шлях підмодуля \"%s\": \"%s %s\"\n"
#, c-format
msgid "Unable to fetch in submodule path '%s'; trying to directly fetch %s:"
msgstr ""
+"Неможливо виконати отримання шляху підмодуля \"%s\"; спроба отримати напряму "
+"%s:"
#, c-format
msgid ""
"Fetched in submodule path '%s', but it did not contain %s. Direct fetching "
"of that commit failed."
msgstr ""
+"Отримано у шляху до підмодуля \"%s\", але він не містить %s. Пряме отримання "
+"цього коміту не вдалося."
#, c-format
msgid "could not initialize submodule at path '%s'"
@@ -12072,18 +12709,20 @@ msgid ""
"Submodule (%s) branch configured to inherit branch from superproject, but "
"the superproject is not on any branch"
msgstr ""
+"Гілку підмодуля (%s) налаштовано на успадкування гілки від суперпроекту, але "
+"суперпроект не знаходиться у жодній гілці"
#, c-format
msgid "Unable to find current revision in submodule path '%s'"
-msgstr ""
+msgstr "Не вдалося знайти поточну ревізію у шляху підмодуля \"%s\""
#, c-format
msgid "Unable to fetch in submodule path '%s'"
-msgstr ""
+msgstr "Не вдалося отримати шлях підмодуля \"%s\""
#, c-format
msgid "Unable to find %s revision in submodule path '%s'"
-msgstr ""
+msgstr "Не вдалося знайти ревізію %s у шляху підмодуля \"%s\""
#, c-format
msgid "Failed to recurse into submodule path '%s'"
@@ -12099,34 +12738,34 @@ msgid "use SHA-1 of submodule's remote tracking branch"
msgstr "використовувати SHA-1 гілки віддаленого відстежування підмодуля"
msgid "traverse submodules recursively"
-msgstr ""
+msgstr "обходити підмодулі рекурсивно"
msgid "don't fetch new objects from the remote site"
-msgstr ""
+msgstr "не отримувати нові обʼєкти з віддаленої сторони"
msgid "use the 'checkout' update strategy (default)"
-msgstr ""
+msgstr "використати стратегію оновлення \"checkout \" (за замовчуванням)"
msgid "use the 'merge' update strategy"
-msgstr ""
+msgstr "використати стратегію оновлення \"merge\""
msgid "use the 'rebase' update strategy"
-msgstr ""
+msgstr "використати стратегію оновлення \"rebase\""
msgid "create a shallow clone truncated to the specified number of revisions"
-msgstr "створити поверхневий клон, урізаний до вказаної кількості ревізій"
+msgstr "створити неглибокий клон, урізаний до вказаної кількості ревізій"
msgid "parallel jobs"
-msgstr ""
+msgstr "паралельні потоки"
msgid "whether the initial clone should follow the shallow recommendation"
-msgstr ""
+msgstr "чи повинен початковий клон слідувати неглибоким рекомендаціям"
msgid "don't print cloning progress"
-msgstr ""
+msgstr "не виводити хід клонування"
msgid "disallow cloning into non-empty directory, implies --init"
-msgstr ""
+msgstr "заборонити клонування у непорожній каталог, мається на увазі --init"
msgid ""
"git submodule [--quiet] update [--init [--filter=<filter-spec>]] [--remote] "
@@ -12134,44 +12773,50 @@ msgid ""
"shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] "
"[--] [<path>...]"
msgstr ""
+"git submodule [--quiet] update [--init [--filter=<визначник-фільтру>]] [--"
+"remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--"
+"[no-]recommend-shallow] [--reference <сховище>] [--recursive] [--[no-]single-"
+"branch] [--] [<шлях>...]"
msgid "git submodule absorbgitdirs [<options>] [<path>...]"
msgstr "git submodule absorbgitdirs [<опції>] [<шлях>...]"
msgid "suppress output for setting url of a submodule"
-msgstr ""
+msgstr "приховати вивід при встановленні url підмодуля"
msgid "git submodule set-url [--quiet] <path> <newurl>"
-msgstr ""
+msgstr "git submodule set-url [--quiet] <шлях> <новий-url>"
msgid "set the default tracking branch to master"
-msgstr ""
+msgstr "встановити гілку відстежування за замовчуванням на master"
msgid "set the default tracking branch"
msgstr "встановити гілку відстежування за замовчуванням"
msgid "git submodule set-branch [-q|--quiet] (-d|--default) <path>"
-msgstr ""
+msgstr "git submodule set-branch [-q|--quiet] (-d|--default) <шлях>"
msgid "git submodule set-branch [-q|--quiet] (-b|--branch) <branch> <path>"
-msgstr ""
+msgstr "git submodule set-branch [-q|--quiet] (-b|--branch) <гілка> <шлях>"
msgid "--branch or --default required"
-msgstr ""
+msgstr "Потрібно вказати --branch або --default"
msgid "print only error messages"
-msgstr ""
+msgstr "виводити тільки повідомлення про помилки"
msgid "force creation"
-msgstr ""
+msgstr "примусове створення"
msgid "show whether the branch would be created"
-msgstr ""
+msgstr "показати, чи буде створено гілку"
msgid ""
"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--"
"quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>"
msgstr ""
+"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--"
+"quiet] [-t|--track] [-n|--dry-run] <назва> <початковий-oid> <початкова-назва>"
#, c-format
msgid "creating branch '%s'"
@@ -12179,7 +12824,7 @@ msgstr "створення гілки \"%s\""
#, c-format
msgid "Adding existing repo at '%s' to the index\n"
-msgstr ""
+msgstr "Додавання існуючого сховища за адресою \"%s\" до індексу\n"
#, c-format
msgid "'%s' already exists and is not a valid git repo"
@@ -12188,6 +12833,8 @@ msgstr "\"%s\" вже існує і не є припустимим git схов
#, c-format
msgid "A git directory for '%s' is found locally with remote(s):\n"
msgstr ""
+"Git директорію для \"%s\" знайдено локально з віддаленим(и) "
+"призначенням(и):\n"
#, c-format
msgid ""
@@ -12198,10 +12845,17 @@ msgid ""
"or you are unsure what this means choose another name with the '--name' "
"option."
msgstr ""
+"Якщо ви хочете повторно використати цю локальну git директорію замість того, "
+"щоб знову клонувати з\n"
+" %s\n"
+"скористайтесь опцією \"--force\". Якщо локальна директорія git не є "
+"правильним сховищем\n"
+"або ви не впевнені, що це означає, виберіть іншу назву за допомогою опції "
+"\"--name\"."
#, c-format
msgid "Reactivating local git directory for submodule '%s'\n"
-msgstr ""
+msgstr "Повторна активація локальної git директорії для підмодуля \"%s\"\n"
#, c-format
msgid "unable to checkout submodule '%s'"
@@ -12209,6 +12863,7 @@ msgstr "не вдалося переключитись на підмодуль \
msgid "please make sure that the .gitmodules file is in the working tree"
msgstr ""
+"будь ласка, переконайтеся, що файл .gitmodules знаходиться у робочому дереві"
#, c-format
msgid "Failed to add submodule '%s'"
@@ -12220,81 +12875,88 @@ msgstr "Не вдалося зареєструвати підмодуль \"%s\"
#, c-format
msgid "'%s' already exists in the index"
-msgstr ""
+msgstr "\"%s\" вже існує в індексі"
#, c-format
msgid "'%s' already exists in the index and is not a submodule"
-msgstr ""
+msgstr "\"%s\" вже існує в індексі і не є підмодулем"
#, c-format
msgid "'%s' does not have a commit checked out"
msgstr "\"%s\" не має активного коміту"
msgid "branch of repository to add as submodule"
-msgstr ""
+msgstr "гілка сховища, яку потрібно додати як підмодуль"
msgid "allow adding an otherwise ignored submodule path"
-msgstr ""
+msgstr "дозволити додавання шляху до підмодуля, який інакше ігнорується"
msgid "borrow the objects from reference repositories"
-msgstr ""
+msgstr "запозичити обʼєкти з репозиторіїв посилань"
msgid ""
"sets the submodule's name to the given string instead of defaulting to its "
"path"
msgstr ""
+"встановлює назву підмодуля на вказане значення замість використання його "
+"шляху"
msgid "git submodule add [<options>] [--] <repository> [<path>]"
msgstr "git submodule add [<опції>] [--] <сховище> [<шлях>]"
msgid "Relative path can only be used from the toplevel of the working tree"
msgstr ""
+"Відносний шлях можна використовувати лише з верхнього рівня робочого дерева"
#, c-format
msgid "repo URL: '%s' must be absolute or begin with ./|../"
-msgstr ""
+msgstr "URL сховища: \"%s\" має бути абсолютним або починатися з ./|../."
#, c-format
msgid "'%s' is not a valid submodule name"
msgstr "\"%s\" не є припустимою назвою підмодуля"
msgid "git submodule--helper <command>"
-msgstr ""
+msgstr "git submodule--helper <команда>"
msgid "git symbolic-ref [-m <reason>] <name> <ref>"
-msgstr ""
+msgstr "git symbolic-ref [-m <причина>] <назва> <посилання>"
msgid "git symbolic-ref [-q] [--short] [--no-recurse] <name>"
-msgstr ""
+msgstr "git symbolic-ref [-q] [--short] [--no-recurse] <назва>"
msgid "git symbolic-ref --delete [-q] <name>"
-msgstr ""
+msgstr "git symbolic-ref --delete [-q] <назва>"
msgid "suppress error message for non-symbolic (detached) refs"
msgstr ""
+"приховати повідомлення про помилку для несимвольних (відокремлених) посилань"
msgid "delete symbolic ref"
msgstr "видалити символьне посилання"
msgid "shorten ref output"
-msgstr ""
+msgstr "скоротити вивід посилань"
msgid "recursively dereference (default)"
msgstr "рекурсивне розіменування (за замовчуванням)"
msgid "reason"
-msgstr ""
+msgstr "причина"
msgid "reason of the update"
-msgstr ""
+msgstr "причина оновлення"
msgid ""
"git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]\n"
" <tagname> [<commit> | <object>]"
msgstr ""
+"git tag [-a | -s | -u <ідентифікатор-ключа>] [-f] [-m <допис> | -F <файл>] [-"
+"e]\n"
+" <назва-тегу> [<коміт> | <об’єкт>]"
msgid "git tag -d <tagname>..."
-msgstr ""
+msgstr "git tag -d <назва-тега>..."
msgid ""
"git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]\n"
@@ -12302,17 +12964,21 @@ msgid ""
" [--create-reflog] [--sort=<key>] [--format=<format>]\n"
" [--merged <commit>] [--no-merged <commit>] [<pattern>...]"
msgstr ""
+"git tag [-n[<число>]] -l [--contains <коміт>] [--no-contains <коміт>]\n"
+" [--points-at <обʼєкт>] [--column[=<опціі>] | --no-column]\n"
+" [--create-reflog] [--sort=<ключ>] [--format=<формат>]\n"
+" [--merged <коміт>] [--no-merged <коміт>] [<шаблон>...]"
msgid "git tag -v [--format=<format>] <tagname>..."
-msgstr ""
+msgstr "git tag -v [--format=<формат>] <назва-тега>..."
#, c-format
msgid "tag '%s' not found."
-msgstr ""
+msgstr "тег \"%s\" не знайдено."
#, c-format
msgid "Deleted tag '%s' (was %s)\n"
-msgstr ""
+msgstr "Видалено тег \"%s\" (було %s)\n"
#, c-format
msgid ""
@@ -12321,6 +12987,10 @@ msgid ""
" %s\n"
"Lines starting with '%c' will be ignored.\n"
msgstr ""
+"\n"
+"Напишіть допис до тегу:\n"
+" %s\n"
+"Рядки, що починаються з \"%c\", будуть проігноровані.\n"
#, c-format
msgid ""
@@ -12330,6 +13000,11 @@ msgid ""
"Lines starting with '%c' will be kept; you may remove them yourself if you "
"want to.\n"
msgstr ""
+"\n"
+"Напишіть допис до тегу:\n"
+" %s\n"
+"Рядки, що починаються з \"%c\", будуть збережені; ви можете вилучити їх "
+"самостійно, якщо захочете.\n"
msgid "unable to sign the tag"
msgstr "не вдалося підписати тег"
@@ -12341,77 +13016,82 @@ msgid ""
"\n"
"\tgit tag -f %s %s^{}"
msgstr ""
+"Ви створили вкладений тег. Обʼєкт, на який посилається ваш новий тег\n"
+"вже є тегом. Якщо ви хотіли позначити обʼєкт, на який він вказує, "
+"скористайтесь\n"
+"\n"
+"\tgit tag -f %s %s^{}"
msgid "bad object type."
msgstr "невірний тип обʼєкта."
msgid "no tag message?"
-msgstr ""
+msgstr "немає допису до тегу?"
#, c-format
msgid "The tag message has been left in %s\n"
-msgstr ""
+msgstr "Допис до тегу було залишено в %s\n"
msgid "list tag names"
-msgstr ""
+msgstr "показати назви тегів"
msgid "print <n> lines of each tag message"
-msgstr ""
+msgstr "вивести <н> рядків кожного допису до тегу"
msgid "delete tags"
msgstr "видалити теги"
msgid "verify tags"
-msgstr ""
+msgstr "перевірити теги"
msgid "Tag creation options"
-msgstr ""
+msgstr "Опції створення тегів"
msgid "annotated tag, needs a message"
-msgstr ""
+msgstr "анотований тег потребує допису"
msgid "tag message"
-msgstr ""
+msgstr "допис до тегу"
msgid "force edit of tag message"
-msgstr ""
+msgstr "примусове редагування допису до тегу"
msgid "annotated and GPG-signed tag"
-msgstr ""
+msgstr "анотований та підписаний GPG-підписом тег"
msgid "use another key to sign the tag"
-msgstr ""
+msgstr "використати інший ключ для підпису тегу"
msgid "replace the tag if exists"
-msgstr ""
+msgstr "замінити тег, якщо він існує"
msgid "create a reflog"
-msgstr "створити reflog"
+msgstr "створити журнал посилань"
msgid "Tag listing options"
-msgstr ""
+msgstr "Опції виводу тегів"
msgid "show tag list in columns"
-msgstr ""
+msgstr "показати список тегів в стовпчиках"
msgid "print only tags that contain the commit"
-msgstr ""
+msgstr "вивести тільки теги, що містять коміти"
msgid "print only tags that don't contain the commit"
-msgstr ""
+msgstr "вивести тільки теги, що не містять комітів"
msgid "print only tags that are merged"
-msgstr ""
+msgstr "вивести тільки злиті теги"
msgid "print only tags that are not merged"
-msgstr ""
+msgstr "вивести тільки не злиті теги"
msgid "print only tags of the object"
-msgstr ""
+msgstr "вивести тільки теги обʼєкта"
#, c-format
msgid "the '%s' option is only allowed in list mode"
-msgstr ""
+msgstr "опція \"%s\" дозволена лише в режимі виводу"
#, c-format
msgid "'%s' is not a valid tag name."
@@ -12427,7 +13107,7 @@ msgstr "Неприпустимий режим очищення %s"
#, c-format
msgid "Updated tag '%s' (was %s)\n"
-msgstr ""
+msgstr "Оновлено тег \"%s\" (було %s)\n"
msgid "pack exceeds maximum allowed size"
msgstr "пакунок перевищує максимально дозволений розмір"
@@ -12459,34 +13139,39 @@ msgstr "не вдалося видалити директорію %s"
#, c-format
msgid "Testing mtime in '%s' "
-msgstr ""
+msgstr "Тестування mtime в \"%s\" "
msgid "directory stat info does not change after adding a new file"
msgstr ""
+"статистична інформація директорії не змінилась після додання нового файла"
msgid "directory stat info does not change after adding a new directory"
msgstr ""
+"статистична інформація директорії не змінилась після додання нової директорії"
msgid "directory stat info changes after updating a file"
-msgstr ""
+msgstr "статистична інформація директорії змінилась після оновлення файла"
msgid "directory stat info changes after adding a file inside subdirectory"
msgstr ""
+"статистична інформація директорії змінилась після додання файла до "
+"піддиректорії"
msgid "directory stat info does not change after deleting a file"
-msgstr ""
+msgstr "статистична інформація директорії не змінилась після видалення файла"
msgid "directory stat info does not change after deleting a directory"
msgstr ""
+"статистична інформація директорії не змінилась після видалення директорії"
msgid " OK"
-msgstr ""
+msgstr " OK"
msgid "git update-index [<options>] [--] [<file>...]"
msgstr "git update-index [<опції>] [--] [<файл>...]"
msgid "continue refresh even when index needs update"
-msgstr ""
+msgstr "продовжити оновлення, навіть якщо індекс потребує змін"
msgid "refresh: ignore submodules"
msgstr "оновити: ігнорувати підмодулі"
@@ -12495,112 +13180,118 @@ msgid "do not ignore new files"
msgstr "не ігнорувати нові файли"
msgid "let files replace directories and vice-versa"
-msgstr ""
+msgstr "дозволити файлам замінювати директорії і навпаки"
msgid "notice files missing from worktree"
-msgstr ""
+msgstr "повідомляти про файли, відсутні в робочому дереві"
msgid "refresh even if index contains unmerged entries"
-msgstr ""
+msgstr "оновити, навіть якщо індекс містить не злиті записи"
msgid "refresh stat information"
-msgstr ""
+msgstr "оновити статистичну інформацію"
msgid "like --refresh, but ignore assume-unchanged setting"
-msgstr ""
+msgstr "на кшталт --refresh, але ігнорує assume-unchanged опцію"
msgid "<mode>,<object>,<path>"
-msgstr ""
+msgstr "<режим>,<обʼєкт>,<шлях>"
msgid "add the specified entry to the index"
msgstr "додати вказаний запис до індексу"
msgid "mark files as \"not changing\""
-msgstr ""
+msgstr "позначити файли як \"не змінені\""
msgid "clear assumed-unchanged bit"
-msgstr ""
+msgstr "очистити assumed-unchanged біт"
msgid "mark files as \"index-only\""
-msgstr ""
+msgstr "позначити файли як \"тільки для індексу\""
msgid "clear skip-worktree bit"
-msgstr ""
+msgstr "очистити skip-worktree біт"
msgid "do not touch index-only entries"
-msgstr ""
+msgstr "ігнорувати файли, призначені тільки для індексу"
msgid "add to index only; do not add content to object database"
-msgstr ""
+msgstr "додати лише до індексу; не додавати вміст до бази даних обʼєкта"
msgid "remove named paths even if present in worktree"
-msgstr ""
+msgstr "видалити іменовані шляхи, навіть якщо вони присутні у робочому дереві"
msgid "with --stdin: input lines are terminated by null bytes"
-msgstr ""
+msgstr "з --stdin: вхідні рядки завершуються нульовими байтами"
msgid "read list of paths to be updated from standard input"
-msgstr ""
+msgstr "прочитати список шляхів для оновлення зі стандартного вводу"
msgid "add entries from standard input to the index"
-msgstr ""
+msgstr "додати записи зі стандартного вводу до індексу"
msgid "repopulate stages #2 and #3 for the listed paths"
-msgstr ""
+msgstr "перезаповнити етапи №2 і №3 для перелічених шляхів"
msgid "only update entries that differ from HEAD"
-msgstr ""
+msgstr "оновити тільки ті записи, які відрізняються від HEAD"
msgid "ignore files missing from worktree"
-msgstr ""
+msgstr "ігнорувати файли відсутні в робочому дереві"
msgid "report actions to standard output"
-msgstr ""
+msgstr "звітувати про дії на стандартний вивід"
msgid "(for porcelains) forget saved unresolved conflicts"
-msgstr ""
+msgstr "(для високорівневих команд) забути збережені невирішені конфлікти"
msgid "write index in this format"
-msgstr ""
+msgstr "записати індекс у цьому форматі"
msgid "enable or disable split index"
-msgstr ""
+msgstr "увімкнути або вимкнути розщеплений індекс"
msgid "enable/disable untracked cache"
-msgstr ""
+msgstr "увімкнути/вимкнути невідстежуваний кеш"
msgid "test if the filesystem supports untracked cache"
-msgstr ""
+msgstr "перевірити, чи підтримує файлова система невідстежуваний кеш"
msgid "enable untracked cache without testing the filesystem"
-msgstr ""
+msgstr "увімкнути невідстежуваний кеш без тестування файлової системи"
msgid "write out the index even if is not flagged as changed"
-msgstr ""
+msgstr "записати індекс, навіть якщо він не позначений як змінений"
msgid "enable or disable file system monitor"
-msgstr ""
+msgstr "увімкнути або вимкнути монітор файлової системи"
msgid "mark files as fsmonitor valid"
-msgstr ""
+msgstr "позначити файли придатними для fsmonitor"
msgid "clear fsmonitor valid bit"
-msgstr ""
+msgstr "очистити біт придатності для fsmonitor"
msgid ""
"core.splitIndex is set to false; remove or change it, if you really want to "
"enable split index"
msgstr ""
+"core.splitIndex встановлено в false; видаліть або змініть його, якщо ви "
+"дійсно хочете увімкнути розщеплений індекс"
msgid ""
"core.splitIndex is set to true; remove or change it, if you really want to "
"disable split index"
msgstr ""
+"core.splitIndex встановлено в true; видаліть або змініть його, якщо ви "
+"дійсно хочете вимкнути розщеплений індекс"
msgid ""
"core.untrackedCache is set to true; remove or change it, if you really want "
"to disable the untracked cache"
msgstr ""
+"core.untrackedCache встановлено в true; видаліть або змініть його, якщо ви "
+"дійсно хочете вимкнути невідстежуваний кеш"
msgid "Untracked cache disabled"
msgstr "Невідстежуваний кеш вимкнено"
@@ -12609,6 +13300,8 @@ msgid ""
"core.untrackedCache is set to false; remove or change it, if you really want "
"to enable the untracked cache"
msgstr ""
+"core.untrackedCache встановлено в false; видаліть або змініть його, якщо ви "
+"дійсно хочете увімкнути невідстежуваний кеш"
#, c-format
msgid "Untracked cache enabled for '%s'"
@@ -12616,37 +13309,42 @@ msgstr "Увімкнено невідстежуваний кеш для \"%s\""
msgid "core.fsmonitor is unset; set it if you really want to enable fsmonitor"
msgstr ""
+"core.fsmonitor не встановлено; встановіть його, якщо ви дійсно хочете "
+"увімкнути fsmonitor"
msgid "fsmonitor enabled"
-msgstr ""
+msgstr "fsmonitor увімкнено"
msgid ""
"core.fsmonitor is set; remove it if you really want to disable fsmonitor"
msgstr ""
+"core.fsmonitor встановлено; видаліть його, якщо ви дійсно хочете вимкнути "
+"fsmonitor"
msgid "fsmonitor disabled"
-msgstr ""
+msgstr "fsmonitor вимкнено"
msgid "git update-ref [<options>] -d <refname> [<old-val>]"
msgstr "git update-ref [<опції>] -d <назва посилання> [<старе значення>]"
msgid "git update-ref [<options>] <refname> <new-val> [<old-val>]"
msgstr ""
+"git update-ref [<опції>] <назва-посилання> <нове-значення> [<старе-значення>]"
msgid "git update-ref [<options>] --stdin [-z]"
-msgstr ""
+msgstr "git update-ref [<опції>] --stdin [-z]"
msgid "delete the reference"
msgstr "видалити посилання"
msgid "update <refname> not the one it points to"
-msgstr ""
+msgstr "оновити <назвау-посилання>, а не те, на яке воно вказує"
msgid "stdin has NUL-terminated arguments"
-msgstr ""
+msgstr "stdin має аргументи, що закінчуються NUL"
msgid "read updates from stdin"
-msgstr ""
+msgstr "читати оновлення з stdin"
msgid "update the info files from scratch"
msgstr "оновити інформаційні файли з чистого аркуша"
@@ -12655,78 +13353,115 @@ msgid ""
"git-upload-pack [--[no-]strict] [--timeout=<n>] [--stateless-rpc]\n"
" [--advertise-refs] <directory>"
msgstr ""
+"git-upload-pack [--[no-]strict] [--timeout=<н>] [--stateless-rpc]\n"
+" [--advertise-refs] <директорія>"
msgid "quit after a single request/response exchange"
-msgstr ""
+msgstr "припинити роботу після першого запит/відповідь обміну"
msgid "serve up the info/refs for git-http-backend"
-msgstr ""
+msgstr "надати info/refs для git-http-backend"
msgid "do not try <directory>/.git/ if <directory> is no Git directory"
msgstr ""
+"не пробувати <директорія>/.git/, якщо <директорія> не є директорією Git"
msgid "interrupt transfer after <n> seconds of inactivity"
-msgstr ""
+msgstr "перервати передачу після <н> секунд неактивності"
msgid "git verify-commit [-v | --verbose] [--raw] <commit>..."
-msgstr ""
+msgstr "git verify-commit [-v | —verbose] [--raw] <коміт>..."
msgid "print commit contents"
-msgstr ""
+msgstr "показати вміст коміту"
msgid "print raw gpg status output"
-msgstr ""
+msgstr "показати необроблений вивід стану gpg"
msgid "git verify-pack [-v | --verbose] [-s | --stat-only] [--] <pack>.idx..."
msgstr ""
+"git verify-pack [-v | --verbose] [-s | --stat-only] [--] <пакунок>.idx..."
msgid "verbose"
-msgstr ""
+msgstr "розгорнутий вивід"
msgid "show statistics only"
-msgstr ""
+msgstr "показати тільки статистику"
msgid "git verify-tag [-v | --verbose] [--format=<format>] [--raw] <tag>..."
-msgstr ""
+msgstr "git verify-tag [-v | --verbose] [--format=<формат>] [--raw] <тег>..."
msgid "print tag contents"
-msgstr ""
+msgstr "показати вміст тегу"
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
+"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <строка>]]\n"
+" [--orphan] [(-b | -B) <нова-гілка>] <шлях> [<комітоподібне>]"
msgid "git worktree list [-v | --porcelain [-z]]"
-msgstr ""
+msgstr "git worktree list [-v | --porcelain [-z]]"
msgid "git worktree lock [--reason <string>] <worktree>"
-msgstr ""
+msgstr "git worktree lock [--reason <строка>] <робоче дерево>"
msgid "git worktree move <worktree> <new-path>"
-msgstr ""
+msgstr "git worktree move <робоче-дерево> <новий-шлях>"
msgid "git worktree prune [-n] [-v] [--expire <expire>]"
-msgstr ""
+msgstr "git worktree prune [-n] [-v] [--expire <термін-дії>]"
msgid "git worktree remove [-f] <worktree>"
-msgstr ""
+msgstr "git worktree remove [-f] <робоче дерево>"
msgid "git worktree repair [<path>...]"
-msgstr ""
+msgstr "git worktree repair [<шлях>...]"
msgid "git worktree unlock <worktree>"
+msgstr "git worktree unlock <робоче дерево>"
+
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Немає можливої джерельної гілки, що означає \"--orphan\""
+
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
msgstr ""
+"Якщо ви хочете створити робоче дерево, що містить нову сирітську гілку\n"
+"(гілку без комітів) для цього сховища, ви можете зробити це\n"
+"за допомогою прапорця --orphan:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
#, c-format
-msgid "Removing %s/%s: %s"
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
msgstr ""
+"Якщо ви хочете створити робоче дерево, що містить нову сирітську гілку\n"
+"(гілку без комітів) для цього сховища, ви можете зробити це\n"
+"за допомогою прапорця --orphan:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
+#, c-format
+msgid "Removing %s/%s: %s"
+msgstr "Видалення %s/%s: %s"
msgid "report pruned working trees"
msgstr "звітувати про видалення робочих дерев"
msgid "expire working trees older than <time>"
-msgstr ""
+msgstr "видалити робочі дерева, старіші за <час>"
#, c-format
msgid "'%s' already exists"
@@ -12741,16 +13476,24 @@ msgid ""
"'%s' is a missing but locked worktree;\n"
"use '%s -f -f' to override, or 'unlock' and 'prune' or 'remove' to clear"
msgstr ""
+"\"%s\" - є відсутнім, але заблокованим робочим деревом;\n"
+"скористайтесь командою \"%s -f -f\", щоб перевизначити або \"unlock\" і "
+"\"prune\" або \"remove\", щоб очистити"
#, c-format
msgid ""
"'%s' is a missing but already registered worktree;\n"
"use '%s -f' to override, or 'prune' or 'remove' to clear"
msgstr ""
+"\"%s\" - є відсутнім, але вже зареєстрованим робочим деревом;\n"
+"скористайтесь командою \"%s -f\", щоб перевизначити, або \"prune\" чи "
+"\"remove\", щоб очистити"
#, c-format
msgid "failed to copy '%s' to '%s'; sparse-checkout may not work correctly"
msgstr ""
+"не вдалося скопіювати \"%s\" в \"%s\"; розріджений перехід може працювати "
+"некоректно"
#, c-format
msgid "failed to copy worktree config from '%s' to '%s'"
@@ -12765,26 +13508,54 @@ msgid "could not create directory of '%s'"
msgstr "не вдалося створити директорію \"%s\""
msgid "initializing"
-msgstr ""
+msgstr "ініціалізація"
#, c-format
msgid "Preparing worktree (new branch '%s')"
-msgstr ""
+msgstr "Підготовка робочого дерева (нова гілка \"%s\")"
#, c-format
msgid "Preparing worktree (resetting branch '%s'; was at %s)"
-msgstr ""
+msgstr "Підготовка робочого дерева (скидання гілки \"%s\"; була на %s)"
#, c-format
msgid "Preparing worktree (checking out '%s')"
-msgstr ""
+msgstr "Підготовка робочого дерева (перехід до \"%s\")"
+
+#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "недосяжне: неприпустиме посилання: %s"
#, c-format
msgid "Preparing worktree (detached HEAD %s)"
+msgstr "Підготовка робочого дерева (відокремлений HEAD %s)"
+
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
msgstr ""
+"HEAD вказує на неприпустиме (або осиротіле) посилання.\n"
+"HEAD шлях: \"%s\"\n"
+"HEAD вміст: \"%s\""
+
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"Не існує локальних або віддалених посилань, незважаючи на наявність "
+"принаймні одного віддаленого\n"
+"призначення, зупинка; скористайтесь \"add -f\", щоб перевизначити або "
+"спочатку отримати віддалене посилання"
+
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "\"%s\" і \"%s\" не можна використовувати разом"
msgid "checkout <branch> even if already checked out in other worktree"
msgstr ""
+"перейти на <гілку>, навіть якщо вона вже активна в іншому робочому дереві"
msgid "create a new branch"
msgstr "створити нову гілку"
@@ -12792,6 +13563,9 @@ msgstr "створити нову гілку"
msgid "create or reset a branch"
msgstr "створити або скинути гілку"
+msgid "create unborn/orphaned branch"
+msgstr "створити ненароджену/сирітську гілку"
+
msgid "populate the new working tree"
msgstr "заповнити нове робоче дерево"
@@ -12799,10 +13573,10 @@ msgid "keep the new working tree locked"
msgstr "зберегти нове робоче дерево зафіксованим"
msgid "reason for locking"
-msgstr ""
+msgstr "причина блокування"
msgid "set up tracking mode (see git-branch(1))"
-msgstr ""
+msgstr "налаштувати режим відстежування (дивіться git-branch(1))"
msgid "try to match the new branch name with a remote-tracking branch"
msgstr ""
@@ -12812,35 +13586,42 @@ msgstr ""
msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "опції \"%s\", \"%s\" та \"%s\" не можна використовувати разом"
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "опції \"%s\" і \"%s\" не можна використовувати разом"
+
+msgid "<commit-ish>"
+msgstr "<комітоподібне>"
+
msgid "added with --lock"
-msgstr ""
+msgstr "додано з --lock"
msgid "--[no-]track can only be used if a new branch is created"
-msgstr ""
+msgstr "--[no-]track можна використовувати лише при створенні нової гілки"
msgid "show extended annotations and reasons, if available"
-msgstr ""
+msgstr "показувати розширені анотації та причини, якщо вони доступні"
msgid "add 'prunable' annotation to worktrees older than <time>"
-msgstr ""
+msgstr "додати анотацію \"prunable\" до робочих дерев, старіших за <час>"
msgid "terminate records with a NUL character"
-msgstr ""
+msgstr "завершувати записи символом NUL"
#, c-format
msgid "'%s' is not a working tree"
msgstr "\"%s\" не є робочим деревом"
msgid "The main working tree cannot be locked or unlocked"
-msgstr ""
+msgstr "Головне робоче дерево неможливо заблокувати або розблокувати"
#, c-format
msgid "'%s' is already locked, reason: %s"
-msgstr ""
+msgstr "\"%s\" вже заблоковано, причина: %s"
#, c-format
msgid "'%s' is already locked"
-msgstr ""
+msgstr "\"%s\" вже заблоковано"
#, c-format
msgid "'%s' is not locked"
@@ -12848,9 +13629,11 @@ msgstr "\"%s\" не зафіксовано"
msgid "working trees containing submodules cannot be moved or removed"
msgstr ""
+"робочі дерева, що містять підмодулі, не можуть бути переміщені або видалені"
msgid "force move even if worktree is dirty or locked"
msgstr ""
+"перемістити примусово, навіть якщо робоче дерево забруднене або заблоковане"
#, c-format
msgid "'%s' is a main working tree"
@@ -12858,22 +13641,28 @@ msgstr "\"%s\" є головним робочим деревом"
#, c-format
msgid "could not figure out destination name from '%s'"
-msgstr ""
+msgstr "не вдалося визначити назву призначення з \"%s\""
#, c-format
msgid ""
"cannot move a locked working tree, lock reason: %s\n"
"use 'move -f -f' to override or unlock first"
msgstr ""
+"неможливо перемістити заблоковане робоче дерево, причина блокування: %s\n"
+"скористайтесь командою \"move -f -f\", щоб спочатку перевизначити або "
+"розблокувати його"
msgid ""
"cannot move a locked working tree;\n"
"use 'move -f -f' to override or unlock first"
msgstr ""
+"неможливо перемістити заблоковане робоче дерево;\n"
+"скористайтесь командою \"move -f -f\", щоб спочатку перевизначити або "
+"розблокувати його"
#, c-format
msgid "validation failed, cannot move working tree: %s"
-msgstr ""
+msgstr "валідація завершилася невдало, неможливо перемістити робоче дерево: %s"
#, c-format
msgid "failed to move '%s' to '%s'"
@@ -12886,6 +13675,8 @@ msgstr "не вдалося виконати \"git status\" на \"%s\""
#, c-format
msgid "'%s' contains modified or untracked files, use --force to delete it"
msgstr ""
+"\"%s\" містить змінені або невідстежувані файли, скористайтесь --force, щоб "
+"видалити їх"
#, c-format
msgid "failed to run 'git status' on '%s', code %d"
@@ -12893,44 +13684,49 @@ msgstr "не вдалося виконати \"git status\" на \"%s\", код
msgid "force removal even if worktree is dirty or locked"
msgstr ""
+"видалити примусово, навіть якщо робоче дерево забруднене або заблоковане"
#, c-format
msgid ""
"cannot remove a locked working tree, lock reason: %s\n"
"use 'remove -f -f' to override or unlock first"
msgstr ""
+"неможливо видалити заблоковане робоче дерево, причина блокування: %s\n"
+"скористайтесь \"remove -f -f\", щоб перевизначити або розблокувати"
msgid ""
"cannot remove a locked working tree;\n"
"use 'remove -f -f' to override or unlock first"
msgstr ""
+"неможливо видалити заблоковане робоче дерево;\n"
+"скористайтесь \"remove -f -f\", щоб перевизначити або розблокувати"
#, c-format
msgid "validation failed, cannot remove working tree: %s"
-msgstr ""
+msgstr "валідація завершилася невдало, неможливо видалити робоче дерево: %s"
#, c-format
msgid "repair: %s: %s"
-msgstr ""
+msgstr "відремонтувати: %s: %s"
#, c-format
msgid "error: %s: %s"
-msgstr ""
+msgstr "помилка: %s: %s"
msgid "git write-tree [--missing-ok] [--prefix=<prefix>/]"
-msgstr ""
+msgstr "git write-tree [--missing-ok] [--prefix=<префікс>/]"
msgid "<prefix>/"
-msgstr ""
+msgstr "<префікс>/"
msgid "write tree object for a subdirectory <prefix>"
-msgstr ""
+msgstr "записати обʼєкт дерева для піддиректорії <префікс>"
msgid "only useful for debugging"
-msgstr ""
+msgstr "корисно лише для відлагодження"
msgid "core.fsyncMethod = batch is unsupported on this platform"
-msgstr ""
+msgstr "core.fsyncMethod = batch не підтримується на цій платформі"
#, c-format
msgid "could not parse bundle list key %s with value '%s'"
@@ -12938,13 +13734,13 @@ msgstr "не вдалося розібрати ключ списку пакун
#, c-format
msgid "bundle list at '%s' has no mode"
-msgstr ""
+msgstr "список пакунків на \"%s\" не має режиму"
msgid "failed to create temporary file"
msgstr "не вдалося створити тимчасовий файл"
msgid "insufficient capabilities"
-msgstr ""
+msgstr "недостатні здібності"
#, c-format
msgid "file downloaded from '%s' is not a bundle"
@@ -12955,11 +13751,11 @@ msgstr "не вдалося зберегти токен максимальног
#, c-format
msgid "unrecognized bundle mode from URI '%s'"
-msgstr ""
+msgstr "нерозпізнаний режим пакунка з URI \"%s\""
#, c-format
msgid "exceeded bundle URI recursion limit (%d)"
-msgstr ""
+msgstr "перевищено ліміт рекурсії URI пакунка (%d)"
#, c-format
msgid "failed to download bundle from URI '%s'"
@@ -12967,23 +13763,23 @@ msgstr "не вдалося завантажити пакунок з URI \"%s\""
#, c-format
msgid "file at URI '%s' is not a bundle or bundle list"
-msgstr ""
+msgstr "файл з URI \"%s\" не є пакунком або списком пакунків"
#, c-format
msgid "bundle-uri: unexpected argument: '%s'"
-msgstr ""
+msgstr "bundle-uri: неочікуваний аргумент: \"%s\""
msgid "bundle-uri: expected flush after arguments"
-msgstr ""
+msgstr "bundle-uri: очікувалось flush після аргументів"
msgid "bundle-uri: got an empty line"
-msgstr ""
+msgstr "bundle-uri: отримано порожній рядок"
msgid "bundle-uri: line is not of the form 'key=value'"
-msgstr ""
+msgstr "bundle-uri: рядок не відповідає формату \"key=value\""
msgid "bundle-uri: line has empty key or value"
-msgstr ""
+msgstr "bundle-uri: рядок має порожній ключ або значення"
#, c-format
msgid "unrecognized bundle hash algorithm: %s"
@@ -12995,39 +13791,49 @@ msgstr "невідома властивість \"%s\""
#, c-format
msgid "'%s' does not look like a v2 or v3 bundle file"
-msgstr ""
+msgstr "\"%s\" не схожий на файл пакунка v2 або v3"
#, c-format
msgid "unrecognized header: %s%s (%d)"
-msgstr ""
+msgstr "нерозпізнаний заголовок: %s%s (%d)"
msgid "Repository lacks these prerequisite commits:"
-msgstr ""
+msgstr "У сховищі не вистачає обовʼязкових комітів:"
msgid "need a repository to verify a bundle"
-msgstr ""
+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:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Пакунок містить це %<PRIuMAX> посилання:"
+msgstr[1] "Пакунок містить ці %<PRIuMAX> посилання:"
+msgstr[2] "Пакунок містить ці %<PRIuMAX> посилань:"
msgid "The bundle records a complete history."
-msgstr ""
+msgstr "Пакунок записує повну історію."
#, c-format
msgid "The bundle requires this ref:"
msgid_plural "The bundle requires these %<PRIuMAX> refs:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Пакунок потребує це %<PRIuMAX> посилання:"
+msgstr[1] "Пакунок потребує ці %<PRIuMAX> посилання:"
+msgstr[2] "Пакунок потребує ці %<PRIuMAX> посилань:"
+
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "Пакунок використовує такий алгоритм хешування: %s"
+
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Пакунок використовує такий фільтр: %s"
msgid "unable to dup bundle descriptor"
msgstr "не вдалося продублювати дескриптор пакунка"
@@ -13036,44 +13842,44 @@ msgid "Could not spawn pack-objects"
msgstr "Не вдалося розмножити об’єкти пакунків"
msgid "pack-objects died"
-msgstr ""
+msgstr "pack-objects завершився невдало"
#, c-format
msgid "ref '%s' is excluded by the rev-list options"
-msgstr ""
+msgstr "посилання \"%s\" виключено опціями rev-list"
#, c-format
msgid "unsupported bundle version %d"
-msgstr ""
+msgstr "непідтримувана версія пакунка %d"
#, c-format
msgid "cannot write bundle version %d with algorithm %s"
-msgstr ""
+msgstr "неможливо записати версію пакунка %d з алгоритмом %s"
msgid "Refusing to create empty bundle."
-msgstr ""
+msgstr "Відмовлено в створенні порожнього пакунка."
#, c-format
msgid "cannot create '%s'"
msgstr "неможливо створити \"%s\""
msgid "index-pack died"
-msgstr ""
+msgstr "index-pack завершився невдало"
msgid "terminating chunk id appears earlier than expected"
-msgstr ""
+msgstr "ідентифікатор завершення фрагмента зʼявився раніше, ніж очікувалось"
#, c-format
msgid "improper chunk offset(s) %<PRIx64> and %<PRIx64>"
-msgstr ""
+msgstr "невірне зміщення шматка(ів) %<PRIx64> та %<PRIx64>"
#, c-format
msgid "duplicate chunk ID %<PRIx32> found"
-msgstr ""
+msgstr "знайдено дубльований шматок з ідентифікатором %<PRIx32>"
#, c-format
msgid "final chunk has non-zero id %<PRIx32>"
-msgstr ""
+msgstr "заключний шматок має ненульовий ідентифікатор %<PRIx32>"
msgid "invalid hash version"
msgstr "неприпустима версія хешу"
@@ -13083,373 +13889,377 @@ msgid "invalid color value: %.*s"
msgstr "неприпустиме значення кольору: %.*s"
msgid "Add file contents to the index"
-msgstr ""
+msgstr "Додати вміст файлу до індексу"
msgid "Apply a series of patches from a mailbox"
-msgstr ""
+msgstr "Застосувати серію латок з поштової скриньки"
msgid "Annotate file lines with commit information"
-msgstr ""
+msgstr "Анотувати рядки файлів з інформацією про коміти"
msgid "Apply a patch to files and/or to the index"
-msgstr ""
+msgstr "Застосувати латку до файлів та/або до індексу"
msgid "Import a GNU Arch repository into Git"
-msgstr ""
+msgstr "Імпортувати GNU Arch сховище до Git"
msgid "Create an archive of files from a named tree"
-msgstr ""
+msgstr "Створити архів файлів з названого дерева"
msgid "Use binary search to find the commit that introduced a bug"
-msgstr ""
+msgstr "Використати бінарний пошук, щоб знайти коміт, який вніс помилку"
msgid "Show what revision and author last modified each line of a file"
-msgstr ""
+msgstr "Показати, яка ревізія та автор востаннє змінювали кожен рядок файлу"
msgid "List, create, or delete branches"
msgstr "Показати, створити або видалити гілки"
msgid "Collect information for user to file a bug report"
-msgstr ""
+msgstr "Зібрати інформацію, щоб користувач міг подати звіт про помилку"
msgid "Move objects and refs by archive"
-msgstr ""
+msgstr "Перенести архів обʼєктів та посилань"
msgid "Provide content or type and size information for repository objects"
-msgstr ""
+msgstr "Показати вміст або інформацію про тип і розмір обʼєктів сховища"
msgid "Display gitattributes information"
-msgstr ""
+msgstr "Відобразити інформацію про gitattributes"
msgid "Debug gitignore / exclude files"
-msgstr ""
+msgstr "Відлагодити gitignore / вилучити файли"
msgid "Show canonical names and email addresses of contacts"
-msgstr ""
+msgstr "Показати канонічні імена та адреси електронної пошти контактів"
msgid "Ensures that a reference name is well formed"
-msgstr ""
+msgstr "Забезпечує правильне формування назви посилання"
msgid "Switch branches or restore working tree files"
msgstr "Перемкнути гілки або відновити файли робочого дерева"
msgid "Copy files from the index to the working tree"
-msgstr ""
+msgstr "Скопіювати файли з індексу в робоче дерево"
msgid "Find commits yet to be applied to upstream"
-msgstr ""
+msgstr "Знайти коміти, які ще не були застосовані до першоджерельного сховища"
msgid "Apply the changes introduced by some existing commits"
-msgstr ""
+msgstr "Застосувати зміни, внесені деякими існуючими комітами"
msgid "Graphical alternative to git-commit"
-msgstr ""
+msgstr "Графічна альтернатива git-commit"
msgid "Remove untracked files from the working tree"
msgstr "Видалити невідстежувані файли з робочого дерева"
msgid "Clone a repository into a new directory"
-msgstr ""
+msgstr "Клонувати сховище в нову директорію"
msgid "Display data in columns"
-msgstr ""
+msgstr "Відобразити дані в стовпчиках"
msgid "Record changes to the repository"
msgstr "Записати зміни у сховище"
msgid "Write and verify Git commit-graph files"
-msgstr ""
+msgstr "Записати та перевірити файли коміт-графа Git"
msgid "Create a new commit object"
-msgstr ""
+msgstr "Створити новий обʼєкт коміту"
msgid "Get and set repository or global options"
-msgstr ""
+msgstr "Отримати та встановити параметри сховища або глобальні параметри"
msgid "Count unpacked number of objects and their disk consumption"
-msgstr ""
+msgstr "Підрахувати кількість розпакованих обʼєктів та їхнє використання диска"
msgid "Retrieve and store user credentials"
-msgstr ""
+msgstr "Отримати та зберегти облікові дані користувача"
msgid "Helper to temporarily store passwords in memory"
-msgstr ""
+msgstr "Помічник для тимчасового зберігання паролів у памʼяті"
msgid "Helper to store credentials on disk"
-msgstr ""
+msgstr "Помічник для зберігання облікових даних на диску"
msgid "Export a single commit to a CVS checkout"
-msgstr ""
+msgstr "Експортувати окремий коміт до CVS стану"
msgid "Salvage your data out of another SCM people love to hate"
-msgstr ""
+msgstr "Врятувати свої дані з іншої SCM, яку всі так неполюбляють"
msgid "A CVS server emulator for Git"
-msgstr ""
+msgstr "Емулятор CVS сервера для Git"
msgid "A really simple server for Git repositories"
-msgstr ""
+msgstr "Дуже простий сервер для Git сховищ"
msgid "Give an object a human readable name based on an available ref"
msgstr ""
+"Надати обʼєкту читабельну для людини назву на основі наявного посилання"
msgid "Generate a zip archive of diagnostic information"
-msgstr ""
+msgstr "Згенерувати zip-архів з діагностичною інформацією"
msgid "Show changes between commits, commit and working tree, etc"
msgstr "Показати зміни між комітами, комітом та робочим деревом, тощо"
msgid "Compares files in the working tree and the index"
-msgstr ""
+msgstr "Порівнює файли в робочому дереві та індексі"
msgid "Compare a tree to the working tree or index"
msgstr "Порівняти дерево з робочим деревом або індексом"
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr ""
+"Порівнює вміст та режим blob обʼєктів, знайдених у двох обʼєктах дерева"
msgid "Show changes using common diff tools"
-msgstr ""
+msgstr "Показати зміни за допомогою звичайних diff засобів"
msgid "Git data exporter"
-msgstr ""
+msgstr "Експортер даних Git"
msgid "Backend for fast Git data importers"
-msgstr ""
+msgstr "Обробник для швидких імпортерів даних Git"
msgid "Download objects and refs from another repository"
-msgstr ""
+msgstr "Завантажити обʼєкти та посилання з іншого сховища"
msgid "Receive missing objects from another repository"
-msgstr ""
+msgstr "Отримати відсутні обʼєкти з іншого сховища"
msgid "Rewrite branches"
msgstr "Перезаписати гілки"
msgid "Produce a merge commit message"
-msgstr ""
+msgstr "Створити допис до коміту злиття"
msgid "Output information on each ref"
-msgstr ""
+msgstr "Вивести інформацію про кожне посилання"
msgid "Run a Git command on a list of repositories"
-msgstr ""
+msgstr "Запустити команду Git на списку сховищ"
msgid "Prepare patches for e-mail submission"
-msgstr ""
+msgstr "Підготувати латки для надсилання електронною поштою"
msgid "Verifies the connectivity and validity of the objects in the database"
-msgstr ""
+msgstr "Перевіряє звʼязність та валідність обʼєктів у базі даних"
msgid "Cleanup unnecessary files and optimize the local repository"
-msgstr ""
+msgstr "Видалити непотрібні файли та оптимізувати локальне сховище"
msgid "Extract commit ID from an archive created using git-archive"
msgstr ""
+"Витягти ідентифікатор коміту з архіву, створеного за допомогою git-archive"
msgid "Print lines matching a pattern"
-msgstr ""
+msgstr "Вивести рядки, що відповідають шаблону"
msgid "A portable graphical interface to Git"
-msgstr ""
+msgstr "Портативний графічний інтерфейс до Git"
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr ""
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "Обчислити ідентифікатор обʼєкта та за бажанням створити обʼєкт з файлу"
msgid "Display help information about Git"
-msgstr ""
+msgstr "Відобразити довідкову інформацію про Git"
msgid "Run git hooks"
-msgstr ""
+msgstr "Запустити git гачки"
msgid "Server side implementation of Git over HTTP"
-msgstr ""
+msgstr "Серверна реалізація Git через HTTP"
msgid "Download from a remote Git repository via HTTP"
-msgstr ""
+msgstr "Завантажити з віддаленого Git сховища через HTTP"
msgid "Push objects over HTTP/DAV to another repository"
-msgstr ""
+msgstr "Надіслати обʼєкти через HTTP/DAV до іншого сховища"
msgid "Send a collection of patches from stdin to an IMAP folder"
-msgstr ""
+msgstr "Надіслати збірку латок з stdin до теки IMAP"
msgid "Build pack index file for an existing packed archive"
-msgstr ""
+msgstr "Побудувати індексний файл пакунка для існуючого запакованого архіву"
msgid "Create an empty Git repository or reinitialize an existing one"
-msgstr ""
+msgstr "Створити порожнє Git сховище або переініціалізувати існуюче"
msgid "Instantly browse your working repository in gitweb"
-msgstr ""
+msgstr "Миттєво переглянути своє робоче сховище в gitweb"
msgid "Add or parse structured information in commit messages"
-msgstr ""
+msgstr "Додати або розібрати структуровану інформацію в дописах до комітів"
msgid "Show commit logs"
-msgstr "Показати лог коміта"
+msgstr "Показати журнал коміту"
msgid "Show information about files in the index and the working tree"
-msgstr ""
+msgstr "Показати інформацію про файли в індексі та робочому дереві"
msgid "List references in a remote repository"
msgstr "Показати посилання у віддаленому сховищі"
msgid "List the contents of a tree object"
-msgstr ""
+msgstr "Показати вміст обʼєкта дерева"
msgid "Extracts patch and authorship from a single e-mail message"
-msgstr ""
+msgstr "Витягує латку та авторство з одного повідомлення електронної пошти"
msgid "Simple UNIX mbox splitter program"
-msgstr ""
+msgstr "Проста програма-розщеплювач UNIX mbox"
msgid "Run tasks to optimize Git repository data"
-msgstr ""
+msgstr "Запустити завдання для оптимізації даних Git сховища"
msgid "Join two or more development histories together"
-msgstr ""
+msgstr "Обʼєднати дві або більше історій розробки"
msgid "Find as good common ancestors as possible for a merge"
-msgstr ""
+msgstr "Знайти якомога кращого спільного предка для злиття"
msgid "Run a three-way file merge"
-msgstr ""
+msgstr "Запустити тристороннє злиття файлів"
msgid "Run a merge for files needing merging"
-msgstr ""
+msgstr "Запустити злиття для файлів, які потрібно обʼєднати"
msgid "The standard helper program to use with git-merge-index"
-msgstr ""
+msgstr "Стандартна допоміжна програма для використання з git-merge-index"
msgid "Perform merge without touching index or working tree"
-msgstr ""
+msgstr "Виконати злиття, не торкаючись індексу або робочого дерева"
msgid "Run merge conflict resolution tools to resolve merge conflicts"
msgstr ""
+"Запустити інструменти вирішення конфліктів, щоб вирішити конфлікти злиття"
msgid "Creates a tag object with extra validation"
-msgstr ""
+msgstr "Створює обʼєкт тегу з додатковою перевіркою"
msgid "Build a tree-object from ls-tree formatted text"
-msgstr ""
+msgstr "Побудувати обʼєкт дерева з ls-tree форматованого тексту"
msgid "Write and verify multi-pack-indexes"
-msgstr ""
+msgstr "Записати і перевірити multi-pack-indexes"
msgid "Move or rename a file, a directory, or a symlink"
-msgstr ""
+msgstr "Перемістити або перейменувати файл, директорію або символьне посилання"
msgid "Find symbolic names for given revs"
-msgstr ""
+msgstr "Знайти символьни назви для заданих ревізій"
msgid "Add or inspect object notes"
-msgstr "Додайте або перевірте нотатки до обʼєктів"
+msgstr "Додати або перевірити нотатки до обʼєктів"
msgid "Import from and submit to Perforce repositories"
-msgstr ""
+msgstr "Імпортувати з та надсилати до Perforce сховищ"
msgid "Create a packed archive of objects"
-msgstr ""
+msgstr "Створити запакований архів обʼєктів"
msgid "Find redundant pack files"
msgstr "Знайти зайві файли пакунків"
msgid "Pack heads and tags for efficient repository access"
-msgstr ""
+msgstr "Запакувати верхівки та теги для ефективного доступу до сховища"
msgid "Compute unique ID for a patch"
-msgstr ""
+msgstr "Обчислити унікальний ідентифікатор для патчу"
msgid "Prune all unreachable objects from the object database"
-msgstr ""
+msgstr "Видалити всі недосяжні обʼєкти з бази даних обʼєктів"
msgid "Remove extra objects that are already in pack files"
-msgstr ""
+msgstr "Видалити зайві обʼєкти, які вже є у файлах пакунків"
msgid "Fetch from and integrate with another repository or a local branch"
-msgstr ""
+msgstr "Отримати та інтегрувати з іншим сховищем або локальною гілкою"
msgid "Update remote refs along with associated objects"
-msgstr ""
+msgstr "Оновити віддалені посилання разом з асоційованими обʼєктами"
msgid "Applies a quilt patchset onto the current branch"
-msgstr ""
+msgstr "Застосовує набір латок до поточної гілки"
msgid "Compare two commit ranges (e.g. two versions of a branch)"
-msgstr ""
+msgstr "Порівняти два діапазони комітів (наприклад, дві версії гілки)"
msgid "Reads tree information into the index"
-msgstr ""
+msgstr "Зчитує інформацію про дерево в індекс"
msgid "Reapply commits on top of another base tip"
-msgstr ""
+msgstr "Застосувати коміти поверх іншої верхівки бази"
msgid "Receive what is pushed into the repository"
-msgstr ""
+msgstr "Отримати те, що надсилається до сховища"
msgid "Manage reflog information"
-msgstr ""
+msgstr "Керування інформацією журналу посилань"
msgid "Manage set of tracked repositories"
msgstr "Керувати набором відстежуваних сховищ"
msgid "Pack unpacked objects in a repository"
-msgstr ""
+msgstr "Запакувати розпаковані обʼєкти у сховищі"
msgid "Create, list, delete refs to replace objects"
-msgstr ""
+msgstr "Створити, показати, видалити посилання для об’єктів заміни"
msgid "Generates a summary of pending changes"
-msgstr ""
+msgstr "Створює підсумок змін для розгляду"
msgid "Reuse recorded resolution of conflicted merges"
-msgstr ""
+msgstr "Використати повторно записане розв’язання конфліктних злиттів"
msgid "Reset current HEAD to the specified state"
-msgstr ""
+msgstr "Скинути поточний HEAD до вказаного стану"
msgid "Restore working tree files"
msgstr "Відновити файли робочого дерева"
msgid "Lists commit objects in reverse chronological order"
-msgstr ""
+msgstr "Показувати обʼєкти коміту у зворотному хронологічному порядку"
msgid "Pick out and massage parameters"
-msgstr ""
+msgstr "Визначення та обробка параметрів"
msgid "Revert some existing commits"
-msgstr ""
+msgstr "Вивернути деякі існуючі коміти"
msgid "Remove files from the working tree and from the index"
-msgstr ""
+msgstr "Видалити файли з робочого дерева та з індексу"
msgid "Send a collection of patches as emails"
-msgstr ""
+msgstr "Надіслати колекцію латок у вигляді електронних листів"
msgid "Push objects over Git protocol to another repository"
-msgstr ""
+msgstr "Надіслати обʼєкти за протоколом Git до іншого сховища"
msgid "Git's i18n setup code for shell scripts"
-msgstr ""
+msgstr "Код налаштування i18n у Git для скриптів оболонки"
msgid "Common Git shell script setup code"
-msgstr ""
+msgstr "Загальний код налаштування скриптів оболонки Git"
msgid "Restricted login shell for Git-only SSH access"
-msgstr ""
+msgstr "Обмежений логін оболонки для доступу по SSH лише для Git"
msgid "Summarize 'git log' output"
-msgstr ""
+msgstr "Підсумувати вивід \"git log\""
msgid "Show various types of objects"
-msgstr ""
+msgstr "Показати різні типи об’єктів"
msgid "Show branches and their commits"
msgstr "Показати гілки та їхні коміти"
msgid "Show packed archive index"
-msgstr ""
+msgstr "Показати індекс запакованого архіву"
msgid "List references in a local repository"
msgstr "Показати посилання у локальному сховищі"
@@ -13458,251 +14268,256 @@ msgid "Reduce your working tree to a subset of tracked files"
msgstr "Скоротити робоче дерево до підмножини відстежуваних файлів"
msgid "Add file contents to the staging area"
-msgstr ""
+msgstr "Додати вміст файлу до області індексації"
msgid "Stash the changes in a dirty working directory away"
-msgstr ""
+msgstr "Перенести зміни в брудній робочій директорії до схову"
msgid "Show the working tree status"
msgstr "Показати стан робочого дерева"
msgid "Remove unnecessary whitespace"
-msgstr ""
+msgstr "Видалити зайві пробіли"
msgid "Initialize, update or inspect submodules"
-msgstr ""
+msgstr "Ініціалізувати, оновити або перевірити підмодулі"
msgid "Bidirectional operation between a Subversion repository and Git"
-msgstr ""
+msgstr "Двонаправлена операція між Subversion сховищем та Git"
msgid "Switch branches"
msgstr "Переключити гілки"
msgid "Read, modify and delete symbolic refs"
-msgstr ""
+msgstr "Прочитати, змінити та видалити символьні посилання"
msgid "Create, list, delete or verify a tag object signed with GPG"
msgstr ""
+"Створити, показати, видалити або перевірити обʼєкт тегу, підписаний GPG"
msgid "Creates a temporary file with a blob's contents"
-msgstr ""
+msgstr "Створює тимчасовий файл із вмістом blob"
msgid "Unpack objects from a packed archive"
-msgstr ""
+msgstr "Розпакувати обʼєкти із запакованого архіву"
msgid "Register file contents in the working tree to the index"
-msgstr ""
+msgstr "Зареєструвати вміст файлу робочого дерева в індексі"
msgid "Update the object name stored in a ref safely"
-msgstr ""
+msgstr "Безпечно оновити назву обʼєкта, що зберігається в посиланні"
msgid "Update auxiliary info file to help dumb servers"
-msgstr ""
+msgstr "Оновити додатковий інформаційний файл для допомоги \"тупим\" серверам"
msgid "Send archive back to git-archive"
-msgstr ""
+msgstr "Надіслати архів назад до git-archive"
msgid "Send objects packed back to git-fetch-pack"
-msgstr ""
+msgstr "Надіслати запаковані обʼєкти назад до git-fetch-pack"
msgid "Show a Git logical variable"
-msgstr ""
+msgstr "Показати логічну змінну Git"
msgid "Check the GPG signature of commits"
-msgstr ""
+msgstr "Перевірити GPG-підпис комітів"
msgid "Validate packed Git archive files"
-msgstr ""
+msgstr "Перевірити запаковані файли Git архіву"
msgid "Check the GPG signature of tags"
-msgstr ""
+msgstr "Перевірити GPG-підпис тегів"
msgid "Display version information about Git"
-msgstr ""
+msgstr "Показати інформацію про версію Git"
msgid "Show logs with difference each commit introduces"
-msgstr ""
+msgstr "Показати журнал з різницею, яку вносить кожен коміт"
msgid "Manage multiple working trees"
msgstr "Керувати кількома робочими деревами"
msgid "Create a tree object from the current index"
-msgstr ""
+msgstr "Створити обʼєкт дерева з поточного індексу"
msgid "Defining attributes per path"
-msgstr ""
+msgstr "Визначення атрибутів для кожного шляху"
msgid "Git command-line interface and conventions"
-msgstr ""
+msgstr "Інтерфейс та конвенції командного рядка Git"
msgid "A Git core tutorial for developers"
-msgstr ""
+msgstr "Інструкція по ядру Git для розробників"
msgid "Providing usernames and passwords to Git"
-msgstr ""
+msgstr "Надання імен користувачів та паролів до Git"
msgid "Git for CVS users"
-msgstr ""
+msgstr "Git для користувачів CVS"
msgid "Tweaking diff output"
-msgstr ""
+msgstr "Налаштування виводу різниці"
msgid "A useful minimum set of commands for Everyday Git"
-msgstr ""
+msgstr "Корисний мінімальний набір команд для повсякденного використання Git"
msgid "Frequently asked questions about using Git"
-msgstr ""
+msgstr "Поширені запитання про використання Git"
msgid "The bundle file format"
-msgstr "Формат файлу пакета"
+msgstr "Формат файлу пакунка"
msgid "Chunk-based file formats"
-msgstr ""
+msgstr "Файлові формати на основі шматків"
msgid "Git commit-graph format"
-msgstr ""
+msgstr "Формат Git коміт-графа"
msgid "Git index format"
-msgstr ""
+msgstr "Формат Git індекса"
msgid "Git pack format"
-msgstr ""
+msgstr "Формат Git пакунка"
msgid "Git cryptographic signature formats"
-msgstr ""
+msgstr "Формати криптографічного підпису Git"
msgid "A Git Glossary"
-msgstr ""
+msgstr "Git словник"
msgid "Hooks used by Git"
-msgstr ""
+msgstr "Гачки, що використовує Git"
msgid "Specifies intentionally untracked files to ignore"
-msgstr ""
+msgstr "Вказує навмисно невідстежувані файли для ігнорування"
msgid "The Git repository browser"
-msgstr ""
+msgstr "Браузер сховища Git"
msgid "Map author/committer names and/or E-Mail addresses"
-msgstr ""
+msgstr "Зробити мапу імен авторів/комітерів та/або адрес електронної пошти"
msgid "Defining submodule properties"
-msgstr ""
+msgstr "Визначення властивостей підмодулів"
msgid "Git namespaces"
-msgstr ""
+msgstr "Простори імен Git"
msgid "Protocol v0 and v1 capabilities"
-msgstr ""
+msgstr "Здібності протоколів v0 та v1"
msgid "Things common to various protocols"
-msgstr ""
+msgstr "Спільні риси різних протоколів"
msgid "Git HTTP-based protocols"
-msgstr ""
+msgstr "Git протоколи на основі HTTP"
msgid "How packs are transferred over-the-wire"
-msgstr ""
+msgstr "Як пакунки передаються по дроту"
msgid "Git Wire Protocol, Version 2"
-msgstr ""
+msgstr "Протокол Git Wire, версія 2"
msgid "Helper programs to interact with remote repositories"
-msgstr ""
+msgstr "Програми-помічники для взаємодії з віддаленими сховищами"
msgid "Git Repository Layout"
-msgstr ""
+msgstr "Схема Git сховища"
msgid "Specifying revisions and ranges for Git"
-msgstr ""
+msgstr "Визначення ревізій та діапазонів для Git"
msgid "Mounting one repository inside another"
-msgstr ""
+msgstr "Монтування одного сховища всередині іншого"
msgid "A tutorial introduction to Git"
-msgstr ""
+msgstr "Навчальний вступ до Git"
msgid "A tutorial introduction to Git: part two"
-msgstr ""
+msgstr "Навчальний вступ до Git: частина друга"
msgid "Git web interface (web frontend to Git repositories)"
-msgstr ""
+msgstr "Веб-інтерфейс Git (веб-фронтенд до сховищ Git)"
msgid "An overview of recommended workflows with Git"
-msgstr ""
+msgstr "Огляд рекомендованих робочих процесів з Git"
msgid "A tool for managing large Git repositories"
-msgstr ""
+msgstr "Інструмент для керування великими сховищами Git"
msgid "commit-graph file is too small"
-msgstr ""
+msgstr "файл коміт-графа занадто малий"
#, c-format
msgid "commit-graph signature %X does not match signature %X"
-msgstr ""
+msgstr "підпис коміт-графа %X не збігається з підписом %X"
#, c-format
msgid "commit-graph version %X does not match version %X"
-msgstr ""
+msgstr "версія коміт-графа %X не збігається з версією %X"
#, c-format
msgid "commit-graph hash version %X does not match version %X"
-msgstr ""
+msgstr "хеш версія коміт-графа %X не збігається з версією %X"
#, c-format
msgid "commit-graph file is too small to hold %u chunks"
-msgstr ""
+msgstr "файл коміт-графа занадто малий, щоб вмістити %u шматків"
msgid "commit-graph has no base graphs chunk"
-msgstr ""
+msgstr "коміт-граф не має шматка базових графів"
msgid "commit-graph chain does not match"
-msgstr ""
+msgstr "ланцюжок коміт-графа не співпадає"
+
+#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "кількість комітів у базовому графі занадто велика: %<PRIuMAX>"
#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
-msgstr ""
+msgstr "неприпустимий ланцюжок коміт-графа: рядок \"%s\" не є хешем"
msgid "unable to find all commit-graph files"
-msgstr "не вдалося знайти всі файли графа комітів"
+msgstr "не вдалося знайти всі файли коміт-графа"
msgid "invalid commit position. commit-graph is likely corrupt"
-msgstr ""
+msgstr "неприпустима позиція коміту, ймовірно, коміт-граф пошкоджено"
#, c-format
msgid "could not find commit %s"
msgstr "не вдалося знайти коміт %s"
msgid "commit-graph requires overflow generation data but has none"
-msgstr ""
+msgstr "коміт-граф потребує даних генерації переповнення, але їх немаєданих"
msgid "Loading known commits in commit graph"
-msgstr ""
+msgstr "Завантаження відомих комітів у коміт-графі"
msgid "Expanding reachable commits in commit graph"
-msgstr ""
+msgstr "Розширення досяжних комітів у коміт-графі"
msgid "Clearing commit marks in commit graph"
-msgstr ""
+msgstr "Очищення позначок комітів у коміт-графі"
msgid "Computing commit graph topological levels"
-msgstr ""
+msgstr "Обчислення топологічних рівнів коміт-графа"
msgid "Computing commit graph generation numbers"
-msgstr ""
+msgstr "Обчислення номерів генерації коміт-графа"
msgid "Computing commit changed paths Bloom filters"
-msgstr ""
+msgstr "Обчислення фільтрів Блума для шляхів, змінених комітом"
msgid "Collecting referenced commits"
-msgstr ""
+msgstr "Збір посилань на коміти"
#, c-format
msgid "Finding commits for commit graph in %<PRIuMAX> pack"
msgid_plural "Finding commits for commit graph in %<PRIuMAX> packs"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Пошук комітів для коміт-графа у %<PRIuMAX> пакунку"
+msgstr[1] "Пошук комітів для коміт-графа у %<PRIuMAX> пакунках"
+msgstr[2] "Пошук комітів для коміт-графа у %<PRIuMAX> пакунках"
#, c-format
msgid "error adding pack %s"
@@ -13710,16 +14525,16 @@ msgstr "помилка додавання пакету %s"
#, c-format
msgid "error opening index for %s"
-msgstr ""
+msgstr "помилка відкриття індексу для %s"
msgid "Finding commits for commit graph among packed objects"
-msgstr ""
+msgstr "Пошук комітів для коміт-графа серед запакованих обʼєктів"
msgid "Finding extra edges in commit graph"
-msgstr ""
+msgstr "Пошук додаткових ребер у коміт-графі"
msgid "failed to write correct number of base graph ids"
-msgstr ""
+msgstr "не вдалося записати правильну кількість ідентифікаторів базових графів"
msgid "unable to create temporary graph layer"
msgstr "не вдалося створити тимчасовий шар графа"
@@ -13731,90 +14546,100 @@ msgstr "не вдалося налаштувати спільні дозволи
#, c-format
msgid "Writing out commit graph in %d pass"
msgid_plural "Writing out commit graph in %d passes"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Виведення коміт-графа за %d прохід"
+msgstr[1] "Виведення коміт-графа за %d проходи"
+msgstr[2] "Виведення коміт-графа за %d проходів"
msgid "unable to open commit-graph chain file"
-msgstr "не вдалося відкрити ланцюжковий файл графа комітів"
+msgstr "не вдалося відкрити ланцюжковий файл коміт-графа"
msgid "failed to rename base commit-graph file"
-msgstr ""
+msgstr "не вдалося перейменувати базовий файл коміт-графа"
msgid "failed to rename temporary commit-graph file"
-msgstr "не вдалося перейменувати тимчасовий файл графа комітів"
+msgstr "не вдалося перейменувати тимчасовий файл коміт-графа"
+
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "неможливо обʼєднати графи з %<PRIuMAX>, %<PRIuMAX> комітів"
+
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "неможливо обʼєднати граф %s, занадто багато комітів: %<PRIuMAX>"
msgid "Scanning merged commits"
-msgstr ""
+msgstr "Сканування злитих комітів"
msgid "Merging commit-graph"
-msgstr ""
+msgstr "Злиття коміт-графа"
msgid "attempting to write a commit-graph, but 'core.commitGraph' is disabled"
-msgstr ""
+msgstr "спроба записати коміт-граф, але \"core.commitGraph\" відключено"
msgid "too many commits to write graph"
-msgstr ""
+msgstr "занадто багато комітів, щоб записати граф"
msgid "the commit-graph file has incorrect checksum and is likely corrupt"
-msgstr ""
+msgstr "файл коміт-графа має невірну контрольну суму і, ймовірно, пошкоджений"
#, c-format
msgid "commit-graph has incorrect OID order: %s then %s"
-msgstr ""
+msgstr "коміт-граф має невірну OID послідовність: %s потім %s"
#, c-format
msgid "commit-graph has incorrect fanout value: fanout[%d] = %u != %u"
-msgstr ""
+msgstr "коміт-граф має невірне fanout значення: fanout[%d] = %u != %u"
#, c-format
msgid "failed to parse commit %s from commit-graph"
msgstr "не вдалося розібрати коміт %s з графа комітв"
-msgid "Verifying commits in commit graph"
-msgstr ""
-
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
-msgstr ""
+msgstr "не вдалося розібрати коміт %s з бази даних обʼєктів для коміт-графа"
#, c-format
msgid "root tree OID for commit %s in commit-graph is %s != %s"
-msgstr ""
+msgstr "OID кореневого дерева для коміту %s у коміт-графі є %s != %s"
#, c-format
msgid "commit-graph parent list for commit %s is too long"
-msgstr ""
+msgstr "список батьків для коміту %s коміт-графа занадто довгий"
#, c-format
msgid "commit-graph parent for %s is %s != %s"
-msgstr ""
+msgstr "батько для %s коміт-графа є %s != %s"
#, c-format
msgid "commit-graph parent list for commit %s terminates early"
-msgstr ""
+msgstr "список батьків коміт-графа для коміту %s завершився передчасно"
#, c-format
msgid ""
"commit-graph has generation number zero for commit %s, but non-zero elsewhere"
msgstr ""
+"коміт-граф має нульовий номер генерації для коміту %s, але ненульовий деінде"
#, c-format
msgid ""
"commit-graph has non-zero generation number for commit %s, but zero elsewhere"
msgstr ""
+"коміт-граф має ненульовий номер генерації для коміту %s, але нульовий деінде"
#, c-format
msgid "commit-graph generation for commit %s is %<PRIuMAX> < %<PRIuMAX>"
-msgstr ""
+msgstr "генерація коміт-графа для коміту %s є %<PRIuMAX> < %<PRIuMAX>"
#, c-format
msgid "commit date for commit %s in commit-graph is %<PRIuMAX> != %<PRIuMAX>"
-msgstr ""
+msgstr "дата коміту для коміту %s у коміт-графі є %<PRIuMAX> != %<PRIuMAX>"
+
+msgid "Verifying commits in commit graph"
+msgstr "Перевірка комітів у коміт-графі"
#, c-format
msgid "%s %s is not a commit!"
-msgstr ""
+msgstr "%s %s не є комітом!"
msgid ""
"Support for <GIT_DIR>/info/grafts is deprecated\n"
@@ -13826,14 +14651,22 @@ msgid ""
"Turn this message off by running\n"
"\"git config advice.graftFileDeprecated false\""
msgstr ""
+"Підтримка <GIT_DIR>/info/grafts застаріла\n"
+"і буде вилучена в одній з наступних версій Git.\n"
+"\n"
+"Будь ласка, скористайтесь \"git replace --convert-graft-file\"\n"
+"щоб перетворити щепи на заміни посилань.\n"
+"\n"
+"Щоб вимкнути це повідомлення, виконайте\n"
+"\"git config advice.graftFileDeprecated false\""
#, c-format
msgid "Commit %s has an untrusted GPG signature, allegedly by %s."
-msgstr ""
+msgstr "Коміт %s має недостовірний GPG-підпис, нібито від %s."
#, c-format
msgid "Commit %s has a bad GPG signature allegedly by %s."
-msgstr ""
+msgstr "Коміт %s має невірний GPG-підпис, нібито від %s."
#, c-format
msgid "Commit %s does not have a GPG signature."
@@ -13841,19 +14674,23 @@ msgstr "Коміт %s не має GPG підпису."
#, c-format
msgid "Commit %s has a good GPG signature by %s\n"
-msgstr ""
+msgstr "Коміт %s має добрий GPG-підпис від %s\n"
msgid ""
"Warning: commit message did not conform to UTF-8.\n"
"You may want to amend it after fixing the message, or set the config\n"
"variable i18n.commitEncoding to the encoding your project uses.\n"
msgstr ""
+"Попередження: допис до коміту не відповідає кодуванню UTF-8.\n"
+"Можливо, ви захочете змінити його після виправлення допису, або встановити "
+"змінну конфігурації\n"
+"i18n.commitEncoding у кодування, яке використовується у вашому проекті.\n"
msgid "no compiler information available\n"
-msgstr ""
+msgstr "немає інформації про компілятор\n"
msgid "no libc information available\n"
-msgstr ""
+msgstr "немає інформації про libc\n"
#, c-format
msgid "could not determine free disk size for '%s'"
@@ -13865,11 +14702,11 @@ msgstr "не вдалося отримати інформацію для \"%s\""
#, c-format
msgid "[GLE %ld] health thread could not open '%ls'"
-msgstr ""
+msgstr "[GLE %ld] потік стану не зміг відкрити \"%ls\""
#, c-format
msgid "[GLE %ld] health thread getting BHFI for '%ls'"
-msgstr ""
+msgstr "[GLE %ld] потік стану отримує BHFI для \"%ls\""
#, c-format
msgid "could not convert to wide characters: '%s'"
@@ -13877,15 +14714,15 @@ msgstr "не вдалося перетворити в широкі символ
#, c-format
msgid "BHFI changed '%ls'"
-msgstr ""
+msgstr "BHFI змінено \"%ls\""
#, c-format
msgid "unhandled case in 'has_worktree_moved': %d"
-msgstr ""
+msgstr "необроблений випадок у \"has_worktree_moved\": %d"
#, c-format
msgid "health thread wait failed [GLE %ld]"
-msgstr ""
+msgstr "очікування потоку стану завершилося невдало [GLE %ld]"
#, c-format
msgid "Invalid path: %s"
@@ -13899,23 +14736,23 @@ msgstr "Не вдалося запустити потік FSEventStream"
#, c-format
msgid "[GLE %ld] could not convert path to UTF-8: '%.*ls'"
-msgstr ""
+msgstr "[GLE %ld] не вдалося конвертувати шлях у UTF-8: \"%.*ls\""
#, c-format
msgid "[GLE %ld] could not watch '%s'"
-msgstr ""
+msgstr "[GLE %ld] стеження завершилось невдало \"%s\""
#, c-format
msgid "[GLE %ld] could not get longname of '%s'"
-msgstr ""
+msgstr "[GLE %ld] не вдалося отримати довгу назву \"%s\""
#, c-format
msgid "ReadDirectoryChangedW failed on '%s' [GLE %ld]"
-msgstr ""
+msgstr "ReadDirectoryChangedW завершилось невдало на \"%s\" [GLE %ld]"
#, c-format
msgid "GetOverlappedResult failed on '%s' [GLE %ld]"
-msgstr ""
+msgstr "GetOverlappedResult завершилось невдало на \"%s\" [GLE %ld]"
#, c-format
msgid "could not read directory changes [GLE %ld]"
@@ -13923,19 +14760,19 @@ msgstr "не вдалося прочитати зміни директорії [
#, c-format
msgid "opendir('%s') failed"
-msgstr ""
+msgstr "opendir(\"%s\") завершився невдало"
#, c-format
msgid "lstat('%s') failed"
-msgstr ""
+msgstr "lstat(\"%s\") завершився невдало"
#, c-format
msgid "strbuf_readlink('%s') failed"
-msgstr ""
+msgstr "strbuf_readlink(\"%s\") завершився невдало"
#, c-format
msgid "closedir('%s') failed"
-msgstr ""
+msgstr "closedir(\"%s\") завершився невдало"
#, c-format
msgid "[GLE %ld] unable to open for read '%ls'"
@@ -13943,7 +14780,7 @@ msgstr "[GLE %ld] не вдалося відкрити для читання \"%
#, c-format
msgid "[GLE %ld] unable to get protocol information for '%ls'"
-msgstr ""
+msgstr "[GLE %ld] не вдалося отримати інформацію про протокол для \"%ls\""
#, c-format
msgid "failed to copy SID (%ld)"
@@ -13954,64 +14791,64 @@ msgid "failed to get owner for '%s' (%ld)"
msgstr "не вдалося отримати власника для \"%s\" (%ld)"
msgid "memory exhausted"
-msgstr ""
+msgstr "памʼять вичерпано"
msgid "Success"
-msgstr ""
+msgstr "Успіх"
msgid "No match"
-msgstr ""
+msgstr "Немає збігів"
msgid "Invalid regular expression"
-msgstr ""
+msgstr "Неприпустимий регулярний вираз"
msgid "Invalid collation character"
-msgstr ""
+msgstr "Неприпустимий символ зведення"
msgid "Invalid character class name"
-msgstr ""
+msgstr "Неприпустима назва класу символів"
msgid "Trailing backslash"
-msgstr ""
+msgstr "Кінцева зворотна коса риска"
msgid "Invalid back reference"
msgstr "Неприпустиме зворотнє посилання"
msgid "Unmatched [ or [^"
-msgstr ""
+msgstr "Непарна [ або [^"
msgid "Unmatched ( or \\("
-msgstr ""
+msgstr "Непарна ( або \\("
msgid "Unmatched \\{"
-msgstr ""
+msgstr "Непарна \\{"
msgid "Invalid content of \\{\\}"
-msgstr ""
+msgstr "Неприпустимий вміст для \\{\\}"
msgid "Invalid range end"
-msgstr ""
+msgstr "Неприпустимий кінець діапазону"
msgid "Memory exhausted"
-msgstr ""
+msgstr "Памʼять вичерпано"
msgid "Invalid preceding regular expression"
-msgstr ""
+msgstr "Неприпустимий попередній регулярний вираз"
msgid "Premature end of regular expression"
-msgstr ""
+msgstr "Передчасне завершення регулярного виразу"
msgid "Regular expression too big"
-msgstr ""
+msgstr "Занадто великий регулярний вираз"
msgid "Unmatched ) or \\)"
-msgstr ""
+msgstr "Непарна ) або \\)"
msgid "No previous regular expression"
-msgstr ""
+msgstr "Немає попереднього регулярного виразу"
msgid "could not send IPC command"
-msgstr ""
+msgstr "не вдалося відправити IPC команду"
msgid "could not read IPC response"
msgstr "не вдалося прочитати IPC відповідь"
@@ -14026,7 +14863,7 @@ msgstr "не вдалося запустити worker[0] для \"%s\""
#, c-format
msgid "ConnectNamedPipe failed for '%s' (%lu)"
-msgstr ""
+msgstr "ConnectNamedPipe завершився невдало для \"%s\" (%lu)"
#, c-format
msgid "could not create fd from pipe for '%s'"
@@ -14042,9 +14879,11 @@ msgstr "очікування на hEvent не вдалося для \"%s\""
msgid "cannot resume in the background, please use 'fg' to resume"
msgstr ""
+"неможливо поновити роботу у фоновому режимі; будь ласка, скористайтесь "
+"\"fg\" для поновлення"
msgid "cannot restore terminal settings"
-msgstr ""
+msgstr "не вдалося відновити налаштування термінала"
#, c-format
msgid ""
@@ -14054,21 +14893,29 @@ msgid ""
"\t%s\n"
"This might be due to circular includes."
msgstr ""
+"перевищено максимальну глибину (%d) під час включення\n"
+"\t%s\n"
+"від\n"
+"\t%s\n"
+"Це може бути повʼязано з циклічним включенням."
#, c-format
msgid "could not expand include path '%s'"
msgstr "не вдалося визначити include path \"%s\""
msgid "relative config includes must come from files"
-msgstr ""
+msgstr "відносні конфігураційні включення мають надходити з файлів"
msgid "relative config include conditionals must come from files"
msgstr ""
+"відносні умовні позначення конфігураційних включень мають надходити з файлів"
msgid ""
"remote URLs cannot be configured in file directly or indirectly included by "
"includeIf.hasconfig:remote.*.url"
msgstr ""
+"віддалені URL-адреси не можуть бути налаштовані у файлі, прямо чи "
+"опосередковано включеному за допомогою includeIf.hasconfig:remote.*.url"
#, c-format
msgid "invalid config format: %s"
@@ -14076,19 +14923,19 @@ msgstr "неприпустимий формат конфігурації: %s"
#, c-format
msgid "missing environment variable name for configuration '%.*s'"
-msgstr ""
+msgstr "відсутня назва змінної оточення для конфігурації \"%.*s\""
#, c-format
msgid "missing environment variable '%s' for configuration '%.*s'"
-msgstr ""
+msgstr "відсутня змінна оточення \"%s\" для конфігурації \"%.*s\""
#, c-format
msgid "key does not contain a section: %s"
-msgstr ""
+msgstr "ключ не містить розділу: %s"
#, c-format
msgid "key does not contain variable name: %s"
-msgstr ""
+msgstr "ключ не містить назви змінної: %s"
#, c-format
msgid "invalid key: %s"
@@ -14099,89 +14946,95 @@ msgid "invalid key (newline): %s"
msgstr "неприпустимий ключ (новий рядок): %s"
msgid "empty config key"
-msgstr ""
+msgstr "порожній ключ конфігурації"
#, c-format
msgid "bogus config parameter: %s"
-msgstr ""
+msgstr "хибний параметр конфігурації: %s"
#, c-format
msgid "bogus format in %s"
-msgstr ""
+msgstr "хибний формат у %s"
#, c-format
msgid "bogus count in %s"
-msgstr ""
+msgstr "хибна кількість у %s"
#, c-format
msgid "too many entries in %s"
-msgstr ""
+msgstr "забагато записів у %s"
#, c-format
msgid "missing config key %s"
-msgstr ""
+msgstr "відсутній ключ конфігурації %s"
#, c-format
msgid "missing config value %s"
-msgstr ""
+msgstr "відсутнє значення конфігурації %s"
#, c-format
msgid "bad config line %d in blob %s"
-msgstr ""
+msgstr "невірний конфігураційний рядок %d у blob %s"
#, c-format
msgid "bad config line %d in file %s"
-msgstr ""
+msgstr "невірний конфігураційний рядок %d у файлі %s"
#, c-format
msgid "bad config line %d in standard input"
-msgstr ""
+msgstr "невірний конфігураційний рядок %d у стандартному вводі"
#, c-format
msgid "bad config line %d in submodule-blob %s"
-msgstr ""
+msgstr "невірний конфігураційний рядок %d у підмодулі-blob %s"
#, c-format
msgid "bad config line %d in command line %s"
-msgstr ""
+msgstr "невірний конфігураційний рядок %d у командному рядку %s"
#, c-format
msgid "bad config line %d in %s"
-msgstr ""
+msgstr "невірний конфігураційний рядок %d в %s"
msgid "out of range"
-msgstr ""
+msgstr "поза межами діапазону"
msgid "invalid unit"
msgstr "неприпустима одиниця виміру"
#, c-format
msgid "bad numeric config value '%s' for '%s': %s"
-msgstr ""
+msgstr "невірне числове значення конфігурації \"%s\" для \"%s\": %s"
#, c-format
msgid "bad numeric config value '%s' for '%s' in blob %s: %s"
-msgstr ""
+msgstr "невірне числове значення конфігурації \"%s\" для \"%s\" у blob %s: %s"
#, c-format
msgid "bad numeric config value '%s' for '%s' in file %s: %s"
-msgstr ""
+msgstr "невірне числове значення конфігурації \"%s\" для \"%s\" у файлі %s: %s"
#, c-format
msgid "bad numeric config value '%s' for '%s' in standard input: %s"
msgstr ""
+"невірне числове значення конфігурації \"%s\" для \"%s\" у стандартному "
+"вводі: %s"
#, c-format
msgid "bad numeric config value '%s' for '%s' in submodule-blob %s: %s"
msgstr ""
+"невірне числове значення конфігурації \"%s\" для \"%s\" у підмодулі-blob %s: "
+"%s"
#, c-format
msgid "bad numeric config value '%s' for '%s' in command line %s: %s"
msgstr ""
+"невірне числове значення конфігурації \"%s\" для \"%s\" у командному рядку "
+"%s: %s"
#, c-format
msgid "bad numeric config value '%s' for '%s' in %s: %s"
-msgstr ""
+msgstr "невірне числове значення конфігурації \"%s\" для \"%s\" у \"%s\": %s"
#, c-format
msgid "invalid value for variable %s"
@@ -14189,11 +15042,11 @@ msgstr "неприпустиме значення для змінної %s"
#, c-format
msgid "ignoring unknown core.fsync component '%s'"
-msgstr ""
+msgstr "ігнорування невідомого компонента core.fsync \"%s\""
#, c-format
msgid "bad boolean config value '%s' for '%s'"
-msgstr "неправильне булеве значення конфігурації \"%s\" для \"%s\""
+msgstr "невірне булеве значення конфігурації \"%s\" для \"%s\""
#, c-format
msgid "failed to expand user dir in: '%s'"
@@ -14205,21 +15058,21 @@ msgstr "\"%s\" для \"%s\" не є припустимою міткою час
#, c-format
msgid "abbrev length out of range: %d"
-msgstr ""
+msgstr "довжина скорочення поза діапазоном: %d"
#, c-format
msgid "bad zlib compression level %d"
-msgstr ""
+msgstr "невірний рівень zlib компресії %d"
msgid "core.commentChar should only be one ASCII character"
-msgstr ""
+msgstr "core.commentChar має бути лише одним символом ASCII"
#, c-format
msgid "ignoring unknown core.fsyncMethod value '%s'"
-msgstr ""
+msgstr "ігнорування невідомого значення core.fsyncMethod \"%s\""
msgid "core.fsyncObjectFiles is deprecated; use core.fsync instead"
-msgstr ""
+msgstr "core.fsyncObjectFiles застаріла; натомість використовуйте core.fsync"
#, c-format
msgid "invalid mode for object creation: %s"
@@ -14227,14 +15080,14 @@ msgstr "неприпустимий режим створення обʼєкта:
#, c-format
msgid "malformed value for %s"
-msgstr "неправильно сформоване значення для %s"
+msgstr "невірно сформоване значення для %s"
#, c-format
msgid "malformed value for %s: %s"
-msgstr "неправильно сформоване значення для %s: %s"
+msgstr "невірно сформоване значення для %s: %s"
msgid "must be one of nothing, matching, simple, upstream or current"
-msgstr ""
+msgstr "має бути одним з nothing, matching, simple, upstream або current"
#, c-format
msgid "unable to load config blob object '%s'"
@@ -14256,7 +15109,7 @@ msgid "unable to parse command-line config"
msgstr "не вдалося розібрати конфігурацію командного рядка"
msgid "unknown error occurred while reading the configuration files"
-msgstr ""
+msgstr "невідома помилка виникла під час читання конфігураційних файлів"
#, c-format
msgid "Invalid %s: '%s'"
@@ -14265,6 +15118,7 @@ msgstr "Неприпустимий %s: \"%s\""
#, c-format
msgid "splitIndex.maxPercentChange value '%d' should be between 0 and 100"
msgstr ""
+"значення splitIndex.maxPercentChange \"%d\" має бути в діапазоні від 0 до 100"
#, c-format
msgid "unable to parse '%s' from command-line config"
@@ -14272,7 +15126,7 @@ msgstr "не вдалося розібрати \"%s\" з конфігураці
#, c-format
msgid "bad config variable '%s' in file '%s' at line %d"
-msgstr ""
+msgstr "невірна конфігураційна змінна \"%s\" у файлі \"%s\", рядок \"%d\""
#, c-format
msgid "invalid section name '%s'"
@@ -14280,7 +15134,7 @@ msgstr "неприпустима назва секції \"%s\""
#, c-format
msgid "%s has multiple values"
-msgstr ""
+msgstr "%s має кілька значень"
#, c-format
msgid "failed to write new configuration file %s"
@@ -14292,7 +15146,7 @@ msgstr "не вдалося зафіксувати файл конфігурац
#, c-format
msgid "opening %s"
-msgstr ""
+msgstr "відкриття %s"
#, c-format
msgid "invalid config file %s"
@@ -14300,7 +15154,7 @@ msgstr "неприпустимий конфігураційний файл %s"
#, c-format
msgid "fstat on %s failed"
-msgstr ""
+msgstr "не вдалося виконати fstat на %s"
#, c-format
msgid "unable to mmap '%s'%s"
@@ -14308,7 +15162,7 @@ msgstr "не вдалося виконати mmap \"%s\"%s"
#, c-format
msgid "chmod on %s failed"
-msgstr ""
+msgstr "не вдалося виконати chmod на %s"
#, c-format
msgid "could not write config file %s"
@@ -14325,13 +15179,14 @@ msgstr "неприпустима назва секції: %s"
#, c-format
msgid "refusing to work with overly long line in '%s' on line %<PRIuMAX>"
msgstr ""
+"відмовлено в роботі з занадто довгим рядком у \"%s\", рядок %<PRIuMAX>"
#, c-format
msgid "missing value for '%s'"
msgstr "відсутнє значення для \"%s\""
msgid "the remote end hung up upon initial contact"
-msgstr ""
+msgstr "віддалене призначеня відключилося при першому контакті"
msgid ""
"Could not read from remote repository.\n"
@@ -14339,70 +15194,74 @@ msgid ""
"Please make sure you have the correct access rights\n"
"and the repository exists."
msgstr ""
+"Не вдалося прочитати з віддаленого сховища.\n"
+"\n"
+"Будь ласка, переконайтеся, що у вас є правильні права доступу\n"
+"і що сховище існує."
#, c-format
msgid "server doesn't support '%s'"
-msgstr ""
+msgstr "сервер не підтримує \"%s\""
#, c-format
msgid "server doesn't support feature '%s'"
-msgstr ""
+msgstr "сервер не підтримує особливість \"%s\""
msgid "expected flush after capabilities"
-msgstr ""
+msgstr "очікувалось flush після здібностей"
#, c-format
msgid "ignoring capabilities after first line '%s'"
-msgstr ""
+msgstr "ігнорування здібностей після першого рядка \"%s\""
msgid "protocol error: unexpected capabilities^{}"
-msgstr ""
+msgstr "помилка протоколу: неочікувані здібності^{}"
#, c-format
msgid "protocol error: expected shallow sha-1, got '%s'"
-msgstr ""
+msgstr "помилка протоколу: очікувалось неглибоке sha-1, отримано \"%s\""
msgid "repository on the other end cannot be shallow"
-msgstr ""
+msgstr "сховище на іншому кінці не може бути неглибоким"
msgid "invalid packet"
msgstr "неприпустимий пакет"
#, c-format
msgid "protocol error: unexpected '%s'"
-msgstr ""
+msgstr "помилка протоколу: неочікуване \"%s\""
#, c-format
msgid "unknown object format '%s' specified by server"
-msgstr ""
+msgstr "невідомий формат обʼєкта \"%s\", вказаний сервером"
#, c-format
msgid "error on bundle-uri response line %d: %s"
-msgstr ""
+msgstr "помилка у рядку відповіді bundle-uri %d: %s"
msgid "expected flush after bundle-uri listing"
-msgstr ""
+msgstr "очікувалось flush після виводу bundle-uri"
msgid "expected response end packet after ref listing"
-msgstr ""
+msgstr "очікувалось response end пакет після виводу посилань"
#, c-format
msgid "invalid ls-refs response: %s"
msgstr "неприпустима ls-refs відповідь: %s"
msgid "expected flush after ref listing"
-msgstr ""
+msgstr "очікувалось flush після виводу посилань"
#, c-format
msgid "protocol '%s' is not supported"
msgstr "протокол \"%s\" не підтримується"
msgid "unable to set SO_KEEPALIVE on socket"
-msgstr ""
+msgstr "не вдалося встановити SO_KEEPALIVE сокету"
#, c-format
msgid "Looking up %s ... "
-msgstr ""
+msgstr "Пошук %s ... "
#, c-format
msgid "unable to look up %s (port %s) (%s)"
@@ -14415,6 +15274,8 @@ msgid ""
"done.\n"
"Connecting to %s (port %s) ... "
msgstr ""
+"готово.\n"
+"Підключення до %s (порт %s) ... "
#, c-format
msgid ""
@@ -14439,34 +15300,34 @@ msgstr "невідомий порт %s"
#, c-format
msgid "strange hostname '%s' blocked"
-msgstr ""
+msgstr "дивне імʼя хоста \"%s\" заблоковано"
#, c-format
msgid "strange port '%s' blocked"
-msgstr ""
+msgstr "дивний порт \"%s\" заблоковано"
#, c-format
msgid "cannot start proxy %s"
msgstr "неможливо запустити проксі %s"
msgid "no path specified; see 'git help pull' for valid url syntax"
-msgstr ""
+msgstr "не вказано шлях; дивіться \"git help pull\" для чинного url синтаксису"
msgid "newline is forbidden in git:// hosts and repo paths"
-msgstr ""
+msgstr "новий рядок у хостах git:// та шляхах репозиторіїв заборонено"
msgid "ssh variant 'simple' does not support -4"
-msgstr ""
+msgstr "ssh опція \"simple\" не підтримує -4"
msgid "ssh variant 'simple' does not support -6"
-msgstr ""
+msgstr "ssh опція \"simple\" не підтримує -6"
msgid "ssh variant 'simple' does not support setting port"
-msgstr ""
+msgstr "ssh опція \"simple\" не підтримує встановлення порту"
#, c-format
msgid "strange pathname '%s' blocked"
-msgstr ""
+msgstr "дивне імʼя шляху \"%s\" заблоковано"
msgid "unable to fork"
msgstr "неможливо розгалужити"
@@ -14478,51 +15339,60 @@ msgid "failed write to rev-list"
msgstr "не вдалося записати до rev-list"
msgid "failed to close rev-list's stdin"
-msgstr ""
+msgstr "не вдалося закрити stdin для rev-list"
#, c-format
msgid "illegal crlf_action %d"
-msgstr ""
+msgstr "неприпустиме crlf_action %d"
#, c-format
msgid "CRLF would be replaced by LF in %s"
-msgstr ""
+msgstr "CRLF буде замінено на LF у %s"
#, c-format
msgid ""
"in the working copy of '%s', CRLF will be replaced by LF the next time Git "
"touches it"
msgstr ""
+"у робочій копії \"%s\" CRLF буде замінено на LF наступного разу, коли Git "
+"доторкнеться до неї"
#, c-format
msgid "LF would be replaced by CRLF in %s"
-msgstr ""
+msgstr "LF буде замінено на CRLF у %s"
#, c-format
msgid ""
"in the working copy of '%s', LF will be replaced by CRLF the next time Git "
"touches it"
msgstr ""
+"у робочій копії \"%s\" LF буде замінено на CRLF наступного разу, коли Git "
+"доторкнеться до неї"
#, c-format
msgid "BOM is prohibited in '%s' if encoded as %s"
-msgstr ""
+msgstr "BOM заборонено в \"%s\", якщо закодовано як %s"
#, c-format
msgid ""
"The file '%s' contains a byte order mark (BOM). Please use UTF-%.*s as "
"working-tree-encoding."
msgstr ""
+"Файл \"%s\" містить позначку порядку байтів (BOM). Будь ласка, "
+"використовуйте UTF-%.*s як кодування робочого дерева."
#, c-format
msgid "BOM is required in '%s' if encoded as %s"
-msgstr ""
+msgstr "BOM необхідний в \"%s\", якщо закодовано як %s"
#, c-format
msgid ""
"The file '%s' is missing a byte order mark (BOM). Please use UTF-%sBE or UTF-"
"%sLE (depending on the byte order) as working-tree-encoding."
msgstr ""
+"У файлі \"%s\" відсутня позначка послідовності байтів (BOM). Будь ласка, "
+"використовуйте UTF-%sBE або UTF-%sLE (залежно від послідовності байтів) як "
+"кодування робочого дерева."
#, c-format
msgid "failed to encode '%s' from %s to %s"
@@ -14530,7 +15400,7 @@ msgstr "не вдалося закодувати \"%s\" з %s в %s"
#, c-format
msgid "encoding '%s' from %s to %s and back is not the same"
-msgstr ""
+msgstr "кодування \"%s\" з %s в %s і назад не однакове"
#, c-format
msgid "cannot fork to run external filter '%s'"
@@ -14542,131 +15412,133 @@ msgstr "неможливо подати вхідні дані на зовніш
#, c-format
msgid "external filter '%s' failed %d"
-msgstr ""
+msgstr "помилка зовнішнього фільтра \"%s\", код: %d"
#, c-format
msgid "read from external filter '%s' failed"
-msgstr ""
+msgstr "не вдалося прочитати з зовнішнього фільтра \"%s\""
#, c-format
msgid "external filter '%s' failed"
-msgstr ""
+msgstr "помилка зовнішнього фільтра \"%s\""
msgid "unexpected filter type"
-msgstr ""
+msgstr "несподіваний тип фільтра"
msgid "path name too long for external filter"
-msgstr ""
+msgstr "назва шляху занадто довга для зовнішнього фільтра"
#, c-format
msgid ""
"external filter '%s' is not available anymore although not all paths have "
"been filtered"
msgstr ""
+"зовнішній фільтр \"%s\" більше не доступний, хоча не всі шляхи були "
+"відфільтровані"
msgid "true/false are no valid working-tree-encodings"
-msgstr ""
+msgstr "true/false не є допустимими кодуваннями робочого дерева"
#, c-format
msgid "%s: clean filter '%s' failed"
-msgstr ""
+msgstr "%s: помилка фільтра очистки \"%s\""
#, c-format
msgid "%s: smudge filter %s failed"
-msgstr ""
+msgstr "%s: помилка фільтра розмиття %s"
#, c-format
msgid "skipping credential lookup for key: credential.%s"
-msgstr ""
+msgstr "пропуск пошуку облікових даних для ключа: credential.%s"
msgid "refusing to work with credential missing host field"
-msgstr ""
+msgstr "відмовлено в роботі з відсутнім полем хоста в облікових даних"
msgid "refusing to work with credential missing protocol field"
-msgstr ""
+msgstr "відмовлено в роботі з відсутнім полем протоколу облікових даних"
#, c-format
msgid "url contains a newline in its %s component: %s"
-msgstr ""
+msgstr "url містить новий рядок у %s компоненті: %s"
#, c-format
msgid "url has no scheme: %s"
-msgstr ""
+msgstr "url не має схеми: %s"
#, c-format
msgid "credential url cannot be parsed: %s"
-msgstr ""
+msgstr "неможливо розібрати url облікових даних: %s"
msgid "in the future"
-msgstr ""
+msgstr "у майбутньому"
#, c-format
msgid "%<PRIuMAX> second ago"
msgid_plural "%<PRIuMAX> seconds ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> секунду тому"
+msgstr[1] "%<PRIuMAX> секунди тому"
+msgstr[2] "%<PRIuMAX> секунд тому"
#, c-format
msgid "%<PRIuMAX> minute ago"
msgid_plural "%<PRIuMAX> minutes ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> хвилину тому"
+msgstr[1] "%<PRIuMAX> хвилини тому"
+msgstr[2] "%<PRIuMAX> хвилин тому"
#, c-format
msgid "%<PRIuMAX> hour ago"
msgid_plural "%<PRIuMAX> hours ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> годину тому"
+msgstr[1] "%<PRIuMAX> години тому"
+msgstr[2] "%<PRIuMAX> годин тому"
#, c-format
msgid "%<PRIuMAX> day ago"
msgid_plural "%<PRIuMAX> days ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> день тому"
+msgstr[1] "%<PRIuMAX> дні тому"
+msgstr[2] "%<PRIuMAX> днів тому"
#, c-format
msgid "%<PRIuMAX> week ago"
msgid_plural "%<PRIuMAX> weeks ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> тиждень тому"
+msgstr[1] "%<PRIuMAX> тижні тому"
+msgstr[2] "%<PRIuMAX> тижнів тому"
#, c-format
msgid "%<PRIuMAX> month ago"
msgid_plural "%<PRIuMAX> months ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> місяць тому"
+msgstr[1] "%<PRIuMAX> місяці тому"
+msgstr[2] "%<PRIuMAX> місяців тому"
#, c-format
msgid "%<PRIuMAX> year"
msgid_plural "%<PRIuMAX> years"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> рік"
+msgstr[1] "%<PRIuMAX> роки"
+msgstr[2] "%<PRIuMAX> років"
#. TRANSLATORS: "%s" is "<n> years"
#, c-format
msgid "%s, %<PRIuMAX> month ago"
msgid_plural "%s, %<PRIuMAX> months ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%s, %<PRIuMAX> місяць тому"
+msgstr[1] "%s, %<PRIuMAX> місяці тому"
+msgstr[2] "%s, %<PRIuMAX> місяців тому"
#, c-format
msgid "%<PRIuMAX> year ago"
msgid_plural "%<PRIuMAX> years ago"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%<PRIuMAX> рік тому"
+msgstr[1] "%<PRIuMAX> роки тому"
+msgstr[2] "%<PRIuMAX> років тому"
msgid "Propagating island marks"
-msgstr ""
+msgstr "Розповсюдження острівних позначок"
#, c-format
msgid "bad tree object %s"
@@ -14678,11 +15550,11 @@ msgstr "не вдалося завантажити island регвир для \"
#, c-format
msgid "island regex from config has too many capture groups (max=%d)"
-msgstr ""
+msgstr "регвир острова з конфігурації має забагато груп захоплення (max=%d)"
#, c-format
msgid "Marked %d islands, done.\n"
-msgstr ""
+msgstr "Позначено %d островів, готово.\n"
#, c-format
msgid "invalid --%s value '%s'"
@@ -14698,7 +15570,7 @@ msgstr "не вдалося відкрити директорію \"%s\""
#, c-format
msgid "skipping '%s', which is neither file nor directory"
-msgstr ""
+msgstr "пропускання \"%s\", який не є ні файлом, ні директорією"
msgid "could not duplicate stdout"
msgstr "не вдалося продублювати stdout"
@@ -14711,19 +15583,25 @@ msgid "failed to write archive"
msgstr "не вдалося записати архів"
msgid "--merge-base does not work with ranges"
-msgstr ""
+msgstr "--merge-base не працює з діапазонами"
msgid "--merge-base only works with commits"
-msgstr ""
+msgstr "--merge-base працює лише з комітами"
msgid "unable to get HEAD"
msgstr "не вдалося отримати HEAD"
msgid "no merge base found"
-msgstr ""
+msgstr "базу злиття не знайдено"
msgid "multiple merge bases found"
-msgstr ""
+msgstr "знайдено кілька баз злиття"
+
+msgid "cannot compare stdin to a directory"
+msgstr "неможливо порівняти stdin з директорією"
+
+msgid "cannot compare a named pipe to a directory"
+msgstr "неможливо порівняти іменований канал з директорією"
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<опції>] <шлях> <шлях>"
@@ -14732,44 +15610,62 @@ msgid ""
"Not a git repository. Use --no-index to compare two paths outside a working "
"tree"
msgstr ""
+"Це не git сховище. Скористайтесь --no-index для порівняння двох шляхів поза "
+"робочим деревом"
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
-msgstr ""
+msgstr " Не вдалося розібрати відсоток відсікання dirstat \"%s\"\n"
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
-msgstr ""
+msgstr " Невідомий параметр dirstat \"%s\"\n"
msgid ""
"color moved setting must be one of 'no', 'default', 'blocks', 'zebra', "
"'dimmed-zebra', 'plain'"
msgstr ""
+"значення параметра кольору перенесення має бути одним з \"no\", \"default\", "
+"\"blocks\", \"zebra\", \"dimmed-zebra\", \"plain\""
#, c-format
msgid ""
"unknown color-moved-ws mode '%s', possible values are 'ignore-space-change', "
"'ignore-space-at-eol', 'ignore-all-space', 'allow-indentation-change'"
msgstr ""
+"невідомий режим color-moved-ws \"%s\", можливі значення \"ignore-space-"
+"change\", \"ignore-space-at-eol\", \"ignore-all-space\", \"allow-indentation-"
+"change\""
msgid ""
"color-moved-ws: allow-indentation-change cannot be combined with other "
"whitespace modes"
msgstr ""
+"color-moved-ws: allow-indentation-change не можна комбінувати з іншими "
+"режимами відображення пробілів"
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
-msgstr ""
+msgstr "Невідоме значення конфігураційної змінної \"diff.submodule\": \"%s\""
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
"%s"
msgstr ""
+"Знайдено помилки у конфігураційній змінній \"diff.dirstat\":\n"
+"%s"
#, c-format
msgid "external diff died, stopping at %s"
-msgstr ""
+msgstr "зовнішній diff завершився невдало, зупинившись на %s"
+
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow потрібен лишень один визначник шляху"
+
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "магічне значення визначника шляху не підтримується --follow: %s"
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
@@ -14788,30 +15684,29 @@ msgstr ""
"опції \"%s\" і \"%s\" неможливо використати разом, використовуйте \"%s\" з "
"\"%s\" та \"%s\""
-msgid "--follow requires exactly one pathspec"
-msgstr ""
-
#, c-format
msgid "invalid --stat value: %s"
msgstr "неприпустиме --stat значення: %s"
#, c-format
msgid "%s expects a numerical value"
-msgstr ""
+msgstr "%s очікує числове значення"
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
"%s"
msgstr ""
+"Не вдалося розібрати параметр опції --dirstat/-X:\n"
+"%s"
#, c-format
msgid "unknown change class '%c' in --diff-filter=%s"
-msgstr ""
+msgstr "невідома зміна класу \"%c\" у --diff-filter=%s"
#, c-format
msgid "unknown value after ws-error-highlight=%.*s"
-msgstr ""
+msgstr "невідоме значення після ws-error-highlight=%.*s"
#, c-format
msgid "unable to resolve '%s'"
@@ -14819,7 +15714,7 @@ msgstr "не вдалося розпізнати \"%s\""
#, c-format
msgid "%s expects <n>/<m> form"
-msgstr ""
+msgstr "%s очікує <n>/<m> форму"
#, c-format
msgid "%s expects a character, got '%s'"
@@ -14827,16 +15722,18 @@ msgstr "%s очікує символ, отримано \"%s\""
#, c-format
msgid "bad --color-moved argument: %s"
-msgstr ""
+msgstr "невірний --color-moved аргумент: %s"
#, c-format
msgid "invalid mode '%s' in --color-moved-ws"
-msgstr ""
+msgstr "неприпустимий режим \"%s\" у --color-moved-ws"
msgid ""
"option diff-algorithm accepts \"myers\", \"minimal\", \"patience\" and "
"\"histogram\""
msgstr ""
+"опція diff-algorithm приймає значення \"myers\", \"minimal\", \"patience\" "
+"та \"histogram\""
#, c-format
msgid "invalid argument to %s"
@@ -14852,361 +15749,383 @@ msgstr "не вдалося розібрати параметр опції --sub
#, c-format
msgid "bad --word-diff argument: %s"
-msgstr ""
+msgstr "невірний --word-diff аргумент: %s"
msgid "Diff output format options"
-msgstr ""
+msgstr "Варіанти формату виводу різниці"
msgid "generate patch"
msgstr "згенерувати латку"
msgid "<n>"
-msgstr ""
+msgstr "<n>"
msgid "generate diffs with <n> lines context"
-msgstr ""
+msgstr "згенерувати різниці з контекстом в <n> рядків"
msgid "generate the diff in raw format"
-msgstr ""
+msgstr "згенерувати різницю у форматі raw"
msgid "synonym for '-p --raw'"
-msgstr ""
+msgstr "синонім для \"-p --raw\""
msgid "synonym for '-p --stat'"
-msgstr ""
+msgstr "синонім для \"-p --stat\""
msgid "machine friendly --stat"
msgstr "машинний вивід --stat"
msgid "output only the last line of --stat"
-msgstr ""
+msgstr "вивести лише останній рядок --stat"
msgid "<param1,param2>..."
-msgstr ""
+msgstr "<параметр1,параметр2>..."
msgid ""
"output the distribution of relative amount of changes for each sub-directory"
-msgstr ""
+msgstr "вивести розподіл відносної кількості змін для кожної піддиректорії"
msgid "synonym for --dirstat=cumulative"
-msgstr ""
+msgstr "синонім для --dirstat=cumulative"
msgid "synonym for --dirstat=files,param1,param2..."
-msgstr ""
+msgstr "синонім для --dirstat=files,параметр1,параметр2..."
msgid "warn if changes introduce conflict markers or whitespace errors"
msgstr ""
+"попереджати, якщо зміни призводять до появи конфліктних маркерів або помилок "
+"пробільних символів"
msgid "condensed summary such as creations, renames and mode changes"
-msgstr ""
+msgstr "стислі підсумки, такі як створення, перейменування та зміни режимів"
msgid "show only names of changed files"
-msgstr ""
+msgstr "показувати тільки назви змінених файлів"
msgid "show only names and status of changed files"
-msgstr ""
+msgstr "показувати тільки назви та статус змінених файлів"
msgid "<width>[,<name-width>[,<count>]]"
-msgstr ""
+msgstr "<ширина>[,<ширина-назви>[,<кількість>]]"
msgid "generate diffstat"
-msgstr ""
+msgstr "згенерувати diffstat"
msgid "<width>"
-msgstr ""
+msgstr "<ширина>"
msgid "generate diffstat with a given width"
-msgstr ""
+msgstr "згенерувати diffstat із заданою шириною"
msgid "generate diffstat with a given name width"
-msgstr ""
+msgstr "згенерувати diffstat із заданою шириною назви"
msgid "generate diffstat with a given graph width"
-msgstr ""
+msgstr "згенерувати diffstat із заданою шириною графіка"
msgid "<count>"
-msgstr ""
+msgstr "<кількість>"
msgid "generate diffstat with limited lines"
-msgstr ""
+msgstr "згенерувати diffstat з обмеженою кількістю рядків"
msgid "generate compact summary in diffstat"
-msgstr ""
+msgstr "згенерувати компактний підсумок у diffstat"
msgid "output a binary diff that can be applied"
-msgstr ""
+msgstr "вивести бінарну різницю, яку можна застосувати"
msgid "show full pre- and post-image object names on the \"index\" lines"
msgstr ""
+"показувати повні назви обʼєктів до та після зображення в \"index\" рядках"
msgid "show colored diff"
-msgstr ""
+msgstr "показати кольорову різницю"
msgid "<kind>"
-msgstr ""
+msgstr "<тип>"
msgid ""
"highlight whitespace errors in the 'context', 'old' or 'new' lines in the "
"diff"
msgstr ""
+"виділяти помилки пробільних символів у \"context\", \"old\" або \"new\" "
+"рядках різниці"
msgid ""
"do not munge pathnames and use NULs as output field terminators in --raw or "
"--numstat"
msgstr ""
+"не змінювати імена шляхів і використовувати NUL як термінатори полів виводу "
+"в --raw або --numstat"
msgid "<prefix>"
-msgstr ""
+msgstr "<префікс>"
msgid "show the given source prefix instead of \"a/\""
-msgstr ""
+msgstr "показувати заданий префікс джерела замість \"a/\""
msgid "show the given destination prefix instead of \"b/\""
-msgstr ""
+msgstr "показувати заданий префікс призначення замість \"b/\""
msgid "prepend an additional prefix to every line of output"
-msgstr ""
+msgstr "додавати префікс до кожного рядка виводу"
msgid "do not show any source or destination prefix"
-msgstr ""
+msgstr "не показувати жодного префікса джерела або призначення"
msgid "use default prefixes a/ and b/"
-msgstr ""
+msgstr "використовувати префікси за замовчуванням a/ та b/"
msgid "show context between diff hunks up to the specified number of lines"
-msgstr ""
+msgstr "показувати контекст між шматками різниці до вказаної кількості рядків"
msgid "<char>"
-msgstr ""
+msgstr "<символ>"
msgid "specify the character to indicate a new line instead of '+'"
-msgstr ""
+msgstr "вкажіть символ для позначення нового рядка замість \"+\""
msgid "specify the character to indicate an old line instead of '-'"
-msgstr ""
+msgstr "вкажіть символ для позначення старого рядка замість \"-\""
msgid "specify the character to indicate a context instead of ' '"
-msgstr ""
+msgstr "вкажіть символ для позначення контексту замість \" \""
msgid "Diff rename options"
-msgstr ""
+msgstr "Варіанти перейменування різниці"
msgid "<n>[/<m>]"
-msgstr ""
+msgstr "<n>[/<m>]"
msgid "break complete rewrite changes into pairs of delete and create"
-msgstr ""
+msgstr "розбити повний перезапис змін на пари delete та create"
msgid "detect renames"
-msgstr ""
+msgstr "виявляти перейменування"
msgid "omit the preimage for deletes"
-msgstr ""
+msgstr "пропускати попереднє зображення для видалень"
msgid "detect copies"
-msgstr ""
+msgstr "виявляти копії"
msgid "use unmodified files as source to find copies"
-msgstr ""
+msgstr "використовувати незмінені файли як джерело для пошуку копій"
msgid "disable rename detection"
-msgstr ""
+msgstr "вимкнути виявлення перейменування"
msgid "use empty blobs as rename source"
-msgstr ""
+msgstr "використовувати порожні blobs як джерело перейменування"
msgid "continue listing the history of a file beyond renames"
-msgstr ""
+msgstr "продовжити виведення історії файлу після перейменування"
msgid ""
"prevent rename/copy detection if the number of rename/copy targets exceeds "
"given limit"
msgstr ""
+"запобігати виявленню перейменування/копіювання, якщо кількість обʼєктів "
+"перейменування/копіювання перевищує заданий ліміт"
msgid "Diff algorithm options"
-msgstr ""
+msgstr "Варіанти алгоритмів різниці"
msgid "produce the smallest possible diff"
-msgstr ""
+msgstr "створювати найменшу можливу різницю"
msgid "ignore whitespace when comparing lines"
-msgstr ""
+msgstr "ігнорувати пробіли при порівнянні рядків"
msgid "ignore changes in amount of whitespace"
-msgstr ""
+msgstr "ігнорувати зміни кількості пробілів"
msgid "ignore changes in whitespace at EOL"
-msgstr ""
+msgstr "ігнорувати зміни пробілів у EOL"
msgid "ignore carrier-return at the end of line"
-msgstr ""
+msgstr "ігнорувати повернення каретки в кінці рядка"
msgid "ignore changes whose lines are all blank"
-msgstr ""
+msgstr "ігнорувати зміни, всі рядки яких порожні"
msgid "<regex>"
-msgstr ""
+msgstr "<регвир>"
msgid "ignore changes whose all lines match <regex>"
-msgstr ""
+msgstr "ігнорувати зміни, всі рядки яких збігаються з <регвир>"
msgid "heuristic to shift diff hunk boundaries for easy reading"
-msgstr ""
+msgstr "евристичне визначення зміщення меж шматка різниці для зручного читання"
msgid "generate diff using the \"patience diff\" algorithm"
-msgstr ""
+msgstr "згенерувати різницю за алгоритмом \"patience diff\""
msgid "generate diff using the \"histogram diff\" algorithm"
-msgstr ""
+msgstr "згенерувати різницю за алгоритмом \"histogram diff\""
msgid "<algorithm>"
-msgstr ""
+msgstr "<алгоритм>"
msgid "choose a diff algorithm"
-msgstr ""
+msgstr "вибрати алгоритм різниці"
msgid "<text>"
-msgstr ""
+msgstr "<текст>"
msgid "generate diff using the \"anchored diff\" algorithm"
-msgstr ""
+msgstr "згенерувати різницю за алгоритмом \"anchored diff\""
msgid "<mode>"
-msgstr ""
+msgstr "<режим>"
msgid "show word diff, using <mode> to delimit changed words"
msgstr ""
+"показати різницю по словам, використовуючи <режим> для відокремлення "
+"змінених слів"
msgid "use <regex> to decide what a word is"
-msgstr ""
+msgstr "скористайтесь <регвир>, щоб визначити, що це за слово"
msgid "equivalent to --word-diff=color --word-diff-regex=<regex>"
-msgstr ""
+msgstr "еквівалентно --word-diff=color --word-diff-regex=<регвир>"
msgid "moved lines of code are colored differently"
-msgstr ""
+msgstr "переміщені рядки коду мають інший колір"
msgid "how white spaces are ignored in --color-moved"
-msgstr ""
+msgstr "як ігноруються пробіли в --color-moved"
msgid "Other diff options"
-msgstr ""
+msgstr "Інші опції різниці"
msgid "when run from subdir, exclude changes outside and show relative paths"
msgstr ""
+"при запуску з піддиректорії не враховувати зміни ззовні та показувати "
+"відносні шляхи"
msgid "treat all files as text"
-msgstr ""
+msgstr "обробляти всі файли як текстові"
msgid "swap two inputs, reverse the diff"
-msgstr ""
+msgstr "поміняти місцями два вводи, змінити різницю на протилежну"
msgid "exit with 1 if there were differences, 0 otherwise"
msgstr ""
+"завершити виконання з кодом 1, якщо були різниці, або з кодом 0 в іншому "
+"випадку"
msgid "disable all output of the program"
-msgstr ""
+msgstr "вимкнути весь вивід програми"
msgid "allow an external diff helper to be executed"
-msgstr ""
+msgstr "дозволити виконання зовнішнього помічника різниці"
msgid "run external text conversion filters when comparing binary files"
msgstr ""
+"запускати зовнішні фільтри конвертації тексту під час порівняння бінарних "
+"файлів"
msgid "<when>"
-msgstr ""
+msgstr "<коли>"
msgid "ignore changes to submodules in the diff generation"
-msgstr ""
+msgstr "ігнорувати зміни підмодулів у генерації різниці"
msgid "<format>"
-msgstr ""
+msgstr "<формат>"
msgid "specify how differences in submodules are shown"
-msgstr ""
+msgstr "вказати як відображати різниці в підмодулях"
msgid "hide 'git add -N' entries from the index"
msgstr "приховати записи \"git add -N\" з індексу"
msgid "treat 'git add -N' entries as real in the index"
-msgstr ""
+msgstr "обробляти \"git add -N\" записи як дійсні в індексі"
msgid "<string>"
-msgstr ""
+msgstr "<строка>"
msgid ""
"look for differences that change the number of occurrences of the specified "
"string"
-msgstr ""
+msgstr "шукати різниці, які змінюють кількість входжень вказаного рядка"
msgid ""
"look for differences that change the number of occurrences of the specified "
"regex"
-msgstr ""
+msgstr "шукати різниці, які змінюють кількість входжень вказаного регвиру"
msgid "show all changes in the changeset with -S or -G"
-msgstr ""
+msgstr "показати всі зміни у змінному наборі з -S або -G"
msgid "treat <string> in -S as extended POSIX regular expression"
-msgstr ""
+msgstr "обробляти <рядок> у -S як розширений POSIX регулярний вираз"
msgid "control the order in which files appear in the output"
-msgstr ""
+msgstr "керувати порядком, у якому файли зʼявляються у виводі"
msgid "<path>"
msgstr "<шлях>"
msgid "show the change in the specified path first"
-msgstr ""
+msgstr "спочатку показати зміну для зазначеного шляху"
msgid "skip the output to the specified path"
-msgstr ""
+msgstr "пропустити вивід для зазначеного шляху"
msgid "<object-id>"
-msgstr ""
+msgstr "<id-обʼєкта>"
msgid ""
"look for differences that change the number of occurrences of the specified "
"object"
-msgstr ""
+msgstr "шукати різниці, які змінюють кількість входжень вказаного обʼєкта"
msgid "[(A|C|D|M|R|T|U|X|B)...[*]]"
-msgstr ""
+msgstr "[(A|C|D|M|R|T|U|X|B)...[*]]"
msgid "select files by diff type"
-msgstr ""
+msgstr "вибрати файли за типом різниці"
msgid "<file>"
-msgstr ""
+msgstr "<файл>"
msgid "output to a specific file"
-msgstr ""
+msgstr "виводити до певного файла"
msgid "exhaustive rename detection was skipped due to too many files."
msgstr ""
+"вичерпне виявлення перейменування було пропущено через занадто велику "
+"кількість файлів."
msgid "only found copies from modified paths due to too many files."
msgstr ""
+"знайдено лише копії зі змінених шляхів через занадто велику кількість файлів."
#, c-format
msgid ""
"you may want to set your %s variable to at least %d and retry the command."
msgstr ""
+"можливо, вам слід встановити значення змінної %s принаймні у %d і повторити "
+"команду."
#, c-format
msgid "failed to read orderfile '%s'"
msgstr "не вдалося прочитати orderfile \"%s\""
msgid "Performing inexact rename detection"
-msgstr ""
+msgstr "Виявлення неточного перейменування"
#, c-format
msgid "No such path '%s' in the diff"
-msgstr ""
+msgstr "Немає такого шляху \"%s\" у різниці"
#, c-format
msgid "pathspec '%s' did not match any file(s) known to git"
-msgstr ""
+msgstr "визначник шляху \"%s\" не збігається з жодним файлом, відомим git"
#, c-format
msgid "unrecognized pattern: '%s'"
@@ -15219,24 +16138,28 @@ msgstr "нерозпізнаний негативний шаблон: \"%s\""
#, c-format
msgid "your sparse-checkout file may have issues: pattern '%s' is repeated"
msgstr ""
+"ваш файл розрідженого переходу може мати певні проблеми: шаблон \"%s\" "
+"повторюється"
msgid "disabling cone pattern matching"
-msgstr ""
+msgstr "вимкнення зіставлення шаблону конуса"
#, c-format
msgid "cannot use %s as an exclude file"
msgstr "неможливо використовувати %s як файл виключення"
msgid "failed to get kernel name and information"
-msgstr ""
+msgstr "не вдалося отримати назву та інформацію про ядро"
msgid "untracked cache is disabled on this system or location"
-msgstr ""
+msgstr "невідстежуваний кеш вимкнено на цій системі або в цьому місці"
msgid ""
"No directory name could be guessed.\n"
"Please specify a directory on the command line"
msgstr ""
+"Hе вдалося вгадати назву директорії.\n"
+"Будь ласка, вкажіть директорію в командному рядку"
#, c-format
msgid "index file corrupt in repo %s"
@@ -15252,7 +16175,7 @@ msgstr "не вдалося перенести git директорію з \"%s\
#, c-format
msgid "hint: Waiting for your editor to close the file...%c"
-msgstr ""
+msgstr "підказка: чекаємо, поки редактор закриє файл...%c"
#, c-format
msgid "could not write to '%s'"
@@ -15263,7 +16186,7 @@ msgid "could not edit '%s'"
msgstr "не вдалося відредагувати \"%s\""
msgid "Filtering content"
-msgstr ""
+msgstr "Фільтрація вмісту"
#, c-format
msgid "could not stat file '%s'"
@@ -15271,20 +16194,20 @@ msgstr "не вдалося виконати stat для %s"
#, c-format
msgid "bad git namespace path \"%s\""
-msgstr ""
+msgstr "невірний шлях до простору імен git \"%s\""
#, c-format
msgid "too many args to run %s"
msgstr "забагато аргументів для запуску %s"
msgid "git fetch-pack: expected shallow list"
-msgstr ""
+msgstr "git fetch-pack: очікувався неглибокий список"
msgid "git fetch-pack: expected a flush packet after shallow list"
-msgstr ""
+msgstr "git fetch-pack: очікувалось flush пакет після неглибокого списку"
msgid "git fetch-pack: expected ACK/NAK, got a flush packet"
-msgstr ""
+msgstr "git fetch-pack: очікувалось ACK/NAK, отримано flush пакет"
#, c-format
msgid "git fetch-pack: expected ACK/NAK, got '%s'"
@@ -15294,7 +16217,7 @@ msgid "unable to write to remote"
msgstr "не вдалося записати до віддаленого сховища"
msgid "Server supports filter"
-msgstr ""
+msgstr "Сервер підтримує фільтр"
#, c-format
msgid "invalid shallow line: %s"
@@ -15306,7 +16229,7 @@ msgstr "неприпустимий unshallow рядок: %s"
#, c-format
msgid "object not found: %s"
-msgstr ""
+msgstr "обʼєкт не знайдено: %s"
#, c-format
msgid "error in object: %s"
@@ -15314,97 +16237,97 @@ msgstr "помилка в обʼєкті: %s"
#, c-format
msgid "no shallow found: %s"
-msgstr ""
+msgstr "не знайдено неглибоких: %s"
#, c-format
msgid "expected shallow/unshallow, got %s"
-msgstr ""
+msgstr "очікувалось shallow/unshallow, отримано %s"
#, c-format
msgid "got %s %d %s"
-msgstr ""
+msgstr "отримано %s %d %s"
#, c-format
msgid "invalid commit %s"
msgstr "неприпустимий коміт %s"
msgid "giving up"
-msgstr ""
+msgstr "здаюся"
msgid "done"
msgstr "готово"
#, c-format
msgid "got %s (%d) %s"
-msgstr ""
+msgstr "отримано %s (%d) %s"
#, c-format
msgid "Marking %s as complete"
-msgstr ""
+msgstr "Позначення %s як завершеного"
#, c-format
msgid "already have %s (%s)"
-msgstr ""
+msgstr "вже є %s (%s)"
msgid "fetch-pack: unable to fork off sideband demultiplexer"
-msgstr ""
+msgstr "fetch-pack: не вдалося розгалужити sideband demultiplexer"
msgid "protocol error: bad pack header"
-msgstr ""
+msgstr "помилка протоколу: невірний заголовок пакунка"
#, c-format
msgid "fetch-pack: unable to fork off %s"
-msgstr ""
+msgstr "fetch-pack: не вдалося розгалужити %s"
msgid "fetch-pack: invalid index-pack output"
-msgstr ""
+msgstr "fetch-pack: неприпустиме виведення індексного пакунка"
#, c-format
msgid "%s failed"
-msgstr ""
+msgstr "%s завершився невдало"
msgid "error in sideband demultiplexer"
-msgstr ""
+msgstr "помилка в sideband demultiplexer"
#, c-format
msgid "Server version is %.*s"
-msgstr ""
+msgstr "Версія сервера %.*s"
#, c-format
msgid "Server supports %s"
-msgstr ""
+msgstr "Сервер підтримує %s"
msgid "Server does not support shallow clients"
-msgstr ""
+msgstr "Сервер не підтримує неглибоких клієнтів"
msgid "Server does not support --shallow-since"
-msgstr ""
+msgstr "Сервер не підтримує параметр --shallow-since"
msgid "Server does not support --shallow-exclude"
-msgstr ""
+msgstr "Сервер не підтримує параметр --shallow-exclude"
msgid "Server does not support --deepen"
-msgstr ""
+msgstr "Сервер не підтримує параметр --deepen"
msgid "Server does not support this repository's object format"
-msgstr ""
+msgstr "Сервер не підтримує формат об’єктів цього сховища"
msgid "no common commits"
msgstr "немає спільних комітів"
msgid "git fetch-pack: fetch failed."
-msgstr ""
+msgstr "git fetch-pack: помилка отримання."
#, c-format
msgid "mismatched algorithms: client %s; server %s"
-msgstr ""
+msgstr "невідповідність алгоритмів: клієнт %s; сервер %s"
#, c-format
msgid "the server does not support algorithm '%s'"
msgstr "сервер не підтримує алгоритм \"%s\""
msgid "Server does not support shallow requests"
-msgstr ""
+msgstr "Сервер не підтримує неглибокі запити"
msgid "unable to write request to remote"
msgstr "не вдалося записати запит до віддаленого сховища"
@@ -15419,11 +16342,11 @@ msgstr "очікувалось \"%s\""
#, c-format
msgid "unexpected acknowledgment line: '%s'"
-msgstr ""
+msgstr "несподіваний рядок підтвердження: \"%s\""
#, c-format
msgid "error processing acks: %d"
-msgstr ""
+msgstr "помилка при обробці підтверджень: %d"
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
@@ -15431,7 +16354,7 @@ msgstr ""
#, c-format
msgid "expected packfile to be sent after '%s'"
-msgstr ""
+msgstr "очікувалось надсилання файла пакунка після \"%s\""
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
@@ -15439,55 +16362,55 @@ msgstr ""
#, c-format
msgid "expected no other sections to be sent after no '%s'"
-msgstr ""
+msgstr "не очікувалось надсилання жодної секції для статусу не \"%s\""
#, c-format
msgid "error processing shallow info: %d"
-msgstr ""
+msgstr "помилка при обробці неглибокої інформації: %d"
#, c-format
msgid "expected wanted-ref, got '%s'"
-msgstr "очікувалося wanted-ref, отримано \"%s\""
+msgstr "очікувалось wanted-ref, отримано \"%s\""
#, c-format
msgid "unexpected wanted-ref: '%s'"
-msgstr ""
+msgstr "несподіване запитуване посилання: \"%s\""
#, c-format
msgid "error processing wanted refs: %d"
-msgstr ""
+msgstr "помилка під час обробки запитуваних посилань: %d"
msgid "git fetch-pack: expected response end packet"
-msgstr ""
+msgstr "git fetch-pack: очікувався response end пакет"
msgid "no matching remote head"
-msgstr ""
+msgstr "немає відповідного віддаленого head"
msgid "unexpected 'ready' from remote"
-msgstr ""
+msgstr "несподіване \"ready\" з віддаленого призначення"
#, c-format
msgid "no such remote ref %s"
-msgstr "немає такого віддаленного посилання %s"
+msgstr "немає такого віддаленого посилання %s"
#, c-format
msgid "Server does not allow request for unadvertised object %s"
-msgstr ""
+msgstr "Сервер забороняє запити до неоголошених обʼєктів %s"
#, c-format
msgid "fsmonitor_ipc__send_query: invalid path '%s'"
-msgstr ""
+msgstr "fsmonitor_ipc__send_query: неприпустимий шлях \"%s\""
#, c-format
msgid "fsmonitor_ipc__send_query: unspecified error on '%s'"
-msgstr ""
+msgstr "fsmonitor_ipc__send_query: невизначена помилка на \"%s\""
msgid "fsmonitor--daemon is not running"
-msgstr ""
+msgstr "fsmonitor--daemon не запущено"
#, c-format
msgid "could not send '%s' command to fsmonitor--daemon"
-msgstr ""
+msgstr "не вдалося відправити команду \"%s\" до fsmonitor--daemon"
#, c-format
msgid "bare repository '%s' is incompatible with fsmonitor"
@@ -15495,7 +16418,7 @@ msgstr "порожнє сховище \"%s\" несумісне з fsmonitor"
#, c-format
msgid "repository '%s' is incompatible with fsmonitor due to errors"
-msgstr ""
+msgstr "сховище \"%s\" несумісне з fsmonitor через помилки"
#, c-format
msgid "remote repository '%s' is incompatible with fsmonitor"
@@ -15503,13 +16426,15 @@ msgstr "віддалене сховище \"%s\" несумісне з fsmonitor
#, c-format
msgid "virtual repository '%s' is incompatible with fsmonitor"
-msgstr ""
+msgstr "віртуальне сховище \"%s\" несумісне з fsmonitor"
#, c-format
msgid ""
"socket directory '%s' is incompatible with fsmonitor due to lack of Unix "
"sockets support"
msgstr ""
+"директорія сокетів \"%s\" несумісна з fsmonitor через відсутність підтримки "
+"сокетів Unix"
msgid ""
"git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n"
@@ -15519,6 +16444,12 @@ msgid ""
" [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
" [--config-env=<name>=<envvar>] <command> [<args>]"
msgstr ""
+"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"
+"[--config-env=<назва>=<змінна-оточення>] <команда> [<аргументи>]"
msgid ""
"'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -15526,75 +16457,86 @@ msgid ""
"to read about a specific subcommand or concept.\n"
"See 'git help git' for an overview of the system."
msgstr ""
+"\"git help -a\" і \"git help -g\" виводять доступні підкоманди та деякі\n"
+"посібники з понять. Дивіться \"git help <команда>\" або \"git help "
+"<поняття>\n"
+"щоб прочитати про конкретну підкоманду або поняття.\n"
+"Дивіться \"git help git\" для ознайомлення з системою."
#, c-format
msgid "unsupported command listing type '%s'"
-msgstr ""
+msgstr "непідтримуваний тип виводу команд \"%s\""
#, c-format
msgid "no directory given for '%s' option\n"
-msgstr ""
+msgstr "не вказано директорію для \"%s\" опціі\n"
#, c-format
msgid "no namespace given for --namespace\n"
-msgstr ""
+msgstr "не вказано простір імен для --namespace\n"
#, c-format
msgid "-c expects a configuration string\n"
-msgstr ""
+msgstr "-c очікує на рядок конфігурації\n"
#, c-format
msgid "no config key given for --config-env\n"
-msgstr ""
+msgstr "не вказано ключ конфігурації для --config-env\n"
+
+#, c-format
+msgid "no attribute source given for --attr-source\n"
+msgstr "для --attr-source не вказано джерело атрибутів\n"
#, c-format
msgid "unknown option: %s\n"
-msgstr ""
+msgstr "невідома опція: %s\n"
#, c-format
msgid "while expanding alias '%s': '%s'"
-msgstr ""
+msgstr "під час розгортання псевдоніма \"%s\": \"%s\""
#, c-format
msgid ""
"alias '%s' changes environment variables.\n"
"You can use '!git' in the alias to do this"
msgstr ""
+"псевдонім \"%s\" перемінює змінні оточення.\n"
+"Ви можете використовувати \"!git\" в псевдонімі для цього"
#, c-format
msgid "empty alias for %s"
-msgstr ""
+msgstr "порожній псевдонім для %s"
#, c-format
msgid "recursive alias: %s"
-msgstr ""
+msgstr "рекурсивний псевдонім: %s"
msgid "write failure on standard output"
-msgstr ""
+msgstr "помилка запису в стандартний вивід"
msgid "unknown write failure on standard output"
-msgstr ""
+msgstr "невідома помилка запису в стандартний вивід"
msgid "close failed on standard output"
-msgstr ""
+msgstr "не вдалося закрити стандартний вивід"
#, c-format
msgid "alias loop detected: expansion of '%s' does not terminate:%s"
-msgstr ""
+msgstr "виявлено цикл псевдонімів: розширення \"%s\" не припиняє:%s"
#, c-format
msgid "cannot handle %s as a builtin"
-msgstr ""
+msgstr "неможливо обробити %s як вбудовану команду"
#, c-format
msgid ""
"usage: %s\n"
"\n"
-msgstr ""
+msgstr "використання: %s\n"
#, c-format
msgid "expansion of alias '%s' failed; '%s' is not a git command\n"
-msgstr ""
+msgstr "не вдалося розширити псевдонім \"%s\"; \"%s\" не є командою git\n"
#, c-format
msgid "failed to run command '%s': %s\n"
@@ -15611,19 +16553,23 @@ msgid ""
"gpg.ssh.allowedSignersFile needs to be configured and exist for ssh "
"signature verification"
msgstr ""
+"gpg.ssh.allowedSignersFile має бути налаштований та існувати для перевірки "
+"ssh підпису"
msgid ""
"ssh-keygen -Y find-principals/verify is needed for ssh signature "
"verification (available in openssh version 8.2p1+)"
msgstr ""
+"ssh-keygen -Y find-principals/verify необхідно для перевірки підпису ssh "
+"(доступно у версії openssh 8.2p1+)"
#, c-format
msgid "ssh signing revocation file configured but not found: %s"
-msgstr ""
+msgstr "файл скасування підпису ssh налаштовано, але не знайдено: %s"
#, c-format
msgid "bad/incompatible signature '%s'"
-msgstr ""
+msgstr "невірний/несумісний підпис \"%s\""
#, c-format
msgid "failed to get the ssh fingerprint for key '%s'"
@@ -15632,14 +16578,17 @@ msgstr "не вдалося отримати ssh відбиток для клю
msgid ""
"either user.signingkey or gpg.ssh.defaultKeyCommand needs to be configured"
msgstr ""
+"потрібно налаштувати або user.signingkey, або gpg.ssh.defaultKeyCommand"
#, c-format
msgid "gpg.ssh.defaultKeyCommand succeeded but returned no keys: %s %s"
msgstr ""
+"gpg.ssh.defaultKeyCommand команда виконалася успішно, але не повернула "
+"жодного ключа: %s %s"
#, c-format
msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
-msgstr ""
+msgstr "gpg.ssh.defaultKeyCommand завершився невдало: %s %s"
#, c-format
msgid ""
@@ -15650,7 +16599,7 @@ msgstr ""
"%s"
msgid "user.signingKey needs to be set for ssh signing"
-msgstr ""
+msgstr "user.signingKey має бути налаштований для ssh підписання"
#, c-format
msgid "failed writing ssh signing key to '%s'"
@@ -15664,19 +16613,23 @@ msgid ""
"ssh-keygen -Y sign is needed for ssh signing (available in openssh version "
"8.2p1+)"
msgstr ""
+"ssh-keygen -Y знак потрібен для ssh підписання (доступно у openssh версії "
+"8.2p1+)"
#, c-format
msgid "failed reading ssh signing data buffer from '%s'"
-msgstr ""
+msgstr "не вдалося прочитати буфер даних ssh підписання з \"%s\""
#, c-format
msgid "ignored invalid color '%.*s' in log.graphColors"
-msgstr ""
+msgstr "проігноровано неприпустимий колір \"%.*s\" у log.graphColors"
msgid ""
"given pattern contains NULL byte (via -f <file>). This is only supported "
"with -P under PCRE v2"
msgstr ""
+"заданий шаблон містить NULL байт (через -f <файл>). Це підтримується лише з "
+"опцією -P у PCRE v2"
#, c-format
msgid "'%s': unable to read %s"
@@ -15684,109 +16637,112 @@ msgstr "\"%s\": не вдалося прочитати %s"
#, c-format
msgid "'%s': short read"
-msgstr ""
+msgstr "\"%s\": помилка считування"
msgid "start a working area (see also: git help tutorial)"
-msgstr ""
+msgstr "запустити робочу область (дивіться також: git help tutorial)"
msgid "work on the current change (see also: git help everyday)"
-msgstr ""
+msgstr "працювати над поточними змінами (дивіться також: git help everyday)"
msgid "examine the history and state (see also: git help revisions)"
-msgstr ""
+msgstr "переглянути історію та стан (дивіться також: git help revisions)"
msgid "grow, mark and tweak your common history"
-msgstr ""
+msgstr "розвивати, позначати та підправляти вашу спільну історію"
msgid "collaborate (see also: git help workflows)"
-msgstr ""
+msgstr "співпрацювати (дивіться також: git help workflows)"
msgid "Main Porcelain Commands"
-msgstr ""
+msgstr "Основні високорівневі команди"
msgid "Ancillary Commands / Manipulators"
-msgstr ""
+msgstr "Допоміжні команди / Маніпулятори"
msgid "Ancillary Commands / Interrogators"
-msgstr ""
+msgstr "Допоміжні команди / Допитувачі"
msgid "Interacting with Others"
-msgstr ""
+msgstr "Взаємодія з іншими"
msgid "Low-level Commands / Manipulators"
-msgstr ""
+msgstr "Низькорівневі команди / Маніпулятори"
msgid "Low-level Commands / Interrogators"
-msgstr ""
+msgstr "Низькорівневі команди / Допитувачі"
msgid "Low-level Commands / Syncing Repositories"
-msgstr ""
+msgstr "Низькорівневі команди / Сховища синхронізації"
msgid "Low-level Commands / Internal Helpers"
-msgstr ""
+msgstr "Низькорівневі команди / Внутрішні помічники"
msgid "User-facing repository, command and file interfaces"
-msgstr ""
+msgstr "Інтерфейси користувача для сховищ, команд та файлів"
msgid "Developer-facing file formats, protocols and other interfaces"
-msgstr ""
+msgstr "Формати файлів, протоколи та інші інтерфейси розробника"
#, c-format
msgid "available git commands in '%s'"
msgstr "доступні команди git в \"%s\""
msgid "git commands available from elsewhere on your $PATH"
-msgstr ""
+msgstr "команди git доступні з будь-якого місця на вашому $PATH"
msgid "These are common Git commands used in various situations:"
-msgstr ""
+msgstr "Це загальні команди Git, які використовуються в різних ситуаціях:"
msgid "The Git concept guides are:"
-msgstr ""
+msgstr "Посібники з понять Git:"
msgid "User-facing repository, command and file interfaces:"
-msgstr ""
+msgstr "Інтерфейси користувача для сховищ, команд та файлів:"
msgid "File formats, protocols and other developer interfaces:"
-msgstr ""
+msgstr "Формати файлів, протоколи та інші інтерфейси розробника:"
msgid "External commands"
-msgstr ""
+msgstr "Зовнішні команди"
msgid "Command aliases"
-msgstr ""
+msgstr "Псевдоніми команд"
msgid "See 'git help <command>' to read about a specific subcommand"
msgstr ""
+"Дивіться \"git help <команда>\", щоб прочитати про конкретну підкоманду"
#, c-format
msgid ""
"'%s' appears to be a git command, but we were not\n"
"able to execute it. Maybe git-%s is broken?"
msgstr ""
+"Схоже, що \"%s\" є git командою, але ми не змогли\n"
+"виконати її. Можливо, git-%s не працює?"
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
-msgstr ""
+msgstr "git: \"%s\" не є командою git. Дивітья git --help."
msgid "Uh oh. Your system reports no Git commands at all."
-msgstr ""
+msgstr "Ой-ой. Ваша система повідомляє про повну відсутність Git команд."
#, c-format
msgid "WARNING: You called a Git command named '%s', which does not exist."
-msgstr ""
+msgstr "ПОПЕРЕДЖЕННЯ: Ви викликали Git команду \"%s\", якої не існує."
#, c-format
msgid "Continuing under the assumption that you meant '%s'."
-msgstr ""
+msgstr "Продовжую, припускаючи, що ви мали на увазі \"%s\"."
#, c-format
msgid "Run '%s' instead [y/N]? "
-msgstr ""
+msgstr "Запустити натомість \"%s\" [y/N]? "
#, c-format
msgid "Continuing in %0.1f seconds, assuming that you meant '%s'."
-msgstr ""
+msgstr "Продовжую через %0.1f секунд, припускаючи, що ви мали на увазі \"%s\"."
msgid ""
"\n"
@@ -15795,15 +16751,21 @@ msgid_plural ""
"\n"
"The most similar commands are"
msgstr[0] ""
+"\n"
+"Найбільш схожою командою є"
msgstr[1] ""
+"\n"
+"Найбільш схожими командами є"
msgstr[2] ""
+"\n"
+"Найбільш схожими командами є"
msgid "git version [--build-options]"
-msgstr ""
+msgstr "git версія [--build-options]"
#, c-format
msgid "%s: %s - %s"
-msgstr ""
+msgstr "%s: %s - %s"
msgid ""
"\n"
@@ -15812,18 +16774,27 @@ msgid_plural ""
"\n"
"Did you mean one of these?"
msgstr[0] ""
+"\n"
+"Ви це мали на увазі?"
msgstr[1] ""
+"\n"
+"Ви мали на увазі одну з цих?"
msgstr[2] ""
+"\n"
+"Ви мали на увазі одну з цих?"
#, c-format
msgid ""
"The '%s' hook was ignored because it's not set as executable.\n"
"You can disable this warning with `git config advice.ignoredHook false`."
msgstr ""
+"Гачок \"%s\" було проігноровано, оскільки він не визначений як виконуваний.\n"
+"Ви можете вимкнути це попередження за допомогою \"git config advice."
+"ignoredHook false\"."
#, c-format
msgid "argument to --packfile must be a valid hash (got '%s')"
-msgstr ""
+msgstr "аргумент до --packfile має бути коректним хешем (отримано \"%s\")"
msgid "not a git repository"
msgstr "не є git сховищем"
@@ -15831,27 +16802,30 @@ msgstr "не є git сховищем"
#, c-format
msgid "negative value for http.postBuffer; defaulting to %d"
msgstr ""
+"відʼємне значення для http.postBuffer; зміна до значеня за замовчуванням %d"
msgid "Delegation control is not supported with cURL < 7.22.0"
-msgstr ""
+msgstr "Контроль делегування не підтримується з cURL < 7.22.0"
msgid "Public key pinning not supported with cURL < 7.39.0"
-msgstr ""
+msgstr "Закріплення відкритих ключів не підтримується з cURL < 7.39.0"
msgid "CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0"
-msgstr ""
+msgstr "CURLSSLOPT_NO_REVOKE не підтримується з cURL < 7.44.0"
#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
-msgstr ""
+msgstr "Непідтримуваний SSL обробник \"%s\". Підтримувані SSL обробники:"
#, c-format
msgid "Could not set SSL backend to '%s': cURL was built without SSL backends"
msgstr ""
+"Не вдалося встановити SSL обробник в \"%s\": cURL було зібрано без підтримки "
+"SSL обробників"
#, c-format
msgid "Could not set SSL backend to '%s': already set"
-msgstr ""
+msgstr "Не вдалося встановити SSL обробник в \"%s\": вже встановлено"
#, c-format
msgid ""
@@ -15859,12 +16833,15 @@ msgid ""
" asked for: %s\n"
" redirect: %s"
msgstr ""
+"не вдалося оновити базу url з перенаправлення:\n"
+" запитували: %s\n"
+" перенаправлення: %s"
msgid "Author identity unknown\n"
-msgstr ""
+msgstr "Особистість автора невідома\n"
msgid "Committer identity unknown\n"
-msgstr ""
+msgstr "Особистість комітера невідома\n"
msgid ""
"\n"
@@ -15879,16 +16856,27 @@ msgid ""
"Omit --global to set the identity only in this repository.\n"
"\n"
msgstr ""
+"\n"
+"*** Будь ласка, скажіть мені, хто ви.\n"
+"\n"
+"Виконайте\n"
+"\n"
+" git config --global user.email \"you@example.com\"\n"
+" git config --global user.name \"Ваше Імʼя\"\n"
+"\n"
+"щоб встановити особистість акаунту за замовчуванням.\n"
+"Пропустіть --global, щоб встановити особистість лише для цього сховища.\n"
msgid "no email was given and auto-detection is disabled"
-msgstr ""
+msgstr "не вказана адреса електронної пошти і автоматичне визначення вимкнено"
#, c-format
msgid "unable to auto-detect email address (got '%s')"
msgstr ""
+"не вдалося автоматично визначити адресу електронної пошти (отримано \"%s\")"
msgid "no name was given and auto-detection is disabled"
-msgstr ""
+msgstr "імʼя не вказано і автоматичне визначення вимкнено"
#, c-format
msgid "unable to auto-detect name (got '%s')"
@@ -15896,21 +16884,21 @@ msgstr "не вдалося автоматично визначити назву
#, c-format
msgid "empty ident name (for <%s>) not allowed"
-msgstr ""
+msgstr "порожнє імʼя особистості (для <%s>) заборонено"
#, c-format
msgid "name consists only of disallowed characters: %s"
-msgstr ""
+msgstr "імʼя складається лише з заборонених символів: %s"
msgid "expected 'tree:<depth>'"
-msgstr ""
+msgstr "очікувалось \"tree:<глибина>\""
msgid "sparse:path filters support has been dropped"
-msgstr ""
+msgstr "підтримку фільтрів sparse:path було припинено"
#, c-format
msgid "'%s' for 'object:type=<type>' is not a valid object type"
-msgstr ""
+msgstr "\"%s\" для \"object:type=<type>\" не є припустимим типом обʼєкта"
#, c-format
msgid "invalid filter-spec '%s'"
@@ -15918,38 +16906,38 @@ msgstr "неприпустимий визначник фільтра \"%s\""
#, c-format
msgid "must escape char in sub-filter-spec: '%c'"
-msgstr ""
+msgstr "необхідно екранувати символ у sub-filter-spec: \"%c\""
msgid "expected something after combine:"
-msgstr ""
+msgstr "щоcь очікувалось після комбінування:"
msgid "multiple filter-specs cannot be combined"
-msgstr ""
+msgstr "не можна комбінувати кілька визначників фільтра"
msgid "unable to upgrade repository format to support partial clone"
-msgstr ""
+msgstr "не вдалося оновити формат сховища для підтримки часткового клонування"
msgid "args"
-msgstr ""
+msgstr "аргументи"
msgid "object filtering"
-msgstr ""
+msgstr "фільтрація обʼєктів"
#, c-format
msgid "unable to access sparse blob in '%s'"
-msgstr "не вдалося отримати доступ до часткового blob в \"%s\""
+msgstr "не вдалося отримати доступ до розрідженого blob в \"%s\""
#, c-format
msgid "unable to parse sparse filter data in %s"
-msgstr "не вдалося розібрати дані часткового фільтра в %s"
+msgstr "не вдалося розібрати дані розрідженого фільтра в %s"
#, c-format
msgid "entry '%s' in tree %s has tree mode, but is not a tree"
-msgstr ""
+msgstr "запис \"%s\" у дереві %s має режим tree, але не є деревом"
#, c-format
msgid "entry '%s' in tree %s has blob mode, but is not a blob"
-msgstr ""
+msgstr "запис \"%s\" у дереві %s має режим blob, але не є blob"
#, c-format
msgid "unable to load root tree for commit %s"
@@ -15965,6 +16953,15 @@ msgid ""
"may have crashed in this repository earlier:\n"
"remove the file manually to continue."
msgstr ""
+"Не вдалося створити \"%s.lock\": %s.\n"
+"\n"
+"Схоже, у цьому сховищі запущено інший git процес, наприклад\n"
+"редактор, відкритий командою \"git commit\". Будь ласка, переконайтеся, що "
+"всі процеси\n"
+"завершено, а потім спробуйте ще раз. Якщо все одно не вдасться, можливо, "
+"раніше \n"
+"у цьому сховищі аварійно завершився git процес:\n"
+"видаліть файл вручну, щоб продовжити."
#, c-format
msgid "Unable to create '%s.lock': %s"
@@ -15972,33 +16969,33 @@ msgstr "Не вдалося створити \"%s.lock\": %s"
#, c-format
msgid "unexpected line: '%s'"
-msgstr ""
+msgstr "неочікуваний рядок: \"%s\""
msgid "expected flush after ls-refs arguments"
-msgstr ""
+msgstr "очікувався flush після ls-refs аргументів"
msgid "quoted CRLF detected"
-msgstr ""
+msgstr "виявлено цитований CRLF"
#, c-format
msgid "Failed to merge submodule %s (not checked out)"
-msgstr ""
+msgstr "Не вдалося обʼєднати підмодуль %s (не активне)"
#, c-format
msgid "Failed to merge submodule %s (no merge base)"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s (немає бази злиття)"
#, c-format
msgid "Failed to merge submodule %s (commits not present)"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s (відсутні коміти)"
#, c-format
msgid "Failed to merge submodule %s (commits don't follow merge-base)"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s (коміти не відповідають базі)"
#, c-format
msgid "Note: Fast-forwarding submodule %s to %s"
-msgstr ""
+msgstr "Примітка: перемотування підмодуля %s вперед до %s"
#, c-format
msgid "Failed to merge submodule %s"
@@ -16007,16 +17004,18 @@ msgstr "Не вдалося злити підмодуль %s"
#, c-format
msgid ""
"Failed to merge submodule %s, but a possible merge resolution exists: %s"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s, але існує можливе вирішення злиття: %s"
#, c-format
msgid ""
"Failed to merge submodule %s, but multiple possible merges exist:\n"
"%s"
msgstr ""
+"Не вдалося злити підмодуль %s, але існує кілька можливих варіантів злиття:\n"
+"%s"
msgid "Failed to execute internal merge"
-msgstr ""
+msgstr "Не вдалося виконати внутрішнє злиття"
#, c-format
msgid "Unable to add %s to database"
@@ -16024,19 +17023,24 @@ msgstr "Не вдалося додати %s до бази даних"
#, c-format
msgid "Auto-merging %s"
-msgstr ""
+msgstr "Автоматичне злиття %s"
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Existing file/dir at %s in the way of "
"implicit directory rename(s) putting the following path(s) there: %s."
msgstr ""
+"КОНФЛІКТ (неявне перейменування каталогу): існуючий файл/директорія в %s "
+"заважає неявному перейменуванню директорії, додавши наступні шляхи до: %s."
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Cannot map more than one path to %s; "
"implicit directory renames tried to put these paths there: %s"
msgstr ""
+"КОНФЛІКТ (неявне перейменування директорії): Неможливо зіставити більше "
+"одного шляху з %s; неявне перейменування директорій намагалося помістити "
+"туди ці шляхи: %s"
#, c-format
msgid ""
@@ -16044,40 +17048,56 @@ msgid ""
"renamed to multiple other directories, with no destination getting a "
"majority of the files."
msgstr ""
+"КОНФЛІКТ (розбіжність під час перейменування директорії): Неясно, як "
+"перейменувати директорію %s; її було перейменовано в кілька інших "
+"директорій, жодна з яких не отримала більшості файлів."
#, c-format
msgid ""
"WARNING: Avoiding applying %s -> %s rename to %s, because %s itself was "
"renamed."
msgstr ""
+"ПОПЕРЕДЖЕННЯ: уникнення застосування %s -> %s перейменування на %s, оскільки "
+"%s було перейменовано."
#, c-format
msgid ""
"Path updated: %s added in %s inside a directory that was renamed in %s; "
"moving it to %s."
msgstr ""
+"Шлях було оновлено: %s додано до %s всередині директорії, яку було "
+"перейменовано в %s; переміщення до %s."
#, c-format
msgid ""
"Path updated: %s renamed to %s in %s, inside a directory that was renamed in "
"%s; moving it to %s."
msgstr ""
+"Шлях було оновлено: %s перейменовано на %s в %s, всередині директорії, яку "
+"було перейменовано в %s; переміщення до %s."
#, c-format
msgid ""
"CONFLICT (file location): %s added in %s inside a directory that was renamed "
"in %s, suggesting it should perhaps be moved to %s."
msgstr ""
+"КОНФЛІКТ (розташування файлу): %s додано до %s всередині директорії, яку "
+"було перейменовано в %s, що свідчить про те, що його слід перемістити до %s."
#, c-format
msgid ""
"CONFLICT (file location): %s renamed to %s in %s, inside a directory that "
"was renamed in %s, suggesting it should perhaps be moved to %s."
msgstr ""
+"КОНФЛІКТ (розташування файлу): %s перейменовано на %s в %s всередині "
+"директорії, яку було перейменовано в %s, що свідчить про те, що його слід "
+"перемістити до %s."
#, c-format
msgid "CONFLICT (rename/rename): %s renamed to %s in %s and to %s in %s."
msgstr ""
+"КОНФЛІКТ (перейменовано/перейменовано): %s перейменовано на %s в %s та на %s "
+"в %s."
#, c-format
msgid ""
@@ -16085,10 +17105,15 @@ msgid ""
"conflicts AND collides with another path; this may result in nested conflict "
"markers."
msgstr ""
+"КОНФЛІКТ (перейменування призвело до колізії): перейменування %s -> %s має "
+"конфлікт вмісту та зіткається з іншим шляхом; це може призвести до появи "
+"вкладених маркерів конфлікту."
#, c-format
msgid "CONFLICT (rename/delete): %s renamed to %s in %s, but deleted in %s."
msgstr ""
+"КОНФЛІКТ (перейменовано/видалено): %s перейменовано на %s в %s, але видалено "
+"в %s."
#, c-format
msgid "cannot read object %s"
@@ -16103,37 +17128,45 @@ msgid ""
"CONFLICT (file/directory): directory in the way of %s from %s; moving it to "
"%s instead."
msgstr ""
+"КОНФЛІКТ (файл/директорія): директорія на шляху %s від %s; переміщення її до "
+"%s замість цього."
#, c-format
msgid ""
"CONFLICT (distinct types): %s had different types on each side; renamed both "
"of them so each can be recorded somewhere."
msgstr ""
+"КОНФЛІКТ (різні типи): %s мали різні типи з обох боків; перейменовано "
+"обидва, щоб кожен можна було десь записати."
#, c-format
msgid ""
"CONFLICT (distinct types): %s had different types on each side; renamed one "
"of them so each can be recorded somewhere."
msgstr ""
+"КОНФЛІКТ (різні типи): %s мали різні типи з обох боків; перейменовано один з "
+"них, щоб кожен можна було десь записати."
msgid "content"
-msgstr ""
+msgstr "вміст"
msgid "add/add"
-msgstr ""
+msgstr "додано/додано"
msgid "submodule"
-msgstr ""
+msgstr "підмодуль"
#, c-format
msgid "CONFLICT (%s): Merge conflict in %s"
-msgstr ""
+msgstr "КОНФЛІКТ (%s): конфлікт злиття в %s"
#, c-format
msgid ""
"CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s "
"of %s left in tree."
msgstr ""
+"КОНФЛІКТ (змінено/видалено): %s видалено в %s та змінено в %s. Версію %s з "
+"%s залишено у дереві."
#. TRANSLATORS: This is a line of advice to resolve a merge
#. conflict in a submodule. The first argument is the submodule
@@ -16147,6 +17180,8 @@ msgid ""
" - go to submodule (%s), and either merge commit %s\n"
" or update to an existing commit which has merged those changes\n"
msgstr ""
+" - перейдіть до підмодуля (%s), щоб або злити коміт %s\n"
+" або оновитись до існуючого коміту, в якому ці зміни вже злиті\n"
#, c-format
msgid ""
@@ -16161,6 +17196,16 @@ msgid ""
" - resolve any other conflicts in the superproject\n"
" - commit the resulting index in the superproject\n"
msgstr ""
+"Рекурсивне злиття з підмодулями наразі підтримує лише тривіальні випадки.\n"
+"Будь ласка, обробіть злиття кожного конфліктного підмодуля вручну.\n"
+"Це можна зробити за допомогою наступних кроків:\n"
+"%s - поверніться до суперпроекту і виконайте:\n"
+"\n"
+" git add %s\n"
+"\n"
+" щоб записати вищезгадане злиття або оновлення\n"
+"- розвʼяжіть будь-які інші конфлікти в суперпроекті\n"
+"- зробіть коміт підсумкового індекса в суперпроекті\n"
#. TRANSLATORS: The %s arguments are: 1) tree hash of a merge
#. base, and 2-3) the trees for the two trees we're merging.
@@ -16168,10 +17213,10 @@ msgstr ""
#, c-format
msgid "collecting merge info failed for trees %s, %s, %s"
-msgstr ""
+msgstr "збирання інформації про злиття не вдалося для дерев %s, %s, %s"
msgid "(bad commit)\n"
-msgstr ""
+msgstr "(невірний коміт)\n"
#, c-format
msgid "add_cacheinfo failed for path '%s'; merge aborting."
@@ -16180,6 +17225,8 @@ msgstr "невдала спроба add_cacheinfo для шляху \"%s\"; пе
#, c-format
msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
msgstr ""
+"процесу add_cacheinfo не вдалося зробити оновлення для шляху \"%s\"; "
+"переривання злиття."
#, c-format
msgid "failed to create path '%s'%s"
@@ -16187,14 +17234,14 @@ msgstr "не вдалося створити шлях \"%s\"%s"
#, c-format
msgid "Removing %s to make room for subdirectory\n"
-msgstr ""
+msgstr "Видалення %s, щоб звільнити місце для піддиректорії\n"
msgid ": perhaps a D/F conflict?"
-msgstr ""
+msgstr ": можливо, D/F конфлікт?"
#, c-format
msgid "refusing to lose untracked file at '%s'"
-msgstr "відмова від втрати невідстежуваного файла \"%s\""
+msgstr "відмовлено у втраті невідстежуваного файла \"%s\""
#, c-format
msgid "blob expected for %s '%s'"
@@ -16210,26 +17257,26 @@ msgstr "не вдалося зробити символьне посилання
#, c-format
msgid "do not know what to do with %06o %s '%s'"
-msgstr ""
+msgstr "не знаю, що робити з %06o %s \"%s\""
#, c-format
msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr ""
+msgstr "Перемотування підмодуля %s вперед до наступного коміту:"
#, c-format
msgid "Fast-forwarding submodule %s"
-msgstr ""
+msgstr "Перемотування підмодуля %s вперед"
#, c-format
msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s (злиття наступних комітів не знайдено)"
#, c-format
msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s (не вдалося перемотати вперед)"
msgid "Found a possible merge resolution for the submodule:\n"
-msgstr ""
+msgstr "Знайдено можливе вирішення злиття для підмодуля:\n"
#, c-format
msgid ""
@@ -16240,38 +17287,54 @@ msgid ""
"\n"
"which will accept this suggestion.\n"
msgstr ""
+"Якщо все вірно, просто додайте це до індексу, наприклад,\n"
+"використавши:\n"
+"\n"
+" git update-index --cacheinfo 160000 %s \"%s\"\n"
+"\n"
+"який прийме цю пропозицію.\n"
#, c-format
msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr ""
+msgstr "Не вдалося злити підмодуль %s (знайдено більше одного злиття)"
#, c-format
msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
msgstr ""
+"Помилка: відмовлено у втраті невідстежуваного файла %s; натомість записуємо "
+"до %s."
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
"in tree."
msgstr ""
+"КОНФЛІКТ (%s/видалено): %s видалено в %s та %s в %s. Версію %s з %s залишено "
+"в дереві."
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
"left in tree."
msgstr ""
+"КОНФЛІКТ (%s/видалено): %s видалено в %s і %s в %s в %s. Версію %s з %s "
+"залишено у дереві."
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
"in tree at %s."
msgstr ""
+"КОНФЛІКТ (%s/видалено): %s видалено в %s і %s в %s. Версію %s з %s залишено "
+"у дереві в %s."
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
"left in tree at %s."
msgstr ""
+"КОНФЛІКТ (%s/видалено): %s видалено в %s і %s в %s в %s. Версію %s з %s "
+"залишено в дереві в %s."
msgid "rename"
msgstr "перейменувати"
@@ -16281,36 +17344,43 @@ msgstr "перейменовано"
#, c-format
msgid "Refusing to lose dirty file at %s"
-msgstr "Відмова від втрати брудного файла %s"
+msgstr "Відмовлено у втраті брудного файла %s"
#, c-format
msgid "Refusing to lose untracked file at %s, even though it's in the way."
msgstr ""
+"Відмовлено у втраті невідстежуваного файла %s, не дивлячись на те, що він "
+"знаходиться на шляху."
#, c-format
msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
msgstr ""
+"КОНФЛІКТ (перейменовано/додано): перейменовано %s->%s в %s. Додано %s в %s"
#, c-format
msgid "%s is a directory in %s adding as %s instead"
-msgstr ""
+msgstr "%s є директорією в %s, натомість додаємо як %s"
#, c-format
msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr ""
+msgstr "Відмовлено у втраті невідстежуваного файла %s; натомість додаємо як %s"
#, c-format
msgid ""
"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
"\"%s\"->\"%s\" in \"%s\"%s"
msgstr ""
+"КОНФЛІКТ (перейменовано/перейменовано): перейменовано \"%s\"->\"%s\" у гілці "
+"\"%s\" перейменовано \"%s\"->\"%s\" у \"%s\"%s"
msgid " (left unresolved)"
-msgstr ""
+msgstr " (залишилося нерозвʼязаним)"
#, c-format
msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
msgstr ""
+"КОНФЛІКТ (перейменовано/перейменовано): перейменовано %s->%s в %s. "
+"Перейменовано %s->%s в %s"
#, c-format
msgid ""
@@ -16318,12 +17388,17 @@ msgid ""
"directory %s was renamed to multiple other directories, with no destination "
"getting a majority of the files."
msgstr ""
+"КОНФЛІКТ (розбіжність під час перейменування директорії): Неясно, куди "
+"помістити %s, оскільки директорію %s було перейменовано в кілька інших "
+"директорій, жодна з яких не отримала більшості файлів."
#, c-format
msgid ""
"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
">%s in %s"
msgstr ""
+"КОНФЛІКТ (перейменовано/перейменовано): перейменовано директорію %s->%s в "
+"%s. Перейменовано директорію %s->%s в %s"
msgid "modify"
msgstr "змінити"
@@ -16333,11 +17408,11 @@ msgstr "змінено"
#, c-format
msgid "Skipped %s (merged same as existing)"
-msgstr ""
+msgstr "Пропущено %s (злите - те саме, що й існуюче)"
#, c-format
msgid "Adding as %s instead"
-msgstr ""
+msgstr "Додавання як %s замість цього"
#, c-format
msgid "Removing %s"
@@ -16347,36 +17422,36 @@ msgid "file/directory"
msgstr "файл/директорія"
msgid "directory/file"
-msgstr ""
+msgstr "директорія/файл"
#, c-format
msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr ""
+msgstr "КОНФЛІКТ (%s): в %s існує директорія з іменем %s. Додавання %s як %s"
#, c-format
msgid "Adding %s"
-msgstr ""
+msgstr "Додавання %s"
#, c-format
msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr ""
+msgstr "КОНФЛІКТ (додано/додано): Конфлікт злиття у %s"
#, c-format
msgid "merging of trees %s and %s failed"
-msgstr ""
+msgstr "не вдалося злити дерева %s та %s"
msgid "Merging:"
-msgstr ""
+msgstr "Злиття:"
#, c-format
msgid "found %u common ancestor:"
msgid_plural "found %u common ancestors:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "знайшли %u спільного предка:"
+msgstr[1] "знайшли %u спільних предків:"
+msgstr[2] "знайшли %u спільних предків:"
msgid "merge returned no commit"
-msgstr ""
+msgstr "злиття не повернуло коміт"
#, c-format
msgid "Could not parse object '%s'"
@@ -16386,46 +17461,49 @@ msgid "failed to read the cache"
msgstr "не вдалося прочитати кеш"
msgid "multi-pack-index OID fanout is of the wrong size"
-msgstr ""
+msgstr "multi-pack-index OID fanout має невірний розмір"
#, c-format
msgid "multi-pack-index file %s is too small"
-msgstr ""
+msgstr "multi-pack-index файл %s занадто малий"
#, c-format
msgid "multi-pack-index signature 0x%08x does not match signature 0x%08x"
-msgstr ""
+msgstr "multi-pack-index підпис 0x%08x не збігається з підписом 0x%08x"
#, c-format
msgid "multi-pack-index version %d not recognized"
-msgstr ""
+msgstr "multi-pack-index версія %d не розпізнана"
#, c-format
msgid "multi-pack-index hash version %u does not match version %u"
-msgstr ""
+msgstr "версія хешу multi-pack-index %u не збігається з версією %u"
msgid "multi-pack-index missing required pack-name chunk"
-msgstr ""
+msgstr "multi-pack-index недостає необхідного фрагмента імені пакунка"
msgid "multi-pack-index missing required OID fanout chunk"
-msgstr ""
+msgstr "multi-pack-index недостає необхідного OID fanout фрагмента"
msgid "multi-pack-index missing required OID lookup chunk"
-msgstr ""
+msgstr "multi-pack-index недостає необхідного OID lookup фрагмента"
msgid "multi-pack-index missing required object offsets chunk"
-msgstr ""
+msgstr "multi-pack-index недостає необхідного фрагмента зміщення обʼєктів"
#, c-format
msgid "multi-pack-index pack names out of order: '%s' before '%s'"
msgstr ""
+"multi-pack-index назви пакунків знаходяться у невірній послідовності: \"%s\" "
+"перед \"%s\""
#, c-format
msgid "bad pack-int-id: %u (%u total packs)"
-msgstr ""
+msgstr "невірний pack-int-id: %u (%u всього пакунків)"
msgid "multi-pack-index stores a 64-bit offset, but off_t is too small"
msgstr ""
+"multi-pack-index зберігає 64-бітне зміщення, але значення off_t занадто мале"
#, c-format
msgid "failed to add packfile '%s'"
@@ -16437,7 +17515,7 @@ msgstr "не вдалося відкрити pack-index \"%s\""
#, c-format
msgid "failed to locate object %d in packfile"
-msgstr ""
+msgstr "не вдалося знайти обʼєкт %d у файлі пакунка"
msgid "cannot store reverse index file"
msgstr "неможливо зберегти файл зворотнього індексу"
@@ -16448,10 +17526,11 @@ msgstr "не вдалося розібрати рядок: %s"
#, c-format
msgid "malformed line: %s"
-msgstr ""
+msgstr "невірно сформований рядок: %s"
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr ""
+"ігнорування існуючого multi-pack-index; невідповідність контрольних сум"
msgid "could not load pack"
msgstr "не вдалося завантажити пакет"
@@ -16461,32 +17540,32 @@ msgid "could not open index for %s"
msgstr "не вдалося відкрити індекс для %s"
msgid "Adding packfiles to multi-pack-index"
-msgstr ""
+msgstr "Додавання пакунків до multi-pack-index"
#, c-format
msgid "unknown preferred pack: '%s'"
-msgstr ""
+msgstr "невідомий бажаний пакунок: \"%s\""
#, c-format
msgid "cannot select preferred pack %s with no objects"
-msgstr ""
+msgstr "неможливо вибрати бажаний пакунок %s за відсутності об’єктів"
#, c-format
msgid "did not see pack-file %s to drop"
-msgstr ""
+msgstr "не побачив файл пакунка %s, який потрібно скинути"
#, c-format
msgid "preferred pack '%s' is expired"
-msgstr ""
+msgstr "у бажаного пакета \"%s\" закінчився термін дії"
msgid "no pack files to index."
-msgstr ""
+msgstr "немає файлів пакунків для індексації."
msgid "refusing to write multi-pack .bitmap without any objects"
-msgstr ""
+msgstr "відмовлено в записі мультіпакункового .bitmap без обʼєктів"
msgid "could not write multi-pack bitmap"
-msgstr ""
+msgstr "не вдалося записати мультіпакунковий bitmap"
msgid "could not write multi-pack-index"
msgstr "не вдалося записати multi-pack-index"
@@ -16496,10 +17575,10 @@ msgid "failed to clear multi-pack-index at %s"
msgstr "не вдалося очистити multi-pack-index при %s"
msgid "multi-pack-index file exists, but failed to parse"
-msgstr ""
+msgstr "multi-pack-index файл існує, але його не вдалося розібрати"
msgid "incorrect checksum"
-msgstr ""
+msgstr "невірна контрольна сума"
msgid "Looking for referenced packfiles"
msgstr "Пошук файлів пакунків, на які є посилання"
@@ -16508,40 +17587,42 @@ msgstr "Пошук файлів пакунків, на які є посилан
msgid ""
"oid fanout out of order: fanout[%d] = %<PRIx32> > %<PRIx32> = fanout[%d]"
msgstr ""
+"невірна послідовность oid fanout: fanout[%d] = %<PRIx32> > %<PRIx32> = "
+"fanout[%d]"
msgid "the midx contains no oid"
-msgstr ""
+msgstr "midx не містить oid"
msgid "Verifying OID order in multi-pack-index"
-msgstr ""
+msgstr "Перевірка OID послідовності в multi-pack-index"
#, c-format
msgid "oid lookup out of order: oid[%d] = %s >= %s = oid[%d]"
-msgstr ""
+msgstr "невірна послідовність oid lookup: oid[%d] = %s >= %s = oid[%d]"
msgid "Sorting objects by packfile"
-msgstr ""
+msgstr "Сортування обʼєктів за файлом пакунка"
msgid "Verifying object offsets"
msgstr "Перевірка зміщень обʼєкта"
#, c-format
msgid "failed to load pack entry for oid[%d] = %s"
-msgstr ""
+msgstr "не вдалося завантажити запис пакунка для oid[%d] = %s"
#, c-format
msgid "failed to load pack-index for packfile %s"
-msgstr ""
+msgstr "не вдалося завантажити індекс файла пакунка %s"
#, c-format
msgid "incorrect object offset for oid[%d] = %s: %<PRIx64> != %<PRIx64>"
-msgstr ""
+msgstr "невірне зміщення обʼєкта для oid[%d] = %s: %<PRIx64> != %<PRIx64>"
msgid "Counting referenced objects"
msgstr "Підрахунок обʼєктів, на які є посилання"
msgid "Finding and deleting unreferenced packfiles"
-msgstr ""
+msgstr "Пошук і видалення файлів пакунків без посилань"
msgid "could not start pack-objects"
msgstr "не вдалося розпочати pack-objects"
@@ -16567,21 +17648,25 @@ msgid ""
"Please, use 'git notes merge --commit' or 'git notes merge --abort' to "
"commit/abort the previous merge before you start a new notes merge."
msgstr ""
+"Ви не завершили попереднє злиття нотаток (існує %s).\n"
+"Будь ласка, скористайтесь командами \"git notes merge --commit\" або \"git "
+"notes merge --abort\", щоб зробити коміт/скасувати попереднє злиття, перш "
+"ніж розпочати нове злиття нотаток."
#, c-format
msgid "You have not concluded your notes merge (%s exists)."
-msgstr ""
+msgstr "Ви не завершили злиття ваших нотаток (%s існує)."
msgid "Cannot commit uninitialized/unreferenced notes tree"
-msgstr ""
+msgstr "Неможливо зробити коміт неініціалізованого/непосиланого дерева нотаток"
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
-msgstr ""
+msgstr "Невірнe notes.rewriteMode значення: \"%s\""
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
-msgstr ""
+msgstr "Відмовлено в перезаписі нотаток у %s (за межами refs/notes/)"
#. TRANSLATORS: The first %s is the name of
#. the environment variable, the second %s is
@@ -16594,24 +17679,26 @@ msgstr "Невірне %s значення: \"%s\""
#, c-format
msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr ""
+msgstr "директорія об’єкта %s не існує; перевірте .git/objects/info/alternates"
#, c-format
msgid "unable to normalize alternate object path: %s"
-msgstr "не вдалося нормалізувати шлях альтернативного обʼєкта: %s"
+msgstr "не вдалося нормалізувати шлях запозиченого обʼєкта: %s"
#, c-format
msgid "%s: ignoring alternate object stores, nesting too deep"
msgstr ""
+"%s: ігнорування місць збереження запозичених об’єктів, надто глибока "
+"вкладеність"
msgid "unable to fdopen alternates lockfile"
-msgstr "не вдалося виконати fdopen для файла блокування спільних обʼєктів"
+msgstr "не вдалося виконати fdopen для файла блокування запозичених обʼєктів"
msgid "unable to read alternates file"
-msgstr "не вдалося прочитати файл спільних обʼєктів"
+msgstr "не вдалося прочитати файл запозичених обʼєктів"
msgid "unable to move new alternates file into place"
-msgstr "не вдалося перемістити файл нових спільних обʼєктів на місце"
+msgstr "не вдалося перемістити файл нових запозичених обʼєктів на місце"
#, c-format
msgid "path '%s' does not exist"
@@ -16619,7 +17706,7 @@ msgstr "шлях \"%s\" не існує"
#, c-format
msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr ""
+msgstr "посилання на сховище \"%s\" як повʼязане поки що не підтримується."
#, c-format
msgid "reference repository '%s' is not a local repository."
@@ -16627,7 +17714,7 @@ msgstr "сховище посилання \"%s\" не є локальним сх
#, c-format
msgid "reference repository '%s' is shallow"
-msgstr "сховище посилання \"%s\" є поверхневим"
+msgstr "сховище посилання \"%s\" є неглибоким"
#, c-format
msgid "reference repository '%s' is grafted"
@@ -16639,15 +17726,15 @@ msgstr "не вдалося знайти директорію обʼєктів,
#, c-format
msgid "invalid line while parsing alternate refs: %s"
-msgstr ""
+msgstr "неприпустимий рядок при розбиранні посилань запозичених обʼєктів: %s"
#, c-format
msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr ""
+msgstr "спроба виконати mmap %<PRIuMAX> за межею %<PRIuMAX>"
#, c-format
msgid "mmap failed%s"
-msgstr ""
+msgstr "операція mmap не вдалася%s"
#, c-format
msgid "object file %s is empty"
@@ -16659,7 +17746,7 @@ msgstr "пошкоджено вільний обʼєкт \"%s\""
#, c-format
msgid "garbage at end of loose object '%s'"
-msgstr ""
+msgstr "непотріб в кінці вільного обʼєкта \"%s\""
#, c-format
msgid "unable to open loose object %s"
@@ -16678,7 +17765,7 @@ msgstr "не вдалося розпакувати %s заголовок"
#, c-format
msgid "header for %s too long, exceeds %d bytes"
-msgstr ""
+msgstr "заголовок для %s занадто довгий, перевищує %d байт"
#, c-format
msgid "loose object %s (stored in %s) is corrupt"
@@ -16698,14 +17785,14 @@ msgstr "не вдалося записати файл %s"
#, c-format
msgid "unable to set permission to '%s'"
-msgstr "не вдалося встановити права доступу до \"%s\""
+msgstr "не вдалося встановити дозволи для \"%s\""
msgid "error when closing loose object file"
msgstr "помилка при закритті файла вільного об’єкта"
#, c-format
msgid "insufficient permission for adding an object to repository database %s"
-msgstr ""
+msgstr "недостатньо дозволу для додавання обʼєкта до бази даних сховища %s"
msgid "unable to create temporary file"
msgstr "не вдалося створити тимчасовий файл"
@@ -16719,15 +17806,15 @@ msgstr "не вдалося запакувати новий обʼєкт %s (%d)
#, c-format
msgid "deflateEnd on object %s failed (%d)"
-msgstr ""
+msgstr "операція deflateEnd на обʼєкті %s завершилася невдало (%d)"
#, c-format
msgid "confused by unstable object source data for %s"
-msgstr ""
+msgstr "збентежений нестабільними початковими даними обʼєкта для %s"
#, c-format
msgid "write stream object %ld != %<PRIuMAX>"
-msgstr ""
+msgstr "запис обʼєкта потока %ld != %<PRIuMAX>"
#, c-format
msgid "unable to stream deflate new object (%d)"
@@ -16735,7 +17822,7 @@ msgstr "не вдалося запакувати новий обʼєкт (%d) п
#, c-format
msgid "deflateEnd on stream object failed (%d)"
-msgstr ""
+msgstr "операція deflateEnd на обʼєкті потоку завершилася невдало (%d)"
#, c-format
msgid "unable to create directory %s"
@@ -16747,26 +17834,26 @@ msgstr "неможливо прочитати обʼєкт для %s"
#, c-format
msgid "object fails fsck: %s"
-msgstr ""
+msgstr "об’єкт не пройшов перевірку fsck: %s"
msgid "refusing to create malformed object"
-msgstr ""
+msgstr "відмовлено в створенні невірно сформованого обʼєкта"
#, c-format
msgid "read error while indexing %s"
-msgstr ""
+msgstr "помилка считування при індексаціі %s"
#, c-format
msgid "short read while indexing %s"
-msgstr ""
+msgstr "помилка считування замалого вмісту при індексаціі %s"
#, c-format
msgid "%s: failed to insert into database"
-msgstr ""
+msgstr "%s: не вдалося внести до бази даних"
#, c-format
msgid "%s: unsupported file type"
-msgstr ""
+msgstr "%s: непідтримуваний тип файлу"
#, c-format
msgid "%s is not a valid '%s' object"
@@ -16778,7 +17865,7 @@ msgstr "не вдалося відкрити %s"
#, c-format
msgid "hash mismatch for %s (expected %s)"
-msgstr ""
+msgstr "невідповідність хешу для %s (очікувалось %s)"
#, c-format
msgid "unable to mmap %s"
@@ -16803,7 +17890,7 @@ msgstr "не вдалося розпакувати вміст %s"
#, c-format
msgid "%s [bad object]"
-msgstr ""
+msgstr "%s [невірний обʼект]"
#. TRANSLATORS: This is a line of ambiguous commit
#. object output. E.g.:
@@ -16840,7 +17927,7 @@ msgstr "%s тег %s - %s"
#, c-format
msgid "%s [bad tag, could not parse it]"
-msgstr ""
+msgstr "%s [невірний тег, не вдалося розібрати]"
#. TRANSLATORS: This is a line of ambiguous <type>
#. object output. E.g. "deadbeef tree".
@@ -16848,7 +17935,7 @@ msgstr ""
#, c-format
msgid "%s tree"
-msgstr ""
+msgstr "%s дерево"
#. TRANSLATORS: This is a line of ambiguous <type>
#. object output. E.g. "deadbeef blob".
@@ -16856,11 +17943,11 @@ msgstr ""
#, c-format
msgid "%s blob"
-msgstr ""
+msgstr "%s blob"
#, c-format
msgid "short object ID %s is ambiguous"
-msgstr ""
+msgstr "короткий ідентифікатор обʼєкта %s неоднозначний"
#. TRANSLATORS: The argument is the list of ambiguous
#. objects composed in show_ambiguous_object(). See
@@ -16872,6 +17959,8 @@ msgid ""
"The candidates are:\n"
"%s"
msgstr ""
+"Кандидати такі:\n"
+"%s"
msgid ""
"Git normally never creates a ref that ends with 40 hex characters\n"
@@ -16884,6 +17973,18 @@ msgid ""
"examine these refs and maybe delete them. Turn this message off by\n"
"running \"git config advice.objectNameWarning false\""
msgstr ""
+"Зазвичай Git ніколи не створює посилання, яке закінчується 40-hex "
+"символами,\n"
+"тому що воно буде проігноровано, якщо ви просто вкажете 40-hex. Такі "
+"посилання\n"
+"можуть бути створені помилково. Наприклад\n"
+"\n"
+" git switch -c $br $(git rev-parse ...)\n"
+"\n"
+"де \"$br\" якимось чином порожнє, створює 40-hex посилання. Будь ласка\n"
+"перевірте ці посилання і, можливо, видаліть їх. Щоб вимкнути це "
+"повідомлення, виконайте\n"
+"\"git config advice.objectNameWarning false\""
#, c-format
msgid "log for '%.*s' only goes back to %s"
@@ -17061,7 +18162,7 @@ msgid "failed to load bitmap indexes"
msgstr "не вдалося завантажити bitmap індекси"
msgid "you must specify exactly one commit to test"
-msgstr "ви маєте вказати тільки один коміт для тестування"
+msgstr "ви маєте вказати лишень один коміт для тестування"
#, c-format
msgid "commit '%s' doesn't have an indexed bitmap"
@@ -17093,7 +18194,7 @@ msgstr "mtimes файл %s має невідомий підпис"
#, c-format
msgid "mtimes file %s has unsupported version %<PRIu32>"
-msgstr "mtimes файл %s має непідтримувану версію %<PRIu32>."
+msgstr "mtimes файл %s має непідтримувану версію %<PRIu32>"
#, c-format
msgid "mtimes file %s has unsupported hash id %<PRIu32>"
@@ -17125,7 +18226,7 @@ msgstr ""
"файл зворотного індексу %s має непідтримуваний хеш-ідентифікатор %<PRIu32>"
msgid "invalid checksum"
-msgstr "невірна контрольна сума"
+msgstr "неприпустима контрольна сума"
#, c-format
msgid "invalid rev-index position at %<PRIu64>: %<PRIu32> != %<PRIu32>"
@@ -17164,7 +18265,7 @@ msgstr "зміщення за межою кінця індекса пакунк
#, c-format
msgid "malformed expiration date '%s'"
-msgstr "неправильно сформована дата закінчення терміну дії \"%s\""
+msgstr "невірно сформована дата закінчення терміну дії \"%s\""
#, c-format
msgid "option `%s' expects \"always\", \"auto\", or \"never\""
@@ -17172,7 +18273,7 @@ msgstr "опція \"%s\" очікує \"always\", \"auto\" або \"never\""
#, c-format
msgid "malformed object name '%s'"
-msgstr "неправильно сформована назва обʼєкта \"%s\""
+msgstr "невірно сформована назва обʼєкта \"%s\""
#, c-format
msgid "option `%s' expects \"%s\" or \"%s\""
@@ -17212,7 +18313,7 @@ msgstr "ви мали на увазі \"--%s\" (з двома рисками)?"
#, c-format
msgid "alias of --%s"
-msgstr "псевдонім --%s"
+msgstr "псевдонім для --%s"
msgid "need a subcommand"
msgstr "потрібна підкоманда"
@@ -17480,7 +18581,14 @@ msgstr "не вдалося згенерувати різницю"
#, c-format
msgid "could not parse log for '%s'"
-msgstr "не вдалося розібрати лог для \"%s\""
+msgstr "не вдалося розібрати журнал для \"%s\""
+
+#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "неприпустима додаткова марна верхівка: \"%s\""
+
+msgid "unable to enumerate additional recent objects"
+msgstr "не вдалося перерахувати додаткові нещодавні обʼєкти"
#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
@@ -17585,7 +18693,7 @@ msgstr "%s: не вдалося виконати stat відкритого ін
#, c-format
msgid "%s: index file smaller than expected"
-msgstr "%s: індексний файл менший, ніж очікувалося"
+msgstr "%s: індексний файл менший, ніж очікувався"
#, c-format
msgid "%s: unable to map index file%s"
@@ -17608,7 +18716,7 @@ msgid "broken index, expect %s in %s, got %s"
msgstr "пошкоджений індекс, очікувався %s у %s, отримано %s"
msgid "cannot write split index for a sparse index"
-msgstr "неможливо записати розділений індекс для часткового індексу"
+msgstr "неможливо записати розщеплений індекс для розрідженого індексу"
msgid "failed to convert to a sparse-index"
msgstr "не вдалося перетворити в sparse-index"
@@ -17623,7 +18731,7 @@ msgstr "не вдалося відкрити git-директорію: %s"
#, c-format
msgid "unable to unlink: %s"
-msgstr "не вдалося відʼєднати: %s"
+msgstr "не вдалося видалити: %s"
#, c-format
msgid "cannot fix permission bits on '%s'"
@@ -17633,6 +18741,14 @@ msgstr "неможливо виправити біти дозволу на \"%s\
msgid "%s: cannot drop to stage #0"
msgstr "%s: неможливо скинути індекс до стану #0"
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "неочікуваний статус diff %c"
+
+#, c-format
+msgid "remove '%s'\n"
+msgstr "видалити \"%s\"\n"
+
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
"continue'.\n"
@@ -17831,6 +18947,22 @@ msgid "positive value expected contents:lines=%s"
msgstr "очікувалось додатне значення contents:lines=%s"
#, c-format
+msgid "argument expected for %s"
+msgstr "очікувався аргумент для %s"
+
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "очікувалось додатне значення %s=%s"
+
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "неможливо повністю розібрати %s=%s"
+
+#, c-format
+msgid "value expected %s="
+msgstr "очікувалось значення %s="
+
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "очікувалось додатне значення \"%s\" у %%(%s)"
@@ -17860,7 +18992,7 @@ msgstr "очікуваний формат: %%(ahead-behind:<комітоподі
#, c-format
msgid "malformed field name: %.*s"
-msgstr "неправильно сформована назва поля: %.*s"
+msgstr "невірно сформована назва поля: %.*s"
#, c-format
msgid "unknown field name: %.*s"
@@ -17893,7 +19025,7 @@ msgstr "формат: %%(end) частка використана без від
#, c-format
msgid "malformed format string %s"
-msgstr "неправильно сформований рядок форматування %s"
+msgstr "невірно сформований рядок форматування %s"
#, c-format
msgid "this command reject atom %%(%.*s)"
@@ -17903,6 +19035,9 @@ msgstr "ця команда відхиляє частку %%(%.*s)"
msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s не може бути використаний з --python, --shell, --tcl"
+msgid "failed to run 'describe'"
+msgstr "не вдалося запустити команду \"describe\""
+
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(немає гілки, перебазування %s)"
@@ -17936,7 +19071,7 @@ msgstr "parse_object_buffer завершився невдало на %s для %
#, c-format
msgid "malformed object at '%s'"
-msgstr "неправильно сформований обʼєкт за адресою \"%s\""
+msgstr "невірно сформований обʼєкт за адресою \"%s\""
#, c-format
msgid "ignoring ref with broken name %s"
@@ -17952,7 +19087,7 @@ msgstr "формат: %%(end) частка відсутня"
#, c-format
msgid "malformed object name %s"
-msgstr "неправильно сформована назва обʼєкта %s"
+msgstr "невірно сформована назва обʼєкта %s"
#, c-format
msgid "option `%s' must point to a commit"
@@ -17964,13 +19099,16 @@ msgstr "ключ"
msgid "field name to sort on"
msgstr "назва поля для сортування"
+msgid "exclude refs which match pattern"
+msgstr "виключити посилання, які збігаються з шаблоном"
+
#, c-format
msgid "not a reflog: %s"
-msgstr "не reflog: %s"
+msgstr "не є журналом посилань: %s"
#, c-format
msgid "no reflog for '%s'"
-msgstr "немає reflog для \"%s\""
+msgstr "немає журналу посилань для \"%s\""
#, c-format
msgid "%s does not point to a valid object!"
@@ -17992,7 +19130,7 @@ msgstr ""
"Використання \"%s\" як назви початкової гілки. Назву гілки за замовчуванням\n"
"може бути змінено. Щоб налаштувати назву початкової гілки для використання у "
"всіх\n"
-"ваших нових сховищах, що приховуватиме це попередження, викличте\n"
+"ваших нових сховищах, що приховає це попередження, викличте\n"
"\n"
"\tgit config --global init.defaultBranch <назва>.\n"
"\n"
@@ -18029,7 +19167,7 @@ msgstr "лог для %s порожній"
#, c-format
msgid "refusing to update ref with bad name '%s'"
-msgstr "відмова оновлення посилання з невірною назвою \"%s\""
+msgstr "відмовлено в оновленні посилання з невірною назвою \"%s\""
#, c-format
msgid "update_ref failed for ref '%s': %s"
@@ -18079,7 +19217,7 @@ msgstr "%sinfo/refs не дійсні: це git сховище?"
msgid "invalid server response; expected service, got flush packet"
msgstr ""
-"неприпустима відповідь сервера; очікувався service, отримано flush пакет"
+"неприпустима відповідь сервера; очікувалось service, отримано flush пакет"
#, c-format
msgid "invalid server response; got '%s'"
@@ -18114,7 +19252,8 @@ msgstr "віддалений сервер надіслав неочікуван
msgid "unable to rewind rpc post data - try increasing http.postBuffer"
msgstr ""
-"не вдалося перемотати rpc post дані - спробуйте збільшити http.postBuffer"
+"не вдалося перемотати вперед rpc post дані - спробуйте збільшити http."
+"postBuffer"
#, c-format
msgid "remote-curl: bad line length character: %.4s"
@@ -18157,14 +19296,14 @@ msgstr "неможливо отримати дані за допомогою sha
#, c-format
msgid "protocol error: expected sha/ref, got '%s'"
-msgstr "помилка протоколу: очікувалося sha/ref, отримано \"%s\""
+msgstr "помилка протоколу: очікувалось sha/ref, отримано \"%s\""
#, c-format
msgid "http transport does not support %s"
msgstr "http засіб передачі не підтримує %s"
msgid "protocol error: expected '<url> <path>', missing space"
-msgstr "помилка протоколу: очікувалося \"<url> <шлях>\", пропущено пробіл"
+msgstr "помилка протоколу: очікувалось \"<url> <шлях>\", пропущено пробіл"
#, c-format
msgid "failed to download file at URL '%s'"
@@ -18189,7 +19328,7 @@ msgstr "remote-curl: невідома команда \"%s\" з git"
#, c-format
msgid "config remote shorthand cannot begin with '/': %s"
-msgstr "скорочення віддаленної конфігураціі не може починатися з '/': %s"
+msgstr "скорочення віддаленої конфігураціі не може починатися з '/': %s"
msgid "more than one receivepack given, using the first"
msgstr "надано більше одного пакунка для отримання, використано перший"
@@ -18203,7 +19342,7 @@ msgstr "нерозпізнане значення transfer.credentialsInUrl: '%s
#, c-format
msgid "URL '%s' uses plaintext credentials"
-msgstr "URL-адреса '%s' використовує облікові дані у відкритому тексті"
+msgstr "URL-адреса \"%s\" використовує облікові дані у відкритому тексті"
#, c-format
msgid "Cannot fetch both %s and %s to %s"
@@ -18254,8 +19393,8 @@ msgstr ""
"що починається з \"refs/\"). Ми спробували вгадати, що ви мали на увазі "
"через:\n"
"\n"
-"- Пошук посилання, яке відповідає '%s' на віддаленій стороні.\n"
-"- Перевірку, чи є <джерело> надсилання, ('%s')\n"
+"- Пошук посилання, яке відповідає \"%s\" на віддаленій стороні.\n"
+"- Перевірку, чи є <джерело> надсилання, (\"%s\")\n"
" посиланням у \"refs/{heads,tags}/\". Якщо так, то ми додаємо відповідний\n"
" refs/{heads,tags}/ префікс на віддаленій стороні.\n"
"\n"
@@ -18270,7 +19409,7 @@ msgid ""
msgstr ""
"Частина <джерело> визаначника посилання є об’єктом коміту.\n"
"Ви хотіли створити нову гілку, надіславши зміни до\n"
-"'%s:refs/heads/%s'?"
+"\"%s:refs/heads/%s\"?"
#, c-format
msgid ""
@@ -18280,7 +19419,7 @@ msgid ""
msgstr ""
"Частина <джерело> визаначника посилання є об’єктом тегу.\n"
"Ви хотіли створити новий тег, надіславши зміни до\n"
-"'%s:refs/tags/%s'?"
+"\"%s:refs/tags/%s\"?"
#, c-format
msgid ""
@@ -18290,7 +19429,7 @@ msgid ""
msgstr ""
"Частина <джерело> визаначника посилання є об’єктом дерева.\n"
"Ви хотіли позначити нове дерево, надіславши зміни до\n"
-"'%s:refs/tags/%s'?"
+"\"%s:refs/tags/%s\"?"
#, c-format
msgid ""
@@ -18300,7 +19439,7 @@ msgid ""
msgstr ""
"Частина <джерело> визаначника посилання є об’єктом blob.\n"
"Ви хотіли позначити новий blob, надіславши зміни до\n"
-"'%s:refs/tags/%s'?"
+"\"%s:refs/tags/%s\"?"
#, c-format
msgid "%s cannot be resolved to branch"
@@ -18308,7 +19447,7 @@ msgstr "%s неможливо розвʼязати в гілку"
#, c-format
msgid "unable to delete '%s': remote ref does not exist"
-msgstr "не вдалося видалити '%s': віддалене посилання не існує"
+msgstr "не вдалося видалити \"%s\": віддалене посилання не існує"
#, c-format
msgid "dst refspec %s matches more than one"
@@ -18331,19 +19470,17 @@ msgstr "першоджерельне сховище не налаштовано
#, c-format
msgid "upstream branch '%s' not stored as a remote-tracking branch"
-msgstr ""
-"гілка '%s' першоджерельного сховища не збережена як віддалено відстежувана "
-"гілка"
+msgstr "висхідна гілка \"%s\" не збережена як віддалено відстежувана гілка"
#, c-format
msgid "push destination '%s' on remote '%s' has no local tracking branch"
msgstr ""
-"шлях призначення надсилання '%s' на віддаленому '%s' не має гілки локального "
-"відстежування"
+"шлях призначення надсилання \"%s\" на віддаленому \"%s\" не має гілки "
+"локального відстежування"
#, c-format
msgid "branch '%s' has no remote for pushing"
-msgstr "гілка '%s' не має віддаленого призначення для надсилання"
+msgstr "гілка \"%s\" не має віддаленого призначення для надсилання"
#, c-format
msgid "push refspecs for '%s' do not include '%s'"
@@ -18354,7 +19491,7 @@ msgstr "надсилання не має призначення (push.default д
msgid "cannot resolve 'simple' push to a single destination"
msgstr ""
-"неможливо розвʼязати \"simple\" надсилання до одного пункту призначення"
+"неможливо розвʼязати \"simple\" надсилання до єдиного пункту призначення"
#, c-format
msgid "couldn't find remote ref %s"
@@ -18362,11 +19499,11 @@ msgstr "не вдалося знайти віддалене посилання %
#, c-format
msgid "* Ignoring funny ref '%s' locally"
-msgstr "* Ігнорування кумедних рефів '%s' локально"
+msgstr "* Ігнорування кумедних посилань \"%s\" локально"
#, c-format
msgid "Your branch is based on '%s', but the upstream is gone.\n"
-msgstr "Ваша гілка базується на '%s', але першоджерельне сховище зникло.\n"
+msgstr "Ваша гілка базується на \"%s\", але першоджерельне сховище зникло.\n"
msgid " (use \"git branch --unset-upstream\" to fixup)\n"
msgstr ""
@@ -18374,11 +19511,11 @@ msgstr ""
#, c-format
msgid "Your branch is up to date with '%s'.\n"
-msgstr "Ваша гілка не відрізняється від '%s'.\n"
+msgstr "Ваша гілка не відрізняється від \"%s\".\n"
#, c-format
msgid "Your branch and '%s' refer to different commits.\n"
-msgstr "Ваша гілка та гілка '%s' посилаються до різних комітів.\n"
+msgstr "Ваша гілка та гілка \"%s\" посилаються до різних комітів.\n"
#, c-format
msgid " (use \"%s\" for details)\n"
@@ -18387,12 +19524,12 @@ msgstr " (використовуйте \"%s\" для отримання дет
#, c-format
msgid "Your branch is ahead of '%s' by %d commit.\n"
msgid_plural "Your branch is ahead of '%s' by %d commits.\n"
-msgstr[0] "Ваша гілка випереджає '%s' на %d коміт.\n"
-msgstr[1] "Ваша гілка випереджає '%s' на %d коміти.\n"
-msgstr[2] "Ваша гілка випереджає '%s' на %d комітів.\n"
+msgstr[0] "Ваша гілка випереджає \"%s\" на %d коміт.\n"
+msgstr[1] "Ваша гілка випереджає \"%s\" на %d коміти.\n"
+msgstr[2] "Ваша гілка випереджає \"%s\" на %d комітів.\n"
msgid " (use \"git push\" to publish your local commits)\n"
-msgstr " (використовуйте \"git push\" для публікації локальних комітів)\n"
+msgstr " (скористайтесь \"git push\", щоб надіслати локальні коміти)\n"
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
@@ -18420,14 +19557,17 @@ msgstr[0] ""
"Ваша гілка і гілка '%s' розійшлися,\n"
"і мають %d і %d різний коміт відповідно.\n"
msgstr[1] ""
-"Ваша гілка і гілка '%s' розійшлися,\n"
-"і мають %d і %d різних коміта відповідно.\n"
+"Ваша гілка і гілка \"%s\" розійшлися,\n"
+"і мають %d і %d різних коміти відповідно.\n"
msgstr[2] ""
-"Ваша гілка і гілка '%s' розійшлися,\n"
+"Ваша гілка і гілка \"%s\" розійшлися,\n"
"і мають %d і %d різних комітів відповідно.\n"
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (використовуйте \"git pull\", щоб злити віддалену гілку з вашою)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr ""
+" (скористайтесь \"git pull\", якщо ви хочете інтегрувати віддалену гілку зі "
+"своєю)\n"
#, c-format
msgid "cannot parse expected object name '%s'"
@@ -18439,7 +19579,7 @@ msgstr "неможливо вилучити один компонент з url '
#, c-format
msgid "bad replace ref name: %s"
-msgstr "неприпустима назва змінного посилання: %s"
+msgstr "неприпустима назва заміни посилання: %s"
#, c-format
msgid "duplicate replace ref: %s"
@@ -18473,19 +19613,19 @@ msgstr "запис \"%s\" завершився невдало"
#, c-format
msgid "Staged '%s' using previous resolution."
-msgstr "Індексовано \"%s\" з використанням попереднього розвʼязання."
+msgstr "Індексовано \"%s\" з використанням попереднього вирішення."
#, c-format
msgid "Recorded resolution for '%s'."
-msgstr "Записано розвʼязання для \"%s\"."
+msgstr "Записано вирішення для \"%s\"."
#, c-format
msgid "Resolved '%s' using previous resolution."
-msgstr "Розвʼязано \"%s\" з використанням попереднього розвʼязання."
+msgstr "Вирішено \"%s\" з використанням попереднього вирішення."
#, c-format
msgid "cannot unlink stray '%s'"
-msgstr "неможливо відʼєднати блукаючий \"%s\""
+msgstr "неможливо видалити блукаючий \"%s\""
#, c-format
msgid "Recorded preimage for '%s'"
@@ -18505,14 +19645,14 @@ msgstr "Оновлено попереднє зображення для \"%s\""
#, c-format
msgid "Forgot resolution for '%s'\n"
-msgstr "Забуто розвʼязання для \"%s\"\n"
+msgstr "Забуто вирішення для \"%s\"\n"
msgid "unable to open rr-cache directory"
msgstr "неможливо відкрити rr-cache директорію"
msgid "update the index with reused conflict resolution if possible"
msgstr ""
-"оновити індекс з повторним використанням розвʼязання конфліктів, якщо це "
+"оновити індекс з повторним використанням вирішення конфліктів, якщо це "
"можливо"
msgid "could not determine HEAD revision"
@@ -18531,17 +19671,21 @@ msgstr "--exclude-hidden= передано більше одного разу"
#, c-format
msgid "resolve-undo records `%s` which is missing"
-msgstr ""
+msgstr "resolve-undo записує \"%s\", який відсутній"
#, c-format
msgid "could not get commit for ancestry-path argument %s"
-msgstr ""
+msgstr "не вдалося отримати коміт для ancestry-path аргументу %s"
msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<файл пакунка> більше не підтримується"
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "неприпустима опція \"%s\" у режимі --stdin"
+
msgid "your current branch appears to be broken"
-msgstr "ваша поточна гілка виглядає зламаною"
+msgstr "ваша поточна гілка виглядає пошкодженою"
#, c-format
msgid "your current branch '%s' does not have any commits yet"
@@ -18569,7 +19713,7 @@ msgid "need a working directory"
msgstr "потрібна робоча директорія"
msgid "Scalar enlistments require a worktree"
-msgstr ""
+msgstr "Коренева директорія проекту потребує робоче дерево"
#, c-format
msgid "could not configure %s=%s"
@@ -18615,7 +19759,7 @@ msgid "failed to stop the FSMonitor daemon"
msgstr "не вдалося зупинити FSMonitor демон"
msgid "failed to delete enlistment directory"
-msgstr "не вдалося видалити директорію верхнього рівня"
+msgstr "не вдалося видалити кореневу директорію проекту"
msgid "branch to checkout after clone"
msgstr "гілка, на яку перейти після клонування"
@@ -18651,7 +19795,7 @@ msgid "could not configure '%s'"
msgstr "не вдалося налаштувати \"%s\""
msgid "partial clone failed; attempting full clone"
-msgstr "не вдалося зробити частковий клон; спроба зробити повний клон"
+msgstr "не вдалося зробити розріджений клон; спроба зробити повний клон"
msgid "could not configure for full clone"
msgstr "не вдалося налаштувати для повного клона"
@@ -18704,7 +19848,7 @@ msgid "scalar delete <enlistment>"
msgstr "scalar delete <коренева-директорія-проекту>"
msgid "refusing to delete current working directory"
-msgstr "відмова видалення поточної робочої директорії"
+msgstr "відмовлено у видаленні поточної робочої директорії"
msgid "include Git version"
msgstr "включити версію Git"
@@ -18713,7 +19857,7 @@ msgid "include Git's build options"
msgstr "включити опції збірки Git"
msgid "scalar verbose [-v | --verbose] [--build-options]"
-msgstr ""
+msgstr "scalar verbose [-v | --verbose] [--build-options]"
msgid "-C requires a <directory>"
msgstr "-C потребує наявності <директорії>"
@@ -18753,7 +19897,7 @@ msgid "send-pack: unable to fork off fetch subprocess"
msgstr "send-pack: не вдалося розгалужити підпроцес отримання"
msgid "push negotiation failed; proceeding anyway with push"
-msgstr "переговори з надсилання не вдалися; все одно продовжуємо надсилання"
+msgstr "перемовини з надсилання не вдалися; все одно продовжуємо надсилання"
msgid "the receiving end does not support this repository's hash algorithm"
msgstr "отримуюча сторона не підтримує хеш-алгоритм цього сховища"
@@ -18799,7 +19943,7 @@ msgid ""
"after resolving the conflicts, mark the corrected paths\n"
"with 'git add <paths>' or 'git rm <paths>'"
msgstr ""
-"після розвʼязання конфліктів позначте виправлені шляхи\n"
+"після вирішення конфліктів позначте виправлені шляхи\n"
"за допомогою \"git add <шляхи>\" або \"git rm <шляхи>\""
msgid ""
@@ -18810,10 +19954,10 @@ msgid ""
"To abort and get back to the state before \"git cherry-pick\",\n"
"run \"git cherry-pick --abort\"."
msgstr ""
-"Після розвʼязання конфліктів позначте їх за допомогою\n"
+"Після вирішення конфліктів позначте їх за допомогою\n"
"\"git add/rm <визначник шляху>\", а потім виконайте\n"
"\"git cherry-pick --continue\".\n"
-"Замість цього ви можете пропустити цей комміт за допомогою \"git cherry-pick "
+"Замість цього ви можете пропустити цей коміт за допомогою \"git cherry-pick "
"--skip\".\n"
"Щоб перервати процес і повернутися до стану перед \"git cherry-pick\",\n"
"виконайте \"git cherry-pick --abort\"."
@@ -18826,7 +19970,7 @@ msgid ""
"To abort and get back to the state before \"git revert\",\n"
"run \"git revert --abort\"."
msgstr ""
-"Після розвʼязання конфліктів позначте їх за допомогою\n"
+"Після вирішення конфліктів позначте їх за допомогою\n"
"\"git add/rm <визначник шляху>\", а потім виконайте\n"
"\"git revert --continue\".\n"
"Замість цього ви можете пропустити цей коміт за допомогою \"git revert --"
@@ -18975,7 +20119,7 @@ msgstr ""
"правильність.\n"
"Ви можете приховати це повідомлення, вказавши їх явно:\n"
"\n"
-" git config --global user.name \"Ваше імʼя\"\n"
+" git config --global user.name \"Ваше Імʼя\"\n"
" git config --global user.email you@example.com\n"
"\n"
"Після цього ви можете виправити особистість автора, використану для цього "
@@ -18996,7 +20140,7 @@ msgid "detached HEAD"
msgstr "відʼєднаний HEAD"
msgid " (root-commit)"
-msgstr " (кореневий комміт)"
+msgstr " (кореневий коміт)"
msgid "could not parse HEAD"
msgstr "неможливо розібрати HEAD"
@@ -19010,11 +20154,11 @@ msgstr "не вдалося розібрати автора коміту"
#, c-format
msgid "unable to read commit message from '%s'"
-msgstr "не вдалося прочитати допис до коміта від \"%s\""
+msgstr "не вдалося прочитати допис до коміту від \"%s\""
#, c-format
msgid "invalid author identity '%s'"
-msgstr "неприпустима ідентичність автора \"%s\""
+msgstr "неприпустима особистість автора \"%s\""
msgid "corrupt author: missing date information"
msgstr "пошкоджені дані про автора: відсутня інформація про дату"
@@ -19036,18 +20180,18 @@ msgid "unknown command: %d"
msgstr "невідома команда: %d"
msgid "This is the 1st commit message:"
-msgstr "Це перший допис до коміта:"
+msgstr "Це перший допис до коміту:"
#, c-format
msgid "This is the commit message #%d:"
-msgstr "Це допис до коміта #%d:"
+msgstr "Це допис до коміту #%d:"
msgid "The 1st commit message will be skipped:"
-msgstr "Перший допис до коміта буде пропущено:"
+msgstr "Перший допис до коміту буде пропущено:"
#, c-format
msgid "The commit message #%d will be skipped:"
-msgstr "Допис до коміта #%d буде пропущено:"
+msgstr "Допис до коміту #%d буде пропущено:"
#, c-format
msgid "This is a combination of %d commits."
@@ -19064,11 +20208,11 @@ msgid "could not read HEAD"
msgstr "не вдалося прочитати HEAD"
msgid "could not read HEAD's commit message"
-msgstr "не вдалося прочитати допис до коміта HEAD"
+msgstr "не вдалося прочитати допис до коміту HEAD"
#, c-format
msgid "could not read commit message of %s"
-msgstr "не вдалося прочитати допис до коміта %s"
+msgstr "не вдалося прочитати допис до коміту %s"
msgid "your index file is unmerged."
msgstr "ваш індексний файл не злитий."
@@ -19086,7 +20230,7 @@ msgstr "коміт %s не має джерела %d"
#, c-format
msgid "cannot get commit message for %s"
-msgstr "неможливо отримати допис до коміта для %s"
+msgstr "неможливо отримати допис до коміту для %s"
#. TRANSLATORS: The first %s will be a "todo" command like
#. "revert" or "pick", the second %s a SHA1.
@@ -19157,7 +20301,7 @@ msgid "cannot '%s' without a previous commit"
msgstr "неможливо зробити \"%s\" без попереднього коміту"
msgid "cancelling a cherry picking in progress"
-msgstr "скасування поточного висмикування"
+msgstr "наразі йде скасування висмикування"
msgid "cancelling a revert in progress"
msgstr "наразі йде скасування вивертання"
@@ -19189,7 +20333,7 @@ msgid "empty commit set passed"
msgstr "передано порожній набір комітів"
msgid "revert is already in progress"
-msgstr "наразі виконується операція вивертання"
+msgstr "наразі вже триває вивертання"
#, c-format
msgid "try \"git revert (--continue | %s--abort | --quit)\""
@@ -19228,14 +20372,14 @@ msgstr "збережений pre-cherry-pick HEAD файл \"%s\" пошкодж
msgid "You seem to have moved HEAD. Not rewinding, check your HEAD!"
msgstr ""
-"Здається, ви пересунули HEAD. Перемотування не виконується, перевірте свій "
-"HEAD!"
+"Здається, ви перемістили HEAD. Перемотування назад не виконується, перевірте "
+"свій HEAD!"
msgid "no revert in progress"
-msgstr "наразі операція вивертання не виконується"
+msgstr "наразі не виконується вивертання"
msgid "no cherry-pick in progress"
-msgstr "наразі висмикування не виконується"
+msgstr "наразі не виконується висмикування"
msgid "failed to skip the commit"
msgstr "не вдалося пропустити коміт"
@@ -19314,11 +20458,10 @@ msgid ""
"\n"
msgstr ""
"виконання пройшло успішно: %s\n"
-"але залишило зміни в індексі та/або робочому дереві.\n"
+"але залишило зміни в індексі та/або робочому дереві\n"
"Зробіть коміт або додайте зміни до схову, а потім запустіть\n"
"\n"
" git rebase --continue\n"
-"\n"
#, c-format
msgid "illegal label name: '%.*s'"
@@ -19350,7 +20493,7 @@ msgstr "octopus злиття неможливо виконати поверх [n
#, c-format
msgid "could not get commit message of '%s'"
-msgstr "не вдалося отримати допис до коміта \"%s\""
+msgstr "не вдалося отримати допис до коміту \"%s\""
#, c-format
msgid "could not even attempt to merge '%.*s'"
@@ -19699,7 +20842,7 @@ msgid ""
"The owner of files must always have read and write permissions."
msgstr ""
"проблема зі значенням файлового режиму core.sharedRepository (0%.3o).\n"
-"Власник файлів завжди повинен мати права на читання та запис."
+"Власник файлів завжди повинен мати дозвіл на читання та запис."
msgid "fork failed"
msgstr "fork завершився невдало"
@@ -19708,11 +20851,82 @@ msgid "setsid failed"
msgstr "setsid завершився невдало"
#, c-format
+msgid "cannot stat template '%s'"
+msgstr "неможливо виконати stat шаблона \"%s\""
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "неможливо виконати opendir \"%s\""
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "неможливо виконати readlink \"%s\""
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "неможливо виконати symlink \"%s\" \"%s\""
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "неможливо скопіювати \"%s\" до \"%s\""
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "ігнорування шаблону %s"
+
+#, c-format
+msgid "templates not found in %s"
+msgstr "шаблонів не знайдено в %s"
+
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "не копіюються шаблони з \"%s\": %s"
+
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "неприпустиме початкове ім’я гілки: \"%s\""
+
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "не вдалося обробити тип файлу %d"
+
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "не вдалося перемістити %s на %s"
+
+msgid "attempt to reinitialize repository with different hash"
+msgstr "спроба переініціалізувати репозиторій з іншим хеш-алгоритмом"
+
+#, c-format
+msgid "%s already exists"
+msgstr "%s вже існує"
+
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-init: ігноровано --initial-branch=%s"
+
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "Переініціалізовано існуюче спільне Git сховище в %s%s\n"
+
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "Переініціалізовано існуюче Git сховище в %s%s\n"
+
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "Ініціалізовано порожнє спільне Git сховище в %s%s\n"
+
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "Ініціалізовано порожнє Git сховище в %s%s\n"
+
+#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
-msgstr "індексний запис є директорією, але не є частковим (%08x)"
+msgstr "індексний запис є директорією, але не є розрідженим (%08x)"
msgid "cannot use split index with a sparse index"
-msgstr "не можна використовувати розділений індекс з частковим індексом"
+msgstr "не можна використовувати розщеплений індекс з розрідженим індексом"
#, c-format
msgid "%u.%2.2u GiB"
@@ -19771,7 +20985,7 @@ msgstr "Не вдалося оновити запис %s у .gitmodules"
msgid "Cannot change unmerged .gitmodules, resolve merge conflicts first"
msgstr ""
-"Неможливо змінити незлиті .gitmodules, спочатку розвʼяжіть конфлікти злиття"
+"Неможливо змінити не злиті .gitmodules, спочатку розвʼяжіть конфлікти злиття"
#, c-format
msgid "Could not find section in .gitmodules where path=%s"
@@ -19838,11 +21052,11 @@ msgstr "Не вдалося отримати доступ до підмодул
#, c-format
msgid "Could not access submodule '%s' at commit %s\n"
-msgstr "Не вдалося отримати доступ до підмодуля \"%s\" для коміта %s\n"
+msgstr "Не вдалося отримати доступ до підмодуля \"%s\" для коміту %s\n"
#, c-format
msgid "Fetching submodule %s%s at commit %s\n"
-msgstr "Отримання підмодуля %s%s для коміта %s\n"
+msgstr "Отримання підмодуля %s%s для коміту %s\n"
#, c-format
msgid ""
@@ -19909,7 +21123,7 @@ msgstr "не вдалося знайти назву для підмодуля \"
#, c-format
msgid "refusing to move '%s' into an existing git dir"
-msgstr "відмова переміщення \"%s\" до існуючої git директорії"
+msgstr "відмовлено в переміщенні \"%s\" до існуючої git директорії"
#, c-format
msgid ""
@@ -20006,7 +21220,7 @@ msgid "name or pathname of unix domain socket"
msgstr "назва або назва шляху сокета домену unix"
msgid "named-pipe name"
-msgstr ""
+msgstr "назва іменованого канала"
msgid "number of threads in server thread pool"
msgstr "кількість потоків у пулі потоків сервера"
@@ -20131,7 +21345,7 @@ msgstr "\"option\" без відповідної директиви \"ok/error\"
#, c-format
msgid "expected ok/error, helper said '%s'"
-msgstr "очікувалося ok/error, помічник сказав \"%s\""
+msgstr "очікувалось ok/error, помічник сказав \"%s\""
#, c-format
msgid "helper reported unexpected status of %s"
@@ -20188,7 +21402,7 @@ msgstr "непідтримуваний обʼєкт формата \"%s\""
#, c-format
msgid "malformed response in ref list: %s"
-msgstr "неправильно сформована відповідь у списку посилань: %s"
+msgstr "невірно сформована відповідь у списку посилань: %s"
#, c-format
msgid "read(%s) failed"
@@ -20227,7 +21441,7 @@ msgstr "Встановить першоджерельне сховище для
#, c-format
msgid "could not read bundle '%s'"
-msgstr "не вдалося прочитати пакет \"%s\""
+msgstr "не вдалося прочитати пакунок \"%s\""
#, c-format
msgid "transport: invalid depth option '%s'"
@@ -20383,7 +21597,7 @@ msgid ""
"Refusing to remove the current working directory:\n"
"%s"
msgstr ""
-"Відмова видалення поточної робочої директорії:\n"
+"Відмовлено у видаленні поточної робочої директорії:\n"
"%s"
#, c-format
@@ -20512,7 +21726,7 @@ msgid ""
"patterns:\n"
"%s"
msgstr ""
-"Наступні шляхи не є актуальними і були залишені, незважаючи на часткові "
+"Наступні шляхи не є актуальними і були залишені, незважаючи на розріджені "
"шаблони:\n"
"%s"
@@ -20521,7 +21735,7 @@ msgid ""
"The following paths are unmerged and were left despite sparse patterns:\n"
"%s"
msgstr ""
-"Наступні шляхи не злиті і були залишені, незважаючи на часткові шаблони:\n"
+"Наступні шляхи не злиті і були залишені, незважаючи на розріджені шаблони:\n"
"%s"
#, c-format
@@ -20530,8 +21744,8 @@ msgid ""
"patterns:\n"
"%s"
msgstr ""
-"Наступні шляхи вже існували і тому не були оновлені, незважаючи на часткові "
-"шаблони:\n"
+"Наступні шляхи вже існували і тому не були оновлені, незважаючи на "
+"розріджені шаблони:\n"
"%s"
#, c-format
@@ -20616,7 +21830,7 @@ msgstr ""
#, c-format
msgid "'%s' is not a .git file, error code %d"
-msgstr "\"%s\" не є .git-файлом, код помилки %d"
+msgstr "\"%s\" не є .git файлом, код помилки %d"
#, c-format
msgid "'%s' does not point back to '%s'"
@@ -20632,7 +21846,7 @@ msgid ".git file broken"
msgstr ".git файл пошкоджено"
msgid ".git file incorrect"
-msgstr "Неправильний файл .git"
+msgstr ".git файл не є коректним"
msgid "not a valid path"
msgstr "неприпустимий шлях"
@@ -20647,10 +21861,10 @@ msgid "unable to locate repository; .git file broken"
msgstr "не вдалося знайти сховище; файл .git пошкоджено"
msgid "gitdir unreadable"
-msgstr "git-директорія нечитабельна"
+msgstr "нечитабельна git директорія"
msgid "gitdir incorrect"
-msgstr "git-директорія неправильна"
+msgstr "невірна git директорія"
msgid "not a valid directory"
msgstr "неприпустима директорія"
@@ -20668,14 +21882,14 @@ msgstr ""
"помилка при зчитуванні (очікувалось %<PRIuMAX> байтів, прочитано %<PRIuMAX>)"
msgid "invalid gitdir file"
-msgstr "неприпустимий файл git-директорії"
+msgstr "неприпустимий файл git директорії"
msgid "gitdir file points to non-existent location"
-msgstr "файл git-директорії вказує на неіснуюче розташування"
+msgstr "файл git директорії вказує на неіснуюче розташування"
#, c-format
msgid "unable to set %s in '%s'"
-msgstr "не вдалося задати %s в \"%s\""
+msgstr "не вдалося встановити %s в \"%s\""
#, c-format
msgid "unable to unset %s in '%s'"
@@ -20686,7 +21900,7 @@ msgstr "не вдалося встановити extensions.worktreeConfig па
#, c-format
msgid "could not setenv '%s'"
-msgstr "не вдалося встановити оточення \"%s\""
+msgstr "не вдалося встановити змінну оточення \"%s\""
#, c-format
msgid "unable to create '%s'"
@@ -20704,65 +21918,61 @@ msgid "unable to get current working directory"
msgstr "не вдалося завантажити поточну робочу директорію"
msgid "Unmerged paths:"
-msgstr "Не злиті шляхи:"
+msgstr "не злиті шляхи:"
msgid " (use \"git restore --staged <file>...\" to unstage)"
msgstr ""
-" (використовуйте \"git restore --staged <файл>...\", щоб вилучити з індексу)"
+" (використовуйте \"git restore --staged <файл>...\", щоб видалити з індексу)"
#, c-format
msgid " (use \"git restore --source=%s --staged <file>...\" to unstage)"
msgstr ""
" (використовуйте \"git restore --source=%s --staged <file>...\", щоб "
-"видалити з індексу)"
+"прибрати з індексу)"
msgid " (use \"git rm --cached <file>...\" to unstage)"
msgstr ""
-" (використовуйте \"git rm --cached <file>...\", щоб вилучити з індексу)"
+" (використовуйте \"git rm --cached <file>...\", щоб видалити з індексу)"
msgid " (use \"git add <file>...\" to mark resolution)"
-msgstr " (використовуйте \"git add <файл>...\", щоб позначити як вирішене)"
+msgstr " (використовуйте \"git add <файл>...\", щоб позначити як розвʼязане)"
msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)"
msgstr ""
-" (використовуйте \"git add/rm <файл>...\" за потребою, щоб позначити як "
-"вирішене)"
+" (використовуйте \"git add/rm <файл>...\" за потребою, щоб позначити "
+"вирішення)"
msgid " (use \"git rm <file>...\" to mark resolution)"
-msgstr " (використовуйте \"git rm <файл>...\", щоб позначити як вирішене)"
+msgstr " (використовуйте \"git rm <файл>...\", щоб позначити вирішення)"
msgid "Changes to be committed:"
-msgstr "Зміни, що будуть додані до коміту:"
+msgstr "Зміни, додані до майбутнього коміту:"
msgid "Changes not staged for commit:"
-msgstr "Зміни, що не будуть додані до коміту:"
+msgstr "Зміни, не додані до майбутнього коміту:"
msgid " (use \"git add <file>...\" to update what will be committed)"
-msgstr ""
-" (використовуйте \"git add <файл>...\", для оновлення того, що буде "
-"закомічено)"
+msgstr " (скористайтесь \"git add <файл>...\", щоб оновити майбутній коміт)"
msgid " (use \"git add/rm <file>...\" to update what will be committed)"
msgstr ""
-" (використовуйте \"git add/rm <файл>...\" для оновлення того, що буде "
-"закомічено)"
+" (скористайтесь \"git add/rm <файл>...\", щоб оновити майбутній коміт)"
msgid ""
" (use \"git restore <file>...\" to discard changes in working directory)"
msgstr ""
-" (використовуйте \"git restore <файл>...\", щоб скасувати зміни в робочій "
+" (скористайтесь \"git restore <файл>...\", щоб скасувати зміни в робочій "
"директорії)"
msgid " (commit or discard the untracked or modified content in submodules)"
msgstr ""
-" (зробіть коміт або скасуйте невідстежуваний або змінений контент у "
+" (зробіть коміт або відкиньте невідстежуваний або змінений вміст у "
"підмодулях)"
#, c-format
msgid " (use \"git %s <file>...\" to include in what will be committed)"
msgstr ""
-" (використовуйте \"git %s <файл>...\" для включення до того, що буде "
-"закомічено)"
+" (скористайтесь \"git %s <файл>...\", щоб додати до майбутнього коміту)"
msgid "both deleted:"
msgstr "видалено обома:"
@@ -20856,13 +22066,13 @@ msgstr " (виправте конфлікти та виконайте \"git com
msgid " (use \"git merge --abort\" to abort the merge)"
msgstr ""
-" (використовуйте команду \"git merge --abort\", щоб перервати злиття)."
+" (скористайтесь командою \"git merge --abort\", щоб перервати злиття)."
msgid "All conflicts fixed but you are still merging."
msgstr "Усі конфлікти виправлено, але ви все ще продовжуєте злиття."
msgid " (use \"git commit\" to conclude merge)"
-msgstr " (використовуйте \"git commit\" для завершення злиття)"
+msgstr " (скористайтесь \"git commit\", щоб завершити злиття)"
msgid "You are in the middle of an am session."
msgstr "Ви всередині am сеансу."
@@ -20874,16 +22084,16 @@ msgid " (fix conflicts and then run \"git am --continue\")"
msgstr " (виправте конфлікти, а потім виконайте \"git am --continue\")"
msgid " (use \"git am --skip\" to skip this patch)"
-msgstr " (використовуйте команду \"git am --skip\", щоб пропустити цю латку)"
+msgstr " (скористайтесь командою \"git am --skip\", щоб пропустити цю латку)"
msgid ""
" (use \"git am --allow-empty\" to record this patch as an empty commit)"
msgstr ""
-" (використовуйте \"git am --allow-empty\", щоб записати цю латку як "
-"порожній коміт)"
+" (скористайтесь \"git am --allow-empty\", щоб записати цю латку як порожній "
+"коміт)"
msgid " (use \"git am --abort\" to restore the original branch)"
-msgstr " (використовуйте \"git am --abort\", щоб відновити початкову гілку)"
+msgstr " (скористайтесь \"git am --abort\", щоб відновити початкову гілку)"
msgid "git-rebase-todo is missing."
msgstr "git-rebase-todo відсутній."
@@ -20914,11 +22124,12 @@ msgstr[2] "Наступні команди для виконання (залиш
msgid " (use \"git rebase --edit-todo\" to view and edit)"
msgstr ""
-" (використовуйте \"git rebase --edit-todo\" для перегляду та редагування)"
+" (скористайтесь \"git rebase --edit-todo\", щоб переглянути та "
+"відредагувати)"
#, c-format
msgid "You are currently rebasing branch '%s' on '%s'."
-msgstr "Наразі ви перебазовуєте гілку '%s' на '%s'."
+msgstr "Наразі ви перебазовуєте гілку \"%s\" на \"%s\"."
msgid "You are currently rebasing."
msgstr "Наразі йде перебазування."
@@ -20927,11 +22138,11 @@ msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr " (виправте конфлікти, а потім виконайте \"git rebase --continue\")"
msgid " (use \"git rebase --skip\" to skip this patch)"
-msgstr " (використовуйте \"git rebase --skip\", щоб пропустити цю латку)"
+msgstr " (скористайтесь \"git rebase --skip\", щоб пропустити цю латку)"
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr ""
-" (використовуйте \"git rebase --abort\", щоб перейти до початкової гілки)"
+" (скористайтесь \"git rebase --abort\", щоб перейти до початкової гілки)"
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr " (усі конфлікти виправлено: виконайте \"git rebase --continue\")"
@@ -20940,11 +22151,11 @@ msgstr " (усі конфлікти виправлено: виконайте \"
msgid ""
"You are currently splitting a commit while rebasing branch '%s' on '%s'."
msgstr ""
-"Наразі виконується розділення коміту під час перебазування гілки \"%s\" на "
+"Наразі виконується розщеплення коміту під час перебазування гілки \"%s\" на "
"\"%s\"."
msgid "You are currently splitting a commit during a rebase."
-msgstr "Ви розбиваєте коміт під час перебазування."
+msgstr "Ви розщеплюєте коміт під час перебазування."
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr ""
@@ -20952,14 +22163,14 @@ msgstr ""
#, c-format
msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
-msgstr "Ви редагуєте комміт під час перебазування гілки '%s' на '%s'."
+msgstr "Наразі ви редагуєте коміт при перебазуванні гілки \"%s\" на \"%s\"."
msgid "You are currently editing a commit during a rebase."
-msgstr "Ви редагуєте коміт під час перебазування."
+msgstr "Наразі ви редагуєте коміт при перебазуванні."
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
-" (використовуйте \"git commit --amend\" для внесення змін до поточного "
+" (скористайтесь \"git commit --amend\", щоб внести зміни до поточного "
"коміту)"
msgid ""
@@ -20995,7 +22206,7 @@ msgstr ""
"висмикування)"
msgid "Revert currently in progress."
-msgstr "Наразі виконується операція вивертання."
+msgstr "Наразі триває вивертання."
#, c-format
msgid "You are currently reverting commit %s."
@@ -21011,11 +22222,11 @@ msgid " (all conflicts fixed: run \"git revert --continue\")"
msgstr " (усі конфлікти виправлено: виконайте \"git revert --continue\")"
msgid " (use \"git revert --skip\" to skip this patch)"
-msgstr " (використовуйте \"git revert --skip\", щоб пропустити цю латку)"
+msgstr " (скористайтесь \"git revert --skip\", щоб пропустити цю латку)"
msgid " (use \"git revert --abort\" to cancel the revert operation)"
msgstr ""
-" (використовуйте \"git revert --abort\", щоб скасувати операцію повернення)"
+" (скористайтесь \"git revert --abort\", щоб скасувати операцію повернення)"
#, c-format
msgid "You are currently bisecting, started from branch '%s'."
@@ -21026,24 +22237,25 @@ msgstr "Наразі ви робите бісекцію."
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr ""
-" (використовуйте \"git bisect reset\", щоб повернутись до початкової гілки)"
+" (скористайтесь \"git bisect reset\", щоб повернутись на початкову гілку)"
msgid "You are in a sparse checkout."
-msgstr "Ви перебуваєте в частковому переході до гілки."
+msgstr "Ви перебуваєте в розрідженому переході на гілку."
#, c-format
msgid "You are in a sparse checkout with %d%% of tracked files present."
msgstr ""
-"Ви перебуваєте в частковому переході до гілки з %d%% відстежуваних файлів."
+"Ви перебуваєте в розрідженому переході на гілку з %d%% наявних відстежуваних "
+"файлів."
msgid "On branch "
msgstr "На гілці "
msgid "interactive rebase in progress; onto "
-msgstr "інтерактивне перебазовування в процесі; на "
+msgstr "триває інтерактивне перебазування на "
msgid "rebase in progress; onto "
-msgstr "перебазовування в процесі; на "
+msgstr "триває перебазування на "
msgid "HEAD detached at "
msgstr "HEAD відʼєднано на "
@@ -21052,7 +22264,7 @@ msgid "HEAD detached from "
msgstr "HEAD відʼєднано від "
msgid "Not currently on any branch."
-msgstr "Наразі не знаходитесь в жодній гілці."
+msgstr "Не на гілці."
msgid "Initial commit"
msgstr "Початковий коміт"
@@ -21079,14 +22291,14 @@ 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' для інформаціі з того, як це покращити."
+msgstr "Дивіться \"git help status\" для інформації про те, як це покращити."
#, c-format
msgid "Untracked files not listed%s"
-msgstr "Невідстежувані файли не вказано%s"
+msgstr "Невідстежувані файли не показані%s"
msgid " (use -u option to show untracked files)"
-msgstr " (використовуйте опцію -u для відображення невідстежуваних файлів)"
+msgstr " (використовуйте опцію -u, щоб показати невідстежувані файли)"
msgid "No changes"
msgstr "Немає змін"
@@ -21094,7 +22306,7 @@ msgstr "Немає змін"
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
-"не додано жодних змін до коміту (використовуйте \"git add\" та/або \"git "
+"не додано жодних змін до коміту (скористайтесь \"git add\" та/або \"git "
"commit -a\")\n"
#, c-format
@@ -21106,8 +22318,8 @@ msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
"track)\n"
msgstr ""
-"нічого не додано до коміту, але присутні невідстежувані файли (скористайтесь "
-"\"git add\" щоб почати відстежувати)\n"
+"нічого не додано до коміту, але є невідстежувані файли (скористайтесь \"git "
+"add\" для відстежування)\n"
#, c-format
msgid "nothing added to commit but untracked files present\n"
@@ -21125,21 +22337,20 @@ msgstr "нічого комітити\n"
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
-msgstr ""
-"нічого комітити (скористайтесь -u щоб подивитись невідстежувані файли)\n"
+msgstr "нічого комітити (скористайтесь -u щоб показати невідстежувані файли)\n"
#, c-format
msgid "nothing to commit, working tree clean\n"
msgstr "нічого комітити, робоче дерево чисте\n"
msgid "No commits yet on "
-msgstr "Наразі немає комітів на "
+msgstr "Поки що немає комітів у "
msgid "HEAD (no branch)"
msgstr "HEAD (немає гілки)"
msgid "different"
-msgstr "різниться"
+msgstr "відрізняється"
msgid "behind "
msgstr "позаду "
@@ -21151,27 +22362,27 @@ msgstr "попереду "
#, c-format
msgid "cannot %s: You have unstaged changes."
-msgstr "не можливо %s: У вас є не індексовані зміни."
+msgstr "неможливо %s: У вас є неіндексовані зміни."
msgid "additionally, your index contains uncommitted changes."
-msgstr "крім того, ваш індекс містить не закомічені зміни."
+msgstr "крім того, ваш індекс містить незакомічені зміни."
#, c-format
msgid "cannot %s: Your index contains uncommitted changes."
-msgstr "не можливо %s: Ваш індекс містить не закомічені зміни."
+msgstr "неможливо виконати %s: Ваш індекс містить незакомічені зміни."
msgid ""
"Error: Your local changes to the following files would be overwritten by "
"merge"
msgstr ""
-"Помилка: Ваші локальні зміни в наступних файлах буде перезаписано під час "
+"Помилка: Ваші локальні зміни в наступних файлах були б перезаписані під час "
"злиття"
msgid "Automated merge did not work."
msgstr "Автоматичне злиття не спрацювало."
msgid "Should not be doing an octopus."
-msgstr "Не варто робити octopus злиття."
+msgstr "Не слід робити octopus злиття."
#, sh-format
msgid "Unable to find common commit with $pretty_name"
@@ -21198,7 +22409,7 @@ msgstr "використання: $dashless $USAGE"
#, sh-format
msgid "Cannot chdir to $cdup, the toplevel of the working tree"
-msgstr "Неможливо chdir до $cdup, верхнього рівня робочого дерева"
+msgstr "Неможливо виконати chdir до $cdup, верхнього рівня робочого дерева"
#, sh-format
msgid "fatal: $program_name cannot be used without a working tree."
@@ -21261,7 +22472,7 @@ msgstr ""
"перевірку.\n"
msgid "Cannot run git format-patch from outside a repository\n"
-msgstr "Неможливо запустити git format-patch за межами сховища\n"
+msgstr "Неможливо запустити git format-patch поза сховищем\n"
msgid ""
"`batch-size` and `relogin` must be specified together (via command-line or "
@@ -21280,7 +22491,7 @@ msgstr "Невідомий --confirm параметр: \"%s\"\n"
#, perl-format
msgid "warning: sendmail alias with quotes is not supported: %s\n"
-msgstr "попередження: sendmail аліас у лапках не підтримується: %s\n"
+msgstr "попередження: sendmail псевдонім у лапках не підтримується: %s\n"
#, perl-format
msgid "warning: `:include:` not supported: %s\n"
@@ -21304,14 +22515,14 @@ msgid ""
" * Giving --format-patch option if you mean a range.\n"
msgstr ""
"Файл \"%s\" існує, але це також може бути діапазон комітів\n"
-"для яких випускаються латки. Будь ласка, розтлумачте...\n"
+"для яких створюються латки. Будь ласка, розтлумачте...\n"
"\n"
-" * Вказавши \"./%s\", якщо на увазі мається файл або\n"
+" * Вказавши \"./%s\", якщо на увазі мається файл\n"
" * Додавши --format-patch, якщо на увазі мається діапазон.\n"
#, perl-format
msgid "Failed to opendir %s: %s"
-msgstr "Не вдалося відкрити директорію %s: %s"
+msgstr "Не вдалося виконати opendir %s: %s"
msgid ""
"\n"
@@ -21338,7 +22549,7 @@ msgid ""
"Clear the body content if you don't wish to send a summary.\n"
msgstr ""
"Рядки, що починаються з \"GIT:\", будуть вилучені.\n"
-"Подумайте про те, щоб додати загальний diffstat або зміст\n"
+"Розгляньте можливість включення загального diffstat або змісту\n"
"для латки, яку ви пишете.\n"
"\n"
"Очистіть вміст тіла, якщо ви не бажаєте надсилати підсумок.\n"
@@ -21352,7 +22563,7 @@ msgid "Failed to open %s.final: %s"
msgstr "Не вдалося відкрити %s.final: %s"
msgid "Summary email is empty, skipping it\n"
-msgstr "Підсумковий лист порожній, перескочено\n"
+msgstr "Підсумковий лист порожній, пропущено\n"
#. TRANSLATORS: please keep [y/N] as is.
@@ -21364,6 +22575,7 @@ msgid ""
"The following files are 8bit, but do not declare a Content-Transfer-"
"Encoding.\n"
msgstr ""
+"Наступні файли є 8-бітними, але не містять Content-Transfer-Encoding.\n"
msgid "Which 8bit encoding should I declare [UTF-8]? "
msgstr "Яке 8-бітне кодування слід оголосити [UTF-8]? "
@@ -21375,7 +22587,7 @@ msgid ""
"has the template subject '*** SUBJECT HERE ***'. Pass --force if you really "
"want to send.\n"
msgstr ""
-"Відмова у надсиланні, тому що латка\n"
+"Відмовлено в надсиланні, тому що латка\n"
"\t%s\n"
"має шаблонну тему \"*** SUBJECT HERE ***\". Додайте --force, якщо ви дійсно "
"хочете відправити.\n"
@@ -21385,10 +22597,12 @@ msgstr "Кому слід надсилати електронні листи (я
#, perl-format
msgid "fatal: alias '%s' expands to itself\n"
-msgstr "збій: аліас \"%s\" розгортається на самого себе\n"
+msgstr "збій: псевдонім \"%s\" розгортається на самого себе\n"
msgid "Message-ID to be used as In-Reply-To for the first email (if any)? "
msgstr ""
+"Message-ID, який буде використовуватися як In-Reply-To для першого листа "
+"(якщо такий є)? "
#, perl-format
msgid "error: unable to extract a valid address from: %s\n"
@@ -21418,7 +22632,7 @@ msgid ""
"\n"
msgstr ""
" Наведений вище список копій було розширено додатковими\n"
-" адресами, знайденими у повідомленні коміта латки. Зазвичай\n"
+" адресами, знайденими у дописі до коміту латки. Зазвичай\n"
" send-email запитує перед надсиланням, коли це трапляється.\n"
" Цю поведінку можна контролювати за допомогою параметра sendemail."
"confirm\n"
@@ -21437,7 +22651,7 @@ msgid "Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): "
msgstr "Надіслати цей лист? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): "
msgid "Send this email reply required"
-msgstr ""
+msgstr "Відповідь на запитання \"Надіслати цей лист?\" є обовʼязковою"
msgid "The required SMTP server is not properly defined."
msgstr "Потрібний SMTP-сервер не визначено належним чином."
@@ -21448,12 +22662,12 @@ msgstr "Сервер не підтримує STARTTLS! %s"
#, perl-format
msgid "STARTTLS failed! %s"
-msgstr ""
+msgstr "STARTTLS завершився невдало! %s"
msgid "Unable to initialize SMTP properly. Check config and use --smtp-debug."
msgstr ""
"Не вдалося правильно ініціалізувати SMTP. Перевірте конфігурацію і "
-"скористайтеся --smtp-debug."
+"скористайтесь --smtp-debug."
#, perl-format
msgid "Failed to send %s\n"
@@ -21468,10 +22682,10 @@ msgid "Sent %s\n"
msgstr "Відправлено %s\n"
msgid "Dry-OK. Log says:\n"
-msgstr ""
+msgstr "Пробно OK. Журнал каже:\n"
msgid "OK. Log says:\n"
-msgstr "ОК. Лог каже:\n"
+msgstr "ОК. Журнал каже:\n"
msgid "Result: "
msgstr "Результат: "
@@ -21505,7 +22719,7 @@ msgstr "(%s) Не вдалося виконати \"%s\""
#, perl-format
msgid "(%s) Malformed output from '%s'"
-msgstr "(%s) Невірно сформований рядок виводу з \"%s\"."
+msgstr "(%s) Невірно сформований вивід з \"%s\""
#, perl-format
msgid "(%s) failed to close pipe to '%s'"
@@ -21545,7 +22759,7 @@ msgstr ""
#, perl-format
msgid "Skipping %s with backup suffix '%s'.\n"
-msgstr "Пропуск %s з резервним суфіксом \"%s\".\n"
+msgstr "Пропуск %s з суфіксом резервної копії \"%s\".\n"
#. TRANSLATORS: please keep "[y|N]" as is.
diff --git a/po/zh_CN.po b/po/zh_CN.po
index aa25e9a159..b70ae3866b 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -14,6 +14,7 @@
# - 依云 <lilydjwg AT gmail.com>
# - Yichao Yu <yyc1992 AT gmail.com>
# - Zhuang Ya <zhuangya AT me.com>
+# - Teng Long <dyroneteng AT gmail.com>
#
# Git glossary for Chinese translators
#
@@ -76,6 +77,7 @@
# index entry | 索引条目
# loose object | 松散对象
# loose refs | 松散引用
+# magic | 神奇前缀(路径规格支持的一种前缀表达式)
# master | master(默认分支名)
# merge | 合并
# object | 对象
@@ -85,6 +87,7 @@
# object type | 对象类型
# octopus | 章鱼式合并(两分支以上的合并)
# origin | origin(默认的远程名称)
+# orphan | 孤立(一般指孤立分支,即没有任何提交的分支)
# pack | 包
# pack index | 包索引
# packfile | 包文件
@@ -148,8 +151,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2023-05-20 12:27+0800\n"
-"PO-Revision-Date: 2023-05-20 12:38+0800\n"
+"POT-Creation-Date: 2023-08-18 10:21+0800\n"
+"PO-Revision-Date: 2023-08-18 19:29+0800\n"
"Last-Translator: Teng Long <dyroneteng@gmail.com>\n"
"Language-Team: GitHub <https://github.com/dyrone/git/>\n"
"Language: zh_CN\n"
@@ -891,9 +894,8 @@ msgid "Reverting is not possible because you have unmerged files."
msgstr "无法回退,因为您有未合并的文件。"
#: advice.c
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "无法 %s,因为您有未合并的文件。"
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr "无法变基,因为您有未合并的文件。"
#: advice.c
msgid ""
@@ -1061,6 +1063,14 @@ msgid "'%s' outside a repository"
msgstr "'%s' 在仓库之外"
#: apply.c
+msgid "failed to read patch"
+msgstr "无法读取补丁"
+
+#: apply.c
+msgid "patch too large"
+msgstr "补丁过大"
+
+#: apply.c
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "无法准备时间戳正则表达式 %s"
@@ -2157,8 +2167,8 @@ msgstr "一个名为 '%s' 的分支已经存在"
#: branch.c
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
-msgstr "无法强制更新检出于 '%2$s' 的分支 '%1$s'"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr "无法强制更新被工作区 '%2$s' 所使用的分支 '%1$s'"
#: branch.c
#, c-format
@@ -2237,20 +2247,6 @@ msgid "cannot chmod %cx '%s'"
msgstr "不能 chmod %cx '%s'"
#: builtin/add.c
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "意外的差异状态 %c"
-
-#: builtin/add.c builtin/commit.c
-msgid "updating files failed"
-msgstr "更新文件失败"
-
-#: builtin/add.c
-#, c-format
-msgid "remove '%s'\n"
-msgstr "删除 '%s'\n"
-
-#: builtin/add.c
msgid "Unstaged changes after refreshing the index:"
msgstr "刷新索引之后尚未被暂存的变更:"
@@ -2777,10 +2773,6 @@ msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "针对 mbox 格式,向 git-mailsplit 传递 --keep-cr 参数"
#: builtin/am.c
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr "不向 git-mailsplit 传递 --keep-cr 参数,覆盖 am.keepcr 的设置"
-
-#: builtin/am.c
msgid "strip everything before a scissors line"
msgstr "丢弃裁切线前的所有内容"
@@ -4080,12 +4072,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
#: builtin/cat-file.c
msgid ""
@@ -4144,6 +4136,10 @@ msgid "stdin is NUL-terminated"
msgstr "标准输入以 NUL 字符分隔"
#: builtin/cat-file.c
+msgid "stdin and stdout is NUL-terminated"
+msgstr "标准输入和标准输出以 NUL 字符分隔"
+
+#: builtin/cat-file.c
msgid "read commands from stdin"
msgstr "从标准输入读取命令"
@@ -5039,7 +5035,8 @@ msgid "remove whole directories"
msgstr "删除整个目录"
#: builtin/clean.c builtin/describe.c builtin/grep.c builtin/log.c
-#: builtin/ls-files.c builtin/name-rev.c builtin/show-ref.c
+#: builtin/ls-files.c builtin/name-rev.c builtin/pack-refs.c builtin/show-ref.c
+#: ref-filter.h
msgid "pattern"
msgstr "模式"
@@ -5209,14 +5206,6 @@ msgstr "server-specific"
msgid "option to transmit"
msgstr "传输选项"
-#: builtin/clone.c builtin/fetch.c builtin/pull.c builtin/push.c
-msgid "use IPv4 addresses only"
-msgstr "只使用 IPv4 地址"
-
-#: builtin/clone.c builtin/fetch.c builtin/pull.c builtin/push.c
-msgid "use IPv6 addresses only"
-msgstr "只使用 IPv6 地址"
-
#: builtin/clone.c
msgid "apply partial clone filters to submodules"
msgstr "对子模组使用部分克隆过滤器"
@@ -5751,6 +5740,10 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+#: builtin/commit.c read-cache.c
+msgid "updating files failed"
+msgstr "更新文件失败"
+
#: builtin/commit.c
msgid "failed to unpack HEAD tree object"
msgstr "无法解包 HEAD 树对象"
@@ -5826,8 +5819,8 @@ msgstr "无法选择一个未被当前提交说明使用的注释字符"
#: builtin/commit.c builtin/merge-tree.c
#, c-format
-msgid "could not lookup commit %s"
-msgstr "不能查询提交 %s"
+msgid "could not lookup commit '%s'"
+msgstr "不能查询提交 '%s'"
#: builtin/commit.c builtin/shortlog.c
#, c-format
@@ -8050,7 +8043,7 @@ msgstr "对 %s 调用 fstat 失败:%s"
msgid "failed to parse '%s' value '%s'"
msgstr "无法解析 '%s' 值 '%s'"
-#: builtin/gc.c builtin/init-db.c
+#: builtin/gc.c setup.c
#, c-format
msgid "cannot stat '%s'"
msgstr "不能对 '%s' 调用 stat"
@@ -9061,7 +9054,7 @@ msgstr "无法返回当前工作目录"
msgid "bad %s"
msgstr "错误选项 %s"
-#: builtin/index-pack.c builtin/init-db.c
+#: builtin/index-pack.c builtin/init-db.c setup.c
#, c-format
msgid "unknown hash algorithm '%s'"
msgstr "未知的哈希算法 '%s'"
@@ -9079,95 +9072,6 @@ msgid "fsck error in pack objects"
msgstr "在打包对象中 fsck 检查出错"
#: builtin/init-db.c
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "不能对模版 '%s' 调用 stat"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "不能打开目录 '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "不能读取链接 '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "不能自 '%s' 到 '%s' 创建符号链接"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "不能拷贝 '%s' 至 '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "ignoring template %s"
-msgstr "忽略模版 %s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "templates not found in %s"
-msgstr "没有在 %s 中找到模版"
-
-#: builtin/init-db.c
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "没有从 '%s' 复制模版:%s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "无效的初始分支名:'%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "不能处理 %d 类型的文件"
-
-#: builtin/init-db.c
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "不能移动 %s 至 %s"
-
-#: builtin/init-db.c
-msgid "attempt to reinitialize repository with different hash"
-msgstr "尝试用不同的哈希算法重新初始化仓库"
-
-#: builtin/init-db.c
-#, c-format
-msgid "%s already exists"
-msgstr "%s 已经存在"
-
-#: builtin/init-db.c
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "re-init:已忽略 --initial-branch=%s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "重新初始化已存在的共享 Git 仓库于 %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "已重新初始化已存在的 Git 仓库于 %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "已初始化空的共享 Git 仓库于 %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "已初始化空的 Git 仓库于 %s%s\n"
-
-#: builtin/init-db.c
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -9714,6 +9618,11 @@ msgid ""
"Could not find a tracked remote branch, please specify <upstream> manually.\n"
msgstr "不能找到跟踪的远程分支,请手工指定 <上游>。\n"
+#: builtin/ls-files.c builtin/ls-tree.c
+#, c-format
+msgid "could not get object info about '%s'"
+msgstr "无法获得关于 '%s' 的对象信息"
+
#: builtin/ls-files.c
#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
@@ -9901,11 +9810,6 @@ msgstr "git ls-tree [<选项>] <树对象> [<路径>...]"
#: builtin/ls-tree.c
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "无法获得关于 '%s' 的对象信息"
-
-#: builtin/ls-tree.c
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "坏的 ls-tree 格式:元素 '%s' 没有以 '(' 开头"
@@ -10829,11 +10733,13 @@ msgstr "git notes [--ref <注解引用>] [list [<对象>]]"
#: builtin/notes.c
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <注解引用>] add [-f] [--allow-empty] [-m <说明> | -F <文件> "
-"| (-c | -C) <对象>] [<对象>]"
+"git notes [--ref <注解引用>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<分段符>] [--[no-]stripspace] [-m <说明> | -F <文件> | (-c | -C) <"
+"对象>] [<对象>]"
#: builtin/notes.c
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
@@ -10841,11 +10747,13 @@ msgstr "git notes [--ref <注解引用>] copy [-f] <源对象> <目标对象>"
#: builtin/notes.c
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <注解引用>] append [--allow-empty] [-m <说明> | -F <文件> | "
-"(-c | -C) <对象>] [<对象>]"
+"git notes [--ref <注解引用>] append [--allow-empty] [--[no-]separator|--"
+"separator=<分段符>] [--[no-]stripspace] [-m <说明> | -F <文件> | (-c | -C) <"
+"对象>] [<对象>]"
#: builtin/notes.c
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
@@ -11014,6 +10922,18 @@ msgid "replace existing notes"
msgstr "替换已存在的注解"
#: builtin/notes.c
+msgid "<paragraph-break>"
+msgstr "<分段符>"
+
+#: builtin/notes.c
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "在段落之间插入<分段符>"
+
+#: builtin/notes.c
+msgid "remove unnecessary whitespace"
+msgstr "删除不必要的空白字符"
+
+#: builtin/notes.c
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -11691,8 +11611,11 @@ msgid "refusing to run without --i-still-use-this"
msgstr "拒绝在未指定 --i-still-use-this 选项时运行"
#: builtin/pack-refs.c
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <模式>] [--exclude <模式>]"
#: builtin/pack-refs.c
msgid "pack everything"
@@ -11702,6 +11625,14 @@ msgstr "打包一切"
msgid "prune loose refs (default)"
msgstr "清除松散的引用(默认)"
+#: builtin/pack-refs.c
+msgid "references to include"
+msgstr "需包含的引用"
+
+#: builtin/pack-refs.c
+msgid "references to exclude"
+msgstr "需排除的引用"
+
#: builtin/patch-id.c
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -11778,6 +11709,14 @@ msgstr "强制覆盖本地分支"
msgid "number of submodules pulled in parallel"
msgstr "并发拉取的子模组的数量"
+#: builtin/pull.c parse-options.h
+msgid "use IPv4 addresses only"
+msgstr "只使用 IPv4 地址"
+
+#: builtin/pull.c parse-options.h
+msgid "use IPv6 addresses only"
+msgstr "只使用 IPv6 地址"
+
#: builtin/pull.c
msgid ""
"There is no candidate for rebasing against among the refs that you just "
@@ -12059,36 +11998,36 @@ msgstr ""
#: builtin/push.c
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"更新被拒绝,因为您当前分支的最新提交落后于其对应的远程分支。\n"
-"再次推送前,先与远程变更合并(如 'git pull ...')。详见\n"
-"'git push --help' 中的 'Note about fast-forwards' 小节。"
+"如果您希望先与远程变更合并,请在推送前执行 'git pull'。\n"
+"详见 'git push --help' 中的 'Note about fast-forwards' 小节。"
#: builtin/push.c
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"更新被拒绝,因为推送的一个分支的最新提交落后于其对应的远程分支。\n"
-"检出该分支并整合远程变更(如 'git pull ...'),然后再推送。详见\n"
-"'git push --help' 中的 'Note about fast-forwards' 小节。"
+"如果您希望先与远程变更合并,请在推送前执行 'git pull'。\n"
+"详见 'git push --help' 中的 'Note about fast-forwards' 小节。"
#: builtin/push.c
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"更新被拒绝,因为远程仓库包含您本地尚不存在的提交。这通常是因为另外\n"
-"一个仓库已向该引用进行了推送。再次推送前,您可能需要先整合远程变更\n"
-"(如 'git pull ...')。\n"
+"一个仓库已向该引用进行了推送。如果您希望先与远程变更合并,请在推送\n"
+"前执行 'git pull'。\n"
"详见 'git push --help' 中的 'Note about fast-forwards' 小节。"
#: builtin/push.c
@@ -12106,13 +12045,14 @@ msgstr ""
#: builtin/push.c
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"更新被拒绝,因为远程跟踪分支的最新提交自从上次检出之后已被更新。\n"
-"在强制更新前,您可能想将这些变更整合到本地(如 'git pull ...')。\n"
+"如果您希望先与远程变更合并,请在推送前执行 'git pull'。\n"
+"详见 'git push --help' 中的 'Note about fast-forwards' 小节。"
#: builtin/push.c
#, c-format
@@ -13141,12 +13081,10 @@ msgid "fetch the remote branches"
msgstr "抓取远程的分支"
#: builtin/remote.c
-msgid "import all tags and associated objects when fetching"
-msgstr "抓取时导入所有的标签和关联对象"
-
-#: builtin/remote.c
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "或不抓取任何标签(--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr "抓取时导入所有的标签和关联对象,或不抓取任何标签(--no-tags)"
#: builtin/remote.c
msgid "branch(es) to track"
@@ -15532,6 +15470,11 @@ msgstr "略过子模组 '%s'"
#: builtin/submodule--helper.c
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "无法在不提供 URL 时克隆子模组 '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "克隆 '%s' 失败。按计划重试"
@@ -16442,10 +16385,10 @@ msgstr "打印标签内容"
#: builtin/worktree.c
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <字符串>]]\n"
-" [-b <新分支>] <路径> [<提交号>]"
+" [--orphan] [(-b | -B) <新分支>] <路径> [<提交号>]"
#: builtin/worktree.c
msgid "git worktree list [-v | --porcelain [-z]]"
@@ -16476,6 +16419,40 @@ msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <工作区>"
#: builtin/worktree.c
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "没有可用的源分支,将基于 '--orphan' 选项进行推断"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"如果你打算为此仓库创建一个包含新的孤立分支\n"
+"(没有提交的分支)的工作区,你可以使用选项\n"
+"--orphan 来执行此操作:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"如果你打算为此仓库创建一个包含新的孤立分支\n"
+"(没有提交的分支)的工作区,你可以使用选项\n"
+"--orphan 来执行此操作:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
+#: builtin/worktree.c
#, c-format
msgid "Removing %s/%s: %s"
msgstr "删除 %s/%s: %s"
@@ -16557,10 +16534,39 @@ msgstr "准备工作区(检出 '%s')"
#: builtin/worktree.c
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "不可达:无效引用:%s"
+
+#: builtin/worktree.c
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "准备工作区(分离头指针 %s)"
#: builtin/worktree.c
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD 指向了一个无用的(或孤立的)引用。\n"
+"HEAD 路径: '%s'\n"
+"HEAD 内容: '%s'"
+
+#: builtin/worktree.c
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"尽管已配置远程仓库,但不存在任何本地的或远程的引用,操作终止;\n"
+"请使用 'add -f' 来覆盖或拉取一个远程仓库"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "'%s' 和 '%s' 不能同时使用"
+
+#: builtin/worktree.c
msgid "checkout <branch> even if already checked out in other worktree"
msgstr "检出 <分支>,即使已经被检出到其它工作区"
@@ -16573,6 +16579,10 @@ msgid "create or reset a branch"
msgstr "创建或重置一个分支"
#: builtin/worktree.c
+msgid "create unborn/orphaned branch"
+msgstr "创建一个尚未诞生的/孤立的分支"
+
+#: builtin/worktree.c
msgid "populate the new working tree"
msgstr "生成新的工作区"
@@ -16598,6 +16608,15 @@ msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "选项 '%s'、'%s' 和 '%s' 不能同时使用"
#: builtin/worktree.c
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "选项 '%s',与 '%s' 不能同时使用"
+
+#: builtin/worktree.c
+msgid "<commit-ish>"
+msgstr "<提交号>"
+
+#: builtin/worktree.c
msgid "added with --lock"
msgstr "由 --lock 添加"
@@ -16878,6 +16897,16 @@ msgstr[0] "这个归档包需要这个引用:"
msgstr[1] "这个归档包需要 %<PRIuMAX> 个引用:"
#: bundle.c
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "该归档包使用的哈希算法:%s"
+
+#: bundle.c
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "归档包使用了过滤器:%s"
+
+#: bundle.c
msgid "unable to dup bundle descriptor"
msgstr "无法复制归档包描述符"
@@ -17174,8 +17203,8 @@ msgid "A portable graphical interface to Git"
msgstr "一个便携的 Git 图形客户端"
#: command-list.h
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr "从一个文件计算对象 ID,并可以创建 blob 数据对象"
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "从一个文件计算对象 ID,并支持可选地创建一个对象"
#: command-list.h
msgid "Display help information about Git"
@@ -17717,6 +17746,11 @@ msgstr "提交图形链不匹配"
#: commit-graph.c
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "基础图形中的提交数量过高:%<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr "无效的提交图形链:行 '%s' 不是一个哈希值"
@@ -17823,6 +17857,17 @@ msgid "failed to rename temporary commit-graph file"
msgstr "无法重命名临时提交图形文件"
#: commit-graph.c
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr ""
+"无法合并提交图形,总共已累加提交数:%<PRIuMAX>,当前待累加提交数:%<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "无法合并提交图形 %s, 提交过多:%<PRIuMAX>"
+
+#: commit-graph.c
msgid "Scanning merged commits"
msgstr "正在扫描合并提交"
@@ -17858,10 +17903,6 @@ msgid "failed to parse commit %s from commit-graph"
msgstr "无法从提交图形中解析提交 %s"
#: commit-graph.c
-msgid "Verifying commits in commit graph"
-msgstr "正在校验提交图中的提交"
-
-#: commit-graph.c
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr "无法从提交图形的对象库中解析提交 %s"
@@ -17908,6 +17949,10 @@ msgstr "提交图形中的提交 %s 的世代号是 %<PRIuMAX> < %<PRIuMAX>"
msgid "commit date for commit %s in commit-graph is %<PRIuMAX> != %<PRIuMAX>"
msgstr "提交图形中提交 %s 的提交日期是 %<PRIuMAX> != %<PRIuMAX>"
+#: commit-graph.c
+msgid "Verifying commits in commit graph"
+msgstr "正在校验提交图中的提交"
+
#: commit.c
#, c-format
msgid "%s %s is not a commit!"
@@ -19065,6 +19110,14 @@ msgid "multiple merge bases found"
msgstr "找到了多条合并基线"
#: diff-no-index.c
+msgid "cannot compare stdin to a directory"
+msgstr "无法将标准输入和目录进行比较"
+
+#: diff-no-index.c
+msgid "cannot compare a named pipe to a directory"
+msgstr "无法将命名管道和目录进行比较"
+
+#: diff-no-index.c
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<选项>] <路径> <路径>"
@@ -19128,6 +19181,15 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "外部 diff 退出,停止在 %s"
+#: diff.c
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow 明确要求只跟一个路径规格"
+
+#: diff.c
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "指定 --follow: %s 的同时,不支持在路径规格中使用神奇前缀"
+
#: diff.c parse-options.c
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
@@ -19145,10 +19207,6 @@ msgid ""
msgstr "选项 '%1$s'、'%2$s' 不能同时使用,与 '%4$s' 和 '%5$s' 一起使用 '%3$s'"
#: diff.c
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow 明确要求只跟一个路径规格"
-
-#: diff.c
#, c-format
msgid "invalid --stat value: %s"
msgstr "无效的 --stat 值:%s"
@@ -22607,6 +22665,15 @@ msgstr "无法生成 diff"
msgid "could not parse log for '%s'"
msgstr "不能解析 '%s' 的日志"
+#: reachable.c
+#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "无效的额外废弃提交版本:'%s'"
+
+#: reachable.c
+msgid "unable to enumerate additional recent objects"
+msgstr "无法枚举额外的近期对象"
+
#: read-cache.c
#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
@@ -22794,6 +22861,16 @@ msgstr "不能修复 '%s' 的权限位"
msgid "%s: cannot drop to stage #0"
msgstr "%s:不能落到暂存区 #0"
+#: read-cache.c
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "意外的差异状态 %c"
+
+#: read-cache.c
+#, c-format
+msgid "remove '%s'\n"
+msgstr "删除 '%s'\n"
+
#: rebase-interactive.c
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
@@ -23009,6 +23086,26 @@ msgstr "期望一个正数 contents:lines=%s"
#: ref-filter.c
#, c-format
+msgid "argument expected for %s"
+msgstr "预期参数 %s"
+
+#: ref-filter.c
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "预期正数参数值 %s=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "不能完整解析 %s=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "value expected %s="
+msgstr "预期值 %s="
+
+#: ref-filter.c
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "期望 %%(%2$s) 中的 '%1$s' 是一个正数"
@@ -23099,6 +23196,10 @@ msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s 不能和 --python、--shell、--tcl 同时使用"
#: ref-filter.c
+msgid "failed to run 'describe'"
+msgstr "无法运行 'describe'"
+
+#: ref-filter.c
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(非分支,正变基 %s)"
@@ -23175,6 +23276,10 @@ msgstr "key"
msgid "field name to sort on"
msgstr "排序的字段名"
+#: ref-filter.h
+msgid "exclude refs which match pattern"
+msgstr "排除与 <模式> 相匹配的引用"
+
#: reflog.c
#, c-format
msgid "not a reflog: %s"
@@ -23704,8 +23809,9 @@ msgstr[1] ""
# 译者:注意保持前导空格
#: remote.c
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (使用 \"git pull\" 来合并远程分支)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr " (如果您想将远程分支与您的更改合并,请使用 \"git pull\")\n"
#: remote.c
#, c-format
@@ -23846,6 +23952,11 @@ msgid "--unpacked=<packfile> no longer supported"
msgstr "不再支持 --unpacked=<packfile>"
#: revision.c
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "在 --stdin 模式下的无效选项:'%s'"
+
+#: revision.c
msgid "your current branch appears to be broken"
msgstr "您的当前分支好像被损坏"
@@ -25233,6 +25344,95 @@ msgstr "fork 失败"
msgid "setsid failed"
msgstr "setsid 失败"
+#: setup.c
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "不能对模版 '%s' 调用 stat"
+
+#: setup.c
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "不能打开目录 '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "不能读取链接 '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "不能自 '%s' 到 '%s' 创建符号链接"
+
+#: setup.c
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "不能拷贝 '%s' 至 '%s'"
+
+#: setup.c
+#, c-format
+msgid "ignoring template %s"
+msgstr "忽略模版 %s"
+
+#: setup.c
+#, c-format
+msgid "templates not found in %s"
+msgstr "没有在 %s 中找到模版"
+
+#: setup.c
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "没有从 '%s' 复制模版:%s"
+
+#: setup.c
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "无效的初始分支名:'%s'"
+
+#: setup.c
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "不能处理 %d 类型的文件"
+
+#: setup.c
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "不能移动 %s 至 %s"
+
+#: setup.c
+msgid "attempt to reinitialize repository with different hash"
+msgstr "尝试用不同的哈希算法重新初始化仓库"
+
+#: setup.c
+#, c-format
+msgid "%s already exists"
+msgstr "%s 已经存在"
+
+#: setup.c
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-init:已忽略 --initial-branch=%s"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "重新初始化已存在的共享 Git 仓库于 %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "已重新初始化已存在的 Git 仓库于 %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "已初始化空的共享 Git 仓库于 %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "已初始化空的 Git 仓库于 %s%s\n"
+
#: sparse-index.c
#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 1c549b868f..6ae75e7e19 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -21,12 +21,13 @@
#
# Yi-Jyun Pan <pan93412@gmail.com>, 2021, 2022, 2023.
# Kaiyang Wu <self@origincode.me>, 2022.
+# lumynou5 <lumynou5.tw@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2023-05-19 19:57+0000\n"
-"PO-Revision-Date: 2023-05-31 23:41+0800\n"
+"POT-Creation-Date: 2023-08-20 21:51+0800\n"
+"PO-Revision-Date: 2023-08-20 21:58+0800\n"
"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
"Language-Team: Chinese (Traditional) <http://weblate.slat.org/projects/git-"
"po/git-cli/zh_Hant/>\n"
@@ -35,7 +36,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 3.3.1\n"
+"X-Generator: Poedit 3.3.2\n"
"X-ZhConverter: 繁化姬 dict-f4bc617e-r910 @ 2019/11/16 20:23:12 | https://"
"zhconvert.org\n"
@@ -126,7 +127,7 @@ msgstr "忽略未合併項目:%s"
#: add-interactive.c add-patch.c
#, c-format
msgid "Only binary files changed.\n"
-msgstr "只變更二進位檔案。\n"
+msgstr "只有二進位檔案更動了。\n"
#: add-interactive.c add-patch.c
#, c-format
@@ -770,9 +771,8 @@ msgid "Reverting is not possible because you have unmerged files."
msgstr "無法還原提交,有未合併的檔案。"
#: advice.c
-#, c-format
-msgid "It is not possible to %s because you have unmerged files."
-msgstr "無法 %s,有未合併的檔案。"
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr "無法重定基底,有未合併的檔案。"
#: advice.c
msgid ""
@@ -942,6 +942,14 @@ msgid "'%s' outside a repository"
msgstr "“%s” 在版本庫之外"
#: apply.c
+msgid "failed to read patch"
+msgstr "無法讀取修補檔"
+
+#: apply.c
+msgid "patch too large"
+msgstr "修補檔過大"
+
+#: apply.c
#, c-format
msgid "Cannot prepare timestamp regexp %s"
msgstr "無法準備時間戳常規表示式 %s"
@@ -1585,7 +1593,7 @@ msgstr "無法讀取 “%s”"
#: archive.c
#, c-format
msgid "pathspec '%s' matches files outside the current directory"
-msgstr "符合路徑規格「%s」的檔案在目前目錄之外"
+msgstr "符合路徑規格 “%s” 的檔案在目前目錄之外"
#: archive.c builtin/add.c builtin/rm.c
#, c-format
@@ -2030,8 +2038,8 @@ msgstr "已有同名 “%s” 分支"
#: branch.c
#, c-format
-msgid "cannot force update the branch '%s' checked out at '%s'"
-msgstr "無法強制更新在 “%2$s” 簽出的 “%1$s” 分支"
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr "無法強制更新被位於 “%2$s” 的工作區使用的 “%1$s” 分支"
#: branch.c
#, c-format
@@ -2111,20 +2119,6 @@ msgid "cannot chmod %cx '%s'"
msgstr "無法 chmod %cx '%s'"
#: builtin/add.c
-#, c-format
-msgid "unexpected diff status %c"
-msgstr "非預期的 diff 狀態 %c"
-
-#: builtin/add.c builtin/commit.c
-msgid "updating files failed"
-msgstr "更新檔案失敗"
-
-#: builtin/add.c
-#, c-format
-msgid "remove '%s'\n"
-msgstr "移除 “%s”\n"
-
-#: builtin/add.c
msgid "Unstaged changes after refreshing the index:"
msgstr "重新整理索引之後,尚未被暫存的更動:"
@@ -2657,10 +2651,6 @@ msgid "pass --keep-cr flag to git-mailsplit for mbox format"
msgstr "若為 mbox 格式,向 git-mailsplit 傳入 --keep-cr 標記"
#: builtin/am.c
-msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
-msgstr "不向 git-mailsplit 傳入 --keep-cr 標記,無視 am.keepcr 的設定"
-
-#: builtin/am.c
msgid "strip everything before a scissors line"
msgstr "截掉裁切線前的所有內容"
@@ -3085,7 +3075,7 @@ msgstr "好的修訂版回傳偽造的錯誤碼 %d"
#: 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"
+msgstr "二分搜尋執行失敗:%2$s 回傳的結束代碼 %1$d 小於 0 或大於 128"
#: builtin/bisect.c
#, c-format
@@ -3964,12 +3954,12 @@ msgid ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
msgstr ""
"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
"objects]\n"
" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-z]"
+" [--textconv | --filters] [-Z]"
#: builtin/cat-file.c
msgid ""
@@ -4028,6 +4018,10 @@ msgid "stdin is NUL-terminated"
msgstr "stdin 以 NUL 字元終止"
#: builtin/cat-file.c
+msgid "stdin and stdout is NUL-terminated"
+msgstr "stdin 和 stdout 以 NUL 字元終止"
+
+#: builtin/cat-file.c
msgid "read commands from stdin"
msgstr "從 stdin 讀取命令"
@@ -4914,7 +4908,8 @@ msgid "remove whole directories"
msgstr "移除整個目錄"
#: builtin/clean.c builtin/describe.c builtin/grep.c builtin/log.c
-#: builtin/ls-files.c builtin/name-rev.c builtin/show-ref.c
+#: builtin/ls-files.c builtin/name-rev.c builtin/pack-refs.c builtin/show-ref.c
+#: ref-filter.h
msgid "pattern"
msgstr "pattern"
@@ -5084,14 +5079,6 @@ msgstr "server-specific"
msgid "option to transmit"
msgstr "傳輸選項"
-#: builtin/clone.c builtin/fetch.c builtin/pull.c builtin/push.c
-msgid "use IPv4 addresses only"
-msgstr "只使用 IPv4 位址"
-
-#: builtin/clone.c builtin/fetch.c builtin/pull.c builtin/push.c
-msgid "use IPv6 addresses only"
-msgstr "只使用 IPv6 位址"
-
#: builtin/clone.c
msgid "apply partial clone filters to submodules"
msgstr "將部分複製過濾器套用至子模組"
@@ -5626,6 +5613,10 @@ msgstr ""
" git cherry-pick --skip\n"
"\n"
+#: builtin/commit.c read-cache.c
+msgid "updating files failed"
+msgstr "更新檔案失敗"
+
#: builtin/commit.c
msgid "failed to unpack HEAD tree object"
msgstr "解包 HEAD 樹狀物件失敗"
@@ -5701,8 +5692,8 @@ msgstr "無法選擇一個未被目前提交說明使用的備註字元"
#: builtin/commit.c builtin/merge-tree.c
#, c-format
-msgid "could not lookup commit %s"
-msgstr "不能查詢提交 %s"
+msgid "could not lookup commit '%s'"
+msgstr "無法查詢提交 “%s”"
#: builtin/commit.c builtin/shortlog.c
#, c-format
@@ -7936,7 +7927,7 @@ msgstr "對 %s 呼叫 fstat 失敗:%s"
msgid "failed to parse '%s' value '%s'"
msgstr "無法解析 '%s' 值 '%s'"
-#: builtin/gc.c builtin/init-db.c
+#: builtin/gc.c setup.c
#, c-format
msgid "cannot stat '%s'"
msgstr "不能對 '%s' 呼叫 stat"
@@ -8940,7 +8931,7 @@ msgstr "無法返回目前工作目錄"
msgid "bad %s"
msgstr "錯誤選項 %s"
-#: builtin/index-pack.c builtin/init-db.c
+#: builtin/index-pack.c builtin/init-db.c setup.c
#, c-format
msgid "unknown hash algorithm '%s'"
msgstr "未知的「%s」雜湊算法"
@@ -8958,95 +8949,6 @@ msgid "fsck error in pack objects"
msgstr "在打包物件中 fsck 檢查發生錯誤"
#: builtin/init-db.c
-#, c-format
-msgid "cannot stat template '%s'"
-msgstr "不能對範本 '%s' 呼叫 stat"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot opendir '%s'"
-msgstr "不能開啟目錄 '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot readlink '%s'"
-msgstr "不能讀取連結 '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot symlink '%s' '%s'"
-msgstr "不能自 '%s' 到 '%s' 建立符號連結"
-
-#: builtin/init-db.c
-#, c-format
-msgid "cannot copy '%s' to '%s'"
-msgstr "不能複製 '%s' 至 '%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "ignoring template %s"
-msgstr "忽略範本 %s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "templates not found in %s"
-msgstr "沒有在 %s 中找到範本"
-
-#: builtin/init-db.c
-#, c-format
-msgid "not copying templates from '%s': %s"
-msgstr "沒有從 '%s' 複製範本:%s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "invalid initial branch name: '%s'"
-msgstr "無效的初始分支名稱:'%s'"
-
-#: builtin/init-db.c
-#, c-format
-msgid "unable to handle file type %d"
-msgstr "不能處理 %d 類型的檔案"
-
-#: builtin/init-db.c
-#, c-format
-msgid "unable to move %s to %s"
-msgstr "不能移動 %s 至 %s"
-
-#: builtin/init-db.c
-msgid "attempt to reinitialize repository with different hash"
-msgstr "嘗試以不同的雜湊值重新初始化版本庫"
-
-#: builtin/init-db.c
-#, c-format
-msgid "%s already exists"
-msgstr "%s 已經存在"
-
-#: builtin/init-db.c
-#, c-format
-msgid "re-init: ignored --initial-branch=%s"
-msgstr "re-init: 忽略 --initial-branch=%s"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Reinitialized existing shared Git repository in %s%s\n"
-msgstr "重新初始化已存在的共享 Git 版本庫於 %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Reinitialized existing Git repository in %s%s\n"
-msgstr "重新初始化已存在的 Git 版本庫於 %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Initialized empty shared Git repository in %s%s\n"
-msgstr "已初始化空的共享 Git 版本庫於 %s%s\n"
-
-#: builtin/init-db.c
-#, c-format
-msgid "Initialized empty Git repository in %s%s\n"
-msgstr "已初始化空的 Git 版本庫於 %s%s\n"
-
-#: builtin/init-db.c
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
@@ -9593,6 +9495,11 @@ msgid ""
"Could not find a tracked remote branch, please specify <upstream> manually.\n"
msgstr "不能找到追蹤的遠端分支,請手動指定 <上游>。\n"
+#: builtin/ls-files.c builtin/ls-tree.c
+#, c-format
+msgid "could not get object info about '%s'"
+msgstr "無法取得「%s」相關的物件資訊"
+
#: builtin/ls-files.c
#, c-format
msgid "bad ls-files format: element '%s' does not start with '('"
@@ -9779,11 +9686,6 @@ msgstr "git ls-tree [<選項>] <樹或提交> [<路徑>...]"
#: builtin/ls-tree.c
#, c-format
-msgid "could not get object info about '%s'"
-msgstr "無法取得「%s」相關的物件資訊"
-
-#: builtin/ls-tree.c
-#, c-format
msgid "bad ls-tree format: element '%s' does not start with '('"
msgstr "無效的 ls-tree 格式:「%s」元素的開頭不是「(」"
@@ -10707,11 +10609,13 @@ msgstr "git notes [--ref <註解引用>] [list [<物件>]]"
#: builtin/notes.c
msgid ""
-"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
-"| (-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <註解引用>] add [-f] [--allow-empty] [-m <說明> | -F <檔案> "
-"| (-c | -C) <物件>] [<物件>]"
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
#: builtin/notes.c
msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
@@ -10719,11 +10623,13 @@ msgstr "git notes [--ref <註解引用>] copy [-f] <來源物件> <目標物件>
#: builtin/notes.c
msgid ""
-"git notes [--ref <notes-ref>] append [--allow-empty] [-m <msg> | -F <file> | "
-"(-c | -C) <object>] [<object>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <註解引用>] append [--allow-empty] [-m <說明> | -F <檔案> | "
-"(-c | -C) <物件>] [<物件>]"
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>]"
#: builtin/notes.c
msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
@@ -10892,6 +10798,18 @@ msgid "replace existing notes"
msgstr "取代已存在的註解"
#: builtin/notes.c
+msgid "<paragraph-break>"
+msgstr "<paragraph-break>"
+
+#: builtin/notes.c
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "在段落間插入 <paragraph-break>"
+
+#: builtin/notes.c
+msgid "remove unnecessary whitespace"
+msgstr "移除不必要的空白字元"
+
+#: builtin/notes.c
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -11570,8 +11488,12 @@ msgid "refusing to run without --i-still-use-this"
msgstr "傳入 --i-still-use-this 前拒絕執行"
#: builtin/pack-refs.c
-msgid "git pack-refs [--all] [--no-prune]"
-msgstr "git pack-refs [--all] [--no-prune]"
+msgid ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude "
+"<pattern>]"
#: builtin/pack-refs.c
msgid "pack everything"
@@ -11581,6 +11503,14 @@ msgstr "打包一切"
msgid "prune loose refs (default)"
msgstr "剪除鬆散引用(預設值)"
+#: builtin/pack-refs.c
+msgid "references to include"
+msgstr "要包含的引用"
+
+#: builtin/pack-refs.c
+msgid "references to exclude"
+msgstr "要排除的引用"
+
#: builtin/patch-id.c
msgid "git patch-id [--stable | --unstable | --verbatim]"
msgstr "git patch-id [--stable | --unstable | --verbatim]"
@@ -11657,6 +11587,14 @@ msgstr "強制覆蓋本機分支"
msgid "number of submodules pulled in parallel"
msgstr "並行拉取的子模組數量"
+#: builtin/pull.c parse-options.h
+msgid "use IPv4 addresses only"
+msgstr "只使用 IPv4 位址"
+
+#: builtin/pull.c parse-options.h
+msgid "use IPv6 addresses only"
+msgstr "只使用 IPv6 位址"
+
#: builtin/pull.c
msgid ""
"There is no candidate for rebasing against among the refs that you just "
@@ -11941,37 +11879,37 @@ msgstr ""
#: builtin/push.c
msgid ""
"Updates were rejected because the tip of your current branch is behind\n"
-"its remote counterpart. Integrate the remote changes (e.g.\n"
-"'git pull ...') before pushing again.\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
"更新被拒絕,因為您目前分支的最新提交落後於其對應的遠端分支。\n"
-"再次推送前,先與遠端變更合併(如 'git pull ...')。詳見\n"
-"'git push --help' 中的 'Note about fast-forwards' 小節。"
+"如果您想要整合遠端更動,請在再次推送前使用 “git pull”。詳見\n"
+"“git push --help” 中的〈Note about fast-forwards〉小節。"
#: builtin/push.c
msgid ""
"Updates were rejected because a pushed branch tip is behind its remote\n"
-"counterpart. Check out this branch and integrate the remote changes\n"
-"(e.g. 'git pull ...') before pushing again.\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"更新被拒絕,因為推送的一個分支的最新提交落後於其對應的遠端分支。\n"
-"簽出該分支並整合遠端變更(如 'git pull ...'),然後再推送。詳見\n"
-"'git push --help' 中的 'Note about fast-forwards' 小節。"
+"更新被拒絕,因為推送的某分支的最新提交落後於其對應的遠端分支。\n"
+"如果您想要整合遠端更動,請在再次推送前使用 “git pull”。詳見\n"
+"“git push --help” 中的〈Note about fast-forwards〉小節。"
#: builtin/push.c
msgid ""
-"Updates were rejected because the remote contains work that you do\n"
-"not have locally. This is usually caused by another repository pushing\n"
-"to the same ref. You may want to first integrate the remote changes\n"
-"(e.g., 'git pull ...') before pushing again.\n"
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"因為遠端版本庫包含您本機尚不存在的提交,而導致更新被拒絕。這通常是因為另外\n"
-"一個版本庫已向該引用進行了推送。再次推送前,您可能需要先整合遠端變更\n"
-"(如 'git pull ...')。\n"
-"詳見 'git push --help' 中的 'Note about fast-forwards' 小節。"
+"更新被拒絕,因為遠端包含您本機沒有的提交。這通常是因為\n"
+"另一個版本庫有推送更動到同個引用。如果您想要整合遠端更動,\n"
+"請在再次推送前使用 “git pull”。詳見 “git push --help” 中的\n"
+"〈Note about fast-forwards〉小節。"
#: builtin/push.c
msgid "Updates were rejected because the tag already exists in the remote."
@@ -11988,14 +11926,14 @@ msgstr ""
#: builtin/push.c
msgid ""
-"Updates were rejected because the tip of the remote-tracking\n"
-"branch has been updated since the last checkout. You may want\n"
-"to integrate those changes locally (e.g., 'git pull ...')\n"
-"before forcing an update.\n"
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"更新被拒,因為遠端追蹤分支的最新指針繼上次簽出後有更新。\n"
-"您可能會希望先將這些變更整合至本地(例如:‘git pull …’)\n"
-"最後才強制更新。\n"
+"更新被拒絕,因為遠端追蹤分支的最新提交自上次簽出後有改變。\n"
+"如果您想要整合遠端更動,請在再次推送前使用 “git pull”。\n"
+"詳見 “git push --help” 中的〈Note about fast-forwards〉小節。"
#: builtin/push.c
#, c-format
@@ -13024,12 +12962,12 @@ msgid "fetch the remote branches"
msgstr "抓取遠端的分支"
#: builtin/remote.c
-msgid "import all tags and associated objects when fetching"
-msgstr "抓取時匯入所有的標籤和關聯物件"
-
-#: builtin/remote.c
-msgid "or do not fetch any tag at all (--no-tags)"
-msgstr "或不抓取任何標籤(--no-tags)"
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"抓取時匯入所有的標籤和關聯物件\n"
+"或者是完全不抓取所有標籤 (--no-tags)"
#: builtin/remote.c
msgid "branch(es) to track"
@@ -15412,6 +15350,11 @@ msgstr "略過子模組 '%s'"
#: builtin/submodule--helper.c
#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "無法在沒有網址的情況下複製 “%s” 子模組"
+
+#: builtin/submodule--helper.c
+#, c-format
msgid "Failed to clone '%s'. Retry scheduled"
msgstr "複製 '%s' 失敗。已排程重試作業"
@@ -16320,10 +16263,10 @@ msgstr "列印標籤內容"
#: builtin/worktree.c
msgid ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
msgstr ""
"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
-" [-b <new-branch>] <path> [<commit-ish>]"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
#: builtin/worktree.c
msgid "git worktree list [-v | --porcelain [-z]]"
@@ -16354,6 +16297,40 @@ msgid "git worktree unlock <worktree>"
msgstr "git worktree unlock <worktree>"
#: builtin/worktree.c
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "沒有可能的來源分支,推測為 “--orphan”"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"如果您是想要在這個版本庫建立一個工作區,裡面包含一個\n"
+"孤立分支(即沒有提交的分支),可以使用 --orphan 達到\n"
+"這個效果:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new orphan branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"如果您是想要在這個版本庫建立一個工作區,裡面包含一個\n"
+"孤立分支(即沒有提交的分支),可以使用 --orphan 達到\n"
+"這個效果:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
+#: builtin/worktree.c
#, c-format
msgid "Removing %s/%s: %s"
msgstr "移除 %s/%s: %s"
@@ -16435,10 +16412,39 @@ msgstr "準備工作區(簽出 '%s')"
#: builtin/worktree.c
#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "不可達:無效引用:%s"
+
+#: builtin/worktree.c
+#, c-format
msgid "Preparing worktree (detached HEAD %s)"
msgstr "準備工作區(分離開頭指標 %s)"
#: builtin/worktree.c
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"HEAD 指向無效(或孤立)引用。\n"
+"HEAD 路徑:“%s”\n"
+"HEAD 內容:“%s”"
+
+#: builtin/worktree.c
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to overide or fetch a remote first"
+msgstr ""
+"即使有提供一個遠端,卻不存在本機或遠端引用,\n"
+"故停止。使用 “add -f” 先覆蓋或抓取遠端"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' and '%s' cannot be used together"
+msgstr "無法同時使用 “%s” 和 “%s”"
+
+#: builtin/worktree.c
msgid "checkout <branch> even if already checked out in other worktree"
msgstr "簽出 <分支>,即使已經被簽出到其它工作區"
@@ -16451,6 +16457,10 @@ msgid "create or reset a branch"
msgstr "建立或重設一個分支"
#: builtin/worktree.c
+msgid "create unborn/orphaned branch"
+msgstr "建立尚無內容(孤立)的分支"
+
+#: builtin/worktree.c
msgid "populate the new working tree"
msgstr "生成新的工作區"
@@ -16476,6 +16486,15 @@ msgid "options '%s', '%s', and '%s' cannot be used together"
msgstr "「%s」、「%s」和「%s」選項不得同時使用"
#: builtin/worktree.c
+#, c-format
+msgid "options '%s', and '%s' cannot be used together"
+msgstr "無法同時使用 “%s” 和 “%s” 選項"
+
+#: builtin/worktree.c
+msgid "<commit-ish>"
+msgstr "<提交指示元>"
+
+#: builtin/worktree.c
msgid "added with --lock"
msgstr "已使用 --lock 加入"
@@ -16754,6 +16773,16 @@ msgid_plural "The bundle requires these %<PRIuMAX> refs:"
msgstr[0] "這個套件包需要這 %<PRIuMAX> 個引用:"
#: bundle.c
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "本套件包採用此雜湊演算法:%s"
+
+#: bundle.c
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "本套件包使用此過濾器:%s"
+
+#: bundle.c
msgid "unable to dup bundle descriptor"
msgstr "無法複製套件包描述元"
@@ -17050,8 +17079,8 @@ msgid "A portable graphical interface to Git"
msgstr "一個便攜的 Git 圖形用戶端"
#: command-list.h
-msgid "Compute object ID and optionally creates a blob from a file"
-msgstr "從一個檔案計算物件 ID,並可以建立 blob 資料物件"
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "從一個檔案計算物件 ID,也能順帶建立一個物件"
#: command-list.h
msgid "Display help information about Git"
@@ -17593,6 +17622,11 @@ msgstr "提交圖形鏈不符合"
#: commit-graph.c
#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "基礎圖 (base graph) 中的提交數過多:%<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
msgid "invalid commit-graph chain: line '%s' not a hash"
msgstr "無效的提交圖形鏈:行 '%s' 不是一個雜湊值"
@@ -17697,6 +17731,16 @@ msgid "failed to rename temporary commit-graph file"
msgstr "無法重新命名暫時提交圖形檔案"
#: commit-graph.c
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "無法將圖與 %<PRIuMAX>, %<PRIuMAX> 個提交進行合併"
+
+#: commit-graph.c
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "無法合併 %s 圖,太多提交:%<PRIuMAX>"
+
+#: commit-graph.c
msgid "Scanning merged commits"
msgstr "正在掃描合併提交"
@@ -17732,10 +17776,6 @@ msgid "failed to parse commit %s from commit-graph"
msgstr "無法從提交圖形中解析提交 %s"
#: commit-graph.c
-msgid "Verifying commits in commit graph"
-msgstr "正在驗證提交圖中的提交"
-
-#: commit-graph.c
#, c-format
msgid "failed to parse commit %s from object database for commit-graph"
msgstr "無法從提交圖形的物件庫中解析提交 %s"
@@ -17782,6 +17822,10 @@ msgstr "提交 %s 的提交圖形處於 %<PRIuMAX> < %<PRIuMAX> 世代"
msgid "commit date for commit %s in commit-graph is %<PRIuMAX> != %<PRIuMAX>"
msgstr "提交圖形中提交 %s 的提交日期是 %<PRIuMAX> != %<PRIuMAX>"
+#: commit-graph.c
+msgid "Verifying commits in commit graph"
+msgstr "正在驗證提交圖中的提交"
+
#: commit.c
#, c-format
msgid "%s %s is not a commit!"
@@ -18929,6 +18973,14 @@ msgid "multiple merge bases found"
msgstr "找到多個合併基底"
#: diff-no-index.c
+msgid "cannot compare stdin to a directory"
+msgstr "無法比對 stdin 和目錄"
+
+#: diff-no-index.c
+msgid "cannot compare a named pipe to a directory"
+msgstr "無法比對命名管線 (pipe) 和目錄"
+
+#: diff-no-index.c
msgid "git diff --no-index [<options>] <path> <path>"
msgstr "git diff --no-index [<選項>] <路徑> <路徑>"
@@ -18992,6 +19044,15 @@ msgstr ""
msgid "external diff died, stopping at %s"
msgstr "外部 diff 離開,停止在 %s"
+#: diff.c
+msgid "--follow requires exactly one pathspec"
+msgstr "--follow 明確要求只跟一個路徑規格"
+
+#: diff.c
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "--follow 不支援路徑規格魔法:%s"
+
#: diff.c parse-options.c
#, c-format
msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
@@ -19009,10 +19070,6 @@ msgid ""
msgstr "「%s」和「%s」選項不得同時使用,請使用「%s」搭配「%s」、「%s」"
#: diff.c
-msgid "--follow requires exactly one pathspec"
-msgstr "--follow 明確要求只跟一個路徑規格"
-
-#: diff.c
#, c-format
msgid "invalid --stat value: %s"
msgstr "無效的 --stat 值:%s"
@@ -22470,6 +22527,15 @@ msgstr "生成 diff 失敗"
msgid "could not parse log for '%s'"
msgstr "不能解析 '%s' 的日誌"
+#: reachable.c
+#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "無效的額外廢棄提交修訂版:“%s”"
+
+#: reachable.c
+msgid "unable to enumerate additional recent objects"
+msgstr "無法列舉多出來的近期物件"
+
#: read-cache.c
#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
@@ -22658,6 +22724,16 @@ msgstr "不能修復 '%s' 的權限位"
msgid "%s: cannot drop to stage #0"
msgstr "%s:不能落到暫存區 #0"
+#: read-cache.c
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "非預期的 diff 狀態 %c"
+
+#: read-cache.c
+#, c-format
+msgid "remove '%s'\n"
+msgstr "移除 “%s”\n"
+
#: rebase-interactive.c
msgid ""
"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
@@ -22871,6 +22947,26 @@ msgstr "期望一個正數 contents:lines=%s"
#: ref-filter.c
#, c-format
+msgid "argument expected for %s"
+msgstr "引數預期 %s"
+
+#: ref-filter.c
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "期望一個正數 %s=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "無法完全解析 %s=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "value expected %s="
+msgstr "數值預期 %s="
+
+#: ref-filter.c
+#, c-format
msgid "positive value expected '%s' in %%(%s)"
msgstr "%%(%2$s) 中的 '%1$s' 預期是正數值"
@@ -22961,6 +23057,10 @@ msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
msgstr "--format=%.*s 不能和 --python、--shell、--tcl 一起使用"
#: ref-filter.c
+msgid "failed to run 'describe'"
+msgstr "無法執行 “describe”"
+
+#: ref-filter.c
#, c-format
msgid "(no branch, rebasing %s)"
msgstr "(無分支,重定 %s 的基底)"
@@ -23037,6 +23137,10 @@ msgstr "key"
msgid "field name to sort on"
msgstr "排序的欄位名"
+#: ref-filter.h
+msgid "exclude refs which match pattern"
+msgstr "排除符合模式的引用"
+
#: reflog.c
#, c-format
msgid "not a reflog: %s"
@@ -23566,8 +23670,9 @@ msgstr[0] ""
# 譯者:請維持前導空格
#: remote.c
-msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (使用 \"git pull\" 來合併遠端分支)\n"
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr " (使用 “git pull” 來將遠端分支整合進您的分支)\n"
#: remote.c
#, c-format
@@ -23708,6 +23813,11 @@ msgid "--unpacked=<packfile> no longer supported"
msgstr "--unpacked=<packfile> 已不受支援"
#: revision.c
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "在 --stdin 模式下,“%s” 選項無效"
+
+#: revision.c
msgid "your current branch appears to be broken"
msgstr "您的目前分支好像被損壞"
@@ -25098,6 +25208,95 @@ msgstr "fork 失敗"
msgid "setsid failed"
msgstr "setsid 失敗"
+#: setup.c
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "不能對範本 '%s' 呼叫 stat"
+
+#: setup.c
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "不能開啟目錄 '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "不能讀取連結 '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "不能自 '%s' 到 '%s' 建立符號連結"
+
+#: setup.c
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "不能複製 '%s' 至 '%s'"
+
+#: setup.c
+#, c-format
+msgid "ignoring template %s"
+msgstr "忽略範本 %s"
+
+#: setup.c
+#, c-format
+msgid "templates not found in %s"
+msgstr "沒有在 %s 中找到範本"
+
+#: setup.c
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "沒有從 '%s' 複製範本:%s"
+
+#: setup.c
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "無效的初始分支名稱:'%s'"
+
+#: setup.c
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "不能處理 %d 類型的檔案"
+
+#: setup.c
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "不能移動 %s 至 %s"
+
+#: setup.c
+msgid "attempt to reinitialize repository with different hash"
+msgstr "嘗試以不同的雜湊值重新初始化版本庫"
+
+#: setup.c
+#, c-format
+msgid "%s already exists"
+msgstr "%s 已經存在"
+
+#: setup.c
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "re-init: 忽略 --initial-branch=%s"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "重新初始化已存在的共享 Git 版本庫於 %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "重新初始化已存在的 Git 版本庫於 %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "已初始化空的共享 Git 版本庫於 %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "已初始化空的 Git 版本庫於 %s%s\n"
+
#: sparse-index.c
#, c-format
msgid "index entry is a directory, but not sparse (%08x)"
@@ -27305,6 +27504,26 @@ msgstr "略過 %s 含備份後綴 '%s'。\n"
msgid "Do you really want to send %s? [y|N]: "
msgstr "您真的要傳送 %s?[y|N]: "
+#, c-format
+#~ msgid "It is not possible to %s because you have unmerged files."
+#~ msgstr "無法 %s,有未合併的檔案。"
+
+#~ msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"
+#~ msgstr "不向 git-mailsplit 傳入 --keep-cr 標記,無視 am.keepcr 的設定"
+
+#~ msgid ""
+#~ "Updates were rejected because the tip of the remote-tracking\n"
+#~ "branch has been updated since the last checkout. You may want\n"
+#~ "to integrate those changes locally (e.g., 'git pull ...')\n"
+#~ "before forcing an update.\n"
+#~ msgstr ""
+#~ "更新被拒,因為遠端追蹤分支的最新指針繼上次簽出後有更新。\n"
+#~ "您可能會希望先將這些變更整合至本地(例如:‘git pull …’)\n"
+#~ "最後才強制更新。\n"
+
+#~ msgid "or do not fetch any tag at all (--no-tags)"
+#~ msgstr "或不抓取任何標籤(--no-tags)"
+
#~ msgid "current working directory is untracked"
#~ msgstr "尚未追蹤目前的工作目錄"
diff --git a/preload-index.c b/preload-index.c
index 7a26b08c21..e44530c80c 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -1,14 +1,16 @@
/*
* Copyright (C) 2008 Linus Torvalds
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "pathspec.h"
#include "dir.h"
#include "environment.h"
#include "fsmonitor.h"
#include "gettext.h"
#include "config.h"
+#include "preload-index.h"
#include "progress.h"
+#include "read-cache.h"
#include "thread-utils.h"
#include "repository.h"
#include "symlinks.h"
diff --git a/preload-index.h b/preload-index.h
new file mode 100644
index 0000000000..251b1ed88e
--- /dev/null
+++ b/preload-index.h
@@ -0,0 +1,15 @@
+#ifndef PRELOAD_INDEX_H
+#define PRELOAD_INDEX_H
+
+struct index_state;
+struct pathspec;
+struct repository;
+
+void preload_index(struct index_state *index,
+ const struct pathspec *pathspec,
+ unsigned int refresh_flags);
+int repo_read_index_preload(struct repository *,
+ const struct pathspec *pathspec,
+ unsigned refresh_flags);
+
+#endif /* PRELOAD_INDEX_H */
diff --git a/pretty.c b/pretty.c
index 0bb938021b..7f3abb676c 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1,9 +1,9 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "commit.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "utf8.h"
#include "diff.h"
@@ -18,6 +18,7 @@
#include "gpg-interface.h"
#include "trailer.h"
#include "run-command.h"
+#include "object-name.h"
/*
* The limit for formatting directives, which enable the caller to append
@@ -56,6 +57,7 @@ static void save_user_format(struct rev_info *rev, const char *cp, int is_tforma
}
static int git_pretty_formats_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
struct cmt_fmt_map *commit_format = NULL;
@@ -1250,6 +1252,27 @@ static int format_trailer_match_cb(const struct strbuf *key, void *ud)
return 0;
}
+static struct strbuf *expand_string_arg(struct strbuf *sb,
+ const char *argval, size_t arglen)
+{
+ char *fmt = xstrndup(argval, arglen);
+ const char *format = fmt;
+
+ strbuf_reset(sb);
+ while (strbuf_expand_step(sb, &format)) {
+ size_t len;
+
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(sb, '%');
+ else if ((len = strbuf_expand_literal(sb, format)))
+ format += len;
+ else
+ strbuf_addch(sb, '%');
+ }
+ free(fmt);
+ return sb;
+}
+
int format_set_trailers_options(struct process_trailer_options *opts,
struct string_list *filter_list,
struct strbuf *sepbuf,
@@ -1278,21 +1301,9 @@ int format_set_trailers_options(struct process_trailer_options *opts,
opts->filter_data = filter_list;
opts->only_trailers = 1;
} else if (match_placeholder_arg_value(*arg, "separator", arg, &argval, &arglen)) {
- char *fmt;
-
- strbuf_reset(sepbuf);
- fmt = xstrndup(argval, arglen);
- strbuf_expand(sepbuf, fmt, strbuf_expand_literal_cb, NULL);
- free(fmt);
- opts->separator = sepbuf;
+ opts->separator = expand_string_arg(sepbuf, argval, arglen);
} else if (match_placeholder_arg_value(*arg, "key_value_separator", arg, &argval, &arglen)) {
- char *fmt;
-
- strbuf_reset(kvsepbuf);
- fmt = xstrndup(argval, arglen);
- strbuf_expand(kvsepbuf, fmt, strbuf_expand_literal_cb, NULL);
- free(fmt);
- opts->key_value_separator = kvsepbuf;
+ opts->key_value_separator = expand_string_arg(kvsepbuf, argval, arglen);
} else if (!match_placeholder_bool_arg(*arg, "only", arg, &opts->only_trailers) &&
!match_placeholder_bool_arg(*arg, "unfold", arg, &opts->unfold) &&
!match_placeholder_bool_arg(*arg, "keyonly", arg, &opts->key_only) &&
@@ -1373,6 +1384,44 @@ static size_t parse_describe_args(const char *start, struct strvec *args)
return arg - start;
}
+
+static int parse_decoration_option(const char **arg,
+ const char *name,
+ char **opt)
+{
+ const char *argval;
+ size_t arglen;
+
+ if (match_placeholder_arg_value(*arg, name, arg, &argval, &arglen)) {
+ struct strbuf sb = STRBUF_INIT;
+
+ expand_string_arg(&sb, argval, arglen);
+ *opt = strbuf_detach(&sb, NULL);
+ return 1;
+ }
+ return 0;
+}
+
+static void parse_decoration_options(const char **arg,
+ struct decoration_options *opts)
+{
+ while (parse_decoration_option(arg, "prefix", &opts->prefix) ||
+ parse_decoration_option(arg, "suffix", &opts->suffix) ||
+ parse_decoration_option(arg, "separator", &opts->separator) ||
+ parse_decoration_option(arg, "pointer", &opts->pointer) ||
+ parse_decoration_option(arg, "tag", &opts->tag))
+ ;
+}
+
+static void free_decoration_options(const struct decoration_options *opts)
+{
+ free(opts->prefix);
+ free(opts->suffix);
+ free(opts->separator);
+ free(opts->pointer);
+ free(opts->tag);
+}
+
static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
const char *placeholder,
void *context)
@@ -1386,7 +1435,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
char **slot;
/* these are independent of the commit */
- res = strbuf_expand_literal_cb(sb, placeholder, NULL);
+ res = strbuf_expand_literal(sb, placeholder);
if (res)
return res;
@@ -1526,11 +1575,18 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
strbuf_addstr(sb, get_revision_mark(NULL, commit));
return 1;
case 'd':
- format_decorations(sb, commit, c->auto_color);
+ format_decorations(sb, commit, c->auto_color, NULL);
return 1;
case 'D':
- format_decorations_extended(sb, commit, c->auto_color, "", ", ", "");
- return 1;
+ {
+ const struct decoration_options opts = {
+ .prefix = "",
+ .suffix = ""
+ };
+
+ format_decorations(sb, commit, c->auto_color, &opts);
+ return 1;
+ }
case 'S': /* tag/branch like --source */
if (!(c->pretty_ctx->rev && c->pretty_ctx->rev->sources))
return 0;
@@ -1627,6 +1683,23 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
return 2;
}
+ if (skip_prefix(placeholder, "(decorate", &arg)) {
+ struct decoration_options opts = { NULL };
+ size_t ret = 0;
+
+ if (*arg == ':') {
+ arg++;
+ parse_decoration_options(&arg, &opts);
+ }
+ if (*arg == ')') {
+ format_decorations(sb, commit, c->auto_color, &opts);
+ ret = arg - placeholder + 1;
+ }
+
+ free_decoration_options(&opts);
+ return ret;
+ }
+
/* For the rest we have to parse the commit header. */
if (!c->commit_header_parsed) {
msg = c->message =
@@ -1804,7 +1877,7 @@ static size_t format_and_pad_commit(struct strbuf *sb, /* in UTF-8 */
static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
const char *placeholder,
- void *context)
+ struct format_commit_context *context)
{
size_t consumed, orig_len;
enum {
@@ -1843,10 +1916,10 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
}
orig_len = sb->len;
- if (((struct format_commit_context *)context)->flush_type != no_flush)
- consumed = format_and_pad_commit(sb, placeholder, context);
- else
+ if (context->flush_type == no_flush)
consumed = format_commit_one(sb, placeholder, context);
+ else
+ consumed = format_and_pad_commit(sb, placeholder, context);
if (magic == NO_MAGIC)
return consumed;
@@ -1862,41 +1935,34 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
return consumed + 1;
}
-static size_t userformat_want_item(struct strbuf *sb UNUSED,
- const char *placeholder,
- void *context)
-{
- struct userformat_want *w = context;
-
- if (*placeholder == '+' || *placeholder == '-' || *placeholder == ' ')
- placeholder++;
-
- switch (*placeholder) {
- case 'N':
- w->notes = 1;
- break;
- case 'S':
- w->source = 1;
- break;
- case 'd':
- case 'D':
- w->decorate = 1;
- break;
- }
- return 0;
-}
-
void userformat_find_requirements(const char *fmt, struct userformat_want *w)
{
- struct strbuf dummy = STRBUF_INIT;
-
if (!fmt) {
if (!user_format)
return;
fmt = user_format;
}
- strbuf_expand(&dummy, fmt, userformat_want_item, w);
- strbuf_release(&dummy);
+ while ((fmt = strchr(fmt, '%'))) {
+ fmt++;
+ if (skip_prefix(fmt, "%", &fmt))
+ continue;
+
+ if (*fmt == '+' || *fmt == '-' || *fmt == ' ')
+ fmt++;
+
+ switch (*fmt) {
+ case 'N':
+ w->notes = 1;
+ break;
+ case 'S':
+ w->source = 1;
+ break;
+ case 'd':
+ case 'D':
+ w->decorate = 1;
+ break;
+ }
+ }
}
void repo_format_commit_message(struct repository *r,
@@ -1913,7 +1979,16 @@ void repo_format_commit_message(struct repository *r,
const char *output_enc = pretty_ctx->output_encoding;
const char *utf8 = "UTF-8";
- strbuf_expand(sb, format, format_commit_item, &context);
+ while (strbuf_expand_step(sb, &format)) {
+ size_t len;
+
+ if (skip_prefix(format, "%", &format))
+ strbuf_addch(sb, '%');
+ else if ((len = format_commit_item(sb, format, &context)))
+ format += len;
+ else
+ strbuf_addch(sb, '%');
+ }
rewrap_message_tail(sb, &context, 0, 0, 0);
/*
diff --git a/prio-queue.c b/prio-queue.c
index dc2476be53..450775a374 100644
--- a/prio-queue.c
+++ b/prio-queue.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "prio-queue.h"
static inline int compare(struct prio_queue *queue, int i, int j)
diff --git a/promisor-remote.c b/promisor-remote.c
index 1adcd6fb0a..ac3aa1e365 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "promisor-remote.h"
#include "config.h"
#include "trace2.h"
@@ -100,7 +100,9 @@ static void promisor_remote_move_to_tail(struct promisor_remote_config *config,
config->promisors_tail = &r->next;
}
-static int promisor_remote_config(const char *var, const char *value, void *data)
+static int promisor_remote_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *data)
{
struct promisor_remote_config *config = data;
const char *name;
diff --git a/protocol-caps.c b/protocol-caps.c
index a90c48852e..808a68c974 100644
--- a/protocol-caps.c
+++ b/protocol-caps.c
@@ -7,7 +7,7 @@
#include "hash-ll.h"
#include "hex.h"
#include "object.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "string-list.h"
#include "strbuf.h"
diff --git a/prune-packed.c b/prune-packed.c
index 58412b4fb9..e54daf740a 100644
--- a/prune-packed.c
+++ b/prune-packed.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "environment.h"
#include "gettext.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
#include "progress.h"
#include "prune-packed.h"
diff --git a/quote.c b/quote.c
index 43c739671e..3c05194496 100644
--- a/quote.c
+++ b/quote.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "path.h"
#include "quote.h"
#include "strbuf.h"
diff --git a/range-diff.c b/range-diff.c
index 6a704e6f47..ca5493984a 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -13,6 +13,7 @@
#include "commit.h"
#include "pager.h"
#include "pretty.h"
+#include "repository.h"
#include "userdiff.h"
#include "apply.h"
#include "revision.h"
@@ -229,16 +230,19 @@ cleanup:
}
static int patch_util_cmp(const void *cmp_data UNUSED,
- const struct patch_util *a,
- const struct patch_util *b,
- const char *keydata)
+ const struct hashmap_entry *ha,
+ const struct hashmap_entry *hb,
+ const void *keydata)
{
+ const struct patch_util
+ *a = container_of(ha, const struct patch_util, e),
+ *b = container_of(hb, const struct patch_util, e);
return strcmp(a->diff, keydata ? keydata : b->diff);
}
static void find_exact_matches(struct string_list *a, struct string_list *b)
{
- struct hashmap map = HASHMAP_INIT((hashmap_cmp_fn)patch_util_cmp, NULL);
+ struct hashmap map = HASHMAP_INIT(patch_util_cmp, NULL);
int i;
/* First, add the patches of a to a hash map */
diff --git a/reachable.c b/reachable.c
index 60a7336b87..0ce8f83e56 100644
--- a/reachable.c
+++ b/reachable.c
@@ -13,7 +13,7 @@
#include "list-objects.h"
#include "packfile.h"
#include "worktree.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pack-bitmap.h"
#include "pack-mtimes.h"
#include "config.h"
diff --git a/cache.h b/read-cache-ll.h
index bdedb87e83..9a1a7edc5a 100644
--- a/cache.h
+++ b/read-cache-ll.h
@@ -1,11 +1,8 @@
-#ifndef CACHE_H
-#define CACHE_H
+#ifndef READ_CACHE_LL_H
+#define READ_CACHE_LL_H
-#include "git-compat-util.h"
-#include "strbuf.h"
+#include "hash-ll.h"
#include "hashmap.h"
-#include "pathspec.h"
-#include "object.h"
#include "statinfo.h"
/*
@@ -126,42 +123,6 @@ static inline unsigned create_ce_flags(unsigned stage)
#define ce_mark_uptodate(ce) ((ce)->ce_flags |= CE_UPTODATE)
#define ce_intent_to_add(ce) ((ce)->ce_flags & CE_INTENT_TO_ADD)
-static inline unsigned int ce_mode_from_stat(const struct cache_entry *ce,
- unsigned int mode)
-{
- extern int trust_executable_bit, has_symlinks;
- if (!has_symlinks && S_ISREG(mode) &&
- ce && S_ISLNK(ce->ce_mode))
- return ce->ce_mode;
- if (!trust_executable_bit && S_ISREG(mode)) {
- if (ce && S_ISREG(ce->ce_mode))
- return ce->ce_mode;
- return create_ce_mode(0666);
- }
- return create_ce_mode(mode);
-}
-static inline int ce_to_dtype(const struct cache_entry *ce)
-{
- unsigned ce_mode = ntohl(ce->ce_mode);
- if (S_ISREG(ce_mode))
- return DT_REG;
- else if (S_ISDIR(ce_mode) || S_ISGITLINK(ce_mode))
- return DT_DIR;
- else if (S_ISLNK(ce_mode))
- return DT_LNK;
- else
- return DT_UNKNOWN;
-}
-
-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 */
@@ -245,12 +206,6 @@ struct index_state {
void index_state_init(struct index_state *istate, struct repository *r);
void release_index(struct index_state *istate);
-/* Name hashing */
-int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
-void add_name_hash(struct index_state *istate, struct cache_entry *ce);
-void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
-void free_name_hash(struct index_state *istate);
-
/* Cache entry creation and cleanup */
/*
@@ -318,31 +273,14 @@ typedef int (*must_prefetch_predicate)(const struct cache_entry *);
void prefetch_cache_entries(const struct index_state *istate,
must_prefetch_predicate must_prefetch);
-#ifdef USE_THE_INDEX_VARIABLE
-extern struct index_state the_index;
-#endif
-
-#define INIT_DB_QUIET 0x0001
-#define INIT_DB_EXIST_OK 0x0002
-
-int init_db(const char *git_dir, const char *real_git_dir,
- const char *template_dir, int hash_algo,
- const char *initial_branch, unsigned int flags);
-void initialize_repository_version(int hash_algo, int reinit);
-
/* Initialize and use the cache information */
struct lock_file;
-void preload_index(struct index_state *index,
- const struct pathspec *pathspec,
- unsigned int refresh_flags);
int do_read_index(struct index_state *istate, const char *path,
int must_exist); /* for testting only! */
int read_index_from(struct index_state *, const char *path,
const char *gitdir);
int is_index_unborn(struct index_state *);
-void ensure_full_index(struct index_state *istate);
-
/* For use with `write_locked_index()`. */
#define COMMIT_LOCK (1 << 0)
#define SKIP_IF_UNCHANGED (1 << 1)
@@ -385,9 +323,6 @@ int repo_index_has_changes(struct repository *repo,
int verify_path(const char *path, unsigned mode);
int strcmp_offset(const char *s1, const char *s2, size_t *first_change);
-int index_dir_exists(struct index_state *istate, const char *name, int namelen);
-void adjust_dirname_case(struct index_state *istate, char *name);
-struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
/*
* Searches for an entry defined by name and namelen in the given index.
@@ -496,19 +431,6 @@ int has_racy_timestamp(struct index_state *istate);
int ie_match_stat(struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
int ie_modified(struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
-/*
- * Record to sd the data from st that we use to check whether a file
- * might have changed.
- */
-void fill_stat_data(struct stat_data *sd, struct stat *st);
-
-/*
- * Return 0 if st is consistent with a file not having been changed
- * since sd was filled. If there are differences, return a
- * combination of MTIME_CHANGED, CTIME_CHANGED, OWNER_CHANGED,
- * INODE_CHANGED, and DATA_CHANGED.
- */
-int match_stat_data(const struct stat_data *sd, struct stat *st);
int match_stat_data_racy(const struct index_state *istate,
const struct stat_data *sd, struct stat *st);
@@ -547,69 +469,13 @@ void set_alternate_index_output(const char *);
extern int verify_index_checksum;
extern int verify_ce_order;
-#define MTIME_CHANGED 0x0001
-#define CTIME_CHANGED 0x0002
-#define OWNER_CHANGED 0x0004
-#define MODE_CHANGED 0x0008
-#define INODE_CHANGED 0x0010
-#define DATA_CHANGED 0x0020
-#define TYPE_CHANGED 0x0040
-
int cmp_cache_name_compare(const void *a_, const void *b_);
-/* add */
-/*
- * return 0 if success, 1 - if addition of a file failed and
- * ADD_FILES_IGNORE_ERRORS was specified in flags
- */
-int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int flags);
+int add_files_to_cache(struct repository *repo, const char *prefix,
+ const struct pathspec *pathspec, int include_sparse,
+ int flags);
-/* diff.c */
-extern int diff_auto_refresh_index;
-
-/* ls-files */
void overlay_tree_on_index(struct index_state *istate,
const char *tree_name, const char *prefix);
-/* merge.c */
-struct commit_list;
-int try_merge_command(struct repository *r,
- const char *strategy, size_t xopts_nr,
- const char **xopts, struct commit_list *common,
- const char *head_arg, struct commit_list *remotes);
-int checkout_fast_forward(struct repository *r,
- const struct object_id *from,
- const struct object_id *to,
- int overwrite_ignore);
-
-
-int sane_execvp(const char *file, char *const argv[]);
-
-/*
- * A struct to encapsulate the concept of whether a file has changed
- * since we last checked it. This uses criteria similar to those used
- * for the index.
- */
-struct stat_validity {
- struct stat_data *sd;
-};
-
-void stat_validity_clear(struct stat_validity *sv);
-
-/*
- * Returns 1 if the path is a regular file (or a symlink to a regular
- * file) and matches the saved stat_validity, 0 otherwise. A missing
- * or inaccessible file is considered a match if the struct was just
- * initialized, or if the previous update found an inaccessible file.
- */
-int stat_validity_check(struct stat_validity *sv, const char *path);
-
-/*
- * Update the stat_validity from a file opened at descriptor fd. If
- * the file is missing, inaccessible, or not a regular file, then
- * future calls to stat_validity_check will match iff one of those
- * conditions continues to be true.
- */
-void stat_validity_update(struct stat_validity *sv, int fd);
-
-#endif /* CACHE_H */
+#endif /* READ_CACHE_LL_H */
diff --git a/read-cache.c b/read-cache.c
index f4c31a68c8..080bd39713 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -3,8 +3,8 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
+#include "bulk-checkin.h"
#include "config.h"
#include "date.h"
#include "diff.h"
@@ -16,7 +16,7 @@
#include "refs.h"
#include "dir.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oid-array.h"
#include "tree.h"
#include "commit.h"
@@ -24,8 +24,13 @@
#include "environment.h"
#include "gettext.h"
#include "mem-pool.h"
+#include "name-hash.h"
#include "object-name.h"
+#include "path.h"
+#include "preload-index.h"
+#include "read-cache.h"
#include "resolve-undo.h"
+#include "revision.h"
#include "run-command.h"
#include "strbuf.h"
#include "trace2.h"
@@ -40,7 +45,6 @@
#include "csum-file.h"
#include "promisor-remote.h"
#include "hook.h"
-#include "wrapper.h"
/* Mask for the name length in ce_flags in the on-disk index */
@@ -175,61 +179,6 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
add_index_entry(istate, new_entry, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
}
-void fill_stat_data(struct stat_data *sd, struct stat *st)
-{
- sd->sd_ctime.sec = (unsigned int)st->st_ctime;
- sd->sd_mtime.sec = (unsigned int)st->st_mtime;
- sd->sd_ctime.nsec = ST_CTIME_NSEC(*st);
- sd->sd_mtime.nsec = ST_MTIME_NSEC(*st);
- sd->sd_dev = st->st_dev;
- sd->sd_ino = st->st_ino;
- sd->sd_uid = st->st_uid;
- sd->sd_gid = st->st_gid;
- sd->sd_size = st->st_size;
-}
-
-int match_stat_data(const struct stat_data *sd, struct stat *st)
-{
- int changed = 0;
-
- if (sd->sd_mtime.sec != (unsigned int)st->st_mtime)
- changed |= MTIME_CHANGED;
- if (trust_ctime && check_stat &&
- sd->sd_ctime.sec != (unsigned int)st->st_ctime)
- changed |= CTIME_CHANGED;
-
-#ifdef USE_NSEC
- if (check_stat && sd->sd_mtime.nsec != ST_MTIME_NSEC(*st))
- changed |= MTIME_CHANGED;
- if (trust_ctime && check_stat &&
- sd->sd_ctime.nsec != ST_CTIME_NSEC(*st))
- changed |= CTIME_CHANGED;
-#endif
-
- if (check_stat) {
- if (sd->sd_uid != (unsigned int) st->st_uid ||
- sd->sd_gid != (unsigned int) st->st_gid)
- changed |= OWNER_CHANGED;
- if (sd->sd_ino != (unsigned int) st->st_ino)
- changed |= INODE_CHANGED;
- }
-
-#ifdef USE_STDEV
- /*
- * st_dev breaks on network filesystems where different
- * clients will have different views of what "device"
- * the filesystem is on
- */
- if (check_stat && sd->sd_dev != (unsigned int) st->st_dev)
- changed |= INODE_CHANGED;
-#endif
-
- if (sd->sd_size != (unsigned int) st->st_size)
- changed |= DATA_CHANGED;
-
- return changed;
-}
-
/*
* This only updates the "non-critical" parts of the directory
* cache, ie the parts that aren't tracked by GIT, and only used
@@ -2285,6 +2234,7 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)
if (fd < 0) {
if (!must_exist && errno == ENOENT) {
set_new_index_sparsity(istate);
+ istate->initialized = 1;
return 0;
}
die_errno(_("%s: index file open failed"), path);
@@ -2454,12 +2404,14 @@ int read_index_from(struct index_state *istate, const char *path,
base_oid_hex = oid_to_hex(&split_index->base_oid);
base_path = xstrfmt("%s/sharedindex.%s", gitdir, base_oid_hex);
- trace2_region_enter_printf("index", "shared/do_read_index",
- the_repository, "%s", base_path);
- ret = do_read_index(split_index->base, base_path, 0);
- trace2_region_leave_printf("index", "shared/do_read_index",
- the_repository, "%s", base_path);
- if (!ret) {
+ if (file_exists(base_path)) {
+ trace2_region_enter_printf("index", "shared/do_read_index",
+ the_repository, "%s", base_path);
+
+ ret = do_read_index(split_index->base, base_path, 0);
+ trace2_region_leave_printf("index", "shared/do_read_index",
+ the_repository, "%s", base_path);
+ } else {
char *path_copy = xstrdup(path);
char *base_path2 = xstrfmt("%s/sharedindex.%s",
dirname(path_copy), base_oid_hex);
@@ -3534,35 +3486,6 @@ void *read_blob_data_from_index(struct index_state *istate,
return data;
}
-void stat_validity_clear(struct stat_validity *sv)
-{
- FREE_AND_NULL(sv->sd);
-}
-
-int stat_validity_check(struct stat_validity *sv, const char *path)
-{
- struct stat st;
-
- if (stat(path, &st) < 0)
- return sv->sd == NULL;
- if (!sv->sd)
- return 0;
- return S_ISREG(st.st_mode) && !match_stat_data(sv->sd, &st);
-}
-
-void stat_validity_update(struct stat_validity *sv, int fd)
-{
- struct stat st;
-
- if (fstat(fd, &st) < 0 || !S_ISREG(st.st_mode))
- stat_validity_clear(sv);
- else {
- if (!sv->sd)
- CALLOC_ARRAY(sv->sd, 1);
- fill_stat_data(sv->sd, &st);
- }
-}
-
void move_index_extensions(struct index_state *dst, struct index_state *src)
{
dst->untracked = src->untracked;
@@ -3806,3 +3729,240 @@ void prefetch_cache_entries(const struct index_state *istate,
to_fetch.oid, to_fetch.nr);
oid_array_clear(&to_fetch);
}
+
+static int read_one_entry_opt(struct index_state *istate,
+ const struct object_id *oid,
+ struct strbuf *base,
+ const char *pathname,
+ unsigned mode, int opt)
+{
+ int len;
+ struct cache_entry *ce;
+
+ if (S_ISDIR(mode))
+ return READ_TREE_RECURSIVE;
+
+ len = strlen(pathname);
+ ce = make_empty_cache_entry(istate, base->len + len);
+
+ ce->ce_mode = create_ce_mode(mode);
+ ce->ce_flags = create_ce_flags(1);
+ ce->ce_namelen = base->len + len;
+ memcpy(ce->name, base->buf, base->len);
+ memcpy(ce->name + base->len, pathname, len+1);
+ oidcpy(&ce->oid, oid);
+ return add_index_entry(istate, ce, opt);
+}
+
+static int read_one_entry(const struct object_id *oid, struct strbuf *base,
+ const char *pathname, unsigned mode,
+ void *context)
+{
+ struct index_state *istate = context;
+ return read_one_entry_opt(istate, oid, base, pathname,
+ mode,
+ ADD_CACHE_OK_TO_ADD|ADD_CACHE_SKIP_DFCHECK);
+}
+
+/*
+ * This is used when the caller knows there is no existing entries at
+ * the stage that will conflict with the entry being added.
+ */
+static int read_one_entry_quick(const struct object_id *oid, struct strbuf *base,
+ const char *pathname, unsigned mode,
+ void *context)
+{
+ struct index_state *istate = context;
+ return read_one_entry_opt(istate, oid, base, pathname,
+ mode, ADD_CACHE_JUST_APPEND);
+}
+
+/*
+ * Read the tree specified with --with-tree option
+ * (typically, HEAD) into stage #1 and then
+ * squash them down to stage #0. This is used for
+ * --error-unmatch to list and check the path patterns
+ * that were given from the command line. We are not
+ * going to write this index out.
+ */
+void overlay_tree_on_index(struct index_state *istate,
+ const char *tree_name, const char *prefix)
+{
+ struct tree *tree;
+ struct object_id oid;
+ struct pathspec pathspec;
+ struct cache_entry *last_stage0 = NULL;
+ int i;
+ read_tree_fn_t fn = NULL;
+ int err;
+
+ if (repo_get_oid(the_repository, tree_name, &oid))
+ die("tree-ish %s not found.", tree_name);
+ tree = parse_tree_indirect(&oid);
+ if (!tree)
+ die("bad tree-ish %s", tree_name);
+
+ /* Hoist the unmerged entries up to stage #3 to make room */
+ /* TODO: audit for interaction with sparse-index. */
+ ensure_full_index(istate);
+ for (i = 0; i < istate->cache_nr; i++) {
+ struct cache_entry *ce = istate->cache[i];
+ if (!ce_stage(ce))
+ continue;
+ ce->ce_flags |= CE_STAGEMASK;
+ }
+
+ if (prefix) {
+ static const char *(matchbuf[1]);
+ matchbuf[0] = NULL;
+ parse_pathspec(&pathspec, PATHSPEC_ALL_MAGIC,
+ PATHSPEC_PREFER_CWD, prefix, matchbuf);
+ } else
+ memset(&pathspec, 0, sizeof(pathspec));
+
+ /*
+ * See if we have cache entry at the stage. If so,
+ * do it the original slow way, otherwise, append and then
+ * sort at the end.
+ */
+ for (i = 0; !fn && i < istate->cache_nr; i++) {
+ const struct cache_entry *ce = istate->cache[i];
+ if (ce_stage(ce) == 1)
+ fn = read_one_entry;
+ }
+
+ if (!fn)
+ fn = read_one_entry_quick;
+ err = read_tree(the_repository, tree, &pathspec, fn, istate);
+ clear_pathspec(&pathspec);
+ if (err)
+ die("unable to read tree entries %s", tree_name);
+
+ /*
+ * Sort the cache entry -- we need to nuke the cache tree, though.
+ */
+ if (fn == read_one_entry_quick) {
+ cache_tree_free(&istate->cache_tree);
+ QSORT(istate->cache, istate->cache_nr, cmp_cache_name_compare);
+ }
+
+ for (i = 0; i < istate->cache_nr; i++) {
+ struct cache_entry *ce = istate->cache[i];
+ switch (ce_stage(ce)) {
+ case 0:
+ last_stage0 = ce;
+ /* fallthru */
+ default:
+ continue;
+ case 1:
+ /*
+ * If there is stage #0 entry for this, we do not
+ * need to show it. We use CE_UPDATE bit to mark
+ * such an entry.
+ */
+ if (last_stage0 &&
+ !strcmp(last_stage0->name, ce->name))
+ ce->ce_flags |= CE_UPDATE;
+ }
+ }
+}
+
+struct update_callback_data {
+ struct index_state *index;
+ int include_sparse;
+ int flags;
+ int add_errors;
+};
+
+static int fix_unmerged_status(struct diff_filepair *p,
+ struct update_callback_data *data)
+{
+ if (p->status != DIFF_STATUS_UNMERGED)
+ return p->status;
+ if (!(data->flags & ADD_CACHE_IGNORE_REMOVAL) && !p->two->mode)
+ /*
+ * This is not an explicit add request, and the
+ * path is missing from the working tree (deleted)
+ */
+ return DIFF_STATUS_DELETED;
+ else
+ /*
+ * Either an explicit add request, or path exists
+ * in the working tree. An attempt to explicitly
+ * add a path that does not exist in the working tree
+ * will be caught as an error by the caller immediately.
+ */
+ return DIFF_STATUS_MODIFIED;
+}
+
+static void update_callback(struct diff_queue_struct *q,
+ struct diff_options *opt UNUSED, void *cbdata)
+{
+ int i;
+ struct update_callback_data *data = cbdata;
+
+ for (i = 0; i < q->nr; i++) {
+ struct diff_filepair *p = q->queue[i];
+ const char *path = p->one->path;
+
+ if (!data->include_sparse &&
+ !path_in_sparse_checkout(path, data->index))
+ continue;
+
+ switch (fix_unmerged_status(p, data)) {
+ default:
+ die(_("unexpected diff status %c"), p->status);
+ case DIFF_STATUS_MODIFIED:
+ case DIFF_STATUS_TYPE_CHANGED:
+ if (add_file_to_index(data->index, path, data->flags)) {
+ if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
+ die(_("updating files failed"));
+ data->add_errors++;
+ }
+ break;
+ case DIFF_STATUS_DELETED:
+ if (data->flags & ADD_CACHE_IGNORE_REMOVAL)
+ break;
+ if (!(data->flags & ADD_CACHE_PRETEND))
+ remove_file_from_index(data->index, path);
+ if (data->flags & (ADD_CACHE_PRETEND|ADD_CACHE_VERBOSE))
+ printf(_("remove '%s'\n"), path);
+ break;
+ }
+ }
+}
+
+int add_files_to_cache(struct repository *repo, const char *prefix,
+ const struct pathspec *pathspec, int include_sparse,
+ int flags)
+{
+ struct update_callback_data data;
+ struct rev_info rev;
+
+ memset(&data, 0, sizeof(data));
+ data.index = repo->index;
+ data.include_sparse = include_sparse;
+ data.flags = flags;
+
+ repo_init_revisions(repo, &rev, prefix);
+ setup_revisions(0, NULL, &rev, NULL);
+ if (pathspec)
+ copy_pathspec(&rev.prune_data, pathspec);
+ rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;
+ rev.diffopt.format_callback = update_callback;
+ rev.diffopt.format_callback_data = &data;
+ rev.diffopt.flags.override_submodule_config = 1;
+ rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
+
+ /*
+ * Use an ODB transaction to optimize adding multiple objects.
+ * This function is invoked from commands other than 'add', which
+ * may not have their own transaction active.
+ */
+ begin_odb_transaction();
+ run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
+ end_odb_transaction();
+
+ release_revisions(&rev);
+ return !!data.add_errors;
+}
diff --git a/read-cache.h b/read-cache.h
new file mode 100644
index 0000000000..043da1f1aa
--- /dev/null
+++ b/read-cache.h
@@ -0,0 +1,45 @@
+#ifndef READ_CACHE_H
+#define READ_CACHE_H
+
+#include "read-cache-ll.h"
+#include "object.h"
+#include "pathspec.h"
+
+static inline unsigned int ce_mode_from_stat(const struct cache_entry *ce,
+ unsigned int mode)
+{
+ extern int trust_executable_bit, has_symlinks;
+ if (!has_symlinks && S_ISREG(mode) &&
+ ce && S_ISLNK(ce->ce_mode))
+ return ce->ce_mode;
+ if (!trust_executable_bit && S_ISREG(mode)) {
+ if (ce && S_ISREG(ce->ce_mode))
+ return ce->ce_mode;
+ return create_ce_mode(0666);
+ }
+ return create_ce_mode(mode);
+}
+
+static inline int ce_to_dtype(const struct cache_entry *ce)
+{
+ unsigned ce_mode = ntohl(ce->ce_mode);
+ if (S_ISREG(ce_mode))
+ return DT_REG;
+ else if (S_ISDIR(ce_mode) || S_ISGITLINK(ce_mode))
+ return DT_DIR;
+ else if (S_ISLNK(ce_mode))
+ return DT_LNK;
+ else
+ return DT_UNKNOWN;
+}
+
+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));
+}
+
+#endif /* READ_CACHE_H */
diff --git a/rebase-interactive.c b/rebase-interactive.c
index 852a331318..d9718409b3 100644
--- a/rebase-interactive.c
+++ b/rebase-interactive.c
@@ -11,7 +11,6 @@
#include "config.h"
#include "dir.h"
#include "object-name.h"
-#include "wrapper.h"
static const char edit_todo_list_advice[] =
N_("You can fix this with 'git rebase --edit-todo' "
@@ -72,13 +71,14 @@ void append_todo_help(int command_count,
if (!edit_todo) {
strbuf_addch(buf, '\n');
- strbuf_commented_addf(buf, Q_("Rebase %s onto %s (%d command)",
- "Rebase %s onto %s (%d commands)",
- command_count),
+ strbuf_commented_addf(buf, comment_line_char,
+ Q_("Rebase %s onto %s (%d command)",
+ "Rebase %s onto %s (%d commands)",
+ command_count),
shortrevisions, shortonto, command_count);
}
- strbuf_add_commented_lines(buf, msg, strlen(msg));
+ strbuf_add_commented_lines(buf, msg, strlen(msg), comment_line_char);
if (get_missing_commit_check_level() == MISSING_COMMIT_CHECK_ERROR)
msg = _("\nDo not remove any line. Use 'drop' "
@@ -87,7 +87,7 @@ void append_todo_help(int command_count,
msg = _("\nIf you remove a line here "
"THAT COMMIT WILL BE LOST.\n");
- strbuf_add_commented_lines(buf, msg, strlen(msg));
+ strbuf_add_commented_lines(buf, msg, strlen(msg), comment_line_char);
if (edit_todo)
msg = _("\nYou are editing the todo file "
@@ -98,7 +98,7 @@ void append_todo_help(int command_count,
msg = _("\nHowever, if you remove everything, "
"the rebase will be aborted.\n\n");
- strbuf_add_commented_lines(buf, msg, strlen(msg));
+ strbuf_add_commented_lines(buf, msg, strlen(msg), comment_line_char);
}
int edit_todo_list(struct repository *r, struct todo_list *todo_list,
@@ -130,7 +130,7 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list,
if (launch_sequence_editor(todo_file, &new_todo->buf, NULL))
return -2;
- strbuf_stripspace(&new_todo->buf, 1);
+ strbuf_stripspace(&new_todo->buf, comment_line_char);
if (initial && new_todo->buf.len == 0)
return -3;
diff --git a/ref-filter.c b/ref-filter.c
index 4991cd4f7a..fae9f4b8ed 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1,14 +1,15 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
+#include "config.h"
#include "gpg-interface.h"
#include "hex.h"
#include "parse-options.h"
+#include "run-command.h"
#include "refs.h"
#include "wildmatch.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oid-array.h"
#include "repository.h"
#include "commit.h"
@@ -146,10 +147,12 @@ enum atom_type {
ATOM_TAGGERDATE,
ATOM_CREATOR,
ATOM_CREATORDATE,
+ ATOM_DESCRIBE,
ATOM_SUBJECT,
ATOM_BODY,
ATOM_TRAILERS,
ATOM_CONTENTS,
+ ATOM_SIGNATURE,
ATOM_RAW,
ATOM_UPSTREAM,
ATOM_PUSH,
@@ -215,6 +218,11 @@ static struct used_atom {
struct email_option {
enum { EO_RAW, EO_TRIM, EO_LOCALPART } option;
} email_option;
+ struct {
+ enum { S_BARE, S_GRADE, S_SIGNER, S_KEY,
+ S_FINGERPRINT, S_PRI_KEY_FP, S_TRUST_LEVEL } option;
+ } signature;
+ const char **describe_args;
struct refname_atom refname;
char *head;
} u;
@@ -251,6 +259,110 @@ static int err_bad_arg(struct strbuf *sb, const char *name, const char *arg)
return -1;
}
+/*
+ * Parse option of name "candidate" in the option string "to_parse" of
+ * the form
+ *
+ * "candidate1[=val1],candidate2[=val2],candidate3[=val3],..."
+ *
+ * The remaining part of "to_parse" is stored in "end" (if we are
+ * parsing the last candidate, then this is NULL) and the value of
+ * the candidate is stored in "valuestart" and its length in "valuelen",
+ * that is the portion after "=". Since it is possible for a "candidate"
+ * to not have a value, in such cases, "valuestart" is set to point to
+ * NULL and "valuelen" to 0.
+ *
+ * The function returns 1 on success. It returns 0 if we don't find
+ * "candidate" in "to_parse" or we find "candidate" but it is followed
+ * by more chars (for example, "candidatefoo"), that is, we don't find
+ * an exact match.
+ *
+ * This function only does the above for one "candidate" at a time. So
+ * it has to be called each time trying to parse a "candidate" in the
+ * option string "to_parse".
+ */
+static int match_atom_arg_value(const char *to_parse, const char *candidate,
+ const char **end, const char **valuestart,
+ size_t *valuelen)
+{
+ const char *atom;
+
+ if (!skip_prefix(to_parse, candidate, &atom))
+ return 0; /* definitely not "candidate" */
+
+ if (*atom == '=') {
+ /* we just saw "candidate=" */
+ *valuestart = atom + 1;
+ atom = strchrnul(*valuestart, ',');
+ *valuelen = atom - *valuestart;
+ } else if (*atom != ',' && *atom != '\0') {
+ /* key begins with "candidate" but has more chars */
+ return 0;
+ } else {
+ /* just "candidate" without "=val" */
+ *valuestart = NULL;
+ *valuelen = 0;
+ }
+
+ /* atom points at either the ',' or NUL after this key[=val] */
+ if (*atom == ',')
+ atom++;
+ else if (*atom)
+ BUG("Why is *atom not NULL yet?");
+
+ *end = atom;
+ return 1;
+}
+
+/*
+ * Parse boolean option of name "candidate" in the option list "to_parse"
+ * of the form
+ *
+ * "candidate1[=bool1],candidate2[=bool2],candidate3[=bool3],..."
+ *
+ * The remaining part of "to_parse" is stored in "end" (if we are parsing
+ * the last candidate, then this is NULL) and the value (if given) is
+ * parsed and stored in "val", so "val" always points to either 0 or 1.
+ * If the value is not given, then "val" is set to point to 1.
+ *
+ * The boolean value is parsed using "git_parse_maybe_bool()", so the
+ * accepted values are
+ *
+ * to set true - "1", "yes", "true"
+ * to set false - "0", "no", "false"
+ *
+ * This function returns 1 on success. It returns 0 when we don't find
+ * an exact match for "candidate" or when the boolean value given is
+ * not valid.
+ */
+static int match_atom_bool_arg(const char *to_parse, const char *candidate,
+ const char **end, int *val)
+{
+ const char *argval;
+ char *strval;
+ size_t arglen;
+ int v;
+
+ if (!match_atom_arg_value(to_parse, candidate, end, &argval, &arglen))
+ return 0;
+
+ if (!argval) {
+ *val = 1;
+ return 1;
+ }
+
+ strval = xstrndup(argval, arglen);
+ v = git_parse_maybe_bool(strval);
+ free(strval);
+
+ if (v == -1)
+ return 0;
+
+ *val = v;
+
+ return 1;
+}
+
static int color_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *color_value, struct strbuf *err)
{
@@ -407,6 +519,36 @@ static int subject_atom_parser(struct ref_format *format UNUSED,
return 0;
}
+static int parse_signature_option(const char *arg)
+{
+ if (!arg)
+ return S_BARE;
+ else if (!strcmp(arg, "signer"))
+ return S_SIGNER;
+ else if (!strcmp(arg, "grade"))
+ return S_GRADE;
+ else if (!strcmp(arg, "key"))
+ return S_KEY;
+ else if (!strcmp(arg, "fingerprint"))
+ return S_FINGERPRINT;
+ else if (!strcmp(arg, "primarykeyfingerprint"))
+ return S_PRI_KEY_FP;
+ else if (!strcmp(arg, "trustlevel"))
+ return S_TRUST_LEVEL;
+ return -1;
+}
+
+static int signature_atom_parser(struct ref_format *format UNUSED,
+ struct used_atom *atom,
+ const char *arg, struct strbuf *err)
+{
+ int opt = parse_signature_option(arg);
+ if (opt < 0)
+ return err_bad_arg(err, "signature", arg);
+ atom->u.signature.option = opt;
+ return 0;
+}
+
static int trailers_atom_parser(struct ref_format *format UNUSED,
struct used_atom *atom,
const char *arg, struct strbuf *err)
@@ -441,9 +583,10 @@ static int contents_atom_parser(struct ref_format *format, struct used_atom *ato
atom->u.contents.option = C_BARE;
else if (!strcmp(arg, "body"))
atom->u.contents.option = C_BODY;
- else if (!strcmp(arg, "size"))
+ else if (!strcmp(arg, "size")) {
+ atom->type = FIELD_ULONG;
atom->u.contents.option = C_LENGTH;
- else if (!strcmp(arg, "signature"))
+ } else if (!strcmp(arg, "signature"))
atom->u.contents.option = C_SIG;
else if (!strcmp(arg, "subject"))
atom->u.contents.option = C_SUB;
@@ -462,15 +605,97 @@ static int contents_atom_parser(struct ref_format *format, struct used_atom *ato
return 0;
}
+static int describe_atom_option_parser(struct strvec *args, const char **arg,
+ struct strbuf *err)
+{
+ const char *argval;
+ size_t arglen = 0;
+ int optval = 0;
+
+ if (match_atom_bool_arg(*arg, "tags", arg, &optval)) {
+ if (!optval)
+ strvec_push(args, "--no-tags");
+ else
+ strvec_push(args, "--tags");
+ return 1;
+ }
+
+ if (match_atom_arg_value(*arg, "abbrev", arg, &argval, &arglen)) {
+ char *endptr;
+
+ if (!arglen)
+ return strbuf_addf_ret(err, -1,
+ _("argument expected for %s"),
+ "describe:abbrev");
+ if (strtol(argval, &endptr, 10) < 0)
+ return strbuf_addf_ret(err, -1,
+ _("positive value expected %s=%s"),
+ "describe:abbrev", argval);
+ if (endptr - argval != arglen)
+ return strbuf_addf_ret(err, -1,
+ _("cannot fully parse %s=%s"),
+ "describe:abbrev", argval);
+
+ strvec_pushf(args, "--abbrev=%.*s", (int)arglen, argval);
+ return 1;
+ }
+
+ if (match_atom_arg_value(*arg, "match", arg, &argval, &arglen)) {
+ if (!arglen)
+ return strbuf_addf_ret(err, -1,
+ _("value expected %s="),
+ "describe:match");
+
+ strvec_pushf(args, "--match=%.*s", (int)arglen, argval);
+ return 1;
+ }
+
+ if (match_atom_arg_value(*arg, "exclude", arg, &argval, &arglen)) {
+ if (!arglen)
+ return strbuf_addf_ret(err, -1,
+ _("value expected %s="),
+ "describe:exclude");
+
+ strvec_pushf(args, "--exclude=%.*s", (int)arglen, argval);
+ return 1;
+ }
+
+ return 0;
+}
+
+static int describe_atom_parser(struct ref_format *format UNUSED,
+ struct used_atom *atom,
+ const char *arg, struct strbuf *err)
+{
+ struct strvec args = STRVEC_INIT;
+
+ for (;;) {
+ int found = 0;
+ const char *bad_arg = arg;
+
+ if (!arg || !*arg)
+ break;
+
+ found = describe_atom_option_parser(&args, &arg, err);
+ if (found < 0)
+ return found;
+ if (!found)
+ return err_bad_arg(err, "describe", bad_arg);
+ }
+ atom->u.describe_args = strvec_detach(&args);
+ return 0;
+}
+
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;
- else if (!strcmp(arg, "size"))
+ else if (!strcmp(arg, "size")) {
+ atom->type = FIELD_ULONG;
atom->u.raw_data.option = RAW_LENGTH;
- else
+ } else
return err_bad_arg(err, "raw", arg);
return 0;
}
@@ -597,7 +822,7 @@ static int if_atom_parser(struct ref_format *format UNUSED,
return 0;
}
-static int rest_atom_parser(struct ref_format *format,
+static int rest_atom_parser(struct ref_format *format UNUSED,
struct used_atom *atom UNUSED,
const char *arg, struct strbuf *err)
{
@@ -606,7 +831,8 @@ static int rest_atom_parser(struct ref_format *format,
return 0;
}
-static int ahead_behind_atom_parser(struct ref_format *format, struct used_atom *atom,
+static int ahead_behind_atom_parser(struct ref_format *format,
+ struct used_atom *atom UNUSED,
const char *arg, struct strbuf *err)
{
struct string_list_item *item;
@@ -664,10 +890,12 @@ static struct {
[ATOM_TAGGERDATE] = { "taggerdate", SOURCE_OBJ, FIELD_TIME },
[ATOM_CREATOR] = { "creator", SOURCE_OBJ },
[ATOM_CREATORDATE] = { "creatordate", SOURCE_OBJ, FIELD_TIME },
+ [ATOM_DESCRIBE] = { "describe", SOURCE_OBJ, FIELD_STR, describe_atom_parser },
[ATOM_SUBJECT] = { "subject", SOURCE_OBJ, FIELD_STR, subject_atom_parser },
[ATOM_BODY] = { "body", SOURCE_OBJ, FIELD_STR, body_atom_parser },
[ATOM_TRAILERS] = { "trailers", SOURCE_OBJ, FIELD_STR, trailers_atom_parser },
[ATOM_CONTENTS] = { "contents", SOURCE_OBJ, FIELD_STR, contents_atom_parser },
+ [ATOM_SIGNATURE] = { "signature", SOURCE_OBJ, FIELD_STR, signature_atom_parser },
[ATOM_RAW] = { "raw", SOURCE_OBJ, FIELD_STR, raw_atom_parser },
[ATOM_UPSTREAM] = { "upstream", SOURCE_NONE, FIELD_STR, remote_ref_atom_parser },
[ATOM_PUSH] = { "push", SOURCE_NONE, FIELD_STR, remote_ref_atom_parser },
@@ -1405,6 +1633,92 @@ static void grab_person(const char *who, struct atom_value *val, int deref, void
}
}
+static void grab_signature(struct atom_value *val, int deref, struct object *obj)
+{
+ int i;
+ struct commit *commit = (struct commit *) obj;
+ struct signature_check sigc = { 0 };
+ int signature_checked = 0;
+
+ for (i = 0; i < used_atom_cnt; i++) {
+ struct used_atom *atom = &used_atom[i];
+ const char *name = atom->name;
+ struct atom_value *v = &val[i];
+ int opt;
+
+ if (!!deref != (*name == '*'))
+ continue;
+ if (deref)
+ name++;
+
+ if (!skip_prefix(name, "signature", &name) ||
+ (*name && *name != ':'))
+ continue;
+ if (!*name)
+ name = NULL;
+ else
+ name++;
+
+ opt = parse_signature_option(name);
+ if (opt < 0)
+ continue;
+
+ if (!signature_checked) {
+ check_commit_signature(commit, &sigc);
+ signature_checked = 1;
+ }
+
+ switch (opt) {
+ case S_BARE:
+ v->s = xstrdup(sigc.output ? sigc.output: "");
+ break;
+ case S_SIGNER:
+ v->s = xstrdup(sigc.signer ? sigc.signer : "");
+ break;
+ case S_GRADE:
+ switch (sigc.result) {
+ case 'G':
+ switch (sigc.trust_level) {
+ case TRUST_UNDEFINED:
+ case TRUST_NEVER:
+ v->s = xstrfmt("%c", (char)'U');
+ break;
+ default:
+ v->s = xstrfmt("%c", (char)'G');
+ break;
+ }
+ break;
+ case 'B':
+ case 'E':
+ case 'N':
+ case 'X':
+ case 'Y':
+ case 'R':
+ v->s = xstrfmt("%c", (char)sigc.result);
+ break;
+ }
+ break;
+ case S_KEY:
+ v->s = xstrdup(sigc.key ? sigc.key : "");
+ break;
+ case S_FINGERPRINT:
+ v->s = xstrdup(sigc.fingerprint ?
+ sigc.fingerprint : "");
+ break;
+ case S_PRI_KEY_FP:
+ v->s = xstrdup(sigc.primary_key_fingerprint ?
+ sigc.primary_key_fingerprint : "");
+ break;
+ case S_TRUST_LEVEL:
+ v->s = xstrdup(gpg_trust_level_to_str(sigc.trust_level));
+ break;
+ }
+ }
+
+ if (signature_checked)
+ signature_check_clear(&sigc);
+}
+
static void find_subpos(const char *buf,
const char **sub, size_t *sublen,
const char **body, size_t *bodylen,
@@ -1483,6 +1797,44 @@ static void append_lines(struct strbuf *out, const char *buf, unsigned long size
}
}
+static void grab_describe_values(struct atom_value *val, int deref,
+ struct object *obj)
+{
+ struct commit *commit = (struct commit *)obj;
+ int i;
+
+ for (i = 0; i < used_atom_cnt; i++) {
+ struct used_atom *atom = &used_atom[i];
+ enum atom_type type = atom->atom_type;
+ const char *name = atom->name;
+ struct atom_value *v = &val[i];
+
+ struct child_process cmd = CHILD_PROCESS_INIT;
+ struct strbuf out = STRBUF_INIT;
+ struct strbuf err = STRBUF_INIT;
+
+ if (type != ATOM_DESCRIBE)
+ continue;
+
+ if (!!deref != (*name == '*'))
+ continue;
+
+ cmd.git_cmd = 1;
+ strvec_push(&cmd.args, "describe");
+ strvec_pushv(&cmd.args, atom->u.describe_args);
+ strvec_push(&cmd.args, oid_to_hex(&commit->object.oid));
+ if (pipe_command(&cmd, NULL, 0, &out, 0, &err, 0) < 0) {
+ error(_("failed to run 'describe'"));
+ v->s = xstrdup("");
+ continue;
+ }
+ strbuf_rtrim(&out);
+ v->s = strbuf_detach(&out, NULL);
+
+ strbuf_release(&err);
+ }
+}
+
/* See grab_values */
static void grab_sub_body_contents(struct atom_value *val, int deref, struct expand_data *data)
{
@@ -1509,7 +1861,8 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct exp
v->s = xmemdupz(buf, buf_size);
v->s_size = buf_size;
} else if (atom->u.raw_data.option == RAW_LENGTH) {
- v->s = xstrfmt("%"PRIuMAX, (uintmax_t)buf_size);
+ v->value = buf_size;
+ v->s = xstrfmt("%"PRIuMAX, v->value);
}
continue;
}
@@ -1535,9 +1888,10 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct exp
v->s = strbuf_detach(&sb, NULL);
} else if (atom->u.contents.option == C_BODY_DEP)
v->s = xmemdupz(bodypos, bodylen);
- else if (atom->u.contents.option == C_LENGTH)
- v->s = xstrfmt("%"PRIuMAX, (uintmax_t)strlen(subpos));
- else if (atom->u.contents.option == C_BODY)
+ else if (atom->u.contents.option == C_LENGTH) {
+ v->value = strlen(subpos);
+ v->s = xstrfmt("%"PRIuMAX, v->value);
+ } else if (atom->u.contents.option == C_BODY)
v->s = xmemdupz(bodypos, nonsiglen);
else if (atom->u.contents.option == C_SIG)
v->s = xmemdupz(sigpos, siglen);
@@ -1592,12 +1946,15 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, s
grab_tag_values(val, deref, obj);
grab_sub_body_contents(val, deref, data);
grab_person("tagger", val, deref, buf);
+ grab_describe_values(val, deref, obj);
break;
case OBJ_COMMIT:
grab_commit_values(val, deref, obj);
grab_sub_body_contents(val, deref, data);
grab_person("author", val, deref, buf);
grab_person("committer", val, deref, buf);
+ grab_signature(val, deref, obj);
+ grab_describe_values(val, deref, obj);
break;
case OBJ_TREE:
/* grab_tree_values(val, deref, obj, buf, sz); */
@@ -1914,6 +2271,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err)
v->s_size = ATOM_SIZE_UNSPECIFIED;
v->handler = append_atom;
+ v->value = 0;
v->atom = atom;
if (*name == '*') {
@@ -2104,12 +2462,12 @@ static int get_ref_atom_value(struct ref_array_item *ref, int atom,
* matches a pattern "refs/heads/mas") or a wildcard (e.g. the same ref
* matches "refs/heads/mas*", too).
*/
-static int match_pattern(const struct ref_filter *filter, const char *refname)
+static int match_pattern(const char **patterns, const char *refname,
+ int ignore_case)
{
- const char **patterns = filter->name_patterns;
unsigned flags = 0;
- if (filter->ignore_case)
+ if (ignore_case)
flags |= WM_CASEFOLD;
/*
@@ -2134,13 +2492,13 @@ static int match_pattern(const struct ref_filter *filter, const char *refname)
* matches a pattern "refs/heads/" but not "refs/heads/m") or a
* wildcard (e.g. the same ref matches "refs/heads/m*", too).
*/
-static int match_name_as_path(const struct ref_filter *filter, const char *refname)
+static int match_name_as_path(const char **pattern, const char *refname,
+ int ignore_case)
{
- const char **pattern = filter->name_patterns;
int namelen = strlen(refname);
unsigned flags = WM_PATHNAME;
- if (filter->ignore_case)
+ if (ignore_case)
flags |= WM_CASEFOLD;
for (; *pattern; pattern++) {
@@ -2165,8 +2523,20 @@ static int filter_pattern_match(struct ref_filter *filter, const char *refname)
if (!*filter->name_patterns)
return 1; /* No pattern always matches */
if (filter->match_as_path)
- return match_name_as_path(filter, refname);
- return match_pattern(filter, refname);
+ return match_name_as_path(filter->name_patterns, refname,
+ filter->ignore_case);
+ return match_pattern(filter->name_patterns, refname,
+ filter->ignore_case);
+}
+
+static int filter_exclude_match(struct ref_filter *filter, const char *refname)
+{
+ if (!filter->exclude.nr)
+ return 0;
+ if (filter->match_as_path)
+ return match_name_as_path(filter->exclude.v, refname,
+ filter->ignore_case);
+ return match_pattern(filter->exclude.v, refname, filter->ignore_case);
}
/*
@@ -2198,43 +2568,53 @@ static int for_each_fullref_in_pattern(struct ref_filter *filter,
if (!filter->name_patterns[0]) {
/* no patterns; we have to look at everything */
- return for_each_fullref_in("", cb, cb_data);
+ return refs_for_each_fullref_in(get_main_ref_store(the_repository),
+ "", filter->exclude.v, cb, cb_data);
}
return refs_for_each_fullref_in_prefixes(get_main_ref_store(the_repository),
NULL, filter->name_patterns,
+ filter->exclude.v,
cb, cb_data);
}
/*
* Given a ref (oid, refname), check if the ref belongs to the array
* of oids. If the given ref is a tag, check if the given tag points
- * at one of the oids in the given oid array.
+ * at one of the oids in the given oid array. Returns non-zero if a
+ * match is found.
+ *
* NEEDSWORK:
- * 1. Only a single level of indirection is obtained, we might want to
- * change this to account for multiple levels (e.g. annotated tags
- * pointing to annotated tags pointing to a commit.)
- * 2. As the refs are cached we might know what refname peels to without
+ * As the refs are cached we might know what refname peels to without
* the need to parse the object via parse_object(). peel_ref() might be a
* more efficient alternative to obtain the pointee.
*/
-static const struct object_id *match_points_at(struct oid_array *points_at,
- const struct object_id *oid,
- const char *refname)
+static int match_points_at(struct oid_array *points_at,
+ const struct object_id *oid,
+ const char *refname)
{
- const struct object_id *tagged_oid = NULL;
struct object *obj;
if (oid_array_lookup(points_at, oid) >= 0)
- return oid;
- obj = parse_object(the_repository, oid);
+ return 1;
+ obj = parse_object_with_flags(the_repository, oid,
+ PARSE_OBJECT_SKIP_HASH_CHECK);
+ while (obj && obj->type == OBJ_TAG) {
+ struct tag *tag = (struct tag *)obj;
+
+ if (parse_tag(tag) < 0) {
+ obj = NULL;
+ break;
+ }
+
+ if (oid_array_lookup(points_at, get_tagged_oid(tag)) >= 0)
+ return 1;
+
+ obj = tag->tagged;
+ }
if (!obj)
die(_("malformed object at '%s'"), refname);
- if (obj->type == OBJ_TAG)
- tagged_oid = get_tagged_oid((struct tag *)obj);
- if (tagged_oid && oid_array_lookup(points_at, tagged_oid) >= 0)
- return tagged_oid;
- return NULL;
+ return 0;
}
/*
@@ -2336,6 +2716,9 @@ static int ref_filter_handler(const char *refname, const struct object_id *oid,
if (!filter_pattern_match(filter, refname))
return 0;
+ if (filter_exclude_match(filter, refname))
+ return 0;
+
if (filter->points_at.nr && !match_points_at(&filter->points_at, oid, refname))
return 0;
@@ -2418,13 +2801,13 @@ void ref_array_clear(struct ref_array *array)
#define EXCLUDE_REACHED 0
#define INCLUDE_REACHED 1
static void reach_filter(struct ref_array *array,
- struct commit_list *check_reachable,
+ struct commit_list **check_reachable,
int include_reached)
{
int i, old_nr;
struct commit **to_clear;
- if (!check_reachable)
+ if (!*check_reachable)
return;
CALLOC_ARRAY(to_clear, array->nr);
@@ -2434,7 +2817,7 @@ static void reach_filter(struct ref_array *array,
}
tips_reachable_from_bases(the_repository,
- check_reachable,
+ *check_reachable,
to_clear, array->nr,
UNINTERESTING);
@@ -2455,8 +2838,8 @@ static void reach_filter(struct ref_array *array,
clear_commit_marks_many(old_nr, to_clear, ALL_REV_FLAGS);
- while (check_reachable) {
- struct commit *merge_commit = pop_commit(&check_reachable);
+ while (*check_reachable) {
+ struct commit *merge_commit = pop_commit(check_reachable);
clear_commit_marks(merge_commit, ALL_REV_FLAGS);
}
@@ -2553,8 +2936,8 @@ int filter_refs(struct ref_array *array, struct ref_filter *filter, unsigned int
clear_contains_cache(&ref_cbdata.no_contains_cache);
/* Filters that need revision walking */
- reach_filter(array, filter->reachable_from, INCLUDE_REACHED);
- reach_filter(array, filter->unreachable_from, EXCLUDE_REACHED);
+ reach_filter(array, &filter->reachable_from, INCLUDE_REACHED);
+ reach_filter(array, &filter->unreachable_from, EXCLUDE_REACHED);
save_commit_buffer = save_commit_buffer_orig;
return ret;
@@ -2866,3 +3249,20 @@ int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset)
return 0;
}
+
+void ref_filter_init(struct ref_filter *filter)
+{
+ struct ref_filter blank = REF_FILTER_INIT;
+ memcpy(filter, &blank, sizeof(blank));
+}
+
+void ref_filter_clear(struct ref_filter *filter)
+{
+ strvec_clear(&filter->exclude);
+ oid_array_clear(&filter->points_at);
+ free_commit_list(filter->with_commit);
+ free_commit_list(filter->no_commit);
+ free_commit_list(filter->reachable_from);
+ free_commit_list(filter->unreachable_from);
+ ref_filter_init(filter);
+}
diff --git a/ref-filter.h b/ref-filter.h
index 430701cfb7..1524bc463a 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -6,6 +6,7 @@
#include "refs.h"
#include "commit.h"
#include "string-list.h"
+#include "strvec.h"
/* Quoting styles */
#define QUOTE_NONE 0
@@ -59,6 +60,7 @@ struct ref_array {
struct ref_filter {
const char **name_patterns;
+ struct strvec exclude;
struct oid_array points_at;
struct commit_list *with_commit;
struct commit_list *no_commit;
@@ -92,6 +94,10 @@ struct ref_format {
struct string_list bases;
};
+#define REF_FILTER_INIT { \
+ .points_at = OID_ARRAY_INIT, \
+ .exclude = STRVEC_INIT, \
+}
#define REF_FORMAT_INIT { \
.use_color = -1, \
.bases = STRING_LIST_INIT_DUP, \
@@ -109,6 +115,9 @@ struct ref_format {
#define OPT_REF_SORT(var) \
OPT_STRING_LIST(0, "sort", (var), \
N_("key"), N_("field name to sort on"))
+#define OPT_REF_FILTER_EXCLUDE(var) \
+ OPT_STRVEC(0, "exclude", &(var)->exclude, \
+ N_("pattern"), N_("exclude refs which match pattern"))
/*
* API for filtering a set of refs. Based on the type of refs the user
@@ -167,4 +176,7 @@ void filter_ahead_behind(struct repository *r,
struct ref_format *format,
struct ref_array *array);
+void ref_filter_init(struct ref_filter *filter);
+void ref_filter_clear(struct ref_filter *filter);
+
#endif /* REF_FILTER_H */
diff --git a/reflog-walk.c b/reflog-walk.c
index 4ba1a10c82..d216f6f966 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -1,8 +1,8 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "commit.h"
#include "refs.h"
#include "diff.h"
+#include "repository.h"
#include "revision.h"
#include "string-list.h"
#include "reflog-walk.h"
diff --git a/reflog.c b/reflog.c
index ee1bf5d032..9ad50e7d93 100644
--- a/reflog.c
+++ b/reflog.c
@@ -1,6 +1,6 @@
#include "git-compat-util.h"
#include "gettext.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "reflog.h"
#include "refs.h"
#include "revision.h"
diff --git a/refs.c b/refs.c
index 881a0da65c..fcae5dddc6 100644
--- a/refs.c
+++ b/refs.c
@@ -4,7 +4,6 @@
#include "git-compat-util.h"
#include "advice.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "hashmap.h"
@@ -17,8 +16,9 @@
#include "run-command.h"
#include "hook.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "object.h"
+#include "path.h"
#include "tag.h"
#include "submodule.h"
#include "worktree.h"
@@ -28,7 +28,7 @@
#include "sigchain.h"
#include "date.h"
#include "commit.h"
-#include "wrapper.h"
+#include "wildmatch.h"
/*
* List of all available backends
@@ -375,8 +375,8 @@ char *resolve_refdup(const char *refname, int resolve_flags,
oid, flags);
}
-/* The argument to filter_refs */
-struct ref_filter {
+/* The argument to for_each_filter_refs */
+struct for_each_ref_filter {
const char *pattern;
const char *prefix;
each_ref_fn *fn;
@@ -409,10 +409,11 @@ int ref_exists(const char *refname)
return refs_ref_exists(get_main_ref_store(the_repository), refname);
}
-static int filter_refs(const char *refname, const struct object_id *oid,
- int flags, void *data)
+static int for_each_filter_refs(const char *refname,
+ const struct object_id *oid,
+ int flags, void *data)
{
- struct ref_filter *filter = (struct ref_filter *)data;
+ struct for_each_ref_filter *filter = data;
if (wildmatch(filter->pattern, refname, 0))
return 0;
@@ -569,7 +570,7 @@ int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
const char *prefix, void *cb_data)
{
struct strbuf real_pattern = STRBUF_INIT;
- struct ref_filter filter;
+ struct for_each_ref_filter filter;
int ret;
if (!prefix && !starts_with(pattern, "refs/"))
@@ -589,7 +590,7 @@ int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
filter.prefix = prefix;
filter.fn = fn;
filter.cb_data = cb_data;
- ret = for_each_ref(filter_refs, &filter);
+ ret = for_each_ref(for_each_filter_refs, &filter);
strbuf_release(&real_pattern);
return ret;
@@ -1426,7 +1427,7 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
}
int parse_hide_refs_config(const char *var, const char *value, const char *section,
- struct string_list *hide_refs)
+ struct strvec *hide_refs)
{
const char *key;
if (!strcmp("transfer.hiderefs", var) ||
@@ -1437,22 +1438,23 @@ int parse_hide_refs_config(const char *var, const char *value, const char *secti
if (!value)
return config_error_nonbool(var);
- ref = xstrdup(value);
+
+ /* drop const to remove trailing '/' characters */
+ ref = (char *)strvec_push(hide_refs, value);
len = strlen(ref);
while (len && ref[len - 1] == '/')
ref[--len] = '\0';
- string_list_append_nodup(hide_refs, ref);
}
return 0;
}
int ref_is_hidden(const char *refname, const char *refname_full,
- const struct string_list *hide_refs)
+ const struct strvec *hide_refs)
{
int i;
for (i = hide_refs->nr - 1; i >= 0; i--) {
- const char *match = hide_refs->items[i].string;
+ const char *match = hide_refs->v[i];
const char *subject;
int neg = 0;
const char *p;
@@ -1478,6 +1480,30 @@ int ref_is_hidden(const char *refname, const char *refname_full,
return 0;
}
+const char **hidden_refs_to_excludes(const struct strvec *hide_refs)
+{
+ const char **pattern;
+ for (pattern = hide_refs->v; *pattern; pattern++) {
+ /*
+ * We can't feed any excludes from hidden refs config
+ * sections, since later rules may override previous
+ * ones. For example, with rules "refs/foo" and
+ * "!refs/foo/bar", we should show "refs/foo/bar" (and
+ * everything underneath it), but the earlier exclusion
+ * would cause us to skip all of "refs/foo". We
+ * likewise don't implement the namespace stripping
+ * required for '^' rules.
+ *
+ * Both are possible to do, but complicated, so avoid
+ * populating the jump list at all if we see either of
+ * these patterns.
+ */
+ if (**pattern == '!' || **pattern == '^')
+ return NULL;
+ }
+ return hide_refs->v;
+}
+
const char *find_descendant_ref(const char *dirname,
const struct string_list *extras,
const struct string_list *skip)
@@ -1525,7 +1551,9 @@ int head_ref(each_ref_fn fn, void *cb_data)
struct ref_iterator *refs_ref_iterator_begin(
struct ref_store *refs,
- const char *prefix, int trim,
+ const char *prefix,
+ const char **exclude_patterns,
+ int trim,
enum do_for_each_ref_flags flags)
{
struct ref_iterator *iter;
@@ -1541,8 +1569,7 @@ struct ref_iterator *refs_ref_iterator_begin(
}
}
- iter = refs->be->iterator_begin(refs, prefix, flags);
-
+ iter = refs->be->iterator_begin(refs, prefix, exclude_patterns, flags);
/*
* `iterator_begin()` already takes care of prefix, but we
* might need to do some trimming:
@@ -1576,7 +1603,7 @@ static int do_for_each_repo_ref(struct repository *r, const char *prefix,
if (!refs)
return 0;
- iter = refs_ref_iterator_begin(refs, prefix, trim, flags);
+ iter = refs_ref_iterator_begin(refs, prefix, NULL, trim, flags);
return do_for_each_repo_ref_iterator(r, iter, fn, cb_data);
}
@@ -1586,7 +1613,7 @@ struct do_for_each_ref_help {
void *cb_data;
};
-static int do_for_each_ref_helper(struct repository *r,
+static int do_for_each_ref_helper(struct repository *r UNUSED,
const char *refname,
const struct object_id *oid,
int flags,
@@ -1598,6 +1625,7 @@ static int do_for_each_ref_helper(struct repository *r,
}
static int do_for_each_ref(struct ref_store *refs, const char *prefix,
+ const char **exclude_patterns,
each_ref_fn fn, int trim,
enum do_for_each_ref_flags flags, void *cb_data)
{
@@ -1607,7 +1635,8 @@ static int do_for_each_ref(struct ref_store *refs, const char *prefix,
if (!refs)
return 0;
- iter = refs_ref_iterator_begin(refs, prefix, trim, flags);
+ iter = refs_ref_iterator_begin(refs, prefix, exclude_patterns, trim,
+ flags);
return do_for_each_repo_ref_iterator(the_repository, iter,
do_for_each_ref_helper, &hp);
@@ -1615,7 +1644,7 @@ static int do_for_each_ref(struct ref_store *refs, const char *prefix,
int refs_for_each_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
{
- return do_for_each_ref(refs, "", fn, 0, 0, cb_data);
+ return do_for_each_ref(refs, "", NULL, fn, 0, 0, cb_data);
}
int for_each_ref(each_ref_fn fn, void *cb_data)
@@ -1626,7 +1655,7 @@ int for_each_ref(each_ref_fn fn, void *cb_data)
int refs_for_each_ref_in(struct ref_store *refs, const char *prefix,
each_ref_fn fn, void *cb_data)
{
- return do_for_each_ref(refs, prefix, fn, strlen(prefix), 0, cb_data);
+ return do_for_each_ref(refs, prefix, NULL, fn, strlen(prefix), 0, cb_data);
}
int for_each_ref_in(const char *prefix, each_ref_fn fn, void *cb_data)
@@ -1637,13 +1666,14 @@ int for_each_ref_in(const char *prefix, each_ref_fn fn, void *cb_data)
int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data)
{
return do_for_each_ref(get_main_ref_store(the_repository),
- prefix, fn, 0, 0, cb_data);
+ prefix, NULL, fn, 0, 0, cb_data);
}
int refs_for_each_fullref_in(struct ref_store *refs, const char *prefix,
+ const char **exclude_patterns,
each_ref_fn fn, void *cb_data)
{
- return do_for_each_ref(refs, prefix, fn, 0, 0, cb_data);
+ return do_for_each_ref(refs, prefix, exclude_patterns, fn, 0, 0, cb_data);
}
int for_each_replace_ref(struct repository *r, each_repo_ref_fn fn, void *cb_data)
@@ -1654,20 +1684,21 @@ int for_each_replace_ref(struct repository *r, each_repo_ref_fn fn, void *cb_dat
DO_FOR_EACH_INCLUDE_BROKEN, cb_data);
}
-int for_each_namespaced_ref(each_ref_fn fn, void *cb_data)
+int for_each_namespaced_ref(const char **exclude_patterns,
+ each_ref_fn fn, void *cb_data)
{
struct strbuf buf = STRBUF_INIT;
int ret;
strbuf_addf(&buf, "%srefs/", get_git_namespace());
ret = do_for_each_ref(get_main_ref_store(the_repository),
- buf.buf, fn, 0, 0, cb_data);
+ buf.buf, exclude_patterns, fn, 0, 0, cb_data);
strbuf_release(&buf);
return ret;
}
int refs_for_each_rawref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
{
- return do_for_each_ref(refs, "", fn, 0,
+ return do_for_each_ref(refs, "", NULL, fn, 0,
DO_FOR_EACH_INCLUDE_BROKEN, cb_data);
}
@@ -1737,6 +1768,7 @@ static void find_longest_prefixes(struct string_list *out,
int refs_for_each_fullref_in_prefixes(struct ref_store *ref_store,
const char *namespace,
const char **patterns,
+ const char **exclude_patterns,
each_ref_fn fn, void *cb_data)
{
struct string_list prefixes = STRING_LIST_INIT_DUP;
@@ -1752,7 +1784,8 @@ int refs_for_each_fullref_in_prefixes(struct ref_store *ref_store,
for_each_string_list_item(prefix, &prefixes) {
strbuf_addstr(&buf, prefix->string);
- ret = refs_for_each_fullref_in(ref_store, buf.buf, fn, cb_data);
+ ret = refs_for_each_fullref_in(ref_store, buf.buf,
+ exclude_patterns, fn, cb_data);
if (ret)
break;
strbuf_setlen(&buf, namespace_len);
@@ -2407,7 +2440,7 @@ int refs_verify_refname_available(struct ref_store *refs,
strbuf_addstr(&dirname, refname + dirname.len);
strbuf_addch(&dirname, '/');
- iter = refs_ref_iterator_begin(refs, dirname.buf, 0,
+ iter = refs_ref_iterator_begin(refs, dirname.buf, NULL, 0,
DO_FOR_EACH_INCLUDE_BROKEN);
while ((ok = ref_iterator_advance(iter)) == ITER_OK) {
if (skip &&
diff --git a/refs.h b/refs.h
index 933fdebe58..23211a5ea1 100644
--- a/refs.h
+++ b/refs.h
@@ -343,7 +343,12 @@ int for_each_ref(each_ref_fn fn, void *cb_data);
*/
int for_each_ref_in(const char *prefix, each_ref_fn fn, void *cb_data);
+/*
+ * references matching any pattern in "exclude_patterns" are omitted from the
+ * result set on a best-effort basis.
+ */
int refs_for_each_fullref_in(struct ref_store *refs, const char *prefix,
+ const char **exclude_patterns,
each_ref_fn fn, void *cb_data);
int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data);
@@ -351,10 +356,15 @@ int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data);
* iterate all refs in "patterns" by partitioning patterns into disjoint sets
* and iterating the longest-common prefix of each set.
*
+ * references matching any pattern in "exclude_patterns" are omitted from the
+ * result set on a best-effort basis.
+ *
* callers should be prepared to ignore references that they did not ask for.
*/
int refs_for_each_fullref_in_prefixes(struct ref_store *refs,
- const char *namespace, const char **patterns,
+ const char *namespace,
+ const char **patterns,
+ const char **exclude_patterns,
each_ref_fn fn, void *cb_data);
/**
@@ -372,7 +382,12 @@ int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
const char *prefix, void *cb_data);
int head_ref_namespaced(each_ref_fn fn, void *cb_data);
-int for_each_namespaced_ref(each_ref_fn fn, void *cb_data);
+/*
+ * references matching any pattern in "exclude_patterns" are omitted from the
+ * result set on a best-effort basis.
+ */
+int for_each_namespaced_ref(const char **exclude_patterns,
+ each_ref_fn fn, void *cb_data);
/* can be used to learn about broken ref and symref */
int refs_for_each_rawref(struct ref_store *refs, each_ref_fn fn, void *cb_data);
@@ -810,7 +825,7 @@ int update_ref(const char *msg, const char *refname,
unsigned int flags, enum action_on_err onerr);
int parse_hide_refs_config(const char *var, const char *value, const char *,
- struct string_list *);
+ struct strvec *);
/*
* Check whether a ref is hidden. If no namespace is set, both the first and
@@ -820,7 +835,13 @@ int parse_hide_refs_config(const char *var, const char *value, const char *,
* the ref is outside that namespace, the first parameter is NULL. The second
* parameter always points to the full ref name.
*/
-int ref_is_hidden(const char *, const char *, const struct string_list *);
+int ref_is_hidden(const char *, const char *, const struct strvec *);
+
+/*
+ * Returns an array of patterns to use as excluded_patterns, if none of the
+ * hidden references use the token '!' or '^'.
+ */
+const char **hidden_refs_to_excludes(const struct strvec *hide_refs);
/* Is this a per-worktree ref living in the refs/ namespace? */
int is_per_worktree_ref(const char *refname);
diff --git a/refs/debug.c b/refs/debug.c
index c0fa707a1d..b7ffc4ce67 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -229,11 +229,12 @@ static struct ref_iterator_vtable debug_ref_iterator_vtable = {
static struct ref_iterator *
debug_ref_iterator_begin(struct ref_store *ref_store, const char *prefix,
- unsigned int flags)
+ const char **exclude_patterns, unsigned int flags)
{
struct debug_ref_store *drefs = (struct debug_ref_store *)ref_store;
struct ref_iterator *res =
- drefs->refs->be->iterator_begin(drefs->refs, prefix, flags);
+ drefs->refs->be->iterator_begin(drefs->refs, prefix,
+ exclude_patterns, flags);
struct debug_ref_iterator *diter = xcalloc(1, sizeof(*diter));
base_ref_iterator_init(&diter->base, &debug_ref_iterator_vtable, 1);
diter->iter = res;
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 9a8333c0d0..341354182b 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1,4 +1,4 @@
-#include "../cache.h"
+#include "../git-compat-util.h"
#include "../config.h"
#include "../copy.h"
#include "../environment.h"
@@ -15,6 +15,7 @@
#include "../lockfile.h"
#include "../object.h"
#include "../object-file.h"
+#include "../path.h"
#include "../dir.h"
#include "../chdir-notify.h"
#include "../setup.h"
@@ -831,7 +832,8 @@ static struct ref_iterator_vtable files_ref_iterator_vtable = {
static struct ref_iterator *files_ref_iterator_begin(
struct ref_store *ref_store,
- const char *prefix, unsigned int flags)
+ const char *prefix, const char **exclude_patterns,
+ unsigned int flags)
{
struct files_ref_store *refs;
struct ref_iterator *loose_iter, *packed_iter, *overlay_iter;
@@ -876,7 +878,7 @@ static struct ref_iterator *files_ref_iterator_begin(
* the packed and loose references.
*/
packed_iter = refs_ref_iterator_begin(
- refs->packed_ref_store, prefix, 0,
+ refs->packed_ref_store, prefix, exclude_patterns, 0,
DO_FOR_EACH_INCLUDE_BROKEN);
overlay_iter = overlay_ref_iterator_begin(loose_iter, packed_iter);
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 291e53f5cf..59c78d7941 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -1,4 +1,4 @@
-#include "../cache.h"
+#include "../git-compat-util.h"
#include "../alloc.h"
#include "../config.h"
#include "../gettext.h"
@@ -10,8 +10,10 @@
#include "../iterator.h"
#include "../lockfile.h"
#include "../chdir-notify.h"
+#include "../statinfo.h"
#include "../wrapper.h"
#include "../write-or-die.h"
+#include "../trace2.h"
enum mmap_strategy {
/*
@@ -303,7 +305,8 @@ static int cmp_packed_ref_records(const void *v1, const void *v2)
* Compare a snapshot record at `rec` to the specified NUL-terminated
* refname.
*/
-static int cmp_record_to_refname(const char *rec, const char *refname)
+static int cmp_record_to_refname(const char *rec, const char *refname,
+ int start)
{
const char *r1 = rec + the_hash_algo->hexsz + 1;
const char *r2 = refname;
@@ -312,7 +315,7 @@ static int cmp_record_to_refname(const char *rec, const char *refname)
if (*r1 == '\n')
return *r2 ? -1 : 0;
if (!*r2)
- return 1;
+ return start ? 1 : -1;
if (*r1 != *r2)
return (unsigned char)*r1 < (unsigned char)*r2 ? -1 : +1;
r1++;
@@ -527,22 +530,9 @@ static int load_contents(struct snapshot *snapshot)
return 1;
}
-/*
- * Find the place in `snapshot->buf` where the start of the record for
- * `refname` starts. If `mustexist` is true and the reference doesn't
- * exist, then return NULL. If `mustexist` is false and the reference
- * doesn't exist, then return the point where that reference would be
- * inserted, or `snapshot->eof` (which might be NULL) if it would be
- * inserted at the end of the file. In the latter mode, `refname`
- * doesn't have to be a proper reference name; for example, one could
- * search for "refs/replace/" to find the start of any replace
- * references.
- *
- * The record is sought using a binary search, so `snapshot->buf` must
- * be sorted.
- */
-static const char *find_reference_location(struct snapshot *snapshot,
- const char *refname, int mustexist)
+static const char *find_reference_location_1(struct snapshot *snapshot,
+ const char *refname, int mustexist,
+ int start)
{
/*
* This is not *quite* a garden-variety binary search, because
@@ -572,7 +562,7 @@ static const char *find_reference_location(struct snapshot *snapshot,
mid = lo + (hi - lo) / 2;
rec = find_start_of_record(lo, mid);
- cmp = cmp_record_to_refname(rec, refname);
+ cmp = cmp_record_to_refname(rec, refname, start);
if (cmp < 0) {
lo = find_end_of_record(mid, hi);
} else if (cmp > 0) {
@@ -589,6 +579,41 @@ static const char *find_reference_location(struct snapshot *snapshot,
}
/*
+ * Find the place in `snapshot->buf` where the start of the record for
+ * `refname` starts. If `mustexist` is true and the reference doesn't
+ * exist, then return NULL. If `mustexist` is false and the reference
+ * doesn't exist, then return the point where that reference would be
+ * inserted, or `snapshot->eof` (which might be NULL) if it would be
+ * inserted at the end of the file. In the latter mode, `refname`
+ * doesn't have to be a proper reference name; for example, one could
+ * search for "refs/replace/" to find the start of any replace
+ * references.
+ *
+ * The record is sought using a binary search, so `snapshot->buf` must
+ * be sorted.
+ */
+static const char *find_reference_location(struct snapshot *snapshot,
+ const char *refname, int mustexist)
+{
+ return find_reference_location_1(snapshot, refname, mustexist, 1);
+}
+
+/*
+ * Find the place in `snapshot->buf` after the end of the record for
+ * `refname`. In other words, find the location of first thing *after*
+ * `refname`.
+ *
+ * Other semantics are identical to the ones in
+ * `find_reference_location()`.
+ */
+static const char *find_reference_location_end(struct snapshot *snapshot,
+ const char *refname,
+ int mustexist)
+{
+ return find_reference_location_1(snapshot, refname, mustexist, 0);
+}
+
+/*
* Create a newly-allocated `snapshot` of the `packed-refs` file in
* its current state and return it. The return value will already have
* its reference count incremented.
@@ -779,6 +804,13 @@ struct packed_ref_iterator {
/* The end of the part of the buffer that will be iterated over: */
const char *eof;
+ struct jump_list_entry {
+ const char *start;
+ const char *end;
+ } *jump;
+ size_t jump_nr, jump_alloc;
+ size_t jump_cur;
+
/* Scratch space for current values: */
struct object_id oid, peeled;
struct strbuf refname_buf;
@@ -796,14 +828,36 @@ struct packed_ref_iterator {
*/
static int next_record(struct packed_ref_iterator *iter)
{
- const char *p = iter->pos, *eol;
+ const char *p, *eol;
strbuf_reset(&iter->refname_buf);
+ /*
+ * If iter->pos is contained within a skipped region, jump past
+ * it.
+ *
+ * Note that each skipped region is considered at most once,
+ * since they are ordered based on their starting position.
+ */
+ while (iter->jump_cur < iter->jump_nr) {
+ struct jump_list_entry *curr = &iter->jump[iter->jump_cur];
+ if (iter->pos < curr->start)
+ break; /* not to the next jump yet */
+
+ iter->jump_cur++;
+ if (iter->pos < curr->end) {
+ iter->pos = curr->end;
+ trace2_counter_add(TRACE2_COUNTER_ID_PACKED_REFS_JUMPS, 1);
+ /* jumps are coalesced, so only one jump is necessary */
+ break;
+ }
+ }
+
if (iter->pos == iter->eof)
return ITER_DONE;
iter->base.flags = REF_ISPACKED;
+ p = iter->pos;
if (iter->eof - p < the_hash_algo->hexsz + 2 ||
parse_oid_hex(p, &iter->oid, &p) ||
@@ -911,6 +965,7 @@ static int packed_ref_iterator_abort(struct ref_iterator *ref_iterator)
int ok = ITER_DONE;
strbuf_release(&iter->refname_buf);
+ free(iter->jump);
release_snapshot(iter->snapshot);
base_ref_iterator_free(ref_iterator);
return ok;
@@ -922,9 +977,112 @@ static struct ref_iterator_vtable packed_ref_iterator_vtable = {
.abort = packed_ref_iterator_abort
};
+static int jump_list_entry_cmp(const void *va, const void *vb)
+{
+ const struct jump_list_entry *a = va;
+ const struct jump_list_entry *b = vb;
+
+ if (a->start < b->start)
+ return -1;
+ if (a->start > b->start)
+ return 1;
+ return 0;
+}
+
+static int has_glob_special(const char *str)
+{
+ const char *p;
+ for (p = str; *p; p++) {
+ if (is_glob_special(*p))
+ return 1;
+ }
+ return 0;
+}
+
+static void populate_excluded_jump_list(struct packed_ref_iterator *iter,
+ struct snapshot *snapshot,
+ const char **excluded_patterns)
+{
+ size_t i, j;
+ const char **pattern;
+ struct jump_list_entry *last_disjoint;
+
+ if (!excluded_patterns)
+ return;
+
+ for (pattern = excluded_patterns; *pattern; pattern++) {
+ struct jump_list_entry *e;
+ const char *start, *end;
+
+ /*
+ * We can't feed any excludes with globs in them to the
+ * refs machinery. It only understands prefix matching.
+ * We likewise can't even feed the string leading up to
+ * the first meta-character, as something like "foo[a]"
+ * should not exclude "foobar" (but the prefix "foo"
+ * would match that and mark it for exclusion).
+ */
+ if (has_glob_special(*pattern))
+ continue;
+
+ start = find_reference_location(snapshot, *pattern, 0);
+ end = find_reference_location_end(snapshot, *pattern, 0);
+
+ if (start == end)
+ continue; /* nothing to jump over */
+
+ ALLOC_GROW(iter->jump, iter->jump_nr + 1, iter->jump_alloc);
+
+ e = &iter->jump[iter->jump_nr++];
+ e->start = start;
+ e->end = end;
+ }
+
+ if (!iter->jump_nr) {
+ /*
+ * Every entry in exclude_patterns has a meta-character,
+ * nothing to do here.
+ */
+ return;
+ }
+
+ QSORT(iter->jump, iter->jump_nr, jump_list_entry_cmp);
+
+ /*
+ * As an optimization, merge adjacent entries in the jump list
+ * to jump forwards as far as possible when entering a skipped
+ * region.
+ *
+ * For example, if we have two skipped regions:
+ *
+ * [[A, B], [B, C]]
+ *
+ * we want to combine that into a single entry jumping from A to
+ * C.
+ */
+ last_disjoint = iter->jump;
+
+ for (i = 1, j = 1; i < iter->jump_nr; i++) {
+ struct jump_list_entry *ours = &iter->jump[i];
+ if (ours->start <= last_disjoint->end) {
+ /* overlapping regions extend the previous one */
+ last_disjoint->end = last_disjoint->end > ours->end
+ ? last_disjoint->end : ours->end;
+ } else {
+ /* otherwise, insert a new region */
+ iter->jump[j++] = *ours;
+ last_disjoint = ours;
+ }
+ }
+
+ iter->jump_nr = j;
+ iter->jump_cur = 0;
+}
+
static struct ref_iterator *packed_ref_iterator_begin(
struct ref_store *ref_store,
- const char *prefix, unsigned int flags)
+ const char *prefix, const char **exclude_patterns,
+ unsigned int flags)
{
struct packed_ref_store *refs;
struct snapshot *snapshot;
@@ -956,6 +1114,9 @@ static struct ref_iterator *packed_ref_iterator_begin(
ref_iterator = &iter->base;
base_ref_iterator_init(ref_iterator, &packed_ref_iterator_vtable, 1);
+ if (exclude_patterns)
+ populate_excluded_jump_list(iter, snapshot, exclude_patterns);
+
iter->snapshot = snapshot;
acquire_snapshot(snapshot);
@@ -1149,7 +1310,7 @@ static int write_with_updates(struct packed_ref_store *refs,
* list of refs is exhausted, set iter to NULL. When the list
* of updates is exhausted, leave i set to updates->nr.
*/
- iter = packed_ref_iterator_begin(&refs->base, "",
+ iter = packed_ref_iterator_begin(&refs->base, "", NULL,
DO_FOR_EACH_INCLUDE_BROKEN);
if ((ok = ref_iterator_advance(iter)) != ITER_OK)
iter = NULL;
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index f72b7be894..9db8aec4da 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -367,8 +367,8 @@ int is_empty_ref_iterator(struct ref_iterator *ref_iterator);
*/
struct ref_iterator *refs_ref_iterator_begin(
struct ref_store *refs,
- const char *prefix, int trim,
- enum do_for_each_ref_flags flags);
+ const char *prefix, const char **exclude_patterns,
+ int trim, enum do_for_each_ref_flags flags);
/*
* A callback function used to instruct merge_ref_iterator how to
@@ -571,7 +571,8 @@ typedef int copy_ref_fn(struct ref_store *ref_store,
*/
typedef struct ref_iterator *ref_iterator_begin_fn(
struct ref_store *ref_store,
- const char *prefix, unsigned int flags);
+ const char *prefix, const char **exclude_patterns,
+ unsigned int flags);
/* reflog functions */
diff --git a/refspec.c b/refspec.c
index 57f6c2aaf9..d60932f4de 100644
--- a/refspec.c
+++ b/refspec.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
diff --git a/remote-curl.c b/remote-curl.c
index acf7b2bb40..ef05752ca5 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -763,7 +762,8 @@ static void check_pktline(struct check_pktline_state *state, const char *ptr, si
size -= digits_remaining;
if (state->len_filled == 4) {
- state->remaining = packet_length(state->len_buf);
+ state->remaining = packet_length(state->len_buf,
+ sizeof(state->len_buf));
if (state->remaining < 0) {
die(_("remote-curl: bad line length character: %.4s"), state->len_buf);
} else if (state->remaining == 2) {
diff --git a/remote.c b/remote.c
index 1bcd36e358..abb24822be 100644
--- a/remote.c
+++ b/remote.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -10,7 +9,8 @@
#include "refs.h"
#include "refspec.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
@@ -349,7 +349,8 @@ static void read_branches_file(struct remote_state *remote_state,
remote->fetch_tags = 1; /* always auto-follow */
}
-static int handle_config(const char *key, const char *value, void *cb)
+static int handle_config(const char *key, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *name;
size_t namelen;
@@ -357,6 +358,7 @@ static int handle_config(const char *key, const char *value, void *cb)
struct remote *remote;
struct branch *branch;
struct remote_state *remote_state = cb;
+ const struct key_value_info *kvi = ctx->kvi;
if (parse_config_key(key, "branch", &name, &namelen, &subkey) >= 0) {
/* There is no subsection. */
@@ -414,8 +416,8 @@ static int handle_config(const char *key, const char *value, void *cb)
}
remote = make_remote(remote_state, name, namelen);
remote->origin = REMOTE_CONFIG;
- if (current_config_scope() == CONFIG_SCOPE_LOCAL ||
- current_config_scope() == CONFIG_SCOPE_WORKTREE)
+ if (kvi->scope == CONFIG_SCOPE_LOCAL ||
+ kvi->scope == CONFIG_SCOPE_WORKTREE)
remote->configured_in_repo = 1;
if (!strcmp(subkey, "mirror"))
remote->mirror = git_config_bool(key, value);
@@ -2257,7 +2259,8 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs,
* Return true when there is anything to report, otherwise false.
*/
int format_tracking_info(struct branch *branch, struct strbuf *sb,
- enum ahead_behind_flags abf)
+ enum ahead_behind_flags abf,
+ int show_divergence_advice)
{
int ours, theirs, sti;
const char *full_base;
@@ -2320,9 +2323,10 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
"respectively.\n",
ours + theirs),
base, ours, theirs);
- if (advice_enabled(ADVICE_STATUS_HINTS))
+ if (show_divergence_advice &&
+ advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addstr(sb,
- _(" (use \"git pull\" to merge the remote branch into yours)\n"));
+ _(" (use \"git pull\" if you want to integrate the remote branch with yours)\n"));
}
free(base);
return 1;
diff --git a/remote.h b/remote.h
index 73638cefeb..cdc8b1db42 100644
--- a/remote.h
+++ b/remote.h
@@ -1,6 +1,7 @@
#ifndef REMOTE_H
#define REMOTE_H
+#include "hash-ll.h"
#include "hashmap.h"
#include "refspec.h"
@@ -379,7 +380,8 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs,
const char **upstream_name, int for_push,
enum ahead_behind_flags abf);
int format_tracking_info(struct branch *branch, struct strbuf *sb,
- enum ahead_behind_flags abf);
+ enum ahead_behind_flags abf,
+ int show_divergence_advice);
struct ref *get_local_heads(void);
/*
diff --git a/replace-object.c b/replace-object.c
index ae2d55b014..523215589d 100644
--- a/replace-object.c
+++ b/replace-object.c
@@ -2,7 +2,7 @@
#include "gettext.h"
#include "hex.h"
#include "oidmap.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "replace-object.h"
#include "refs.h"
#include "repository.h"
diff --git a/replace-object.h b/replace-object.h
index ba478eb30c..66c41b938b 100644
--- a/replace-object.h
+++ b/replace-object.h
@@ -3,7 +3,7 @@
#include "oidmap.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
struct replace_object {
struct oidmap_entry original;
diff --git a/repository.c b/repository.c
index 104960f8f5..a7679ceeaa 100644
--- a/repository.c
+++ b/repository.c
@@ -3,13 +3,15 @@
* declaration matches the definition in this file.
*/
#define USE_THE_INDEX_VARIABLE
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "config.h"
#include "object.h"
#include "lockfile.h"
+#include "path.h"
+#include "read-cache-ll.h"
#include "remote.h"
#include "setup.h"
#include "submodule-config.h"
diff --git a/repository.h b/repository.h
index af294deb8c..5f18486f64 100644
--- a/repository.h
+++ b/repository.h
@@ -1,8 +1,6 @@
#ifndef REPOSITORY_H
#define REPOSITORY_H
-#include "path.h"
-
struct config_set;
struct fsmonitor_settings;
struct git_hash_algo;
@@ -180,6 +178,9 @@ struct repository {
};
extern struct repository *the_repository;
+#ifdef USE_THE_INDEX_VARIABLE
+extern struct index_state the_index;
+#endif
/*
* Define a custom repository layout. Any field can be NULL, which
@@ -231,9 +232,6 @@ int repo_hold_locked_index(struct repository *repo,
struct lock_file *lf,
int flags);
-int repo_read_index_preload(struct repository *,
- const struct pathspec *pathspec,
- unsigned refresh_flags);
int repo_read_index_unmerged(struct repository *);
/*
* Opportunistically update the index but do not complain if we can't.
diff --git a/rerere.c b/rerere.c
index e968d413d6..725c1b6a95 100644
--- a/rerere.c
+++ b/rerere.c
@@ -1,24 +1,24 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "config.h"
#include "copy.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "string-list.h"
+#include "read-cache-ll.h"
#include "rerere.h"
#include "xdiff-interface.h"
#include "dir.h"
#include "resolve-undo.h"
-#include "ll-merge.h"
+#include "merge-ll.h"
#include "attr.h"
+#include "path.h"
#include "pathspec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "hash-lookup.h"
#include "strmap.h"
-#include "wrapper.h"
#define RESOLVED 0
#define PUNTED 1
@@ -204,7 +204,7 @@ static void read_rr(struct repository *r, struct string_list *rr)
const unsigned hexsz = the_hash_algo->hexsz;
/* There has to be the hash, tab, path and then NUL */
- if (buf.len < hexsz + 2 || get_sha1_hex(buf.buf, hash))
+ if (buf.len < hexsz + 2 || get_hash_hex(buf.buf, hash))
die(_("corrupt MERGE_RR"));
if (buf.buf[hexsz] != '.') {
diff --git a/resolve-undo.c b/resolve-undo.c
index 70a6db526d..7817f5d6db 100644
--- a/resolve-undo.c
+++ b/resolve-undo.c
@@ -1,7 +1,9 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "dir.h"
#include "hash.h"
+#include "read-cache.h"
#include "resolve-undo.h"
+#include "sparse-index.h"
#include "string-list.h"
/* The only error case is to run out of memory in string-list */
diff --git a/revision.c b/revision.c
index b33cc1d106..2f4c53ea20 100644
--- a/revision.c
+++ b/revision.c
@@ -1,12 +1,11 @@
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "tag.h"
#include "blob.h"
#include "tree.h"
@@ -31,7 +30,9 @@
#include "bisect.h"
#include "packfile.h"
#include "worktree.h"
+#include "read-cache.h"
#include "setup.h"
+#include "sparse-index.h"
#include "strvec.h"
#include "trace2.h"
#include "commit-reach.h"
@@ -44,6 +45,7 @@
#include "list-objects-filter-options.h"
#include "resolve-undo.h"
#include "parse-options.h"
+#include "wildmatch.h"
volatile show_early_output_fn_t show_early_output;
@@ -1558,7 +1560,7 @@ void init_ref_exclusions(struct ref_exclusions *exclusions)
void clear_ref_exclusions(struct ref_exclusions *exclusions)
{
string_list_clear(&exclusions->excluded_refs, 0);
- string_list_clear(&exclusions->hidden_refs, 0);
+ strvec_clear(&exclusions->hidden_refs);
exclusions->hidden_refs_configured = 0;
}
@@ -1572,7 +1574,9 @@ struct exclude_hidden_refs_cb {
const char *section;
};
-static int hide_refs_config(const char *var, const char *value, void *cb_data)
+static int hide_refs_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *cb_data)
{
struct exclude_hidden_refs_cb *cb = cb_data;
cb->exclusions->hidden_refs_configured = 1;
@@ -2195,39 +2199,6 @@ static void read_pathspec_from_stdin(struct strbuf *sb,
strvec_push(prune, sb->buf);
}
-static void read_revisions_from_stdin(struct rev_info *revs,
- struct strvec *prune)
-{
- struct strbuf sb;
- int seen_dashdash = 0;
- int save_warning;
-
- save_warning = warn_on_object_refname_ambiguity;
- warn_on_object_refname_ambiguity = 0;
-
- strbuf_init(&sb, 1000);
- while (strbuf_getline(&sb, stdin) != EOF) {
- int len = sb.len;
- if (!len)
- break;
- if (sb.buf[0] == '-') {
- if (len == 2 && sb.buf[1] == '-') {
- seen_dashdash = 1;
- break;
- }
- die("options not supported in --stdin mode");
- }
- if (handle_revision_arg(sb.buf, revs, 0,
- REVARG_CANNOT_BE_FILENAME))
- die("bad revision '%s'", sb.buf);
- }
- if (seen_dashdash)
- read_pathspec_from_stdin(&sb, prune);
-
- strbuf_release(&sb);
- warn_on_object_refname_ambiguity = save_warning;
-}
-
static void add_grep(struct rev_info *revs, const char *ptn, enum grep_pat_token what)
{
append_grep_pattern(&revs->grep_filter, ptn, "command line", 0, what);
@@ -2670,7 +2641,7 @@ static int for_each_bisect_ref(struct ref_store *refs, each_ref_fn fn,
struct strbuf bisect_refs = STRBUF_INIT;
int status;
strbuf_addf(&bisect_refs, "refs/bisect/%s", term);
- status = refs_for_each_fullref_in(refs, bisect_refs.buf, fn, cb_data);
+ status = refs_for_each_fullref_in(refs, bisect_refs.buf, NULL, fn, cb_data);
strbuf_release(&bisect_refs);
return status;
}
@@ -2816,6 +2787,53 @@ static int handle_revision_pseudo_opt(struct rev_info *revs,
return 1;
}
+static void read_revisions_from_stdin(struct rev_info *revs,
+ struct strvec *prune,
+ int *flags)
+{
+ struct strbuf sb;
+ int seen_dashdash = 0;
+ int seen_end_of_options = 0;
+ int save_warning;
+
+ save_warning = warn_on_object_refname_ambiguity;
+ warn_on_object_refname_ambiguity = 0;
+
+ strbuf_init(&sb, 1000);
+ while (strbuf_getline(&sb, stdin) != EOF) {
+ if (!sb.len)
+ break;
+
+ if (!strcmp(sb.buf, "--")) {
+ seen_dashdash = 1;
+ break;
+ }
+
+ if (!seen_end_of_options && sb.buf[0] == '-') {
+ const char *argv[] = { sb.buf, NULL };
+
+ if (!strcmp(sb.buf, "--end-of-options")) {
+ seen_end_of_options = 1;
+ continue;
+ }
+
+ if (handle_revision_pseudo_opt(revs, argv, flags) > 0)
+ continue;
+
+ die(_("invalid option '%s' in --stdin mode"), sb.buf);
+ }
+
+ if (handle_revision_arg(sb.buf, revs, 0,
+ REVARG_CANNOT_BE_FILENAME))
+ die("bad revision '%s'", sb.buf);
+ }
+ if (seen_dashdash)
+ read_pathspec_from_stdin(&sb, prune);
+
+ strbuf_release(&sb);
+ warn_on_object_refname_ambiguity = save_warning;
+}
+
static void NORETURN diagnose_missing_default(const char *def)
{
int flags;
@@ -2888,7 +2906,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
}
if (revs->read_from_stdin++)
die("--stdin given twice?");
- read_revisions_from_stdin(revs, &prune_data);
+ read_revisions_from_stdin(revs, &prune_data, &flags);
continue;
}
@@ -2952,7 +2970,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
if (!revs->def)
revs->def = opt ? opt->def : NULL;
if (opt && opt->tweak)
- opt->tweak(revs, opt);
+ opt->tweak(revs);
if (revs->show_merge)
prepare_show_merge(revs);
if (revs->def && !revs->pending.nr && !revs->rev_input_given) {
diff --git a/revision.h b/revision.h
index 25776af381..82ab400139 100644
--- a/revision.h
+++ b/revision.h
@@ -10,6 +10,7 @@
#include "decorate.h"
#include "ident.h"
#include "list-objects-filter-options.h"
+#include "strvec.h"
/**
* The revision walking API offers functions to build a list of revisions
@@ -95,7 +96,7 @@ struct ref_exclusions {
* Hidden refs is a list of patterns that is to be hidden via
* `ref_is_hidden()`.
*/
- struct string_list hidden_refs;
+ struct strvec hidden_refs;
/*
* Indicates whether hidden refs have been configured. This is to
@@ -110,7 +111,7 @@ struct ref_exclusions {
*/
#define REF_EXCLUSIONS_INIT { \
.excluded_refs = STRING_LIST_INIT_DUP, \
- .hidden_refs = STRING_LIST_INIT_DUP, \
+ .hidden_refs = STRVEC_INIT, \
}
struct oidset;
@@ -428,7 +429,7 @@ void repo_init_revisions(struct repository *r,
*/
struct setup_revision_opt {
const char *def;
- void (*tweak)(struct rev_info *, struct setup_revision_opt *);
+ void (*tweak)(struct rev_info *);
unsigned int assume_dashdash:1,
allow_exclude_promisor_objects:1,
free_removed_argv_elements:1;
diff --git a/run-command.c b/run-command.c
index 758f8534da..a558042c87 100644
--- a/run-command.c
+++ b/run-command.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "run-command.h"
#include "environment.h"
#include "exec-cmd.h"
@@ -170,6 +170,7 @@ int is_executable(const char *name)
return st.st_mode & S_IXUSR;
}
+#ifndef locate_in_PATH
/*
* Search $PATH for a command. This emulates the path search that
* execvp would perform, without actually executing the command so it
@@ -218,6 +219,7 @@ static char *locate_in_PATH(const char *file)
strbuf_release(&buf);
return NULL;
}
+#endif
int exists_in_PATH(const char *command)
{
diff --git a/run-command.h b/run-command.h
index 072db56a4d..1f22cc3827 100644
--- a/run-command.h
+++ b/run-command.h
@@ -503,7 +503,7 @@ void run_processes_parallel(const struct run_process_parallel_opts *opts);
* exception of GIT_CONFIG_PARAMETERS and GIT_CONFIG_COUNT (which cause the
* corresponding environment variables to be unset in the subprocess) and adds
* an environment variable pointing to new_git_dir. See local_repo_env in
- * cache.h for more information.
+ * environment.h for more information.
*/
void prepare_other_repo_env(struct strvec *env, const char *new_git_dir);
@@ -564,4 +564,6 @@ enum start_bg_result start_bg_command(struct child_process *cmd,
void *cb_data,
unsigned int timeout_sec);
+int sane_execvp(const char *file, char *const argv[]);
+
#endif
diff --git a/sane-ctype.h b/sane-ctype.h
new file mode 100644
index 0000000000..cbea1b299b
--- /dev/null
+++ b/sane-ctype.h
@@ -0,0 +1,66 @@
+#ifndef SANE_CTYPE_H
+#define SANE_CTYPE_H
+
+/* Sane ctype - no locale, and works with signed chars */
+#undef isascii
+#undef isspace
+#undef isdigit
+#undef isalpha
+#undef isalnum
+#undef isprint
+#undef islower
+#undef isupper
+#undef tolower
+#undef toupper
+#undef iscntrl
+#undef ispunct
+#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
+#define GIT_GLOB_SPECIAL 0x08
+#define GIT_REGEX_SPECIAL 0x10
+#define GIT_PATHSPEC_MAGIC 0x20
+#define GIT_CNTRL 0x40
+#define GIT_PUNCT 0x80
+#define sane_istest(x,mask) ((sane_ctype[(unsigned char)(x)] & (mask)) != 0)
+#define isascii(x) (((x) & ~0x7f) == 0)
+#define isspace(x) sane_istest(x,GIT_SPACE)
+#define isdigit(x) sane_istest(x,GIT_DIGIT)
+#define isalpha(x) sane_istest(x,GIT_ALPHA)
+#define isalnum(x) sane_istest(x,GIT_ALPHA | GIT_DIGIT)
+#define isprint(x) ((x) >= 0x20 && (x) <= 0x7e)
+#define islower(x) sane_iscase(x, 1)
+#define isupper(x) sane_iscase(x, 0)
+#define is_glob_special(x) sane_istest(x,GIT_GLOB_SPECIAL)
+#define is_regex_special(x) sane_istest(x,GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL)
+#define iscntrl(x) (sane_istest(x,GIT_CNTRL))
+#define ispunct(x) sane_istest(x, GIT_PUNCT | GIT_REGEX_SPECIAL | \
+ GIT_GLOB_SPECIAL | GIT_PATHSPEC_MAGIC)
+#define isxdigit(x) (hexval_table[(unsigned char)(x)] != -1)
+#define tolower(x) sane_case((unsigned char)(x), 0x20)
+#define toupper(x) sane_case((unsigned char)(x), 0)
+#define is_pathspec_magic(x) sane_istest(x,GIT_PATHSPEC_MAGIC)
+
+static inline int sane_case(int x, int high)
+{
+ if (sane_istest(x, GIT_ALPHA))
+ x = (x & ~0x20) | high;
+ return x;
+}
+
+static inline int sane_iscase(int x, int is_lower)
+{
+ if (!sane_istest(x, GIT_ALPHA))
+ return 0;
+
+ if (is_lower)
+ return (x & 0x20) != 0;
+ else
+ return (x & 0x20) == 0;
+}
+
+#endif
diff --git a/scalar.c b/scalar.c
index 1326e1f608..fb2940c2a0 100644
--- a/scalar.c
+++ b/scalar.c
@@ -409,6 +409,7 @@ static int cmd_clone(int argc, const char **argv)
{
const char *branch = NULL;
int full_clone = 0, single_branch = 0, show_progress = isatty(2);
+ int src = 1;
struct option clone_options[] = {
OPT_STRING('b', "branch", &branch, N_("<branch>"),
N_("branch to checkout after clone")),
@@ -417,10 +418,13 @@ static int cmd_clone(int argc, const char **argv)
OPT_BOOL(0, "single-branch", &single_branch,
N_("only download metadata for the branch that will "
"be checked out")),
+ OPT_BOOL(0, "src", &src,
+ N_("create repository within 'src' directory")),
OPT_END(),
};
const char * const clone_usage[] = {
- N_("scalar clone [<options>] [--] <repo> [<dir>]"),
+ N_("scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
+ "\t[--[no-]src] <url> [<enlistment>]"),
NULL
};
const char *url;
@@ -456,7 +460,10 @@ static int cmd_clone(int argc, const char **argv)
if (is_directory(enlistment))
die(_("directory '%s' exists already"), enlistment);
- dir = xstrfmt("%s/src", enlistment);
+ if (src)
+ dir = xstrfmt("%s/src", enlistment);
+ else
+ dir = xstrdup(enlistment);
strbuf_reset(&buf);
if (branch)
@@ -594,7 +601,9 @@ static int cmd_register(int argc, const char **argv)
return register_dir();
}
-static int get_scalar_repos(const char *key, const char *value, void *data)
+static int get_scalar_repos(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *data)
{
struct string_list *list = data;
@@ -655,6 +664,7 @@ static int cmd_reconfigure(int argc, const char **argv)
git_config(get_scalar_repos, &scalar_repos);
for (i = 0; i < scalar_repos.nr; i++) {
+ int succeeded = 0;
const char *dir = scalar_repos.items[i].string;
strbuf_reset(&commondir);
@@ -665,30 +675,56 @@ static int cmd_reconfigure(int argc, const char **argv)
if (errno != ENOENT) {
warning_errno(_("could not switch to '%s'"), dir);
- res = -1;
- continue;
+ goto loop_end;
}
strbuf_addstr(&buf, dir);
if (remove_deleted_enlistment(&buf))
- res = error(_("could not remove stale "
- "scalar.repo '%s'"), dir);
- else
- warning(_("removing stale scalar.repo '%s'"),
+ error(_("could not remove stale "
+ "scalar.repo '%s'"), dir);
+ else {
+ warning(_("removed stale scalar.repo '%s'"),
dir);
+ succeeded = 1;
+ }
strbuf_release(&buf);
- } else if (discover_git_directory(&commondir, &gitdir) < 0) {
- warning_errno(_("git repository gone in '%s'"), dir);
- res = -1;
- } else {
- git_config_clear();
+ goto loop_end;
+ }
+
+ switch (discover_git_directory_reason(&commondir, &gitdir)) {
+ case GIT_DIR_INVALID_OWNERSHIP:
+ warning(_("repository at '%s' has different owner"), dir);
+ goto loop_end;
+
+ case GIT_DIR_INVALID_GITFILE:
+ case GIT_DIR_INVALID_FORMAT:
+ warning(_("repository at '%s' has a format issue"), dir);
+ goto loop_end;
+
+ case GIT_DIR_DISCOVERED:
+ succeeded = 1;
+ break;
+
+ default:
+ warning(_("repository not found in '%s'"), dir);
+ break;
+ }
- the_repository = &r;
- r.commondir = commondir.buf;
- r.gitdir = gitdir.buf;
+ git_config_clear();
- if (set_recommended_config(1) < 0)
- res = -1;
+ the_repository = &r;
+ r.commondir = commondir.buf;
+ r.gitdir = gitdir.buf;
+
+ if (set_recommended_config(1) >= 0)
+ succeeded = 1;
+
+loop_end:
+ if (!succeeded) {
+ res = -1;
+ warning(_("to unregister this repository from Scalar, run\n"
+ "\tgit config --global --unset --fixed-value scalar.repo \"%s\""),
+ dir);
}
}
diff --git a/send-pack.c b/send-pack.c
index 0c7ccaef68..89aca9d829 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -5,7 +5,7 @@
#include "gettext.h"
#include "hex.h"
#include "refs.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pkt-line.h"
#include "sideband.h"
#include "run-command.h"
@@ -15,7 +15,6 @@
#include "quote.h"
#include "transport.h"
#include "version.h"
-#include "wrapper.h"
#include "oid-array.h"
#include "gpg-interface.h"
#include "shallow.h"
diff --git a/sequencer.c b/sequencer.c
index bceb6abcb6..9021cb8178 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1,7 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "advice.h"
-#include "alloc.h"
#include "config.h"
#include "copy.h"
#include "environment.h"
@@ -11,7 +10,7 @@
#include "dir.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "object.h"
#include "pager.h"
#include "commit.h"
@@ -23,11 +22,14 @@
#include "utf8.h"
#include "cache-tree.h"
#include "diff.h"
+#include "path.h"
#include "revision.h"
#include "rerere.h"
+#include "merge.h"
#include "merge-ort.h"
#include "merge-ort-wrappers.h"
#include "refs.h"
+#include "sparse-index.h"
#include "strvec.h"
#include "quote.h"
#include "trailer.h"
@@ -46,10 +48,18 @@
#include "rebase-interactive.h"
#include "reset.h"
#include "branch.h"
-#include "wrapper.h"
#define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
+/*
+ * To accommodate common filesystem limitations, where the loose refs' file
+ * names must not exceed `NAME_MAX`, the labels generated by `git rebase
+ * --rebase-merges` need to be truncated if the corresponding commit subjects
+ * are too long.
+ * Add some margin to stay clear from reaching `NAME_MAX`.
+ */
+#define GIT_MAX_LABEL_LENGTH ((NAME_MAX) - (LOCK_SUFFIX_LEN) - 16)
+
static const char sign_off_header[] = "Signed-off-by: ";
static const char cherry_picked_prefix[] = "(cherry picked from commit ";
@@ -138,6 +148,11 @@ static GIT_PATH_FUNC(rebase_path_amend, "rebase-merge/amend")
*/
static GIT_PATH_FUNC(rebase_path_stopped_sha, "rebase-merge/stopped-sha")
/*
+ * When we stop for the user to resolve conflicts this file contains
+ * the patch of the commit that is being picked.
+ */
+static GIT_PATH_FUNC(rebase_path_patch, "rebase-merge/patch")
+/*
* For the post-rewrite hook, we make a list of rewritten commits and
* their new sha1s. The rewritten-pending list keeps the sha1s of
* commits that have been processed, but not committed yet,
@@ -219,7 +234,8 @@ static struct update_ref_record *init_update_ref_record(const char *ref)
return rec;
}
-static int git_sequencer_config(const char *k, const char *v, void *cb)
+static int git_sequencer_config(const char *k, const char *v,
+ const struct config_context *ctx, void *cb)
{
struct replay_opts *opts = cb;
int status;
@@ -274,7 +290,7 @@ 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);
- return git_diff_basic_config(k, v, NULL);
+ return git_diff_basic_config(k, v, ctx, NULL);
}
void sequencer_init_config(struct replay_opts *opts)
@@ -422,10 +438,9 @@ struct commit_message {
const char *message;
};
-static const char *short_commit_name(struct commit *commit)
+static const char *short_commit_name(struct repository *r, struct commit *commit)
{
- return repo_find_unique_abbrev(the_repository, &commit->object.oid,
- DEFAULT_ABBREV);
+ return repo_find_unique_abbrev(r, &commit->object.oid, DEFAULT_ABBREV);
}
static int get_message(struct commit *commit, struct commit_message *out)
@@ -435,7 +450,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
out->message = repo_logmsg_reencode(the_repository, commit, NULL,
get_commit_output_encoding());
- abbrev = short_commit_name(commit);
+ abbrev = short_commit_name(the_repository, commit);
subject_len = find_commit_subject(out->message, &subject);
@@ -660,11 +675,12 @@ void append_conflicts_hint(struct index_state *istate,
}
strbuf_addch(msgbuf, '\n');
- strbuf_commented_addf(msgbuf, "Conflicts:\n");
+ strbuf_commented_addf(msgbuf, comment_line_char, "Conflicts:\n");
for (i = 0; i < istate->cache_nr;) {
const struct cache_entry *ce = istate->cache[i++];
if (ce_stage(ce)) {
- strbuf_commented_addf(msgbuf, "\t%s\n", ce->name);
+ strbuf_commented_addf(msgbuf, comment_line_char,
+ "\t%s\n", ce->name);
while (i < istate->cache_nr &&
!strcmp(ce->name, istate->cache[i]->name))
i++;
@@ -1143,7 +1159,8 @@ void cleanup_message(struct strbuf *msgbuf,
cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS)
strbuf_setlen(msgbuf, wt_status_locate_end(msgbuf->buf, msgbuf->len));
if (cleanup_mode != COMMIT_MSG_CLEANUP_NONE)
- strbuf_stripspace(msgbuf, cleanup_mode == COMMIT_MSG_CLEANUP_ALL);
+ strbuf_stripspace(msgbuf,
+ cleanup_mode == COMMIT_MSG_CLEANUP_ALL ? comment_line_char : '\0');
}
/*
@@ -1174,7 +1191,8 @@ int template_untouched(const struct strbuf *sb, const char *template_file,
if (!template_file || strbuf_read_file(&tmpl, template_file, 0) <= 0)
return 0;
- strbuf_stripspace(&tmpl, cleanup_mode == COMMIT_MSG_CLEANUP_ALL);
+ strbuf_stripspace(&tmpl,
+ cleanup_mode == COMMIT_MSG_CLEANUP_ALL ? comment_line_char : '\0');
if (!skip_prefix(sb->buf, tmpl.buf, &start))
start = sb->buf;
strbuf_release(&tmpl);
@@ -1546,7 +1564,8 @@ static int try_to_commit(struct repository *r,
cleanup = opts->default_msg_cleanup;
if (cleanup != COMMIT_MSG_CLEANUP_NONE)
- strbuf_stripspace(msg, cleanup == COMMIT_MSG_CLEANUP_ALL);
+ strbuf_stripspace(msg,
+ cleanup == COMMIT_MSG_CLEANUP_ALL ? comment_line_char : '\0');
if ((flags & EDIT_MSG) && message_is_empty(msg, cleanup)) {
res = 1; /* run 'git commit' to display error message */
goto out;
@@ -1840,7 +1859,7 @@ static void add_commented_lines(struct strbuf *buf, const void *str, size_t len)
s += count;
len -= count;
}
- strbuf_add_commented_lines(buf, s, len);
+ strbuf_add_commented_lines(buf, s, len, comment_line_char);
}
/* Does the current fixup chain contain a squash command? */
@@ -1939,7 +1958,7 @@ static int append_squash_message(struct strbuf *buf, const char *body,
strbuf_addf(buf, _(nth_commit_msg_fmt),
++opts->current_fixup_count + 1);
strbuf_addstr(buf, "\n\n");
- strbuf_add_commented_lines(buf, body, commented_len);
+ strbuf_add_commented_lines(buf, body, commented_len, comment_line_char);
/* buf->buf may be reallocated so store an offset into the buffer */
fixup_off = buf->len;
strbuf_addstr(buf, body + commented_len);
@@ -2029,7 +2048,8 @@ static int update_squash_messages(struct repository *r,
_(first_commit_msg_str));
strbuf_addstr(&buf, "\n\n");
if (is_fixup_flag(command, flag))
- strbuf_add_commented_lines(&buf, body, strlen(body));
+ strbuf_add_commented_lines(&buf, body, strlen(body),
+ comment_line_char);
else
strbuf_addstr(&buf, body);
@@ -2048,7 +2068,8 @@ static int update_squash_messages(struct repository *r,
strbuf_addf(&buf, _(skip_nth_commit_msg_fmt),
++opts->current_fixup_count + 1);
strbuf_addstr(&buf, "\n\n");
- strbuf_add_commented_lines(&buf, body, strlen(body));
+ strbuf_add_commented_lines(&buf, body, strlen(body),
+ comment_line_char);
} else
return error(_("unknown command: %d"), command);
repo_unuse_commit_buffer(r, commit, message);
@@ -2241,6 +2262,8 @@ static int do_pick_commit(struct repository *r,
*/
if (command == TODO_REVERT) {
+ const char *orig_subject;
+
base = commit;
base_label = msg.label;
next = parent;
@@ -2248,6 +2271,15 @@ static int do_pick_commit(struct repository *r,
if (opts->commit_use_reference) {
strbuf_addstr(&msgbuf,
"# *** SAY WHY WE ARE REVERTING ON THE TITLE LINE ***");
+ } else if (skip_prefix(msg.subject, "Revert \"", &orig_subject) &&
+ /*
+ * We don't touch pre-existing repeated reverts, because
+ * theoretically these can be nested arbitrarily deeply,
+ * thus requiring excessive complexity to deal with.
+ */
+ !starts_with(orig_subject, "Revert \"")) {
+ strbuf_addstr(&msgbuf, "Reapply \"");
+ strbuf_addstr(&msgbuf, orig_subject);
} else {
strbuf_addstr(&msgbuf, "Revert \"");
strbuf_addstr(&msgbuf, msg.subject);
@@ -2303,7 +2335,7 @@ static int do_pick_commit(struct repository *r,
const char *dest = git_path_squash_msg(r);
unlink(dest);
if (copy_file(dest, rebase_path_squash_msg(), 0666)) {
- res = error(_("could not rename '%s' to '%s'"),
+ res = error(_("could not copy '%s' to '%s'"),
rebase_path_squash_msg(), dest);
goto leave;
}
@@ -2366,7 +2398,7 @@ static int do_pick_commit(struct repository *r,
error(command == TODO_REVERT
? _("could not revert %s... %s")
: _("could not apply %s... %s"),
- short_commit_name(commit), msg.subject);
+ short_commit_name(r, commit), msg.subject);
print_advice(r, res == 1, opts);
repo_rerere(r, opts->allow_rerere_auto);
goto leave;
@@ -2633,7 +2665,7 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
return item->commit ? 0 : -1;
}
-int sequencer_get_last_command(struct repository *r, enum replay_action *action)
+int sequencer_get_last_command(struct repository *r UNUSED, enum replay_action *action)
{
const char *todo_file, *bol;
struct strbuf buf = STRBUF_INIT;
@@ -2694,7 +2726,7 @@ int todo_list_parse_insn_buffer(struct repository *r, char *buf,
if (fixup_okay)
; /* do nothing */
else if (is_fixup(item->command))
- return error(_("cannot '%s' without a previous commit"),
+ res = error(_("cannot '%s' without a previous commit"),
command_to_string(item->command));
else if (!is_noop(item->command))
fixup_okay = 1;
@@ -2881,7 +2913,9 @@ static int git_config_string_dup(char **dest,
return 0;
}
-static int populate_opts_cb(const char *key, const char *value, void *data)
+static int populate_opts_cb(const char *key, const char *value,
+ const struct config_context *ctx,
+ void *data)
{
struct replay_opts *opts = data;
int error_flag = 1;
@@ -2889,26 +2923,26 @@ static int populate_opts_cb(const char *key, const char *value, void *data)
if (!value)
error_flag = 0;
else if (!strcmp(key, "options.no-commit"))
- opts->no_commit = git_config_bool_or_int(key, value, &error_flag);
+ opts->no_commit = git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.edit"))
- opts->edit = git_config_bool_or_int(key, value, &error_flag);
+ opts->edit = git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.allow-empty"))
opts->allow_empty =
- git_config_bool_or_int(key, value, &error_flag);
+ git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.allow-empty-message"))
opts->allow_empty_message =
- git_config_bool_or_int(key, value, &error_flag);
+ git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.keep-redundant-commits"))
opts->keep_redundant_commits =
- git_config_bool_or_int(key, value, &error_flag);
+ git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.signoff"))
- opts->signoff = git_config_bool_or_int(key, value, &error_flag);
+ opts->signoff = git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.record-origin"))
- opts->record_origin = git_config_bool_or_int(key, value, &error_flag);
+ opts->record_origin = git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.allow-ff"))
- opts->allow_ff = git_config_bool_or_int(key, value, &error_flag);
+ opts->allow_ff = git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
else if (!strcmp(key, "options.mainline"))
- opts->mainline = git_config_int(key, value);
+ opts->mainline = git_config_int(key, value, ctx->kvi);
else if (!strcmp(key, "options.strategy"))
git_config_string_dup(&opts->strategy, key, value);
else if (!strcmp(key, "options.gpg-sign"))
@@ -2917,7 +2951,7 @@ static int populate_opts_cb(const char *key, const char *value, void *data)
strvec_push(&opts->xopts, value);
} else if (!strcmp(key, "options.allow-rerere-auto"))
opts->allow_rerere_auto =
- git_config_bool_or_int(key, value, &error_flag) ?
+ git_config_bool_or_int(key, value, ctx->kvi, &error_flag) ?
RERERE_AUTOUPDATE : RERERE_NOAUTOUPDATE;
else if (!strcmp(key, "options.default-msg-cleanup")) {
opts->explicit_cleanup = 1;
@@ -3153,7 +3187,8 @@ static int walk_revs_populate_todo(struct todo_list *todo_list,
item->offset_in_buf = todo_list->buf.len;
subject_len = find_commit_subject(commit_buffer, &subject);
strbuf_addf(&todo_list->buf, "%s %s %.*s\n", command_string,
- short_commit_name(commit), subject_len, subject);
+ short_commit_name(the_repository, commit),
+ subject_len, subject);
repo_unuse_commit_buffer(the_repository, commit,
commit_buffer);
}
@@ -3382,7 +3417,8 @@ give_advice:
return -1;
}
-static int save_todo(struct todo_list *todo_list, struct replay_opts *opts)
+static int save_todo(struct todo_list *todo_list, struct replay_opts *opts,
+ int reschedule)
{
struct lock_file todo_lock = LOCK_INIT;
const char *todo_path = get_todo_path(opts);
@@ -3392,7 +3428,7 @@ static int save_todo(struct todo_list *todo_list, struct replay_opts *opts)
* rebase -i writes "git-rebase-todo" without the currently executing
* command, appending it to "done" instead.
*/
- if (is_rebase_i(opts))
+ if (is_rebase_i(opts) && !reschedule)
next++;
fd = hold_lock_file_for_update(&todo_lock, todo_path, 0);
@@ -3405,7 +3441,7 @@ static int save_todo(struct todo_list *todo_list, struct replay_opts *opts)
if (commit_lock_file(&todo_lock) < 0)
return error(_("failed to finalize '%s'"), todo_path);
- if (is_rebase_i(opts) && next > 0) {
+ if (is_rebase_i(opts) && !reschedule && next > 0) {
const char *done = rebase_path_done();
int fd = open(done, O_CREAT | O_WRONLY | O_APPEND, 0666);
int ret = 0;
@@ -3486,18 +3522,19 @@ static int make_patch(struct repository *r,
struct commit *commit,
struct replay_opts *opts)
{
- struct strbuf buf = STRBUF_INIT;
struct rev_info log_tree_opt;
const char *subject;
char hex[GIT_MAX_HEXSZ + 1];
int res = 0;
+ if (!is_rebase_i(opts))
+ BUG("make_patch should only be called when rebasing");
+
oid_to_hex_r(hex, &commit->object.oid);
if (write_message(hex, strlen(hex), rebase_path_stopped_sha(), 1) < 0)
return -1;
res |= write_rebase_head(&commit->object.oid);
- strbuf_addf(&buf, "%s/patch", get_dir(opts));
memset(&log_tree_opt, 0, sizeof(log_tree_opt));
repo_init_revisions(r, &log_tree_opt, NULL);
log_tree_opt.abbrev = 0;
@@ -3505,28 +3542,26 @@ static int make_patch(struct repository *r,
log_tree_opt.diffopt.output_format = DIFF_FORMAT_PATCH;
log_tree_opt.disable_stdin = 1;
log_tree_opt.no_commit_id = 1;
- log_tree_opt.diffopt.file = fopen(buf.buf, "w");
+ log_tree_opt.diffopt.file = fopen(rebase_path_patch(), "w");
log_tree_opt.diffopt.use_color = GIT_COLOR_NEVER;
if (!log_tree_opt.diffopt.file)
- res |= error_errno(_("could not open '%s'"), buf.buf);
+ res |= error_errno(_("could not open '%s'"),
+ rebase_path_patch());
else {
res |= log_tree_commit(&log_tree_opt, commit);
fclose(log_tree_opt.diffopt.file);
}
- strbuf_reset(&buf);
- strbuf_addf(&buf, "%s/message", get_dir(opts));
- if (!file_exists(buf.buf)) {
+ if (!file_exists(rebase_path_message())) {
const char *encoding = get_commit_output_encoding();
const char *commit_buffer = repo_logmsg_reencode(r,
commit, NULL,
encoding);
find_commit_subject(commit_buffer, &subject);
- res |= write_message(subject, strlen(subject), buf.buf, 1);
+ res |= write_message(subject, strlen(subject), rebase_path_message(), 1);
repo_unuse_commit_buffer(r, commit,
commit_buffer);
}
- strbuf_release(&buf);
release_revisions(&log_tree_opt);
return res;
@@ -3574,7 +3609,7 @@ static int error_with_patch(struct repository *r,
} else if (exit_code) {
if (commit)
fprintf_ln(stderr, _("Could not apply %s... %.*s"),
- short_commit_name(commit), subject_len, subject);
+ short_commit_name(r, commit), subject_len, subject);
else
/*
* We don't have the hash of the parent so
@@ -4144,6 +4179,7 @@ static int do_merge(struct repository *r,
if (ret < 0) {
error(_("could not even attempt to merge '%.*s'"),
merge_arg_len, arg);
+ unlink(git_path_merge_msg(r));
goto leave_merge;
}
/*
@@ -4631,6 +4667,68 @@ N_("Could not execute the todo command\n"
" git rebase --edit-todo\n"
" git rebase --continue\n");
+static int pick_one_commit(struct repository *r,
+ struct todo_list *todo_list,
+ struct replay_opts *opts,
+ int *check_todo, int* reschedule)
+{
+ int res;
+ struct todo_item *item = todo_list->items + todo_list->current;
+ const char *arg = todo_item_get_arg(todo_list, item);
+ if (is_rebase_i(opts))
+ opts->reflog_message = reflog_message(
+ opts, command_to_string(item->command), NULL);
+
+ res = do_pick_commit(r, item, opts, is_final_fixup(todo_list),
+ check_todo);
+ if (is_rebase_i(opts) && res < 0) {
+ /* Reschedule */
+ *reschedule = 1;
+ return -1;
+ }
+ if (item->command == TODO_EDIT) {
+ struct commit *commit = item->commit;
+ if (!res) {
+ if (!opts->verbose)
+ term_clear_line();
+ fprintf(stderr, _("Stopped at %s... %.*s\n"),
+ short_commit_name(r, commit), item->arg_len, arg);
+ }
+ return error_with_patch(r, commit,
+ arg, item->arg_len, opts, res, !res);
+ }
+ if (is_rebase_i(opts) && !res)
+ record_in_rewritten(&item->commit->object.oid,
+ peek_command(todo_list, 1));
+ if (res && is_fixup(item->command)) {
+ if (res == 1)
+ intend_to_amend();
+ return error_failed_squash(r, item->commit, opts,
+ item->arg_len, arg);
+ } else if (res && is_rebase_i(opts) && item->commit) {
+ int to_amend = 0;
+ struct object_id oid;
+
+ /*
+ * If we are rewording and have either
+ * fast-forwarded already, or are about to
+ * create a new root commit, we want to amend,
+ * otherwise we do not.
+ */
+ if (item->command == TODO_REWORD &&
+ !repo_get_oid(r, "HEAD", &oid) &&
+ (oideq(&item->commit->object.oid, &oid) ||
+ (opts->have_squash_onto &&
+ oideq(&opts->squash_onto, &oid))))
+ to_amend = 1;
+
+ return res | error_with_patch(r, item->commit,
+ arg, item->arg_len, opts,
+ res, to_amend);
+ }
+ return res;
+}
+
static int pick_commits(struct repository *r,
struct todo_list *todo_list,
struct replay_opts *opts)
@@ -4646,12 +4744,17 @@ static int pick_commits(struct repository *r,
if (read_and_refresh_cache(r, opts))
return -1;
+ unlink(rebase_path_message());
+ unlink(rebase_path_stopped_sha());
+ unlink(rebase_path_amend());
+ unlink(rebase_path_patch());
+
while (todo_list->current < todo_list->nr) {
struct todo_item *item = todo_list->items + todo_list->current;
const char *arg = todo_item_get_arg(todo_list, item);
int check_todo = 0;
- if (save_todo(todo_list, opts))
+ if (save_todo(todo_list, opts, reschedule))
return -1;
if (is_rebase_i(opts)) {
if (item->command != TODO_COMMENT) {
@@ -4669,10 +4772,7 @@ static int pick_commits(struct repository *r,
todo_list->total_nr,
opts->verbose ? "\n" : "\r");
}
- unlink(rebase_path_message());
unlink(rebase_path_author_script());
- unlink(rebase_path_stopped_sha());
- unlink(rebase_path_amend());
unlink(git_path_merge_head(r));
unlink(git_path_auto_merge(r));
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
@@ -4684,66 +4784,10 @@ static int pick_commits(struct repository *r,
}
}
if (item->command <= TODO_SQUASH) {
- if (is_rebase_i(opts))
- opts->reflog_message = reflog_message(opts,
- command_to_string(item->command), NULL);
-
- res = do_pick_commit(r, item, opts,
- is_final_fixup(todo_list),
- &check_todo);
- if (is_rebase_i(opts) && res < 0) {
- /* Reschedule */
- advise(_(rescheduled_advice),
- get_item_line_length(todo_list,
- todo_list->current),
- get_item_line(todo_list,
- todo_list->current));
- todo_list->current--;
- if (save_todo(todo_list, opts))
- return -1;
- }
- if (item->command == TODO_EDIT) {
- struct commit *commit = item->commit;
- if (!res) {
- if (!opts->verbose)
- term_clear_line();
- fprintf(stderr,
- _("Stopped at %s... %.*s\n"),
- short_commit_name(commit),
- item->arg_len, arg);
- }
- return error_with_patch(r, commit,
- arg, item->arg_len, opts, res, !res);
- }
- if (is_rebase_i(opts) && !res)
- record_in_rewritten(&item->commit->object.oid,
- peek_command(todo_list, 1));
- if (res && is_fixup(item->command)) {
- if (res == 1)
- intend_to_amend();
- return error_failed_squash(r, item->commit, opts,
- item->arg_len, arg);
- } else if (res && is_rebase_i(opts) && item->commit) {
- int to_amend = 0;
- struct object_id oid;
-
- /*
- * If we are rewording and have either
- * fast-forwarded already, or are about to
- * create a new root commit, we want to amend,
- * otherwise we do not.
- */
- if (item->command == TODO_REWORD &&
- !repo_get_oid(r, "HEAD", &oid) &&
- (oideq(&item->commit->object.oid, &oid) ||
- (opts->have_squash_onto &&
- oideq(&opts->squash_onto, &oid))))
- to_amend = 1;
-
- return res | error_with_patch(r, item->commit,
- arg, item->arg_len, opts,
- res, to_amend);
- }
+ res = pick_one_commit(r, todo_list, opts, &check_todo,
+ &reschedule);
+ if (!res && item->command == TODO_EDIT)
+ return 0;
} else if (item->command == TODO_EXEC) {
char *end_of_arg = (char *)(arg + item->arg_len);
int saved = *end_of_arg;
@@ -4791,22 +4835,19 @@ static int pick_commits(struct repository *r,
get_item_line_length(todo_list,
todo_list->current),
get_item_line(todo_list, todo_list->current));
- todo_list->current--;
- if (save_todo(todo_list, opts))
+ if (save_todo(todo_list, opts, reschedule))
return -1;
if (item->commit)
- return error_with_patch(r,
- item->commit,
- arg, item->arg_len,
- opts, res, 0);
+ write_rebase_head(&item->commit->object.oid);
} else if (is_rebase_i(opts) && check_todo && !res &&
reread_todo_if_changed(r, todo_list, opts)) {
return -1;
}
- todo_list->current++;
if (res)
return res;
+
+ todo_list->current++;
}
if (is_rebase_i(opts)) {
@@ -4959,6 +5000,11 @@ static int commit_staged_changes(struct repository *r,
is_clean = !has_uncommitted_changes(r, 0);
+ if (!is_clean && !file_exists(rebase_path_message())) {
+ const char *gpg_opt = gpg_sign_opt_quoted(opts);
+
+ return error(_(staged_changes_advice), gpg_opt, gpg_opt);
+ }
if (file_exists(rebase_path_amend())) {
struct strbuf rev = STRBUF_INIT;
struct object_id head, to_amend;
@@ -5038,19 +5084,31 @@ static int commit_staged_changes(struct repository *r,
* We need to update the squash message to skip
* the latest commit message.
*/
+ int res = 0;
struct commit *commit;
+ const char *msg;
const char *path = rebase_path_squash_msg();
const char *encoding = get_commit_output_encoding();
- if (parse_head(r, &commit) ||
- !(p = repo_logmsg_reencode(r, commit, NULL, encoding)) ||
- write_message(p, strlen(p), path, 0)) {
- repo_unuse_commit_buffer(r, commit, p);
- return error(_("could not write file: "
+ if (parse_head(r, &commit))
+ return error(_("could not parse HEAD"));
+
+ p = repo_logmsg_reencode(r, commit, NULL, encoding);
+ if (!p) {
+ res = error(_("could not parse commit %s"),
+ oid_to_hex(&commit->object.oid));
+ goto unuse_commit_buffer;
+ }
+ find_commit_subject(p, &msg);
+ if (write_message(msg, strlen(msg), path, 0)) {
+ res = error(_("could not write file: "
"'%s'"), path);
+ goto unuse_commit_buffer;
}
- repo_unuse_commit_buffer(r,
- commit, p);
+ unuse_commit_buffer:
+ repo_unuse_commit_buffer(r, commit, p);
+ if (res)
+ return res;
}
}
@@ -5330,6 +5388,7 @@ struct label_state {
struct oidmap commit2label;
struct hashmap labels;
struct strbuf buf;
+ int max_label_length;
};
static const char *label_oid(struct object_id *oid, const char *label,
@@ -5386,6 +5445,8 @@ static const char *label_oid(struct object_id *oid, const char *label,
}
} else {
struct strbuf *buf = &state->buf;
+ int label_is_utf8 = 1; /* start with this assumption */
+ size_t max_len = buf->len + state->max_label_length;
/*
* Sanitize labels by replacing non-alpha-numeric characters
@@ -5394,14 +5455,34 @@ static const char *label_oid(struct object_id *oid, const char *label,
*
* Note that we retain non-ASCII UTF-8 characters (identified
* via the most significant bit). They should be all acceptable
- * in file names. We do not validate the UTF-8 here, that's not
- * the job of this function.
+ * in file names.
+ *
+ * As we will use the labels as names of (loose) refs, it is
+ * vital that the name not be longer than the maximum component
+ * size of the file system (`NAME_MAX`). We are careful to
+ * truncate the label accordingly, allowing for the `.lock`
+ * suffix and for the label to be UTF-8 encoded (i.e. we avoid
+ * truncating in the middle of a character).
*/
- for (; *label; label++)
- if ((*label & 0x80) || isalnum(*label))
+ for (; *label && buf->len + 1 < max_len; label++)
+ if (isalnum(*label) ||
+ (!label_is_utf8 && (*label & 0x80)))
strbuf_addch(buf, *label);
+ else if (*label & 0x80) {
+ const char *p = label;
+
+ utf8_width(&p, NULL);
+ if (p) {
+ if (buf->len + (p - label) > max_len)
+ break;
+ strbuf_add(buf, label, p - label);
+ label = p - 1;
+ } else {
+ label_is_utf8 = 0;
+ strbuf_addch(buf, *label);
+ }
/* avoid leading dash and double-dashes */
- else if (buf->len && buf->buf[buf->len - 1] != '-')
+ } else if (buf->len && buf->buf[buf->len - 1] != '-')
strbuf_addch(buf, '-');
if (!buf->len) {
strbuf_addstr(buf, "rev-");
@@ -5463,7 +5544,8 @@ static int make_script_with_merges(struct pretty_print_context *pp,
struct string_entry *entry;
struct oidset interesting = OIDSET_INIT, child_seen = OIDSET_INIT,
shown = OIDSET_INIT;
- struct label_state state = { OIDMAP_INIT, { NULL }, STRBUF_INIT };
+ struct label_state state =
+ { OIDMAP_INIT, { NULL }, STRBUF_INIT, GIT_MAX_LABEL_LENGTH };
int abbr = flags & TODO_LIST_ABBREVIATE_CMDS;
const char *cmd_pick = abbr ? "p" : "pick",
@@ -5471,6 +5553,8 @@ static int make_script_with_merges(struct pretty_print_context *pp,
*cmd_reset = abbr ? "t" : "reset",
*cmd_merge = abbr ? "m" : "merge";
+ git_config_get_int("rebase.maxlabellength", &state.max_label_length);
+
oidmap_init(&commit2todo, 0);
oidmap_init(&state.commit2label, 0);
hashmap_init(&state.labels, labels_cmp, NULL, 0);
@@ -5507,7 +5591,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
if (!is_empty && (commit->object.flags & PATCHSAME)) {
if (flags & TODO_LIST_WARN_SKIPPED_CHERRY_PICKS)
warning(_("skipped previously applied commit %s"),
- short_commit_name(commit));
+ short_commit_name(the_repository, commit));
skipped_commit = 1;
continue;
}
@@ -5743,7 +5827,7 @@ int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
if (!is_empty && (commit->object.flags & PATCHSAME)) {
if (flags & TODO_LIST_WARN_SKIPPED_CHERRY_PICKS)
warning(_("skipped previously applied commit %s"),
- short_commit_name(commit));
+ short_commit_name(r, commit));
skipped_commit = 1;
continue;
}
@@ -5835,7 +5919,8 @@ static void todo_list_add_exec_commands(struct todo_list *todo_list,
todo_list->alloc = alloc;
}
-static void todo_list_to_strbuf(struct repository *r, struct todo_list *todo_list,
+static void todo_list_to_strbuf(struct repository *r,
+ struct todo_list *todo_list,
struct strbuf *buf, int num, unsigned flags)
{
struct todo_item *item;
@@ -5864,7 +5949,7 @@ static void todo_list_to_strbuf(struct repository *r, struct todo_list *todo_lis
/* add commit id */
if (item->commit) {
const char *oid = flags & TODO_LIST_SHORTEN_IDS ?
- short_commit_name(item->commit) :
+ short_commit_name(r, item->commit) :
oid_to_hex(&item->commit->object.oid);
if (item->command == TODO_FIXUP) {
@@ -6172,7 +6257,7 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla
if (checkout_onto(r, opts, onto_name, &oid, orig_head))
goto cleanup;
- if (require_clean_work_tree(r, "rebase", "", 1, 1))
+ if (require_clean_work_tree(r, "rebase", NULL, 1, 1))
goto cleanup;
todo_list_write_total_nr(&new_todo);
@@ -6223,7 +6308,7 @@ static int skip_fixupish(const char *subject, const char **p) {
int todo_list_rearrange_squash(struct todo_list *todo_list)
{
struct hashmap subject2item;
- int rearranged = 0, *next, *tail, i, nr = 0, alloc = 0;
+ int rearranged = 0, *next, *tail, i, nr = 0;
char **subjects;
struct commit_todo_item commit_todo;
struct todo_item *items = NULL;
@@ -6335,6 +6420,8 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
}
if (rearranged) {
+ ALLOC_ARRAY(items, todo_list->nr);
+
for (i = 0; i < todo_list->nr; i++) {
enum todo_command command = todo_list->items[i].command;
int cur = i;
@@ -6347,16 +6434,15 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
continue;
while (cur >= 0) {
- ALLOC_GROW(items, nr + 1, alloc);
items[nr++] = todo_list->items[cur];
cur = next[cur];
}
}
+ assert(nr == todo_list->nr);
+ todo_list->alloc = nr;
FREE_AND_NULL(todo_list->items);
todo_list->items = items;
- todo_list->nr = nr;
- todo_list->alloc = alloc;
}
free(next);
diff --git a/serve.c b/serve.c
index 5329c91011..a1d71134d4 100644
--- a/serve.c
+++ b/serve.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "repository.h"
#include "config.h"
+#include "hash-ll.h"
#include "pkt-line.h"
#include "version.h"
#include "ls-refs.h"
diff --git a/server-info.c b/server-info.c
index 55aa04f00a..e2fe0f9143 100644
--- a/server-info.c
+++ b/server-info.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "dir.h"
#include "environment.h"
#include "hex.h"
@@ -9,11 +8,11 @@
#include "commit.h"
#include "tag.h"
#include "packfile.h"
+#include "path.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "server-info.h"
#include "strbuf.h"
-#include "wrapper.h"
struct update_info_ctx {
FILE *cur_fp;
diff --git a/setup.c b/setup.c
index 6f6e92b96b..2e607632db 100644
--- a/setup.c
+++ b/setup.c
@@ -1,18 +1,22 @@
#include "git-compat-util.h"
#include "abspath.h"
+#include "copy.h"
#include "environment.h"
+#include "exec-cmd.h"
#include "gettext.h"
#include "object-name.h"
+#include "refs.h"
#include "repository.h"
#include "config.h"
#include "dir.h"
#include "setup.h"
#include "string-list.h"
#include "chdir-notify.h"
+#include "path.h"
#include "promisor-remote.h"
#include "quote.h"
#include "trace2.h"
-#include "wrapper.h"
+#include "worktree.h"
static int inside_git_dir = -1;
static int inside_work_tree = -1;
@@ -517,7 +521,9 @@ no_prevention_needed:
startup_info->original_cwd = NULL;
}
-static int read_worktree_config(const char *var, const char *value, void *vdata)
+static int read_worktree_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *vdata)
{
struct repository_format *data = vdata;
@@ -588,13 +594,14 @@ static enum extension_result handle_extension(const char *var,
return EXTENSION_UNKNOWN;
}
-static int check_repo_format(const char *var, const char *value, void *vdata)
+static int check_repo_format(const char *var, const char *value,
+ const struct config_context *ctx, void *vdata)
{
struct repository_format *data = vdata;
const char *ext;
if (strcmp(var, "core.repositoryformatversion") == 0)
- data->version = git_config_int(var, value);
+ data->version = git_config_int(var, value, ctx->kvi);
else if (skip_prefix(var, "extensions.", &ext)) {
switch (handle_extension_v0(var, value, ext, data)) {
case EXTENSION_ERROR:
@@ -617,7 +624,7 @@ static int check_repo_format(const char *var, const char *value, void *vdata)
}
}
- return read_worktree_config(var, value, vdata);
+ return read_worktree_config(var, value, ctx, vdata);
}
static int check_repository_format_gently(const char *gitdir, struct repository_format *candidate, int *nongit_ok)
@@ -1115,7 +1122,8 @@ struct safe_directory_data {
int is_safe;
};
-static int safe_directory_cb(const char *key, const char *value, void *d)
+static int safe_directory_cb(const char *key, const char *value,
+ const struct config_context *ctx UNUSED, void *d)
{
struct safe_directory_data *data = d;
@@ -1171,7 +1179,9 @@ static int ensure_valid_ownership(const char *gitfile,
return data.is_safe;
}
-static int allowed_bare_repo_cb(const char *key, const char *value, void *d)
+static int allowed_bare_repo_cb(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *d)
{
enum allowed_bare_repo *allowed_bare_repo = d;
@@ -1211,19 +1221,6 @@ static const char *allowed_bare_repo_to_string(
return NULL;
}
-enum discovery_result {
- GIT_DIR_NONE = 0,
- GIT_DIR_EXPLICIT,
- GIT_DIR_DISCOVERED,
- GIT_DIR_BARE,
- /* these are errors */
- GIT_DIR_HIT_CEILING = -1,
- GIT_DIR_HIT_MOUNT_POINT = -2,
- GIT_DIR_INVALID_GITFILE = -3,
- GIT_DIR_INVALID_OWNERSHIP = -4,
- GIT_DIR_DISALLOWED_BARE = -5,
-};
-
/*
* We cannot decide in this function whether we are in the work tree or
* not, since the config can only be read _after_ this function was called.
@@ -1375,21 +1372,23 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
}
}
-int discover_git_directory(struct strbuf *commondir,
- struct strbuf *gitdir)
+enum discovery_result discover_git_directory_reason(struct strbuf *commondir,
+ struct strbuf *gitdir)
{
struct strbuf dir = STRBUF_INIT, err = STRBUF_INIT;
size_t gitdir_offset = gitdir->len, cwd_len;
size_t commondir_offset = commondir->len;
struct repository_format candidate = REPOSITORY_FORMAT_INIT;
+ enum discovery_result result;
if (strbuf_getcwd(&dir))
- return -1;
+ return GIT_DIR_CWD_FAILURE;
cwd_len = dir.len;
- if (setup_git_directory_gently_1(&dir, gitdir, NULL, 0) <= 0) {
+ result = setup_git_directory_gently_1(&dir, gitdir, NULL, 0);
+ if (result <= 0) {
strbuf_release(&dir);
- return -1;
+ return result;
}
/*
@@ -1419,11 +1418,11 @@ int discover_git_directory(struct strbuf *commondir,
strbuf_setlen(commondir, commondir_offset);
strbuf_setlen(gitdir, gitdir_offset);
clear_repository_format(&candidate);
- return -1;
+ return GIT_DIR_INVALID_FORMAT;
}
clear_repository_format(&candidate);
- return 0;
+ return result;
}
const char *setup_git_directory_gently(int *nongit_ok)
@@ -1505,10 +1504,11 @@ const char *setup_git_directory_gently(int *nongit_ok)
}
*nongit_ok = 1;
break;
- case GIT_DIR_NONE:
+ case GIT_DIR_CWD_FAILURE:
+ case GIT_DIR_INVALID_FORMAT:
/*
* As a safeguard against setup_git_directory_gently_1 returning
- * this value, fallthrough to BUG. Otherwise it is possible to
+ * these values, fallthrough to BUG. Otherwise it is possible to
* set startup_info->have_repository to 1 when we did nothing to
* find a repository.
*/
@@ -1705,3 +1705,491 @@ int daemonize(void)
return 0;
#endif
}
+
+#ifdef NO_TRUSTABLE_FILEMODE
+#define TEST_FILEMODE 0
+#else
+#define TEST_FILEMODE 1
+#endif
+
+#define GIT_DEFAULT_HASH_ENVIRONMENT "GIT_DEFAULT_HASH"
+
+static void copy_templates_1(struct strbuf *path, struct strbuf *template_path,
+ DIR *dir)
+{
+ size_t path_baselen = path->len;
+ size_t template_baselen = template_path->len;
+ struct dirent *de;
+
+ /* Note: if ".git/hooks" file exists in the repository being
+ * re-initialized, /etc/core-git/templates/hooks/update would
+ * cause "git init" to fail here. I think this is sane but
+ * it means that the set of templates we ship by default, along
+ * with the way the namespace under .git/ is organized, should
+ * be really carefully chosen.
+ */
+ safe_create_dir(path->buf, 1);
+ while ((de = readdir(dir)) != NULL) {
+ struct stat st_git, st_template;
+ int exists = 0;
+
+ strbuf_setlen(path, path_baselen);
+ strbuf_setlen(template_path, template_baselen);
+
+ if (de->d_name[0] == '.')
+ continue;
+ strbuf_addstr(path, de->d_name);
+ strbuf_addstr(template_path, de->d_name);
+ if (lstat(path->buf, &st_git)) {
+ if (errno != ENOENT)
+ die_errno(_("cannot stat '%s'"), path->buf);
+ }
+ else
+ exists = 1;
+
+ if (lstat(template_path->buf, &st_template))
+ die_errno(_("cannot stat template '%s'"), template_path->buf);
+
+ if (S_ISDIR(st_template.st_mode)) {
+ DIR *subdir = opendir(template_path->buf);
+ if (!subdir)
+ die_errno(_("cannot opendir '%s'"), template_path->buf);
+ strbuf_addch(path, '/');
+ strbuf_addch(template_path, '/');
+ copy_templates_1(path, template_path, subdir);
+ closedir(subdir);
+ }
+ else if (exists)
+ continue;
+ else if (S_ISLNK(st_template.st_mode)) {
+ struct strbuf lnk = STRBUF_INIT;
+ if (strbuf_readlink(&lnk, template_path->buf,
+ st_template.st_size) < 0)
+ die_errno(_("cannot readlink '%s'"), template_path->buf);
+ if (symlink(lnk.buf, path->buf))
+ die_errno(_("cannot symlink '%s' '%s'"),
+ lnk.buf, path->buf);
+ strbuf_release(&lnk);
+ }
+ else if (S_ISREG(st_template.st_mode)) {
+ if (copy_file(path->buf, template_path->buf, st_template.st_mode))
+ die_errno(_("cannot copy '%s' to '%s'"),
+ template_path->buf, path->buf);
+ }
+ else
+ error(_("ignoring template %s"), template_path->buf);
+ }
+}
+
+static void copy_templates(const char *template_dir, const char *init_template_dir)
+{
+ struct strbuf path = STRBUF_INIT;
+ struct strbuf template_path = STRBUF_INIT;
+ size_t template_len;
+ struct repository_format template_format = REPOSITORY_FORMAT_INIT;
+ struct strbuf err = STRBUF_INIT;
+ DIR *dir;
+ char *to_free = NULL;
+
+ if (!template_dir)
+ template_dir = getenv(TEMPLATE_DIR_ENVIRONMENT);
+ if (!template_dir)
+ template_dir = init_template_dir;
+ if (!template_dir)
+ template_dir = to_free = system_path(DEFAULT_GIT_TEMPLATE_DIR);
+ if (!template_dir[0]) {
+ free(to_free);
+ return;
+ }
+
+ strbuf_addstr(&template_path, template_dir);
+ strbuf_complete(&template_path, '/');
+ template_len = template_path.len;
+
+ dir = opendir(template_path.buf);
+ if (!dir) {
+ warning(_("templates not found in %s"), template_dir);
+ goto free_return;
+ }
+
+ /* Make sure that template is from the correct vintage */
+ strbuf_addstr(&template_path, "config");
+ read_repository_format(&template_format, template_path.buf);
+ strbuf_setlen(&template_path, template_len);
+
+ /*
+ * No mention of version at all is OK, but anything else should be
+ * verified.
+ */
+ if (template_format.version >= 0 &&
+ verify_repository_format(&template_format, &err) < 0) {
+ warning(_("not copying templates from '%s': %s"),
+ template_dir, err.buf);
+ strbuf_release(&err);
+ goto close_free_return;
+ }
+
+ strbuf_addstr(&path, get_git_common_dir());
+ strbuf_complete(&path, '/');
+ copy_templates_1(&path, &template_path, dir);
+close_free_return:
+ closedir(dir);
+free_return:
+ free(to_free);
+ strbuf_release(&path);
+ strbuf_release(&template_path);
+ clear_repository_format(&template_format);
+}
+
+/*
+ * If the git_dir is not directly inside the working tree, then git will not
+ * find it by default, and we need to set the worktree explicitly.
+ */
+static int needs_work_tree_config(const char *git_dir, const char *work_tree)
+{
+ if (!strcmp(work_tree, "/") && !strcmp(git_dir, "/.git"))
+ return 0;
+ if (skip_prefix(git_dir, work_tree, &git_dir) &&
+ !strcmp(git_dir, "/.git"))
+ return 0;
+ return 1;
+}
+
+void initialize_repository_version(int hash_algo, int reinit)
+{
+ char repo_version_string[10];
+ int repo_version = GIT_REPO_VERSION;
+
+ if (hash_algo != GIT_HASH_SHA1)
+ repo_version = GIT_REPO_VERSION_READ;
+
+ /* This forces creation of new config file */
+ xsnprintf(repo_version_string, sizeof(repo_version_string),
+ "%d", repo_version);
+ git_config_set("core.repositoryformatversion", repo_version_string);
+
+ if (hash_algo != GIT_HASH_SHA1)
+ git_config_set("extensions.objectformat",
+ hash_algos[hash_algo].name);
+ else if (reinit)
+ git_config_set_gently("extensions.objectformat", NULL);
+}
+
+static int create_default_files(const char *template_path,
+ const char *original_git_dir,
+ const char *initial_branch,
+ const struct repository_format *fmt,
+ int prev_bare_repository,
+ int init_shared_repository,
+ int quiet)
+{
+ struct stat st1;
+ struct strbuf buf = STRBUF_INIT;
+ char *path;
+ char junk[2];
+ int reinit;
+ int filemode;
+ struct strbuf err = STRBUF_INIT;
+ const char *init_template_dir = NULL;
+ const char *work_tree = get_git_work_tree();
+
+ /*
+ * First copy the templates -- we might have the default
+ * config file there, in which case we would want to read
+ * from it after installing.
+ *
+ * Before reading that config, we also need to clear out any cached
+ * values (since we've just potentially changed what's available on
+ * disk).
+ */
+ git_config_get_pathname("init.templatedir", &init_template_dir);
+ copy_templates(template_path, init_template_dir);
+ free((char *)init_template_dir);
+ git_config_clear();
+ reset_shared_repository();
+ git_config(git_default_config, NULL);
+
+ /*
+ * We must make sure command-line options continue to override any
+ * values we might have just re-read from the config.
+ */
+ if (init_shared_repository != -1)
+ set_shared_repository(init_shared_repository);
+ /*
+ * TODO: heed core.bare from config file in templates if no
+ * command-line override given
+ */
+ is_bare_repository_cfg = prev_bare_repository || !work_tree;
+ /* TODO (continued):
+ *
+ * Unfortunately, the line above is equivalent to
+ * is_bare_repository_cfg = !work_tree;
+ * which ignores the config entirely even if no `--[no-]bare`
+ * command line option was present.
+ *
+ * To see why, note that before this function, there was this call:
+ * prev_bare_repository = is_bare_repository()
+ * expanding the right hand side:
+ * = is_bare_repository_cfg && !get_git_work_tree()
+ * = is_bare_repository_cfg && !work_tree
+ * note that the last simplification above is valid because nothing
+ * calls repo_init() or set_git_work_tree() between any of the
+ * relevant calls in the code, and thus the !get_git_work_tree()
+ * calls will return the same result each time. So, what we are
+ * interested in computing is the right hand side of the line of
+ * code just above this comment:
+ * prev_bare_repository || !work_tree
+ * = is_bare_repository_cfg && !work_tree || !work_tree
+ * = !work_tree
+ * because "A && !B || !B == !B" for all boolean values of A & B.
+ */
+
+ /*
+ * We would have created the above under user's umask -- under
+ * shared-repository settings, we would need to fix them up.
+ */
+ if (get_shared_repository()) {
+ adjust_shared_perm(get_git_dir());
+ }
+
+ /*
+ * We need to create a "refs" dir in any case so that older
+ * versions of git can tell that this is a repository.
+ */
+ safe_create_dir(git_path("refs"), 1);
+ adjust_shared_perm(git_path("refs"));
+
+ if (refs_init_db(&err))
+ die("failed to set up refs db: %s", err.buf);
+
+ /*
+ * Point the HEAD symref to the initial branch with if HEAD does
+ * not yet exist.
+ */
+ path = git_path_buf(&buf, "HEAD");
+ reinit = (!access(path, R_OK)
+ || readlink(path, junk, sizeof(junk)-1) != -1);
+ if (!reinit) {
+ char *ref;
+
+ if (!initial_branch)
+ initial_branch = git_default_branch_name(quiet);
+
+ ref = xstrfmt("refs/heads/%s", initial_branch);
+ if (check_refname_format(ref, 0) < 0)
+ die(_("invalid initial branch name: '%s'"),
+ initial_branch);
+
+ if (create_symref("HEAD", ref, NULL) < 0)
+ exit(1);
+ free(ref);
+ }
+
+ initialize_repository_version(fmt->hash_algo, 0);
+
+ /* Check filemode trustability */
+ path = git_path_buf(&buf, "config");
+ filemode = TEST_FILEMODE;
+ if (TEST_FILEMODE && !lstat(path, &st1)) {
+ struct stat st2;
+ filemode = (!chmod(path, st1.st_mode ^ S_IXUSR) &&
+ !lstat(path, &st2) &&
+ st1.st_mode != st2.st_mode &&
+ !chmod(path, st1.st_mode));
+ if (filemode && !reinit && (st1.st_mode & S_IXUSR))
+ filemode = 0;
+ }
+ git_config_set("core.filemode", filemode ? "true" : "false");
+
+ if (is_bare_repository())
+ git_config_set("core.bare", "true");
+ else {
+ git_config_set("core.bare", "false");
+ /* allow template config file to override the default */
+ if (log_all_ref_updates == LOG_REFS_UNSET)
+ git_config_set("core.logallrefupdates", "true");
+ if (needs_work_tree_config(original_git_dir, work_tree))
+ git_config_set("core.worktree", work_tree);
+ }
+
+ if (!reinit) {
+ /* Check if symlink is supported in the work tree */
+ path = git_path_buf(&buf, "tXXXXXX");
+ if (!close(xmkstemp(path)) &&
+ !unlink(path) &&
+ !symlink("testing", path) &&
+ !lstat(path, &st1) &&
+ S_ISLNK(st1.st_mode))
+ unlink(path); /* good */
+ else
+ git_config_set("core.symlinks", "false");
+
+ /* Check if the filesystem is case-insensitive */
+ path = git_path_buf(&buf, "CoNfIg");
+ if (!access(path, F_OK))
+ git_config_set("core.ignorecase", "true");
+ probe_utf8_pathname_composition();
+ }
+
+ strbuf_release(&buf);
+ return reinit;
+}
+
+static void create_object_directory(void)
+{
+ struct strbuf path = STRBUF_INIT;
+ size_t baselen;
+
+ strbuf_addstr(&path, get_object_directory());
+ baselen = path.len;
+
+ safe_create_dir(path.buf, 1);
+
+ strbuf_setlen(&path, baselen);
+ strbuf_addstr(&path, "/pack");
+ safe_create_dir(path.buf, 1);
+
+ strbuf_setlen(&path, baselen);
+ strbuf_addstr(&path, "/info");
+ safe_create_dir(path.buf, 1);
+
+ strbuf_release(&path);
+}
+
+static void separate_git_dir(const char *git_dir, const char *git_link)
+{
+ struct stat st;
+
+ if (!stat(git_link, &st)) {
+ const char *src;
+
+ if (S_ISREG(st.st_mode))
+ src = read_gitfile(git_link);
+ else if (S_ISDIR(st.st_mode))
+ src = git_link;
+ else
+ die(_("unable to handle file type %d"), (int)st.st_mode);
+
+ if (rename(src, git_dir))
+ die_errno(_("unable to move %s to %s"), src, git_dir);
+ repair_worktrees(NULL, NULL);
+ }
+
+ write_file(git_link, "gitdir: %s", git_dir);
+}
+
+static void validate_hash_algorithm(struct repository_format *repo_fmt, int hash)
+{
+ const char *env = getenv(GIT_DEFAULT_HASH_ENVIRONMENT);
+ /*
+ * If we already have an initialized repo, don't allow the user to
+ * specify a different algorithm, as that could cause corruption.
+ * Otherwise, if the user has specified one on the command line, use it.
+ */
+ if (repo_fmt->version >= 0 && hash != GIT_HASH_UNKNOWN && hash != repo_fmt->hash_algo)
+ die(_("attempt to reinitialize repository with different hash"));
+ else if (hash != GIT_HASH_UNKNOWN)
+ repo_fmt->hash_algo = hash;
+ else if (env) {
+ int env_algo = hash_algo_by_name(env);
+ if (env_algo == GIT_HASH_UNKNOWN)
+ die(_("unknown hash algorithm '%s'"), env);
+ repo_fmt->hash_algo = env_algo;
+ }
+}
+
+int init_db(const char *git_dir, const char *real_git_dir,
+ const char *template_dir, int hash, const char *initial_branch,
+ int init_shared_repository, unsigned int flags)
+{
+ int reinit;
+ int exist_ok = flags & INIT_DB_EXIST_OK;
+ char *original_git_dir = real_pathdup(git_dir, 1);
+ struct repository_format repo_fmt = REPOSITORY_FORMAT_INIT;
+ int prev_bare_repository;
+
+ if (real_git_dir) {
+ struct stat st;
+
+ if (!exist_ok && !stat(git_dir, &st))
+ die(_("%s already exists"), git_dir);
+
+ if (!exist_ok && !stat(real_git_dir, &st))
+ die(_("%s already exists"), real_git_dir);
+
+ set_git_dir(real_git_dir, 1);
+ git_dir = get_git_dir();
+ separate_git_dir(git_dir, original_git_dir);
+ }
+ else {
+ set_git_dir(git_dir, 1);
+ git_dir = get_git_dir();
+ }
+ startup_info->have_repository = 1;
+
+ /* Ensure `core.hidedotfiles` is processed */
+ git_config(platform_core_config, NULL);
+
+ safe_create_dir(git_dir, 0);
+
+ prev_bare_repository = is_bare_repository();
+
+ /* Check to see if the repository version is right.
+ * Note that a newly created repository does not have
+ * config file, so this will not fail. What we are catching
+ * is an attempt to reinitialize new repository with an old tool.
+ */
+ check_repository_format(&repo_fmt);
+
+ validate_hash_algorithm(&repo_fmt, hash);
+
+ reinit = create_default_files(template_dir, original_git_dir,
+ initial_branch, &repo_fmt,
+ prev_bare_repository,
+ init_shared_repository,
+ flags & INIT_DB_QUIET);
+ if (reinit && initial_branch)
+ warning(_("re-init: ignored --initial-branch=%s"),
+ initial_branch);
+
+ create_object_directory();
+
+ if (get_shared_repository()) {
+ char buf[10];
+ /* We do not spell "group" and such, so that
+ * the configuration can be read by older version
+ * of git. Note, we use octal numbers for new share modes,
+ * and compatibility values for PERM_GROUP and
+ * PERM_EVERYBODY.
+ */
+ if (get_shared_repository() < 0)
+ /* force to the mode value */
+ xsnprintf(buf, sizeof(buf), "0%o", -get_shared_repository());
+ else if (get_shared_repository() == PERM_GROUP)
+ xsnprintf(buf, sizeof(buf), "%d", OLD_PERM_GROUP);
+ else if (get_shared_repository() == PERM_EVERYBODY)
+ xsnprintf(buf, sizeof(buf), "%d", OLD_PERM_EVERYBODY);
+ else
+ BUG("invalid value for shared_repository");
+ git_config_set("core.sharedrepository", buf);
+ git_config_set("receive.denyNonFastforwards", "true");
+ }
+
+ if (!(flags & INIT_DB_QUIET)) {
+ int len = strlen(git_dir);
+
+ if (reinit)
+ printf(get_shared_repository()
+ ? _("Reinitialized existing shared Git repository in %s%s\n")
+ : _("Reinitialized existing Git repository in %s%s\n"),
+ git_dir, len && git_dir[len-1] != '/' ? "/" : "");
+ else
+ printf(get_shared_repository()
+ ? _("Initialized empty shared Git repository in %s%s\n")
+ : _("Initialized empty Git repository in %s%s\n"),
+ git_dir, len && git_dir[len-1] != '/' ? "/" : "");
+ }
+
+ free(original_git_dir);
+ return 0;
+}
diff --git a/setup.h b/setup.h
index 4c1ca9d0c9..b48cf1c43b 100644
--- a/setup.h
+++ b/setup.h
@@ -42,16 +42,45 @@ const char *resolve_gitdir_gently(const char *suspect, int *return_error_code);
#define resolve_gitdir(path) resolve_gitdir_gently((path), NULL)
void setup_work_tree(void);
+
+/*
+ * discover_git_directory_reason() is similar to discover_git_directory(),
+ * except it returns an enum value instead. It is important to note that
+ * a zero-valued return here is actually GIT_DIR_NONE, which is different
+ * from discover_git_directory.
+ */
+enum discovery_result {
+ GIT_DIR_EXPLICIT = 1,
+ GIT_DIR_DISCOVERED = 2,
+ GIT_DIR_BARE = 3,
+ /* these are errors */
+ GIT_DIR_HIT_CEILING = -1,
+ GIT_DIR_HIT_MOUNT_POINT = -2,
+ GIT_DIR_INVALID_GITFILE = -3,
+ GIT_DIR_INVALID_OWNERSHIP = -4,
+ GIT_DIR_DISALLOWED_BARE = -5,
+ GIT_DIR_INVALID_FORMAT = -6,
+ GIT_DIR_CWD_FAILURE = -7,
+};
+enum discovery_result discover_git_directory_reason(struct strbuf *commondir,
+ struct strbuf *gitdir);
+
/*
* Find the commondir and gitdir of the repository that contains the current
* working directory, without changing the working directory or other global
* state. The result is appended to commondir and gitdir. If the discovered
* gitdir does not correspond to a worktree, then 'commondir' and 'gitdir' will
* both have the same result appended to the buffer. The return value is
- * either 0 upon success and non-zero if no repository was found.
+ * either 0 upon success and -1 if no repository was found.
*/
-int discover_git_directory(struct strbuf *commondir,
- struct strbuf *gitdir);
+static inline int discover_git_directory(struct strbuf *commondir,
+ struct strbuf *gitdir)
+{
+ if (discover_git_directory_reason(commondir, gitdir) <= 0)
+ return -1;
+ return 0;
+}
+
const char *setup_git_directory_gently(int *);
const char *setup_git_directory(void);
char *prefix_path(const char *prefix, int len, const char *path);
@@ -140,6 +169,15 @@ int verify_repository_format(const struct repository_format *format,
*/
void check_repository_format(struct repository_format *fmt);
+#define INIT_DB_QUIET 0x0001
+#define INIT_DB_EXIST_OK 0x0002
+
+int init_db(const char *git_dir, const char *real_git_dir,
+ const char *template_dir, int hash_algo,
+ const char *initial_branch, int init_shared_repository,
+ unsigned int flags);
+void initialize_repository_version(int hash_algo, int reinit);
+
/*
* NOTE NOTE NOTE!!
*
diff --git a/sha1/openssl.h b/sha1/openssl.h
new file mode 100644
index 0000000000..006c1f4ba5
--- /dev/null
+++ b/sha1/openssl.h
@@ -0,0 +1,49 @@
+/* wrappers for the EVP API of OpenSSL 3+ */
+#ifndef SHA1_OPENSSL_H
+#define SHA1_OPENSSL_H
+#include <openssl/evp.h>
+
+struct openssl_SHA1_CTX {
+ EVP_MD_CTX *ectx;
+};
+
+typedef struct openssl_SHA1_CTX openssl_SHA1_CTX;
+
+static inline void openssl_SHA1_Init(struct openssl_SHA1_CTX *ctx)
+{
+ const EVP_MD *type = EVP_sha1();
+
+ ctx->ectx = EVP_MD_CTX_new();
+ if (!ctx->ectx)
+ die("EVP_MD_CTX_new: out of memory");
+
+ EVP_DigestInit_ex(ctx->ectx, type, NULL);
+}
+
+static inline void openssl_SHA1_Update(struct openssl_SHA1_CTX *ctx,
+ const void *data,
+ size_t len)
+{
+ EVP_DigestUpdate(ctx->ectx, data, len);
+}
+
+static inline void openssl_SHA1_Final(unsigned char *digest,
+ struct openssl_SHA1_CTX *ctx)
+{
+ EVP_DigestFinal_ex(ctx->ectx, digest, NULL);
+ EVP_MD_CTX_free(ctx->ectx);
+}
+
+static inline void openssl_SHA1_Clone(struct openssl_SHA1_CTX *dst,
+ const struct openssl_SHA1_CTX *src)
+{
+ EVP_MD_CTX_copy_ex(dst->ectx, src->ectx);
+}
+
+#define platform_SHA_CTX openssl_SHA1_CTX
+#define platform_SHA1_Init openssl_SHA1_Init
+#define platform_SHA1_Clone openssl_SHA1_Clone
+#define platform_SHA1_Update openssl_SHA1_Update
+#define platform_SHA1_Final openssl_SHA1_Final
+
+#endif /* SHA1_OPENSSL_H */
diff --git a/sha256/gcrypt.h b/sha256/gcrypt.h
index 501da5ed91..17a90f1052 100644
--- a/sha256/gcrypt.h
+++ b/sha256/gcrypt.h
@@ -7,22 +7,25 @@
typedef gcry_md_hd_t gcrypt_SHA256_CTX;
-inline void gcrypt_SHA256_Init(gcrypt_SHA256_CTX *ctx)
+static inline void gcrypt_SHA256_Init(gcrypt_SHA256_CTX *ctx)
{
- gcry_md_open(ctx, GCRY_MD_SHA256, 0);
+ gcry_error_t err = gcry_md_open(ctx, GCRY_MD_SHA256, 0);
+ if (err)
+ die("gcry_md_open: %s", gcry_strerror(err));
}
-inline void gcrypt_SHA256_Update(gcrypt_SHA256_CTX *ctx, const void *data, size_t len)
+static inline void gcrypt_SHA256_Update(gcrypt_SHA256_CTX *ctx, const void *data, size_t len)
{
gcry_md_write(*ctx, data, len);
}
-inline void gcrypt_SHA256_Final(unsigned char *digest, gcrypt_SHA256_CTX *ctx)
+static inline void gcrypt_SHA256_Final(unsigned char *digest, gcrypt_SHA256_CTX *ctx)
{
memcpy(digest, gcry_md_read(*ctx, GCRY_MD_SHA256), SHA256_DIGEST_SIZE);
+ gcry_md_close(*ctx);
}
-inline void gcrypt_SHA256_Clone(gcrypt_SHA256_CTX *dst, const gcrypt_SHA256_CTX *src)
+static inline void gcrypt_SHA256_Clone(gcrypt_SHA256_CTX *dst, const gcrypt_SHA256_CTX *src)
{
gcry_md_copy(dst, *src);
}
diff --git a/sha256/openssl.h b/sha256/openssl.h
new file mode 100644
index 0000000000..c1083d9491
--- /dev/null
+++ b/sha256/openssl.h
@@ -0,0 +1,49 @@
+/* wrappers for the EVP API of OpenSSL 3+ */
+#ifndef SHA256_OPENSSL_H
+#define SHA256_OPENSSL_H
+#include <openssl/evp.h>
+
+struct openssl_SHA256_CTX {
+ EVP_MD_CTX *ectx;
+};
+
+typedef struct openssl_SHA256_CTX openssl_SHA256_CTX;
+
+static inline void openssl_SHA256_Init(struct openssl_SHA256_CTX *ctx)
+{
+ const EVP_MD *type = EVP_sha256();
+
+ ctx->ectx = EVP_MD_CTX_new();
+ if (!ctx->ectx)
+ die("EVP_MD_CTX_new: out of memory");
+
+ EVP_DigestInit_ex(ctx->ectx, type, NULL);
+}
+
+static inline void openssl_SHA256_Update(struct openssl_SHA256_CTX *ctx,
+ const void *data,
+ size_t len)
+{
+ EVP_DigestUpdate(ctx->ectx, data, len);
+}
+
+static inline void openssl_SHA256_Final(unsigned char *digest,
+ struct openssl_SHA256_CTX *ctx)
+{
+ EVP_DigestFinal_ex(ctx->ectx, digest, NULL);
+ EVP_MD_CTX_free(ctx->ectx);
+}
+
+static inline void openssl_SHA256_Clone(struct openssl_SHA256_CTX *dst,
+ const struct openssl_SHA256_CTX *src)
+{
+ EVP_MD_CTX_copy_ex(dst->ectx, src->ectx);
+}
+
+#define platform_SHA256_CTX openssl_SHA256_CTX
+#define platform_SHA256_Init openssl_SHA256_Init
+#define platform_SHA256_Clone openssl_SHA256_Clone
+#define platform_SHA256_Update openssl_SHA256_Update
+#define platform_SHA256_Final openssl_SHA256_Final
+
+#endif /* SHA256_OPENSSL_H */
diff --git a/shallow.c b/shallow.c
index 128f56179e..5413719fd4 100644
--- a/shallow.c
+++ b/shallow.c
@@ -1,24 +1,24 @@
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "hex.h"
#include "repository.h"
#include "tempfile.h"
#include "lockfile.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
#include "tag.h"
#include "pkt-line.h"
#include "remote.h"
#include "refs.h"
#include "oid-array.h"
+#include "path.h"
#include "diff.h"
#include "revision.h"
#include "commit-slab.h"
#include "list-objects.h"
#include "commit-reach.h"
#include "shallow.h"
+#include "statinfo.h"
#include "trace.h"
-#include "wrapper.h"
void set_alternate_shallow_file(struct repository *r, const char *path, int override)
{
diff --git a/sigchain.c b/sigchain.c
index ee778c0580..66123bdbab 100644
--- a/sigchain.c
+++ b/sigchain.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "sigchain.h"
#define SIGCHAIN_MAX_SIGNALS 32
diff --git a/sparse-index.c b/sparse-index.c
index 886054729e..3578feb283 100644
--- a/sparse-index.c
+++ b/sparse-index.c
@@ -1,7 +1,8 @@
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "environment.h"
#include "gettext.h"
+#include "name-hash.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "sparse-index.h"
#include "tree.h"
@@ -10,7 +11,7 @@
#include "cache-tree.h"
#include "config.h"
#include "dir.h"
-#include "fsmonitor.h"
+#include "fsmonitor-ll.h"
struct modify_index_context {
struct index_state *write;
@@ -390,7 +391,7 @@ void expand_index(struct index_state *istate, struct pattern_list *pl)
strbuf_setlen(&base, 0);
strbuf_add(&base, ce->name, strlen(ce->name));
- read_tree_at(istate->repo, tree, &base, &ps,
+ read_tree_at(istate->repo, tree, &base, 0, &ps,
add_path_to_index, &ctx);
/* free directory entries. full entries are re-used */
diff --git a/sparse-index.h b/sparse-index.h
index 59a92d819e..a16f3e67d7 100644
--- a/sparse-index.h
+++ b/sparse-index.h
@@ -37,4 +37,6 @@ struct pattern_list;
*/
void expand_index(struct index_state *istate, struct pattern_list *pl);
+void ensure_full_index(struct index_state *istate);
+
#endif
diff --git a/split-index.c b/split-index.c
index 40e54760b3..8c38687c04 100644
--- a/split-index.c
+++ b/split-index.c
@@ -1,8 +1,8 @@
-#include "cache.h"
-#include "alloc.h"
+#include "git-compat-util.h"
#include "gettext.h"
#include "hash.h"
#include "mem-pool.h"
+#include "read-cache-ll.h"
#include "split-index.h"
#include "strbuf.h"
#include "ewah/ewok.h"
diff --git a/statinfo.c b/statinfo.c
new file mode 100644
index 0000000000..17bb8966c3
--- /dev/null
+++ b/statinfo.c
@@ -0,0 +1,87 @@
+#include "git-compat-util.h"
+#include "environment.h"
+#include "statinfo.h"
+
+void fill_stat_data(struct stat_data *sd, struct stat *st)
+{
+ sd->sd_ctime.sec = (unsigned int)st->st_ctime;
+ sd->sd_mtime.sec = (unsigned int)st->st_mtime;
+ sd->sd_ctime.nsec = ST_CTIME_NSEC(*st);
+ sd->sd_mtime.nsec = ST_MTIME_NSEC(*st);
+ sd->sd_dev = st->st_dev;
+ sd->sd_ino = st->st_ino;
+ sd->sd_uid = st->st_uid;
+ sd->sd_gid = st->st_gid;
+ sd->sd_size = st->st_size;
+}
+
+int match_stat_data(const struct stat_data *sd, struct stat *st)
+{
+ int changed = 0;
+
+ if (sd->sd_mtime.sec != (unsigned int)st->st_mtime)
+ changed |= MTIME_CHANGED;
+ if (trust_ctime && check_stat &&
+ sd->sd_ctime.sec != (unsigned int)st->st_ctime)
+ changed |= CTIME_CHANGED;
+
+#ifdef USE_NSEC
+ if (check_stat && sd->sd_mtime.nsec != ST_MTIME_NSEC(*st))
+ changed |= MTIME_CHANGED;
+ if (trust_ctime && check_stat &&
+ sd->sd_ctime.nsec != ST_CTIME_NSEC(*st))
+ changed |= CTIME_CHANGED;
+#endif
+
+ if (check_stat) {
+ if (sd->sd_uid != (unsigned int) st->st_uid ||
+ sd->sd_gid != (unsigned int) st->st_gid)
+ changed |= OWNER_CHANGED;
+ if (sd->sd_ino != (unsigned int) st->st_ino)
+ changed |= INODE_CHANGED;
+ }
+
+#ifdef USE_STDEV
+ /*
+ * st_dev breaks on network filesystems where different
+ * clients will have different views of what "device"
+ * the filesystem is on
+ */
+ if (check_stat && sd->sd_dev != (unsigned int) st->st_dev)
+ changed |= INODE_CHANGED;
+#endif
+
+ if (sd->sd_size != (unsigned int) st->st_size)
+ changed |= DATA_CHANGED;
+
+ return changed;
+}
+
+void stat_validity_clear(struct stat_validity *sv)
+{
+ FREE_AND_NULL(sv->sd);
+}
+
+int stat_validity_check(struct stat_validity *sv, const char *path)
+{
+ struct stat st;
+
+ if (stat(path, &st) < 0)
+ return sv->sd == NULL;
+ if (!sv->sd)
+ return 0;
+ return S_ISREG(st.st_mode) && !match_stat_data(sv->sd, &st);
+}
+
+void stat_validity_update(struct stat_validity *sv, int fd)
+{
+ struct stat st;
+
+ if (fstat(fd, &st) < 0 || !S_ISREG(st.st_mode))
+ stat_validity_clear(sv);
+ else {
+ if (!sv->sd)
+ CALLOC_ARRAY(sv->sd, 1);
+ fill_stat_data(sv->sd, &st);
+ }
+}
diff --git a/statinfo.h b/statinfo.h
index fe8df633a4..700f502ac0 100644
--- a/statinfo.h
+++ b/statinfo.h
@@ -1,6 +1,8 @@
#ifndef STATINFO_H
#define STATINFO_H
+struct index_state;
+
/*
* The "cache_time" is just the low 32 bits of the
* time. It doesn't matter if it overflows - we only
@@ -21,6 +23,55 @@ struct stat_data {
unsigned int sd_size;
};
+/*
+ * A struct to encapsulate the concept of whether a file has changed
+ * since we last checked it. This uses criteria similar to those used
+ * for the index.
+ */
+struct stat_validity {
+ struct stat_data *sd;
+};
+
+#define MTIME_CHANGED 0x0001
+#define CTIME_CHANGED 0x0002
+#define OWNER_CHANGED 0x0004
+#define MODE_CHANGED 0x0008
+#define INODE_CHANGED 0x0010
+#define DATA_CHANGED 0x0020
+#define TYPE_CHANGED 0x0040
+
+/*
+ * Record to sd the data from st that we use to check whether a file
+ * might have changed.
+ */
+void fill_stat_data(struct stat_data *sd, struct stat *st);
+
+/*
+ * Return 0 if st is consistent with a file not having been changed
+ * since sd was filled. If there are differences, return a
+ * combination of MTIME_CHANGED, CTIME_CHANGED, OWNER_CHANGED,
+ * INODE_CHANGED, and DATA_CHANGED.
+ */
+int match_stat_data(const struct stat_data *sd, struct stat *st);
+
+void stat_validity_clear(struct stat_validity *sv);
+
+/*
+ * Returns 1 if the path is a regular file (or a symlink to a regular
+ * file) and matches the saved stat_validity, 0 otherwise. A missing
+ * or inaccessible file is considered a match if the struct was just
+ * initialized, or if the previous update found an inaccessible file.
+ */
+int stat_validity_check(struct stat_validity *sv, const char *path);
+
+/*
+ * Update the stat_validity from a file opened at descriptor fd. If
+ * the file is missing, inaccessible, or not a regular file, then
+ * future calls to stat_validity_check will match iff one of those
+ * conditions continues to be true.
+ */
+void stat_validity_update(struct stat_validity *sv, int fd);
+
#if defined(DT_UNKNOWN) && !defined(NO_D_TYPE_IN_DIRENT)
#define DTYPE(de) ((de)->d_type)
#else
diff --git a/strbuf.c b/strbuf.c
index 31dc48c0ab..4c9ac6dc5e 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,16 +1,10 @@
#include "git-compat-util.h"
-#include "abspath.h"
-#include "alloc.h"
-#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "object-name.h"
-#include "refs.h"
-#include "repository.h"
+#include "strbuf.h"
#include "string-list.h"
#include "utf8.h"
#include "date.h"
-#include "wrapper.h"
int starts_with(const char *str, const char *prefix)
{
@@ -365,7 +359,8 @@ static void add_lines(struct strbuf *out,
strbuf_complete_line(out);
}
-void strbuf_add_commented_lines(struct strbuf *out, const char *buf, size_t size)
+void strbuf_add_commented_lines(struct strbuf *out, const char *buf,
+ size_t size, char comment_line_char)
{
static char prefix1[3];
static char prefix2[2];
@@ -377,7 +372,8 @@ void strbuf_add_commented_lines(struct strbuf *out, const char *buf, size_t size
add_lines(out, prefix1, prefix2, buf, size);
}
-void strbuf_commented_addf(struct strbuf *sb, const char *fmt, ...)
+void strbuf_commented_addf(struct strbuf *sb, char comment_line_char,
+ const char *fmt, ...)
{
va_list params;
struct strbuf buf = STRBUF_INIT;
@@ -387,7 +383,7 @@ void strbuf_commented_addf(struct strbuf *sb, const char *fmt, ...)
strbuf_vaddf(&buf, fmt, params);
va_end(params);
- strbuf_add_commented_lines(sb, buf.buf, buf.len);
+ strbuf_add_commented_lines(sb, buf.buf, buf.len, comment_line_char);
if (incomplete_line)
sb->buf[--sb->len] = '\0';
@@ -415,36 +411,19 @@ void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap)
strbuf_setlen(sb, sb->len + len);
}
-void strbuf_expand(struct strbuf *sb, const char *format, expand_fn_t fn,
- void *context)
+int strbuf_expand_step(struct strbuf *sb, const char **formatp)
{
- for (;;) {
- const char *percent;
- size_t consumed;
-
- percent = strchrnul(format, '%');
- strbuf_add(sb, format, percent - format);
- if (!*percent)
- break;
- format = percent + 1;
-
- if (*format == '%') {
- strbuf_addch(sb, '%');
- format++;
- continue;
- }
+ const char *format = *formatp;
+ const char *percent = strchrnul(format, '%');
- consumed = fn(sb, format, context);
- if (consumed)
- format += consumed;
- else
- strbuf_addch(sb, '%');
- }
+ strbuf_add(sb, format, percent - format);
+ if (!*percent)
+ return 0;
+ *formatp = percent + 1;
+ return 1;
}
-size_t strbuf_expand_literal_cb(struct strbuf *sb,
- const char *placeholder,
- void *context UNUSED)
+size_t strbuf_expand_literal(struct strbuf *sb, const char *placeholder)
{
int ch;
@@ -463,22 +442,6 @@ size_t strbuf_expand_literal_cb(struct strbuf *sb,
return 0;
}
-size_t strbuf_expand_dict_cb(struct strbuf *sb, const char *placeholder,
- void *context)
-{
- struct strbuf_expand_dict_entry *e = context;
- size_t len;
-
- for (; e->placeholder && (len = strlen(e->placeholder)); e++) {
- if (!strncmp(placeholder, e->placeholder, len)) {
- if (e->value)
- strbuf_addstr(sb, e->value);
- return len;
- }
- }
- return 0;
-}
-
void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src)
{
size_t i, len = src->len;
@@ -816,25 +779,6 @@ void strbuf_addstr_xml_quoted(struct strbuf *buf, const char *s)
}
}
-int is_rfc3986_reserved_or_unreserved(char ch)
-{
- if (is_rfc3986_unreserved(ch))
- return 1;
- switch (ch) {
- case '!': case '*': case '\'': case '(': case ')': case ';':
- case ':': case '@': case '&': case '=': case '+': case '$':
- case ',': case '/': case '?': case '#': case '[': case ']':
- return 1;
- }
- return 0;
-}
-
-int is_rfc3986_unreserved(char ch)
-{
- return isalnum(ch) ||
- ch == '-' || ch == '_' || ch == '.' || ch == '~';
-}
-
static void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len,
char_predicate allow_unencoded_fn)
{
@@ -905,42 +849,6 @@ void strbuf_humanise_rate(struct strbuf *buf, off_t bytes)
strbuf_humanise(buf, bytes, 1);
}
-void strbuf_add_absolute_path(struct strbuf *sb, const char *path)
-{
- if (!*path)
- die("The empty string is not a valid path");
- if (!is_absolute_path(path)) {
- struct stat cwd_stat, pwd_stat;
- size_t orig_len = sb->len;
- char *cwd = xgetcwd();
- char *pwd = getenv("PWD");
- if (pwd && strcmp(pwd, cwd) &&
- !stat(cwd, &cwd_stat) &&
- (cwd_stat.st_dev || cwd_stat.st_ino) &&
- !stat(pwd, &pwd_stat) &&
- pwd_stat.st_dev == cwd_stat.st_dev &&
- pwd_stat.st_ino == cwd_stat.st_ino)
- strbuf_addstr(sb, pwd);
- else
- strbuf_addstr(sb, cwd);
- if (sb->len > orig_len && !is_dir_sep(sb->buf[sb->len - 1]))
- strbuf_addch(sb, '/');
- free(cwd);
- }
- strbuf_addstr(sb, path);
-}
-
-void strbuf_add_real_path(struct strbuf *sb, const char *path)
-{
- if (sb->len) {
- struct strbuf resolved = STRBUF_INIT;
- strbuf_realpath(&resolved, path, 1);
- strbuf_addbuf(sb, &resolved);
- strbuf_release(&resolved);
- } else
- strbuf_realpath(sb, path, 1);
-}
-
int printf_ln(const char *fmt, ...)
{
int ret;
@@ -1027,37 +935,20 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
* we want for %z, but the computation for %s has to convert to number
* of seconds.
*/
- for (;;) {
- const char *percent = strchrnul(fmt, '%');
- strbuf_add(&munged_fmt, fmt, percent - fmt);
- if (!*percent)
- break;
- fmt = percent + 1;
- switch (*fmt) {
- case '%':
+ while (strbuf_expand_step(&munged_fmt, &fmt)) {
+ if (skip_prefix(fmt, "%", &fmt))
strbuf_addstr(&munged_fmt, "%%");
- fmt++;
- break;
- case 's':
+ else if (skip_prefix(fmt, "s", &fmt))
strbuf_addf(&munged_fmt, "%"PRItime,
(timestamp_t)tm_to_time_t(tm) -
3600 * (tz_offset / 100) -
60 * (tz_offset % 100));
- fmt++;
- break;
- case 'z':
+ else if (skip_prefix(fmt, "z", &fmt))
strbuf_addf(&munged_fmt, "%+05d", tz_offset);
- fmt++;
- break;
- case 'Z':
- if (suppress_tz_name) {
- fmt++;
- break;
- }
- /* FALLTHROUGH */
- default:
+ else if (suppress_tz_name && skip_prefix(fmt, "Z", &fmt))
+ ; /* nothing */
+ else
strbuf_addch(&munged_fmt, '%');
- }
}
fmt = munged_fmt.buf;
@@ -1085,21 +976,6 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
strbuf_setlen(sb, sb->len + len);
}
-void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo,
- const struct object_id *oid, int abbrev_len)
-{
- int r;
- strbuf_grow(sb, GIT_MAX_HEXSZ + 1);
- r = repo_find_unique_abbrev_r(repo, sb->buf + sb->len, oid, abbrev_len);
- strbuf_setlen(sb, sb->len + r);
-}
-
-void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
- int abbrev_len)
-{
- strbuf_repo_add_unique_abbrev(sb, the_repository, oid, abbrev_len);
-}
-
/*
* Returns the length of a line, without trailing spaces.
*
@@ -1129,10 +1005,10 @@ static size_t cleanup(char *line, size_t len)
*
* If last line does not have a newline at the end, one is added.
*
- * Enable skip_comments to skip every line starting with comment
- * character.
+ * Pass a non-NUL comment_line_char to skip every line starting
+ * with it.
*/
-void strbuf_stripspace(struct strbuf *sb, int skip_comments)
+void strbuf_stripspace(struct strbuf *sb, char comment_line_char)
{
size_t empties = 0;
size_t i, j, len, newlen;
@@ -1145,7 +1021,8 @@ void strbuf_stripspace(struct strbuf *sb, int skip_comments)
eol = memchr(sb->buf + i, '\n', sb->len - i);
len = eol ? eol - (sb->buf + i) + 1 : sb->len - i;
- if (skip_comments && len && sb->buf[i] == comment_line_char) {
+ if (comment_line_char && len &&
+ sb->buf[i] == comment_line_char) {
newlen = 0;
continue;
}
@@ -1166,26 +1043,6 @@ void strbuf_stripspace(struct strbuf *sb, int skip_comments)
strbuf_setlen(sb, j);
}
-int strbuf_normalize_path(struct strbuf *src)
-{
- struct strbuf dst = STRBUF_INIT;
-
- strbuf_grow(&dst, src->len);
- if (normalize_path_copy(dst.buf, src->buf) < 0) {
- strbuf_release(&dst);
- return -1;
- }
-
- /*
- * normalize_path does not tell us the new length, so we have to
- * compute it by looking for the new NUL it placed
- */
- strbuf_setlen(&dst, strlen(dst.buf));
- strbuf_swap(src, &dst);
- strbuf_release(&dst);
- return 0;
-}
-
void strbuf_strip_file_from_path(struct strbuf *sb)
{
char *path_sep = find_last_dir_sep(sb->buf);
diff --git a/strbuf.h b/strbuf.h
index 0e69b656bc..fd43c46433 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -1,6 +1,14 @@
#ifndef STRBUF_H
#define STRBUF_H
+/*
+ * NOTE FOR STRBUF DEVELOPERS
+ *
+ * strbuf is a low-level primitive; as such it should interact only
+ * with other low-level primitives. Do not introduce new functions
+ * which interact with higher-level APIs.
+ */
+
struct string_list;
/**
@@ -72,10 +80,6 @@ struct strbuf {
extern char strbuf_slopbuf[];
#define STRBUF_INIT { .buf = strbuf_slopbuf }
-/*
- * Predeclare this here, since cache.h includes this file before it defines the
- * struct.
- */
struct object_id;
/**
@@ -283,7 +287,8 @@ void strbuf_splice(struct strbuf *sb, size_t pos, size_t len,
* by a comment character and a blank.
*/
void strbuf_add_commented_lines(struct strbuf *out,
- const char *buf, size_t size);
+ const char *buf, size_t size,
+ char comment_line_char);
/**
@@ -318,58 +323,19 @@ const char *strbuf_join_argv(struct strbuf *buf, int argc,
const char **argv, char delim);
/**
- * This function can be used to expand a format string containing
- * placeholders. To that end, it parses the string and calls the specified
- * function for every percent sign found.
- *
- * The callback function is given a pointer to the character after the `%`
- * and a pointer to the struct strbuf. It is expected to add the expanded
- * version of the placeholder to the strbuf, e.g. to add a newline
- * character if the letter `n` appears after a `%`. The function returns
- * the length of the placeholder recognized and `strbuf_expand()` skips
- * over it.
- *
- * The format `%%` is automatically expanded to a single `%` as a quoting
- * mechanism; callers do not need to handle the `%` placeholder themselves,
- * and the callback function will not be invoked for this placeholder.
- *
- * All other characters (non-percent and not skipped ones) are copied
- * verbatim to the strbuf. If the callback returned zero, meaning that the
- * placeholder is unknown, then the percent sign is copied, too.
- *
- * In order to facilitate caching and to make it possible to give
- * parameters to the callback, `strbuf_expand()` passes a context
- * pointer with any kind of data.
+ * Used with `strbuf_expand_step` to expand the literals %n and %x
+ * followed by two hexadecimal digits. Returns the number of recognized
+ * characters.
*/
-typedef size_t (*expand_fn_t) (struct strbuf *sb,
- const char *placeholder,
- void *context);
-void strbuf_expand(struct strbuf *sb,
- const char *format,
- expand_fn_t fn,
- void *context);
+size_t strbuf_expand_literal(struct strbuf *sb, const char *placeholder);
/**
- * Used as callback for `strbuf_expand` to only expand literals
- * (i.e. %n and %xNN). The context argument is ignored.
+ * If the string pointed to by `formatp` contains a percent sign ("%"),
+ * advance it to point to the character following the next one and
+ * return 1, otherwise return 0. Append the substring before that
+ * percent sign to `sb`, or the whole string if there is none.
*/
-size_t strbuf_expand_literal_cb(struct strbuf *sb,
- const char *placeholder,
- void *context);
-
-/**
- * Used as callback for `strbuf_expand()`, expects an array of
- * struct strbuf_expand_dict_entry as context, i.e. pairs of
- * placeholder and replacement string. The array needs to be
- * terminated by an entry with placeholder set to NULL.
- */
-struct strbuf_expand_dict_entry {
- const char *placeholder;
- const char *value;
-};
-size_t strbuf_expand_dict_cb(struct strbuf *sb,
- const char *placeholder,
- void *context);
+int strbuf_expand_step(struct strbuf *sb, const char **formatp);
/**
* Append the contents of one strbuf to another, quoting any
@@ -412,8 +378,8 @@ void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
* Add a formatted string prepended by a comment character and a
* blank to the buffer.
*/
-__attribute__((format (printf, 2, 3)))
-void strbuf_commented_addf(struct strbuf *sb, const char *fmt, ...);
+__attribute__((format (printf, 3, 4)))
+void strbuf_commented_addf(struct strbuf *sb, char comment_line_char, const char *fmt, ...);
__attribute__((format (printf,2,0)))
void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap);
@@ -540,28 +506,6 @@ int strbuf_getwholeline_fd(struct strbuf *sb, int fd, int term);
int strbuf_getcwd(struct strbuf *sb);
/**
- * Add a path to a buffer, converting a relative path to an
- * absolute one in the process. Symbolic links are not
- * resolved.
- */
-void strbuf_add_absolute_path(struct strbuf *sb, const char *path);
-
-/**
- * Canonize `path` (make it absolute, resolve symlinks, remove extra
- * slashes) and append it to `sb`. Die with an informative error
- * message if there is a problem.
- *
- * The directory part of `path` (i.e., everything up to the last
- * dir_sep) must denote a valid, existing directory, but the last
- * component need not exist.
- *
- * Callers that don't mind links should use the more lightweight
- * strbuf_add_absolute_path() instead.
- */
-void strbuf_add_real_path(struct strbuf *sb, const char *path);
-
-
-/**
* Normalize in-place the path contained in the strbuf. See
* normalize_path_copy() for details. If an error occurs, the contents of "sb"
* are left untouched, and -1 is returned.
@@ -569,10 +513,11 @@ void strbuf_add_real_path(struct strbuf *sb, const char *path);
int strbuf_normalize_path(struct strbuf *sb);
/**
- * Strip whitespace from a buffer. The second parameter controls if
- * comments are considered contents to be removed or not.
+ * Strip whitespace from a buffer. If comment_line_char is non-NUL,
+ * then lines beginning with that character are considered comments,
+ * thus removed.
*/
-void strbuf_stripspace(struct strbuf *buf, int skip_comments);
+void strbuf_stripspace(struct strbuf *buf, char comment_line_char);
static inline int strbuf_strip_suffix(struct strbuf *sb, const char *suffix)
{
@@ -642,16 +587,6 @@ void strbuf_add_separated_string_list(struct strbuf *str,
*/
void strbuf_list_free(struct strbuf **list);
-/**
- * Add the abbreviation, as generated by repo_find_unique_abbrev(), of `sha1` to
- * the strbuf `sb`.
- */
-struct repository;
-void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo,
- const struct object_id *oid, int abbrev_len);
-void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
- int abbrev_len);
-
/*
* Remove the filename from the provided path string. If the path
* contains a trailing separator, then the path is considered a directory
@@ -716,9 +651,6 @@ int strbuf_check_branch_ref(struct strbuf *sb, const char *name);
typedef int (*char_predicate)(char ch);
-int is_rfc3986_unreserved(char ch);
-int is_rfc3986_reserved_or_unreserved(char ch);
-
void strbuf_addstr_urlencode(struct strbuf *sb, const char *name,
char_predicate allow_unencoded_fn);
@@ -739,4 +671,36 @@ char *xstrvfmt(const char *fmt, va_list ap);
__attribute__((format (printf, 1, 2)))
char *xstrfmt(const char *fmt, ...);
+int starts_with(const char *str, const char *prefix);
+int istarts_with(const char *str, const char *prefix);
+
+/*
+ * If the string "str" is the same as the string in "prefix", then the "arg"
+ * parameter is set to the "def" parameter and 1 is returned.
+ * If the string "str" begins with the string found in "prefix" and then a
+ * "=" sign, then the "arg" parameter is set to "str + strlen(prefix) + 1"
+ * (i.e., to the point in the string right after the prefix and the "=" sign),
+ * and 1 is returned.
+ *
+ * Otherwise, return 0 and leave "arg" untouched.
+ *
+ * When we accept both a "--key" and a "--key=<val>" option, this function
+ * can be used instead of !strcmp(arg, "--key") and then
+ * skip_prefix(arg, "--key=", &arg) to parse such an option.
+ */
+int skip_to_optional_arg_default(const char *str, const char *prefix,
+ const char **arg, const char *def);
+
+static inline int skip_to_optional_arg(const char *str, const char *prefix,
+ const char **arg)
+{
+ return skip_to_optional_arg_default(str, prefix, arg, "");
+}
+
+static inline int ends_with(const char *str, const char *suffix)
+{
+ size_t len;
+ return strip_suffix(str, suffix, &len);
+}
+
#endif /* STRBUF_H */
diff --git a/streaming.c b/streaming.c
index 21e39585e8..10adf625b2 100644
--- a/streaming.c
+++ b/streaming.c
@@ -7,10 +7,9 @@
#include "streaming.h"
#include "repository.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "replace-object.h"
#include "packfile.h"
-#include "wrapper.h"
typedef int (*open_istream_fn)(struct git_istream *,
struct repository *,
diff --git a/string-list.c b/string-list.c
index 0f8ac117fd..954569f381 100644
--- a/string-list.c
+++ b/string-list.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "string-list.h"
-#include "alloc.h"
void string_list_init_nodup(struct string_list *list)
{
diff --git a/strvec.c b/strvec.c
index 17d54b6c3b..89dc9e7e75 100644
--- a/strvec.c
+++ b/strvec.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "strvec.h"
-#include "alloc.h"
#include "hex.h"
#include "strbuf.h"
diff --git a/submodule-config.c b/submodule-config.c
index 7eb7a0d88d..6a48fd12f6 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -1,16 +1,16 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
+#include "path.h"
#include "repository.h"
#include "config.h"
#include "submodule-config.h"
#include "submodule.h"
#include "strbuf.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "parse-options.h"
#include "thread-utils.h"
#include "tree-walk.h"
@@ -304,9 +304,10 @@ static int parse_fetch_recurse(const char *opt, const char *arg,
}
}
-int parse_submodule_fetchjobs(const char *var, const char *value)
+int parse_submodule_fetchjobs(const char *var, const char *value,
+ const struct key_value_info *kvi)
{
- int fetchjobs = git_config_int(var, value);
+ int fetchjobs = git_config_int(var, value, kvi);
if (fetchjobs < 0)
die(_("negative values not allowed for submodule.fetchJobs"));
if (!fetchjobs)
@@ -426,7 +427,8 @@ struct parse_config_parameter {
* config store (.git/config, etc). Callers are responsible for
* checking for overrides in the main config store when appropriate.
*/
-static int parse_config(const char *var, const char *value, void *data)
+static int parse_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED, void *data)
{
struct parse_config_parameter *me = data;
struct submodule *submodule;
@@ -605,7 +607,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
parameter.gitmodules_oid = &oid;
parameter.overwrite = 0;
git_config_from_mem(parse_config, CONFIG_ORIGIN_SUBMODULE_BLOB, rev.buf,
- config, config_size, &parameter, NULL);
+ config, config_size, &parameter, CONFIG_SCOPE_UNKNOWN, NULL);
strbuf_release(&rev);
free(config);
@@ -674,7 +676,8 @@ out:
}
}
-static int gitmodules_cb(const char *var, const char *value, void *data)
+static int gitmodules_cb(const char *var, const char *value,
+ const struct config_context *ctx, void *data)
{
struct repository *repo = data;
struct parse_config_parameter parameter;
@@ -684,7 +687,7 @@ static int gitmodules_cb(const char *var, const char *value, void *data)
parameter.gitmodules_oid = null_oid();
parameter.overwrite = 1;
- return parse_config(var, value, &parameter);
+ return parse_config(var, value, ctx, &parameter);
}
void repo_read_gitmodules(struct repository *repo, int skip_if_read)
@@ -712,7 +715,8 @@ void gitmodules_config_oid(const struct object_id *commit_oid)
if (gitmodule_oid_from_commit(commit_oid, &oid, &rev)) {
git_config_from_blob_oid(gitmodules_cb, rev.buf,
- the_repository, &oid, the_repository);
+ the_repository, &oid, the_repository,
+ CONFIG_SCOPE_UNKNOWN);
}
strbuf_release(&rev);
@@ -801,7 +805,9 @@ void submodule_free(struct repository *r)
submodule_cache_clear(r->submodule_cache);
}
-static int config_print_callback(const char *var, const char *value, void *cb_data)
+static int config_print_callback(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *cb_data)
{
char *wanted_key = cb_data;
@@ -843,13 +849,15 @@ struct fetch_config {
int *recurse_submodules;
};
-static int gitmodules_fetch_config(const char *var, const char *value, void *cb)
+static int gitmodules_fetch_config(const char *var, const char *value,
+ const struct config_context *ctx,
+ void *cb)
{
struct fetch_config *config = cb;
if (!strcmp(var, "submodule.fetchjobs")) {
if (config->max_children)
*(config->max_children) =
- parse_submodule_fetchjobs(var, value);
+ parse_submodule_fetchjobs(var, value, ctx->kvi);
return 0;
} else if (!strcmp(var, "fetch.recursesubmodules")) {
if (config->recurse_submodules)
@@ -871,11 +879,12 @@ void fetch_config_from_gitmodules(int *max_children, int *recurse_submodules)
}
static int gitmodules_update_clone_config(const char *var, const char *value,
+ const struct config_context *ctx,
void *cb)
{
int *max_jobs = cb;
if (!strcmp(var, "submodule.fetchjobs"))
- *max_jobs = parse_submodule_fetchjobs(var, value);
+ *max_jobs = parse_submodule_fetchjobs(var, value, ctx->kvi);
return 0;
}
diff --git a/submodule-config.h b/submodule-config.h
index c2045875bb..2a37689cc2 100644
--- a/submodule-config.h
+++ b/submodule-config.h
@@ -50,7 +50,8 @@ struct repository;
void submodule_cache_free(struct submodule_cache *cache);
-int parse_submodule_fetchjobs(const char *var, const char *value);
+int parse_submodule_fetchjobs(const char *var, const char *value,
+ const struct key_value_info *kvi);
int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
struct option;
int option_fetch_parse_recurse_submodules(const struct option *opt,
diff --git a/submodule.c b/submodule.c
index 2e78f51349..e603a19a87 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1,6 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "repository.h"
#include "config.h"
#include "submodule-config.h"
@@ -20,14 +19,16 @@
#include "strvec.h"
#include "blob.h"
#include "thread-utils.h"
+#include "path.h"
#include "quote.h"
#include "remote.h"
#include "worktree.h"
#include "parse-options.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit-reach.h"
+#include "read-cache-ll.h"
#include "setup.h"
#include "shallow.h"
#include "trace2.h"
diff --git a/t/.gitattributes b/t/.gitattributes
index 9930e28351..b9cea1795d 100644
--- a/t/.gitattributes
+++ b/t/.gitattributes
@@ -22,3 +22,4 @@ t[0-9][0-9][0-9][0-9]/* -whitespace
/t7500/* eol=lf
/t8005/*.txt eol=lf
/t9*/*.dump eol=lf
+/t0040*.sh whitespace=-indent-with-non-tab
diff --git a/t/README b/t/README
index b71a065e4a..6108085989 100644
--- a/t/README
+++ b/t/README
@@ -1102,6 +1102,12 @@ see test-lib-functions.sh for the full list and their options.
the symbolic link in the file system and a part that does; then only
the latter part need be protected by a SYMLINKS prerequisite (see below).
+ - test_path_is_executable
+
+ This tests whether a file is executable and prints an error message
+ if not. This must be used only under the POSIXPERM prerequisite
+ (see below).
+
- test_oid_init
This function loads facts and useful object IDs related to the hash
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 2ef70235b1..5e21e84f38 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -83,6 +83,15 @@ test_expect_success 'blame with --contents' '
check_count --contents=file A 2
'
+test_expect_success 'blame with --contents in a bare repo' '
+ git clone --bare . bare-contents.git &&
+ (
+ cd bare-contents.git &&
+ echo "1A quick brown fox jumps over the" >contents &&
+ check_count --contents=contents A 1
+ )
+'
+
test_expect_success 'blame with --contents changed' '
echo "1A quick brown fox jumps over the" >contents &&
echo "another lazy dog" >>contents &&
diff --git a/t/helper/test-cache-tree.c b/t/helper/test-cache-tree.c
index 9507b356e2..e7236392c8 100644
--- a/t/helper/test-cache-tree.c
+++ b/t/helper/test-cache-tree.c
@@ -1,11 +1,11 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "gettext.h"
#include "hex.h"
#include "tree.h"
#include "cache-tree.h"
#include "parse-options.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/helper/test-config.c b/t/helper/test-config.c
index ad78fc1768..ed444ca4c2 100644
--- a/t/helper/test-config.c
+++ b/t/helper/test-config.c
@@ -42,8 +42,11 @@
*
*/
-static int iterate_cb(const char *var, const char *value, void *data UNUSED)
+static int iterate_cb(const char *var, const char *value,
+ const struct config_context *ctx,
+ void *data UNUSED)
{
+ const struct key_value_info *kvi = ctx->kvi;
static int nr;
if (nr++)
@@ -51,26 +54,29 @@ static int iterate_cb(const char *var, const char *value, void *data UNUSED)
printf("key=%s\n", var);
printf("value=%s\n", value ? value : "(null)");
- printf("origin=%s\n", current_config_origin_type());
- printf("name=%s\n", current_config_name());
- printf("lno=%d\n", current_config_line());
- printf("scope=%s\n", config_scope_name(current_config_scope()));
+ printf("origin=%s\n", config_origin_type_name(kvi->origin_type));
+ printf("name=%s\n", kvi->filename ? kvi->filename : "");
+ printf("lno=%d\n", kvi->linenr);
+ printf("scope=%s\n", config_scope_name(kvi->scope));
return 0;
}
-static int parse_int_cb(const char *var, const char *value, void *data)
+static int parse_int_cb(const char *var, const char *value,
+ const struct config_context *ctx, void *data)
{
const char *key_to_match = data;
if (!strcmp(key_to_match, var)) {
- int parsed = git_config_int(value, value);
+ int parsed = git_config_int(value, value, ctx->kvi);
printf("%d\n", parsed);
}
return 0;
}
-static int early_config_cb(const char *var, const char *value, void *vdata)
+static int early_config_cb(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *vdata)
{
const char *key = vdata;
@@ -176,7 +182,7 @@ int cmd__config(int argc, const char **argv)
goto exit2;
}
}
- if (!git_configset_get_value(&cs, argv[2], &v)) {
+ if (!git_configset_get_value(&cs, argv[2], &v, NULL)) {
if (!v)
printf("(NULL)\n");
else
diff --git a/t/helper/test-delta.c b/t/helper/test-delta.c
index e7d134ec25..6bc787a474 100644
--- a/t/helper/test-delta.c
+++ b/t/helper/test-delta.c
@@ -11,7 +11,6 @@
#include "test-tool.h"
#include "git-compat-util.h"
#include "delta.h"
-#include "wrapper.h"
static const char usage_str[] =
"test-tool delta (-d|-p) <from_file> <data_file> <out_file>";
diff --git a/t/helper/test-dump-cache-tree.c b/t/helper/test-dump-cache-tree.c
index f22f7bd84a..c38f546e4f 100644
--- a/t/helper/test-dump-cache-tree.c
+++ b/t/helper/test-dump-cache-tree.c
@@ -1,10 +1,10 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "hash.h"
#include "hex.h"
#include "tree.h"
#include "cache-tree.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c
index 9a098a25cb..4f215fea02 100644
--- a/t/helper/test-dump-fsmonitor.c
+++ b/t/helper/test-dump-fsmonitor.c
@@ -1,5 +1,5 @@
#include "test-tool.h"
-#include "cache.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/helper/test-dump-split-index.c b/t/helper/test-dump-split-index.c
index d1badd7112..f29d18ef94 100644
--- a/t/helper/test-dump-split-index.c
+++ b/t/helper/test-dump-split-index.c
@@ -1,12 +1,13 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "hex.h"
+#include "read-cache-ll.h"
+#include "repository.h"
#include "setup.h"
#include "split-index.h"
#include "ewah/ewok.h"
-static void show_bit(size_t pos, void *data)
+static void show_bit(size_t pos, void *data UNUSED)
{
printf(" %d", (int)pos);
}
diff --git a/t/helper/test-dump-untracked-cache.c b/t/helper/test-dump-untracked-cache.c
index df70be549f..b4af9712fe 100644
--- a/t/helper/test-dump-untracked-cache.c
+++ b/t/helper/test-dump-untracked-cache.c
@@ -1,8 +1,8 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "dir.h"
#include "hex.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c
index d1d63feaa9..cac20a72b3 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -12,15 +12,16 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "cache-tree.h"
#include "commit.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "merge-ort.h"
#include "object-name.h"
+#include "read-cache-ll.h"
#include "refs.h"
#include "revision.h"
#include "sequencer.h"
diff --git a/t/helper/test-fsmonitor-client.c b/t/helper/test-fsmonitor-client.c
index 9f18c685b7..8280984d08 100644
--- a/t/helper/test-fsmonitor-client.c
+++ b/t/helper/test-fsmonitor-client.c
@@ -4,14 +4,13 @@
*/
#include "test-tool.h"
-#include "cache.h"
#include "parse-options.h"
#include "fsmonitor-ipc.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
#include "thread-utils.h"
#include "trace2.h"
-#include "wrapper.h"
#ifndef HAVE_FSMONITOR_DAEMON_BACKEND
int cmd__fsmonitor_client(int argc UNUSED, const char **argv UNUSED)
diff --git a/t/helper/test-hash-speed.c b/t/helper/test-hash-speed.c
index f40d9ad0c2..b235da594f 100644
--- a/t/helper/test-hash-speed.c
+++ b/t/helper/test-hash-speed.c
@@ -1,5 +1,5 @@
#include "test-tool.h"
-#include "cache.h"
+#include "hash-ll.h"
#define NUM_SECONDS 3
diff --git a/t/helper/test-index-version.c b/t/helper/test-index-version.c
index a06c45c1f8..f3c2dbe0a2 100644
--- a/t/helper/test-index-version.c
+++ b/t/helper/test-index-version.c
@@ -1,5 +1,5 @@
#include "test-tool.h"
-#include "cache.h"
+#include "read-cache-ll.h"
int cmd__index_version(int argc UNUSED, const char **argv UNUSED)
{
diff --git a/t/helper/test-lazy-init-name-hash.c b/t/helper/test-lazy-init-name-hash.c
index b83a75d19f..187a115d57 100644
--- a/t/helper/test-lazy-init-name-hash.c
+++ b/t/helper/test-lazy-init-name-hash.c
@@ -1,8 +1,9 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "environment.h"
+#include "name-hash.h"
#include "parse-options.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
#include "trace.h"
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c
index eef68833b7..aafe398ef0 100644
--- a/t/helper/test-oid-array.c
+++ b/t/helper/test-oid-array.c
@@ -4,7 +4,7 @@
#include "setup.h"
#include "strbuf.h"
-static int print_oid(const struct object_id *oid, void *data)
+static int print_oid(const struct object_id *oid, void *data UNUSED)
{
puts(oid_to_hex(oid));
return 0;
diff --git a/t/helper/test-pack-mtimes.c b/t/helper/test-pack-mtimes.c
index 0f3fbeec53..67a964ef90 100644
--- a/t/helper/test-pack-mtimes.c
+++ b/t/helper/test-pack-mtimes.c
@@ -1,7 +1,7 @@
#include "test-tool.h"
#include "hex.h"
#include "strbuf.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "packfile.h"
#include "pack-mtimes.h"
#include "setup.h"
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c
index 00fa281a9c..a4f6e24b0c 100644
--- a/t/helper/test-parse-options.c
+++ b/t/helper/test-parse-options.c
@@ -133,6 +133,8 @@ int cmd__parse_options(int argc, const char **argv)
OPT_STRING(0, "st", &string, "st", "get another string (pervert ordering)"),
OPT_STRING('o', NULL, &string, "str", "get another string"),
OPT_NOOP_NOARG(0, "obsolete"),
+ OPT_SET_INT_F(0, "longhelp", &integer, "help text of this entry\n"
+ "spans multiple lines", 0, PARSE_OPT_NONEG),
OPT_STRING_LIST(0, "list", &list, "str", "add str to list"),
OPT_GROUP("Magic arguments"),
OPT_NUMBER_CALLBACK(&integer, "set integer to NUM",
diff --git a/t/helper/test-partial-clone.c b/t/helper/test-partial-clone.c
index 362bd64a4c..910a128614 100644
--- a/t/helper/test-partial-clone.c
+++ b/t/helper/test-partial-clone.c
@@ -1,7 +1,7 @@
#include "test-tool.h"
#include "hex.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "setup.h"
/*
diff --git a/t/helper/test-path-utils.c b/t/helper/test-path-utils.c
index 2ef53d5f7a..70396fa384 100644
--- a/t/helper/test-path-utils.c
+++ b/t/helper/test-path-utils.c
@@ -1,8 +1,8 @@
#include "test-tool.h"
-#include "cache.h"
#include "abspath.h"
#include "environment.h"
#include "path.h"
+#include "read-cache-ll.h"
#include "setup.h"
#include "string-list.h"
#include "trace.h"
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index 5b6f217441..3e173399a0 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "alloc.h"
#include "commit.h"
#include "commit-reach.h"
#include "config.h"
@@ -139,7 +138,7 @@ int cmd__reach(int ac, const char **av)
printf("%s(X,_,_,0,0):%d\n", av[1], can_all_from_reach_with_flag(&X_obj, 2, 4, 0, 0));
} else if (!strcmp(av[1], "commit_contains")) {
- struct ref_filter filter;
+ struct ref_filter filter = REF_FILTER_INIT;
struct contains_cache cache;
init_contains_cache(&cache);
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c
index c1ae276395..1acd362346 100644
--- a/t/helper/test-read-cache.c
+++ b/t/helper/test-read-cache.c
@@ -1,10 +1,9 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "config.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
-#include "wrapper.h"
int cmd__read_cache(int argc, const char **argv)
{
diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c
index 3ac496e27e..8c7a83f578 100644
--- a/t/helper/test-read-graph.c
+++ b/t/helper/test-read-graph.c
@@ -1,7 +1,7 @@
#include "test-tool.h"
#include "commit-graph.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "bloom.h"
#include "setup.h"
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 211addaa00..e9a444ddba 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -2,7 +2,7 @@
#include "hex.h"
#include "midx.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "pack-bitmap.h"
#include "packfile.h"
#include "setup.h"
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index a6977b5e83..48552e6a9e 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -3,8 +3,10 @@
#include "refs.h"
#include "setup.h"
#include "worktree.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "path.h"
#include "repository.h"
+#include "strbuf.h"
#include "revision.h"
struct flag_definition {
@@ -184,6 +186,15 @@ static int cmd_for_each_ref(struct ref_store *refs, const char **argv)
return refs_for_each_ref_in(refs, prefix, each_ref, NULL);
}
+static int cmd_for_each_ref__exclude(struct ref_store *refs, const char **argv)
+{
+ const char *prefix = notnull(*argv++, "prefix");
+ const char **exclude_patterns = argv;
+
+ return refs_for_each_fullref_in(refs, prefix, exclude_patterns, each_ref,
+ NULL);
+}
+
static int cmd_resolve_ref(struct ref_store *refs, const char **argv)
{
struct object_id oid = *null_oid();
@@ -266,11 +277,6 @@ static int cmd_delete_reflog(struct ref_store *refs, const char **argv)
return refs_delete_reflog(refs, refname);
}
-static int cmd_reflog_expire(struct ref_store *refs, const char **argv)
-{
- die("not supported yet");
-}
-
static int cmd_delete_ref(struct ref_store *refs, const char **argv)
{
const char *msg = notnull(*argv++, "msg");
@@ -316,6 +322,7 @@ static struct command commands[] = {
{ "delete-refs", cmd_delete_refs },
{ "rename-ref", cmd_rename_ref },
{ "for-each-ref", cmd_for_each_ref },
+ { "for-each-ref--exclude", cmd_for_each_ref__exclude },
{ "resolve-ref", cmd_resolve_ref },
{ "verify-ref", cmd_verify_ref },
{ "for-each-reflog", cmd_for_each_reflog },
@@ -324,7 +331,6 @@ static struct command commands[] = {
{ "reflog-exists", cmd_reflog_exists },
{ "create-reflog", cmd_create_reflog },
{ "delete-reflog", cmd_delete_reflog },
- { "reflog-expire", cmd_reflog_expire },
/*
* backend transaction functions can't be tested separately
*/
diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c
index bafd2a5bf9..4cd8a952e5 100644
--- a/t/helper/test-repository.c
+++ b/t/helper/test-repository.c
@@ -4,7 +4,7 @@
#include "config.h"
#include "environment.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "object.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/helper/test-revision-walking.c b/t/helper/test-revision-walking.c
index 0c62b9de18..f346951bc2 100644
--- a/t/helper/test-revision-walking.c
+++ b/t/helper/test-revision-walking.c
@@ -11,6 +11,7 @@
#include "test-tool.h"
#include "commit.h"
#include "diff.h"
+#include "repository.h"
#include "revision.h"
#include "setup.h"
diff --git a/t/helper/test-scrap-cache-tree.c b/t/helper/test-scrap-cache-tree.c
index 6e17f50d22..0a816a96e2 100644
--- a/t/helper/test-scrap-cache-tree.c
+++ b/t/helper/test-scrap-cache-tree.c
@@ -1,7 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "lockfile.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
#include "tree.h"
diff --git a/t/helper/test-sha1.c b/t/helper/test-sha1.c
index 71fe5c6145..dcb7f6c003 100644
--- a/t/helper/test-sha1.c
+++ b/t/helper/test-sha1.c
@@ -1,5 +1,5 @@
#include "test-tool.h"
-#include "cache.h"
+#include "hash-ll.h"
int cmd__sha1(int ac, const char **av)
{
diff --git a/t/helper/test-sha256.c b/t/helper/test-sha256.c
index 0ac6a99d5f..08cf149001 100644
--- a/t/helper/test-sha256.c
+++ b/t/helper/test-sha256.c
@@ -1,5 +1,5 @@
#include "test-tool.h"
-#include "cache.h"
+#include "hash-ll.h"
int cmd__sha256(int ac, const char **av)
{
diff --git a/t/helper/test-strcmp-offset.c b/t/helper/test-strcmp-offset.c
index 96b9a5b529..d8473cf2fc 100644
--- a/t/helper/test-strcmp-offset.c
+++ b/t/helper/test-strcmp-offset.c
@@ -1,5 +1,5 @@
#include "test-tool.h"
-#include "cache.h"
+#include "read-cache-ll.h"
int cmd__strcmp_offset(int argc UNUSED, const char **argv)
{
diff --git a/t/helper/test-trace2.c b/t/helper/test-trace2.c
index 20c7495f38..d5ca0046c8 100644
--- a/t/helper/test-trace2.c
+++ b/t/helper/test-trace2.c
@@ -45,7 +45,7 @@ static int get_i(int *p_value, const char *data)
* [] "def_param" events for all of the "interesting" pre-defined
* config settings.
*/
-static int ut_001return(int argc, const char **argv)
+static int ut_001return(int argc UNUSED, const char **argv)
{
int rc;
@@ -65,7 +65,7 @@ static int ut_001return(int argc, const char **argv)
* [] "def_param" events for all of the "interesting" pre-defined
* config settings.
*/
-static int ut_002exit(int argc, const char **argv)
+static int ut_002exit(int argc UNUSED, const char **argv)
{
int rc;
@@ -201,7 +201,7 @@ static int ut_006data(int argc, const char **argv)
return 0;
}
-static int ut_007BUG(int argc, const char **argv)
+static int ut_007BUG(int argc UNUSED, const char **argv UNUSED)
{
/*
* Exercise BUG() to ensure that the message is printed to trace2.
diff --git a/t/helper/test-userdiff.c b/t/helper/test-userdiff.c
index 680124a676..0ce31ce59f 100644
--- a/t/helper/test-userdiff.c
+++ b/t/helper/test-userdiff.c
@@ -12,7 +12,9 @@ static int driver_cb(struct userdiff_driver *driver,
return 0;
}
-static int cmd__userdiff_config(const char *var, const char *value, void *cb UNUSED)
+static int cmd__userdiff_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *cb UNUSED)
{
if (userdiff_config(var, value) < 0)
return -1;
diff --git a/t/helper/test-wildmatch.c b/t/helper/test-wildmatch.c
index a95bb4da9b..b4ff5f986a 100644
--- a/t/helper/test-wildmatch.c
+++ b/t/helper/test-wildmatch.c
@@ -1,4 +1,5 @@
#include "test-tool.h"
+#include "wildmatch.h"
int cmd__wildmatch(int argc, const char **argv)
{
diff --git a/t/helper/test-write-cache.c b/t/helper/test-write-cache.c
index eace08072d..f084034d38 100644
--- a/t/helper/test-write-cache.c
+++ b/t/helper/test-write-cache.c
@@ -1,7 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "lockfile.h"
+#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/lib-commit-graph.sh b/t/lib-commit-graph.sh
index 5d79e1a4e9..89b26676fb 100755
--- a/t/lib-commit-graph.sh
+++ b/t/lib-commit-graph.sh
@@ -14,24 +14,37 @@ graph_git_two_modes() {
test_cmp expect output
}
+# graph_git_behavior <name> <directory> <branch> <compare>
+#
+# Ensures that a handful of traversal operations produce the same
+# results with and without the commit-graph in use.
+#
+# NOTE: it is a bug to call this function with <directory> containing
+# any characters in $IFS.
graph_git_behavior() {
MSG=$1
DIR=$2
BRANCH=$3
COMPARE=$4
test_expect_success "check normal git operations: $MSG" '
- cd "$TRASH_DIRECTORY/$DIR" &&
- graph_git_two_modes "log --oneline $BRANCH" &&
- graph_git_two_modes "log --topo-order $BRANCH" &&
- graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
- graph_git_two_modes "branch -vv" &&
- graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
+ graph_git_two_modes "${DIR:+-C $DIR} log --oneline $BRANCH" &&
+ graph_git_two_modes "${DIR:+-C $DIR} log --topo-order $BRANCH" &&
+ graph_git_two_modes "${DIR:+-C $DIR} log --graph $COMPARE..$BRANCH" &&
+ graph_git_two_modes "${DIR:+-C $DIR} branch -vv" &&
+ graph_git_two_modes "${DIR:+-C $DIR} merge-base -a $BRANCH $COMPARE"
'
}
graph_read_expect() {
OPTIONAL=""
NUM_CHUNKS=3
+ DIR="."
+ if test "$1" = -C
+ then
+ shift
+ DIR="$1"
+ shift
+ fi
if test -n "$2"
then
OPTIONAL=" $2"
@@ -47,12 +60,15 @@ graph_read_expect() {
then
OPTIONS=" read_generation_data"
fi
- cat >expect <<- EOF
+ cat >"$DIR/expect" <<-EOF
header: 43475048 1 $(test_oid oid_version) $NUM_CHUNKS 0
num_commits: $1
chunks: oid_fanout oid_lookup commit_metadata$OPTIONAL
options:$OPTIONS
EOF
- test-tool read-graph >output &&
- test_cmp expect output
+ (
+ cd "$DIR" &&
+ test-tool read-graph >output &&
+ test_cmp expect output
+ )
}
diff --git a/t/lib-credential.sh b/t/lib-credential.sh
index 032b2d8fcc..15fc9a31e2 100644
--- a/t/lib-credential.sh
+++ b/t/lib-credential.sh
@@ -43,6 +43,8 @@ helper_test_clean() {
reject $1 https example.com store-user
reject $1 https example.com user1
reject $1 https example.com user2
+ reject $1 https example.com user-expiry
+ reject $1 https example.com user-expiry-overwrite
reject $1 https example.com user4
reject $1 https example.com user-distinct-pass
reject $1 https example.com user-overwrite
@@ -431,6 +433,81 @@ helper_test_timeout() {
'
}
+helper_test_password_expiry_utc() {
+ HELPER=$1
+
+ test_expect_success "helper ($HELPER) stores password_expiry_utc" '
+ check approve $HELPER <<-\EOF
+ protocol=https
+ host=example.com
+ username=user-expiry
+ password=pass
+ password_expiry_utc=9999999999
+ EOF
+ '
+
+ test_expect_success "helper ($HELPER) gets password_expiry_utc" '
+ check fill $HELPER <<-\EOF
+ protocol=https
+ host=example.com
+ username=user-expiry
+ --
+ protocol=https
+ host=example.com
+ username=user-expiry
+ password=pass
+ password_expiry_utc=9999999999
+ --
+ EOF
+ '
+
+ test_expect_success "helper ($HELPER) overwrites when password_expiry_utc changes" '
+ check approve $HELPER <<-\EOF &&
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ password=pass1
+ password_expiry_utc=9999999998
+ EOF
+ check approve $HELPER <<-\EOF &&
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ password=pass2
+ password_expiry_utc=9999999999
+ EOF
+ check fill $HELPER <<-\EOF &&
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ --
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ password=pass2
+ password_expiry_utc=9999999999
+ EOF
+ check reject $HELPER <<-\EOF &&
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ password=pass2
+ EOF
+ check fill $HELPER <<-\EOF
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ --
+ protocol=https
+ host=example.com
+ username=user-expiry-overwrite
+ password=askpass-password
+ --
+ askpass: Password for '\''https://user-expiry-overwrite@example.com'\'':
+ EOF
+ '
+}
+
helper_test_oauth_refresh_token() {
HELPER=$1
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 739e6ec35c..83b83c9abb 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -45,6 +45,28 @@ test_lazy_prereq GPG '
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
gpg --homedir "${GNUPGHOME}" --import-ownertrust \
"$TEST_DIRECTORY"/lib-gpg/ownertrust &&
+ gpg --homedir "${GNUPGHOME}" --update-trustdb &&
+ gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null \
+ --sign -u committer@example.com
+ ;;
+ esac
+'
+
+test_lazy_prereq GPG2 '
+ gpg_version=$(gpg --version 2>&1)
+ test $? != 127 || exit 1
+
+ case "$gpg_version" in
+ "gpg (GnuPG) "[01].*)
+ say "This test requires a GPG version >= v2.0.0"
+ exit 1
+ ;;
+ *)
+ (gpgconf --kill all || : ) &&
+ gpg --homedir "${GNUPGHOME}" --import \
+ "$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
+ gpg --homedir "${GNUPGHOME}" --import-ownertrust \
+ "$TEST_DIRECTORY"/lib-gpg/ownertrust &&
gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null \
--sign -u committer@example.com
;;
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 7ca5b918f0..11d2dc9fe3 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -8,18 +8,21 @@
# - check that non-commit messages have a certain line count with $EXPECT_COUNT
# - check the commit count in the commit message header with $EXPECT_HEADER_COUNT
# - rewrite a rebase -i script as directed by $FAKE_LINES.
-# $FAKE_LINES consists of a sequence of words separated by spaces.
-# The following word combinations are possible:
+# $FAKE_LINES consists of a sequence of words separated by spaces;
+# spaces inside the words are encoded as underscores.
+# The following words are possible:
#
-# "<lineno>" -- add a "pick" line with the SHA1 taken from the
-# specified line.
+# "<cmd>" -- override the command for the next line specification. Can be
+# "pick", "squash", "fixup[_-(c|C)]", "edit", "reword", "drop",
+# "merge[_-(c|C)_<rev>]", or "bad" for an invalid command.
#
-# "<cmd> <lineno>" -- add a line with the specified command
-# ("pick", "squash", "fixup"|"fixup_-C"|"fixup_-c", "edit", "reword" or "drop")
-# and the SHA1 taken from the specified line.
+# "<lineno>" -- add a command, using the specified line as a template.
+# If the command has not been overridden, the line will be copied
+# verbatim, usually resulting in a "pick" line.
#
-# "_" -- add a space, like "fixup_-C" implies "fixup -C" and
-# "exec_cmd_with_args" add an "exec cmd with args" line.
+# "fakesha" -- add a command ("pick" by default), using a fake SHA1.
+#
+# "exec_[command...]", "break" -- add the specified command.
#
# "#" -- Add a comment line.
#
@@ -49,7 +52,7 @@ set_fake_editor () {
action=\&
for line in $FAKE_LINES; do
case $line in
- pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d|label|l|reset|r|merge|m)
+ pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d|label|l|reset|t|merge|m)
action="$line";;
exec_*|x_*|break|b)
echo "$line" | sed 's/_/ /g' >> "$1";;
@@ -64,7 +67,7 @@ set_fake_editor () {
fakesha)
test \& != "$action" || action=pick
echo "$action XXXXXXX False commit" >> "$1"
- action=pick;;
+ action=\&;;
*)
sed -n "${line}s/^[a-z][a-z]*/$action/p" < "$1".tmp >> "$1"
action=\&;;
diff --git a/t/perf/p2000-sparse-operations.sh b/t/perf/p2000-sparse-operations.sh
index 96ed3e1d69..39e92b0841 100755
--- a/t/perf/p2000-sparse-operations.sh
+++ b/t/perf/p2000-sparse-operations.sh
@@ -134,5 +134,6 @@ test_perf_on_all git diff-files -- $SPARSE_CONE/a
test_perf_on_all git diff-tree HEAD
test_perf_on_all git diff-tree HEAD -- $SPARSE_CONE/a
test_perf_on_all "git worktree add ../temp && git worktree remove ../temp"
+test_perf_on_all git check-attr -a -- $SPARSE_CONE/a
test_done
diff --git a/t/t0007-git-var.sh b/t/t0007-git-var.sh
index eeb8539c1b..ff4fd9348c 100755
--- a/t/t0007-git-var.sh
+++ b/t/t0007-git-var.sh
@@ -147,6 +147,84 @@ test_expect_success 'get GIT_SEQUENCE_EDITOR with configuration and environment
)
'
+test_expect_success POSIXPERM 'GIT_SHELL_PATH points to a valid executable' '
+ shellpath=$(git var GIT_SHELL_PATH) &&
+ test_path_is_executable "$shellpath"
+'
+
+# We know in this environment that our shell will be one of a few fixed values
+# that all end in "sh".
+test_expect_success MINGW 'GIT_SHELL_PATH points to a suitable shell' '
+ shellpath=$(git var GIT_SHELL_PATH) &&
+ case "$shellpath" in
+ *sh) ;;
+ *) return 1;;
+ esac
+'
+
+test_expect_success 'GIT_ATTR_SYSTEM produces expected output' '
+ test_must_fail env GIT_ATTR_NOSYSTEM=1 git var GIT_ATTR_SYSTEM &&
+ (
+ sane_unset GIT_ATTR_NOSYSTEM &&
+ systempath=$(git var GIT_ATTR_SYSTEM) &&
+ test "$systempath" != ""
+ )
+'
+
+test_expect_success 'GIT_ATTR_GLOBAL points to the correct location' '
+ TRASHDIR="$(test-tool path-utils normalize_path_copy "$(pwd)")" &&
+ globalpath=$(XDG_CONFIG_HOME="$TRASHDIR/.config" git var GIT_ATTR_GLOBAL) &&
+ test "$globalpath" = "$TRASHDIR/.config/git/attributes" &&
+ (
+ sane_unset XDG_CONFIG_HOME &&
+ globalpath=$(HOME="$TRASHDIR" git var GIT_ATTR_GLOBAL) &&
+ test "$globalpath" = "$TRASHDIR/.config/git/attributes"
+ )
+'
+
+test_expect_success 'GIT_CONFIG_SYSTEM points to the correct location' '
+ TRASHDIR="$(test-tool path-utils normalize_path_copy "$(pwd)")" &&
+ test_must_fail env GIT_CONFIG_NOSYSTEM=1 git var GIT_CONFIG_SYSTEM &&
+ (
+ sane_unset GIT_CONFIG_NOSYSTEM &&
+ systempath=$(git var GIT_CONFIG_SYSTEM) &&
+ test "$systempath" != "" &&
+ systempath=$(GIT_CONFIG_SYSTEM=/dev/null git var GIT_CONFIG_SYSTEM) &&
+ if test_have_prereq MINGW
+ then
+ test "$systempath" = "nul"
+ else
+ test "$systempath" = "/dev/null"
+ fi &&
+ systempath=$(GIT_CONFIG_SYSTEM="$TRASHDIR/gitconfig" git var GIT_CONFIG_SYSTEM) &&
+ test "$systempath" = "$TRASHDIR/gitconfig"
+ )
+'
+
+test_expect_success 'GIT_CONFIG_GLOBAL points to the correct location' '
+ TRASHDIR="$(test-tool path-utils normalize_path_copy "$(pwd)")" &&
+ HOME="$TRASHDIR" XDG_CONFIG_HOME="$TRASHDIR/foo" git var GIT_CONFIG_GLOBAL >actual &&
+ echo "$TRASHDIR/foo/git/config" >expected &&
+ echo "$TRASHDIR/.gitconfig" >>expected &&
+ test_cmp expected actual &&
+ (
+ sane_unset XDG_CONFIG_HOME &&
+ HOME="$TRASHDIR" git var GIT_CONFIG_GLOBAL >actual &&
+ echo "$TRASHDIR/.config/git/config" >expected &&
+ echo "$TRASHDIR/.gitconfig" >>expected &&
+ test_cmp expected actual &&
+ globalpath=$(GIT_CONFIG_GLOBAL=/dev/null git var GIT_CONFIG_GLOBAL) &&
+ if test_have_prereq MINGW
+ then
+ test "$globalpath" = "nul"
+ else
+ test "$globalpath" = "/dev/null"
+ fi &&
+ globalpath=$(GIT_CONFIG_GLOBAL="$TRASHDIR/gitconfig" git var GIT_CONFIG_GLOBAL) &&
+ test "$globalpath" = "$TRASHDIR/gitconfig"
+ )
+'
+
# For git var -l, we check only a representative variable;
# testing the whole output would make our test too brittle with
# respect to unrelated changes in the test suite's environment.
@@ -164,8 +242,39 @@ test_expect_success 'git var -l lists config' '
test_cmp expect actual.bare
'
+test_expect_success 'git var -l lists multiple global configs' '
+ TRASHDIR="$(test-tool path-utils normalize_path_copy "$(pwd)")" &&
+ HOME="$TRASHDIR" XDG_CONFIG_HOME="$TRASHDIR/foo" git var -l >actual &&
+ grep "^GIT_CONFIG_GLOBAL=" actual >filtered &&
+ echo "GIT_CONFIG_GLOBAL=$TRASHDIR/foo/git/config" >expected &&
+ echo "GIT_CONFIG_GLOBAL=$TRASHDIR/.gitconfig" >>expected &&
+ test_cmp expected filtered
+'
+
+test_expect_success 'git var -l does not split multiline editors' '
+ (
+ GIT_EDITOR="!f() {
+ echo Hello!
+ }; f" &&
+ export GIT_EDITOR &&
+ echo "GIT_EDITOR=$GIT_EDITOR" >expected &&
+ git var -l >var &&
+ sed -n -e "/^GIT_EDITOR/,\$p" var | head -n 3 >actual &&
+ test_cmp expected actual
+ )
+'
+
test_expect_success 'listing and asking for variables are exclusive' '
test_must_fail git var -l GIT_COMMITTER_IDENT
'
+test_expect_success '`git var -l` works even without HOME' '
+ (
+ XDG_CONFIG_HOME= &&
+ export XDG_CONFIG_HOME &&
+ unset HOME &&
+ git var -l
+ )
+'
+
test_done
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 7d7ecfd571..a0ad6192d6 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -13,29 +13,35 @@ usage: test-tool parse-options <options>
A helper function for the parse-options API.
- --yes get a boolean
+ --[no-]yes get a boolean
-D, --no-doubt begins with 'no-'
+ --doubt opposite of --no-doubt
-B, --no-fear be brave
- -b, --boolean increment by one
- -4, --or4 bitwise-or boolean with ...0100
- --neg-or4 same as --no-or4
+ -b, --[no-]boolean increment by one
+ -4, --[no-]or4 bitwise-or boolean with ...0100
+ --[no-]neg-or4 same as --no-or4
- -i, --integer <n> get a integer
+ -i, --[no-]integer <n>
+ get a integer
-j <n> get a integer, too
-m, --magnitude <n> get a magnitude
- --set23 set integer to 23
+ --[no-]set23 set integer to 23
--mode1 set integer to 1 (cmdmode option)
--mode2 set integer to 2 (cmdmode option)
- -L, --length <str> get length of <str>
- -F, --file <file> set file to <file>
+ -L, --[no-]length <str>
+ get length of <str>
+ -F, --[no-]file <file>
+ set file to <file>
String options
- -s, --string <string>
+ -s, --[no-]string <string>
get a string
- --string2 <str> get another string
- --st <st> get another string (pervert ordering)
+ --[no-]string2 <str> get another string
+ --[no-]st <st> get another string (pervert ordering)
-o <str> get another string
- --list <str> add str to list
+ --longhelp help text of this entry
+ spans multiple lines
+ --[no-]list <str> add str to list
Magic arguments
-NUM set integer to NUM
@@ -44,16 +50,17 @@ Magic arguments
--no-ambiguous negative ambiguity
Standard options
- --abbrev[=<n>] use <n> digits to display object names
- -v, --verbose be verbose
- -n, --dry-run dry run
- -q, --quiet be quiet
- --expect <string> expected output in the variable dump
+ --[no-]abbrev[=<n>] use <n> digits to display object names
+ -v, --[no-]verbose be verbose
+ -n, --[no-]dry-run dry run
+ -q, --[no-]quiet be quiet
+ --[no-]expect <string>
+ expected output in the variable dump
Alias
- -A, --alias-source <string>
+ -A, --[no-]alias-source <string>
get a string
- -Z, --alias-target <string>
+ -Z, --[no-]alias-target <string>
alias of --alias-source
EOF
diff --git a/t/t0041-usage.sh b/t/t0041-usage.sh
index c4fc34eb18..9ea974b0c6 100755
--- a/t/t0041-usage.sh
+++ b/t/t0041-usage.sh
@@ -5,6 +5,7 @@ test_description='Test commands behavior when given invalid argument value'
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 ' '
diff --git a/t/t0091-bugreport.sh b/t/t0091-bugreport.sh
index b6d2f591ac..f6998269be 100755
--- a/t/t0091-bugreport.sh
+++ b/t/t0091-bugreport.sh
@@ -5,29 +5,50 @@ test_description='git bugreport'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
-# Headers "[System Info]" will be followed by a non-empty line if we put some
-# information there; we can make sure all our headers were followed by some
-# information to check if the command was successful.
-HEADER_PATTERN="^\[.*\]$"
-
-check_all_headers_populated () {
- while read -r line
- do
- if test "$(grep "$HEADER_PATTERN" "$line")"
- then
- echo "$line"
- read -r nextline
- if test -z "$nextline"; then
- return 1;
- fi
- fi
- done
-}
-
-test_expect_success 'creates a report with content in the right places' '
- test_when_finished rm git-bugreport-check-headers.txt &&
- git bugreport -s check-headers &&
- check_all_headers_populated <git-bugreport-check-headers.txt
+test_expect_success 'create a report' '
+ git bugreport -s format &&
+ test_file_not_empty git-bugreport-format.txt
+'
+
+test_expect_success 'report contains wanted template (before first section)' '
+ sed -ne "/^\[/q;p" git-bugreport-format.txt >actual &&
+ cat >expect <<-\EOF &&
+ Thank you for filling out a Git bug report!
+ Please answer the following questions to help us understand your issue.
+
+ What did you do before the bug happened? (Steps to reproduce your issue)
+
+ What did you expect to happen? (Expected behavior)
+
+ What happened instead? (Actual behavior)
+
+ What'\''s different between what you expected and what actually happened?
+
+ Anything else you want to add:
+
+ Please review the rest of the bug report below.
+ You can delete any lines you don'\''t wish to share.
+
+
+ EOF
+ test_cmp expect actual
+'
+
+test_expect_success 'sanity check "System Info" section' '
+ test_when_finished rm -f git-bugreport-format.txt &&
+
+ sed -ne "/^\[System Info\]$/,/^$/p" <git-bugreport-format.txt >system &&
+
+ # The beginning should match "git version --build-info" verbatim,
+ # but rather than checking bit-for-bit equality, just test some basics.
+ grep "git version [0-9]." system &&
+ grep "shell-path: ." system &&
+
+ # After the version, there should be some more info.
+ # This is bound to differ from environment to environment,
+ # so we just do some rather high-level checks.
+ grep "uname: ." system &&
+ grep "compiler info: ." system
'
test_expect_success 'dies if file with same name as report already exists' '
diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh
index c02a3b5969..8300faadea 100755
--- a/t/t0301-credential-cache.sh
+++ b/t/t0301-credential-cache.sh
@@ -29,6 +29,7 @@ test_atexit 'git credential-cache exit'
# test that the daemon works with no special setup
helper_test cache
+helper_test_password_expiry_utc cache
helper_test_oauth_refresh_token cache
test_expect_success 'socket defaults to ~/.cache/git/credential/socket' '
diff --git a/t/t0303-credential-external.sh b/t/t0303-credential-external.sh
index f028fd1418..095574bfc6 100755
--- a/t/t0303-credential-external.sh
+++ b/t/t0303-credential-external.sh
@@ -45,6 +45,8 @@ test -z "$GIT_TEST_CREDENTIAL_HELPER_SETUP" ||
helper_test_clean "$GIT_TEST_CREDENTIAL_HELPER"
helper_test "$GIT_TEST_CREDENTIAL_HELPER"
+helper_test_password_expiry_utc "$GIT_TEST_CREDENTIAL_HELPER"
+helper_test_oauth_refresh_token "$GIT_TEST_CREDENTIAL_HELPER"
if test -z "$GIT_TEST_CREDENTIAL_HELPER_TIMEOUT"; then
say "# skipping timeout tests (GIT_TEST_CREDENTIAL_HELPER_TIMEOUT not set)"
diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
index 8a95adf4b5..2a4f35e984 100755
--- a/t/t1092-sparse-checkout-compatibility.sh
+++ b/t/t1092-sparse-checkout-compatibility.sh
@@ -2259,4 +2259,76 @@ test_expect_success 'worktree is not expanded' '
ensure_not_expanded worktree remove .worktrees/hotfix
'
+test_expect_success 'check-attr with pathspec inside sparse definition' '
+ init_repos &&
+
+ echo "a -crlf myAttr" >>.gitattributes &&
+ run_on_all cp ../.gitattributes ./deep &&
+
+ test_all_match git check-attr -a -- deep/a &&
+
+ test_all_match git add deep/.gitattributes &&
+ test_all_match git check-attr -a --cached -- deep/a
+'
+
+test_expect_success 'check-attr with pathspec outside sparse definition' '
+ init_repos &&
+
+ echo "a -crlf myAttr" >>.gitattributes &&
+ run_on_sparse mkdir folder1 &&
+ run_on_all cp ../.gitattributes ./folder1 &&
+ run_on_all cp a folder1/a &&
+
+ test_all_match git check-attr -a -- folder1/a &&
+
+ git -C full-checkout add folder1/.gitattributes &&
+ test_sparse_match git add --sparse folder1/.gitattributes &&
+ test_all_match git commit -m "add .gitattributes" &&
+ test_sparse_match git sparse-checkout reapply &&
+ test_all_match git check-attr -a --cached -- folder1/a
+'
+
+# NEEDSWORK: The 'diff --check' test is left as 'test_expect_failure' due
+# to an underlying issue in oneway_diff() within diff-lib.c.
+# 'do_oneway_diff()' is not called as expected for paths that could match
+# inside of a sparse directory. Specifically, the 'ce_path_match()' function
+# fails to recognize files inside a sparse directory (e.g., when 'folder1/'
+# is a sparse directory, 'folder1/a' cannot be recognized). The goal is to
+# proceed with 'do_oneway_diff()' if the pathspec could match inside of a
+# sparse directory.
+test_expect_failure 'diff --check with pathspec outside sparse definition' '
+ init_repos &&
+
+ write_script edit-contents <<-\EOF &&
+ echo "a " >"$1"
+ EOF
+
+ test_all_match git config core.whitespace -trailing-space,-space-before-tab &&
+
+ echo "a whitespace=trailing-space,space-before-tab" >>.gitattributes &&
+ run_on_all mkdir -p folder1 &&
+ run_on_all cp ../.gitattributes ./folder1 &&
+ test_all_match git add --sparse folder1/.gitattributes &&
+ run_on_all ../edit-contents folder1/a &&
+ test_all_match git add --sparse folder1/a &&
+
+ test_sparse_match git sparse-checkout reapply &&
+ test_all_match test_must_fail git diff --check --cached -- folder1/a
+'
+
+test_expect_success 'sparse-index is not expanded: check-attr' '
+ init_repos &&
+
+ echo "a -crlf myAttr" >>.gitattributes &&
+ mkdir ./sparse-index/folder1 &&
+ cp ./sparse-index/a ./sparse-index/folder1/a &&
+ cp .gitattributes ./sparse-index/deep &&
+ cp .gitattributes ./sparse-index/folder1 &&
+
+ git -C sparse-index add deep/.gitattributes &&
+ git -C sparse-index add --sparse folder1/.gitattributes &&
+ ensure_not_expanded check-attr -a --cached -- deep/a &&
+ ensure_not_expanded check-attr -a --cached -- folder1/a
+'
+
test_done
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 86bfbc2b36..387d336c91 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -1668,6 +1668,21 @@ test_expect_success 'urlmatch' '
test_cmp expect actual
'
+test_expect_success 'urlmatch with --show-scope' '
+ cat >.git/config <<-\EOF &&
+ [http "https://weak.example.com"]
+ sslVerify = false
+ cookieFile = /tmp/cookie.txt
+ EOF
+
+ cat >expect <<-EOF &&
+ local http.cookiefile /tmp/cookie.txt
+ local http.sslverify false
+ EOF
+ git config --get-urlmatch --show-scope HTTP https://weak.example.com >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'urlmatch favors more specific URLs' '
cat >.git/config <<-\EOF &&
[http "https://example.com/"]
@@ -2055,6 +2070,12 @@ test_expect_success '--show-origin blob ref' '
test_cmp expect output
'
+test_expect_success '--show-origin with --default' '
+ git config --show-origin --default foo some.key >actual &&
+ echo "command line: foo" >expect &&
+ test_cmp expect actual
+'
+
test_expect_success '--show-scope with --list' '
cat >expect <<-EOF &&
global user.global=true
@@ -2123,6 +2144,12 @@ test_expect_success '--show-scope with --show-origin' '
test_cmp expect output
'
+test_expect_success '--show-scope with --default' '
+ git config --show-scope --default foo some.key >actual &&
+ echo "command foo" >expect &&
+ test_cmp expect actual
+'
+
test_expect_success 'override global and system config' '
test_when_finished rm -f \"\$HOME\"/.gitconfig &&
cat >"$HOME"/.gitconfig <<-EOF &&
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index ae5cd3f5a0..e5a0d65caa 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -52,6 +52,28 @@ test_expect_success 'shared=all' '
test 2 = $(git config core.sharedrepository)
'
+test_expect_failure 'template can set core.bare' '
+ test_when_finished "rm -rf subdir" &&
+ test_when_finished "rm -rf templates" &&
+ test_config core.bare true &&
+ umask 0022 &&
+ mkdir -p templates/ &&
+ cp .git/config templates/config &&
+ git init --template=templates subdir &&
+ test_path_exists subdir/HEAD
+'
+
+test_expect_success 'template can set core.bare but overridden by command line' '
+ test_when_finished "rm -rf subdir" &&
+ test_when_finished "rm -rf templates" &&
+ test_config core.bare true &&
+ umask 0022 &&
+ mkdir -p templates/ &&
+ cp .git/config templates/config &&
+ git init --no-bare --template=templates subdir &&
+ test_path_exists subdir/.git/HEAD
+'
+
test_expect_success POSIXPERM 'update-server-info honors core.sharedRepository' '
: > a1 &&
git add a1 &&
diff --git a/t/t1419-exclude-refs.sh b/t/t1419-exclude-refs.sh
new file mode 100755
index 0000000000..5d8c86b657
--- /dev/null
+++ b/t/t1419-exclude-refs.sh
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+test_description='test exclude_patterns functionality in main ref store'
+
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
+TEST_PASSES_SANITIZE_LEAK=true
+. ./test-lib.sh
+
+for_each_ref__exclude () {
+ GIT_TRACE2_PERF=1 test-tool ref-store main \
+ for-each-ref--exclude "$@" >actual.raw
+ cut -d ' ' -f 2 actual.raw
+}
+
+for_each_ref () {
+ git for-each-ref --format='%(refname)' "$@"
+}
+
+assert_jumps () {
+ local nr="$1"
+ local trace="$2"
+
+ grep -q "name:jumps_made value:$nr$" $trace
+}
+
+assert_no_jumps () {
+ ! assert_jumps ".*" "$1"
+}
+
+test_expect_success 'setup' '
+ test_commit --no-tag base &&
+ base="$(git rev-parse HEAD)" &&
+
+ for name in foo bar baz quux
+ do
+ for i in 1 2 3
+ do
+ echo "create refs/heads/$name/$i $base" || return 1
+ done || return 1
+ done >in &&
+ echo "delete refs/heads/main" >>in &&
+
+ git update-ref --stdin <in &&
+ git pack-refs --all
+'
+
+test_expect_success 'excluded region in middle' '
+ for_each_ref__exclude refs/heads refs/heads/foo >actual 2>perf &&
+ for_each_ref refs/heads/bar refs/heads/baz refs/heads/quux >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 1 perf
+'
+
+test_expect_success 'excluded region at beginning' '
+ for_each_ref__exclude refs/heads refs/heads/bar >actual 2>perf &&
+ for_each_ref refs/heads/baz refs/heads/foo refs/heads/quux >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 1 perf
+'
+
+test_expect_success 'excluded region at end' '
+ for_each_ref__exclude refs/heads refs/heads/quux >actual 2>perf &&
+ for_each_ref refs/heads/foo refs/heads/bar refs/heads/baz >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 1 perf
+'
+
+test_expect_success 'disjoint excluded regions' '
+ for_each_ref__exclude refs/heads refs/heads/bar refs/heads/quux >actual 2>perf &&
+ for_each_ref refs/heads/baz refs/heads/foo >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 2 perf
+'
+
+test_expect_success 'adjacent, non-overlapping excluded regions' '
+ for_each_ref__exclude refs/heads refs/heads/bar refs/heads/baz >actual 2>perf &&
+ for_each_ref refs/heads/foo refs/heads/quux >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 1 perf
+'
+
+test_expect_success 'overlapping excluded regions' '
+ for_each_ref__exclude refs/heads refs/heads/ba refs/heads/baz >actual 2>perf &&
+ for_each_ref refs/heads/foo refs/heads/quux >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 1 perf
+'
+
+test_expect_success 'several overlapping excluded regions' '
+ for_each_ref__exclude refs/heads \
+ refs/heads/bar refs/heads/baz refs/heads/foo >actual 2>perf &&
+ for_each_ref refs/heads/quux >expect &&
+
+ test_cmp expect actual &&
+ assert_jumps 1 perf
+'
+
+test_expect_success 'non-matching excluded section' '
+ for_each_ref__exclude refs/heads refs/heads/does/not/exist >actual 2>perf &&
+ for_each_ref >expect &&
+
+ test_cmp expect actual &&
+ assert_no_jumps perf
+'
+
+test_expect_success 'meta-characters are discarded' '
+ for_each_ref__exclude refs/heads "refs/heads/ba*" >actual 2>perf &&
+ for_each_ref >expect &&
+
+ test_cmp expect actual &&
+ assert_no_jumps perf
+'
+
+test_done
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index 8c442adb1a..10a539158c 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -589,6 +589,16 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
)
'
+test_expect_success 'fsck notices excessively large tree entry name' '
+ git init large-name &&
+ (
+ cd large-name &&
+ test_commit a-long-name &&
+ git -c fsck.largePathname=warn:10 fsck 2>out &&
+ grep "warning.*large pathname" out
+ )
+'
+
while read name path pretty; do
while read mode type; do
: ${pretty:=$path}
@@ -1036,9 +1046,9 @@ test_expect_success 'fsck detects problems in worktree index' '
test_cmp expect actual
'
-test_expect_success 'fsck reports problems in main index without filename' '
+test_expect_success 'fsck reports problems in current worktree 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 &&
+ echo "this object will be removed to break current worktree index" >file &&
git add file &&
blob=$(git rev-parse :file) &&
remove_object $blob &&
diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh
index dd811b7fb4..f0737593c3 100755
--- a/t/t1502-rev-parse-parseopt.sh
+++ b/t/t1502-rev-parse-parseopt.sh
@@ -3,13 +3,29 @@
test_description='test git rev-parse --parseopt'
. ./test-lib.sh
+check_invalid_long_option () {
+ spec="$1"
+ opt="$2"
+ test_expect_success "test --parseopt invalid switch $opt help output for $spec" '
+ {
+ cat <<-\EOF &&
+ error: unknown option `'${opt#--}\''
+ EOF
+ sed -e 1d -e \$d <"$TEST_DIRECTORY/t1502/$spec.help"
+ } >expect &&
+ test_expect_code 129 git rev-parse --parseopt -- $opt \
+ 2>output <"$TEST_DIRECTORY/t1502/$spec" &&
+ test_cmp expect output
+ '
+}
+
test_expect_success 'setup optionspec' '
sed -e "s/^|//" >optionspec <<\EOF
|some-command [options] <args>...
|
|some-command does foo and bar!
|--
-|h,help show the help
+|h,help! show the help
|
|foo some nifty option --foo
|bar= some cool option --bar with an argument
@@ -58,44 +74,8 @@ EOF
'
test_expect_success 'test --parseopt help output' '
- sed -e "s/^|//" >expect <<\END_EXPECT &&
-|cat <<\EOF
-|usage: some-command [options] <args>...
-|
-| some-command does foo and bar!
-|
-| -h, --help show the help
-| --foo some nifty option --foo
-| --bar ... some cool option --bar with an argument
-| -b, --baz a short and long option
-|
-|An option group Header
-| -C[...] option C with an optional argument
-| -d, --data[=...] short and long option with an optional argument
-|
-|Argument hints
-| -B <arg> short option required argument
-| --bar2 <arg> long option required argument
-| -e, --fuz <with-space>
-| short and long option required argument
-| -s[<some>] short option optional argument
-| --long[=<data>] long option optional argument
-| -g, --fluf[=<path>] short and long option optional argument
-| --longest <very-long-argument-hint>
-| a very long argument hint
-| --pair <key=value> with an equals sign in the hint
-| --aswitch help te=t contains? fl*g characters!`
-| --bswitch <hint> hint has trailing tab character
-| --cswitch switch has trailing tab character
-| --short-hint <a> with a one symbol hint
-|
-|Extras
-| --extra1 line above used to cause a segfault but no longer does
-|
-|EOF
-END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec &&
- test_cmp expect output
+ test_cmp "$TEST_DIRECTORY/t1502/optionspec.help" output
'
test_expect_success 'test --parseopt help output no switches' '
@@ -131,7 +111,7 @@ test_expect_success 'test --parseopt help-all output hidden switches' '
|
| some-command does foo and bar!
|
-| --hidden1 A hidden switch
+| --[no-]hidden1 A hidden switch
|
|EOF
END_EXPECT
@@ -140,41 +120,12 @@ END_EXPECT
'
test_expect_success 'test --parseopt invalid switch help output' '
- sed -e "s/^|//" >expect <<\END_EXPECT &&
-|error: unknown option `does-not-exist'\''
-|usage: some-command [options] <args>...
-|
-| some-command does foo and bar!
-|
-| -h, --help show the help
-| --foo some nifty option --foo
-| --bar ... some cool option --bar with an argument
-| -b, --baz a short and long option
-|
-|An option group Header
-| -C[...] option C with an optional argument
-| -d, --data[=...] short and long option with an optional argument
-|
-|Argument hints
-| -B <arg> short option required argument
-| --bar2 <arg> long option required argument
-| -e, --fuz <with-space>
-| short and long option required argument
-| -s[<some>] short option optional argument
-| --long[=<data>] long option optional argument
-| -g, --fluf[=<path>] short and long option optional argument
-| --longest <very-long-argument-hint>
-| a very long argument hint
-| --pair <key=value> with an equals sign in the hint
-| --aswitch help te=t contains? fl*g characters!`
-| --bswitch <hint> hint has trailing tab character
-| --cswitch switch has trailing tab character
-| --short-hint <a> with a one symbol hint
-|
-|Extras
-| --extra1 line above used to cause a segfault but no longer does
-|
-END_EXPECT
+ {
+ cat <<-\EOF &&
+ error: unknown option `does-not-exist'\''
+ EOF
+ sed -e 1d -e \$d <"$TEST_DIRECTORY/t1502/optionspec.help"
+ } >expect &&
test_expect_code 129 git rev-parse --parseopt -- --does-not-exist 1>/dev/null 2>output < optionspec &&
test_cmp expect output
'
@@ -288,7 +239,7 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:"
| [--another-option]
|cmd [--yet-another-option]
|--
- |h,help show the help
+ |h,help! show the help
EOF
sed -e "s/^|//" >expect <<-\END_EXPECT &&
@@ -322,7 +273,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
|line
|blurb
|--
- |h,help show the help
+ |h,help! show the help
EOF
sed -e "s/^|//" >expect <<-\END_EXPECT &&
@@ -343,4 +294,32 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
test_cmp expect actual
'
+test_expect_success 'test --parseopt help output for optionspec-neg' '
+ test_expect_code 129 git rev-parse --parseopt -- \
+ -h >output <"$TEST_DIRECTORY/t1502/optionspec-neg" &&
+ test_cmp "$TEST_DIRECTORY/t1502/optionspec-neg.help" output
+'
+
+test_expect_success 'test --parseopt valid options for optionspec-neg' '
+ cat >expect <<-\EOF &&
+ set -- --foo --no-foo --no-bar --positive-only --no-negative --
+ EOF
+ git rev-parse --parseopt -- <"$TEST_DIRECTORY/t1502/optionspec-neg" >output \
+ --foo --no-foo --no-bar --positive-only --no-negative &&
+ test_cmp expect output
+'
+
+test_expect_success 'test --parseopt positivated option for optionspec-neg' '
+ cat >expect <<-\EOF &&
+ set -- --no-no-bar --no-no-bar --
+ EOF
+ git rev-parse --parseopt -- <"$TEST_DIRECTORY/t1502/optionspec-neg" >output \
+ --no-no-bar --bar &&
+ test_cmp expect output
+'
+
+check_invalid_long_option optionspec-neg --no-positive-only
+check_invalid_long_option optionspec-neg --negative
+check_invalid_long_option optionspec-neg --no-no-negative
+
test_done
diff --git a/t/t1502/.gitattributes b/t/t1502/.gitattributes
new file mode 100644
index 0000000000..562b12e16e
--- /dev/null
+++ b/t/t1502/.gitattributes
@@ -0,0 +1 @@
+* -whitespace
diff --git a/t/t1502/optionspec-neg b/t/t1502/optionspec-neg
new file mode 100644
index 0000000000..392f43eb0b
--- /dev/null
+++ b/t/t1502/optionspec-neg
@@ -0,0 +1,8 @@
+some-command [options] <args>...
+
+some-command does foo and bar!
+--
+foo can be negated
+no-bar can be positivated
+positive-only! cannot be negated
+no-negative! cannot be positivated
diff --git a/t/t1502/optionspec-neg.help b/t/t1502/optionspec-neg.help
new file mode 100644
index 0000000000..7a29f8cb03
--- /dev/null
+++ b/t/t1502/optionspec-neg.help
@@ -0,0 +1,12 @@
+cat <<\EOF
+usage: some-command [options] <args>...
+
+ some-command does foo and bar!
+
+ --[no-]foo can be negated
+ --no-bar can be positivated
+ --bar opposite of --no-bar
+ --positive-only cannot be negated
+ --no-negative cannot be positivated
+
+EOF
diff --git a/t/t1502/optionspec.help b/t/t1502/optionspec.help
new file mode 100755
index 0000000000..cbdd54d41b
--- /dev/null
+++ b/t/t1502/optionspec.help
@@ -0,0 +1,36 @@
+cat <<\EOF
+usage: some-command [options] <args>...
+
+ some-command does foo and bar!
+
+ -h, --help show the help
+ --[no-]foo some nifty option --foo
+ --[no-]bar ... some cool option --bar with an argument
+ -b, --[no-]baz a short and long option
+
+An option group Header
+ -C[...] option C with an optional argument
+ -d, --[no-]data[=...] short and long option with an optional argument
+
+Argument hints
+ -B <arg> short option required argument
+ --[no-]bar2 <arg> long option required argument
+ -e, --[no-]fuz <with-space>
+ short and long option required argument
+ -s[<some>] short option optional argument
+ --[no-]long[=<data>] long option optional argument
+ -g, --[no-]fluf[=<path>]
+ short and long option optional argument
+ --[no-]longest <very-long-argument-hint>
+ a very long argument hint
+ --[no-]pair <key=value>
+ with an equals sign in the hint
+ --[no-]aswitch help te=t contains? fl*g characters!`
+ --[no-]bswitch <hint> hint has trailing tab character
+ --[no-]cswitch switch has trailing tab character
+ --[no-]short-hint <a> with a one symbol hint
+
+Extras
+ --[no-]extra1 line above used to cause a segfault but no longer does
+
+EOF
diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index b16d69ca4a..45dd1bc858 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -117,6 +117,26 @@ test_expect_success 'checkout all stages/one file to temporary files' '
test $(cat $s3) = tree3path1)
'
+test_expect_success '--stage=all implies --temp' '
+ rm -f path* .merge_* actual &&
+ git checkout-index --stage=all -- path1 &&
+ test_path_is_missing path1
+'
+
+test_expect_success 'overriding --stage=all resets implied --temp' '
+ rm -f path* .merge_* actual &&
+ git checkout-index --stage=all --stage=2 -- path1 &&
+ echo tree2path1 >expect &&
+ test_cmp expect path1
+'
+
+test_expect_success '--stage=all --no-temp is rejected' '
+ rm -f path* .merge_* actual &&
+ test_must_fail git checkout-index --stage=all --no-temp -- path1 2>err &&
+ grep -v "already exists" err &&
+ grep "options .--stage=all. and .--no-temp. cannot be used together" err
+'
+
test_expect_success 'checkout some stages/one file to temporary files' '
rm -f path* .merge_* actual &&
git checkout-index --stage=all --temp -- path2 >actual &&
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index be394f1131..c01492f33f 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -197,4 +197,15 @@ test_expect_success '"add -u non-existent" should fail' '
! grep "non-existent" actual
'
+test_expect_success '"commit -a" implies "add -u" if index becomes empty' '
+ git rm -rf \* &&
+ git commit -m clean-slate &&
+ test_commit file1 &&
+ rm file1.t &&
+ test_tick &&
+ git commit -a -m remove &&
+ git ls-tree HEAD: >out &&
+ test_must_be_empty out
+'
+
test_done
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index 0ac468e69e..df4aff7825 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -121,7 +121,8 @@ test_expect_success '"add" worktree creating new branch' '
test_expect_success 'die the same branch is already checked out' '
(
cd here &&
- test_must_fail git checkout newmain
+ test_must_fail git checkout newmain 2>actual &&
+ grep "already used by worktree at" actual
)
'
@@ -417,9 +418,9 @@ test_wt_add_orphan_hint () {
grep "hint: If you meant to create a worktree containing a new orphan branch" actual &&
if [ $use_branch -eq 1 ]
then
- grep -E "^hint:\s+git worktree add --orphan -b \S+ \S+\s*$" actual
+ grep -E "^hint: +git worktree add --orphan -b [^ ]+ [^ ]+$" actual
else
- grep -E "^hint:\s+git worktree add --orphan \S+\s*$" actual
+ grep -E "^hint: +git worktree add --orphan [^ ]+$" actual
fi
'
@@ -709,8 +710,8 @@ test_dwim_orphan () {
local info_text="No possible source branch, inferring '--orphan'" &&
local fetch_error_text="fatal: No local or remote refs exist despite at least one remote" &&
local orphan_hint="hint: If you meant to create a worktree containing a new orphan branch" &&
- local invalid_ref_regex="^fatal: invalid reference:\s\+.*" &&
- local bad_combo_regex="^fatal: '[a-z-]\+' and '[a-z-]\+' cannot be used together" &&
+ local invalid_ref_regex="^fatal: invalid reference: " &&
+ local bad_combo_regex="^fatal: '[-a-z]*' and '[-a-z]*' cannot be used together" &&
local git_ns="repo" &&
local dashc_args="-C $git_ns" &&
@@ -995,11 +996,11 @@ test_dwim_orphan () {
grep "$invalid_ref_regex" actual &&
! grep "$orphan_hint" actual
else
- headpath=$(git $dashc_args rev-parse --sq --path-format=absolute --git-path HEAD) &&
+ headpath=$(git $dashc_args rev-parse --path-format=absolute --git-path HEAD) &&
headcontents=$(cat "$headpath") &&
grep "HEAD points to an invalid (or orphaned) reference" actual &&
- grep "HEAD path:\s*.$headpath." actual &&
- grep "HEAD contents:\s*.$headcontents." actual &&
+ grep "HEAD path: .$headpath." actual &&
+ grep "HEAD contents: .$headcontents." actual &&
grep "$orphan_hint" actual &&
! grep "$info_text" actual
fi &&
diff --git a/t/t2407-worktree-heads.sh b/t/t2407-worktree-heads.sh
index 019a40df2c..469443d8ae 100755
--- a/t/t2407-worktree-heads.sh
+++ b/t/t2407-worktree-heads.sh
@@ -58,7 +58,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in bisect' '
git -C wt-4 bisect good wt-1 &&
test_must_fail git branch -f wt-4 HEAD 2>err &&
- grep "cannot force update the branch '\''wt-4'\'' checked out at.*wt-4" err
+ grep "cannot force update the branch '\''wt-4'\'' used by worktree at.*wt-4" err
'
test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (apply)' '
@@ -68,7 +68,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (app
test_must_fail git -C wt-2 rebase --apply conflict-2 &&
test_must_fail git branch -f wt-2 HEAD 2>err &&
- grep "cannot force update the branch '\''wt-2'\'' checked out at.*wt-2" err
+ grep "cannot force update the branch '\''wt-2'\'' used by worktree at.*wt-2" err
'
test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (merge)' '
@@ -78,7 +78,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (mer
test_must_fail git -C wt-2 rebase conflict-2 &&
test_must_fail git branch -f wt-2 HEAD 2>err &&
- grep "cannot force update the branch '\''wt-2'\'' checked out at.*wt-2" err
+ grep "cannot force update the branch '\''wt-2'\'' used by worktree at.*wt-2" err
'
test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase with --update-refs' '
@@ -90,7 +90,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase with
for i in 3 4
do
test_must_fail git branch -f can-be-updated HEAD 2>err &&
- grep "cannot force update the branch '\''can-be-updated'\'' checked out at.*wt-3" err ||
+ grep "cannot force update the branch '\''can-be-updated'\'' used by worktree at.*wt-3" err ||
return 1
done
'
@@ -150,7 +150,7 @@ test_expect_success 'refuse to overwrite when in error states' '
for i in 1 2
do
test_must_fail git branch -f fake-$i HEAD 2>err &&
- grep "cannot force update the branch '\''fake-$i'\'' checked out at" err ||
+ grep "cannot force update the branch '\''fake-$i'\'' used by worktree at" err ||
return 1
done
'
diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh
index 217006d1bf..5af2dac0e4 100755
--- a/t/t3101-ls-tree-dirname.sh
+++ b/t/t3101-ls-tree-dirname.sh
@@ -154,6 +154,14 @@ EOF
test_output
'
+test_expect_success 'ls-tree --no-full-name' '
+ git -C path0 ls-tree --no-full-name $tree a >current &&
+ cat >expected <<-EOF &&
+ 040000 tree X a
+ EOF
+ test_output
+'
+
test_expect_success 'ls-tree --full-tree' '
(
cd path1/b/c &&
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index daf1666df7..080e4f24a6 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -942,7 +942,19 @@ test_expect_success 'test deleting branch without config' '
test_expect_success 'deleting currently checked out branch fails' '
git worktree add -b my7 my7 &&
test_must_fail git -C my7 branch -d my7 &&
- test_must_fail git branch -d my7 &&
+ test_must_fail git branch -d my7 2>actual &&
+ grep "^error: Cannot delete branch .my7. used by worktree at " actual &&
+ rm -r my7 &&
+ git worktree prune
+'
+
+test_expect_success 'deleting in-use branch fails' '
+ git worktree add my7 &&
+ test_commit -C my7 bt7 &&
+ git -C my7 bisect start HEAD HEAD~2 &&
+ test_must_fail git -C my7 branch -d my7 &&
+ test_must_fail git branch -d my7 2>actual &&
+ grep "^error: Cannot delete branch .my7. used by worktree at " actual &&
rm -r my7 &&
git worktree prune
'
diff --git a/t/t3202-show-branch.sh b/t/t3202-show-branch.sh
index be20ebe1d5..b17f388f56 100755
--- a/t/t3202-show-branch.sh
+++ b/t/t3202-show-branch.sh
@@ -119,6 +119,22 @@ test_expect_success 'show branch --remotes' '
test_must_be_empty actual.out
'
+test_expect_success 'show-branch --sparse' '
+ test_when_finished "git checkout branch10 && git branch -D branchA" &&
+ git checkout -b branchA branch10 &&
+ git merge -s ours -m "merge 1 and 10 to make A" branch1 &&
+ git commit --allow-empty -m "another" &&
+
+ git show-branch --sparse >out &&
+ grep "merge 1 and 10 to make A" out &&
+
+ git show-branch >out &&
+ ! grep "merge 1 and 10 to make A" out &&
+
+ git show-branch --no-sparse >out &&
+ ! grep "merge 1 and 10 to make A" out
+'
+
test_expect_success 'setup show branch --list' '
sed "s/^> //" >expect <<-\EOF
> [branch1] branch1
@@ -197,6 +213,15 @@ done <<\EOF
--reflog --current
EOF
+# unnegatable options
+for opt in topo-order date-order reflog
+do
+ test_expect_success "show-branch --no-$opt (should fail)" '
+ test_must_fail git show-branch --no-$opt 2>err &&
+ grep "unknown option .no-$opt." err
+ '
+done
+
test_expect_success 'error descriptions on non-existent branch' '
cat >expect <<-EOF &&
error: No branch named '\''non-existent'\'.'
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index 93f8295339..758963b189 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -55,9 +55,17 @@ cat >expect <<'EOF'
EOF
test_expect_success 'git branch -r shows remote branches' '
git branch -r >actual &&
+ test_cmp expect actual &&
+
+ git branch --remotes >actual &&
test_cmp expect actual
'
+test_expect_success 'git branch --no-remotes is rejected' '
+ test_must_fail git branch --no-remotes 2>err &&
+ grep "unknown option .no-remotes." err
+'
+
cat >expect <<'EOF'
branch-one
branch-two
@@ -68,9 +76,17 @@ cat >expect <<'EOF'
EOF
test_expect_success 'git branch -a shows local and remote branches' '
git branch -a >actual &&
+ test_cmp expect actual &&
+
+ git branch --all >actual &&
test_cmp expect actual
'
+test_expect_success 'git branch --no-all is rejected' '
+ test_must_fail git branch --no-all 2>err &&
+ grep "unknown option .no-all." err
+'
+
cat >expect <<'EOF'
two
one
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 3288aaec7d..d734000d2f 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -362,6 +362,7 @@ test_expect_success 'do not create empty note with -m ""' '
'
test_expect_success 'create note with combination of -m and -F' '
+ test_when_finished git notes remove HEAD &&
cat >expect-combine_m_and_F <<-EOF &&
foo
@@ -380,6 +381,41 @@ test_expect_success 'create note with combination of -m and -F' '
test_cmp expect-combine_m_and_F actual
'
+test_expect_success 'create note with combination of -m and -F and --separator' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect-combine_m_and_F <<-\EOF &&
+ foo
+ -------
+ xyzzy
+ -------
+ bar
+ -------
+ zyxxy
+ -------
+ baz
+ EOF
+ echo "xyzzy" >note_a &&
+ echo "zyxxy" >note_b &&
+ git notes add -m "foo" -F note_a -m "bar" -F note_b -m "baz" --separator="-------" &&
+ git notes show >actual &&
+ test_cmp expect-combine_m_and_F actual
+'
+
+test_expect_success 'create note with combination of -m and -F and --no-separator' '
+ cat >expect-combine_m_and_F <<-\EOF &&
+ foo
+ xyzzy
+ bar
+ zyxxy
+ baz
+ EOF
+ echo "xyzzy" >note_a &&
+ echo "zyxxy" >note_b &&
+ git notes add -m "foo" -F note_a -m "bar" -F note_b -m "baz" --no-separator &&
+ git notes show >actual &&
+ test_cmp expect-combine_m_and_F actual
+'
+
test_expect_success 'remove note with "git notes remove"' '
git notes remove HEAD^ &&
git notes remove &&
@@ -521,6 +557,112 @@ test_expect_success 'listing non-existing notes fails' '
test_must_be_empty actual
'
+test_expect_success 'append: specify a separator with an empty arg' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect <<-\EOF &&
+ notes-1
+
+ notes-2
+ EOF
+
+ git notes add -m "notes-1" &&
+ git notes append --separator="" -m "notes-2" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append: specify a separator without arg' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect <<-\EOF &&
+ notes-1
+
+ notes-2
+ EOF
+
+ git notes add -m "notes-1" &&
+ git notes append --separator -m "notes-2" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append: specify as --no-separator' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect <<-\EOF &&
+ notes-1
+ notes-2
+ EOF
+
+ git notes add -m "notes-1" &&
+ git notes append --no-separator -m "notes-2" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append: specify separator with line break' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect <<-\EOF &&
+ notes-1
+ -------
+ notes-2
+ EOF
+
+ git notes add -m "notes-1" &&
+ git notes append --separator="-------$LF" -m "notes-2" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append: specify separator without line break' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect <<-\EOF &&
+ notes-1
+ -------
+ notes-2
+ EOF
+
+ git notes add -m "notes-1" &&
+ git notes append --separator="-------" -m "notes-2" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append: specify separator with multiple messages' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect <<-\EOF &&
+ notes-1
+ -------
+ notes-2
+ -------
+ notes-3
+ EOF
+
+ git notes add -m "notes-1" &&
+ git notes append --separator="-------" -m "notes-2" -m "notes-3" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append note with combination of -m and -F and --separator' '
+ test_when_finished git notes remove HEAD &&
+ cat >expect-combine_m_and_F <<-\EOF &&
+ m-notes-1
+ -------
+ f-notes-1
+ -------
+ m-notes-2
+ -------
+ f-notes-2
+ -------
+ m-notes-3
+ EOF
+
+ echo "f-notes-1" >note_a &&
+ echo "f-notes-2" >note_b &&
+ git notes append -m "m-notes-1" -F note_a -m "m-notes-2" -F note_b -m "m-notes-3" --separator="-------" &&
+ git notes show >actual &&
+ test_cmp expect-combine_m_and_F actual
+'
+
test_expect_success 'append to existing note with "git notes append"' '
cat >expect <<-EOF &&
Initial set of notes
@@ -818,6 +960,33 @@ test_expect_success 'create note from blob with "git notes add -C" reuses blob i
test_cmp blob actual
'
+test_expect_success 'create note from blob with "-C", also specify "-m", "-F" and "--separator"' '
+ # 8th will be reuseed in following tests, so rollback when the test is done
+ test_when_finished "git notes remove && git notes add -C $(cat blob)" &&
+ commit=$(git rev-parse HEAD) &&
+ cat >expect <<-EOF &&
+ commit $commit
+ Author: A U Thor <author@example.com>
+ Date: Thu Apr 7 15:20:13 2005 -0700
+
+ ${indent}8th
+
+ Notes:
+ ${indent}This is a blob object
+ ${indent}-------
+ ${indent}This is created by -m
+ ${indent}-------
+ ${indent}This is created by -F
+ EOF
+
+ git notes remove &&
+ echo "This is a blob object" | git hash-object -w --stdin >blob &&
+ echo "This is created by -F" >note_a &&
+ git notes add -C $(cat blob) -m "This is created by -m" -F note_a --separator="-------" &&
+ git log -1 >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'create note from other note with "git notes add -c"' '
test_commit 9th &&
commit=$(git rev-parse HEAD) &&
diff --git a/t/t3321-notes-stripspace.sh b/t/t3321-notes-stripspace.sh
new file mode 100755
index 0000000000..36abdca5ee
--- /dev/null
+++ b/t/t3321-notes-stripspace.sh
@@ -0,0 +1,578 @@
+#!/bin/sh
+#
+# Copyright (c) 2023 Teng Long
+#
+
+test_description='Test commit notes with stripspace behavior'
+
+TEST_PASSES_SANITIZE_LEAK=true
+. ./test-lib.sh
+
+MULTI_LF="$LF$LF$LF"
+write_script fake_editor <<\EOF
+echo "$MSG" >"$1"
+echo "$MSG" >&2
+EOF
+GIT_EDITOR=./fake_editor
+export GIT_EDITOR
+
+test_expect_success 'setup the commit' '
+ test_commit 1st
+'
+
+test_expect_success 'add note by editor' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes add &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying single "-m", "--stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ git notes add -m "${LF}first-line${MULTI_LF}second-line${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ git notes add --stripspace -m "${LF}first-line${MULTI_LF}second-line${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying single "-m" and "--no-stripspace" ' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}first-line${MULTI_LF}second-line
+ EOF
+
+ git notes add --no-stripspace \
+ -m "${LF}first-line${MULTI_LF}second-line${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying multiple "-m", "--stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ git notes add -m "${LF}" \
+ -m "first-line" \
+ -m "${MULTI_LF}" \
+ -m "second-line" \
+ -m "${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ git notes add --stripspace -m "${LF}" \
+ -m "first-line" \
+ -m "${MULTI_LF}" \
+ -m "second-line" \
+ -m "${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add notes by specifying multiple "-m" and "--no-stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line${LF}
+ EOF
+
+ git notes add --no-stripspace \
+ -m "${LF}" \
+ -m "first-line" \
+ -m "${MULTI_LF}" \
+ -m "second-line" \
+ -m "${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying single "-F", "--stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ cat >note-file <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ git notes add -F note-file &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ git notes add --stripspace -F note-file &&
+ git notes show >actual
+'
+
+test_expect_success 'add note by specifying single "-F" and "--no-stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ cat >note-file <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ git notes add --no-stripspace -F note-file &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying multiple "-F", "--stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ file-1-first-line
+
+ file-1-second-line
+
+ file-2-first-line
+
+ file-2-second-line
+ EOF
+
+ cat >note-file-1 <<-EOF &&
+ ${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-2 <<-EOF &&
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ git notes add -F note-file-1 -F note-file-2 &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ git notes add --stripspace -F note-file-1 -F note-file-2 &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying multiple "-F" with "--no-stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-1 <<-EOF &&
+ ${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-2 <<-EOF &&
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ git notes add --no-stripspace -F note-file-1 -F note-file-2 &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append note by editor' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ git notes add -m "first-line" &&
+ MSG="${MULTI_LF}second-line${LF}" git notes append &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append note by specifying single "-m"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ git notes add -m "${LF}first-line" &&
+ git notes append -m "${MULTI_LF}second-line${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append note by specifying multiple "-m"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ git notes add -m "${LF}first-line" &&
+ git notes append -m "${MULTI_LF}" \
+ -m "second-line" \
+ -m "${LF}" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying single "-F"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ cat >note-file <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ git notes add -F note-file &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add notes by specifying multiple "-F"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ file-1-first-line
+
+ file-1-second-line
+
+ file-2-first-line
+
+ file-2-second-line
+ EOF
+
+ cat >note-file-1 <<-EOF &&
+ ${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-2 <<-EOF &&
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ git notes add -F note-file-1 -F note-file-2 &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append note by specifying single "-F"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ initial-line
+
+ first-line
+
+ second-line
+ EOF
+
+ cat >note-file <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ git notes add -m "initial-line" &&
+ git notes append -F note-file &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append notes by specifying multiple "-F"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ initial-line
+
+ file-1-first-line
+
+ file-1-second-line
+
+ file-2-first-line
+
+ file-2-second-line
+ EOF
+
+ cat >note-file-1 <<-EOF &&
+ ${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-2 <<-EOF &&
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ git notes add -m "initial-line" &&
+ git notes append -F note-file-1 -F note-file-2 &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'append note by specifying multiple "-F" with "--no-stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ initial-line
+ ${LF}${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-1 <<-EOF &&
+ ${LF}
+ file-1-first-line
+ ${MULTI_LF}
+ file-1-second-line
+ ${LF}
+ EOF
+
+ cat >note-file-2 <<-EOF &&
+ ${LF}
+ file-2-first-line
+ ${MULTI_LF}
+ file-2-second-line
+ ${LF}
+ EOF
+
+ git notes add -m "initial-line" &&
+ git notes append --no-stripspace -F note-file-1 -F note-file-2 &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add notes with empty messages' '
+ rev=$(git rev-parse HEAD) &&
+ git notes add -m "${LF}" \
+ -m "${MULTI_LF}" \
+ -m "${LF}" >actual 2>&1 &&
+ test_i18ngrep "Removing note for object" actual
+'
+
+test_expect_success 'add note by specifying "-C", "--no-stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ cat expect | git hash-object -w --stdin >blob &&
+ git notes add -C $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ git notes add --no-stripspace -C $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'reuse note by specifying "-C" and "--stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >data <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ cat data | git hash-object -w --stdin >blob &&
+ git notes add --stripspace -C $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'reuse with "-C" and add note with "-m", "-m" will stripspace all together' '
+ test_when_finished "git notes remove" &&
+ cat >data <<-EOF &&
+ ${LF}
+ first-line
+ ${MULTI_LF}
+ second-line
+ ${LF}
+ EOF
+
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+
+ third-line
+ EOF
+
+ cat data | git hash-object -w --stdin >blob &&
+ git notes add -C $(cat blob) -m "third-line" &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note with "-m" and reuse note with "-C", "-C" will not stripspace all together' '
+ test_when_finished "git notes remove" &&
+ cat >data <<-EOF &&
+
+ second-line
+ EOF
+
+ cat >expect <<-EOF &&
+ first-line
+ ${LF}
+ second-line
+ EOF
+
+ cat data | git hash-object -w --stdin >blob &&
+ git notes add -m "first-line" -C $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying "-c", "--stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ echo "initial-line" | git hash-object -w --stdin >blob &&
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes add -c $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes add --stripspace -c $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'add note by specifying "-c" with "--no-stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}first-line${MULTI_LF}second-line${LF}
+ EOF
+
+ echo "initial-line" | git hash-object -w --stdin >blob &&
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes add --no-stripspace -c $(cat blob) &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'edit note by specifying "-c", "--stripspace" is the default behavior' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ first-line
+
+ second-line
+ EOF
+
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes edit &&
+ git notes show >actual &&
+ test_cmp expect actual &&
+ git notes remove &&
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes edit --stripspace &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'edit note by specifying "-c" with "--no-stripspace"' '
+ test_when_finished "git notes remove" &&
+ cat >expect <<-EOF &&
+ ${LF}first-line${MULTI_LF}second-line${LF}
+ EOF
+
+ MSG="${LF}first-line${MULTI_LF}second-line${LF}" git notes add --no-stripspace &&
+ git notes show >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 3ce918fdb8..d3df19a51f 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -421,7 +421,7 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' '
git checkout main &&
git worktree add wt &&
test_must_fail git -C wt rebase main main 2>err &&
- test_i18ngrep "already checked out" err
+ test_i18ngrep "already used by worktree at" err
'
test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index 79b0640c00..e9e03ca4b5 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -8,6 +8,7 @@ test_description='git rebase --merge test'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
T="A quick brown fox
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index ff0afad63e..939fe8dfbc 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -604,7 +604,8 @@ test_expect_success 'clean error after failed "exec"' '
echo "edited again" > file7 &&
git add file7 &&
test_must_fail git rebase --continue 2>error &&
- test_i18ngrep "you have staged changes in your working tree" error
+ test_i18ngrep "you have staged changes in your working tree" error &&
+ test_i18ngrep ! "could not open.*for reading" error
'
test_expect_success 'rebase a detached HEAD' '
@@ -1276,20 +1277,34 @@ test_expect_success 'todo count' '
'
test_expect_success 'rebase -i commits that overwrite untracked files (pick)' '
- git checkout --force branch2 &&
+ git checkout --force A &&
git clean -f &&
+ cat >todo <<-EOF &&
+ exec >file2
+ pick $(git rev-parse B) B
+ pick $(git rev-parse C) C
+ pick $(git rev-parse D) D
+ exec cat .git/rebase-merge/done >actual
+ EOF
(
- set_fake_editor &&
- FAKE_LINES="edit 1 2" git rebase -i A
- ) &&
- test_cmp_rev HEAD F &&
- test_path_is_missing file6 &&
- >file6 &&
- test_must_fail git rebase --continue &&
- test_cmp_rev HEAD F &&
- rm file6 &&
+ set_replace_editor todo &&
+ test_must_fail git rebase -i A
+ ) &&
+ test_cmp_rev HEAD B &&
+ test_cmp_rev REBASE_HEAD C &&
+ head -n3 todo >expect &&
+ test_cmp expect .git/rebase-merge/done &&
+ rm file2 &&
+ test_path_is_missing .git/rebase-merge/patch &&
+ echo changed >file1 &&
+ git add file1 &&
+ test_must_fail git rebase --continue 2>err &&
+ grep "error: you have staged changes in your working tree" err &&
+ git reset --hard HEAD &&
git rebase --continue &&
- test_cmp_rev HEAD I
+ test_cmp_rev HEAD D &&
+ tail -n3 todo >>expect &&
+ test_cmp expect actual
'
test_expect_success 'rebase -i commits that overwrite untracked files (squash)' '
@@ -1305,7 +1320,14 @@ test_expect_success 'rebase -i commits that overwrite untracked files (squash)'
>file6 &&
test_must_fail git rebase --continue &&
test_cmp_rev HEAD F &&
+ test_cmp_rev REBASE_HEAD I &&
rm file6 &&
+ test_path_is_missing .git/rebase-merge/patch &&
+ echo changed >file1 &&
+ git add file1 &&
+ test_must_fail git rebase --continue 2>err &&
+ grep "error: you have staged changes in your working tree" err &&
+ git reset --hard HEAD &&
git rebase --continue &&
test $(git cat-file commit HEAD | sed -ne \$p) = I &&
git reset --hard original-branch2
@@ -1323,7 +1345,14 @@ test_expect_success 'rebase -i commits that overwrite untracked files (no ff)' '
>file6 &&
test_must_fail git rebase --continue &&
test $(git cat-file commit HEAD | sed -ne \$p) = F &&
+ test_cmp_rev REBASE_HEAD I &&
rm file6 &&
+ test_path_is_missing .git/rebase-merge/patch &&
+ echo changed >file1 &&
+ git add file1 &&
+ test_must_fail git rebase --continue 2>err &&
+ grep "error: you have staged changes in your working tree" err &&
+ git reset --hard HEAD &&
git rebase --continue &&
test $(git cat-file commit HEAD | sed -ne \$p) = I
'
@@ -1596,6 +1625,32 @@ test_expect_success 'static check of bad command' '
test C = $(git cat-file commit HEAD^ | sed -ne \$p)
'
+test_expect_success 'the first command cannot be a fixup' '
+ rebase_setup_and_clean fixup-first &&
+
+ cat >orig <<-EOF &&
+ fixup $(git log -1 --format="%h %s" B)
+ pick $(git log -1 --format="%h %s" C)
+ EOF
+
+ (
+ set_replace_editor orig &&
+ test_must_fail git rebase -i A 2>actual
+ ) &&
+ grep "cannot .fixup. without a previous commit" actual &&
+ grep "You can fix this with .git rebase --edit-todo.." actual &&
+ # verify that the todo list has not been truncated
+ grep -v "^#" .git/rebase-merge/git-rebase-todo >actual &&
+ test_cmp orig actual &&
+
+ test_must_fail git rebase --edit-todo 2>actual &&
+ grep "cannot .fixup. without a previous commit" actual &&
+ grep "You can fix this with .git rebase --edit-todo.." actual &&
+ # verify that the todo list has not been truncated
+ grep -v "^#" .git/rebase-merge/git-rebase-todo >actual &&
+ test_cmp orig actual
+'
+
test_expect_success 'tabs and spaces are accepted in the todolist' '
rebase_setup_and_clean indented-comment &&
write_script add-indent.sh <<-\EOF &&
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 2d0789e554..c4e2fcac67 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -115,15 +115,23 @@ test_expect_success '--skip after failed fixup cleans commit message' '
test_when_finished "test_might_fail git rebase --abort" &&
git checkout -b with-conflicting-fixup &&
test_commit wants-fixup &&
- test_commit "fixup! wants-fixup" wants-fixup.t 1 wants-fixup-1 &&
- test_commit "fixup! wants-fixup" wants-fixup.t 2 wants-fixup-2 &&
- test_commit "fixup! wants-fixup" wants-fixup.t 3 wants-fixup-3 &&
+ test_commit "fixup 1" wants-fixup.t 1 wants-fixup-1 &&
+ test_commit "fixup 2" wants-fixup.t 2 wants-fixup-2 &&
+ test_commit "fixup 3" wants-fixup.t 3 wants-fixup-3 &&
test_must_fail env FAKE_LINES="1 fixup 2 squash 4" \
git rebase -i HEAD~4 &&
: now there is a conflict, and comments in the commit message &&
- git show HEAD >out &&
- grep "fixup! wants-fixup" out &&
+ test_commit_message HEAD <<-\EOF &&
+ # This is a combination of 2 commits.
+ # This is the 1st commit message:
+
+ wants-fixup
+
+ # The commit message #2 will be skipped:
+
+ # fixup 1
+ EOF
: skip and continue &&
echo "cp \"\$1\" .git/copy.txt" | write_script copy-editor.sh &&
@@ -133,33 +141,49 @@ test_expect_success '--skip after failed fixup cleans commit message' '
test_path_is_missing .git/copy.txt &&
: now the comments in the commit message should have been cleaned up &&
- git show HEAD >out &&
- ! grep "fixup! wants-fixup" out &&
+ test_commit_message HEAD -m wants-fixup &&
: now, let us ensure that "squash" is handled correctly &&
git reset --hard wants-fixup-3 &&
- test_must_fail env FAKE_LINES="1 squash 4 squash 2 squash 4" \
+ test_must_fail env FAKE_LINES="1 squash 2 squash 1 squash 3 squash 1" \
git rebase -i HEAD~4 &&
- : the first squash failed, but there are two more in the chain &&
+ : the second squash failed, but there are two more in the chain &&
(test_set_editor "$PWD/copy-editor.sh" &&
test_must_fail git rebase --skip) &&
: not the final squash, no need to edit the commit message &&
test_path_is_missing .git/copy.txt &&
- : The first squash was skipped, therefore: &&
- git show HEAD >out &&
- test_i18ngrep "# This is a combination of 2 commits" out &&
- test_i18ngrep "# This is the commit message #2:" out &&
+ : The first and third squashes succeeded, therefore: &&
+ test_commit_message HEAD <<-\EOF &&
+ # This is a combination of 3 commits.
+ # This is the 1st commit message:
+
+ wants-fixup
+
+ # This is the commit message #2:
+
+ fixup 1
+
+ # This is the commit message #3:
+
+ fixup 2
+ EOF
(test_set_editor "$PWD/copy-editor.sh" && git rebase --skip) &&
- git show HEAD >out &&
- test_i18ngrep ! "# This is a combination" out &&
+ test_commit_message HEAD <<-\EOF &&
+ wants-fixup
+
+ fixup 1
+
+ fixup 2
+ EOF
: Final squash failed, but there was still a squash &&
- test_i18ngrep "# This is a combination of 2 commits" .git/copy.txt &&
- test_i18ngrep "# This is the commit message #2:" .git/copy.txt
+ head -n1 .git/copy.txt >first-line &&
+ test_i18ngrep "# This is a combination of 3 commits" first-line &&
+ test_i18ngrep "# This is the commit message #3:" .git/copy.txt
'
test_expect_success 'setup rerere database' '
@@ -244,6 +268,24 @@ test_expect_success 'the todo command "break" works' '
test_path_is_file execed
'
+test_expect_success 'patch file is removed before break command' '
+ test_when_finished "git rebase --abort" &&
+ cat >todo <<-\EOF &&
+ pick commit-new-file-F2-on-topic-branch
+ break
+ EOF
+
+ (
+ set_replace_editor todo &&
+ test_must_fail git rebase -i --onto commit-new-file-F2 HEAD
+ ) &&
+ test_path_is_file .git/rebase-merge/patch &&
+ echo 22>F2 &&
+ git add F2 &&
+ git rebase --continue &&
+ test_path_is_missing .git/rebase-merge/patch
+'
+
test_expect_success '--reschedule-failed-exec' '
test_when_finished "git rebase --abort" &&
test_must_fail git rebase -x false --reschedule-failed-exec HEAD^ &&
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh
index 96ae0edf1e..59b5d6b6f2 100755
--- a/t/t3430-rebase-merges.sh
+++ b/t/t3430-rebase-merges.sh
@@ -128,14 +128,24 @@ test_expect_success 'generate correct todo list' '
'
test_expect_success '`reset` refuses to overwrite untracked files' '
- git checkout -b refuse-to-reset &&
+ git checkout B &&
test_commit dont-overwrite-untracked &&
- git checkout @{-1} &&
- : >dont-overwrite-untracked.t &&
- echo "reset refs/tags/dont-overwrite-untracked" >script-from-scratch &&
+ cat >script-from-scratch <<-EOF &&
+ exec >dont-overwrite-untracked.t
+ pick $(git rev-parse B) B
+ reset refs/tags/dont-overwrite-untracked
+ pick $(git rev-parse C) C
+ exec cat .git/rebase-merge/done >actual
+ EOF
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
- test_must_fail git rebase -ir HEAD &&
- git rebase --abort
+ test_must_fail git rebase -ir A &&
+ test_cmp_rev HEAD B &&
+ head -n3 script-from-scratch >expect &&
+ test_cmp expect .git/rebase-merge/done &&
+ rm dont-overwrite-untracked.t &&
+ git rebase --continue &&
+ tail -n3 script-from-scratch >>expect &&
+ test_cmp expect actual
'
test_expect_success '`reset` rejects trees' '
@@ -165,12 +175,16 @@ test_expect_success 'failed `merge -C` writes patch (may be rescheduled, too)' '
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
test_must_fail git rebase -ir HEAD &&
+ test_cmp_rev REBASE_HEAD H^0 &&
grep "^merge -C .* G$" .git/rebase-merge/done &&
grep "^merge -C .* G$" .git/rebase-merge/git-rebase-todo &&
- test_path_is_file .git/rebase-merge/patch &&
+ test_path_is_missing .git/rebase-merge/patch &&
+ echo changed >file1 &&
+ git add file1 &&
+ test_must_fail git rebase --continue 2>err &&
+ grep "error: you have staged changes in your working tree" err &&
: fail because of merge conflict &&
- rm G.t .git/rebase-merge/patch &&
git reset --hard conflicting-G &&
test_must_fail git rebase --continue &&
! grep "^merge -C .* G$" .git/rebase-merge/git-rebase-todo &&
@@ -586,4 +600,15 @@ test_expect_success 'progress shows the correct total' '
test_line_count = 14 progress
'
+test_expect_success 'truncate label names' '
+ commit=$(git commit-tree -p HEAD^ -p HEAD -m "0123456789 我 123" HEAD^{tree}) &&
+ git merge --ff-only $commit &&
+
+ done="$(git rev-parse --git-path rebase-merge/done)" &&
+ git -c rebase.maxLabelLength=14 rebase --rebase-merges -x "cp \"$done\" out" --root &&
+ grep "label 0123456789-我$" out &&
+ git -c rebase.maxLabelLength=13 rebase --rebase-merges -x "cp \"$done\" out" --root &&
+ grep "label 0123456789-$" out
+'
+
test_done
diff --git a/t/t3437-rebase-fixup-options.sh b/t/t3437-rebase-fixup-options.sh
index dd3b301fa7..7929e2e2e3 100755
--- a/t/t3437-rebase-fixup-options.sh
+++ b/t/t3437-rebase-fixup-options.sh
@@ -21,21 +21,6 @@ TEST_PASSES_SANITIZE_LEAK=true
EMPTY=""
-# test_commit_message <rev> -m <msg>
-# test_commit_message <rev> <path>
-# Verify that the commit message of <rev> matches
-# <msg> or the content of <path>.
-test_commit_message () {
- git show --no-patch --pretty=format:%B "$1" >actual &&
- case "$2" in
- -m)
- echo "$3" >expect &&
- test_cmp expect actual ;;
- *)
- test_cmp "$2" actual ;;
- esac
-}
-
get_author () {
rev="$1" &&
git log -1 --pretty=format:"%an %ae %at" "$rev"
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index e2ef619323..4158590322 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -176,6 +176,29 @@ test_expect_success 'advice from failed revert' '
test_cmp expected actual
'
+test_expect_subject () {
+ echo "$1" >expect &&
+ git log -1 --pretty=%s >actual &&
+ test_cmp expect actual
+}
+
+test_expect_success 'titles of fresh reverts' '
+ test_commit --no-tag A file1 &&
+ test_commit --no-tag B file1 &&
+ git revert --no-edit HEAD &&
+ test_expect_subject "Revert \"B\"" &&
+ git revert --no-edit HEAD &&
+ test_expect_subject "Reapply \"B\"" &&
+ git revert --no-edit HEAD &&
+ test_expect_subject "Revert \"Reapply \"B\"\""
+'
+
+test_expect_success 'title of legacy double revert' '
+ test_commit --no-tag "Revert \"Revert \"B\"\"" file1 &&
+ git revert --no-edit HEAD &&
+ test_expect_subject "Revert \"Revert \"Revert \"B\"\"\""
+'
+
test_expect_success 'identification of reverted commit (default)' '
test_commit to-ident &&
test_when_finished "git reset --hard to-ident" &&
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index d524d4057d..7afc883ec3 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -403,7 +403,7 @@ test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
git diff-tree -r -R $tree_A $tree_B >.test-b &&
cmp -s .test-a .test-b'
-test_expect_success'diff can read from stdin' '
+test_expect_success 'diff can read from stdin' '
test_must_fail git diff --no-index -- MN - < NN |
grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
test_must_fail git diff --no-index -- MN NN |
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 3cf2b7a7fb..0a4ab36c3a 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1373,7 +1373,27 @@ test_expect_success '--rfc' '
Subject: [RFC PATCH 1/1] header with . in it
EOF
git format-patch -n -1 --stdout --rfc >patch &&
- grep ^Subject: patch >actual &&
+ grep "^Subject:" patch >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '--rfc does not overwrite prefix' '
+ cat >expect <<-\EOF &&
+ Subject: [RFC PATCH foobar 1/1] header with . in it
+ EOF
+ git -c format.subjectPrefix="PATCH foobar" \
+ format-patch -n -1 --stdout --rfc >patch &&
+ grep "^Subject:" patch >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '--rfc is argument order independent' '
+ cat >expect <<-\EOF &&
+ Subject: [RFC PATCH foobar 1/1] header with . in it
+ EOF
+ git format-patch -n -1 --stdout --rfc \
+ --subject-prefix="PATCH foobar" >patch &&
+ grep "^Subject:" patch >actual &&
test_cmp expect actual
'
@@ -1991,6 +2011,20 @@ test_expect_success 'cover letter using branch description (6)' '
grep hello actual
'
+test_expect_success 'cover letter with --description-file' '
+ test_when_finished "rm -f description.txt" &&
+ cat >description.txt <<-\EOF &&
+ subject from file
+
+ body from file
+ EOF
+ git checkout rebuild-1 &&
+ git format-patch --stdout --cover-letter --cover-from-description auto \
+ --description-file description.txt main >actual &&
+ grep "^Subject: \[PATCH 0/2\] subject from file$" actual &&
+ grep "^body from file$" actual
+'
+
test_expect_success 'cover letter with nothing' '
git format-patch --stdout --cover-letter >actual &&
test_line_count = 0 actual
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index b298f220e0..fcd2473e52 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright (c) 2006 Johannes E. Schindelin
-#
+# Copyright (c) 2023 Google LLC
test_description='Test special whitespace in diff engine.
@@ -11,6 +11,43 @@ TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh
+for opt_res in --patch --quiet -s --stat --shortstat --dirstat=lines \
+ --raw! --name-only! --name-status!
+do
+ opts=${opt_res%!} expect_failure=
+ test "$opts" = "$opt_res" ||
+ expect_failure="test_expect_code 1"
+
+ test_expect_success "status with $opts (different)" '
+ echo foo >x &&
+ git add x &&
+ echo bar >x &&
+ test_expect_code 1 git diff -w $opts --exit-code x
+ '
+
+ test_expect_success POSIXPERM "status with $opts (mode differs)" '
+ test_when_finished "git update-index --chmod=-x x" &&
+ echo foo >x &&
+ git add x &&
+ git update-index --chmod=+x x &&
+ test_expect_code 1 git diff -w $opts --exit-code x
+ '
+
+ test_expect_success "status with $opts (removing an empty file)" '
+ : >x &&
+ git add x &&
+ rm x &&
+ test_expect_code 1 git diff -w $opts --exit-code -- x
+ '
+
+ test_expect_success "status with $opts (different but equivalent)" '
+ echo foo >x &&
+ git add x &&
+ echo " foo" >x &&
+ $expect_failure git diff -w $opts --exit-code x
+ '
+done
+
test_expect_success "Ray Lehtiniemi's example" '
cat <<-\EOF >x &&
do {
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index 5bc28ad9f0..f439f469bd 100755
--- a/t/t4017-diff-retval.sh
+++ b/t/t4017-diff-retval.sh
@@ -138,4 +138,9 @@ test_expect_success 'check honors conflict marker length' '
git reset --hard
'
+test_expect_success 'option errors are not confused by --exit-code' '
+ test_must_fail git diff --exit-code --nonsense 2>err &&
+ grep '^usage:' err
+'
+
test_done
diff --git a/t/t4040-whitespace-status.sh b/t/t4040-whitespace-status.sh
index e70e020ae9..eec3d73dc2 100755
--- a/t/t4040-whitespace-status.sh
+++ b/t/t4040-whitespace-status.sh
@@ -28,8 +28,7 @@ test_expect_success 'diff-tree --exit-code' '
test_expect_success 'diff-tree -b --exit-code' '
git diff -b --exit-code HEAD^ HEAD &&
- git diff-tree -b -p --exit-code HEAD^ HEAD &&
- git diff-tree -b --exit-code HEAD^ HEAD
+ git diff-tree -b -p --exit-code HEAD^ HEAD
'
test_expect_success 'diff-index --cached --exit-code' '
diff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh
index 58742d4fc5..20cc1209f6 100755
--- a/t/t4141-apply-too-large.sh
+++ b/t/t4141-apply-too-large.sh
@@ -17,7 +17,7 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
EOF
test-tool genzeros
} | test_copy_bytes $sz | test_must_fail git apply 2>err &&
- grep "git apply: failed to read" err
+ grep "patch too large" err
'
test_done
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index fa7f987284..2016132f51 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -466,7 +466,7 @@ test_expect_success 'gitmailmap(5) example output: example #1' '
Author Jane Doe <jane@laptop.(none)> maps to Jane Doe <jane@laptop.(none)>
Committer C O Mitter <committer@example.com> maps to C O Mitter <committer@example.com>
- Author Jane D <jane@desktop.(none)> maps to Jane Doe <jane@desktop.(none)>
+ Author Jane D. <jane@desktop.(none)> maps to Jane Doe <jane@desktop.(none)>
Committer C O Mitter <committer@example.com> maps to C O Mitter <committer@example.com>
EOF
git -C doc log --reverse --pretty=format:"Author %an <%ae> maps to %aN <%aE>%nCommitter %cn <%ce> maps to %cN <%cE>%n" >actual &&
@@ -494,7 +494,7 @@ test_expect_success 'gitmailmap(5) example output: example #2' '
Author Jane Doe <jane@laptop.(none)> maps to Jane Doe <jane@example.com>
Committer C O Mitter <committer@example.com> maps to C O Mitter <committer@example.com>
- Author Jane D <jane@desktop.(none)> maps to Jane Doe <jane@example.com>
+ Author Jane D. <jane@desktop.(none)> maps to Jane Doe <jane@example.com>
Committer C O Mitter <committer@example.com> maps to C O Mitter <committer@example.com>
EOF
git -C doc log --reverse --pretty=format:"Author %an <%ae> maps to %aN <%aE>%nCommitter %cn <%ce> maps to %cN <%cE>%n" >actual &&
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 4cf8a77667..16626e4fe9 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -576,6 +576,38 @@ test_expect_success 'clean log decoration' '
test_cmp expected actual1
'
+test_expect_success 'pretty format %decorate' '
+ git checkout -b foo &&
+ git commit --allow-empty -m "new commit" &&
+ git tag bar &&
+ git branch qux &&
+
+ echo " (HEAD -> foo, tag: bar, qux)" >expect1 &&
+ git log --format="%(decorate)" -1 >actual1 &&
+ test_cmp expect1 actual1 &&
+
+ echo "HEAD -> foo, tag: bar, qux" >expect2 &&
+ git log --format="%(decorate:prefix=,suffix=)" -1 >actual2 &&
+ test_cmp expect2 actual2 &&
+
+ echo "[ HEAD -> foo; tag: bar; qux ]" >expect3 &&
+ git log --format="%(decorate:prefix=[ ,suffix= ],separator=%x3B )" \
+ -1 >actual3 &&
+ test_cmp expect3 actual3 &&
+
+ # Try with a typo (in "separator"), in which case the placeholder should
+ # not be replaced.
+ echo "%(decorate:prefix=[ ,suffix= ],separater=; )" >expect4 &&
+ git log --format="%(decorate:prefix=[ ,suffix= ],separater=%x3B )" \
+ -1 >actual4 &&
+ test_cmp expect4 actual4 &&
+
+ echo "HEAD->foo bar qux" >expect5 &&
+ git log --format="%(decorate:prefix=,suffix=,separator= ,tag=,pointer=->)" \
+ -1 >actual5 &&
+ test_cmp expect5 actual5
+'
+
cat >trailers <<EOF
Signed-off-by: A U Thor <author@example.com>
Acked-by: A U Thor <author@example.com>
@@ -1012,10 +1044,25 @@ test_expect_success '%(describe:tags) vs git describe --tags' '
test_expect_success '%(describe:abbrev=...) vs git describe --abbrev=...' '
test_when_finished "git tag -d tagname" &&
+
+ # Case 1: We have commits between HEAD and the most recent tag
+ # reachable from it
+ test_commit --no-tag file &&
+ git describe --abbrev=15 >expect &&
+ git log -1 --format="%(describe:abbrev=15)" >actual &&
+ test_cmp expect actual &&
+
+ # Make sure the hash used is at least 15 digits long
+ sed -e "s/^.*-g\([0-9a-f]*\)$/\1/" <actual >hexpart &&
+ test 16 -le $(wc -c <hexpart) &&
+
+ # Case 2: We have a tag at HEAD, describe directly gives the
+ # name of the tag
git tag -a -m tagged tagname &&
git describe --abbrev=15 >expect &&
git log -1 --format="%(describe:abbrev=15)" >actual &&
- test_cmp expect actual
+ test_cmp expect actual &&
+ test tagname = $(cat actual)
'
test_expect_success 'log --pretty with space stealing' '
diff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh
index ded33a82e2..21986a866d 100755
--- a/t/t4207-log-decoration-colors.sh
+++ b/t/t4207-log-decoration-colors.sh
@@ -53,15 +53,17 @@ cmp_filtered_decorations () {
# to this test since it does not contain any decoration, hence --first-parent
test_expect_success 'commit decorations colored correctly' '
cat >expect <<-EOF &&
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD -> \
-${c_reset}${c_branch}main${c_reset}${c_commit}, \
-${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit}, \
-${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
-${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit}, \
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD${c_reset}\
+${c_commit} -> ${c_reset}${c_branch}main${c_reset}${c_commit}, \
+${c_reset}${c_tag}tag: ${c_reset}${c_tag}v1.0${c_reset}${c_commit}, \
+${c_reset}${c_tag}tag: ${c_reset}${c_tag}B${c_reset}${c_commit})${c_reset} B
+${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_tag}tag: ${c_reset}${c_tag}A1${c_reset}${c_commit}, \
${c_reset}${c_remoteBranch}other/main${c_reset}${c_commit})${c_reset} A1
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset} \
-On main: Changes to A.t
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_stash}refs/stash${c_reset}${c_commit})${c_reset} On main: Changes to A.t
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_tag}tag: ${c_reset}${c_tag}A${c_reset}${c_commit})${c_reset} A
EOF
git log --first-parent --no-abbrev --decorate --oneline --color=always --all >actual &&
@@ -76,12 +78,14 @@ test_expect_success 'test coloring with replace-objects' '
git replace HEAD~1 HEAD~2 &&
cat >expect <<-EOF &&
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD -> \
-${c_reset}${c_branch}main${c_reset}${c_commit}, \
-${c_reset}${c_tag}tag: D${c_reset}${c_commit})${c_reset} D
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: C${c_reset}${c_commit}, \
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD${c_reset}\
+${c_commit} -> ${c_reset}${c_branch}main${c_reset}${c_commit}, \
+${c_reset}${c_tag}tag: ${c_reset}${c_tag}D${c_reset}${c_commit})${c_reset} D
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_tag}tag: ${c_reset}${c_tag}C${c_reset}${c_commit}, \
${c_reset}${c_grafted}replaced${c_reset}${c_commit})${c_reset} B
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_tag}tag: ${c_reset}${c_tag}A${c_reset}${c_commit})${c_reset} A
EOF
git log --first-parent --no-abbrev --decorate --oneline --color=always HEAD >actual &&
@@ -100,13 +104,15 @@ test_expect_success 'test coloring with grafted commit' '
git replace --graft HEAD HEAD~2 &&
cat >expect <<-EOF &&
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD -> \
-${c_reset}${c_branch}main${c_reset}${c_commit}, \
-${c_reset}${c_tag}tag: D${c_reset}${c_commit}, \
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD${c_reset}\
+${c_commit} -> ${c_reset}${c_branch}main${c_reset}${c_commit}, \
+${c_reset}${c_tag}tag: ${c_reset}${c_tag}D${c_reset}${c_commit}, \
${c_reset}${c_grafted}replaced${c_reset}${c_commit})${c_reset} D
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit}, \
-${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
- ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_tag}tag: ${c_reset}${c_tag}v1.0${c_reset}${c_commit}, \
+${c_reset}${c_tag}tag: ${c_reset}${c_tag}B${c_reset}${c_commit})${c_reset} B
+ ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}\
+${c_tag}tag: ${c_reset}${c_tag}A${c_reset}${c_commit})${c_reset} A
EOF
git log --first-parent --no-abbrev --decorate --oneline --color=always HEAD >actual &&
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index b6e1211578..ba65f17dd9 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -24,12 +24,10 @@ test_expect_success 'usage shown with an error on unknown sub-command' '
test_cmp expect actual
'
+objdir=".git/objects"
+
test_expect_success 'setup full repo' '
- mkdir full &&
- cd "$TRASH_DIRECTORY/full" &&
- git init &&
- git config core.commitGraph true &&
- objdir=".git/objects"
+ git init full
'
test_expect_success POSIXPERM 'tweak umask for modebit tests' '
@@ -37,31 +35,28 @@ test_expect_success POSIXPERM 'tweak umask for modebit tests' '
'
test_expect_success 'verify graph with no graph file' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph verify
+ git -C full commit-graph verify
'
test_expect_success 'write graph with no packs' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write --object-dir $objdir &&
- test_path_is_missing $objdir/info/commit-graph
+ git -C full commit-graph write --object-dir $objdir &&
+ test_path_is_missing full/$objdir/info/commit-graph
'
test_expect_success 'exit with correct error on bad input to --stdin-packs' '
- cd "$TRASH_DIRECTORY/full" &&
echo doesnotexist >in &&
- test_expect_code 1 git commit-graph write --stdin-packs <in 2>stderr &&
+ test_expect_code 1 git -C full commit-graph write --stdin-packs \
+ <in 2>stderr &&
test_i18ngrep "error adding pack" stderr
'
test_expect_success 'create commits and repack' '
- cd "$TRASH_DIRECTORY/full" &&
for i in $(test_seq 3)
do
- test_commit $i &&
- git branch commits/$i || return 1
+ test_commit -C full $i &&
+ git -C full branch commits/$i || return 1
done &&
- git repack
+ git -C full repack
'
. "$TEST_DIRECTORY"/lib-commit-graph.sh
@@ -69,117 +64,106 @@ test_expect_success 'create commits and repack' '
graph_git_behavior 'no graph' full commits/3 commits/1
test_expect_success 'exit with correct error on bad input to --stdin-commits' '
- cd "$TRASH_DIRECTORY/full" &&
# invalid, non-hex OID
- echo HEAD >in &&
- test_expect_code 1 git commit-graph write --stdin-commits <in 2>stderr &&
+ echo HEAD | test_expect_code 1 git -C full commit-graph write \
+ --stdin-commits 2>stderr &&
test_i18ngrep "unexpected non-hex object ID: HEAD" stderr &&
# non-existent OID
- echo $ZERO_OID >in &&
- test_expect_code 1 git commit-graph write --stdin-commits <in 2>stderr &&
+ echo $ZERO_OID | test_expect_code 1 git -C full commit-graph write \
+ --stdin-commits 2>stderr &&
test_i18ngrep "invalid object" stderr &&
# valid commit and tree OID
- git rev-parse HEAD HEAD^{tree} >in &&
- git commit-graph write --stdin-commits <in &&
- graph_read_expect 3 generation_data
+ git -C full rev-parse HEAD HEAD^{tree} >in &&
+ git -C full commit-graph write --stdin-commits <in &&
+ graph_read_expect -C full 3 generation_data
'
test_expect_success 'write graph' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "3" generation_data
+ git -C full commit-graph write &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 3 generation_data
'
test_expect_success POSIXPERM 'write graph has correct permissions' '
- test_path_is_file $objdir/info/commit-graph &&
+ test_path_is_file full/$objdir/info/commit-graph &&
echo "-r--r--r--" >expect &&
- test_modebits $objdir/info/commit-graph >actual &&
+ test_modebits full/$objdir/info/commit-graph >actual &&
test_cmp expect actual
'
graph_git_behavior 'graph exists' full commits/3 commits/1
test_expect_success 'Add more commits' '
- cd "$TRASH_DIRECTORY/full" &&
- git reset --hard commits/1 &&
+ git -C full reset --hard commits/1 &&
for i in $(test_seq 4 5)
do
- test_commit $i &&
- git branch commits/$i || return 1
+ test_commit -C full $i &&
+ git -C full branch commits/$i || return 1
done &&
- git reset --hard commits/2 &&
+ git -C full reset --hard commits/2 &&
for i in $(test_seq 6 7)
do
- test_commit $i &&
- git branch commits/$i || return 1
+ test_commit -C full $i &&
+ git -C full branch commits/$i || return 1
done &&
- git reset --hard commits/2 &&
- git merge commits/4 &&
- git branch merge/1 &&
- git reset --hard commits/4 &&
- git merge commits/6 &&
- git branch merge/2 &&
- git reset --hard commits/3 &&
- git merge commits/5 commits/7 &&
- git branch merge/3 &&
- git repack
+ git -C full reset --hard commits/2 &&
+ git -C full merge commits/4 &&
+ git -C full branch merge/1 &&
+ git -C full reset --hard commits/4 &&
+ git -C full merge commits/6 &&
+ git -C full branch merge/2 &&
+ git -C full reset --hard commits/3 &&
+ git -C full merge commits/5 commits/7 &&
+ git -C full branch merge/3 &&
+ git -C full repack
'
test_expect_success 'commit-graph write progress off for redirected stderr' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write 2>err &&
+ git -C full commit-graph write 2>err &&
test_must_be_empty err
'
test_expect_success 'commit-graph write force progress on for stderr' '
- cd "$TRASH_DIRECTORY/full" &&
- GIT_PROGRESS_DELAY=0 git commit-graph write --progress 2>err &&
+ GIT_PROGRESS_DELAY=0 git -C full commit-graph write --progress 2>err &&
test_file_not_empty err
'
test_expect_success 'commit-graph write with the --no-progress option' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write --no-progress 2>err &&
+ git -C full commit-graph write --no-progress 2>err &&
test_must_be_empty err
'
test_expect_success 'commit-graph write --stdin-commits progress off for redirected stderr' '
- cd "$TRASH_DIRECTORY/full" &&
- git rev-parse commits/5 >in &&
- git commit-graph write --stdin-commits <in 2>err &&
+ git -C full rev-parse commits/5 >in &&
+ git -C full commit-graph write --stdin-commits <in 2>err &&
test_must_be_empty err
'
test_expect_success 'commit-graph write --stdin-commits force progress on for stderr' '
- cd "$TRASH_DIRECTORY/full" &&
- git rev-parse commits/5 >in &&
- GIT_PROGRESS_DELAY=0 git commit-graph write --stdin-commits --progress <in 2>err &&
+ git -C full rev-parse commits/5 >in &&
+ GIT_PROGRESS_DELAY=0 git -C full commit-graph write --stdin-commits \
+ --progress <in 2>err &&
test_i18ngrep "Collecting commits from input" err
'
test_expect_success 'commit-graph write --stdin-commits with the --no-progress option' '
- cd "$TRASH_DIRECTORY/full" &&
- git rev-parse commits/5 >in &&
- git commit-graph write --stdin-commits --no-progress <in 2>err &&
+ git -C full rev-parse commits/5 >in &&
+ git -C full commit-graph write --stdin-commits --no-progress <in 2>err &&
test_must_be_empty err
'
test_expect_success 'commit-graph verify progress off for redirected stderr' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph verify 2>err &&
+ git -C full commit-graph verify 2>err &&
test_must_be_empty err
'
test_expect_success 'commit-graph verify force progress on for stderr' '
- cd "$TRASH_DIRECTORY/full" &&
- GIT_PROGRESS_DELAY=0 git commit-graph verify --progress 2>err &&
+ GIT_PROGRESS_DELAY=0 git -C full commit-graph verify --progress 2>err &&
test_file_not_empty err
'
test_expect_success 'commit-graph verify with the --no-progress option' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph verify --no-progress 2>err &&
+ git -C full commit-graph verify --no-progress 2>err &&
test_must_be_empty err
'
@@ -194,10 +178,9 @@ test_expect_success 'commit-graph verify with the --no-progress option' '
# 1
test_expect_success 'write graph with merges' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "10" "generation_data extra_edges"
+ git -C full commit-graph write &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 10 "generation_data extra_edges"
'
graph_git_behavior 'merge 1 vs 2' full merge/1 merge/2
@@ -205,12 +188,11 @@ graph_git_behavior 'merge 1 vs 3' full merge/1 merge/3
graph_git_behavior 'merge 2 vs 3' full merge/2 merge/3
test_expect_success 'Add one more commit' '
- cd "$TRASH_DIRECTORY/full" &&
- test_commit 8 &&
- git branch commits/8 &&
- ls $objdir/pack | grep idx >existing-idx &&
- git repack &&
- ls $objdir/pack| grep idx | grep -v -f existing-idx >new-idx
+ test_commit -C full 8 &&
+ git -C full branch commits/8 &&
+ ls full/$objdir/pack | grep idx >existing-idx &&
+ git -C full repack &&
+ ls full/$objdir/pack| grep idx | grep -v -f existing-idx >new-idx
'
# Current graph structure:
@@ -229,114 +211,101 @@ graph_git_behavior 'mixed mode, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'mixed mode, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'write graph with new commit' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "11" "generation_data extra_edges"
+ git -C full commit-graph write &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 11 "generation_data extra_edges"
'
graph_git_behavior 'full graph, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'full graph, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'write graph with nothing new' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "11" "generation_data extra_edges"
+ git -C full commit-graph write &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 11 "generation_data extra_edges"
'
graph_git_behavior 'cleared graph, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'cleared graph, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'build graph from latest pack with closure' '
- cd "$TRASH_DIRECTORY/full" &&
- cat new-idx | git commit-graph write --stdin-packs &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "9" "generation_data extra_edges"
+ git -C full commit-graph write --stdin-packs <new-idx &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 9 "generation_data extra_edges"
'
graph_git_behavior 'graph from pack, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'graph from pack, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'build graph from commits with closure' '
- cd "$TRASH_DIRECTORY/full" &&
- git tag -a -m "merge" tag/merge merge/2 &&
- git rev-parse tag/merge >commits-in &&
- git rev-parse merge/1 >>commits-in &&
- cat commits-in | git commit-graph write --stdin-commits &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "6" "generation_data"
+ git -C full tag -a -m "merge" tag/merge merge/2 &&
+ git -C full rev-parse tag/merge >commits-in &&
+ git -C full rev-parse merge/1 >>commits-in &&
+ git -C full commit-graph write --stdin-commits <commits-in &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 6 "generation_data"
'
graph_git_behavior 'graph from commits, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'graph from commits, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'build graph from commits with append' '
- cd "$TRASH_DIRECTORY/full" &&
- git rev-parse merge/3 | git commit-graph write --stdin-commits --append &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "10" "generation_data extra_edges"
+ git -C full rev-parse merge/3 >in &&
+ git -C full commit-graph write --stdin-commits --append <in &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 10 "generation_data extra_edges"
'
graph_git_behavior 'append graph, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'append graph, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'build graph using --reachable' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write --reachable &&
- test_path_is_file $objdir/info/commit-graph &&
- graph_read_expect "11" "generation_data extra_edges"
+ git -C full commit-graph write --reachable &&
+ test_path_is_file full/$objdir/info/commit-graph &&
+ graph_read_expect -C full 11 "generation_data extra_edges"
'
graph_git_behavior 'append graph, commit 8 vs merge 1' full commits/8 merge/1
graph_git_behavior 'append graph, commit 8 vs merge 2' full commits/8 merge/2
test_expect_success 'setup bare repo' '
- cd "$TRASH_DIRECTORY" &&
- git clone --bare --no-local full bare &&
- cd bare &&
- git config core.commitGraph true &&
- baredir="./objects"
+ git clone --bare --no-local full bare
'
graph_git_behavior 'bare repo, commit 8 vs merge 1' bare commits/8 merge/1
graph_git_behavior 'bare repo, commit 8 vs merge 2' bare commits/8 merge/2
test_expect_success 'write graph in bare repo' '
- cd "$TRASH_DIRECTORY/bare" &&
- git commit-graph write &&
- test_path_is_file $baredir/info/commit-graph &&
- graph_read_expect "11" "generation_data extra_edges"
+ git -C bare commit-graph write &&
+ test_path_is_file bare/objects/info/commit-graph &&
+ graph_read_expect -C bare 11 "generation_data extra_edges"
'
graph_git_behavior 'bare repo with graph, commit 8 vs merge 1' bare commits/8 merge/1
graph_git_behavior 'bare repo with graph, commit 8 vs merge 2' bare commits/8 merge/2
test_expect_success 'perform fast-forward merge in full repo' '
- cd "$TRASH_DIRECTORY/full" &&
- git checkout -b merge-5-to-8 commits/5 &&
- git merge commits/8 &&
- git show-ref -s merge-5-to-8 >output &&
- git show-ref -s commits/8 >expect &&
+ git -C full checkout -b merge-5-to-8 commits/5 &&
+ git -C full merge commits/8 &&
+ git -C full show-ref -s merge-5-to-8 >output &&
+ git -C full show-ref -s commits/8 >expect &&
test_cmp expect output
'
test_expect_success 'check that gc computes commit-graph' '
- cd "$TRASH_DIRECTORY/full" &&
- git commit --allow-empty -m "blank" &&
- git commit-graph write --reachable &&
- cp $objdir/info/commit-graph commit-graph-before-gc &&
- git reset --hard HEAD~1 &&
- git config gc.writeCommitGraph true &&
- git gc &&
- cp $objdir/info/commit-graph commit-graph-after-gc &&
+ test_commit -C full --no-tag blank &&
+ git -C full commit-graph write --reachable &&
+ cp full/$objdir/info/commit-graph commit-graph-before-gc &&
+ git -C full reset --hard HEAD~1 &&
+ test_config -C full gc.writeCommitGraph true &&
+ git -C full gc &&
+ cp full/$objdir/info/commit-graph commit-graph-after-gc &&
! test_cmp_bin commit-graph-before-gc commit-graph-after-gc &&
- git commit-graph write --reachable &&
- test_cmp_bin commit-graph-after-gc $objdir/info/commit-graph
+ git -C full commit-graph write --reachable &&
+ test_cmp_bin commit-graph-after-gc full/$objdir/info/commit-graph
'
test_expect_success 'replace-objects invalidates commit-graph' '
- cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf replace &&
git clone full replace &&
(
@@ -359,7 +328,6 @@ test_expect_success 'replace-objects invalidates commit-graph' '
'
test_expect_success 'commit grafts invalidate commit-graph' '
- cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf graft &&
git clone --template= full graft &&
(
@@ -384,7 +352,6 @@ test_expect_success 'commit grafts invalidate commit-graph' '
'
test_expect_success 'replace-objects invalidates commit-graph' '
- cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf shallow &&
git clone --depth 2 "file://$TRASH_DIRECTORY/full" shallow &&
(
@@ -427,24 +394,25 @@ test_expect_success 'warn on improper hash version' '
'
test_expect_success TIME_IS_64BIT,TIME_T_IS_64BIT 'lower layers have overflow chunk' '
- cd "$TRASH_DIRECTORY/full" &&
UNIX_EPOCH_ZERO="@0 +0000" &&
FUTURE_DATE="@4147483646 +0000" &&
- rm -f .git/objects/info/commit-graph &&
- test_commit --date "$FUTURE_DATE" future-1 &&
- test_commit --date "$UNIX_EPOCH_ZERO" old-1 &&
- git commit-graph write --reachable &&
- test_commit --date "$FUTURE_DATE" future-2 &&
- test_commit --date "$UNIX_EPOCH_ZERO" old-2 &&
- git commit-graph write --reachable --split=no-merge &&
- test_commit extra &&
- git commit-graph write --reachable --split=no-merge &&
- git commit-graph write --reachable &&
- graph_read_expect 16 "generation_data generation_data_overflow extra_edges" &&
- mv .git/objects/info/commit-graph commit-graph-upgraded &&
- git commit-graph write --reachable &&
- graph_read_expect 16 "generation_data generation_data_overflow extra_edges" &&
- test_cmp .git/objects/info/commit-graph commit-graph-upgraded
+ rm -f full/.git/objects/info/commit-graph &&
+ test_commit -C full --date "$FUTURE_DATE" future-1 &&
+ test_commit -C full --date "$UNIX_EPOCH_ZERO" old-1 &&
+ git -C full commit-graph write --reachable &&
+ test_commit -C full --date "$FUTURE_DATE" future-2 &&
+ test_commit -C full --date "$UNIX_EPOCH_ZERO" old-2 &&
+ git -C full commit-graph write --reachable --split=no-merge &&
+ test_commit -C full extra &&
+ git -C full commit-graph write --reachable --split=no-merge &&
+ git -C full commit-graph write --reachable &&
+ graph_read_expect -C full 16 \
+ "generation_data generation_data_overflow extra_edges" &&
+ mv full/.git/objects/info/commit-graph commit-graph-upgraded &&
+ git -C full commit-graph write --reachable &&
+ graph_read_expect -C full 16 \
+ "generation_data generation_data_overflow extra_edges" &&
+ test_cmp full/.git/objects/info/commit-graph commit-graph-upgraded
'
# the verify tests below expect the commit-graph to contain
@@ -454,10 +422,11 @@ test_expect_success TIME_IS_64BIT,TIME_T_IS_64BIT 'lower layers have overflow ch
# and the tests will likely break.
test_expect_success 'git commit-graph verify' '
- cd "$TRASH_DIRECTORY/full" &&
- git rev-parse commits/8 | git -c commitGraph.generationVersion=1 commit-graph write --stdin-commits &&
- git commit-graph verify >output &&
- graph_read_expect 9 extra_edges 1
+ git -C full rev-parse commits/8 >in &&
+ git -C full -c commitGraph.generationVersion=1 commit-graph write \
+ --stdin-commits <in &&
+ git -C full commit-graph verify >output &&
+ graph_read_expect -C full 9 extra_edges 1
'
NUM_COMMITS=9
@@ -481,39 +450,39 @@ GRAPH_BYTE_FANOUT2=$(($GRAPH_FANOUT_OFFSET + 4 * 255))
GRAPH_OID_LOOKUP_OFFSET=$(($GRAPH_FANOUT_OFFSET + 4 * 256))
GRAPH_BYTE_OID_LOOKUP_ORDER=$(($GRAPH_OID_LOOKUP_OFFSET + $HASH_LEN * 8))
GRAPH_BYTE_OID_LOOKUP_MISSING=$(($GRAPH_OID_LOOKUP_OFFSET + $HASH_LEN * 4 + 10))
+GRAPH_COMMIT_DATA_WIDTH=$(($HASH_LEN + 16))
GRAPH_COMMIT_DATA_OFFSET=$(($GRAPH_OID_LOOKUP_OFFSET + $HASH_LEN * $NUM_COMMITS))
GRAPH_BYTE_COMMIT_TREE=$GRAPH_COMMIT_DATA_OFFSET
GRAPH_BYTE_COMMIT_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN))
GRAPH_BYTE_COMMIT_EXTRA_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 4))
GRAPH_BYTE_COMMIT_WRONG_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 3))
GRAPH_BYTE_COMMIT_GENERATION=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 11))
+GRAPH_BYTE_COMMIT_GENERATION_LAST=$(($GRAPH_BYTE_COMMIT_GENERATION + $(($NUM_COMMITS - 1)) * $GRAPH_COMMIT_DATA_WIDTH))
GRAPH_BYTE_COMMIT_DATE=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 12))
-GRAPH_COMMIT_DATA_WIDTH=$(($HASH_LEN + 16))
GRAPH_OCTOPUS_DATA_OFFSET=$(($GRAPH_COMMIT_DATA_OFFSET + \
$GRAPH_COMMIT_DATA_WIDTH * $NUM_COMMITS))
GRAPH_BYTE_OCTOPUS=$(($GRAPH_OCTOPUS_DATA_OFFSET + 4))
GRAPH_BYTE_FOOTER=$(($GRAPH_OCTOPUS_DATA_OFFSET + 4 * $NUM_OCTOPUS_EDGES))
corrupt_graph_setup() {
- cd "$TRASH_DIRECTORY/full" &&
- test_when_finished mv commit-graph-backup $objdir/info/commit-graph &&
- cp $objdir/info/commit-graph commit-graph-backup &&
- chmod u+w $objdir/info/commit-graph
+ test_when_finished mv commit-graph-backup full/$objdir/info/commit-graph &&
+ cp full/$objdir/info/commit-graph commit-graph-backup &&
+ chmod u+w full/$objdir/info/commit-graph
}
corrupt_graph_verify() {
grepstr=$1
- test_must_fail git commit-graph verify 2>test_err &&
+ test_must_fail git -C full commit-graph verify 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "$grepstr" err &&
if test "$2" != "no-copy"
then
- cp $objdir/info/commit-graph commit-graph-pre-write-test
+ cp full/$objdir/info/commit-graph commit-graph-pre-write-test
fi &&
- git status --short &&
- GIT_TEST_COMMIT_GRAPH_DIE_ON_PARSE=true git commit-graph write &&
- chmod u+w $objdir/info/commit-graph &&
- git commit-graph verify
+ git -C full status --short &&
+ GIT_TEST_COMMIT_GRAPH_DIE_ON_PARSE=true git -C full commit-graph write &&
+ chmod u+w full/$objdir/info/commit-graph &&
+ git -C full commit-graph verify
}
# usage: corrupt_graph_and_verify <position> <data> <string> [<zero_pos>]
@@ -527,24 +496,24 @@ corrupt_graph_and_verify() {
data="${2:-\0}"
grepstr=$3
corrupt_graph_setup &&
- orig_size=$(wc -c < $objdir/info/commit-graph) &&
+ orig_size=$(wc -c <full/$objdir/info/commit-graph) &&
zero_pos=${4:-${orig_size}} &&
- printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc &&
- dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" if=/dev/null &&
- test-tool genzeros $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" &&
+ printf "$data" | dd of="full/$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc &&
+ dd of="full/$objdir/info/commit-graph" bs=1 seek="$zero_pos" if=/dev/null &&
+ test-tool genzeros $(($orig_size - $zero_pos)) >>"full/$objdir/info/commit-graph" &&
corrupt_graph_verify "$grepstr"
}
test_expect_success POSIXPERM,SANITY 'detect permission problem' '
corrupt_graph_setup &&
- chmod 000 $objdir/info/commit-graph &&
+ chmod 000 full/$objdir/info/commit-graph &&
corrupt_graph_verify "Could not open" "no-copy"
'
test_expect_success 'detect too small' '
corrupt_graph_setup &&
- echo "a small graph" >$objdir/info/commit-graph &&
+ echo "a small graph" >full/$objdir/info/commit-graph &&
corrupt_graph_verify "too small"
'
@@ -628,11 +597,6 @@ test_expect_success 'detect incorrect generation number' '
"generation for commit"
'
-test_expect_success 'detect incorrect generation number' '
- corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION "\01" \
- "commit-graph generation for commit"
-'
-
test_expect_success 'detect incorrect commit date' '
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_DATE "\01" \
"commit date"
@@ -654,34 +618,51 @@ test_expect_success 'detect incorrect chunk count' '
$GRAPH_CHUNK_LOOKUP_OFFSET
'
+test_expect_success 'detect mixed generation numbers (non-zero to zero)' '
+ corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION_LAST "\0\0\0\0" \
+ "both zero and non-zero generations"
+'
+
+test_expect_success 'detect mixed generation numbers (zero to non-zero)' '
+ corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION "\0\0\0\0" \
+ "both zero and non-zero generations"
+'
+
test_expect_success 'git fsck (checks commit-graph when config set to true)' '
- cd "$TRASH_DIRECTORY/full" &&
- git fsck &&
+ git -C full fsck &&
corrupt_graph_and_verify $GRAPH_BYTE_FOOTER "\00" \
"incorrect checksum" &&
- cp commit-graph-pre-write-test $objdir/info/commit-graph &&
- test_must_fail git -c core.commitGraph=true fsck
+ cp commit-graph-pre-write-test full/$objdir/info/commit-graph &&
+ test_must_fail git -C full -c core.commitGraph=true fsck
'
test_expect_success 'git fsck (ignores commit-graph when config set to false)' '
- cd "$TRASH_DIRECTORY/full" &&
- git fsck &&
+ git -C full fsck &&
corrupt_graph_and_verify $GRAPH_BYTE_FOOTER "\00" \
"incorrect checksum" &&
- cp commit-graph-pre-write-test $objdir/info/commit-graph &&
- git -c core.commitGraph=false fsck
+ cp commit-graph-pre-write-test full/$objdir/info/commit-graph &&
+ git -C full -c core.commitGraph=false fsck
'
test_expect_success 'git fsck (checks commit-graph when config unset)' '
- cd "$TRASH_DIRECTORY/full" &&
- test_when_finished "git config core.commitGraph true" &&
+ test_when_finished "git -C full config core.commitGraph true" &&
- git fsck &&
+ git -C full fsck &&
corrupt_graph_and_verify $GRAPH_BYTE_FOOTER "\00" \
"incorrect checksum" &&
- test_unconfig core.commitGraph &&
- cp commit-graph-pre-write-test $objdir/info/commit-graph &&
- test_must_fail git fsck
+ test_unconfig -C full core.commitGraph &&
+ cp commit-graph-pre-write-test full/$objdir/info/commit-graph &&
+ test_must_fail git -C full fsck
+'
+
+test_expect_success 'git fsck shows commit-graph output with --progress' '
+ git -C "$TRASH_DIRECTORY/full" fsck --progress 2>err &&
+ grep "Verifying commits in commit graph" err
+'
+
+test_expect_success 'git fsck suppresses commit-graph output with --no-progress' '
+ git -C "$TRASH_DIRECTORY/full" fsck --no-progress 2>err &&
+ ! grep "Verifying commits in commit graph" err
'
test_expect_success 'setup non-the_repository tests' '
@@ -782,32 +763,33 @@ test_expect_success 'corrupt commit-graph write (missing tree)' '
#
test_expect_success 'set up and verify repo with generation data overflow chunk' '
- objdir=".git/objects" &&
UNIX_EPOCH_ZERO="@0 +0000" &&
FUTURE_DATE="@2147483646 +0000" &&
- cd "$TRASH_DIRECTORY" &&
- mkdir repo &&
- cd repo &&
- git init &&
- test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
- test_commit 2 &&
- test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
- git commit-graph write --reachable &&
- graph_read_expect 3 generation_data &&
- test_commit --date "$FUTURE_DATE" 4 &&
- test_commit 5 &&
- test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
- git branch left &&
- git reset --hard 3 &&
- test_commit 7 &&
- test_commit --date "$FUTURE_DATE" 8 &&
- test_commit 9 &&
- git branch right &&
- git reset --hard 3 &&
- test_merge M left right &&
- git commit-graph write --reachable &&
- graph_read_expect 10 "generation_data generation_data_overflow" &&
- git commit-graph verify
+
+ git init repo &&
+ (
+ cd repo &&
+
+ test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
+ test_commit 2 &&
+ test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
+ git commit-graph write --reachable &&
+ graph_read_expect 3 generation_data &&
+ test_commit --date "$FUTURE_DATE" 4 &&
+ test_commit 5 &&
+ test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
+ git branch left &&
+ git reset --hard 3 &&
+ test_commit 7 &&
+ test_commit --date "$FUTURE_DATE" 8 &&
+ test_commit 9 &&
+ git branch right &&
+ git reset --hard 3 &&
+ test_merge M left right &&
+ git commit-graph write --reachable &&
+ graph_read_expect 10 "generation_data generation_data_overflow" &&
+ git commit-graph verify
+ )
'
graph_git_behavior 'generation data overflow chunk repo' repo left right
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 0883c7c6bd..1bcc02004d 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -485,6 +485,18 @@ test_expect_success 'git-fsck incorrect offset' '
git -c core.multiPackIndex=false fsck
'
+test_expect_success 'git fsck shows MIDX output with --progress' '
+ git fsck --progress 2>err &&
+ grep "Verifying OID order in multi-pack-index" err &&
+ grep "Verifying object offsets" err
+'
+
+test_expect_success 'git fsck suppresses MIDX output with --no-progress' '
+ git fsck --no-progress 2>err &&
+ ! grep "Verifying OID order in multi-pack-index" err &&
+ ! grep "Verifying object offsets" err
+'
+
test_expect_success 'corrupt MIDX is not reused' '
corrupt_midx_and_verify $MIDX_BYTE_OFFSET "\377" $objdir \
"incorrect object offset" &&
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
index 669ddc645f..36c4141e67 100755
--- a/t/t5324-split-commit-graph.sh
+++ b/t/t5324-split-commit-graph.sh
@@ -351,7 +351,8 @@ test_expect_success 'add octopus merge' '
git branch merge/octopus &&
git commit-graph write --reachable --split &&
git commit-graph verify --progress 2>err &&
- test_line_count = 3 err &&
+ test_line_count = 1 err &&
+ grep "Verifying commits in commit graph: 100% (18/18)" err &&
test_i18ngrep ! warning err &&
test_line_count = 3 $graphdir/commit-graph-chain
'
diff --git a/t/t5328-commit-graph-64bit-time.sh b/t/t5328-commit-graph-64bit-time.sh
index 57e4d9c699..e9c521c061 100755
--- a/t/t5328-commit-graph-64bit-time.sh
+++ b/t/t5328-commit-graph-64bit-time.sh
@@ -37,39 +37,39 @@ test_expect_success 'lower layers have overflow chunk' '
graph_git_behavior 'overflow' '' HEAD~2 HEAD
test_expect_success 'set up and verify repo with generation data overflow chunk' '
- mkdir repo &&
- cd repo &&
- git init &&
- test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
- test_commit 2 &&
- test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
- git commit-graph write --reachable &&
- graph_read_expect 3 generation_data &&
- test_commit --date "$FUTURE_DATE" 4 &&
- test_commit 5 &&
- test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
- git branch left &&
- git reset --hard 3 &&
- test_commit 7 &&
- test_commit --date "$FUTURE_DATE" 8 &&
- test_commit 9 &&
- git branch right &&
- git reset --hard 3 &&
- test_merge M left right &&
- git commit-graph write --reachable &&
- graph_read_expect 10 "generation_data generation_data_overflow" &&
- git commit-graph verify
+ git init repo &&
+ (
+ cd repo &&
+ test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
+ test_commit 2 &&
+ test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
+ git commit-graph write --reachable &&
+ graph_read_expect 3 generation_data &&
+ test_commit --date "$FUTURE_DATE" 4 &&
+ test_commit 5 &&
+ test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
+ git branch left &&
+ git reset --hard 3 &&
+ test_commit 7 &&
+ test_commit --date "$FUTURE_DATE" 8 &&
+ test_commit 9 &&
+ git branch right &&
+ git reset --hard 3 &&
+ test_merge M left right &&
+ git commit-graph write --reachable &&
+ graph_read_expect 10 "generation_data generation_data_overflow" &&
+ git commit-graph verify
+ )
'
graph_git_behavior 'overflow 2' repo left right
test_expect_success 'single commit with generation data exceeding UINT32_MAX' '
git init repo-uint32-max &&
- cd repo-uint32-max &&
- test_commit --date "@4294967297 +0000" 1 &&
- git commit-graph write --reachable &&
- graph_read_expect 1 "generation_data" &&
- git commit-graph verify
+ test_commit -C repo-uint32-max --date "@4294967297 +0000" 1 &&
+ git -C repo-uint32-max commit-graph write --reachable &&
+ graph_read_expect -C repo-uint32-max 1 "generation_data" &&
+ git -C repo-uint32-max commit-graph verify
'
test_done
diff --git a/t/t5329-pack-objects-cruft.sh b/t/t5329-pack-objects-cruft.sh
index 45667d4999..fc5fedbe9b 100755
--- a/t/t5329-pack-objects-cruft.sh
+++ b/t/t5329-pack-objects-cruft.sh
@@ -573,23 +573,54 @@ test_expect_success 'cruft repack with no reachable objects' '
)
'
-test_expect_success 'cruft repack ignores --max-pack-size' '
+write_blob () {
+ test-tool genrandom "$@" >in &&
+ git hash-object -w -t blob in
+}
+
+find_pack () {
+ for idx in $(ls $packdir/pack-*.idx)
+ do
+ git show-index <$idx >out &&
+ if grep -q "$1" out
+ then
+ echo $idx
+ fi || return 1
+ done
+}
+
+test_expect_success 'cruft repack with --max-pack-size' '
git init max-pack-size &&
(
cd max-pack-size &&
test_commit base &&
+
# two cruft objects which exceed the maximum pack size
- test-tool genrandom foo 1048576 | git hash-object --stdin -w &&
- test-tool genrandom bar 1048576 | git hash-object --stdin -w &&
+ foo=$(write_blob foo 1048576) &&
+ bar=$(write_blob bar 1048576) &&
+ test-tool chmtime --get -1000 \
+ "$objdir/$(test_oid_to_path $foo)" >foo.mtime &&
+ test-tool chmtime --get -2000 \
+ "$objdir/$(test_oid_to_path $bar)" >bar.mtime &&
git repack --cruft --max-pack-size=1M &&
find $packdir -name "*.mtimes" >cruft &&
- test_line_count = 1 cruft &&
- test-tool pack-mtimes "$(basename "$(cat cruft)")" >objects &&
- test_line_count = 2 objects
+ test_line_count = 2 cruft &&
+
+ foo_mtimes="$(basename $(find_pack $foo) .idx).mtimes" &&
+ bar_mtimes="$(basename $(find_pack $bar) .idx).mtimes" &&
+ test-tool pack-mtimes $foo_mtimes >foo.actual &&
+ test-tool pack-mtimes $bar_mtimes >bar.actual &&
+
+ echo "$foo $(cat foo.mtime)" >foo.expect &&
+ echo "$bar $(cat bar.mtime)" >bar.expect &&
+
+ test_cmp foo.expect foo.actual &&
+ test_cmp bar.expect bar.actual &&
+ test "$foo_mtimes" != "$bar_mtimes"
)
'
-test_expect_success 'cruft repack ignores pack.packSizeLimit' '
+test_expect_success 'cruft repack with pack.packSizeLimit' '
(
cd max-pack-size &&
# repack everything back together to remove the existing cruft
@@ -599,9 +630,12 @@ test_expect_success 'cruft repack ignores pack.packSizeLimit' '
# ensure the same post condition is met when --max-pack-size
# would otherwise be inferred from the configuration
find $packdir -name "*.mtimes" >cruft &&
- test_line_count = 1 cruft &&
- test-tool pack-mtimes "$(basename "$(cat cruft)")" >objects &&
- test_line_count = 2 objects
+ test_line_count = 2 cruft &&
+ for pack in $(cat cruft)
+ do
+ test-tool pack-mtimes "$(basename $pack)" >objects &&
+ test_line_count = 1 objects || return 1
+ done
)
'
diff --git a/t/t5351-unpack-large-objects.sh b/t/t5351-unpack-large-objects.sh
index 8c8af99b84..43cbcd5d49 100755
--- a/t/t5351-unpack-large-objects.sh
+++ b/t/t5351-unpack-large-objects.sh
@@ -55,7 +55,7 @@ check_fsync_events () {
cat >expect &&
sed -n \
- -e '/^{"event":"data",.*"category":"fsync",/ {
+ -e '/^{"event":"counter",.*"category":"fsync",/ {
s/.*"category":"fsync",//;
s/}$//;
p;
@@ -78,8 +78,8 @@ test_expect_success 'unpack big object in stream (core.fsyncmethod=batch)' '
flush_count=1
fi &&
check_fsync_events trace2.txt <<-EOF &&
- "key":"fsync/writeout-only","value":"6"
- "key":"fsync/hardware-flush","value":"$flush_count"
+ "name":"writeout-only","count":6
+ "name":"hardware-flush","count":$flush_count
EOF
test_dir_is_empty dest.git/objects/pack &&
diff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh
index 5f3ff051ca..ad7f8c6f00 100755
--- a/t/t5407-post-rewrite-hook.sh
+++ b/t/t5407-post-rewrite-hook.sh
@@ -17,6 +17,12 @@ test_expect_success 'setup' '
git checkout A^0 &&
test_commit E bar E &&
test_commit F foo F &&
+ git checkout B &&
+ git merge E &&
+ git tag merge-E &&
+ test_commit G G &&
+ test_commit H H &&
+ test_commit I I &&
git checkout main &&
test_hook --setup post-rewrite <<-EOF
@@ -173,6 +179,48 @@ test_fail_interactive_rebase () {
)
}
+test_expect_success 'git rebase with failed pick' '
+ clear_hook_input &&
+ cat >todo <<-\EOF &&
+ exec >bar
+ merge -C merge-E E
+ exec >G
+ pick G
+ exec >H 2>I
+ pick H
+ fixup I
+ EOF
+
+ (
+ set_replace_editor todo &&
+ test_must_fail git rebase -i D D 2>err
+ ) &&
+ grep "would be overwritten" err &&
+ rm bar &&
+
+ test_must_fail git rebase --continue 2>err &&
+ grep "would be overwritten" err &&
+ rm G &&
+
+ test_must_fail git rebase --continue 2>err &&
+ grep "would be overwritten" err &&
+ rm H &&
+
+ test_must_fail git rebase --continue 2>err &&
+ grep "would be overwritten" err &&
+ rm I &&
+
+ git rebase --continue &&
+ echo rebase >expected.args &&
+ cat >expected.data <<-EOF &&
+ $(git rev-parse merge-E) $(git rev-parse HEAD~2)
+ $(git rev-parse G) $(git rev-parse HEAD~1)
+ $(git rev-parse H) $(git rev-parse HEAD)
+ $(git rev-parse I) $(git rev-parse HEAD)
+ EOF
+ verify_hook_input
+'
+
test_expect_success 'git rebase -i (unchanged)' '
git reset --hard D &&
clear_hook_input &&
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 4f289063ce..19c36b57f4 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -1127,6 +1127,52 @@ do
'
done
+test_expect_success 'prepare source branch' '
+ echo one >onebranch &&
+ git checkout --orphan onebranch &&
+ git rm --cached -r . &&
+ git add onebranch &&
+ git commit -m onebranch &&
+ git rev-list --objects onebranch -- >actual &&
+ # 3 objects should be created, at least ...
+ test 3 -le $(wc -l <actual)
+'
+
+validate_store_type () {
+ git -C dest count-objects -v >actual &&
+ case "$store_type" in
+ packed)
+ grep "^count: 0$" actual ;;
+ loose)
+ grep "^packs: 0$" actual ;;
+ esac || {
+ echo "store_type is $store_type"
+ cat actual
+ false
+ }
+}
+
+test_unpack_limit () {
+ store_type=$1
+
+ case "$store_type" in
+ packed) fetch_limit=1 transfer_limit=10000 ;;
+ loose) fetch_limit=10000 transfer_limit=1 ;;
+ esac
+
+ test_expect_success "fetch trumps transfer limit" '
+ rm -fr dest &&
+ git --bare init dest &&
+ git -C dest config fetch.unpacklimit $fetch_limit &&
+ git -C dest config transfer.unpacklimit $transfer_limit &&
+ git -C dest fetch .. onebranch &&
+ validate_store_type
+ '
+}
+
+test_unpack_limit packed
+test_unpack_limit loose
+
setup_negotiation_tip () {
SERVER="$1"
URL="$2"
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 19ebefa5ac..87163d7745 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -120,6 +120,17 @@ test_expect_success setup '
'
+for cmd in push fetch
+do
+ for opt in ipv4 ipv6
+ do
+ test_expect_success "reject 'git $cmd --no-$opt'" '
+ test_must_fail git $cmd --no-$opt 2>err &&
+ grep "unknown option .no-$opt" err
+ '
+ done
+done
+
test_expect_success 'fetch without wildcard' '
mk_empty testrepo &&
(
diff --git a/t/t5546-receive-limits.sh b/t/t5546-receive-limits.sh
index eed3c9d81a..9fc9ba552f 100755
--- a/t/t5546-receive-limits.sh
+++ b/t/t5546-receive-limits.sh
@@ -9,10 +9,26 @@ TEST_PASSES_SANITIZE_LEAK=true
# When the limit is 1, `git receive-pack` will call `git index-pack`.
# When the limit is 10000, `git receive-pack` will call `git unpack-objects`.
+validate_store_type () {
+ git -C dest count-objects -v >actual &&
+ case "$store_type" in
+ index)
+ grep "^count: 0$" actual ;;
+ unpack)
+ grep "^packs: 0$" actual ;;
+ esac || {
+ echo "store_type is $store_type"
+ cat actual
+ false;
+ }
+}
+
test_pack_input_limit () {
- case "$1" in
- index) unpack_limit=1 ;;
- unpack) unpack_limit=10000 ;;
+ store_type=$1
+
+ case "$store_type" in
+ index) unpack_limit=1 other_limit=10000 ;;
+ unpack) unpack_limit=10000 other_limit=1 ;;
esac
test_expect_success 'prepare destination repository' '
@@ -43,6 +59,19 @@ test_pack_input_limit () {
git --git-dir=dest config receive.maxInputSize 0 &&
git push dest HEAD
'
+
+ test_expect_success 'prepare destination repository (once more)' '
+ rm -fr dest &&
+ git --bare init dest
+ '
+
+ test_expect_success 'receive trumps transfer' '
+ git --git-dir=dest config receive.unpacklimit "$unpack_limit" &&
+ git --git-dir=dest config transfer.unpacklimit "$other_limit" &&
+ git push dest HEAD &&
+ validate_store_type
+ '
+
}
test_expect_success "create known-size (1024 bytes) commit" '
diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh
index a11b20e378..448134c4bf 100755
--- a/t/t5571-pre-push-hook.sh
+++ b/t/t5571-pre-push-hook.sh
@@ -4,6 +4,7 @@ test_description='check pre-push 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' '
diff --git a/t/t5583-push-branches.sh b/t/t5583-push-branches.sh
index e7e1b6dab6..320f49c753 100755
--- a/t/t5583-push-branches.sh
+++ b/t/t5583-push-branches.sh
@@ -5,6 +5,7 @@ test_description='check the consisitency of behavior of --all and --branches'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
delete_refs() {
diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh
index 27f9f77638..5890319b97 100755
--- a/t/t5606-clone-options.sh
+++ b/t/t5606-clone-options.sh
@@ -120,6 +120,16 @@ test_expect_success 'prefers -c config over --template config' '
'
+test_expect_failure 'prefers --template config even for core.bare' '
+
+ template="$TRASH_DIRECTORY/template-with-bare-config" &&
+ mkdir "$template" &&
+ git config --file "$template/config" core.bare true &&
+ git clone "--template=$template" parent clone-bare-config &&
+ test "$(git -C clone-bare-config config --local core.bare)" = "true" &&
+ test_path_is_file clone-bare-config/HEAD
+'
+
test_expect_success 'prefers config "clone.defaultRemoteName" over default' '
test_config_global clone.defaultRemoteName from_config &&
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index f519d2a87a..8759fc2853 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -257,8 +257,8 @@ test_expect_success 'partial clone with transfer.fsckobjects=1 works with submod
test_commit -C submodule mycommit &&
test_create_repo src_with_sub &&
- test_config -C src_with_sub uploadpack.allowfilter 1 &&
- test_config -C src_with_sub uploadpack.allowanysha1inwant 1 &&
+ git -C src_with_sub config uploadpack.allowfilter 1 &&
+ git -C src_with_sub config uploadpack.allowanysha1inwant 1 &&
test_config_global protocol.file.allow always &&
@@ -270,6 +270,12 @@ test_expect_success 'partial clone with transfer.fsckobjects=1 works with submod
test_when_finished rm -rf dst
'
+test_expect_success 'lazily fetched .gitmodules works' '
+ git clone --filter="blob:none" --no-checkout "file://$(pwd)/src_with_sub" dst &&
+ git -C dst fetch &&
+ test_when_finished rm -rf dst
+'
+
test_expect_success 'partial clone with transfer.fsckobjects=1 uses index-pack --fsck-objects' '
git init src &&
test_commit -C src x &&
diff --git a/t/t6017-rev-list-stdin.sh b/t/t6017-rev-list-stdin.sh
index 05162512a0..a57f1ae2ba 100755
--- a/t/t6017-rev-list-stdin.sh
+++ b/t/t6017-rev-list-stdin.sh
@@ -48,7 +48,9 @@ test_expect_success setup '
git add file-$i &&
test_tick &&
git commit -m side-$i || exit
- done
+ done &&
+
+ git update-ref refs/heads/-dashed-branch HEAD
)
'
@@ -60,6 +62,12 @@ check side-1 ^side-7 -- file-2
check side-3 ^side-4 -- file-3
check side-3 ^side-2
check side-3 ^side-2 -- file-1
+check --all
+check --all --not --branches
+check --glob=refs/heads
+check --glob=refs/heads --
+check --glob=refs/heads -- file-1
+check --end-of-options -dashed-branch
test_expect_success 'not only --stdin' '
cat >expect <<-EOF &&
@@ -78,4 +86,45 @@ test_expect_success 'not only --stdin' '
test_cmp expect actual
'
+test_expect_success 'pseudo-opt with missing value' '
+ cat >input <<-EOF &&
+ --glob
+ refs/heads
+ EOF
+
+ cat >expect <<-EOF &&
+ fatal: Option ${SQ}--glob${SQ} requires a value
+ EOF
+
+ test_must_fail git rev-list --stdin <input 2>error &&
+ test_cmp expect error
+'
+
+test_expect_success 'pseudo-opt with invalid value' '
+ cat >input <<-EOF &&
+ --no-walk=garbage
+ EOF
+
+ cat >expect <<-EOF &&
+ error: invalid argument to --no-walk
+ fatal: invalid option ${SQ}--no-walk=garbage${SQ} in --stdin mode
+ EOF
+
+ test_must_fail git rev-list --stdin <input 2>error &&
+ test_cmp expect error
+'
+
+test_expect_success 'unknown option without --end-of-options' '
+ cat >input <<-EOF &&
+ -dashed-branch
+ EOF
+
+ cat >expect <<-EOF &&
+ fatal: invalid option ${SQ}-dashed-branch${SQ} in --stdin mode
+ EOF
+
+ test_must_fail git rev-list --stdin <input 2>error &&
+ test_cmp expect error
+'
+
test_done
diff --git a/t/t6020-bundle-misc.sh b/t/t6020-bundle-misc.sh
index dface8bcfe..3e6bcbf30c 100755
--- a/t/t6020-bundle-misc.sh
+++ b/t/t6020-bundle-misc.sh
@@ -619,6 +619,12 @@ test_expect_success TTY 'create --quiet disables all bundle progress' '
test_must_be_empty err
'
+test_expect_success 'bundle progress with --no-quiet' '
+ GIT_PROGRESS_DELAY=0 \
+ git bundle create --no-quiet out.bundle --all 2>err &&
+ grep "%" err
+'
+
test_expect_success 'read bundle over stdin' '
git bundle create some.bundle HEAD &&
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index c9afcef201..0a5c487540 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -85,6 +85,7 @@ check_describe e-1-gHASH --tags HEAD^^
check_describe c-2-gHASH --tags HEAD^^2
check_describe B --tags HEAD^^2^
check_describe e --tags HEAD^^^
+check_describe e --tags --exact-match HEAD^^^
check_describe heads/main --all HEAD
check_describe tags/c-6-gHASH --all HEAD^
@@ -96,6 +97,13 @@ check_describe A-3-gHASH --long HEAD^^2
check_describe c-7-gHASH --tags
check_describe e-3-gHASH --first-parent --tags
+check_describe c-7-gHASH --tags --no-exact-match HEAD
+check_describe e-3-gHASH --first-parent --tags --no-exact-match HEAD
+
+test_expect_success '--exact-match failure' '
+ test_must_fail git describe --exact-match HEAD 2>err
+'
+
test_expect_success 'describe --contains defaults to HEAD without commit-ish' '
echo "A^0" >expect &&
git checkout A &&
diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh
index 457cc167c7..f70c395e75 100755
--- a/t/t6135-pathspec-with-attrs.sh
+++ b/t/t6135-pathspec-with-attrs.sh
@@ -65,7 +65,8 @@ test_expect_success 'setup .gitattributes' '
fileValue label=foo
fileWrongLabel label☺
EOF
- git add .gitattributes &&
+ echo fileSetLabel label1 >sub/.gitattributes &&
+ git add .gitattributes sub/.gitattributes &&
git commit -m "add attributes"
'
@@ -78,7 +79,17 @@ test_expect_success 'check specific set attr' '
test_cmp expect actual
'
-test_expect_success 'check specific set attr (2)' '
+test_expect_success 'check set attr with pathspec pattern' '
+ echo sub/fileSetLabel >expect &&
+
+ git ls-files ":(attr:label)sub" >actual &&
+ test_cmp expect actual &&
+
+ git ls-files ":(attr:label)sub/" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'check specific set attr in tree-ish' '
cat <<-\EOF >expect &&
HEAD:fileSetLabel
HEAD:sub/fileSetLabel
@@ -87,6 +98,16 @@ test_expect_success 'check specific set attr (2)' '
test_cmp expect actual
'
+test_expect_success 'check specific set attr with pathspec pattern in tree-ish' '
+ echo HEAD:sub/fileSetLabel >expect &&
+
+ git grep -l content HEAD ":(attr:label)sub" >actual &&
+ test_cmp expect actual &&
+
+ git grep -l content HEAD ":(attr:label)sub/" >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'check specific unset attr' '
cat <<-\EOF >expect &&
fileUnsetLabel
@@ -137,6 +158,7 @@ test_expect_success 'check unspecified attr' '
fileC
fileNoLabel
fileWrongLabel
+ sub/.gitattributes
sub/fileA
sub/fileAB
sub/fileAC
@@ -161,6 +183,7 @@ test_expect_success 'check unspecified attr (2)' '
HEAD:fileC
HEAD:fileNoLabel
HEAD:fileWrongLabel
+ HEAD:sub/.gitattributes
HEAD:sub/fileA
HEAD:sub/fileAB
HEAD:sub/fileAC
@@ -180,6 +203,7 @@ test_expect_success 'check multiple unspecified attr' '
fileC
fileNoLabel
fileWrongLabel
+ sub/.gitattributes
sub/fileC
sub/fileNoLabel
sub/fileWrongLabel
@@ -253,4 +277,22 @@ test_expect_success 'backslash cannot be used as a value' '
test_i18ngrep "for value matching" actual
'
+test_expect_success 'reading from .gitattributes in a subdirectory (1)' '
+ git ls-files ":(attr:label1)" >actual &&
+ test_write_lines "sub/fileSetLabel" >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'reading from .gitattributes in a subdirectory (2)' '
+ git ls-files ":(attr:label1)sub" >actual &&
+ test_write_lines "sub/fileSetLabel" >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'reading from .gitattributes in a subdirectory (3)' '
+ git ls-files ":(attr:label1)sub/" >actual &&
+ test_write_lines "sub/fileSetLabel" >expect &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 5c00607608..7b943fd34c 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -6,6 +6,7 @@
test_description='for-each-ref test'
. ./test-lib.sh
+GNUPGHOME_NOT_USED=$GNUPGHOME
. "$TEST_DIRECTORY"/lib-gpg.sh
. "$TEST_DIRECTORY"/lib-terminal.sh
@@ -448,6 +449,41 @@ test_expect_success 'exercise glob patterns with prefixes' '
'
cat >expected <<\EOF
+refs/tags/bar
+refs/tags/baz
+refs/tags/testtag
+EOF
+
+test_expect_success 'exercise patterns with prefix exclusions' '
+ for tag in foo/one foo/two foo/three bar baz
+ do
+ git tag "$tag" || return 1
+ done &&
+ test_when_finished "git tag -d foo/one foo/two foo/three bar baz" &&
+ git for-each-ref --format="%(refname)" \
+ refs/tags/ --exclude=refs/tags/foo >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<\EOF
+refs/tags/bar
+refs/tags/baz
+refs/tags/foo/one
+refs/tags/testtag
+EOF
+
+test_expect_success 'exercise patterns with pattern exclusions' '
+ for tag in foo/one foo/two foo/three bar baz
+ do
+ git tag "$tag" || return 1
+ done &&
+ test_when_finished "git tag -d foo/one foo/two foo/three bar baz" &&
+ git for-each-ref --format="%(refname)" \
+ refs/tags/ --exclude="refs/tags/foo/t*" >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<\EOF
'refs/heads/main'
'refs/remotes/origin/main'
'refs/tags/testtag'
@@ -561,6 +597,144 @@ test_expect_success 'color.ui=always does not override tty check' '
test_cmp expected.bare actual
'
+test_expect_success 'setup for describe atom tests' '
+ git init -b master describe-repo &&
+ (
+ cd describe-repo &&
+
+ test_commit --no-tag one &&
+ git tag tagone &&
+
+ test_commit --no-tag two &&
+ git tag -a -m "tag two" tagtwo
+ )
+'
+
+test_expect_success 'describe atom vs git describe' '
+ (
+ cd describe-repo &&
+
+ git for-each-ref --format="%(objectname)" \
+ refs/tags/ >obj &&
+ while read hash
+ do
+ if desc=$(git describe $hash)
+ then
+ : >expect-contains-good
+ else
+ : >expect-contains-bad
+ fi &&
+ echo "$hash $desc" || return 1
+ done <obj >expect &&
+ test_path_exists expect-contains-good &&
+ test_path_exists expect-contains-bad &&
+
+ git for-each-ref --format="%(objectname) %(describe)" \
+ refs/tags/ >actual 2>err &&
+ test_cmp expect actual &&
+ test_must_be_empty err
+ )
+'
+
+test_expect_success 'describe:tags vs describe --tags' '
+ (
+ cd describe-repo &&
+ git describe --tags >expect &&
+ git for-each-ref --format="%(describe:tags)" \
+ refs/heads/master >actual &&
+ test_cmp expect actual
+ )
+'
+
+test_expect_success 'describe:abbrev=... vs describe --abbrev=...' '
+ (
+ cd describe-repo &&
+
+ # Case 1: We have commits between HEAD and the most
+ # recent tag reachable from it
+ test_commit --no-tag file &&
+ git describe --abbrev=14 >expect &&
+ git for-each-ref --format="%(describe:abbrev=14)" \
+ refs/heads/master >actual &&
+ test_cmp expect actual &&
+
+ # Make sure the hash used is atleast 14 digits long
+ sed -e "s/^.*-g\([0-9a-f]*\)$/\1/" <actual >hexpart &&
+ test 15 -le $(wc -c <hexpart) &&
+
+ # Case 2: We have a tag at HEAD, describe directly gives
+ # the name of the tag
+ git tag -a -m tagged tagname &&
+ git describe --abbrev=14 >expect &&
+ git for-each-ref --format="%(describe:abbrev=14)" \
+ refs/heads/master >actual &&
+ test_cmp expect actual &&
+ test tagname = $(cat actual)
+ )
+'
+
+test_expect_success 'describe:match=... vs describe --match ...' '
+ (
+ cd describe-repo &&
+ git tag -a -m "tag foo" tag-foo &&
+ git describe --match "*-foo" >expect &&
+ git for-each-ref --format="%(describe:match="*-foo")" \
+ refs/heads/master >actual &&
+ test_cmp expect actual
+ )
+'
+
+test_expect_success 'describe:exclude:... vs describe --exclude ...' '
+ (
+ cd describe-repo &&
+ git tag -a -m "tag bar" tag-bar &&
+ git describe --exclude "*-bar" >expect &&
+ git for-each-ref --format="%(describe:exclude="*-bar")" \
+ refs/heads/master >actual &&
+ test_cmp expect actual
+ )
+'
+
+test_expect_success 'deref with describe atom' '
+ (
+ cd describe-repo &&
+ cat >expect <<-\EOF &&
+
+ tagname
+ tagname
+ tagname
+
+ tagtwo
+ EOF
+ git for-each-ref --format="%(*describe)" >actual &&
+ test_cmp expect actual
+ )
+'
+
+test_expect_success 'err on bad describe atom arg' '
+ (
+ cd describe-repo &&
+
+ # The bad arg is the only arg passed to describe atom
+ cat >expect <<-\EOF &&
+ fatal: unrecognized %(describe) argument: baz
+ EOF
+ test_must_fail git for-each-ref --format="%(describe:baz)" \
+ refs/heads/master 2>actual &&
+ test_cmp expect actual &&
+
+ # The bad arg is in the middle of the option string
+ # passed to the describe atom
+ cat >expect <<-\EOF &&
+ fatal: unrecognized %(describe) argument: qux=1,abbrev=14
+ EOF
+ test_must_fail git for-each-ref \
+ --format="%(describe:tags,qux=1,abbrev=14)" \
+ ref/heads/master 2>actual &&
+ test_cmp expect actual
+ )
+'
+
cat >expected <<\EOF
heads/main
tags/main
@@ -843,16 +1017,16 @@ test_expect_success 'Verify sorts with raw' '
test_expect_success 'Verify sorts with raw:size' '
cat >expected <<-EOF &&
refs/myblobs/blob8
- refs/myblobs/first
refs/myblobs/blob7
- refs/heads/main
refs/myblobs/blob4
refs/myblobs/blob1
refs/myblobs/blob2
refs/myblobs/blob3
refs/myblobs/blob5
refs/myblobs/blob6
+ refs/myblobs/first
refs/mytrees/first
+ refs/heads/main
EOF
git for-each-ref --format="%(refname)" --sort=raw:size \
refs/heads/main refs/myblobs/ refs/mytrees/first >actual &&
@@ -964,6 +1138,17 @@ test_expect_success 'for-each-ref --format compare with cat-file --batch' '
test_cmp expected actual
'
+test_expect_success 'verify sorts with contents:size' '
+ cat >expect <<-\EOF &&
+ refs/heads/main
+ refs/heads/newtag
+ refs/heads/ambiguous
+ EOF
+ git for-each-ref --format="%(refname)" \
+ --sort=contents:size refs/heads/ >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'set up multiple-sort tags' '
for when in 100000 200000
do
@@ -1522,4 +1707,192 @@ test_expect_success 'git for-each-ref with non-existing refs' '
test_must_be_empty actual
'
+GRADE_FORMAT="%(signature:grade)%0a%(signature:key)%0a%(signature:signer)%0a%(signature:fingerprint)%0a%(signature:primarykeyfingerprint)"
+TRUSTLEVEL_FORMAT="%(signature:trustlevel)%0a%(signature:key)%0a%(signature:signer)%0a%(signature:fingerprint)%0a%(signature:primarykeyfingerprint)"
+
+test_expect_success GPG 'setup for signature atom using gpg' '
+ git checkout -b signed &&
+
+ test_when_finished "test_unconfig commit.gpgSign" &&
+
+ echo "1" >file &&
+ git add file &&
+ test_tick &&
+ git commit -S -m "file: 1" &&
+ git tag first-signed &&
+
+ echo "2" >file &&
+ test_tick &&
+ git commit -a -m "file: 2" &&
+ git tag second-unsigned &&
+
+ git config commit.gpgSign 1 &&
+ echo "3" >file &&
+ test_tick &&
+ git commit -a --no-gpg-sign -m "file: 3" &&
+ git tag third-unsigned &&
+
+ test_tick &&
+ git rebase -f HEAD^^ && git tag second-signed HEAD^ &&
+ git tag third-signed &&
+
+ echo "4" >file &&
+ test_tick &&
+ git commit -a -SB7227189 -m "file: 4" &&
+ git tag fourth-signed &&
+
+ echo "5" >file &&
+ test_tick &&
+ git commit -a --no-gpg-sign -m "file: 5" &&
+ git tag fifth-unsigned &&
+
+ echo "6" >file &&
+ test_tick &&
+ git commit -a --no-gpg-sign -m "file: 6" &&
+
+ test_tick &&
+ git rebase -f HEAD^^ &&
+ git tag fifth-signed HEAD^ &&
+ git tag sixth-signed &&
+
+ echo "7" >file &&
+ test_tick &&
+ git commit -a --no-gpg-sign -m "file: 7" &&
+ git tag seventh-unsigned
+'
+
+test_expect_success GPGSSH 'setup for signature atom using ssh' '
+ test_when_finished "test_unconfig gpg.format user.signingkey" &&
+
+ test_config gpg.format ssh &&
+ test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
+ echo "8" >file &&
+ test_tick &&
+ git add file &&
+ git commit -S -m "file: 8" &&
+ git tag eighth-signed-ssh
+'
+
+test_expect_success GPG2 'bare signature atom' '
+ git verify-commit first-signed 2>expect &&
+ echo >>expect &&
+ git for-each-ref refs/tags/first-signed \
+ --format="%(signature)" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'show good signature with custom format' '
+ git verify-commit first-signed &&
+ cat >expect <<-\EOF &&
+ G
+ 13B6F51ECDDE430D
+ C O Mitter <committer@example.com>
+ 73D758744BE721698EC54E8713B6F51ECDDE430D
+ 73D758744BE721698EC54E8713B6F51ECDDE430D
+ EOF
+ git for-each-ref refs/tags/first-signed \
+ --format="$GRADE_FORMAT" >actual &&
+ test_cmp expect actual
+'
+test_expect_success GPGSSH 'show good signature with custom format
+ with ssh' '
+ test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
+ FINGERPRINT=$(ssh-keygen -lf "${GPGSSH_KEY_PRIMARY}" | awk "{print \$2;}") &&
+ cat >expect.tmpl <<-\EOF &&
+ G
+ FINGERPRINT
+ principal with number 1
+ FINGERPRINT
+
+ EOF
+ sed "s|FINGERPRINT|$FINGERPRINT|g" expect.tmpl >expect &&
+ git for-each-ref refs/tags/eighth-signed-ssh \
+ --format="$GRADE_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'signature atom with grade option and bad signature' '
+ git cat-file commit third-signed >raw &&
+ sed -e "s/^file: 3/file: 3 forged/" raw >forged1 &&
+ FORGED1=$(git hash-object -w -t commit forged1) &&
+ git update-ref refs/tags/third-signed "$FORGED1" &&
+ test_must_fail git verify-commit "$FORGED1" &&
+
+ cat >expect <<-\EOF &&
+ B
+ 13B6F51ECDDE430D
+ C O Mitter <committer@example.com>
+
+
+ EOF
+ git for-each-ref refs/tags/third-signed \
+ --format="$GRADE_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'show untrusted signature with custom format' '
+ cat >expect <<-\EOF &&
+ U
+ 65A0EEA02E30CAD7
+ Eris Discordia <discord@example.net>
+ F8364A59E07FFE9F4D63005A65A0EEA02E30CAD7
+ D4BE22311AD3131E5EDA29A461092E85B7227189
+ EOF
+ git for-each-ref refs/tags/fourth-signed \
+ --format="$GRADE_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'show untrusted signature with undefined trust level' '
+ cat >expect <<-\EOF &&
+ undefined
+ 65A0EEA02E30CAD7
+ Eris Discordia <discord@example.net>
+ F8364A59E07FFE9F4D63005A65A0EEA02E30CAD7
+ D4BE22311AD3131E5EDA29A461092E85B7227189
+ EOF
+ git for-each-ref refs/tags/fourth-signed \
+ --format="$TRUSTLEVEL_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'show untrusted signature with ultimate trust level' '
+ cat >expect <<-\EOF &&
+ ultimate
+ 13B6F51ECDDE430D
+ C O Mitter <committer@example.com>
+ 73D758744BE721698EC54E8713B6F51ECDDE430D
+ 73D758744BE721698EC54E8713B6F51ECDDE430D
+ EOF
+ git for-each-ref refs/tags/sixth-signed \
+ --format="$TRUSTLEVEL_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'show unknown signature with custom format' '
+ cat >expect <<-\EOF &&
+ E
+ 13B6F51ECDDE430D
+
+
+
+ EOF
+ GNUPGHOME="$GNUPGHOME_NOT_USED" git for-each-ref \
+ refs/tags/sixth-signed --format="$GRADE_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GPG 'show lack of signature with custom format' '
+ cat >expect <<-\EOF &&
+ N
+
+
+
+
+ EOF
+ git for-each-ref refs/tags/seventh-unsigned \
+ --format="$GRADE_FORMAT" >actual &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh
index 1ce5f490e9..af223e44d6 100755
--- a/t/t6302-for-each-ref-filter.sh
+++ b/t/t6302-for-each-ref-filter.sh
@@ -45,6 +45,8 @@ test_expect_success 'check signed tags with --points-at' '
sed -e "s/Z$//" >expect <<-\EOF &&
refs/heads/side Z
refs/tags/annotated-tag four
+ refs/tags/doubly-annotated-tag An annotated tag
+ refs/tags/doubly-signed-tag A signed tag
refs/tags/four Z
refs/tags/signed-tag four
EOF
diff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh
index 5e4e4dd6d9..9677180a5b 100755
--- a/t/t6406-merge-attr.sh
+++ b/t/t6406-merge-attr.sh
@@ -56,6 +56,12 @@ test_expect_success setup '
) >"$ours+"
cat "$ours+" >"$ours"
rm -f "$ours+"
+
+ if test -f ./please-abort
+ then
+ echo >>./please-abort killing myself
+ kill -9 $$
+ fi
exit "$exit"
EOF
chmod +x ./custom-merge
@@ -162,6 +168,23 @@ test_expect_success 'custom merge backend' '
rm -f $o $a $b
'
+test_expect_success !WINDOWS 'custom merge driver that is killed with a signal' '
+ test_when_finished "rm -f output please-abort" &&
+
+ git reset --hard anchor &&
+ git config --replace-all \
+ merge.custom.driver "./custom-merge %O %A %B 0 %P" &&
+ git config --replace-all \
+ merge.custom.name "custom merge driver for testing" &&
+
+ >./please-abort &&
+ echo "* merge=custom" >.gitattributes &&
+ test_must_fail git merge main &&
+ git ls-files -u >output &&
+ git diff --name-only HEAD >>output &&
+ test_must_be_empty output
+'
+
test_expect_success 'up-to-date merge without common ancestor' '
git init repo1 &&
git init repo2 &&
diff --git a/t/t6700-tree-depth.sh b/t/t6700-tree-depth.sh
new file mode 100755
index 0000000000..e410c41234
--- /dev/null
+++ b/t/t6700-tree-depth.sh
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+test_description='handling of deep trees in various commands'
+. ./test-lib.sh
+
+# We'll test against two depths here: a small one that will let us check the
+# behavior of the config setting easily, and a large one that should be
+# forbidden by default. Testing the default depth will let us know whether our
+# default is enough to prevent segfaults on systems that run the tests.
+small_depth=50
+big_depth=4100
+
+small_ok="-c core.maxtreedepth=$small_depth"
+small_no="-c core.maxtreedepth=$((small_depth-1))"
+
+# usage: mkdeep <name> <depth>
+# Create a tag <name> containing a file whose path has depth <depth>.
+#
+# We'll use fast-import here for two reasons:
+#
+# 1. It's faster than creating $big_depth tree objects.
+#
+# 2. As we tighten tree limits, it's more likely to allow large sizes
+# than trying to stuff a deep path into the index.
+mkdeep () {
+ {
+ echo "commit refs/tags/$1" &&
+ echo "committer foo <foo@example.com> 1234 -0000" &&
+ echo "data <<EOF" &&
+ echo "the commit message" &&
+ echo "EOF" &&
+
+ printf 'M 100644 inline ' &&
+ i=0 &&
+ while test $i -lt $2
+ do
+ printf 'a/'
+ i=$((i+1))
+ done &&
+ echo "file" &&
+
+ echo "data <<EOF" &&
+ echo "the file contents" &&
+ echo "EOF" &&
+ echo
+ } | git fast-import
+}
+
+test_expect_success 'create small tree' '
+ mkdeep small $small_depth
+'
+
+test_expect_success 'create big tree' '
+ mkdeep big $big_depth
+'
+
+test_expect_success 'limit recursion of git-archive' '
+ git $small_ok archive small >/dev/null &&
+ test_must_fail git $small_no archive small >/dev/null
+'
+
+test_expect_success 'default limit for git-archive fails gracefully' '
+ test_must_fail git archive big >/dev/null
+'
+
+test_expect_success 'limit recursion of ls-tree -r' '
+ git $small_ok ls-tree -r small &&
+ test_must_fail git $small_no ls-tree -r small
+'
+
+test_expect_success 'default limit for ls-tree fails gracefully' '
+ test_must_fail git ls-tree -r big >/dev/null
+'
+
+test_expect_success 'limit recursion of rev-list --objects' '
+ git $small_ok rev-list --objects small >/dev/null &&
+ test_must_fail git $small_no rev-list --objects small >/dev/null
+'
+
+test_expect_success 'default limit for rev-list fails gracefully' '
+ test_must_fail git rev-list --objects big >/dev/null
+'
+
+test_expect_success 'limit recursion of diff-tree -r' '
+ git $small_ok diff-tree -r $EMPTY_TREE small &&
+ test_must_fail git $small_no diff-tree -r $EMPTY_TREE small
+'
+
+test_expect_success 'default limit for diff-tree fails gracefully' '
+ test_must_fail git diff-tree -r $EMPTY_TREE big
+'
+
+test_done
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 898a920532..f136ea76f7 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -174,6 +174,13 @@ test_expect_success 'do not move directory over existing directory' '
test_must_fail git mv path2 path0
'
+test_expect_success 'rename directory to non-existing directory' '
+ mkdir dir-a &&
+ >dir-a/f &&
+ git add dir-a &&
+ git mv dir-a non-existing-dir
+'
+
test_expect_success 'move into "."' '
git mv path1/path2/ .
'
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 22477f3a31..4287863ae6 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -71,6 +71,16 @@ check_changes () {
done | test_cmp .cat_expect -
}
+# no negated form for various type of resets
+for opt in soft mixed hard merge keep
+do
+ test_expect_success "no 'git reset --no-$opt'" '
+ test_when_finished "rm -f err" &&
+ test_must_fail git reset --no-$opt 2>err &&
+ grep "error: unknown option .no-$opt." err
+ '
+done
+
test_expect_success 'reset --hard message' '
hex=$(git log -1 --format="%h") &&
git reset --hard >.actual &&
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 36567708f5..6928fd89f5 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -92,7 +92,7 @@ test_expect_success 'status --column' '
# On branch main
# Your branch and '\''upstream'\'' have diverged,
# and have 1 and 2 different commits each, respectively.
-# (use "git pull" to merge the remote branch into yours)
+# (use "git pull" if you want to integrate the remote branch with yours)
#
# Changes to be committed:
# (use "git restore --staged <file>..." to unstage)
@@ -123,7 +123,7 @@ cat >expect <<\EOF
# On branch main
# Your branch and 'upstream' have diverged,
# and have 1 and 2 different commits each, respectively.
-# (use "git pull" to merge the remote branch into yours)
+# (use "git pull" if you want to integrate the remote branch with yours)
#
# Changes to be committed:
# (use "git restore --staged <file>..." to unstage)
@@ -270,7 +270,7 @@ test_expect_success 'status with gitignore' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -335,7 +335,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -405,7 +405,7 @@ test_expect_success 'status -uno' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -467,7 +467,7 @@ test_expect_success 'status -unormal' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -522,7 +522,7 @@ test_expect_success 'status -uall' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -582,7 +582,7 @@ test_expect_success 'status with relative paths' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -650,7 +650,7 @@ test_expect_success TTY 'status with color.ui' '
On branch <GREEN>main<RESET>
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -773,7 +773,7 @@ test_expect_success 'status without relative paths' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -847,7 +847,6 @@ test_expect_success 'dry-run of partial commit excluding new file in index' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -901,7 +900,7 @@ test_expect_success 'status submodule summary is disabled by default' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -958,7 +957,7 @@ test_expect_success 'status submodule summary' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 1 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -1013,11 +1012,11 @@ test_expect_success 'status -s submodule summary' '
'
test_expect_success 'status submodule summary (clean submodule): commit' '
- cat >expect <<EOF &&
+ cat >expect-status <<EOF &&
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
@@ -1033,12 +1032,13 @@ Untracked files:
no changes added to commit (use "git add" and/or "git commit -a")
EOF
+ sed "/git pull/d" expect-status > expect-commit &&
git commit -m "commit submodule" &&
git config status.submodulesummary 10 &&
test_must_fail git commit --dry-run >output &&
- test_cmp expect output &&
+ test_cmp expect-commit output &&
git status >output &&
- test_cmp expect output
+ test_cmp expect-status output
'
cat >expect <<EOF
@@ -1065,7 +1065,6 @@ test_expect_success 'commit --dry-run submodule summary (--amend)' '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --source=HEAD^1 --staged <file>..." to unstage)
@@ -1117,7 +1116,7 @@ test_expect_success '--ignore-submodules=untracked suppresses submodules with un
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -1226,7 +1225,7 @@ test_expect_success "--ignore-submodules=untracked doesn't suppress submodules w
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -1283,7 +1282,7 @@ test_expect_success "--ignore-submodules=untracked doesn't suppress submodule su
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -1364,7 +1363,7 @@ cat > expect << EOF
; On branch main
; Your branch and 'upstream' have diverged,
; and have 2 and 2 different commits each, respectively.
-; (use "git pull" to merge the remote branch into yours)
+; (use "git pull" if you want to integrate the remote branch with yours)
;
; Changes to be committed:
; (use "git restore --staged <file>..." to unstage)
@@ -1412,7 +1411,7 @@ test_expect_success "--ignore-submodules=all suppresses submodule summary" '
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
@@ -1438,7 +1437,7 @@ test_expect_success '.gitmodules ignore=all suppresses unstaged submodule summar
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
+ (use "git pull" if you want to integrate the remote branch with yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
@@ -1558,7 +1557,6 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
- (use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index ccbc416402..0d2dd29fe6 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -218,6 +218,13 @@ test_expect_success GPG 'amending already signed commit' '
! grep "BAD signature from" actual
'
+test_expect_success GPG2 'bare signature' '
+ git verify-commit fifth-signed 2>expect &&
+ echo >>expect &&
+ git log -1 --format="%GG" fifth-signed >actual &&
+ test_cmp expect actual
+'
+
test_expect_success GPG 'show good signature with custom format' '
cat >expect <<-\EOF &&
G
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
index 2f16d5787e..c2ab8a444a 100755
--- a/t/t7512-status-help.sh
+++ b/t/t7512-status-help.sh
@@ -774,6 +774,28 @@ EOF
test_cmp expected actual
'
+test_expect_success 'status when cherry-picking multiple commits' '
+ git reset --hard cherry_branch &&
+ test_when_finished "git cherry-pick --abort" &&
+ test_must_fail git cherry-pick cherry_branch_second one_cherry &&
+ TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&
+ cat >expected <<EOF &&
+On branch cherry_branch
+You are currently cherry-picking commit $TO_CHERRY_PICK.
+ (fix conflicts and run "git cherry-pick --continue")
+ (use "git cherry-pick --skip" to skip this patch)
+ (use "git cherry-pick --abort" to cancel the cherry-pick operation)
+
+Unmerged paths:
+ (use "git add <file>..." to mark resolution)
+ both modified: main.txt
+
+no changes added to commit (use "git add" and/or "git commit -a")
+EOF
+ git status --untracked-files=no >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'status when cherry-picking after committing conflict resolution' '
git reset --hard cherry_branch &&
test_when_finished "git cherry-pick --abort" &&
diff --git a/t/t7516-commit-races.sh b/t/t7516-commit-races.sh
index 2d38a16480..bb95f09810 100755
--- a/t/t7516-commit-races.sh
+++ b/t/t7516-commit-races.sh
@@ -1,6 +1,8 @@
#!/bin/sh
test_description='git commit races'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'race to create orphan commit' '
diff --git a/t/t7518-ident-corner-cases.sh b/t/t7518-ident-corner-cases.sh
index fffdb6ff2e..9ab2ae2f3b 100755
--- a/t/t7518-ident-corner-cases.sh
+++ b/t/t7518-ident-corner-cases.sh
@@ -20,10 +20,19 @@ test_expect_success 'empty name and missing email' '
'
test_expect_success 'commit rejects all-crud name' '
- test_must_fail env GIT_AUTHOR_NAME=" .;<>" \
+ test_must_fail env GIT_AUTHOR_NAME=" ,;<>" \
git commit --allow-empty -m foo
'
+test_expect_success 'commit does not strip trailing dot' '
+ author_name="Pat Doe Jr." &&
+ env GIT_AUTHOR_NAME="$author_name" \
+ git commit --allow-empty -m foo &&
+ git log -1 --format=%an >actual &&
+ echo "$author_name" >expected &&
+ test_cmp actual expected
+'
+
# We must test the actual error message here, as an unwanted
# auto-detection could fail for other reasons.
test_expect_success 'empty configured name does not auto-detect' '
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index af79266c58..27b66807cd 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -213,7 +213,7 @@ test_expect_success 'repack --keep-pack' '
test_create_repo keep-pack &&
(
cd keep-pack &&
- # avoid producing difference packs to delta/base choices
+ # avoid producing different packs due to delta/base choices
git config pack.window 0 &&
P1=$(commit_and_pack 1) &&
P2=$(commit_and_pack 2) &&
@@ -239,6 +239,10 @@ test_expect_success 'repack --keep-pack' '
mv "$from" "$to" || return 1
done &&
+ # A .idx file without a .pack should not stop us from
+ # repacking what we can.
+ touch .git/objects/pack/pack-does-not-exist.idx &&
+
git repack --cruft -d --keep-pack $P1 --keep-pack $P4 &&
ls .git/objects/pack/*.pack >newer-counts &&
@@ -247,6 +251,36 @@ test_expect_success 'repack --keep-pack' '
)
'
+test_expect_success 'repacking fails when missing .pack actually means missing objects' '
+ test_create_repo idx-without-pack &&
+ (
+ cd idx-without-pack &&
+
+ # Avoid producing different packs due to delta/base choices
+ git config pack.window 0 &&
+ P1=$(commit_and_pack 1) &&
+ P2=$(commit_and_pack 2) &&
+ P3=$(commit_and_pack 3) &&
+ P4=$(commit_and_pack 4) &&
+ ls .git/objects/pack/*.pack >old-counts &&
+ test_line_count = 4 old-counts &&
+
+ # Remove one .pack file
+ rm .git/objects/pack/$P2 &&
+
+ ls .git/objects/pack/*.pack >before-pack-dir &&
+
+ test_must_fail git fsck &&
+ test_must_fail git repack --cruft -d 2>err &&
+ grep "bad object" err &&
+
+ # Before failing, the repack did not modify the
+ # pack directory.
+ ls .git/objects/pack/*.pack >after-pack-dir &&
+ test_cmp before-pack-dir after-pack-dir
+ )
+'
+
test_expect_success 'bitmaps are created by default in bare repos' '
git clone --bare .git bare.git &&
rm -f bare.git/objects/pack/*.bitmap &&
diff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh
index ba428c18a8..fe6c3e77a3 100755
--- a/t/t7701-repack-unpack-unreachable.sh
+++ b/t/t7701-repack-unpack-unreachable.sh
@@ -126,8 +126,18 @@ test_expect_success 'gc.recentObjectsHook' '
git cat-file -p $obj2 &&
git cat-file -p $obj3 &&
- git tag -a -m tag obj2-tag $obj2 &&
- obj2_tag="$(git rev-parse obj2-tag)" &&
+ # make an unreachable annotated tag object to ensure we rescue objects
+ # which are reachable from non-pruned unreachable objects
+ obj2_tag="$(git mktag <<-EOF
+ object $obj2
+ type blob
+ tag obj2-tag
+ tagger T A Gger <tagger@example.com> 1234567890 -0000
+ EOF
+ )" &&
+
+ obj2_tag_pack="$(echo $obj2_tag | git pack-objects .git/objects/pack/pack)" &&
+ git prune-packed &&
write_script precious-objects <<-EOF &&
echo $obj2_tag
@@ -136,6 +146,7 @@ test_expect_success 'gc.recentObjectsHook' '
test-tool chmtime =-86400 .git/objects/pack/pack-$pack2.pack &&
test-tool chmtime =-86400 .git/objects/pack/pack-$pack3.pack &&
+ test-tool chmtime =-86400 .git/objects/pack/pack-$obj2_tag_pack.pack &&
git repack -A -d --unpack-unreachable=1.hour.ago &&
git cat-file -p $obj1 &&
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 487e326b3f..e56f5980dc 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -744,7 +744,15 @@ test_expect_success 'start and stop Linux/systemd maintenance' '
# start registers the repo
git config --get --global --fixed-value maintenance.repo "$(pwd)" &&
- test_systemd_analyze_verify "systemd/user/git-maintenance@.service" &&
+ for schedule in hourly daily weekly
+ do
+ test_path_is_file "systemd/user/git-maintenance@$schedule.timer" || return 1
+ done &&
+ test_path_is_file "systemd/user/git-maintenance@.service" &&
+
+ test_systemd_analyze_verify "systemd/user/git-maintenance@hourly.service" &&
+ test_systemd_analyze_verify "systemd/user/git-maintenance@daily.service" &&
+ test_systemd_analyze_verify "systemd/user/git-maintenance@weekly.service" &&
printf -- "--user enable --now git-maintenance@%s.timer\n" hourly daily weekly >expect &&
test_cmp expect args &&
@@ -755,7 +763,10 @@ test_expect_success 'start and stop Linux/systemd maintenance' '
# stop does not unregister the repo
git config --get --global --fixed-value maintenance.repo "$(pwd)" &&
- test_path_is_missing "systemd/user/git-maintenance@.timer" &&
+ for schedule in hourly daily weekly
+ do
+ test_path_is_missing "systemd/user/git-maintenance@$schedule.timer" || return 1
+ done &&
test_path_is_missing "systemd/user/git-maintenance@.service" &&
printf -- "--user disable --now git-maintenance@%s.timer\n" hourly daily weekly >expect &&
@@ -838,4 +849,17 @@ test_expect_success 'register and unregister bare repo' '
)
'
+test_expect_success 'failed schedule prevents config change' '
+ git init --bare failcase &&
+
+ for scheduler in crontab launchctl schtasks systemctl
+ do
+ GIT_TEST_MAINT_SCHEDULER="$scheduler:false" &&
+ export GIT_TEST_MAINT_SCHEDULER &&
+ test_must_fail \
+ git -C failcase maintenance start &&
+ test_must_fail git -C failcase config maintenance.auto || return 1
+ done
+'
+
test_done
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 48bf0af2ee..263db3ad17 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -61,8 +61,8 @@ test_no_confirm () {
--smtp-server="$(pwd)/fake.sendmail" \
$@ \
$patches >stdout &&
- ! grep "Send this email" stdout &&
- >no_confirm_okay
+ ! grep "Send this email" stdout &&
+ >no_confirm_okay
}
# Exit immediately to prevent hang if a no-confirm test fails
@@ -337,13 +337,14 @@ test_expect_success $PREREQ 'Show all headers' '
test_expect_success $PREREQ 'Prompting works' '
clean_fake_sendmail &&
(echo "to@example.com" &&
- echo ""
+ echo "my-message-id@example.com"
) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
--smtp-server="$(pwd)/fake.sendmail" \
$patches \
2>errors &&
grep "^From: A U Thor <author@example.com>\$" msgtxt1 &&
- grep "^To: to@example.com\$" msgtxt1
+ grep "^To: to@example.com\$" msgtxt1 &&
+ grep "^In-Reply-To: <my-message-id@example.com>" msgtxt1
'
test_expect_success $PREREQ,AUTOIDENT 'implicit ident is allowed' '
@@ -659,7 +660,6 @@ test_expect_success $PREREQ 'clear message-id before parsing a new message' '
clean_fake_sendmail &&
echo true | write_script my-hooks/sendemail-validate &&
test_config core.hooksPath my-hooks &&
- GIT_SEND_EMAIL_NOTTY=1 \
git send-email --validate --to=recipient@example.com \
--smtp-server="$(pwd)/fake.sendmail" \
$patches $threaded_patches &&
diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh
index 872ad1c9c2..7869f45ee6 100755
--- a/t/t9211-scalar-clone.sh
+++ b/t/t9211-scalar-clone.sh
@@ -180,4 +180,16 @@ test_expect_success 'scalar clone warns when background maintenance fails' '
grep "could not turn on maintenance" err
'
+test_expect_success '`scalar clone --no-src`' '
+ scalar clone --src "file://$(pwd)/to-clone" with-src &&
+ scalar clone --no-src "file://$(pwd)/to-clone" without-src &&
+
+ test_path_is_dir with-src/src &&
+ test_path_is_missing without-src/src &&
+
+ (cd with-src/src && ls ?*) >with &&
+ (cd without-src && ls ?*) >without &&
+ test_cmp with without
+'
+
test_done
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 8835e16e81..47e20fb8b1 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -1622,14 +1622,22 @@ test_expect_success 'git checkout - with -d, complete only references' '
'
test_expect_success 'git switch - with --track, complete only remote branches' '
- test_completion "git switch --track " <<-\EOF
+ test_completion "git switch --track " <<-\EOF &&
+ other/branch-in-other Z
+ other/main-in-other Z
+ EOF
+ test_completion "git switch -t " <<-\EOF
other/branch-in-other Z
other/main-in-other Z
EOF
'
test_expect_success 'git checkout - with --track, complete only remote branches' '
- test_completion "git checkout --track " <<-\EOF
+ test_completion "git checkout --track " <<-\EOF &&
+ other/branch-in-other Z
+ other/main-in-other Z
+ EOF
+ test_completion "git checkout -t " <<-\EOF
other/branch-in-other Z
other/main-in-other Z
EOF
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index b3864e22e9..2f8868caa1 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -910,6 +910,15 @@ test_path_is_symlink () {
fi
}
+test_path_is_executable () {
+ test "$#" -ne 1 && BUG "1 param"
+ if ! test -x "$1"
+ then
+ echo "$1 is not executable"
+ false
+ fi
+}
+
# Check if the directory exists and is empty as expected, barf otherwise.
test_dir_is_empty () {
test "$#" -ne 1 && BUG "1 param"
@@ -1282,6 +1291,39 @@ test_cmp_rev () {
fi
}
+# Tests that a commit message matches the expected text
+#
+# Usage: test_commit_message <rev> [-m <msg> | <file>]
+#
+# When using "-m" <msg> will have a line feed appended. If the second
+# argument is omitted then the expected message is read from stdin.
+
+test_commit_message () {
+ local msg_file=expect.msg
+
+ case $# in
+ 3)
+ if test "$2" = "-m"
+ then
+ printf "%s\n" "$3" >"$msg_file"
+ else
+ BUG "Usage: test_commit_message <rev> [-m <message> | <file>]"
+ fi
+ ;;
+ 2)
+ msg_file="$2"
+ ;;
+ 1)
+ cat >"$msg_file"
+ ;;
+ *)
+ BUG "Usage: test_commit_message <rev> [-m <message> | <file>]"
+ ;;
+ esac
+ git show --no-patch --pretty=format:%B "$1" -- >actual.msg &&
+ test_cmp "$msg_file" actual.msg
+}
+
# Compare paths respecting core.ignoreCase
test_cmp_fspath () {
if test "x$1" = "x$2"
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 293caf0f20..5ea5d1d62a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -334,6 +334,7 @@ nr_san_dir_leaks_ () {
find "$TEST_RESULTS_SAN_DIR" \
-type f \
-name "$TEST_RESULTS_SAN_FILE_PFX.*" 2>/dev/null |
+ xargs grep -lv "Unable to get registers from thread" |
wc -l
}
diff --git a/tag.c b/tag.c
index 96dbd5b2d5..fc3834db46 100644
--- a/tag.c
+++ b/tag.c
@@ -2,7 +2,7 @@
#include "environment.h"
#include "tag.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
#include "tree.h"
#include "blob.h"
@@ -10,7 +10,6 @@
#include "gpg-interface.h"
#include "hex.h"
#include "packfile.h"
-#include "wrapper.h"
const char *tag_type = "tag";
diff --git a/tempfile.c b/tempfile.c
index 50c377134c..ecdebf1afb 100644
--- a/tempfile.c
+++ b/tempfile.c
@@ -43,10 +43,10 @@
*/
#include "git-compat-util.h"
+#include "abspath.h"
#include "path.h"
#include "tempfile.h"
#include "sigchain.h"
-#include "wrapper.h"
static VOLATILE_LIST_HEAD(tempfile_list);
diff --git a/tmp-objdir.c b/tmp-objdir.c
index c33a554f92..5f9074ad1c 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -5,12 +5,13 @@
#include "dir.h"
#include "environment.h"
#include "object-file.h"
+#include "path.h"
#include "sigchain.h"
#include "string-list.h"
#include "strbuf.h"
#include "strvec.h"
#include "quote.h"
-#include "object-store.h"
+#include "object-store-ll.h"
struct tmp_objdir {
struct strbuf path;
diff --git a/trace.c b/trace.c
index 592c141d78..971a68abe8 100644
--- a/trace.c
+++ b/trace.c
@@ -27,7 +27,6 @@
#include "quote.h"
#include "setup.h"
#include "trace.h"
-#include "wrapper.h"
struct trace_key trace_default_key = { "GIT_TRACE", 0, 0, 0 };
struct trace_key trace_perf_key = TRACE_KEY_INIT(PERFORMANCE);
diff --git a/trace2.c b/trace2.c
index 0efc4e7b95..6dc74dff4c 100644
--- a/trace2.c
+++ b/trace2.c
@@ -276,7 +276,6 @@ void trace2_cmd_exit_fl(const char *file, int line, int code)
if (!trace2_enabled)
return;
- trace_git_fsync_stats();
trace2_collect_process_info(TRACE2_PROCESS_INFO_EXIT);
tr2main_exit_code = code;
@@ -634,7 +633,7 @@ void trace2_thread_exit_fl(const char *file, int line)
}
void trace2_def_param_fl(const char *file, int line, const char *param,
- const char *value)
+ const char *value, const struct key_value_info *kvi)
{
struct tr2_tgt *tgt_j;
int j;
@@ -644,7 +643,7 @@ void trace2_def_param_fl(const char *file, int line, const char *param,
for_each_wanted_builtin (j, tgt_j)
if (tgt_j->pfn_param_fl)
- tgt_j->pfn_param_fl(file, line, param, value);
+ tgt_j->pfn_param_fl(file, line, param, value, kvi);
}
void trace2_def_repo_fl(const char *file, int line, struct repository *repo)
diff --git a/trace2.h b/trace2.h
index 4ced30c0db..40d8c2e02a 100644
--- a/trace2.h
+++ b/trace2.h
@@ -325,6 +325,7 @@ void trace2_thread_exit_fl(const char *file, int line);
#define trace2_thread_exit() trace2_thread_exit_fl(__FILE__, __LINE__)
+struct key_value_info;
/*
* Emits a "def_param" message containing a key/value pair.
*
@@ -334,7 +335,7 @@ void trace2_thread_exit_fl(const char *file, int line);
* `core.abbrev`, `status.showUntrackedFiles`, or `--no-ahead-behind`.
*/
void trace2_def_param_fl(const char *file, int line, const char *param,
- const char *value);
+ const char *value, const struct key_value_info *kvi);
#define trace2_def_param(param, value) \
trace2_def_param_fl(__FILE__, __LINE__, (param), (value))
@@ -540,7 +541,7 @@ void trace2_timer_stop(enum trace2_timer_id tid);
* elsewhere as array indexes).
*
* Any values added to this enum be also be added to the
- * `tr2_counter_metadata[]` in `trace2/tr2_tr2_ctr.c`.
+ * `tr2_counter_metadata[]` in `trace2/tr2_ctr.c`.
*/
enum trace2_counter_id {
/*
@@ -551,6 +552,12 @@ enum trace2_counter_id {
TRACE2_COUNTER_ID_TEST1 = 0, /* emits summary event only */
TRACE2_COUNTER_ID_TEST2, /* emits summary and thread events */
+ TRACE2_COUNTER_ID_PACKED_REFS_JUMPS, /* counts number of jumps */
+
+ /* counts number of fsyncs */
+ TRACE2_COUNTER_ID_FSYNC_WRITEOUT_ONLY,
+ TRACE2_COUNTER_ID_FSYNC_HARDWARE_FLUSH,
+
/* Add additional counter definitions before here. */
TRACE2_NUMBER_OF_COUNTERS
};
diff --git a/trace2/tr2_cfg.c b/trace2/tr2_cfg.c
index 78cfc15d52..d96d908bb9 100644
--- a/trace2/tr2_cfg.c
+++ b/trace2/tr2_cfg.c
@@ -4,6 +4,7 @@
#include "trace2.h"
#include "trace2/tr2_cfg.h"
#include "trace2/tr2_sysenv.h"
+#include "wildmatch.h"
static struct strbuf **tr2_cfg_patterns;
static int tr2_cfg_count_patterns;
@@ -99,7 +100,8 @@ struct tr2_cfg_data {
/*
* See if the given config key matches any of our patterns of interest.
*/
-static int tr2_cfg_cb(const char *key, const char *value, void *d)
+static int tr2_cfg_cb(const char *key, const char *value,
+ const struct config_context *ctx, void *d)
{
struct strbuf **s;
struct tr2_cfg_data *data = (struct tr2_cfg_data *)d;
@@ -108,7 +110,8 @@ static int tr2_cfg_cb(const char *key, const char *value, void *d)
struct strbuf *buf = *s;
int wm = wildmatch(buf->buf, key, WM_CASEFOLD);
if (wm == WM_MATCH) {
- trace2_def_param_fl(data->file, data->line, key, value);
+ trace2_def_param_fl(data->file, data->line, key, value,
+ ctx->kvi);
return 0;
}
}
@@ -126,8 +129,10 @@ void tr2_cfg_list_config_fl(const char *file, int line)
void tr2_list_env_vars_fl(const char *file, int line)
{
+ struct key_value_info kvi = KVI_INIT;
struct strbuf **s;
+ kvi_from_param(&kvi);
if (tr2_load_env_vars() <= 0)
return;
@@ -135,15 +140,19 @@ void tr2_list_env_vars_fl(const char *file, int line)
struct strbuf *buf = *s;
const char *val = getenv(buf->buf);
if (val && *val)
- trace2_def_param_fl(file, line, buf->buf, val);
+ trace2_def_param_fl(file, line, buf->buf, val, &kvi);
}
}
void tr2_cfg_set_fl(const char *file, int line, const char *key,
const char *value)
{
+ struct key_value_info kvi = KVI_INIT;
+ struct config_context ctx = {
+ .kvi = &kvi,
+ };
struct tr2_cfg_data data = { file, line };
if (tr2_cfg_load_patterns() > 0)
- tr2_cfg_cb(key, value, &data);
+ tr2_cfg_cb(key, value, &ctx, &data);
}
diff --git a/trace2/tr2_ctr.c b/trace2/tr2_ctr.c
index b342d3b1a3..87cf9034fb 100644
--- a/trace2/tr2_ctr.c
+++ b/trace2/tr2_ctr.c
@@ -27,6 +27,21 @@ static struct tr2_counter_metadata tr2_counter_metadata[TRACE2_NUMBER_OF_COUNTER
.name = "test2",
.want_per_thread_events = 1,
},
+ [TRACE2_COUNTER_ID_PACKED_REFS_JUMPS] = {
+ .category = "packed-refs",
+ .name = "jumps_made",
+ .want_per_thread_events = 0,
+ },
+ [TRACE2_COUNTER_ID_FSYNC_WRITEOUT_ONLY] = {
+ .category = "fsync",
+ .name = "writeout-only",
+ .want_per_thread_events = 0,
+ },
+ [TRACE2_COUNTER_ID_FSYNC_HARDWARE_FLUSH] = {
+ .category = "fsync",
+ .name = "hardware-flush",
+ .want_per_thread_events = 0,
+ },
/* Add additional metadata before here. */
};
diff --git a/trace2/tr2_sysenv.c b/trace2/tr2_sysenv.c
index 069786cb92..d3ecac2772 100644
--- a/trace2/tr2_sysenv.c
+++ b/trace2/tr2_sysenv.c
@@ -57,7 +57,9 @@ static struct tr2_sysenv_entry tr2_sysenv_settings[] = {
};
/* clang-format on */
-static int tr2_sysenv_cb(const char *key, const char *value, void *d)
+static int tr2_sysenv_cb(const char *key, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *d UNUSED)
{
int k;
diff --git a/trace2/tr2_tgt.h b/trace2/tr2_tgt.h
index bf8745c4f0..1f626cffea 100644
--- a/trace2/tr2_tgt.h
+++ b/trace2/tr2_tgt.h
@@ -69,8 +69,10 @@ typedef void(tr2_tgt_evt_exec_result_fl_t)(const char *file, int line,
uint64_t us_elapsed_absolute,
int exec_id, int code);
+struct key_value_info;
typedef void(tr2_tgt_evt_param_fl_t)(const char *file, int line,
- const char *param, const char *value);
+ const char *param, const char *value,
+ const struct key_value_info *kvi);
typedef void(tr2_tgt_evt_repo_fl_t)(const char *file, int line,
const struct repository *repo);
diff --git a/trace2/tr2_tgt_event.c b/trace2/tr2_tgt_event.c
index 2af53e5d4d..59910a1a4f 100644
--- a/trace2/tr2_tgt_event.c
+++ b/trace2/tr2_tgt_event.c
@@ -335,7 +335,7 @@ static void fn_alias_fl(const char *file, int line, const char *alias,
}
static void fn_child_start_fl(const char *file, int line,
- uint64_t us_elapsed_absolute,
+ uint64_t us_elapsed_absolute UNUSED,
const struct child_process *cmd)
{
const char *event_name = "child_start";
@@ -367,7 +367,8 @@ static void fn_child_start_fl(const char *file, int line,
}
static void fn_child_exit_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, int cid, int pid,
+ uint64_t us_elapsed_absolute UNUSED,
+ int cid, int pid,
int code, uint64_t us_elapsed_child)
{
const char *event_name = "child_exit";
@@ -388,7 +389,8 @@ static void fn_child_exit_fl(const char *file, int line,
}
static void fn_child_ready_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, int cid, int pid,
+ uint64_t us_elapsed_absolute UNUSED,
+ int cid, int pid,
const char *ready, uint64_t us_elapsed_child)
{
const char *event_name = "child_ready";
@@ -409,7 +411,7 @@ static void fn_child_ready_fl(const char *file, int line,
}
static void fn_thread_start_fl(const char *file, int line,
- uint64_t us_elapsed_absolute)
+ uint64_t us_elapsed_absolute UNUSED)
{
const char *event_name = "thread_start";
struct json_writer jw = JSON_WRITER_INIT;
@@ -423,7 +425,7 @@ static void fn_thread_start_fl(const char *file, int line,
}
static void fn_thread_exit_fl(const char *file, int line,
- uint64_t us_elapsed_absolute,
+ uint64_t us_elapsed_absolute UNUSED,
uint64_t us_elapsed_thread)
{
const char *event_name = "thread_exit";
@@ -439,7 +441,8 @@ static void fn_thread_exit_fl(const char *file, int line,
jw_release(&jw);
}
-static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
+static void fn_exec_fl(const char *file, int line,
+ uint64_t us_elapsed_absolute UNUSED,
int exec_id, const char *exe, const char **argv)
{
const char *event_name = "exec";
@@ -460,8 +463,8 @@ static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
}
static void fn_exec_result_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, int exec_id,
- int code)
+ uint64_t us_elapsed_absolute UNUSED,
+ int exec_id, int code)
{
const char *event_name = "exec_result";
struct json_writer jw = JSON_WRITER_INIT;
@@ -477,11 +480,11 @@ static void fn_exec_result_fl(const char *file, int line,
}
static void fn_param_fl(const char *file, int line, const char *param,
- const char *value)
+ const char *value, const struct key_value_info *kvi)
{
const char *event_name = "def_param";
struct json_writer jw = JSON_WRITER_INIT;
- enum config_scope scope = current_config_scope();
+ enum config_scope scope = kvi->scope;
const char *scope_name = config_scope_name(scope);
jw_object_begin(&jw, 0);
@@ -511,7 +514,7 @@ static void fn_repo_fl(const char *file, int line,
}
static void fn_region_enter_printf_va_fl(const char *file, int line,
- uint64_t us_elapsed_absolute,
+ uint64_t us_elapsed_absolute UNUSED,
const char *category,
const char *label,
const struct repository *repo,
@@ -538,7 +541,7 @@ static void fn_region_enter_printf_va_fl(const char *file, int line,
}
static void fn_region_leave_printf_va_fl(
- const char *file, int line, uint64_t us_elapsed_absolute,
+ const char *file, int line, uint64_t us_elapsed_absolute UNUSED,
uint64_t us_elapsed_region, const char *category, const char *label,
const struct repository *repo, const char *fmt, va_list ap)
{
diff --git a/trace2/tr2_tgt_normal.c b/trace2/tr2_tgt_normal.c
index 1ebfb464d5..38d5ebddf6 100644
--- a/trace2/tr2_tgt_normal.c
+++ b/trace2/tr2_tgt_normal.c
@@ -86,7 +86,7 @@ static void fn_version_fl(const char *file, int line)
}
static void fn_start_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, const char **argv)
+ uint64_t us_elapsed_absolute UNUSED, const char **argv)
{
struct strbuf buf_payload = STRBUF_INIT;
@@ -215,7 +215,7 @@ static void fn_alias_fl(const char *file, int line, const char *alias,
}
static void fn_child_start_fl(const char *file, int line,
- uint64_t us_elapsed_absolute,
+ uint64_t us_elapsed_absolute UNUSED,
const struct child_process *cmd)
{
struct strbuf buf_payload = STRBUF_INIT;
@@ -243,7 +243,8 @@ static void fn_child_start_fl(const char *file, int line,
}
static void fn_child_exit_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, int cid, int pid,
+ uint64_t us_elapsed_absolute UNUSED,
+ int cid, int pid,
int code, uint64_t us_elapsed_child)
{
struct strbuf buf_payload = STRBUF_INIT;
@@ -256,7 +257,8 @@ static void fn_child_exit_fl(const char *file, int line,
}
static void fn_child_ready_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, int cid, int pid,
+ uint64_t us_elapsed_absolute UNUSED,
+ int cid, int pid,
const char *ready, uint64_t us_elapsed_child)
{
struct strbuf buf_payload = STRBUF_INIT;
@@ -268,7 +270,8 @@ static void fn_child_ready_fl(const char *file, int line,
strbuf_release(&buf_payload);
}
-static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
+static void fn_exec_fl(const char *file, int line,
+ uint64_t us_elapsed_absolute UNUSED,
int exec_id, const char *exe, const char **argv)
{
struct strbuf buf_payload = STRBUF_INIT;
@@ -284,8 +287,8 @@ static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
}
static void fn_exec_result_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, int exec_id,
- int code)
+ uint64_t us_elapsed_absolute UNUSED,
+ int exec_id, int code)
{
struct strbuf buf_payload = STRBUF_INIT;
@@ -297,10 +300,10 @@ static void fn_exec_result_fl(const char *file, int line,
}
static void fn_param_fl(const char *file, int line, const char *param,
- const char *value)
+ const char *value, const struct key_value_info *kvi)
{
struct strbuf buf_payload = STRBUF_INIT;
- enum config_scope scope = current_config_scope();
+ enum config_scope scope = kvi->scope;
const char *scope_name = config_scope_name(scope);
strbuf_addf(&buf_payload, "def_param scope:%s %s=%s", scope_name, param,
@@ -321,7 +324,8 @@ static void fn_repo_fl(const char *file, int line,
}
static void fn_printf_va_fl(const char *file, int line,
- uint64_t us_elapsed_absolute, const char *fmt,
+ uint64_t us_elapsed_absolute UNUSED,
+ const char *fmt,
va_list ap)
{
struct strbuf buf_payload = STRBUF_INIT;
diff --git a/trace2/tr2_tgt_perf.c b/trace2/tr2_tgt_perf.c
index 328e483a05..a6f9a8a193 100644
--- a/trace2/tr2_tgt_perf.c
+++ b/trace2/tr2_tgt_perf.c
@@ -439,12 +439,12 @@ static void fn_exec_result_fl(const char *file, int line,
}
static void fn_param_fl(const char *file, int line, const char *param,
- const char *value)
+ const char *value, const struct key_value_info *kvi)
{
const char *event_name = "def_param";
struct strbuf buf_payload = STRBUF_INIT;
struct strbuf scope_payload = STRBUF_INIT;
- enum config_scope scope = current_config_scope();
+ enum config_scope scope = kvi->scope;
const char *scope_name = config_scope_name(scope);
strbuf_addf(&buf_payload, "%s:%s", param, value);
diff --git a/trace2/tr2_tls.c b/trace2/tr2_tls.c
index 9f46ae12f5..601c9e5036 100644
--- a/trace2/tr2_tls.c
+++ b/trace2/tr2_tls.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "thread-utils.h"
#include "trace.h"
#include "trace2/tr2_tls.h"
diff --git a/trailer.c b/trailer.c
index a2c3ed6f28..f408f9b058 100644
--- a/trailer.c
+++ b/trailer.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -482,6 +481,7 @@ static struct {
};
static int git_trailer_default_config(const char *conf_key, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
const char *trailer_item, *variable_name;
@@ -514,6 +514,7 @@ static int git_trailer_default_config(const char *conf_key, const char *value,
}
static int git_trailer_config(const char *conf_key, const char *value,
+ const struct config_context *ctx UNUSED,
void *cb UNUSED)
{
const char *trailer_item, *variable_name;
diff --git a/transport-helper.c b/transport-helper.c
index 6b816940dc..49811ef176 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -8,6 +8,7 @@
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
+#include "repository.h"
#include "revision.h"
#include "remote.h"
#include "string-list.h"
@@ -18,7 +19,6 @@
#include "refspec.h"
#include "transport-internal.h"
#include "protocol.h"
-#include "wrapper.h"
static int debug;
diff --git a/transport.c b/transport.c
index 67afdae57c..219af8fd50 100644
--- a/transport.c
+++ b/transport.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "advice.h"
-#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "hex.h"
@@ -27,10 +26,9 @@
#include "transport-internal.h"
#include "protocol.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "color.h"
#include "bundle-uri.h"
-#include "wrapper.h"
static int transport_use_color = -1;
static char transport_colors[][COLOR_MAXLEN] = {
diff --git a/tree-diff.c b/tree-diff.c
index 20bb15f38d..46107772d1 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -4,8 +4,10 @@
#include "git-compat-util.h"
#include "diff.h"
#include "diffcore.h"
+#include "hash.h"
#include "tree.h"
#include "tree-walk.h"
+#include "environment.h"
/*
* Some mode bits are also used internally for computations.
@@ -44,7 +46,8 @@
static struct combine_diff_path *ll_diff_tree_paths(
struct combine_diff_path *p, const struct object_id *oid,
const struct object_id **parents_oid, int nparent,
- struct strbuf *base, struct diff_options *opt);
+ struct strbuf *base, struct diff_options *opt,
+ int depth);
static void ll_diff_tree_oid(const struct object_id *old_oid,
const struct object_id *new_oid,
struct strbuf *base, struct diff_options *opt);
@@ -195,7 +198,7 @@ static struct combine_diff_path *path_appendnew(struct combine_diff_path *last,
static struct combine_diff_path *emit_path(struct combine_diff_path *p,
struct strbuf *base, struct diff_options *opt, int nparent,
struct tree_desc *t, struct tree_desc *tp,
- int imin)
+ int imin, int depth)
{
unsigned short mode;
const char *path;
@@ -301,7 +304,8 @@ static struct combine_diff_path *emit_path(struct combine_diff_path *p,
strbuf_add(base, path, pathlen);
strbuf_addch(base, '/');
- p = ll_diff_tree_paths(p, oid, parents_oid, nparent, base, opt);
+ p = ll_diff_tree_paths(p, oid, parents_oid, nparent, base, opt,
+ depth + 1);
FAST_ARRAY_FREE(parents_oid, nparent);
}
@@ -316,7 +320,7 @@ static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
while (t->size) {
match = tree_entry_interesting(opt->repo->index, &t->entry,
- base, 0, &opt->pathspec);
+ base, &opt->pathspec);
if (match) {
if (match == all_entries_not_interesting)
t->size = 0;
@@ -422,12 +426,16 @@ static inline void update_tp_entries(struct tree_desc *tp, int nparent)
static struct combine_diff_path *ll_diff_tree_paths(
struct combine_diff_path *p, const struct object_id *oid,
const struct object_id **parents_oid, int nparent,
- struct strbuf *base, struct diff_options *opt)
+ struct strbuf *base, struct diff_options *opt,
+ int depth)
{
struct tree_desc t, *tp;
void *ttree, **tptree;
int i;
+ if (depth > max_allowed_tree_depth)
+ die("exceeded maximum allowed tree depth");
+
FAST_ARRAY_ALLOC(tp, nparent);
FAST_ARRAY_ALLOC(tptree, nparent);
@@ -521,7 +529,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
/* D += {δ(t,pi) if pi=p[imin]; "+a" if pi > p[imin]} */
p = emit_path(p, base, opt, nparent,
- &t, tp, imin);
+ &t, tp, imin, depth);
skip_emit_t_tp:
/* t↓, ∀ pi=p[imin] pi↓ */
@@ -533,7 +541,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
else if (cmp < 0) {
/* D += "+t" */
p = emit_path(p, base, opt, nparent,
- &t, /*tp=*/NULL, -1);
+ &t, /*tp=*/NULL, -1, depth);
/* t↓ */
update_tree_entry(&t);
@@ -549,7 +557,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
}
p = emit_path(p, base, opt, nparent,
- /*t=*/NULL, tp, imin);
+ /*t=*/NULL, tp, imin, depth);
skip_emit_tp:
/* ∀ pi=p[imin] pi↓ */
@@ -571,7 +579,7 @@ struct combine_diff_path *diff_tree_paths(
const struct object_id **parents_oid, int nparent,
struct strbuf *base, struct diff_options *opt)
{
- p = ll_diff_tree_paths(p, oid, parents_oid, nparent, base, opt);
+ p = ll_diff_tree_paths(p, oid, parents_oid, nparent, base, opt, 0);
/*
* free pre-allocated last element, if any
diff --git a/tree-walk.c b/tree-walk.c
index d3c48e06df..b517792ba2 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -1,15 +1,15 @@
#include "git-compat-util.h"
#include "tree-walk.h"
-#include "alloc.h"
#include "dir.h"
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "trace2.h"
#include "tree.h"
#include "pathspec.h"
#include "json-writer.h"
+#include "environment.h"
static const char *get_mode(const char *str, unsigned int *modep)
{
@@ -435,29 +435,32 @@ static inline int prune_traversal(struct index_state *istate,
if (still_interesting < 0)
return still_interesting;
return tree_entry_interesting(istate, e, base,
- 0, info->pathspec);
+ info->pathspec);
}
int traverse_trees(struct index_state *istate,
int n, struct tree_desc *t,
struct traverse_info *info)
{
- int error = 0;
- struct name_entry entry[MAX_TRAVERSE_TREES];
+ int ret = 0;
+ struct name_entry *entry;
int i;
- struct tree_desc_x tx[ARRAY_SIZE(entry)];
+ struct tree_desc_x *tx;
struct strbuf base = STRBUF_INIT;
int interesting = 1;
char *traverse_path;
+ if (traverse_trees_cur_depth > max_allowed_tree_depth)
+ return error("exceeded maximum allowed tree depth");
+
traverse_trees_count++;
traverse_trees_cur_depth++;
if (traverse_trees_cur_depth > traverse_trees_max_depth)
traverse_trees_max_depth = traverse_trees_cur_depth;
- if (n >= ARRAY_SIZE(entry))
- BUG("traverse_trees() called with too many trees (%d)", n);
+ ALLOC_ARRAY(entry, n);
+ ALLOC_ARRAY(tx, n);
for (i = 0; i < n; i++) {
tx[i].d = t[i];
@@ -540,7 +543,7 @@ int traverse_trees(struct index_state *istate,
if (interesting) {
trees_used = info->fn(n, mask, dirmask, entry, info);
if (trees_used < 0) {
- error = trees_used;
+ ret = trees_used;
if (!info->show_all_errors)
break;
}
@@ -552,12 +555,14 @@ int traverse_trees(struct index_state *istate,
}
for (i = 0; i < n; i++)
free_extended_entry(tx + i);
+ free(tx);
+ free(entry);
free(traverse_path);
info->traverse_path = NULL;
strbuf_release(&base);
traverse_trees_cur_depth--;
- return error;
+ return ret;
}
struct dir_state {
@@ -1016,17 +1021,17 @@ static int match_wildcard_base(const struct pathspec_item *item,
/*
* Is a tree entry interesting given the pathspec we have?
*
- * Pre-condition: either baselen == base_offset (i.e. empty path)
+ * Pre-condition: either baselen == 0 (i.e. empty path)
* or base[baselen-1] == '/' (i.e. with trailing slash).
*/
static enum interesting do_match(struct index_state *istate,
const struct name_entry *entry,
- struct strbuf *base, int base_offset,
+ struct strbuf *base,
const struct pathspec *ps,
int exclude)
{
int i;
- int pathlen, baselen = base->len - base_offset;
+ int pathlen, baselen = base->len;
enum interesting never_interesting = ps->has_wildcard ?
entry_not_interesting : all_entries_not_interesting;
@@ -1044,7 +1049,7 @@ static enum interesting do_match(struct index_state *istate,
!(ps->magic & PATHSPEC_MAXDEPTH) ||
ps->max_depth == -1)
return all_entries_interesting;
- return within_depth(base->buf + base_offset, baselen,
+ return within_depth(base->buf, baselen,
!!S_ISDIR(entry->mode),
ps->max_depth) ?
entry_interesting : entry_not_interesting;
@@ -1055,7 +1060,7 @@ static enum interesting do_match(struct index_state *istate,
for (i = ps->nr - 1; i >= 0; i--) {
const struct pathspec_item *item = ps->items+i;
const char *match = item->match;
- const char *base_str = base->buf + base_offset;
+ const char *base_str = base->buf;
int matchlen = item->len, matched = 0;
if ((!exclude && item->magic & PATHSPEC_EXCLUDE) ||
@@ -1148,9 +1153,9 @@ match_wildcards:
strbuf_add(base, entry->path, pathlen);
- if (!git_fnmatch(item, match, base->buf + base_offset,
+ if (!git_fnmatch(item, match, base->buf,
item->nowildcard_len)) {
- strbuf_setlen(base, base_offset + baselen);
+ strbuf_setlen(base, baselen);
goto interesting;
}
@@ -1162,13 +1167,13 @@ match_wildcards:
* be performed in the submodule itself.
*/
if (ps->recurse_submodules && S_ISGITLINK(entry->mode) &&
- !ps_strncmp(item, match, base->buf + base_offset,
+ !ps_strncmp(item, match, base->buf,
item->nowildcard_len)) {
- strbuf_setlen(base, base_offset + baselen);
+ strbuf_setlen(base, baselen);
goto interesting;
}
- strbuf_setlen(base, base_offset + baselen);
+ strbuf_setlen(base, baselen);
/*
* Match all directories. We'll try to match files
@@ -1204,9 +1209,9 @@ interesting:
return entry_interesting;
strbuf_add(base, entry->path, pathlen);
- ret = match_pathspec_attrs(istate, base->buf + base_offset,
- base->len - base_offset, item);
- strbuf_setlen(base, base_offset + baselen);
+ ret = match_pathspec_attrs(istate, base->buf,
+ base->len, item);
+ strbuf_setlen(base, baselen);
if (!ret)
continue;
}
@@ -1218,16 +1223,16 @@ interesting:
/*
* Is a tree entry interesting given the pathspec we have?
*
- * Pre-condition: either baselen == base_offset (i.e. empty path)
+ * Pre-condition: either baselen == 0 (i.e. empty path)
* or base[baselen-1] == '/' (i.e. with trailing slash).
*/
enum interesting tree_entry_interesting(struct index_state *istate,
const struct name_entry *entry,
- struct strbuf *base, int base_offset,
+ struct strbuf *base,
const struct pathspec *ps)
{
enum interesting positive, negative;
- positive = do_match(istate, entry, base, base_offset, ps, 0);
+ positive = do_match(istate, entry, base, ps, 0);
/*
* case | entry | positive | negative | result
@@ -1264,7 +1269,7 @@ enum interesting tree_entry_interesting(struct index_state *istate,
positive <= entry_not_interesting) /* #1, #2, #11, #12 */
return positive;
- negative = do_match(istate, entry, base, base_offset, ps, 1);
+ negative = do_match(istate, entry, base, ps, 1);
/* #8, #18 */
if (positive == all_entries_interesting &&
diff --git a/tree-walk.h b/tree-walk.h
index 01a9d8eb44..a6bfa3da3a 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -6,8 +6,6 @@
struct index_state;
struct repository;
-#define MAX_TRAVERSE_TREES 8
-
/**
* The tree walking API is used to traverse and inspect trees.
*/
@@ -224,7 +222,7 @@ enum interesting {
enum interesting tree_entry_interesting(struct index_state *istate,
const struct name_entry *,
- struct strbuf *, int,
+ struct strbuf *,
const struct pathspec *ps);
#endif
diff --git a/tree.c b/tree.c
index 0dd2029a8a..990f9c9854 100644
--- a/tree.c
+++ b/tree.c
@@ -3,18 +3,20 @@
#include "hex.h"
#include "tree.h"
#include "object-name.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "blob.h"
#include "commit.h"
#include "tag.h"
#include "alloc.h"
#include "tree-walk.h"
#include "repository.h"
+#include "environment.h"
const char *tree_type = "tree";
int read_tree_at(struct repository *r,
struct tree *tree, struct strbuf *base,
+ int depth,
const struct pathspec *pathspec,
read_tree_fn_t fn, void *context)
{
@@ -24,6 +26,9 @@ int read_tree_at(struct repository *r,
int len, oldlen = base->len;
enum interesting retval = entry_not_interesting;
+ if (depth > max_allowed_tree_depth)
+ return error("exceeded maximum allowed tree depth");
+
if (parse_tree(tree))
return -1;
@@ -32,7 +37,7 @@ int read_tree_at(struct repository *r,
while (tree_entry(&desc, &entry)) {
if (retval != all_entries_interesting) {
retval = tree_entry_interesting(r->index, &entry,
- base, 0, pathspec);
+ base, pathspec);
if (retval == all_entries_not_interesting)
break;
if (retval == entry_not_interesting)
@@ -74,7 +79,7 @@ int read_tree_at(struct repository *r,
strbuf_add(base, entry.path, len);
strbuf_addch(base, '/');
retval = read_tree_at(r, lookup_tree(r, &oid),
- base, pathspec,
+ base, depth + 1, pathspec,
fn, context);
strbuf_setlen(base, oldlen);
if (retval)
@@ -89,7 +94,7 @@ int read_tree(struct repository *r,
read_tree_fn_t fn, void *context)
{
struct strbuf sb = STRBUF_INIT;
- int ret = read_tree_at(r, tree, &sb, pathspec, fn, context);
+ int ret = read_tree_at(r, tree, &sb, 0, pathspec, fn, context);
strbuf_release(&sb);
return ret;
}
diff --git a/tree.h b/tree.h
index 1b5ecbda6b..cc6ddf51b3 100644
--- a/tree.h
+++ b/tree.h
@@ -44,6 +44,7 @@ typedef int (*read_tree_fn_t)(const struct object_id *, struct strbuf *, const c
int read_tree_at(struct repository *r,
struct tree *tree, struct strbuf *base,
+ int depth,
const struct pathspec *pathspec,
read_tree_fn_t fn, void *context);
diff --git a/unpack-trees.c b/unpack-trees.c
index e8c32a40dc..a203f9a3d7 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "advice.h"
#include "strvec.h"
#include "repository.h"
@@ -7,6 +7,7 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
+#include "name-hash.h"
#include "tree.h"
#include "tree-walk.h"
#include "cache-tree.h"
@@ -14,6 +15,7 @@
#include "progress.h"
#include "refs.h"
#include "attr.h"
+#include "read-cache.h"
#include "split-index.h"
#include "sparse-index.h"
#include "submodule.h"
@@ -21,7 +23,7 @@
#include "symlinks.h"
#include "trace2.h"
#include "fsmonitor.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "promisor-remote.h"
#include "entry.h"
#include "parallel-checkout.h"
@@ -862,8 +864,8 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
struct unpack_trees_options *o = info->data;
int i, ret, bottom;
int nr_buf = 0;
- struct tree_desc t[MAX_UNPACK_TREES];
- void *buf[MAX_UNPACK_TREES];
+ struct tree_desc *t;
+ void **buf;
struct traverse_info newinfo;
struct name_entry *p;
int nr_entries;
@@ -900,6 +902,9 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
newinfo.pathlen = st_add3(newinfo.pathlen, tree_entry_len(p), 1);
newinfo.df_conflicts |= df_conflicts;
+ ALLOC_ARRAY(t, n);
+ ALLOC_ARRAY(buf, n);
+
/*
* Fetch the tree from the ODB for each peer directory in the
* n commits.
@@ -935,6 +940,8 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
for (i = 0; i < nr_buf; i++)
free(buf[i]);
+ free(buf);
+ free(t);
return ret;
}
diff --git a/unpack-trees.h b/unpack-trees.h
index 30622aeebf..5867e26e17 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -1,13 +1,13 @@
#ifndef UNPACK_TREES_H
#define UNPACK_TREES_H
-#include "cache.h"
#include "convert.h"
+#include "read-cache-ll.h"
#include "strvec.h"
#include "string-list.h"
#include "tree-walk.h"
-#define MAX_UNPACK_TREES MAX_TRAVERSE_TREES
+#define MAX_UNPACK_TREES 8
struct cache_entry;
struct unpack_trees_options;
diff --git a/upload-pack.c b/upload-pack.c
index d3312006a3..83f3d2651a 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -7,7 +7,7 @@
#include "pkt-line.h"
#include "sideband.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "oid-array.h"
#include "tag.h"
#include "object.h"
@@ -32,7 +32,6 @@
#include "commit-graph.h"
#include "commit-reach.h"
#include "shallow.h"
-#include "wrapper.h"
#include "write-or-die.h"
/* Remember to update object flag allocation in object.h */
@@ -69,7 +68,7 @@ struct upload_pack_data {
struct object_array have_obj;
struct oid_array haves; /* v2 only */
struct string_list wanted_refs; /* v2 only */
- struct string_list hidden_refs;
+ struct strvec hidden_refs;
struct object_array shallows;
struct string_list deepen_not;
@@ -127,7 +126,7 @@ static void upload_pack_data_init(struct upload_pack_data *data)
{
struct string_list symref = STRING_LIST_INIT_DUP;
struct string_list wanted_refs = STRING_LIST_INIT_DUP;
- struct string_list hidden_refs = STRING_LIST_INIT_DUP;
+ struct strvec hidden_refs = STRVEC_INIT;
struct object_array want_obj = OBJECT_ARRAY_INIT;
struct object_array have_obj = OBJECT_ARRAY_INIT;
struct oid_array haves = OID_ARRAY_INIT;
@@ -162,7 +161,7 @@ static void upload_pack_data_clear(struct upload_pack_data *data)
{
string_list_clear(&data->symref, 1);
string_list_clear(&data->wanted_refs, 1);
- string_list_clear(&data->hidden_refs, 0);
+ strvec_clear(&data->hidden_refs);
object_array_clear(&data->want_obj);
object_array_clear(&data->have_obj);
oid_array_clear(&data->haves);
@@ -602,11 +601,36 @@ static int get_common_commits(struct upload_pack_data *data,
}
}
+static int allow_hidden_refs(enum allow_uor allow_uor)
+{
+ if ((allow_uor & ALLOW_ANY_SHA1) == ALLOW_ANY_SHA1)
+ return 1;
+ return !(allow_uor & (ALLOW_TIP_SHA1 | ALLOW_REACHABLE_SHA1));
+}
+
+static void for_each_namespaced_ref_1(each_ref_fn fn,
+ struct upload_pack_data *data)
+{
+ const char **excludes = NULL;
+ /*
+ * If `data->allow_uor` allows fetching hidden refs, we need to
+ * mark all references (including hidden ones), to check in
+ * `is_our_ref()` below.
+ *
+ * Otherwise, we only care about whether each reference's object
+ * has the OUR_REF bit set or not, so do not need to visit
+ * hidden references.
+ */
+ if (allow_hidden_refs(data->allow_uor))
+ excludes = hidden_refs_to_excludes(&data->hidden_refs);
+
+ for_each_namespaced_ref(excludes, fn, data);
+}
+
+
static int is_our_ref(struct object *o, enum allow_uor allow_uor)
{
- int allow_hidden_ref = (allow_uor &
- (ALLOW_TIP_SHA1 | ALLOW_REACHABLE_SHA1));
- return o->flags & ((allow_hidden_ref ? HIDDEN_REF : 0) | OUR_REF);
+ return o->flags & ((allow_hidden_refs(allow_uor) ? 0 : HIDDEN_REF) | OUR_REF);
}
/*
@@ -777,11 +801,12 @@ error:
for (i = 0; i < data->want_obj.nr; i++) {
struct object *o = data->want_obj.objects[i].item;
if (!is_our_ref(o, data->allow_uor)) {
+ error("git upload-pack: not our ref %s",
+ oid_to_hex(&o->oid));
packet_writer_error(&data->writer,
"upload-pack: not our ref %s",
oid_to_hex(&o->oid));
- die("git upload-pack: not our ref %s",
- oid_to_hex(&o->oid));
+ exit(128);
}
}
}
@@ -855,7 +880,7 @@ static void deepen(struct upload_pack_data *data, int depth)
* marked with OUR_REF.
*/
head_ref_namespaced(check_ref, data);
- for_each_namespaced_ref(check_ref, data);
+ for_each_namespaced_ref_1(check_ref, data);
get_reachable_list(data, &reachable_shallows);
result = get_shallow_commits(&reachable_shallows,
@@ -1170,7 +1195,7 @@ static void receive_needs(struct upload_pack_data *data,
/* return non-zero if the ref is hidden, otherwise 0 */
static int mark_our_ref(const char *refname, const char *refname_full,
- const struct object_id *oid, const struct string_list *hidden_refs)
+ const struct object_id *oid, const struct strvec *hidden_refs)
{
struct object *o = lookup_unknown_object(the_repository, oid);
@@ -1275,7 +1300,8 @@ static int find_symref(const char *refname,
}
static int parse_object_filter_config(const char *var, const char *value,
- struct upload_pack_data *data)
+ const struct key_value_info *kvi,
+ struct upload_pack_data *data)
{
struct strbuf buf = STRBUF_INIT;
const char *sub, *key;
@@ -1302,14 +1328,17 @@ static int parse_object_filter_config(const char *var, const char *value,
}
string_list_insert(&data->allowed_filters, buf.buf)->util =
(void *)(intptr_t)1;
- data->tree_filter_max_depth = git_config_ulong(var, value);
+ data->tree_filter_max_depth = git_config_ulong(var, value,
+ kvi);
}
strbuf_release(&buf);
return 0;
}
-static int upload_pack_config(const char *var, const char *value, void *cb_data)
+static int upload_pack_config(const char *var, const char *value,
+ const struct config_context *ctx,
+ void *cb_data)
{
struct upload_pack_data *data = cb_data;
@@ -1329,7 +1358,7 @@ static int upload_pack_config(const char *var, const char *value, void *cb_data)
else
data->allow_uor &= ~ALLOW_ANY_SHA1;
} else if (!strcmp("uploadpack.keepalive", var)) {
- data->keepalive = git_config_int(var, value);
+ data->keepalive = git_config_int(var, value, ctx->kvi);
if (!data->keepalive)
data->keepalive = -1;
} else if (!strcmp("uploadpack.allowfilter", var)) {
@@ -1344,13 +1373,15 @@ static int upload_pack_config(const char *var, const char *value, void *cb_data)
data->advertise_sid = git_config_bool(var, value);
}
- if (parse_object_filter_config(var, value, data) < 0)
+ if (parse_object_filter_config(var, value, ctx->kvi, data) < 0)
return -1;
return parse_hide_refs_config(var, value, "uploadpack", &data->hidden_refs);
}
-static int upload_pack_protected_config(const char *var, const char *value, void *cb_data)
+static int upload_pack_protected_config(const char *var, const char *value,
+ const struct config_context *ctx UNUSED,
+ void *cb_data)
{
struct upload_pack_data *data = cb_data;
@@ -1386,7 +1417,7 @@ void upload_pack(const int advertise_refs, const int stateless_rpc,
if (advertise_refs)
data.no_done = 1;
head_ref_namespaced(send_ref, &data);
- for_each_namespaced_ref(send_ref, &data);
+ for_each_namespaced_ref_1(send_ref, &data);
if (!data.sent_capabilities) {
const char *refname = "capabilities^{}";
write_v0_ref(&data, refname, refname, null_oid());
@@ -1400,7 +1431,7 @@ void upload_pack(const int advertise_refs, const int stateless_rpc,
packet_flush(1);
} else {
head_ref_namespaced(check_ref, &data);
- for_each_namespaced_ref(check_ref, &data);
+ for_each_namespaced_ref_1(check_ref, &data);
}
if (!advertise_refs) {
@@ -1465,7 +1496,7 @@ static int parse_want(struct packet_writer *writer, const char *line,
static int parse_want_ref(struct packet_writer *writer, const char *line,
struct string_list *wanted_refs,
- struct string_list *hidden_refs,
+ struct strvec *hidden_refs,
struct object_array *want_obj)
{
const char *refname_nons;
diff --git a/urlmatch.c b/urlmatch.c
index eba0bdd77f..1c45f23adf 100644
--- a/urlmatch.c
+++ b/urlmatch.c
@@ -551,7 +551,8 @@ static int cmp_matches(const struct urlmatch_item *a,
return 0;
}
-int urlmatch_config_entry(const char *var, const char *value, void *cb)
+int urlmatch_config_entry(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
struct string_list_item *item;
struct urlmatch_config *collect = cb;
@@ -565,7 +566,7 @@ int urlmatch_config_entry(const char *var, const char *value, void *cb)
if (!skip_prefix(var, collect->section, &key) || *(key++) != '.') {
if (collect->cascade_fn)
- return collect->cascade_fn(var, value, cb);
+ return collect->cascade_fn(var, value, ctx, cb);
return 0; /* not interested */
}
dot = strrchr(key, '.');
@@ -609,7 +610,7 @@ int urlmatch_config_entry(const char *var, const char *value, void *cb)
strbuf_addstr(&synthkey, collect->section);
strbuf_addch(&synthkey, '.');
strbuf_addstr(&synthkey, key);
- retval = collect->collect_fn(synthkey.buf, value, collect->cb);
+ retval = collect->collect_fn(synthkey.buf, value, ctx, collect->cb);
strbuf_release(&synthkey);
return retval;
diff --git a/urlmatch.h b/urlmatch.h
index 9f40b00bfb..5ba85cea13 100644
--- a/urlmatch.h
+++ b/urlmatch.h
@@ -2,6 +2,7 @@
#define URL_MATCH_H
#include "string-list.h"
+#include "config.h"
struct url_info {
/* normalized url on success, must be freed, otherwise NULL */
@@ -48,8 +49,8 @@ struct urlmatch_config {
const char *key;
void *cb;
- int (*collect_fn)(const char *var, const char *value, void *cb);
- int (*cascade_fn)(const char *var, const char *value, void *cb);
+ config_fn_t collect_fn;
+ config_fn_t cascade_fn;
/*
* Compare the two matches, the one just discovered and the existing
* best match and return a negative value if the found item is to be
@@ -70,7 +71,8 @@ struct urlmatch_config {
.vars = STRING_LIST_INIT_DUP, \
}
-int urlmatch_config_entry(const char *var, const char *value, void *cb);
+int urlmatch_config_entry(const char *var, const char *value,
+ const struct config_context *ctx, void *cb);
void urlmatch_config_release(struct urlmatch_config *config);
#endif /* URL_MATCH_H */
diff --git a/usage.c b/usage.c
index 46d99f8bd4..09f0ed509b 100644
--- a/usage.c
+++ b/usage.c
@@ -6,7 +6,6 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "trace2.h"
-#include "wrapper.h"
static void vreportf(const char *prefix, const char *err, va_list params)
{
diff --git a/userdiff.c b/userdiff.c
index 664c7c1402..e399543823 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "alloc.h"
#include "config.h"
#include "userdiff.h"
#include "attr.h"
diff --git a/versioncmp.c b/versioncmp.c
index 74cc7c43f0..45e676cbca 100644
--- a/versioncmp.c
+++ b/versioncmp.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "config.h"
+#include "strbuf.h"
#include "string-list.h"
#include "versioncmp.h"
diff --git a/walker.c b/walker.c
index 24ff7dfdc2..65002a7220 100644
--- a/walker.c
+++ b/walker.c
@@ -3,8 +3,9 @@
#include "hex.h"
#include "walker.h"
#include "repository.h"
-#include "object-store.h"
+#include "object-store-ll.h"
#include "commit.h"
+#include "strbuf.h"
#include "tree.h"
#include "tree-walk.h"
#include "tag.h"
diff --git a/worktree.c b/worktree.c
index c448fecd4b..a56a6c2a3d 100644
--- a/worktree.c
+++ b/worktree.c
@@ -1,8 +1,8 @@
#include "git-compat-util.h"
#include "abspath.h"
-#include "alloc.h"
#include "environment.h"
#include "gettext.h"
+#include "path.h"
#include "repository.h"
#include "refs.h"
#include "setup.h"
@@ -11,7 +11,6 @@
#include "dir.h"
#include "wt-status.h"
#include "config.h"
-#include "wrapper.h"
void free_worktrees(struct worktree **worktrees)
{
@@ -582,8 +581,10 @@ static void repair_gitfile(struct worktree *wt,
strbuf_release(&dotgit);
}
-static void repair_noop(int iserr, const char *path, const char *msg,
- void *cb_data)
+static void repair_noop(int iserr UNUSED,
+ const char *path UNUSED,
+ const char *msg UNUSED,
+ void *cb_data UNUSED)
{
/* nothing */
}
@@ -835,7 +836,7 @@ int init_worktree_config(struct repository *r)
* Relocate that value to avoid breaking all worktrees with this
* upgrade to worktree config.
*/
- if (!git_configset_get_value(&cs, "core.worktree", &core_worktree)) {
+ if (!git_configset_get_value(&cs, "core.worktree", &core_worktree, NULL)) {
if ((res = move_config_setting("core.worktree", core_worktree,
common_config_file,
main_worktree_file)))
diff --git a/wrapper.c b/wrapper.c
index 67f5f5dbe1..48065c4f53 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -9,15 +9,11 @@
#include "repository.h"
#include "strbuf.h"
#include "trace2.h"
-#include "wrapper.h"
-
-static intmax_t count_fsync_writeout_only;
-static intmax_t count_fsync_hardware_flush;
#ifdef HAVE_RTLGENRANDOM
/* This is required to get access to RtlGenRandom. */
#define SystemFunction036 NTAPI SystemFunction036
-#include <NTSecAPI.h>
+#include <ntsecapi.h>
#undef SystemFunction036
#endif
@@ -552,7 +548,7 @@ int git_fsync(int fd, enum fsync_action action)
{
switch (action) {
case FSYNC_WRITEOUT_ONLY:
- count_fsync_writeout_only += 1;
+ trace2_counter_add(TRACE2_COUNTER_ID_FSYNC_WRITEOUT_ONLY, 1);
#ifdef __APPLE__
/*
@@ -584,7 +580,7 @@ int git_fsync(int fd, enum fsync_action action)
return -1;
case FSYNC_HARDWARE_FLUSH:
- count_fsync_hardware_flush += 1;
+ trace2_counter_add(TRACE2_COUNTER_ID_FSYNC_HARDWARE_FLUSH, 1);
/*
* On macOS, a special fcntl is required to really flush the
@@ -601,18 +597,6 @@ int git_fsync(int fd, enum fsync_action action)
}
}
-static void log_trace_fsync_if(const char *key, intmax_t value)
-{
- if (value)
- trace2_data_intmax("fsync", the_repository, key, value);
-}
-
-void trace_git_fsync_stats(void)
-{
- log_trace_fsync_if("fsync/writeout-only", count_fsync_writeout_only);
- log_trace_fsync_if("fsync/hardware-flush", count_fsync_hardware_flush);
-}
-
static int warn_if_unremovable(const char *op, const char *file, int rc)
{
int err;
@@ -835,3 +819,13 @@ int csprng_bytes(void *buf, size_t len)
return 0;
#endif
}
+
+uint32_t git_rand(void)
+{
+ uint32_t result;
+
+ if (csprng_bytes(&result, sizeof(result)) < 0)
+ die(_("unable to get random bytes"));
+
+ return result;
+}
diff --git a/wrapper.h b/wrapper.h
index f0c7d0616d..79c7321bb3 100644
--- a/wrapper.h
+++ b/wrapper.h
@@ -1,6 +1,42 @@
#ifndef WRAPPER_H
#define WRAPPER_H
+char *xstrdup(const char *str);
+void *xmalloc(size_t size);
+void *xmallocz(size_t size);
+void *xmallocz_gently(size_t size);
+void *xmemdupz(const void *data, size_t len);
+char *xstrndup(const char *str, size_t len);
+void *xrealloc(void *ptr, size_t size);
+void *xcalloc(size_t nmemb, size_t size);
+void xsetenv(const char *name, const char *value, int overwrite);
+void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
+const char *mmap_os_err(void);
+void *xmmap_gently(void *start, size_t length, int prot, int flags, int fd, off_t offset);
+int xopen(const char *path, int flags, ...);
+ssize_t xread(int fd, void *buf, size_t len);
+ssize_t xwrite(int fd, const void *buf, size_t len);
+ssize_t xpread(int fd, void *buf, size_t len, off_t offset);
+int xdup(int fd);
+FILE *xfopen(const char *path, const char *mode);
+FILE *xfdopen(int fd, const char *mode);
+int xmkstemp(char *temp_filename);
+int xmkstemp_mode(char *temp_filename, int mode);
+char *xgetcwd(void);
+FILE *fopen_for_writing(const char *path);
+FILE *fopen_or_warn(const char *path, const char *mode);
+
+/*
+ * Like strncmp, but only return zero if s is NUL-terminated and exactly len
+ * characters long. If it is not, consider it greater than t.
+ */
+int xstrncmpz(const char *s, const char *t, size_t len);
+
+__attribute__((format (printf, 3, 4)))
+int xsnprintf(char *dst, size_t max, const char *fmt, ...);
+
+int xgethostname(char *buf, size_t len);
+
/* set default permissions by passing mode arguments to open(2) */
int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
int git_mkstemp_mode(char *pattern, int mode);
@@ -33,4 +69,80 @@ void write_file(const char *path, const char *fmt, ...);
/* Return 1 if the file is empty or does not exists, 0 otherwise. */
int is_empty_or_missing_file(const char *filename);
+enum fsync_action {
+ FSYNC_WRITEOUT_ONLY,
+ FSYNC_HARDWARE_FLUSH
+};
+
+/*
+ * Issues an fsync against the specified file according to the specified mode.
+ *
+ * FSYNC_WRITEOUT_ONLY attempts to use interfaces available on some operating
+ * systems to flush the OS cache without issuing a flush command to the storage
+ * controller. If those interfaces are unavailable, the function fails with
+ * ENOSYS.
+ *
+ * FSYNC_HARDWARE_FLUSH does an OS writeout and hardware flush to ensure that
+ * changes are durable. It is not expected to fail.
+ */
+int git_fsync(int fd, enum fsync_action action);
+
+/*
+ * Preserves errno, prints a message, but gives no warning for ENOENT.
+ * Returns 0 on success, which includes trying to unlink an object that does
+ * not exist.
+ */
+int unlink_or_warn(const char *path);
+ /*
+ * Tries to unlink file. Returns 0 if unlink succeeded
+ * or the file already didn't exist. Returns -1 and
+ * appends a message to err suitable for
+ * 'error("%s", err->buf)' on error.
+ */
+int unlink_or_msg(const char *file, struct strbuf *err);
+/*
+ * Preserves errno, prints a message, but gives no warning for ENOENT.
+ * Returns 0 on success, which includes trying to remove a directory that does
+ * not exist.
+ */
+int rmdir_or_warn(const char *path);
+/*
+ * Calls the correct function out of {unlink,rmdir}_or_warn based on
+ * the supplied file mode.
+ */
+int remove_or_warn(unsigned int mode, const char *path);
+
+/*
+ * Call access(2), but warn for any error except "missing file"
+ * (ENOENT or ENOTDIR).
+ */
+#define ACCESS_EACCES_OK (1U << 0)
+int access_or_warn(const char *path, int mode, unsigned flag);
+int access_or_die(const char *path, int mode, unsigned flag);
+
+/* Warn on an inaccessible file if errno indicates this is an error */
+int warn_on_fopen_errors(const char *path);
+
+/*
+ * Open with O_NOFOLLOW, or equivalent. Note that the fallback equivalent
+ * may be racy. Do not use this as protection against an attacker who can
+ * simultaneously create paths.
+ */
+int open_nofollow(const char *path, int flags);
+
+void sleep_millisec(int millisec);
+
+/*
+ * Generate len bytes from the system cryptographically secure PRNG.
+ * Returns 0 on success and -1 on error, setting errno. The inability to
+ * satisfy the full request is an error.
+ */
+int csprng_bytes(void *buf, size_t len);
+
+/*
+ * Returns a random uint32_t, uniformly distributed across all possible
+ * values.
+ */
+uint32_t git_rand(void);
+
#endif /* WRAPPER_H */
diff --git a/write-or-die.c b/write-or-die.c
index cc9e0787a1..d8355c0c3e 100644
--- a/write-or-die.c
+++ b/write-or-die.c
@@ -1,7 +1,6 @@
#include "git-compat-util.h"
#include "config.h"
#include "run-command.h"
-#include "wrapper.h"
#include "write-or-die.h"
/*
diff --git a/wt-status.c b/wt-status.c
index 068b76ef6d..9f45bf6949 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "advice.h"
#include "wt-status.h"
#include "object.h"
@@ -7,8 +7,10 @@
#include "diff.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "object-name.h"
+#include "path.h"
#include "revision.h"
#include "diffcore.h"
#include "quote.h"
@@ -18,6 +20,7 @@
#include "refs.h"
#include "submodule.h"
#include "column.h"
+#include "read-cache.h"
#include "setup.h"
#include "strbuf.h"
#include "trace.h"
@@ -672,7 +675,7 @@ static void wt_status_collect_changes_index(struct wt_status *s)
rev.diffopt.flags.recursive = 1;
copy_pathspec(&rev.prune_data, &s->pathspec);
- run_diff_index(&rev, 1);
+ run_diff_index(&rev, DIFF_INDEX_CACHED);
release_revisions(&rev);
}
@@ -736,7 +739,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s)
ps.max_depth = -1;
strbuf_add(&base, ce->name, ce->ce_namelen);
- read_tree_at(istate->repo, tree, &base, &ps,
+ read_tree_at(istate->repo, tree, &base, 0, &ps,
add_file_to_list, s);
continue;
}
@@ -1024,7 +1027,7 @@ static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncom
if (s->display_comment_prefix) {
size_t len;
summary_content = strbuf_detach(&summary, &len);
- strbuf_add_commented_lines(&summary, summary_content, len);
+ strbuf_add_commented_lines(&summary, summary_content, len, comment_line_char);
free(summary_content);
}
@@ -1099,8 +1102,8 @@ void wt_status_append_cut_line(struct strbuf *buf)
{
const char *explanation = _("Do not modify or remove the line above.\nEverything below it will be ignored.");
- strbuf_commented_addf(buf, "%s", cut_line);
- strbuf_add_commented_lines(buf, explanation, strlen(explanation));
+ strbuf_commented_addf(buf, comment_line_char, "%s", cut_line);
+ strbuf_add_commented_lines(buf, explanation, strlen(explanation), comment_line_char);
}
void wt_status_add_cut_line(FILE *fp)
@@ -1153,7 +1156,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
rev.diffopt.a_prefix = "c/";
rev.diffopt.b_prefix = "i/";
} /* else use prefix as per user config */
- run_diff_index(&rev, 1);
+ run_diff_index(&rev, DIFF_INDEX_CACHED);
if (s->verbose > 1 &&
wt_status_check_worktree_changes(s, &dirty_submodules)) {
status_printf_ln(s, c,
@@ -1183,7 +1186,8 @@ static void wt_longstatus_print_tracking(struct wt_status *s)
t_begin = getnanotime();
- if (!format_tracking_info(branch, &sb, s->ahead_behind_flags))
+ if (!format_tracking_info(branch, &sb, s->ahead_behind_flags,
+ !s->commit_template))
return;
if (advice_enabled(ADVICE_STATUS_AHEAD_BEHIND_WARNING) &&
@@ -1790,10 +1794,10 @@ void wt_status_get_state(struct repository *r,
oidcpy(&state->revert_head_oid, &oid);
}
if (!sequencer_get_last_command(r, &action)) {
- if (action == REPLAY_PICK) {
+ if (action == REPLAY_PICK && !state->cherry_pick_in_progress) {
state->cherry_pick_in_progress = 1;
oidcpy(&state->cherry_pick_head_oid, null_oid());
- } else {
+ } else if (action == REPLAY_REVERT && !state->revert_in_progress) {
state->revert_in_progress = 1;
oidcpy(&state->revert_head_oid, null_oid());
}
@@ -2576,8 +2580,8 @@ int has_unstaged_changes(struct repository *r, int ignore_submodules)
}
rev_info.diffopt.flags.quick = 1;
diff_setup_done(&rev_info.diffopt);
- result = run_diff_files(&rev_info, 0);
- result = diff_result_code(&rev_info.diffopt, result);
+ run_diff_files(&rev_info, 0);
+ result = diff_result_code(&rev_info.diffopt);
release_revisions(&rev_info);
return result;
}
@@ -2610,8 +2614,8 @@ int has_uncommitted_changes(struct repository *r,
}
diff_setup_done(&rev_info.diffopt);
- result = run_diff_index(&rev_info, 1);
- result = diff_result_code(&rev_info.diffopt, result);
+ run_diff_index(&rev_info, DIFF_INDEX_CACHED);
+ result = diff_result_code(&rev_info.diffopt);
release_revisions(&rev_info);
return result;
}
@@ -2651,8 +2655,12 @@ int require_clean_work_tree(struct repository *r,
}
if (err) {
- if (hint)
+ if (hint) {
+ if (!*hint)
+ BUG("empty hint passed to require_clean_work_tree();"
+ " use NULL instead");
error("%s", hint);
+ }
if (!gently)
exit(128);
}
diff --git a/xdiff-interface.c b/xdiff-interface.c
index 0460e03f5e..adcea109fa 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -1,7 +1,8 @@
#include "git-compat-util.h"
#include "config.h"
#include "hex.h"
-#include "object-store.h"
+#include "object-store-ll.h"
+#include "strbuf.h"
#include "xdiff-interface.h"
#include "xdiff/xtypes.h"
#include "xdiff/xdiffi.h"
@@ -307,7 +308,8 @@ int xdiff_compare_lines(const char *l1, long s1,
int git_xmerge_style = -1;
-int git_xmerge_config(const char *var, const char *value, void *cb)
+int git_xmerge_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "merge.conflictstyle")) {
if (!value)
@@ -327,5 +329,5 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
value, var);
return 0;
}
- return git_default_config(var, value, cb);
+ return git_default_config(var, value, ctx, cb);
}
diff --git a/xdiff-interface.h b/xdiff-interface.h
index 733c364d26..e6f80df046 100644
--- a/xdiff-interface.h
+++ b/xdiff-interface.h
@@ -50,7 +50,9 @@ int buffer_is_binary(const char *ptr, unsigned long size);
void xdiff_set_find_func(xdemitconf_t *xecfg, const char *line, int cflags);
void xdiff_clear_find_func(xdemitconf_t *xecfg);
-int git_xmerge_config(const char *var, const char *value, void *cb);
+struct config_context;
+int git_xmerge_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb);
extern int git_xmerge_style;
/*