summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/CodingGuidelines3
-rw-r--r--Documentation/RelNotes/1.8.1.4.txt11
-rw-r--r--Documentation/RelNotes/1.8.1.5.txt47
-rw-r--r--Documentation/RelNotes/1.8.2.1.txt71
-rw-r--r--Documentation/RelNotes/1.8.2.txt88
-rw-r--r--Documentation/RelNotes/1.8.3.txt207
-rw-r--r--Documentation/config.txt21
-rw-r--r--Documentation/diff-options.txt4
-rw-r--r--Documentation/git-add.txt22
-rw-r--r--Documentation/git-commit.txt31
-rw-r--r--Documentation/git-count-objects.txt22
-rw-r--r--Documentation/git-describe.txt5
-rw-r--r--Documentation/git-difftool.txt8
-rw-r--r--Documentation/git-filter-branch.txt27
-rw-r--r--Documentation/git-merge.txt24
-rw-r--r--Documentation/git-pull.txt2
-rw-r--r--Documentation/git-push.txt31
-rw-r--r--Documentation/git-rm.txt4
-rw-r--r--Documentation/git-send-email.txt4
-rw-r--r--Documentation/git-sh-setup.txt6
-rw-r--r--Documentation/git-shell.txt82
-rw-r--r--Documentation/git-status.txt14
-rw-r--r--Documentation/git-submodule.txt23
-rw-r--r--Documentation/git-update-index.txt10
-rw-r--r--Documentation/git.txt48
-rw-r--r--Documentation/gitcli.txt9
-rw-r--r--Documentation/githooks.txt10
-rw-r--r--Documentation/merge-options.txt3
-rw-r--r--Documentation/pretty-formats.txt1
-rw-r--r--Documentation/revisions.txt8
-rw-r--r--Documentation/technical/index-format.txt6
-rw-r--r--Documentation/user-manual.txt518
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--Makefile49
l---------RelNotes2
-rw-r--r--advice.c2
-rw-r--r--advice.h1
-rw-r--r--archive-zip.c38
-rw-r--r--archive.c2
-rw-r--r--attr.c8
-rw-r--r--builtin/add.c6
-rw-r--r--builtin/branch.c27
-rw-r--r--builtin/cat-file.c2
-rw-r--r--builtin/check-ignore.c2
-rw-r--r--builtin/commit.c6
-rw-r--r--builtin/count-objects.c30
-rw-r--r--builtin/describe.c45
-rw-r--r--builtin/fast-export.c22
-rw-r--r--builtin/fetch-pack.c40
-rw-r--r--builtin/fmt-merge-msg.c2
-rw-r--r--builtin/grep.c4
-rw-r--r--builtin/index-pack.c9
-rw-r--r--builtin/log.c13
-rw-r--r--builtin/mailsplit.c23
-rw-r--r--builtin/merge-tree.c2
-rw-r--r--builtin/prune.c4
-rw-r--r--builtin/push.c2
-rw-r--r--builtin/reflog.c2
-rw-r--r--builtin/tag.c2
-rw-r--r--builtin/update-index.c2
-rw-r--r--builtin/verify-tag.c2
-rw-r--r--bundle.c16
-rw-r--r--cache.h32
-rw-r--r--combine-diff.c57
-rw-r--r--commit.c42
-rw-r--r--commit.h2
-rw-r--r--compat/msvc.h2
-rw-r--r--compat/strtok_r.c61
-rw-r--r--compat/vcbuild/include/sys/poll.h1
-rw-r--r--compat/vcbuild/include/unistd.h3
-rw-r--r--config.mak.in2
-rw-r--r--config.mak.uname6
-rw-r--r--configure.ac6
-rw-r--r--contrib/completion/git-completion.bash18
-rw-r--r--contrib/completion/git-completion.zsh9
-rw-r--r--contrib/completion/git-prompt.sh27
-rw-r--r--contrib/credential/gnome-keyring/git-credential-gnome-keyring.c2
-rw-r--r--contrib/credential/netrc/Makefile5
-rwxr-xr-xcontrib/credential/netrc/git-credential-netrc421
-rw-r--r--contrib/credential/netrc/test.netrc13
-rwxr-xr-xcontrib/credential/netrc/test.pl106
-rw-r--r--contrib/credential/osxkeychain/git-credential-osxkeychain.c2
-rw-r--r--contrib/credential/wincred/git-credential-wincred.c208
-rwxr-xr-xcontrib/examples/git-remote.perl10
-rwxr-xr-xcontrib/examples/git-svnimport.perl2
-rwxr-xr-xcontrib/fast-import/git-import.perl2
-rwxr-xr-xcontrib/fast-import/git-import.sh2
-rwxr-xr-xcontrib/fast-import/import-zips.py98
-rw-r--r--contrib/hooks/setgitperms.perl2
-rwxr-xr-xcontrib/mw-to-git/t/install-wiki.sh2
-rw-r--r--daemon.c4
-rw-r--r--date.c12
-rw-r--r--diff.c16
-rw-r--r--diffcore-rename.c1
-rw-r--r--entry.c2
-rw-r--r--environment.c8
-rw-r--r--fast-import.c16
-rw-r--r--fetch-pack.c101
-rw-r--r--fetch-pack.h11
-rwxr-xr-xgit-am.sh14
-rwxr-xr-xgit-archimport.perl2
-rw-r--r--git-compat-util.h19
-rwxr-xr-xgit-cvsexportcommit.perl2
-rwxr-xr-xgit-cvsimport.perl2
-rwxr-xr-xgit-cvsserver.perl2
-rwxr-xr-xgit-difftool.perl27
-rwxr-xr-xgit-merge-one-file.sh63
-rwxr-xr-xgit-p4.py29
-rwxr-xr-xgit-pull.sh2
-rwxr-xr-xgit-relink.perl2
-rwxr-xr-xgit-send-email.perl71
-rw-r--r--git-sh-setup.sh18
-rwxr-xr-xgit-submodule.sh108
-rwxr-xr-xgit-svn.perl6
-rw-r--r--git.c7
-rw-r--r--gitweb/README3
-rw-r--r--gpg-interface.c18
-rw-r--r--gpg-interface.h2
-rw-r--r--graph.c32
-rw-r--r--graph.h33
-rw-r--r--grep.c3
-rw-r--r--grep.h3
-rw-r--r--hash.h7
-rw-r--r--imap-send.c78
-rw-r--r--log-tree.c119
-rw-r--r--mergetools/p4merge8
-rw-r--r--name-hash.c6
-rw-r--r--object.c10
-rw-r--r--object.h13
-rw-r--r--pack-refs.c18
-rw-r--r--perl/Git.pm215
-rw-r--r--perl/Git/SVN.pm7
-rw-r--r--perl/Git/SVN/Ra.pm2
-rw-r--r--po/de.po1463
-rw-r--r--po/git.pot1370
-rw-r--r--po/sv.po1438
-rw-r--r--po/vi.po1515
-rw-r--r--po/zh_CN.po1446
-rw-r--r--pretty.c53
-rw-r--r--reachable.c4
-rw-r--r--read-cache.c2
-rw-r--r--refs.c210
-rw-r--r--refs.h2
-rw-r--r--remote.c140
-rw-r--r--remote.h4
-rw-r--r--revision.c32
-rw-r--r--revision.h2
-rw-r--r--run-command.c5
-rw-r--r--sequencer.c192
-rw-r--r--sequencer.h4
-rw-r--r--setup.c56
-rw-r--r--sha1_file.c107
-rw-r--r--sha1_name.c80
-rw-r--r--shell.c13
-rw-r--r--t/lib-git-svn.sh2
-rw-r--r--t/perf/README2
-rwxr-xr-xt/t0003-attributes.sh3
-rwxr-xr-xt/t0008-ignores.sh15
-rwxr-xr-xt/t0024-crlf-archive.sh6
-rwxr-xr-xt/t1504-ceiling-dirs.sh17
-rwxr-xr-xt/t1507-rev-parse-upstream.sh4
-rwxr-xr-xt/t1509/prepare-chroot.sh2
-rwxr-xr-xt/t1510-repo-setup.sh19
-rwxr-xr-xt/t2003-checkout-cache-mkdir.sh169
-rwxr-xr-xt/t2200-add-update.sh16
-rwxr-xr-xt/t3200-branch.sh501
-rwxr-xr-xt/t3211-peel-ref.sh64
-rwxr-xr-xt/t3400-rebase.sh3
-rwxr-xr-xt/t3404-rebase-interactive.sh3
-rwxr-xr-xt/t3511-cherry-pick-x.sh219
-rwxr-xr-xt/t4001-diff-rename.sh54
-rwxr-xr-xt/t4014-format-patch.sh289
-rwxr-xr-xt/t4018-diff-funcname.sh5
-rwxr-xr-xt/t4034-diff-words.sh7
-rwxr-xr-xt/t4038-diff-combined.sh111
-rwxr-xr-xt/t4202-log.sh28
-rwxr-xr-xt/t5003-archive-zip.sh12
-rwxr-xr-xt/t5004-archive-corner-cases.sh102
-rw-r--r--t/t5004/empty.zipbin0 -> 62 bytes
-rwxr-xr-xt/t5304-prune.sh26
-rwxr-xr-xt/t5500-fetch-pack.sh9
-rwxr-xr-xt/t5516-fetch-push.sh107
-rwxr-xr-xt/t5520-pull.sh18
-rwxr-xr-xt/t5521-pull-options.sh27
-rwxr-xr-xt/t5541-http-push.sh3
-rwxr-xr-xt/t6009-rev-list-parent.sh13
-rwxr-xr-xt/t6012-rev-list-simplify.sh26
-rwxr-xr-xt/t7004-tag.sh12
-rwxr-xr-xt/t7060-wtstatus.sh1
-rwxr-xr-xt/t7400-submodule-basic.sh100
-rwxr-xr-xt/t7406-submodule-update.sh3
-rwxr-xr-xt/t7500-commit.sh6
-rwxr-xr-xt/t7502-commit.sh92
-rwxr-xr-xt/t7508-status.sh47
-rwxr-xr-xt/t7512-status-help.sh3
-rwxr-xr-xt/t7600-merge.sh60
-rwxr-xr-xt/t7800-difftool.sh390
-rwxr-xr-xt/t7811-grep-open.sh5
-rwxr-xr-xt/t9500-gitweb-standalone-no-errors.sh3
-rwxr-xr-xt/t9808-git-p4-chdir.sh41
-rw-r--r--t/test-lib-functions.sh8
-rw-r--r--t/test-lib.sh6
-rwxr-xr-xtemplates/hooks--update.sample2
-rw-r--r--test-chmtime.c2
-rw-r--r--test-delta.c2
-rw-r--r--test-genrandom.c2
-rw-r--r--test-svn-fe.c2
-rw-r--r--transport.c14
-rw-r--r--transport.h1
-rw-r--r--upload-pack.c31
-rw-r--r--utf8.c59
-rw-r--r--utf8.h2
-rw-r--r--wt-status.c30
-rw-r--r--wt-status.h1
-rw-r--r--zlib.c25
215 files changed, 9620 insertions, 5352 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index b1bfff630f..7e4d5716a6 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -237,6 +237,9 @@ For Python scripts:
Writing Documentation:
+ Most (if not all) of the documentation pages are written in AsciiDoc
+ and processed into HTML output and manpages.
+
Every user-visible change should be reflected in the documentation.
The same general rule as for code applies -- imitate the existing
conventions. A few commented examples follow to provide reference
diff --git a/Documentation/RelNotes/1.8.1.4.txt b/Documentation/RelNotes/1.8.1.4.txt
new file mode 100644
index 0000000000..22af1d1643
--- /dev/null
+++ b/Documentation/RelNotes/1.8.1.4.txt
@@ -0,0 +1,11 @@
+Git 1.8.1.4 Release Notes
+=========================
+
+Fixes since v1.8.1.3
+--------------------
+
+ * "git imap-send" talking over imaps:// did make sure it received a
+ valid certificate from the other end, but did not check if the
+ certificate matched the host it thought it was talking to.
+
+Also contains various documentation fixes.
diff --git a/Documentation/RelNotes/1.8.1.5.txt b/Documentation/RelNotes/1.8.1.5.txt
new file mode 100644
index 0000000000..efa68aef22
--- /dev/null
+++ b/Documentation/RelNotes/1.8.1.5.txt
@@ -0,0 +1,47 @@
+Git 1.8.1.5 Release Notes
+=========================
+
+Fixes since v1.8.1.4
+--------------------
+
+ * Given a string with a multi-byte character that begins with '-' on
+ the command line where an option is expected, the option parser
+ used just one byte of the unknown letter when reporting an error.
+
+ * In v1.8.1, the attribute parser was tightened too restrictive to
+ error out upon seeing an entry that begins with an ! (exclamation),
+ which may confuse users to expect a "negative match", which does
+ not exist. This has been demoted to a warning; such an entry is
+ still ignored.
+
+ * "git apply --summary" has been taught to make sure the similarity
+ value shown in its output is sensible, even when the input had a
+ bogus value.
+
+ * "git clean" showed what it was going to do, but sometimes ended
+ up finding that it was not allowed to do so, which resulted in a
+ confusing output (e.g. after saying that it will remove an
+ untracked directory, it found an embedded git repository there
+ which it is not allowed to remove). It now performs the actions
+ and then reports the outcome more faithfully.
+
+ * "git clone" used to allow --bare and --separate-git-dir=$there
+ options at the same time, which was nonsensical.
+
+ * "git cvsimport" mishandled timestamps at DST boundary.
+
+ * We used to have an arbitrary 32 limit for combined diff input,
+ resulting in incorrect number of leading colons shown when showing
+ the "--raw --cc" output.
+
+ * The smart HTTP clients forgot to verify the content-type that comes
+ back from the server side to make sure that the request is being
+ handled properly.
+
+ * "git help remote-helpers" failed to find the documentation.
+
+ * "gitweb" pages served over HTTPS, when configured to show picon or
+ gravatar, referred to these external resources to be fetched via
+ HTTP, resulting in mixed contents warning in browsers.
+
+Also contains various documentation fixes.
diff --git a/Documentation/RelNotes/1.8.2.1.txt b/Documentation/RelNotes/1.8.2.1.txt
new file mode 100644
index 0000000000..b4cf3cccde
--- /dev/null
+++ b/Documentation/RelNotes/1.8.2.1.txt
@@ -0,0 +1,71 @@
+Git v1.8.2.1 Release Notes
+==========================
+
+Fixes since v1.8.2
+------------------
+
+ * "git submodule update", when recursed into sub-submodules, did not
+ acccumulate the prefix paths.
+
+ * "git am $maildir/" applied messages in an unexpected order; sort
+ filenames read from the maildir/ in a way that is more likely to
+ sort messages in the order the writing MUA meant to, by sorting
+ numeric segment in numeric order and non-numeric segment in
+ alphabetical order.
+
+ * When export-subst is used, "zip" output recorded incorrect
+ size of the file.
+
+ * Some platforms and users spell UTF-8 differently; retry with the
+ most official "UTF-8" when the system does not understand the
+ user-supplied encoding name that are the common alternative
+ spellings of UTF-8.
+
+ * "git branch" did not bother to check nonsense command line
+ parameters and issue errors in many cases.
+
+ * "git update-index -h" did not do the usual "-h(elp)" thing.
+
+ * perl/Git.pm::cat_blob slurped everything in core only to write it
+ out to a file descriptor, which was not a very smart thing to do.
+
+ * The SSL peer verification done by "git imap-send" did not ask for
+ Server Name Indication (RFC 4366), failing to connect SSL/TLS
+ sites that serve multiple hostnames on a single IP.
+
+ * "git index-pack" had a buffer-overflow while preparing an
+ informational message when the translated version of it was too
+ long.
+
+ * Clarify in the documentation "what" gets pushed to "where" when the
+ command line to "git push" does not say these explicitly.
+
+ * In "git reflog expire", REACHABLE bit was not cleared from the
+ correct objects.
+
+ * The "--color=<when>" argument to the commands in the diff family
+ was described poorly.
+
+ * The arguments given to pre-rebase hook were not documented.
+
+ * The v4 index format was not documented.
+
+ * The "--match=<pattern>" argument "git describe" takes uses glob
+ pattern but it wasn't obvious from the documentation.
+
+ * Some sources failed to compile on systems that lack NI_MAXHOST in
+ their system header (e.g. z/OS).
+
+ * Add an example use of "--env-filter" in "filter-branch"
+ documentation.
+
+ * "git bundle verify" did not say "records a complete history" for a
+ bundle that does not have any prerequisites.
+
+ * In the v1.8.0 era, we changed symbols that do not have to be global
+ to file scope static, but a few functions in graph.c were used by
+ CGit from sideways bypassing the entry points of the API the
+ in-tree users use.
+
+ * "git merge-tree" had a typo in the logic to detect d/f conflicts,
+ which caused it to segfault in some cases.
diff --git a/Documentation/RelNotes/1.8.2.txt b/Documentation/RelNotes/1.8.2.txt
index a5a1d4e23e..fc606ae116 100644
--- a/Documentation/RelNotes/1.8.2.txt
+++ b/Documentation/RelNotes/1.8.2.txt
@@ -1,27 +1,52 @@
Git v1.8.2 Release Notes
========================
-Backward compatibility notes
-----------------------------
-
-In the upcoming major release (tentatively called 1.8.2), we will
-change the behavior of the "git push" command.
-
-When "git push [$there]" does not say what to push, we have used the
-traditional "matching" semantics so far (all your branches were sent
-to the remote as long as there already are branches of the same name
-over there). We will use the "simple" semantics that pushes the
-current branch to the branch with the same name, only when the current
-branch is set to integrate with that remote branch. There is a user
-preference configuration variable "push.default" to change this.
+Backward compatibility notes (this release)
+-------------------------------------------
"git push $there tag v1.2.3" used to allow replacing a tag v1.2.3
that already exists in the repository $there, if the rewritten tag
-you are pushing points at a commit that is a decendant of a commit
+you are pushing points at a commit that is a descendant of a commit
that the old tag v1.2.3 points at. This was found to be error prone
and starting with this release, any attempt to update an existing
ref under refs/tags/ hierarchy will fail, without "--force".
+When "git add -u" and "git add -A" that does not specify what paths
+to add on the command line is run from inside a subdirectory, the
+scope of the operation has always been limited to the subdirectory.
+Many users found this counter-intuitive, given that "git commit -a"
+and other commands operate on the entire tree regardless of where you
+are. In this release, these commands give a warning message that
+suggests the users to use "git add -u/-A ." when they want to limit
+the scope to the current directory; doing so will squelch the message,
+while training their fingers.
+
+
+Backward compatibility notes (for Git 2.0)
+------------------------------------------
+
+When "git push [$there]" does not say what to push, we have used the
+traditional "matching" semantics so far (all your branches were sent
+to the remote as long as there already are branches of the same name
+over there). In Git 2.0, the default will change to the "simple"
+semantics that pushes the current branch to the branch with the same
+name, only when the current branch is set to integrate with that
+remote branch. There is a user preference configuration variable
+"push.default" to change this. If you are an old-timer who is used
+to the "matching" semantics, you can set it to "matching" to keep the
+traditional behaviour. If you want to live in the future early,
+you can set it to "simple" today without waiting for Git 2.0.
+
+When "git add -u" and "git add -A", that does not specify what paths
+to add on the command line is run from inside a subdirectory, these
+commands will operate on the entire tree in Git 2.0 for consistency
+with "git commit -a" and other commands. Because there will be no
+mechanism to make "git add -u" behave as if "git add -u .", it is
+important for those who are used to "git add -u" (without pathspec)
+updating the index only for paths in the current subdirectory to start
+training their fingers to explicitly say "git add -u ." when they mean
+it before Git 2.0 comes.
+
Updates since v1.8.1
--------------------
@@ -113,7 +138,7 @@ UI, Workflows & Features
string "v$count-" to the names of its output files, and also
automatically sets the subject prefix to "PATCH v$count". This
allows patches from rerolled series to be stored under different
- names and makes it easier to reuse cover letter messsages.
+ names and makes it easier to reuse cover letter messages.
* "git log" and friends can be told with --use-mailmap option to
rewrite the names and email addresses of people using the mailmap
@@ -283,7 +308,6 @@ details).
* The smart HTTP clients forgot to verify the content-type that comes
back from the server side to make sure that the request is being
handled properly.
- (merge 3443db5 sp/smart-http-content-type-check later to maint).
* "git am" did not parse datestamp correctly from Hg generated patch,
when it is run in a locale outside C (or en).
@@ -294,7 +318,6 @@ details).
* "git apply --summary" has been taught to make sure the similarity
value shown in its output is sensible, even when the input had a
bogus value.
- (merge afcb6ac jk/apply-similaritly-parsing later to maint).
* A tar archive created by "git archive" recorded a directory in a
way that made NetBSD's implementation of "tar" sometimes unhappy.
@@ -315,19 +338,16 @@ details).
untracked directory, it found an embedded git repository there
which it is not allowed to remove). It now performs the actions
and then reports the outcome more faithfully.
- (merge f538a91 zk/clean-report-failure later to maint).
* When "git clone --separate-git-dir=$over_there" is interrupted, it
failed to remove the real location of the $GIT_DIR it created.
This was most visible when interrupting a submodule update.
* "git cvsimport" mishandled timestamps at DST boundary.
- (merge 48c9162 bw/get-tz-offset-perl later to maint).
* We used to have an arbitrary 32 limit for combined diff input,
resulting in incorrect number of leading colons shown when showing
the "--raw --cc" output.
- (merge edbc00e jc/combine-diff-many-parents later to maint).
* "git fetch --depth" was broken in at least three ways. The
resulting history was deeper than specified by one commit, it was
@@ -337,7 +357,6 @@ details).
* "git log --all -p" that walked refs/notes/textconv/ ref can later
try to use the textconv data incorrectly after it gets freed.
- (merge be5c9fb jk/read-commit-buffer-data-after-free later to maint).
* We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.
@@ -362,7 +381,6 @@ details).
* "git clone" used to allow --bare and --separate-git-dir=$there
options at the same time, which was nonsensical.
- (merge 95b63f1 nd/clone-no-separate-git-dir-with-bare later to maint).
* "git rebase --preserve-merges" lost empty merges in recent versions
of Git.
@@ -397,7 +415,6 @@ details).
* "gitweb" pages served over HTTPS, when configured to show picon or
gravatar, referred to these external resources to be fetched via
HTTP, resulting in mixed contents warning in browsers.
- (merge 5748558 ab/gitweb-use-same-scheme later to maint).
* When a line to be wrapped has a solid run of non space characters
whose length exactly is the wrap width, "git shortlog -w" failed
@@ -415,7 +432,7 @@ details).
* "git push" was taught to refuse updating the branch that is
currently checked out long time ago, but the user manual was left
stale.
- (merge d9be248 wk/man-deny-current-branch-is-default-these-days later to maint).
+ (merge 50995ed wk/man-deny-current-branch-is-default-these-days later to maint).
* Some shells do not behave correctly when IFS is unset; work it
around by explicitly setting it to the default value.
@@ -434,7 +451,11 @@ details).
* The autoconf subsystem passed --mandir down to generated
config.mak.autogen but forgot to do the same for --htmldir.
- (merge fc1c541 ct/autoconf-htmldir later to maint).
+ (merge 55d9bf0 ct/autoconf-htmldir later to maint).
+
+ * A change made on v1.8.1.x maintenance track had a nasty regression
+ to break the build when autoconf is used.
+ (merge 7f1b697 jn/less-reconfigure later to maint).
* We have been carrying a translated and long-unmaintained copy of an
old version of the tutorial; removed.
@@ -455,3 +476,20 @@ details).
* Scripts to test bash completion was inherently flaky as it was
affected by whatever random things the user may have on $PATH.
+
+ * An element on GIT_CEILING_DIRECTORIES could be a "logical" pathname
+ that uses a symbolic link to point at somewhere else (e.g. /home/me
+ that points at /net/host/export/home/me, and the latter directory
+ is automounted). Earlier when Git saw such a pathname e.g. /home/me
+ on this environment variable, the "ceiling" mechanism did not take
+ effect. With this release (the fix has also been merged to the
+ v1.8.1.x maintenance series), elements on GIT_CEILING_DIRECTORIES
+ are by default checked for such aliasing coming from symbolic
+ links. As this needs to actually resolve symbolic links for each
+ element on the GIT_CEILING_DIRECTORIES, you can disable this
+ mechanism for some elements by listing them after an empty element
+ on the GIT_CEILING_DIRECTORIES. e.g. Setting /home/me::/home/him to
+ GIT_CEILING_DIRECTORIES makes Git resolve symbolic links in
+ /home/me when checking if the current directory is under /home/me,
+ but does not do so for /home/him.
+ (merge 7ec30aa mh/maint-ceil-absolute later to maint).
diff --git a/Documentation/RelNotes/1.8.3.txt b/Documentation/RelNotes/1.8.3.txt
new file mode 100644
index 0000000000..b027992d82
--- /dev/null
+++ b/Documentation/RelNotes/1.8.3.txt
@@ -0,0 +1,207 @@
+Git v1.8.3 Release Notes
+========================
+
+Backward compatibility notes (for Git 2.0)
+------------------------------------------
+
+When "git push [$there]" does not say what to push, we have used the
+traditional "matching" semantics so far (all your branches were sent
+to the remote as long as there already are branches of the same name
+over there). In Git 2.0, the default will change to the "simple"
+semantics that pushes the current branch to the branch with the same
+name, only when the current branch is set to integrate with that
+remote branch. There is a user preference configuration variable
+"push.default" to change this. If you are an old-timer who is used
+to the "matching" semantics, you can set it to "matching" to keep the
+traditional behaviour. If you want to live in the future early,
+you can set it to "simple" today without waiting for Git 2.0.
+
+When "git add -u" and "git add -A", that does not specify what paths
+to add on the command line is run from inside a subdirectory, these
+commands will operate on the entire tree in Git 2.0 for consistency
+with "git commit -a" and other commands. Because there will be no
+mechanism to make "git add -u" behave as if "git add -u .", it is
+important for those who are used to "git add -u" (without pathspec)
+updating the index only for paths in the current subdirectory to start
+training their fingers to explicitly say "git add -u ." when they mean
+it before Git 2.0 comes.
+
+
+Updates since v1.8.2
+--------------------
+
+UI, Workflows & Features
+
+ * When the interactive access to git-shell is not enabled, it issues
+ a message meant to help the system admininstrator to enable it.
+ An explicit way to help the end users who connect to the service by
+ issuing custom messages to refuse such an access has been added.
+
+ * "git status" suggests users to look into using--untracked=no option
+ when it takes too long.
+
+ * "git fetch" learned to fetch a commit at the tip of an unadvertised
+ ref by specifying a raw object name from the command line when the
+ server side supports this feature.
+
+ * "git count-objects -v" learned to report leftover temporary
+ packfiles and other garbage in the object store.
+
+ * A new read-only credential helper (in contrib/) to interact with
+ the .netrc/.authinfo files has been added.
+
+ * "git send-email" can be used with the credential helper system.
+
+ * There was no Porcelain way to say "I no longer am interested in
+ this submodule", once you express your interest in a submodule with
+ "submodule init". "submodule deinit" is the way to do so.
+
+ * "git pull --rebase" learned to pass "-v/-q" options to underlying
+ "git rebase".
+
+ * The new "--follow-tags" option tells "git push" to push relevant
+ annotated tags when pushing branches out.
+
+ * "git mergetool" now feeds files to the "p4merge" backend in the
+ order that matches the p4 convention, where "theirs" is usually
+ shown on the left side, which is the opposite from other backend
+ expects.
+
+
+Performance, Internal Implementation, etc.
+
+ * Updates for building under msvc.
+
+ * A few codepaths knew how much data they need to put in the
+ hashtables they use upfront, but still started from a small table
+ repeatedly growing and rehashing.
+
+ * The API to walk reflog entries from the latest to older, which was
+ necessary for operations such as "git checkout -", was cumbersome
+ to use correctly and also inefficient.
+
+
+Also contains minor documentation updates and code clean-ups.
+
+
+Fixes since v1.8.2
+------------------
+
+Unless otherwise noted, all the fixes since v1.8.2 in the maintenance
+track are contained in this release (see release notes to them for
+details).
+
+ * Annotated tags outside refs/tags/ hierarchy were not advertised
+ correctly to the ls-remote and fetch with recent version of Git.
+ (merge c29c46f jk/fully-peeled-packed-ref later to maint).
+
+ * Recent optimization broke shallow clones.
+ (merge f59de5d jk/peel-ref later to maint).
+
+ * "git cmd -- ':(top'" was not diagnosed as an invalid syntax, and
+ instead the parser kept reading beyond the end of the string.
+ (merge f612a67 lf/setup-prefix-pathspec later to maint).
+
+ * "git tag -f <tag>" always said "Updated tag '<tag>'" even when
+ creating a new tag (i.e. not overwriting nor updating).
+ (merge 3ae851e ph/tag-force-no-warn-on-creation later to maint).
+
+ * "git p4" did not behave well when the path to the root of the P4
+ client was not its real path.
+ (merge bbd8486 pw/p4-symlinked-root later to maint).
+
+ * "git archive" reports a failure when asked to create an archive out
+ of an empty tree. It would be more intuitive to give an empty
+ archive back in such a case.
+ (merge bd54cf1 jk/empty-archive later to maint).
+
+ * When "format-patch" quoted a non-ascii strings on the header files,
+ it incorrectly applied rfc2047 and chopped a single character in
+ the middle of it.
+ (merge 6cd3c05 ks/rfc2047-one-char-at-a-time later to maint).
+
+ * An aliased command spawned from a bare repository that does not say
+ it is bare with "core.bare = yes" is treated as non-bare by mistake.
+ (merge 2cd83d1 jk/alias-in-bare later to maint).
+
+ * In "git reflog expire", REACHABLE bit was not cleared from the
+ correct objects.
+
+ * The logic used by "git diff -M --stat" to shorten the names of
+ files before and after a rename did not work correctly when the
+ common prefix and suffix between the two filenames overlapped.
+ (merge b174eb4 ap/maint-diff-rename-avoid-overlap later to maint).
+
+ * The "--match=<pattern>" option of "git describe", when used with
+ "--all" to allow refs that are not annotated tags to be used as a
+ base of description, did not restrict the output from the command
+ to those that match the given pattern.
+ (merge 46e1d6e jc/describe later to maint).
+
+ * Clarify in the documentation "what" gets pushed to "where" when the
+ command line to "git push" does not say these explicitly.
+
+ * The "--color=<when>" argument to the commands in the diff family
+ was described poorly.
+
+ * The arguments given to pre-rebase hook were not documented.
+
+ * The v4 index format was not documented.
+
+ * The "--match=<pattern>" argument "git describe" takes uses glob
+ pattern but it wasn't obvious from the documentation.
+
+ * Some sources failed to compile on systems that lack NI_MAXHOST in
+ their system header (e.g. z/OS).
+
+ * Add an example use of "--env-filter" in "filter-branch"
+ documentation.
+
+ * "git bundle verify" did not say "records a complete history" for a
+ bundle that does not have any prerequisites.
+
+ * In the v1.8.0 era, we changed symbols that do not have to be global
+ to file scope static, but a few functions in graph.c were used by
+ CGit from sideways bypassing the entry points of the API the
+ in-tree users use.
+
+ * "git update-index -h" did not do the usual "-h(elp)" thing.
+
+ * "git index-pack" had a buffer-overflow while preparing an
+ informational message when the translated version of it was too
+ long.
+
+ * 'git commit -m "$msg"' used to add an extra newline even when
+ $msg already ended with one.
+ (merge 46fbf75 bc/commit-complete-lines-given-via-m-option later to maint).
+
+ * The SSL peer verification done by "git imap-send" did not ask for
+ Server Name Indication (RFC 4366), failing to connect SSL/TLS
+ sites that serve multiple hostnames on a single IP.
+
+ * perl/Git.pm::cat_blob slurped everything in core only to write it
+ out to a file descriptor, which was not a very smart thing to do.
+
+ * "git branch" did not bother to check nonsense command line
+ parameters and issue errors in many cases.
+
+ * Verification of signed tags were not done correctly when not in C
+ or en/US locale.
+ (merge 0174eea mg/gpg-interface-using-status later to maint).
+
+ * Some platforms and users spell UTF-8 differently; retry with the
+ most official "UTF-8" when the system does not understand the
+ user-supplied encoding name that are the common alternative
+ spellings of UTF-8.
+
+ * When export-subst is used, "zip" output recorded incorrect
+ size of the file.
+
+ * "git am $maildir/" applied messages in an unexpected order; sort
+ filenames read from the maildir/ in a way that is more likely to
+ sort messages in the order the writing MUA meant to, by sorting
+ numeric segment in numeric order and non-numeric segment in
+ alphabetical order.
+
+ * "git submodule update", when recursed into sub-submodules, did not
+ acccumulate the prefix paths.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 481736a471..f79184c0a8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -178,11 +178,15 @@ advice.*::
the template shown when writing commit messages in
linkgit:git-commit[1], and in the help message shown
by linkgit:git-checkout[1] when switching branch.
+ statusUoption::
+ Advise to consider using the `-u` option to linkgit:git-status[1]
+ when the command takes more than 2 seconds to enumerate untracked
+ files.
commitBeforeMerge::
Advice shown when linkgit:git-merge[1] refuses to
merge to avoid overwriting local changes.
resolveConflict::
- Advices shown by various commands when conflicts
+ Advice shown by various commands when conflicts
prevent the operation from being performed.
implicitIdentity::
Advice on how to set your identity configuration when
@@ -443,7 +447,7 @@ core.sharedRepository::
core.warnAmbiguousRefs::
If true, Git will warn you if the ref name you passed it is ambiguous
- and might match multiple refs in the .git/refs/ tree. True by default.
+ and might match multiple refs in the repository. True by default.
core.compression::
An integer -1..9, indicating a default compression level.
@@ -551,7 +555,7 @@ core.commentchar::
(default '#').
sequence.editor::
- Text editor used by `git rebase -i` for editing the rebase insn file.
+ Text editor used by `git rebase -i` for editing the rebase instruction file.
The value is meant to be interpreted by the shell when it is used.
It can be overridden by the `GIT_SEQUENCE_EDITOR` environment variable.
When not configured the default commit message editor is used instead.
@@ -1811,7 +1815,8 @@ push.default::
+
This is currently the default, but Git 2.0 will change the default
to `simple`.
-* `upstream` - push the current branch to its upstream branch.
+* `upstream` - push the current branch to its upstream branch
+ (`tracking` is a deprecated synonym for this).
With this, `git push` will update the same remote ref as the one which
is merged by `git pull`, making `push` and `pull` symmetrical.
See "branch.<name>.merge" for how to configure the upstream branch.
@@ -2118,7 +2123,13 @@ uploadpack.hiderefs::
are under the hierarchies listed on the value of this
variable is excluded, and is hidden from `git ls-remote`,
`git fetch`, etc. An attempt to fetch a hidden ref by `git
- fetch` will fail.
+ fetch` will fail. See also `uploadpack.allowtipsha1inwant`.
+
+uploadpack.allowtipsha1inwant::
+ When `uploadpack.hiderefs` is in effect, allow `upload-pack`
+ to accept a fetch request that asks for an object at the tip
+ of a hidden ref (by default, such a request is rejected).
+ see also `uploadpack.hiderefs`.
url.<base>.insteadOf::
Any URL that starts with this value will be rewritten to
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 869d965a3b..104579dc75 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -195,8 +195,8 @@ any of those replacements occurred.
--color[=<when>]::
Show colored diff.
- The value must be `always` (the default for `<when>`), `never`, or `auto`.
- The default value is `never`.
+ `--color` (i.e. without '=<when>') is the same as `--color=always`.
+ '<when>' can be one of `always`, `never`, or `auto`.
ifdef::git-diff[]
It can be changed by the `color.ui` and `color.diff`
configuration settings.
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 388a2254f9..b0944e57d5 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -100,12 +100,9 @@ apply to the index. See EDITING PATCHES below.
-u::
--update::
- Only match <pathspec> against already tracked files in
- the index rather than the working tree. That means that it
- will never stage new files, but that it will stage modified
- new contents of tracked files and that it will remove files
- from the index if the corresponding files in the working tree
- have been removed.
+ Update the index just where it already has an entry matching
+ <pathspec>. This removes as well as modifies index entries to
+ match the working tree, but adds no new files.
+
If no <pathspec> is given, the current version of Git defaults to
"."; in other words, update all tracked files in the current directory
@@ -114,10 +111,15 @@ of Git, hence the form without <pathspec> should not be used.
-A::
--all::
- Like `-u`, but match <pathspec> against files in the
- working tree in addition to the index. That means that it
- will find new files as well as staging modified content and
- removing files that are no longer in the working tree.
+ Update the index not only where the working tree has a file
+ matching <pathspec> but also where the index already has an
+ entry. This adds, modifies, and removes index entries to
+ match the working tree.
++
+If no <pathspec> is given, the current version of Git defaults to
+"."; in other words, update all files in the current directory
+and its subdirectories. This default will change in a future version
+of Git, hence the form without <pathspec> should not be used.
-N::
--intent-to-add::
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 0eb79ccdba..05f8297368 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -137,6 +137,8 @@ OPTIONS
-m <msg>::
--message=<msg>::
Use the given <msg> as the commit message.
+ If multiple `-m` options are given, their values are
+ concatenated as separate paragraphs.
-t <file>::
--template=<file>::
@@ -172,16 +174,25 @@ OPTIONS
linkgit:git-commit-tree[1].
--cleanup=<mode>::
- This option sets how the commit message is cleaned up.
- The '<mode>' can be one of 'verbatim', 'whitespace', 'strip',
- and 'default'. The 'default' mode will strip leading and
- trailing empty lines and #commentary from the commit message
- only if the message is to be edited. Otherwise only whitespace
- removed. The 'verbatim' mode does not change message at all,
- 'whitespace' removes just leading/trailing whitespace lines
- and 'strip' removes both whitespace and commentary. The default
- can be changed by the 'commit.cleanup' configuration variable
- (see linkgit:git-config[1]).
+ This option determines how the supplied commit message should be
+ cleaned up before committing. The '<mode>' can be `strip`,
+ `whitespace`, `verbatim`, or `default`.
++
+--
+strip::
+ Strip leading and trailing empty lines, trailing whitespace, and
+ #commentary and collapse consecutive empty lines.
+whitespace::
+ Same as `strip` except #commentary is not removed.
+verbatim::
+ Do not change the message at all.
+default::
+ Same as `strip` if the message is to be edited.
+ Otherwise `whitespace`.
+--
++
+The default can be changed by the 'commit.cleanup' configuration
+variable (see linkgit:git-config[1]).
-e::
--edit::
diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt
index 23c80cea64..da6e72e696 100644
--- a/Documentation/git-count-objects.txt
+++ b/Documentation/git-count-objects.txt
@@ -20,11 +20,23 @@ OPTIONS
-------
-v::
--verbose::
- In addition to the number of loose objects and disk
- space consumed, it reports the number of in-pack
- objects, number of packs, disk space consumed by those packs,
- and number of objects that can be removed by running
- `git prune-packed`.
+ Report in more detail:
++
+count: the number of loose objects
++
+size: disk space consumed by loose objects, in KiB
++
+in-pack: the number of in-pack objects
++
+size-pack: disk space consumed by the packs, in KiB
++
+prune-packable: the number of loose objects that are also present in
+the packs. These objects could be pruned using `git prune-packed`.
++
+garbage: the number of files in object database that are not valid
+loose objects nor valid packs
++
+size-garbage: disk space consumed by garbage files, in KiB
GIT
---
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 32da244fd5..3c81e85ec5 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -81,8 +81,9 @@ OPTIONS
that points at object deadbee....).
--match <pattern>::
- Only consider tags matching the given pattern (can be used to avoid
- leaking private tags made from the repository).
+ Only consider tags matching the given `glob(7)` pattern,
+ excluding the "refs/tags/" prefix. This can be used to avoid
+ leaking private tags from the repository.
--always::
Show uniquely abbreviated commit object as fallback.
diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt
index e0e12e9470..8361e6e4e3 100644
--- a/Documentation/git-difftool.txt
+++ b/Documentation/git-difftool.txt
@@ -72,10 +72,12 @@ with custom merge tool commands and has the same value as `$MERGED`.
--symlinks::
--no-symlinks::
'git difftool''s default behavior is create symlinks to the
- working tree when run in `--dir-diff` mode.
+ working tree when run in `--dir-diff` mode and the right-hand
+ side of the comparison yields the same content as the file in
+ the working tree.
+
- Specifying `--no-symlinks` instructs 'git difftool' to create
- copies instead. `--no-symlinks` is the default on Windows.
+Specifying `--no-symlinks` instructs 'git difftool' to create copies
+instead. `--no-symlinks` is the default on Windows.
-x <command>::
--extcmd=<command>::
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index dfd12c94e4..e4c8e82660 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -64,8 +64,11 @@ argument is always evaluated in the shell context using the 'eval' command
Prior to that, the $GIT_COMMIT environment variable will be set to contain
the id of the commit being rewritten. Also, GIT_AUTHOR_NAME,
GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL,
-and GIT_COMMITTER_DATE are set according to the current commit. The values
-of these variables after the filters have run, are used for the new commit.
+and GIT_COMMITTER_DATE are taken from the current commit and exported to
+the environment, in order to affect the author and committer identities of
+the replacement commit created by linkgit:git-commit-tree[1] after the
+filters have run.
+
If any evaluation of <command> returns a non-zero exit status, the whole
operation will be aborted.
@@ -329,6 +332,26 @@ git filter-branch --msg-filter '
' HEAD~10..HEAD
--------------------------------------------------------
+The `--env-filter` option can be used to modify committer and/or author
+identity. For example, if you found out that your commits have the wrong
+identity due to a misconfigured user.email, you can make a correction,
+before publishing the project, like this:
+
+--------------------------------------------------------
+git filter-branch --env-filter '
+ if test "$GIT_AUTHOR_EMAIL" = "root@localhost"
+ then
+ GIT_AUTHOR_EMAIL=john@example.com
+ export GIT_AUTHOR_EMAIL
+ fi
+ if test "$GIT_COMMITTER_EMAIL" = "root@localhost"
+ then
+ GIT_COMMITTER_EMAIL=john@example.com
+ export GIT_COMMITTER_EMAIL
+ fi
+' -- --all
+--------------------------------------------------------
+
To restrict rewriting to only part of the history, specify a revision
range in addition to the new branch name. The new branch name will
point to the top-most revision that a 'git rev-list' of this range
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index c852a2677a..42391f2ae7 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -170,6 +170,30 @@ happens:
If you tried a merge which resulted in complex conflicts and
want to start over, you can recover with `git merge --abort`.
+MERGING TAG
+-----------
+
+When merging an annotated (and possibly signed) tag, Git always
+creates a merge commit even if a fast-forward merge is possible, and
+the commit message template is prepared with the tag message.
+Additionally, if the tag is signed, the signature check is reported
+as a comment in the message template. See also linkgit:git-tag[1].
+
+When you want to just integrate with the work leading to the commit
+that happens to be tagged, e.g. synchronizing with an upstream
+release point, you may not want to make an unnecessary merge commit.
+
+In such a case, you can "unwrap" the tag yourself before feeding it
+to `git merge`, or pass `--ff-only` when you do not have any work on
+your own. e.g.
+
+---
+git fetch origin
+git merge v1.2.3^0
+git merge --ff-only v1.2.3
+---
+
+
HOW CONFLICTS ARE PRESENTED
---------------------------
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index c975743230..24ab07a3f8 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -218,7 +218,7 @@ $ git merge origin/next
------------------------------------------------
-If you tried a pull which resulted in a complex conflicts and
+If you tried a pull which resulted in complex conflicts and
would want to start over, you can recover with 'git reset'.
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 13980257ee..eb2883c94c 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects
SYNOPSIS
--------
[verse]
-'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
+'git push' [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
[<repository> [<refspec>...]]
@@ -23,6 +23,17 @@ You can make interesting things happen to a repository
every time you push into it, by setting up 'hooks' there. See
documentation for linkgit:git-receive-pack[1].
+When the command line does not specify where to push with the
+`<repository>` argument, `branch.*.remote` configuration for the
+current branch is consulted to determine where to push. If the
+configuration is missing, it defaults to 'origin'.
+
+When the command line does not specify what to push with `<refspec>...`
+arguments or `--all`, `--mirror`, `--tags` options, the command finds
+the default `<refspec>` by consulting `remote.*.push` configuration,
+and if it is not found, honors `push.default` configuration to decide
+what to push (See gitlink:git-config[1] for the meaning of `push.default`).
+
OPTIONS[[OPTIONS]]
------------------
@@ -33,13 +44,10 @@ OPTIONS[[OPTIONS]]
of a remote (see the section <<REMOTES,REMOTES>> below).
<refspec>...::
+ Specify what destination ref to update with what source object.
The format of a <refspec> parameter is an optional plus
- `+`, followed by the source ref <src>, followed
+ `+`, followed by the source object <src>, followed
by a colon `:`, followed by the destination ref <dst>.
- It is used to specify with what <src> object the <dst> ref
- in the remote repository is to be updated. If not specified,
- the behavior of the command is controlled by the `push.default`
- configuration variable.
+
The <src> is often the name of the branch you would want to push, but
it can be any arbitrary "SHA-1 expression", such as `master~4` or
@@ -66,10 +74,7 @@ the remote repository.
The special refspec `:` (or `+:` to allow non-fast-forward updates)
directs Git to push "matching" branches: for every branch that exists on
the local side, the remote side is updated if a branch of the same name
-already exists on the remote side. This is the default operation mode
-if no explicit refspec is found (that is neither on the command line
-nor in any Push line of the corresponding remotes file---see below) and
-no `push.default` configuration variable is set.
+already exists on the remote side.
--all::
Instead of naming each ref to push, specifies that all
@@ -112,6 +117,12 @@ no `push.default` configuration variable is set.
addition to refspecs explicitly listed on the command
line.
+--follow-tags::
+ Push all the refs that would be pushed without this option,
+ and also push annotated tags in `refs/tags` that are missing
+ from the remote but are pointing at committish that are
+ reachable from the refs being pushed.
+
--receive-pack=<git-receive-pack>::
--exec=<git-receive-pack>::
Path to the 'git-receive-pack' program on the remote
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index 92bac27e05..1d876c2619 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -149,6 +149,10 @@ files that aren't ignored are present in the submodules work tree.
Ignored files are deemed expendable and won't stop a submodule's work
tree from being removed.
+If you only want to remove the local checkout of a submodule from your
+work tree without committing the removal,
+use linkgit:git-submodule[1] `deinit` instead.
+
EXAMPLES
--------
`git rm Documentation/\*.txt`::
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 44a1f7c4e8..0cffef8aa5 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -164,8 +164,8 @@ Sending
Furthermore, passwords need not be specified in configuration files
or on the command line. If a username has been specified (with
'--smtp-user' or a 'sendemail.smtpuser'), but no password has been
-specified (with '--smtp-pass' or 'sendemail.smtppass'), then the
-user is prompted for a password while the input is masked for privacy.
+specified (with '--smtp-pass' or 'sendemail.smtppass'), then
+a password is obtained using 'git-credential'.
--smtp-server=<host>::
If set, specifies the outgoing SMTP server to use (e.g.
diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt
index 6a9f66d1d9..5d709d02c3 100644
--- a/Documentation/git-sh-setup.txt
+++ b/Documentation/git-sh-setup.txt
@@ -82,6 +82,12 @@ get_author_ident_from_commit::
outputs code for use with eval to set the GIT_AUTHOR_NAME,
GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit.
+create_virtual_base::
+ modifies the first file so only lines in common with the
+ second file remain. If there is insufficient common material,
+ then the first file is left empty. The result is suitable
+ as a virtual base input for a 3-way merge.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt
index 9b9250600f..c35051ba58 100644
--- a/Documentation/git-shell.txt
+++ b/Documentation/git-shell.txt
@@ -9,25 +9,81 @@ git-shell - Restricted login shell for Git-only SSH access
SYNOPSIS
--------
[verse]
-'git shell' [-c <command> <argument>]
+'chsh' -s $(command -v git-shell) <user>
+'git clone' <user>`@localhost:/path/to/repo.git`
+'ssh' <user>`@localhost`
DESCRIPTION
-----------
-A login shell for SSH accounts to provide restricted Git access. When
-'-c' is given, the program executes <command> non-interactively;
-<command> can be one of 'git receive-pack', 'git upload-pack', 'git
-upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell
-is started in interactive mode when no arguments are given; in this
-case, COMMAND_DIR must exist, and any of the executables in it can be
-invoked.
+This is a login shell for SSH accounts to provide restricted Git access.
+It permits execution only of server-side Git commands implementing the
+pull/push functionality, plus custom commands present in a subdirectory
+named `git-shell-commands` in the user's home directory.
-'cvs server' is a special command which executes git-cvsserver.
+COMMANDS
+--------
+
+'git shell' accepts the following commands after the '-c' option:
+
+'git receive-pack <argument>'::
+'git upload-pack <argument>'::
+'git upload-archive <argument>'::
+ Call the corresponding server-side command to support
+ the client's 'git push', 'git fetch', or 'git archive --remote'
+ request.
+'cvs server'::
+ Imitate a CVS server. See linkgit:git-cvsserver[1].
+
+If a `~/git-shell-commands` directory is present, 'git shell' will
+also handle other, custom commands by running
+"`git-shell-commands/<command> <arguments>`" from the user's home
+directory.
+
+INTERACTIVE USE
+---------------
+
+By default, the commands above can be executed only with the '-c'
+option; the shell is not interactive.
-COMMAND_DIR is the path "$HOME/git-shell-commands". The user must have
-read and execute permissions to the directory in order to execute the
-programs in it. The programs are executed with a cwd of $HOME, and
-<argument> is parsed as a command-line string.
+If a `~/git-shell-commands` directory is present, 'git shell'
+can also be run interactively (with no arguments). If a `help`
+command is present in the `git-shell-commands` directory, it is
+run to provide the user with an overview of allowed actions. Then a
+"git> " prompt is presented at which one can enter any of the
+commands from the `git-shell-commands` directory, or `exit` to close
+the connection.
+
+Generally this mode is used as an administrative interface to allow
+users to list repositories they have access to, create, delete, or
+rename repositories, or change repository descriptions and
+permissions.
+
+If a `no-interactive-login` command exists, then it is run and the
+interactive shell is aborted.
+
+EXAMPLE
+-------
+
+To disable interactive logins, displaying a greeting instead:
++
+----------------
+$ chsh -s /usr/bin/git-shell
+$ mkdir $HOME/git-shell-commands
+$ cat >$HOME/git-shell-commands/no-interactive-login <<\EOF
+#!/bin/sh
+printf '%s\n' "Hi $USER! You've successfully authenticated, but I do not"
+printf '%s\n' "provide interactive shell access."
+exit 128
+EOF
+$ chmod +x $HOME/git-shell-commands/no-interactive-login
+----------------
+
+SEE ALSO
+--------
+ssh(1),
+linkgit:git-daemon[1],
+contrib/git-shell-commands/README
GIT
---
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 0412c4017d..9046df98a0 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -46,15 +46,21 @@ OPTIONS
Show untracked files.
+
The mode parameter is optional (defaults to 'all'), and is used to
-specify the handling of untracked files; when -u is not used, the
-default is 'normal', i.e. show untracked files and directories.
+specify the handling of untracked files.
+
The possible options are:
+
- - 'no' - Show no untracked files
- - 'normal' - Shows untracked files and directories
+ - 'no' - Show no untracked files.
+ - 'normal' - Shows untracked files and directories.
- 'all' - Also shows individual files in untracked directories.
+
+When `-u` option is not used, untracked files and directories are
+shown (i.e. the same as specifying `normal`), to help you avoid
+forgetting to add newly created files. Because it takes extra work
+to find untracked files in the filesystem, this mode may take some
+time in a large working tree. You can use `no` to have `git status`
+return more quickly without showing untracked files.
++
The default can be changed using the status.showUntrackedFiles
configuration variable documented in linkgit:git-config[1].
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index a0c9df85f4..74d5bdc59d 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -13,8 +13,10 @@ SYNOPSIS
[--reference <repository>] [--] <repository> [<path>]
'git submodule' [--quiet] status [--cached] [--recursive] [--] [<path>...]
'git submodule' [--quiet] init [--] [<path>...]
-'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch] [--rebase]
- [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
+'git submodule' [--quiet] deinit [-f|--force] [--] <path>...
+'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch]
+ [-f|--force] [--rebase] [--reference <repository>]
+ [--merge] [--recursive] [--] [<path>...]
'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
[commit] [--] [<path>...]
'git submodule' [--quiet] foreach [--recursive] <command>
@@ -134,6 +136,19 @@ init::
the explicit 'init' step if you do not intend to customize
any submodule locations.
+deinit::
+ Unregister the given submodules, i.e. remove the whole
+ `submodule.$name` section from .git/config together with their work
+ tree. Further calls to `git submodule update`, `git submodule foreach`
+ and `git submodule sync` will skip any unregistered submodules until
+ they are initialized again, so use this command if you don't want to
+ have a local checkout of the submodule in your work tree anymore. If
+ you really want to remove a submodule from the repository and commit
+ that use linkgit:git-rm[1] instead.
++
+If `--force` is specified, the submodule's work tree will be removed even if
+it contains local modifications.
+
update::
Update the registered submodules, i.e. clone missing submodules and
checkout the commit specified in the index of the containing repository.
@@ -213,8 +228,10 @@ OPTIONS
-f::
--force::
- This option is only valid for add and update commands.
+ This option is only valid for add, deinit and update commands.
When running add, allow adding an otherwise ignored submodule path.
+ When running deinit the submodule work trees will be removed even if
+ they contain local changes.
When running update, throw away local changes in submodules when
switching to a different commit; and always run a checkout operation
in the submodule, even if the commit listed in the index of the
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 77a912d4ea..c92775829b 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -145,7 +145,15 @@ you will need to handle the situation manually.
--index-version <n>::
Write the resulting index out in the named on-disk format version.
- The current default version is 2.
+ Supported versions are 2, 3 and 4. The current default version is 2
+ or 3, depending on whether extra features are used, such as
+ `git add -N`.
++
+Version 4 performs a simple pathname compression that reduces index
+size by 30%-50% on large repositories, which results in faster load
+time. Version 4 is relatively young (first released in in 1.8.0 in
+October 2012). Other Git implementations such as JGit and libgit2
+may not support it yet.
-z::
Only meaningful with `--stdin` or `--index-info`; paths are
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 0b681d9a14..4307d62bd4 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,16 @@ unreleased) version of Git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v1.8.1.3/git.html[documentation for release 1.8.1.3]
+* link:v1.8.2/git.html[documentation for release 1.8.2]
* release notes for
+ link:RelNotes/1.8.2.txt[1.8.2].
+
+* link:v1.8.1.5/git.html[documentation for release 1.8.1.5]
+
+* release notes for
+ link:RelNotes/1.8.1.5.txt[1.8.1.5],
+ link:RelNotes/1.8.1.4.txt[1.8.1.4],
link:RelNotes/1.8.1.3.txt[1.8.1.3],
link:RelNotes/1.8.1.2.txt[1.8.1.2],
link:RelNotes/1.8.1.1.txt[1.8.1.1],
@@ -535,10 +542,9 @@ include::cmds-purehelpers.txt[]
Configuration Mechanism
-----------------------
-Starting from 0.99.9 (actually mid 0.99.8.GIT), `.git/config` file
-is used to hold per-repository configuration options. It is a
-simple text file modeled after `.ini` format familiar to some
-people. Here is an example:
+Git uses a simple text format to store customizations that are per
+repository and are per user. Such a configuration file may look
+like this:
------------
#
@@ -553,13 +559,13 @@ people. Here is an example:
; user identity
[user]
name = "Junio C Hamano"
- email = "junkio@twinsun.com"
+ email = "gitster@pobox.com"
------------
Various commands read from the configuration file and adjust
their operation accordingly. See linkgit:git-config[1] for a
-list.
+list and more details about the configuration mechanism.
Identifier Terminology
@@ -678,12 +684,19 @@ Git so take care if using Cogito etc.
The '--namespace' command-line option also sets this value.
'GIT_CEILING_DIRECTORIES'::
- This should be a colon-separated list of absolute paths.
- If set, it is a list of directories that Git should not chdir
- up into while looking for a repository directory.
- It will not exclude the current working directory or
- a GIT_DIR set on the command line or in the environment.
- (Useful for excluding slow-loading network directories.)
+ This should be a colon-separated list of absolute paths. If
+ set, it is a list of directories that Git should not chdir up
+ into while looking for a repository directory (useful for
+ excluding slow-loading network directories). It will not
+ exclude the current working directory or a GIT_DIR set on the
+ command line or in the environment. Normally, Git has to read
+ the entries in this list and resolve any symlink that
+ might be present in order to compare them with the current
+ directory. However, if even this access is slow, you
+ can add an empty entry to the list to tell Git that the
+ subsequent entries are not symlinks and needn't be resolved;
+ e.g.,
+ 'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
When run in a directory that does not have ".git" repository
@@ -761,9 +774,12 @@ other
If this environment variable is set then 'git fetch'
and 'git push' will use this command instead
of 'ssh' when they need to connect to a remote system.
- The '$GIT_SSH' command will be given exactly two arguments:
- the 'username@host' (or just 'host') from the URL and the
- shell command to execute on that remote system.
+ The '$GIT_SSH' command will be given exactly two or
+ four arguments: the 'username@host' (or just 'host')
+ from the URL and the shell command to execute on that
+ remote system, optionally preceded by '-p' (literally) and
+ the 'port' from the URL when it specifies something other
+ than the default SSH port.
+
To pass options to the program that you want to list in GIT_SSH
you will need to wrap the program and options into a shell script,
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index dc9e617a10..9ac5088acd 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -107,13 +107,14 @@ couple of magic command line options:
---------------------------------------------
$ git describe -h
usage: git describe [options] <committish>*
+ or: git describe [options] --dirty
--contains find the tag that comes after the commit
--debug debug search strategy on stderr
- --all use any ref in .git/refs
- --tags use any tag in .git/refs/tags
- --abbrev [<n>] use <n> digits to display SHA-1s
- --candidates <n> consider <n> most recent tags (default: 10)
+ --all use any ref
+ --tags use any tag, even unannotated
+ --long always use long format
+ --abbrev[=<n>] use <n> digits to display SHA-1s
---------------------------------------------
--help-all::
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 8181e4ed2a..dc6693fe48 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -140,9 +140,11 @@ the outcome of 'git commit'.
pre-rebase
~~~~~~~~~~
-This hook is called by 'git rebase' and can be used to prevent a branch
-from getting rebased.
-
+This hook is called by 'git rebase' and can be used to prevent a
+branch from getting rebased. The hook may be called with one or
+two parameters. The first parameter is the upstream from which
+the series was forked. The second parameter is the branch being
+rebased, and is not set when rebasing the current branch.
post-checkout
~~~~~~~~~~~~~
@@ -365,7 +367,7 @@ preceding SP is also omitted. Currently, no commands pass any
'extra-info'.
The hook always runs after the automatic note copying (see
-"notes.rewrite.<command>" in linkgit:git-config.txt) has happened, and
+"notes.rewrite.<command>" in linkgit:git-config.txt[1]) has happened, and
thus has access to these notes.
The following command-specific comments apply:
diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 0bcbe0ac3c..34a8445828 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -30,7 +30,8 @@ set to `no` at the beginning of them.
--no-ff::
Create a merge commit even when the merge resolves as a
- fast-forward.
+ fast-forward. This is the default behaviour when merging an
+ annotated (and possibly signed) tag.
--ff-only::
Refuse to merge and exit with a non-zero status unless the
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 105f18a6f9..293965524e 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -133,6 +133,7 @@ The placeholders are:
- '%GG': raw verification message from GPG for a signed commit
- '%G?': show either "G" for Good or "B" for Bad for a signed commit
- '%GS': show the name of the signer for a signed commit
+- '%GK': show the key used to sign a signed commit
- '%gD': reflog selector, e.g., `refs/stash@{1}`
- '%gd': shortened reflog selector, e.g., `stash@{1}`
- '%gn': reflog identity name
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 678d1756a5..314e25da73 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -88,10 +88,10 @@ some output processing may assume ref names in UTF-8.
The construct '@\{-<n>\}' means the <n>th branch checked out
before the current one.
-'<refname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
- The suffix '@\{upstream\}' to a ref (short form '<refname>@\{u\}') refers to
- the branch the ref is set to build on top of. A missing ref defaults
- to the current branch.
+'<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
+ The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
+ refers to the branch that the branch specified by branchname is set to build on
+ top of. A missing branchname defaults to the current one.
'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
A suffix '{caret}' to a revision parameter means the first parent of
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 27c716b15f..0810251f5a 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -12,7 +12,7 @@ Git index format
The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")
4-byte version number:
- The current supported versions are 2 and 3.
+ The current supported versions are 2, 3 and 4.
32-bit number of index entries.
@@ -93,8 +93,8 @@ Git index format
12-bit name length if the length is less than 0xFFF; otherwise 0xFFF
is stored in this field.
- (Version 3) A 16-bit field, only applicable if the "extended flag"
- above is 1, split into (high to low bits).
+ (Version 3 or later) A 16-bit field, only applicable if the
+ "extended flag" above is 1, split into (high to low bits).
1-bit reserved for future
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index a4778d725c..e831cc2020 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -19,7 +19,7 @@ Further chapters cover more specialized topics.
Comprehensive reference documentation is available through the man
pages, or linkgit:git-help[1] command. For example, for the command
-"git clone <repo>", you can either use:
+`git clone <repo>`, you can either use:
------------------------------------------------
$ man git-clone
@@ -66,11 +66,11 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
The initial clone may be time-consuming for a large project, but you
will only need to clone once.
-The clone command creates a new directory named after the project ("git"
-or "linux-2.6" in the examples above). After you cd into this
+The clone command creates a new directory named after the project (`git`
+or `linux-2.6` in the examples above). After you cd into this
directory, you will see that it contains a copy of the project files,
called the <<def_working_tree,working tree>>, together with a special
-top-level directory named ".git", which contains all the information
+top-level directory named `.git`, which contains all the information
about the history of the project.
[[how-to-check-out]]
@@ -188,7 +188,7 @@ As you can see, a commit shows who made the latest change, what they
did, and why.
Every commit has a 40-hexdigit id, sometimes called the "object name" or the
-"SHA-1 id", shown on the first line of the "git show" output. You can usually
+"SHA-1 id", shown on the first line of the `git show` output. You can usually
refer to a commit by a shorter name, such as a tag or a branch name, but this
longer name can also be useful. Most importantly, it is a globally unique
name for this commit: so if you tell somebody else the object name (for
@@ -268,35 +268,35 @@ Manipulating branches
Creating, deleting, and modifying branches is quick and easy; here's
a summary of the commands:
-git branch::
+`git branch`::
list all branches
-git branch <branch>::
- create a new branch named <branch>, referencing the same
+`git branch <branch>`::
+ create a new branch named `<branch>`, referencing the same
point in history as the current branch
-git branch <branch> <start-point>::
- create a new branch named <branch>, referencing
- <start-point>, which may be specified any way you like,
+`git branch <branch> <start-point>`::
+ create a new branch named `<branch>`, referencing
+ `<start-point>`, which may be specified any way you like,
including using a branch name or a tag name
-git branch -d <branch>::
- delete the branch <branch>; if the branch you are deleting
+`git branch -d <branch>`::
+ delete the branch `<branch>`; if the branch you are deleting
points to a commit which is not reachable from the current
branch, this command will fail with a warning.
-git branch -D <branch>::
+`git branch -D <branch>`::
even if the branch points to a commit not reachable
from the current branch, you may know that that commit
is still reachable from some other branch or tag. In that
case it is safe to use this command to force Git to delete
the branch.
-git checkout <branch>::
- make the current branch <branch>, updating the working
- directory to reflect the version referenced by <branch>
-git checkout -b <new> <start-point>::
- create a new branch <new> referencing <start-point>, and
+`git checkout <branch>`::
+ make the current branch `<branch>`, updating the working
+ directory to reflect the version referenced by `<branch>`
+`git checkout -b <new> <start-point>`::
+ create a new branch `<new>` referencing `<start-point>`, and
check it out.
The special symbol "HEAD" can always be used to refer to the current
-branch. In fact, Git uses a file named "HEAD" in the .git directory to
-remember which branch is current:
+branch. In fact, Git uses a file named `HEAD` in the `.git` directory
+to remember which branch is current:
------------------------------------------------
$ cat .git/HEAD
@@ -346,7 +346,7 @@ of the HEAD in the repository that you cloned from. That repository
may also have had other branches, though, and your local repository
keeps branches which track each of those remote branches, called
remote-tracking branches, which you
-can view using the "-r" option to linkgit:git-branch[1]:
+can view using the `-r` option to linkgit:git-branch[1]:
------------------------------------------------
$ git branch -r
@@ -364,7 +364,7 @@ In this example, "origin" is called a remote repository, or "remote"
for short. The branches of this repository are called "remote
branches" from our point of view. The remote-tracking branches listed
above were created based on the remote branches at clone time and will
-be updated by "git fetch" (hence "git pull") and "git push". See
+be updated by `git fetch` (hence `git pull`) and `git push`. See
<<Updating-a-repository-With-git-fetch>> for details.
You might want to build on one of these remote-tracking branches
@@ -374,7 +374,7 @@ on a branch of your own, just as you would for a tag:
$ git checkout -b my-todo-copy origin/todo
------------------------------------------------
-You can also check out "origin/todo" directly to examine it or
+You can also check out `origin/todo` directly to examine it or
write a one-off patch. See <<detached-head,detached head>>.
Note that the name "origin" is just the name that Git uses by default
@@ -386,17 +386,17 @@ Naming branches, tags, and other references
Branches, remote-tracking branches, and tags are all references to
commits. All references are named with a slash-separated path name
-starting with "refs"; the names we've been using so far are actually
+starting with `refs`; the names we've been using so far are actually
shorthand:
- - The branch "test" is short for "refs/heads/test".
- - The tag "v2.6.18" is short for "refs/tags/v2.6.18".
- - "origin/master" is short for "refs/remotes/origin/master".
+ - The branch `test` is short for `refs/heads/test`.
+ - The tag `v2.6.18` is short for `refs/tags/v2.6.18`.
+ - `origin/master` is short for `refs/remotes/origin/master`.
The full name is occasionally useful if, for example, there ever
exists a tag and a branch with the same name.
-(Newly created refs are actually stored in the .git/refs directory,
+(Newly created refs are actually stored in the `.git/refs` directory,
under the path given by their name. However, for efficiency reasons
they may also be packed together in a single file; see
linkgit:git-pack-refs[1]).
@@ -418,7 +418,7 @@ Eventually the developer cloned from will do additional work in her
repository, creating new commits and advancing the branches to point
at the new commits.
-The command "git fetch", with no arguments, will update all of the
+The command `git fetch`, with no arguments, will update all of the
remote-tracking branches to the latest version found in her
repository. It will not touch any of your own branches--not even the
"master" branch that was created for you on clone.
@@ -438,7 +438,7 @@ $ git fetch linux-nfs
-------------------------------------------------
New remote-tracking branches will be stored under the shorthand name
-that you gave "git remote add", in this case linux-nfs:
+that you gave `git remote add`, in this case `linux-nfs`:
-------------------------------------------------
$ git branch -r
@@ -446,10 +446,10 @@ linux-nfs/master
origin/master
-------------------------------------------------
-If you run "git fetch <remote>" later, the remote-tracking branches for the
-named <remote> will be updated.
+If you run `git fetch <remote>` later, the remote-tracking branches
+for the named `<remote>` will be updated.
-If you examine the file .git/config, you will see that Git has added
+If you examine the file `.git/config`, you will see that Git has added
a new stanza:
-------------------------------------------------
@@ -462,7 +462,7 @@ $ cat .git/config
-------------------------------------------------
This is what causes Git to track the remote's branches; you may modify
-or delete these configuration options by editing .git/config with a
+or delete these configuration options by editing `.git/config` with a
text editor. (See the "CONFIGURATION FILE" section of
linkgit:git-config[1] for details.)
@@ -499,7 +499,7 @@ Bisecting: 3537 revisions left to test after this
[65934a9a028b88e83e2b0f8b36618fe503349f8e] BLOCK: Make USB storage depend on SCSI rather than selecting it [try #6]
-------------------------------------------------
-If you run "git branch" at this point, you'll see that Git has
+If you run `git branch` at this point, you'll see that Git has
temporarily moved you in "(no branch)". HEAD is now detached from any
branch and points directly to a commit (with commit id 65934...) that
is reachable from "master" but not from v2.6.18. Compile and test it,
@@ -545,11 +545,11 @@ id, and check it out with:
$ git reset --hard fb47ddb2db...
-------------------------------------------------
-then test, run "bisect good" or "bisect bad" as appropriate, and
+then test, run `bisect good` or `bisect bad` as appropriate, and
continue.
-Instead of "git bisect visualize" and then "git reset --hard
-fb47ddb2db...", you might just want to tell Git that you want to skip
+Instead of `git bisect visualize` and then `git reset --hard
+fb47ddb2db...`, you might just want to tell Git that you want to skip
the current commit:
-------------------------------------------------
@@ -561,8 +561,8 @@ bad one between some first skipped commits and a later bad commit.
There are also ways to automate the bisecting process if you have a
test script that can tell a good from a bad commit. See
-linkgit:git-bisect[1] for more information about this and other "git
-bisect" features.
+linkgit:git-bisect[1] for more information about this and other `git
+bisect` features.
[[naming-commits]]
Naming commits
@@ -591,7 +591,7 @@ $ git show HEAD~4 # the great-great-grandparent
-------------------------------------------------
Recall that merge commits may have more than one parent; by default,
-^ and ~ follow the first parent listed in the commit, but you can
+`^` and `~` follow the first parent listed in the commit, but you can
also choose:
-------------------------------------------------
@@ -640,7 +640,7 @@ running
$ git tag stable-1 1b2e1d63ff
-------------------------------------------------
-You can use stable-1 to refer to the commit 1b2e1d63ff.
+You can use `stable-1` to refer to the commit 1b2e1d63ff.
This creates a "lightweight" tag. If you would also like to include a
comment with the tag, and possibly sign it cryptographically, then you
@@ -669,7 +669,7 @@ $ git log -S'foo()' # commits which add or remove any file data
-------------------------------------------------
And of course you can combine all of these; the following finds
-commits since v2.5 which touch the Makefile or any file under fs:
+commits since v2.5 which touch the `Makefile` or any file under `fs`:
-------------------------------------------------
$ git log v2.5.. Makefile fs/
@@ -681,7 +681,7 @@ You can also ask git log to show patches:
$ git log -p
-------------------------------------------------
-See the "--pretty" option in the linkgit:git-log[1] man page for more
+See the `--pretty` option in the linkgit:git-log[1] man page for more
display options.
Note that git log starts with the most recent commit and works
@@ -742,8 +742,8 @@ Examples
Counting the number of commits on a branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose you want to know how many commits you've made on "mybranch"
-since it diverged from "origin":
+Suppose you want to know how many commits you've made on `mybranch`
+since it diverged from `origin`:
-------------------------------------------------
$ git log --pretty=oneline origin..mybranch | wc -l
@@ -780,7 +780,7 @@ $ git rev-list master
e05db0fd4f31dde7005f075a84f96b360d05984b
-------------------------------------------------
-Or you could recall that the ... operator selects all commits
+Or you could recall that the `...` operator selects all commits
contained reachable from either one reference or the other but not
both; so
@@ -880,7 +880,7 @@ Showing commits unique to a given branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppose you would like to see all the commits reachable from the branch
-head named "master" but not from any other head in your repository.
+head named `master` but not from any other head in your repository.
We can list all the heads in this repository with
linkgit:git-show-ref[1]:
@@ -894,7 +894,7 @@ a07157ac624b2524a059a3414e99f6f44bebc1e7 refs/heads/master
1e87486ae06626c2f31eaa63d26fc0fd646c8af2 refs/heads/tutorial-fixes
-------------------------------------------------
-We can get just the branch-head names, and remove "master", with
+We can get just the branch-head names, and remove `master`, with
the help of the standard utilities cut and grep:
-------------------------------------------------
@@ -931,11 +931,20 @@ The linkgit:git-archive[1] command can create a tar or zip archive from
any version of a project; for example:
-------------------------------------------------
-$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
+$ git archive -o latest.tar.gz --prefix=project/ HEAD
-------------------------------------------------
-will use HEAD to produce a tar archive in which each filename is
-preceded by "project/".
+will use HEAD to produce a gzipped tar archive in which each filename
+is preceded by `project/`. The output file format is inferred from
+the output file extension if possible, see linkgit:git-archive[1] for
+details.
+
+Versions of Git older than 1.7.7 don't know about the `tar.gz` format,
+you'll need to use gzip explicitly:
+
+-------------------------------------------------
+$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
+-------------------------------------------------
If you're releasing a new version of a software project, you may want
to simultaneously make a changelog to include in the release
@@ -991,9 +1000,16 @@ Developing with Git
Telling Git your name
---------------------
-Before creating any commits, you should introduce yourself to Git. The
-easiest way to do so is to make sure the following lines appear in a
-file named .gitconfig in your home directory:
+Before creating any commits, you should introduce yourself to Git.
+The easiest way to do so is to use linkgit:git-config[1]:
+
+------------------------------------------------
+$ git config --global user.name 'Your Name Comes Here'
+$ git config --global user.email 'you@yourdomain.example.com'
+------------------------------------------------
+
+Which will add the following to a file named `.gitconfig` in your
+home directory:
------------------------------------------------
[user]
@@ -1001,8 +1017,9 @@ file named .gitconfig in your home directory:
email = you@yourdomain.example.com
------------------------------------------------
-(See the "CONFIGURATION FILE" section of linkgit:git-config[1] for
-details on the configuration file.)
+See the "CONFIGURATION FILE" section of linkgit:git-config[1] for
+details on the configuration file. The file is plain text, so you can
+also edit it with your favorite editor.
[[creating-a-new-repository]]
@@ -1045,7 +1062,7 @@ at step 3, Git maintains a snapshot of the tree's contents in a
special staging area called "the index."
At the beginning, the content of the index will be identical to
-that of the HEAD. The command "git diff --cached", which shows
+that of the HEAD. The command `git diff --cached`, which shows
the difference between the HEAD and the index, should therefore
produce no output at that point.
@@ -1084,7 +1101,7 @@ $ git diff
shows the difference between the working tree and the index file.
-Note that "git add" always adds just the current contents of a file
+Note that `git add` always adds just the current contents of a file
to the index; further changes to the same file will be ignored unless
you run `git add` on the file again.
@@ -1155,8 +1172,9 @@ annoying to have these untracked files lying around; e.g. they make
`git add .` practically useless, and they keep showing up in the output of
`git status`.
-You can tell Git to ignore certain files by creating a file called .gitignore
-in the top level of your working directory, with contents such as:
+You can tell Git to ignore certain files by creating a file called
+`.gitignore` in the top level of your working directory, with contents
+such as:
-------------------------------------------------
# Lines starting with '#' are considered comments.
@@ -1180,10 +1198,10 @@ for other users who clone your repository.
If you wish the exclude patterns to affect only certain repositories
(instead of every repository for a given project), you may instead put
-them in a file in your repository named .git/info/exclude, or in any file
-specified by the `core.excludesfile` configuration variable. Some Git
-commands can also take exclude patterns directly on the command line.
-See linkgit:gitignore[5] for the details.
+them in a file in your repository named `.git/info/exclude`, or in any
+file specified by the `core.excludesfile` configuration variable.
+Some Git commands can also take exclude patterns directly on the
+command line. See linkgit:gitignore[5] for the details.
[[how-to-merge]]
How to merge
@@ -1196,10 +1214,10 @@ linkgit:git-merge[1]:
$ git merge branchname
-------------------------------------------------
-merges the development in the branch "branchname" into the current
+merges the development in the branch `branchname` into the current
branch.
-A merge is made by combining the changes made in "branchname" and the
+A merge is made by combining the changes made in `branchname` and the
changes made up to the latest commit in your current branch since
their histories forked. The work tree is overwritten by the result of
the merge when this combining is done cleanly, or overwritten by a
@@ -1321,7 +1339,7 @@ that part is not conflicting and is not shown. Same for stage 3).
The diff above shows the differences between the working-tree version of
file.txt and the stage 2 and stage 3 versions. So instead of preceding
-each line by a single "+" or "-", it now uses two columns: the first
+each line by a single `+` or `-`, it now uses two columns: the first
column is used for differences between the first parent and the working
directory copy, and the second for differences between the second parent
and the working directory copy. (See the "COMBINED DIFF FORMAT" section
@@ -1596,7 +1614,7 @@ dangling tree b24c2473f1fd3d91352a624795be026d64c8841f
You will see informational messages on dangling objects. They are objects
that still exist in the repository but are no longer referenced by any of
-your branches, and can (and will) be removed after a while with "gc".
+your branches, and can (and will) be removed after a while with `gc`.
You can run `git fsck --no-dangling` to suppress these messages, and still
view real errors.
@@ -1608,9 +1626,9 @@ Recovering lost changes
Reflogs
^^^^^^^
-Say you modify a branch with +linkgit:git-reset[1] \--hard+, and then
-realize that the branch was the only reference you had to that point in
-history.
+Say you modify a branch with <<fixing-mistakes,`git reset --hard`>>,
+and then realize that the branch was the only reference you had to
+that point in history.
Fortunately, Git also keeps a log, called a "reflog", of all the
previous values of each branch. So in this case you can still find the
@@ -1621,8 +1639,8 @@ $ git log master@{1}
-------------------------------------------------
This lists the commits reachable from the previous version of the
-"master" branch head. This syntax can be used with any Git command
-that accepts a commit, not just with git log. Some other examples:
+`master` branch head. This syntax can be used with any Git command
+that accepts a commit, not just with `git log`. Some other examples:
-------------------------------------------------
$ git show master@{2} # See where the branch pointed 2,
@@ -1726,8 +1744,8 @@ one step:
$ git pull origin master
-------------------------------------------------
-In fact, if you have "master" checked out, then this branch has been
-configured by "git clone" to get changes from the HEAD branch of the
+In fact, if you have `master` checked out, then this branch has been
+configured by `git clone` to get changes from the HEAD branch of the
origin repository. So often you can
accomplish the above with just a simple
@@ -1742,11 +1760,11 @@ the current branch.
More generally, a branch that is created from a remote-tracking branch
will pull
by default from that branch. See the descriptions of the
-branch.<name>.remote and branch.<name>.merge options in
+`branch.<name>.remote` and `branch.<name>.merge` options in
linkgit:git-config[1], and the discussion of the `--track` option in
linkgit:git-checkout[1], to learn how to control these defaults.
-In addition to saving you keystrokes, "git pull" also helps you by
+In addition to saving you keystrokes, `git pull` also helps you by
producing a default commit message documenting the branch and
repository that you pulled from.
@@ -1754,7 +1772,7 @@ repository that you pulled from.
<<fast-forwards,fast-forward>>; instead, your branch will just be
updated to point to the latest commit from the upstream branch.)
-The `git pull` command can also be given "." as the "remote" repository,
+The `git pull` command can also be given `.` as the "remote" repository,
in which case it just merges in a branch from the current repository; so
the commands
@@ -1779,7 +1797,7 @@ $ git format-patch origin
-------------------------------------------------
will produce a numbered series of files in the current directory, one
-for each patch in the current branch but not in origin/HEAD.
+for each patch in the current branch but not in `origin/HEAD`.
`git format-patch` can include an initial "cover letter". You can insert
commentary on individual patches after the three dash line which
@@ -1801,7 +1819,7 @@ Importing patches to a project
Git also provides a tool called linkgit:git-am[1] (am stands for
"apply mailbox"), for importing such an emailed series of patches.
Just save all of the patch-containing messages, in order, into a
-single mailbox file, say "patches.mbox", then run
+single mailbox file, say `patches.mbox`, then run
-------------------------------------------------
$ git am -3 patches.mbox
@@ -1809,7 +1827,7 @@ $ git am -3 patches.mbox
Git will apply each patch in order; if any conflicts are found, it
will stop, and you can fix the conflicts as described in
-"<<resolving-a-merge,Resolving a merge>>". (The "-3" option tells
+"<<resolving-a-merge,Resolving a merge>>". (The `-3` option tells
Git to perform a merge; if you would prefer it just to abort and
leave your tree and index untouched, you may omit that option.)
@@ -1885,7 +1903,7 @@ We explain how to do this in the following sections.
Setting up a public repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Assume your personal repository is in the directory ~/proj. We
+Assume your personal repository is in the directory `~/proj`. We
first create a new clone of the repository and tell `git daemon` that it
is meant to be public:
@@ -1895,10 +1913,10 @@ $ touch proj.git/git-daemon-export-ok
-------------------------------------------------
The resulting directory proj.git contains a "bare" git repository--it is
-just the contents of the ".git" directory, without any files checked out
+just the contents of the `.git` directory, without any files checked out
around it.
-Next, copy proj.git to the server where you plan to host the
+Next, copy `proj.git` to the server where you plan to host the
public repository. You can use scp, rsync, or whatever is most
convenient.
@@ -1909,8 +1927,8 @@ Exporting a Git repository via the Git protocol
This is the preferred method.
If someone else administers the server, they should tell you what
-directory to put the repository in, and what git:// URL it will appear
-at. You can then skip to the section
+directory to put the repository in, and what `git://` URL it will
+appear at. You can then skip to the section
"<<pushing-changes-to-a-public-repository,Pushing changes to a public
repository>>", below.
@@ -1945,7 +1963,7 @@ $ mv hooks/post-update.sample hooks/post-update
(For an explanation of the last two lines, see
linkgit:git-update-server-info[1] and linkgit:githooks[5].)
-Advertise the URL of proj.git. Anybody else should then be able to
+Advertise the URL of `proj.git`. Anybody else should then be able to
clone or pull from that URL, for example with a command line like:
-------------------------------------------------
@@ -1968,8 +1986,8 @@ access, which you will need to update the public repository with the
latest changes created in your private repository.
The simplest way to do this is using linkgit:git-push[1] and ssh; to
-update the remote branch named "master" with the latest state of your
-branch named "master", run
+update the remote branch named `master` with the latest state of your
+branch named `master`, run
-------------------------------------------------
$ git push ssh://yourserver.com/~you/proj.git master:master
@@ -1985,32 +2003,37 @@ As with `git fetch`, `git push` will complain if this does not result in a
<<fast-forwards,fast-forward>>; see the following section for details on
handling this case.
-Note that the target of a "push" is normally a
+Note that the target of a `push` is normally a
<<def_bare_repository,bare>> repository. You can also push to a
repository that has a checked-out working tree, but a push to update the
currently checked-out branch is denied by default to prevent confusion.
-See the description ofthe receive.denyCurrentBranch option
+See the description of the receive.denyCurrentBranch option
in linkgit:git-config[1] for details.
As with `git fetch`, you may also set up configuration options to
-save typing; so, for example, after
+save typing; so, for example:
+
+-------------------------------------------------
+$ git remote add public-repo ssh://yourserver.com/~you/proj.git
+-------------------------------------------------
+
+adds the following to `.git/config`:
-------------------------------------------------
-$ cat >>.git/config <<EOF
[remote "public-repo"]
- url = ssh://yourserver.com/~you/proj.git
-EOF
+ url = yourserver.com:proj.git
+ fetch = +refs/heads/*:refs/remotes/example/*
-------------------------------------------------
-you should be able to perform the above push with just
+which lets you do the same push with just
-------------------------------------------------
$ git push public-repo master
-------------------------------------------------
-See the explanations of the remote.<name>.url, branch.<name>.remote,
-and remote.<name>.push options in linkgit:git-config[1] for
-details.
+See the explanations of the `remote.<name>.url`,
+`branch.<name>.remote`, and `remote.<name>.push` options in
+linkgit:git-config[1] for details.
[[forcing-push]]
What to do when a push fails
@@ -2041,6 +2064,13 @@ branch name with a plus sign:
$ git push ssh://yourserver.com/~you/proj.git +master
-------------------------------------------------
+Note the addition of the `+` sign. Alternatively, you can use the
+`-f` flag to force the remote update, as in:
+
+-------------------------------------------------
+$ git push -f ssh://yourserver.com/~you/proj.git master
+-------------------------------------------------
+
Normally whenever a branch head in a public repository is modified, it
is modified to point to a descendant of the commit that it pointed to
before. By forcing a push in this situation, you break that convention.
@@ -2138,7 +2168,7 @@ linkgit:git-fetch[1] to keep them up-to-date; see
Now create the branches in which you are going to work; these start out
at the current tip of origin/master branch, and should be set up (using
-the --track option to linkgit:git-branch[1]) to merge changes in from
+the `--track` option to linkgit:git-branch[1]) to merge changes in from
Linus by default.
-------------------------------------------------
@@ -2157,7 +2187,7 @@ Important note! If you have any local changes in these branches, then
this merge will create a commit object in the history (with no local
changes Git will simply do a "fast-forward" merge). Many people dislike
the "noise" that this creates in the Linux history, so you should avoid
-doing this capriciously in the "release" branch, as these noisy commits
+doing this capriciously in the `release` branch, as these noisy commits
will become part of the permanent history when you ask Linus to pull
from the release branch.
@@ -2199,7 +2229,7 @@ patches), and create a new branch from a recent stable tag of
Linus's branch. Picking a stable base for your branch will:
1) help you: by avoiding inclusion of unrelated and perhaps lightly
tested changes
-2) help future bug hunters that use "git bisect" to find problems
+2) help future bug hunters that use `git bisect` to find problems
-------------------------------------------------
$ git checkout -b speed-up-spinlocks v2.6.35
@@ -2224,9 +2254,9 @@ It is unlikely that you would have any conflicts here ... but you might if you
spent a while on this step and had also pulled new versions from upstream.
Some time later when enough time has passed and testing done, you can pull the
-same branch into the "release" tree ready to go upstream. This is where you
+same branch into the `release` tree ready to go upstream. This is where you
see the value of keeping each patch (or patch series) in its own branch. It
-means that the patches can be moved into the "release" tree in any order.
+means that the patches can be moved into the `release` tree in any order.
-------------------------------------------------
$ git checkout release && git pull . speed-up-spinlocks
@@ -2259,7 +2289,7 @@ If it has been merged, then there will be no output.)
Once a patch completes the great cycle (moving from test to release,
then pulled by Linus, and finally coming back into your local
-"origin/master" branch), the branch for this change is no longer needed.
+`origin/master` branch), the branch for this change is no longer needed.
You detect this when the output from:
-------------------------------------------------
@@ -2274,20 +2304,16 @@ $ git branch -d branchname
Some changes are so trivial that it is not necessary to create a separate
branch and then merge into each of the test and release branches. For
-these changes, just apply directly to the "release" branch, and then
-merge that into the "test" branch.
+these changes, just apply directly to the `release` branch, and then
+merge that into the `test` branch.
-To create diffstat and shortlog summaries of changes to include in a "please
-pull" request to Linus you can use:
+After pushing your work to `mytree`, you can use
+linkgit:git-request-pull[1] to prepare a "please pull" request message
+to send to Linus:
-------------------------------------------------
-$ git diff --stat origin..release
--------------------------------------------------
-
-and
-
--------------------------------------------------
-$ git log -p origin..release | git shortlog
+$ git push mytree
+$ git request-pull origin mytree release
-------------------------------------------------
Here are some of the scripts that simplify all this even further.
@@ -2312,7 +2338,7 @@ origin)
fi
;;
*)
- echo "Usage: $0 origin|test|release" 1>&2
+ echo "usage: $0 origin|test|release" 1>&2
exit 1
;;
esac
@@ -2326,7 +2352,7 @@ pname=$0
usage()
{
- echo "Usage: $pname branch test|release" 1>&2
+ echo "usage: $pname branch test|release" 1>&2
exit 1
}
@@ -2450,8 +2476,8 @@ you are rewriting history.
Keeping a patch series up to date using git rebase
--------------------------------------------------
-Suppose that you create a branch "mywork" on a remote-tracking branch
-"origin", and create some commits on top of it:
+Suppose that you create a branch `mywork` on a remote-tracking branch
+`origin`, and create some commits on top of it:
-------------------------------------------------
$ git checkout -b mywork origin
@@ -2463,7 +2489,7 @@ $ git commit
-------------------------------------------------
You have performed no merges into mywork, so it is just a simple linear
-sequence of patches on top of "origin":
+sequence of patches on top of `origin`:
................................................
o--o--O <-- origin
@@ -2472,7 +2498,7 @@ sequence of patches on top of "origin":
................................................
Some more interesting work has been done in the upstream project, and
-"origin" has advanced:
+`origin` has advanced:
................................................
o--o--O--o--o--o <-- origin
@@ -2480,7 +2506,7 @@ Some more interesting work has been done in the upstream project, and
a--b--c <-- mywork
................................................
-At this point, you could use "pull" to merge your changes back in;
+At this point, you could use `pull` to merge your changes back in;
the result would create a new merge commit, like this:
................................................
@@ -2499,7 +2525,7 @@ $ git rebase origin
-------------------------------------------------
This will remove each of your commits from mywork, temporarily saving
-them as patches (in a directory named ".git/rebase-apply"), update mywork to
+them as patches (in a directory named `.git/rebase-apply`), update mywork to
point at the latest version of origin, then apply each of the saved
patches to the new mywork. The result will look like:
@@ -2528,6 +2554,12 @@ return mywork to the state it had before you started the rebase:
$ git rebase --abort
-------------------------------------------------
+If you need to reorder or edit a number of commits in a branch, it may
+be easier to use `git rebase -i`, which allows you to reorder and
+squash commits, as well as marking them for individual editing during
+the rebase. See <<interactive-rebase>> for details, and
+<<reordering-patch-series>> for alternatives.
+
[[rewriting-one-commit]]
Rewriting a single commit
-------------------------
@@ -2541,72 +2573,89 @@ $ git commit --amend
which will replace the old commit by a new commit incorporating your
changes, giving you a chance to edit the old commit message first.
+This is useful for fixing typos in your last commit, or for adjusting
+the patch contents of a poorly staged commit.
-You can also use a combination of this and linkgit:git-rebase[1] to
-replace a commit further back in your history and recreate the
-intervening changes on top of it. First, tag the problematic commit
-with
-
--------------------------------------------------
-$ git tag bad mywork~5
--------------------------------------------------
+If you need to amend commits from deeper in your history, you can
+use <<interactive-rebase,interactive rebase's `edit` instruction>>.
-(Either gitk or `git log` may be useful for finding the commit.)
+[[reordering-patch-series]]
+Reordering or selecting from a patch series
+-------------------------------------------
-Then check out that commit, edit it, and rebase the rest of the series
-on top of it (note that we could check out the commit on a temporary
-branch, but instead we're using a <<detached-head,detached head>>):
+Sometimes you want to edit a commit deeper in your history. One
+approach is to use `git format-patch` to create a series of patches
+and then reset the state to before the patches:
-------------------------------------------------
-$ git checkout bad
-$ # make changes here and update the index
-$ git commit --amend
-$ git rebase --onto HEAD bad mywork
+$ git format-patch origin
+$ git reset --hard origin
-------------------------------------------------
-When you're done, you'll be left with mywork checked out, with the top
-patches on mywork reapplied on top of your modified commit. You can
-then clean up with
+Then modify, reorder, or eliminate patches as needed before applying
+them again with linkgit:git-am[1]:
-------------------------------------------------
-$ git tag -d bad
+$ git am *.patch
-------------------------------------------------
-Note that the immutable nature of Git history means that you haven't really
-"modified" existing commits; instead, you have replaced the old commits with
-new commits having new object names.
+[[interactive-rebase]]
+Using interactive rebases
+-------------------------
-[[reordering-patch-series]]
-Reordering or selecting from a patch series
--------------------------------------------
+You can also edit a patch series with an interactive rebase. This is
+the same as <<reordering-patch-series,reordering a patch series using
+`format-patch`>>, so use whichever interface you like best.
-Given one existing commit, the linkgit:git-cherry-pick[1] command
-allows you to apply the change introduced by that commit and create a
-new commit that records it. So, for example, if "mywork" points to a
-series of patches on top of "origin", you might do something like:
+Rebase your current HEAD on the last commit you want to retain as-is.
+For example, if you want to reorder the last 5 commits, use:
-------------------------------------------------
-$ git checkout -b mywork-new origin
-$ gitk origin..mywork &
+$ git rebase -i HEAD~5
-------------------------------------------------
-and browse through the list of patches in the mywork branch using gitk,
-applying them (possibly in a different order) to mywork-new using
-cherry-pick, and possibly modifying them as you go using `git commit --amend`.
-The linkgit:git-gui[1] command may also help as it allows you to
-individually select diff hunks for inclusion in the index (by
-right-clicking on the diff hunk and choosing "Stage Hunk for Commit").
+This will open your editor with a list of steps to be taken to perform
+your rebase.
-Another technique is to use `git format-patch` to create a series of
-patches, then reset the state to before the patches:
-
--------------------------------------------------
-$ git format-patch origin
-$ git reset --hard origin
-------------------------------------------------
+pick deadbee The oneline of this commit
+pick fa1afe1 The oneline of the next commit
+...
-Then modify, reorder, or eliminate patches as preferred before applying
-them again with linkgit:git-am[1].
+# Rebase c0ffeee..deadbee onto c0ffeee
+#
+# Commands:
+# p, pick = use commit
+# r, reword = use commit, but edit the commit message
+# e, edit = use commit, but stop for amending
+# s, squash = use commit, but meld into previous commit
+# f, fixup = like "squash", but discard this commit's log message
+# x, exec = run command (the rest of the line) using shell
+#
+# These lines can be re-ordered; they are executed from top to bottom.
+#
+# If you remove a line here THAT COMMIT WILL BE LOST.
+#
+# However, if you remove everything, the rebase will be aborted.
+#
+# Note that empty commits are commented out
+-------------------------------------------------
+
+As explained in the comments, you can reorder commits, squash them
+together, edit commit messages, etc. by editing the list. Once you
+are satisfied, save the list and close your editor, and the rebase
+will begin.
+
+The rebase will stop where `pick` has been replaced with `edit` or
+when a step in the list fails to mechanically resolve conflicts and
+needs your help. When you are done editing and/or resolving conflicts
+you can continue with `git rebase --continue`. If you decide that
+things are getting too hairy, you can always bail out with `git rebase
+--abort`. Even after the rebase is complete, you can still recover
+the original branch by using the <<reflogs,reflog>>.
+
+For a more detailed discussion of the procedure and additional tips,
+see the "INTERACTIVE MODE" section of linkgit:git-rebase[1].
[[patch-series-tools]]
Other tools
@@ -2747,10 +2796,10 @@ arbitrary name:
$ git fetch origin todo:my-todo-work
-------------------------------------------------
-The first argument, "origin", just tells Git to fetch from the
+The first argument, `origin`, just tells Git to fetch from the
repository you originally cloned from. The second argument tells Git
-to fetch the branch named "todo" from the remote repository, and to
-store it locally under the name refs/heads/my-todo-work.
+to fetch the branch named `todo` from the remote repository, and to
+store it locally under the name `refs/heads/my-todo-work`.
You can also fetch branches from other repositories; so
@@ -2758,8 +2807,8 @@ You can also fetch branches from other repositories; so
$ git fetch git://example.com/proj.git master:example-master
-------------------------------------------------
-will create a new branch named "example-master" and store in it the
-branch named "master" from the repository at the given URL. If you
+will create a new branch named `example-master` and store in it the
+branch named `master` from the repository at the given URL. If you
already have a branch named example-master, it will attempt to
<<fast-forwards,fast-forward>> to the commit given by example.com's
master branch. In more detail:
@@ -2768,7 +2817,7 @@ master branch. In more detail:
git fetch and fast-forwards
---------------------------
-In the previous example, when updating an existing branch, "git fetch"
+In the previous example, when updating an existing branch, `git fetch`
checks to make sure that the most recent commit on the remote
branch is a descendant of the most recent commit on your copy of the
branch before updating your copy of the branch to point at the new
@@ -2794,11 +2843,11 @@ resulting in a situation like:
o--o--o <-- new head of the branch
................................................
-In this case, "git fetch" will fail, and print out a warning.
+In this case, `git fetch` will fail, and print out a warning.
In that case, you can still force Git to update to the new head, as
described in the following section. However, note that in the
-situation above this may mean losing the commits labeled "a" and "b",
+situation above this may mean losing the commits labeled `a` and `b`,
unless you've already created a reference of your own pointing to
them.
@@ -2813,7 +2862,7 @@ descendant of the old head, you may force the update with:
$ git fetch git://example.com/proj.git +master:refs/remotes/example/master
-------------------------------------------------
-Note the addition of the "+" sign. Alternatively, you can use the "-f"
+Note the addition of the `+` sign. Alternatively, you can use the `-f`
flag to force updates of all the fetched branches, as in:
-------------------------------------------------
@@ -2827,7 +2876,7 @@ may be lost, as we saw in the previous section.
Configuring remote-tracking branches
------------------------------------
-We saw above that "origin" is just a shortcut to refer to the
+We saw above that `origin` is just a shortcut to refer to the
repository that you originally cloned from. This information is
stored in Git configuration variables, which you can see using
linkgit:git-config[1]:
@@ -2845,48 +2894,34 @@ branch.master.merge=refs/heads/master
If there are other repositories that you also use frequently, you can
create similar configuration options to save typing; for example,
-after
-------------------------------------------------
-$ git config remote.example.url git://example.com/proj.git
+$ git remote add example git://example.com/proj.git
-------------------------------------------------
-then the following two commands will do the same thing:
+adds the following to `.git/config`:
-------------------------------------------------
-$ git fetch git://example.com/proj.git master:refs/remotes/example/master
-$ git fetch example master:refs/remotes/example/master
+[remote "example"]
+ url = git://example.com/proj.git
+ fetch = +refs/heads/*:refs/remotes/example/*
-------------------------------------------------
-Even better, if you add one more option:
-
--------------------------------------------------
-$ git config remote.example.fetch master:refs/remotes/example/master
--------------------------------------------------
+Also note that the above configuration can be performed by directly
+editing the file `.git/config` instead of using linkgit:git-remote[1].
-then the following commands will all do the same thing:
+After configuring the remote, the following three commands will do the
+same thing:
-------------------------------------------------
-$ git fetch git://example.com/proj.git master:refs/remotes/example/master
-$ git fetch example master:refs/remotes/example/master
+$ git fetch git://example.com/proj.git +refs/heads/*:refs/remotes/example/*
+$ git fetch example +refs/heads/*:refs/remotes/example/*
$ git fetch example
-------------------------------------------------
-You can also add a "+" to force the update each time:
-
--------------------------------------------------
-$ git config remote.example.fetch +master:refs/remotes/example/master
--------------------------------------------------
-
-Don't do this unless you're sure you won't mind "git fetch" possibly
-throwing away commits on 'example/master'.
-
-Also note that all of the above configuration can be performed by
-directly editing the file .git/config instead of using
-linkgit:git-config[1].
-
See linkgit:git-config[1] for more details on the configuration
-options mentioned above.
+options mentioned above and linkgit:git-fetch[1] for more details on
+the refspec syntax.
[[git-concepts]]
@@ -2950,7 +2985,7 @@ Commit Object
~~~~~~~~~~~~~
The "commit" object links a physical state of a tree with a description
-of how we got there and why. Use the --pretty=raw option to
+of how we got there and why. Use the `--pretty=raw` option to
linkgit:git-show[1] or linkgit:git-log[1] to examine your favorite
commit:
@@ -2992,7 +3027,7 @@ of the tree referred to by this commit with the trees associated with
its parents. In particular, Git does not attempt to record file renames
explicitly, though it can identify cases where the existence of the same
file data at changing paths suggests a rename. (See, for example, the
--M option to linkgit:git-diff[1]).
+`-M` option to linkgit:git-diff[1]).
A commit is usually created by linkgit:git-commit[1], which creates a
commit whose parent is normally the current HEAD, and whose tree is
@@ -3043,7 +3078,7 @@ Blob Object
~~~~~~~~~~~
You can use linkgit:git-show[1] to examine the contents of a blob; take,
-for example, the blob in the entry for "COPYING" from the tree above:
+for example, the blob in the entry for `COPYING` from the tree above:
------------------------------------------------
$ git show 6ff87c4664
@@ -3126,14 +3161,14 @@ nLE/L9aUXdWeTFPron96DLA=
See the linkgit:git-tag[1] command to learn how to create and verify tag
objects. (Note that linkgit:git-tag[1] can also be used to create
"lightweight tags", which are not tag objects at all, but just simple
-references whose names begin with "refs/tags/").
+references whose names begin with `refs/tags/`).
[[pack-files]]
How Git stores objects efficiently: pack files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Newly created objects are initially created in a file named after the
-object's SHA-1 hash (stored in .git/objects).
+object's SHA-1 hash (stored in `.git/objects`).
Unfortunately this system becomes inefficient once a project has a
lot of objects. Try this on an old project:
@@ -3174,9 +3209,9 @@ $ git prune
to remove any of the "loose" objects that are now contained in the
pack. This will also remove any unreferenced objects (which may be
-created when, for example, you use "git reset" to remove a commit).
+created when, for example, you use `git reset` to remove a commit).
You can verify that the loose objects are gone by looking at the
-.git/objects directory or by running
+`.git/objects` directory or by running
------------------------------------------------
$ git count-objects
@@ -3203,7 +3238,7 @@ branch still exists, as does everything it pointed to. The branch
pointer itself just doesn't, since you replaced it with another one.
There are also other situations that cause dangling objects. For
-example, a "dangling blob" may arise because you did a "git add" of a
+example, a "dangling blob" may arise because you did a `git add` of a
file, but then, before you actually committed it and made it part of the
bigger picture, you changed something else in that file and committed
that *updated* thing--the old state that you added originally ends up
@@ -3246,14 +3281,14 @@ $ git show <dangling-blob/tree-sha-goes-here>
------------------------------------------------
to show what the contents of the blob were (or, for a tree, basically
-what the "ls" for that directory was), and that may give you some idea
+what the `ls` for that directory was), and that may give you some idea
of what the operation was that left that dangling object.
Usually, dangling blobs and trees aren't very interesting. They're
almost always the result of either being a half-way mergebase (the blob
will often even have the conflict markers from a merge in it, if you
have had conflicting merges that you fixed up by hand), or simply
-because you interrupted a "git fetch" with ^C or something like that,
+because you interrupted a `git fetch` with ^C or something like that,
leaving _some_ of the new objects in the object database, but just
dangling and useless.
@@ -3264,16 +3299,16 @@ state, you can just prune all unreachable objects:
$ git prune
------------------------------------------------
-and they'll be gone. But you should only run "git prune" on a quiescent
+and they'll be gone. But you should only run `git prune` on a quiescent
repository--it's kind of like doing a filesystem fsck recovery: you
don't want to do that while the filesystem is mounted.
-(The same is true of "git fsck" itself, btw, but since
+(The same is true of `git fsck` itself, btw, but since
`git fsck` never actually *changes* the repository, it just reports
on what it found, `git fsck` itself is never 'dangerous' to run.
Running it while somebody is actually changing the repository can cause
confusing and scary messages, but it won't actually do anything bad. In
-contrast, running "git prune" while somebody is actively changing the
+contrast, running `git prune` while somebody is actively changing the
repository is a *BAD* idea).
[[recovering-from-repository-corruption]]
@@ -3311,7 +3346,7 @@ missing blob 4b9458b3786228369c63936db65827de3cc06200
Now you know that blob 4b9458b3 is missing, and that the tree 2d9263c6
points to it. If you could find just one copy of that missing blob
object, possibly in some other repository, you could move it into
-.git/objects/4b/9458b3... and be done. Suppose you can't. You can
+`.git/objects/4b/9458b3...` and be done. Suppose you can't. You can
still examine the tree that pointed to it with linkgit:git-ls-tree[1],
which might output something like:
@@ -3326,10 +3361,10 @@ $ git ls-tree 2d9263c6d23595e7cb2a21e5ebbb53655278dff8
------------------------------------------------
So now you know that the missing blob was the data for a file named
-"myfile". And chances are you can also identify the directory--let's
-say it's in "somedirectory". If you're lucky the missing copy might be
+`myfile`. And chances are you can also identify the directory--let's
+say it's in `somedirectory`. If you're lucky the missing copy might be
the same as the copy you have checked out in your working tree at
-"somedirectory/myfile"; you can test whether that's right with
+`somedirectory/myfile`; you can test whether that's right with
linkgit:git-hash-object[1]:
------------------------------------------------
@@ -3384,7 +3419,7 @@ $ git hash-object -w <recreated-file>
and your repository is good again!
-(Btw, you could have ignored the fsck, and started with doing a
+(Btw, you could have ignored the `fsck`, and started with doing a
------------------------------------------------
$ git log --raw --all
@@ -3398,7 +3433,7 @@ just missing one particular blob version.
The index
-----------
-The index is a binary file (generally kept in .git/index) containing a
+The index is a binary file (generally kept in `.git/index`) containing a
sorted list of path names, each with permissions and the SHA-1 of a blob
object; linkgit:git-ls-files[1] can show you the contents of the index:
@@ -3538,7 +3573,7 @@ $ ls -a
The `git submodule add <repo> <path>` command does a couple of things:
-- It clones the submodule from <repo> to the given <path> under the
+- It clones the submodule from `<repo>` to the given `<path>` under the
current directory and by default checks out the master branch.
- It adds the submodule's clone path to the linkgit:gitmodules[5] file and
adds this file to the index, ready to be committed.
@@ -3666,11 +3701,11 @@ Unable to checkout '261dfac35cb99d380eb966e102c1197139f7fa24' in submodule path
In older Git versions it could be easily forgotten to commit new or modified
files in a submodule, which silently leads to similar problems as not pushing
-the submodule changes. Starting with Git 1.7.0 both "git status" and "git diff"
+the submodule changes. Starting with Git 1.7.0 both `git status` and `git diff`
in the superproject show submodules as modified when they contain new or
-modified files to protect against accidentally committing such a state. "git
-diff" will also add a "-dirty" to the work tree side when generating patch
-output or used with the --submodule option:
+modified files to protect against accidentally committing such a state. `git
+diff` will also add a `-dirty` to the work tree side when generating patch
+output or used with the `--submodule` option:
-------------------------------------------------
$ git diff
@@ -3706,7 +3741,9 @@ module a
NOTE: The changes are still visible in the submodule's reflog.
-This is not the case if you did not commit your changes.
+If you have uncommitted changes in your submodule working tree, `git
+submodule update` will not overwrite them. Instead, you get the usual
+warning about not being able switch from a dirty branch.
[[low-level-operations]]
Low-level Git operations
@@ -3844,7 +3881,7 @@ or, if you want to check out all of the index, use `-a`.
NOTE! `git checkout-index` normally refuses to overwrite old files, so
if you have an old version of the tree already checked out, you will
-need to use the "-f" flag ('before' the "-a" flag or the filename) to
+need to use the `-f` flag ('before' the `-a` flag or the filename) to
'force' the checkout.
@@ -3855,7 +3892,7 @@ from one representation to the other:
Tying it all together
~~~~~~~~~~~~~~~~~~~~~
-To commit a tree you have instantiated with "git write-tree", you'd
+To commit a tree you have instantiated with `git write-tree`, you'd
create a "commit" object that refers to that tree and the history
behind it--most notably the "parent" commits that preceded it in
history.
@@ -4116,8 +4153,9 @@ As a result, the general consistency of an object can always be tested
independently of the contents or the type of the object: all objects can
be validated by verifying that (a) their hashes match the content of the
file and (b) the object successfully inflates to a stream of bytes that
-forms a sequence of <ascii type without space> {plus} <space> {plus} <ascii decimal
-size> {plus} <byte\0> {plus} <binary object data>.
+forms a sequence of
+`<ascii type without space> + <space> + <ascii decimal size> +
+<byte\0> + <binary object data>`.
The structured objects can further have their structure and
connectivity to other objects verified. This is generally done with
@@ -4596,10 +4634,10 @@ Think about how to create a clear chapter dependency graph that will
allow people to get to important topics without necessarily reading
everything in between.
-Scan Documentation/ for other stuff left out; in particular:
+Scan `Documentation/` for other stuff left out; in particular:
- howto's
-- some of technical/?
+- some of `technical/`?
- hooks
- list of commands in linkgit:git[1]
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 4448c35bd0..6722e621d1 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v1.8.2-rc0
+DEF_VER=v1.8.2.GIT
LF='
'
diff --git a/Makefile b/Makefile
index ba8e243425..598d6313da 100644
--- a/Makefile
+++ b/Makefile
@@ -101,8 +101,6 @@ all::
#
# Define NO_MKSTEMPS if you don't have mkstemps in the C library.
#
-# Define NO_STRTOK_R if you don't have strtok_r in the C library.
-#
# Define NO_FNMATCH if you don't have fnmatch in the C library.
#
# Define NO_FNMATCH_CASEFOLD if your fnmatch function doesn't have the
@@ -619,22 +617,6 @@ LIB_FILE = libgit.a
XDIFF_LIB = xdiff/lib.a
VCSSVN_LIB = vcs-svn/lib.a
-LIB_H += xdiff/xinclude.h
-LIB_H += xdiff/xmacros.h
-LIB_H += xdiff/xdiff.h
-LIB_H += xdiff/xtypes.h
-LIB_H += xdiff/xutils.h
-LIB_H += xdiff/xprepare.h
-LIB_H += xdiff/xdiffi.h
-LIB_H += xdiff/xemit.h
-
-LIB_H += vcs-svn/line_buffer.h
-LIB_H += vcs-svn/sliding_window.h
-LIB_H += vcs-svn/repo_tree.h
-LIB_H += vcs-svn/fast_export.h
-LIB_H += vcs-svn/svndiff.h
-LIB_H += vcs-svn/svndump.h
-
GENERATED_H += common-cmds.h
LIB_H += advice.h
@@ -736,11 +718,24 @@ LIB_H += url.h
LIB_H += userdiff.h
LIB_H += utf8.h
LIB_H += varint.h
+LIB_H += vcs-svn/fast_export.h
+LIB_H += vcs-svn/line_buffer.h
+LIB_H += vcs-svn/repo_tree.h
+LIB_H += vcs-svn/sliding_window.h
+LIB_H += vcs-svn/svndiff.h
+LIB_H += vcs-svn/svndump.h
LIB_H += walker.h
LIB_H += wildmatch.h
LIB_H += wt-status.h
LIB_H += xdiff-interface.h
LIB_H += xdiff/xdiff.h
+LIB_H += xdiff/xdiffi.h
+LIB_H += xdiff/xemit.h
+LIB_H += xdiff/xinclude.h
+LIB_H += xdiff/xmacros.h
+LIB_H += xdiff/xprepare.h
+LIB_H += xdiff/xtypes.h
+LIB_H += xdiff/xutils.h
LIB_OBJS += abspath.o
LIB_OBJS += advice.o
@@ -1249,10 +1244,6 @@ endif
ifdef NO_STRTOULL
COMPAT_CFLAGS += -DNO_STRTOULL
endif
-ifdef NO_STRTOK_R
- COMPAT_CFLAGS += -DNO_STRTOK_R
- COMPAT_OBJS += compat/strtok_r.o
-endif
ifdef NO_FNMATCH
COMPAT_CFLAGS += -Icompat/fnmatch
COMPAT_CFLAGS += -DNO_FNMATCH
@@ -1821,12 +1812,14 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
mv $@+ $@
endif # NO_PYTHON
+CONFIGURE_RECIPE = $(RM) configure configure.ac+ && \
+ sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ configure.ac >configure.ac+ && \
+ autoconf -o configure configure.ac+ && \
+ $(RM) configure.ac+
+
configure: configure.ac GIT-VERSION-FILE
- $(QUIET_GEN)$(RM) $@ $<+ && \
- sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
- $< > $<+ && \
- autoconf -o $@ $<+ && \
- $(RM) $<+
+ $(QUIET_GEN)$(CONFIGURE_RECIPE)
ifdef AUTOCONFIGURED
# We avoid depending on 'configure' here, because it gets rebuilt
@@ -1835,7 +1828,7 @@ ifdef AUTOCONFIGURED
# do want to recheck when the platform/environment detection logic
# changes, hence this depends on configure.ac.
config.status: configure.ac
- $(QUIET_GEN)$(MAKE) configure && \
+ $(QUIET_GEN)$(CONFIGURE_RECIPE) && \
if test -f config.status; then \
./config.status --recheck; \
else \
diff --git a/RelNotes b/RelNotes
index bdce3136ea..80b7e388ad 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/1.8.2.txt \ No newline at end of file
+Documentation/RelNotes/1.8.3.txt \ No newline at end of file
diff --git a/advice.c b/advice.c
index 780f58da0f..3bc86260b8 100644
--- a/advice.c
+++ b/advice.c
@@ -8,6 +8,7 @@ int advice_push_already_exists = 1;
int advice_push_fetch_first = 1;
int advice_push_needs_force = 1;
int advice_status_hints = 1;
+int advice_status_u_option = 1;
int advice_commit_before_merge = 1;
int advice_resolve_conflict = 1;
int advice_implicit_identity = 1;
@@ -25,6 +26,7 @@ static struct {
{ "pushfetchfirst", &advice_push_fetch_first },
{ "pushneedsforce", &advice_push_needs_force },
{ "statushints", &advice_status_hints },
+ { "statusuoption", &advice_status_u_option },
{ "commitbeforemerge", &advice_commit_before_merge },
{ "resolveconflict", &advice_resolve_conflict },
{ "implicitidentity", &advice_implicit_identity },
diff --git a/advice.h b/advice.h
index fad36df467..af0c983c68 100644
--- a/advice.h
+++ b/advice.h
@@ -11,6 +11,7 @@ extern int advice_push_already_exists;
extern int advice_push_fetch_first;
extern int advice_push_needs_force;
extern int advice_status_hints;
+extern int advice_status_u_option;
extern int advice_commit_before_merge;
extern int advice_resolve_conflict;
extern int advice_implicit_identity;
diff --git a/archive-zip.c b/archive-zip.c
index d3aef532b7..b2c4fe0e9f 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -111,8 +111,9 @@ static void copy_le32(unsigned char *dest, unsigned int n)
dest[3] = 0xff & (n >> 030);
}
-static void *zlib_deflate(void *data, unsigned long size,
- int compression_level, unsigned long *compressed_size)
+static void *zlib_deflate_raw(void *data, unsigned long size,
+ int compression_level,
+ unsigned long *compressed_size)
{
git_zstream stream;
unsigned long maxsize;
@@ -120,7 +121,7 @@ static void *zlib_deflate(void *data, unsigned long size,
int result;
memset(&stream, 0, sizeof(stream));
- git_deflate_init(&stream, compression_level);
+ git_deflate_init_raw(&stream, compression_level);
maxsize = git_deflate_bound(&stream, size);
buffer = xmalloc(maxsize);
@@ -240,7 +241,6 @@ static int write_zip_entry(struct archiver_args *args,
(mode & 0111) ? ((mode) << 16) : 0;
if (S_ISREG(mode) && args->compression_level != 0 && size > 0)
method = 8;
- compressed_size = (method == 0) ? size : 0;
if (S_ISREG(mode) && type == OBJ_BLOB && !args->convert &&
size > big_file_threshold) {
@@ -259,20 +259,18 @@ static int write_zip_entry(struct archiver_args *args,
crc = crc32(crc, buffer, size);
out = buffer;
}
+ compressed_size = (method == 0) ? size : 0;
} else {
return error("unsupported file mode: 0%o (SHA1: %s)", mode,
sha1_to_hex(sha1));
}
if (buffer && method == 8) {
- deflated = zlib_deflate(buffer, size, args->compression_level,
- &compressed_size);
- if (deflated && compressed_size - 6 < size) {
- /* ZLIB --> raw compressed data (see RFC 1950) */
- /* CMF and FLG ... */
- out = (unsigned char *)deflated + 2;
- compressed_size -= 6; /* ... and ADLER32 */
- } else {
+ out = deflated = zlib_deflate_raw(buffer, size,
+ args->compression_level,
+ &compressed_size);
+ if (!out || compressed_size >= size) {
+ out = buffer;
method = 0;
compressed_size = size;
}
@@ -353,7 +351,7 @@ static int write_zip_entry(struct archiver_args *args,
unsigned char compressed[STREAM_BUFFER_SIZE * 2];
memset(&zstream, 0, sizeof(zstream));
- git_deflate_init(&zstream, args->compression_level);
+ git_deflate_init_raw(&zstream, args->compression_level);
compressed_size = 0;
zstream.next_out = compressed;
@@ -370,13 +368,10 @@ static int write_zip_entry(struct archiver_args *args,
result = git_deflate(&zstream, 0);
if (result != Z_OK)
die("deflate error (%d)", result);
- out = compressed;
- if (!compressed_size)
- out += 2;
- out_len = zstream.next_out - out;
+ out_len = zstream.next_out - compressed;
if (out_len > 0) {
- write_or_die(1, out, out_len);
+ write_or_die(1, compressed, out_len);
compressed_size += out_len;
zstream.next_out = compressed;
zstream.avail_out = sizeof(compressed);
@@ -394,11 +389,8 @@ static int write_zip_entry(struct archiver_args *args,
die("deflate error (%d)", result);
git_deflate_end(&zstream);
- out = compressed;
- if (!compressed_size)
- out += 2;
- out_len = zstream.next_out - out - 4;
- write_or_die(1, out, out_len);
+ out_len = zstream.next_out - compressed;
+ write_or_die(1, compressed, out_len);
compressed_size += out_len;
zip_offset += compressed_size;
diff --git a/archive.c b/archive.c
index 93e00bb4ae..d254fa5d5c 100644
--- a/archive.c
+++ b/archive.c
@@ -234,7 +234,7 @@ static void parse_pathspec_arg(const char **pathspec,
ar_args->pathspec = pathspec = get_pathspec("", pathspec);
if (pathspec) {
while (*pathspec) {
- if (!path_exists(ar_args->tree, *pathspec))
+ if (**pathspec && !path_exists(ar_args->tree, *pathspec))
die("path not found: %s", *pathspec);
pathspec++;
}
diff --git a/attr.c b/attr.c
index 4657cc233c..e2f9377891 100644
--- a/attr.c
+++ b/attr.c
@@ -255,9 +255,11 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
&res->u.pat.patternlen,
&res->u.pat.flags,
&res->u.pat.nowildcardlen);
- if (res->u.pat.flags & EXC_FLAG_NEGATIVE)
- die(_("Negative patterns are forbidden in git attributes\n"
- "Use '\\!' for literal leading exclamation."));
+ if (res->u.pat.flags & EXC_FLAG_NEGATIVE) {
+ warning(_("Negative patterns are ignored in git attributes\n"
+ "Use '\\!' for literal leading exclamation."));
+ return NULL;
+ }
}
res->is_macro = is_macro;
res->num_attr = num_attr;
diff --git a/builtin/add.c b/builtin/add.c
index 0dd014eb96..ab1c9e8fb7 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -328,9 +328,9 @@ static void warn_pathless_add(const char *option_name, const char *short_name) {
* this is not the original behavior and can't be
* changed until users trained themselves not to type
* "git add -u" or "git add -A". For now, we warn and
- * keep the old behavior. Later, this warning can be
- * turned into a die(...), and eventually we may
- * reallow the command with a new behavior.
+ * keep the old behavior. Later, the behavior can be changed
+ * to tree-wide, keeping the warning for a while, and
+ * eventually we can drop the warning.
*/
warning(_("The behavior of 'git add %s (or %s)' with no path argument from a\n"
"subdirectory of the tree will change in Git 2.0 and should not be used anymore.\n"
diff --git a/builtin/branch.c b/builtin/branch.c
index 6371bf96c4..00d17d25d1 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -889,6 +889,17 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
} else if (new_upstream) {
struct branch *branch = branch_get(argv[0]);
+ if (argc > 1)
+ die(_("too many branches to set new upstream"));
+
+ if (!branch) {
+ if (!argc || !strcmp(argv[0], "HEAD"))
+ die(_("could not set upstream of HEAD to %s when "
+ "it does not point to any branch."),
+ new_upstream);
+ die(_("no such branch '%s'"), argv[0]);
+ }
+
if (!ref_exists(branch->refname))
die(_("branch '%s' does not exist"), branch->name);
@@ -901,6 +912,16 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
struct branch *branch = branch_get(argv[0]);
struct strbuf buf = STRBUF_INIT;
+ if (argc > 1)
+ die(_("too many branches to unset upstream"));
+
+ if (!branch) {
+ if (!argc || !strcmp(argv[0], "HEAD"))
+ die(_("could not unset upstream of HEAD when "
+ "it does not point to any branch."));
+ die(_("no such branch '%s'"), argv[0]);
+ }
+
if (!branch_has_merge_config(branch)) {
die(_("Branch '%s' has no upstream information"), branch->name);
}
@@ -916,6 +937,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
int branch_existed = 0, remote_tracking = 0;
struct strbuf buf = STRBUF_INIT;
+ if (!strcmp(argv[0], "HEAD"))
+ die(_("it does not make sense to create 'HEAD' manually"));
+
+ if (!branch)
+ die(_("no such branch '%s'"), argv[0]);
+
if (kinds != REF_LOCAL_BRANCH)
die(_("-a and -r options to 'git branch' do not make sense with a branch name"));
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 00528ddc38..40f87b4649 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -193,7 +193,7 @@ static int batch_one_object(const char *obj_name, int print_contents)
unsigned char sha1[20];
enum object_type type = 0;
unsigned long size;
- void *contents = contents;
+ void *contents = NULL;
if (!obj_name)
return 1;
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 709535ce09..0240f99b57 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -89,7 +89,7 @@ static int check_ignore(const char *prefix, const char **pathspec)
? strlen(prefix) : 0, path);
full_path = check_path_for_gitlink(full_path);
die_if_path_beyond_symlink(full_path, prefix);
- if (!seen[i] && path[0]) {
+ if (!seen[i]) {
exclude = last_exclude_matching_path(&check, full_path,
-1, &dtype);
if (exclude) {
diff --git a/builtin/commit.c b/builtin/commit.c
index 3348aa14e9..46204375e7 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -124,8 +124,10 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
if (unset)
strbuf_setlen(buf, 0);
else {
+ if (buf->len)
+ strbuf_addch(buf, '\n');
strbuf_addstr(buf, arg);
- strbuf_addstr(buf, "\n\n");
+ strbuf_complete_line(buf);
}
return 0;
}
@@ -700,7 +702,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
previous = eol;
}
- append_signoff(&sb, ignore_footer);
+ append_signoff(&sb, ignore_footer, 0);
}
if (fwrite(sb.buf, 1, sb.len, s->fp) < sb.len)
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index 9afaa88f77..3a01a8d085 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -9,11 +9,22 @@
#include "builtin.h"
#include "parse-options.h"
+static unsigned long garbage;
+static off_t size_garbage;
+
+static void real_report_garbage(const char *desc, const char *path)
+{
+ struct stat st;
+ if (!stat(path, &st))
+ size_garbage += st.st_size;
+ warning("%s: %s", desc, path);
+ garbage++;
+}
+
static void count_objects(DIR *d, char *path, int len, int verbose,
unsigned long *loose,
off_t *loose_size,
- unsigned long *packed_loose,
- unsigned long *garbage)
+ unsigned long *packed_loose)
{
struct dirent *ent;
while ((ent = readdir(d)) != NULL) {
@@ -46,9 +57,11 @@ static void count_objects(DIR *d, char *path, int len, int verbose,
}
if (bad) {
if (verbose) {
- error("garbage found: %.*s/%s",
- len + 2, path, ent->d_name);
- (*garbage)++;
+ struct strbuf sb = STRBUF_INIT;
+ strbuf_addf(&sb, "%.*s/%s",
+ len + 2, path, ent->d_name);
+ report_garbage("garbage found", sb.buf);
+ strbuf_release(&sb);
}
continue;
}
@@ -76,7 +89,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
const char *objdir = get_object_directory();
int len = strlen(objdir);
char *path = xmalloc(len + 50);
- unsigned long loose = 0, packed = 0, packed_loose = 0, garbage = 0;
+ unsigned long loose = 0, packed = 0, packed_loose = 0;
off_t loose_size = 0;
struct option opts[] = {
OPT__VERBOSE(&verbose, N_("be verbose")),
@@ -87,6 +100,8 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
/* we do not take arguments other than flags for now */
if (argc)
usage_with_options(count_objects_usage, opts);
+ if (verbose)
+ report_garbage = real_report_garbage;
memcpy(path, objdir, len);
if (len && objdir[len-1] != '/')
path[len++] = '/';
@@ -97,7 +112,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
if (!d)
continue;
count_objects(d, path, len, verbose,
- &loose, &loose_size, &packed_loose, &garbage);
+ &loose, &loose_size, &packed_loose);
closedir(d);
}
if (verbose) {
@@ -122,6 +137,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
printf("size-pack: %lu\n", (unsigned long) (size_pack / 1024));
printf("prune-packable: %lu\n", packed_loose);
printf("garbage: %lu\n", garbage);
+ printf("size-garbage: %lu\n", (unsigned long) (size_garbage / 1024));
}
else
printf("%lu objects, %lu kilobytes\n",
diff --git a/builtin/describe.c b/builtin/describe.c
index 04c185b1fb..6636a68cd9 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -137,40 +137,39 @@ static void add_to_known_names(const char *path,
static int get_name(const char *path, const unsigned char *sha1, int flag, void *cb_data)
{
- int might_be_tag = !prefixcmp(path, "refs/tags/");
+ int is_tag = !prefixcmp(path, "refs/tags/");
unsigned char peeled[20];
- int is_tag, prio;
+ int is_annotated, prio;
- if (!all && !might_be_tag)
+ /* Reject anything outside refs/tags/ unless --all */
+ if (!all && !is_tag)
return 0;
+ /* Accept only tags that match the pattern, if given */
+ if (pattern && (!is_tag || fnmatch(pattern, path + 10, 0)))
+ return 0;
+
+ /* Is it annotated? */
if (!peel_ref(path, peeled)) {
- is_tag = !!hashcmp(sha1, peeled);
+ is_annotated = !!hashcmp(sha1, peeled);
} else {
hashcpy(peeled, sha1);
- is_tag = 0;
+ is_annotated = 0;
}
- /* If --all, then any refs are used.
- * If --tags, then any tags are used.
- * Otherwise only annotated tags are used.
+ /*
+ * By default, we only use annotated tags, but with --tags
+ * we fall back to lightweight ones (even without --tags,
+ * we still remember lightweight ones, only to give hints
+ * in an error message). --all allows any refs to be used.
*/
- if (might_be_tag) {
- if (is_tag)
- prio = 2;
- else
- prio = 1;
-
- if (pattern && fnmatch(pattern, path + 10, 0))
- prio = 0;
- }
+ if (is_annotated)
+ prio = 2;
+ else if (is_tag)
+ prio = 1;
else
prio = 0;
- if (!all) {
- if (!prio)
- return 0;
- }
add_to_known_names(all ? path + 5 : path + 10, peeled, prio, sha1);
return 0;
}
@@ -402,8 +401,8 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
struct option options[] = {
OPT_BOOLEAN(0, "contains", &contains, N_("find the tag that comes after the commit")),
OPT_BOOLEAN(0, "debug", &debug, N_("debug search strategy on stderr")),
- OPT_BOOLEAN(0, "all", &all, N_("use any ref in .git/refs")),
- OPT_BOOLEAN(0, "tags", &tags, N_("use any tag in .git/refs/tags")),
+ OPT_BOOLEAN(0, "all", &all, N_("use any ref")),
+ OPT_BOOLEAN(0, "tags", &tags, N_("use any tag, even unannotated")),
OPT_BOOLEAN(0, "long", &longformat, N_("always use long format")),
OPT__ABBREV(&abbrev),
OPT_SET_INT(0, "exact-match", &max_candidates,
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 77dffd1ce3..d380155d9c 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -113,12 +113,13 @@ static void show_progress(void)
printf("progress %d objects\n", counter);
}
-static void handle_object(const unsigned char *sha1)
+static void export_blob(const unsigned char *sha1)
{
unsigned long size;
enum object_type type;
char *buf;
struct object *object;
+ int eaten;
if (no_data)
return;
@@ -126,16 +127,18 @@ static void handle_object(const unsigned char *sha1)
if (is_null_sha1(sha1))
return;
- object = parse_object(sha1);
- if (!object)
- die ("Could not read blob %s", sha1_to_hex(sha1));
-
- if (object->flags & SHOWN)
+ object = lookup_object(sha1);
+ if (object && object->flags & SHOWN)
return;
buf = read_sha1_file(sha1, &type, &size);
if (!buf)
die ("Could not read blob %s", sha1_to_hex(sha1));
+ if (check_sha1_signature(sha1, buf, size, typename(type)) < 0)
+ die("sha1 mismatch in blob %s", sha1_to_hex(sha1));
+ object = parse_object_buffer(sha1, type, size, buf, &eaten);
+ if (!object)
+ die("Could not read blob %s", sha1_to_hex(sha1));
mark_next_object(object);
@@ -147,7 +150,8 @@ static void handle_object(const unsigned char *sha1)
show_progress();
object->flags |= SHOWN;
- free(buf);
+ if (!eaten)
+ free(buf);
}
static int depth_first(const void *a_, const void *b_)
@@ -312,7 +316,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
/* Export the referenced blobs, and remember the marks. */
for (i = 0; i < diff_queued_diff.nr; i++)
if (!S_ISGITLINK(diff_queued_diff.queue[i]->two->mode))
- handle_object(diff_queued_diff.queue[i]->two->sha1);
+ export_blob(diff_queued_diff.queue[i]->two->sha1);
mark_next_object(&commit->object);
if (!is_encoding_utf8(encoding))
@@ -512,7 +516,7 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info,
commit = (struct commit *)tag;
break;
case OBJ_BLOB:
- handle_object(tag->object.sha1);
+ export_blob(tag->object.sha1);
continue;
default: /* OBJ_TAG (nested tags) is already handled */
warning("Tag points to object of unexpected type %s, skipping.",
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 03ed2caae3..aba4465552 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -7,12 +7,31 @@ static const char fetch_pack_usage[] =
"[--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] "
"[--no-progress] [-v] [<host>:]<directory> [<refs>...]";
+static void add_sought_entry_mem(struct ref ***sought, int *nr, int *alloc,
+ const char *name, int namelen)
+{
+ struct ref *ref = xcalloc(1, sizeof(*ref) + namelen + 1);
+
+ memcpy(ref->name, name, namelen);
+ ref->name[namelen] = '\0';
+ (*nr)++;
+ ALLOC_GROW(*sought, *nr, *alloc);
+ (*sought)[*nr - 1] = ref;
+}
+
+static void add_sought_entry(struct ref ***sought, int *nr, int *alloc,
+ const char *string)
+{
+ add_sought_entry_mem(sought, nr, alloc, string, strlen(string));
+}
+
int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
{
int i, ret;
struct ref *ref = NULL;
const char *dest = NULL;
- struct string_list sought = STRING_LIST_INIT_DUP;
+ struct ref **sought = NULL;
+ int nr_sought = 0, alloc_sought = 0;
int fd[2];
char *pack_lockfile = NULL;
char **pack_lockfile_ptr = NULL;
@@ -94,7 +113,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
* refs from the standard input:
*/
for (; i < argc; i++)
- string_list_append(&sought, xstrdup(argv[i]));
+ add_sought_entry(&sought, &nr_sought, &alloc_sought, argv[i]);
if (args.stdin_refs) {
if (args.stateless_rpc) {
/* in stateless RPC mode we use pkt-line to read
@@ -104,14 +123,14 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
char *line = packet_read_line(0, NULL);
if (!line)
break;
- string_list_append(&sought, xstrdup(line));
+ add_sought_entry(&sought, &nr_sought, &alloc_sought, line);
}
}
else {
/* read from stdin one ref per line, until EOF */
struct strbuf line = STRBUF_INIT;
while (strbuf_getline(&line, stdin, '\n') != EOF)
- string_list_append(&sought, strbuf_detach(&line, NULL));
+ add_sought_entry(&sought, &nr_sought, &alloc_sought, line.buf);
strbuf_release(&line);
}
}
@@ -128,7 +147,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
get_remote_heads(fd[0], NULL, 0, &ref, 0, NULL);
ref = fetch_pack(&args, fd, conn, ref, dest,
- &sought, pack_lockfile_ptr);
+ sought, nr_sought, pack_lockfile_ptr);
if (pack_lockfile) {
printf("lock %s\n", pack_lockfile);
fflush(stdout);
@@ -138,7 +157,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
if (finish_connect(conn))
return 1;
- ret = !ref || sought.nr;
+ ret = !ref;
/*
* If the heads to pull were given, we should have consumed
@@ -146,8 +165,13 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
* remote no-such-ref' would silently succeed without issuing
* an error.
*/
- for (i = 0; i < sought.nr; i++)
- error("no such remote ref %s", sought.items[i].string);
+ for (i = 0; i < nr_sought; i++) {
+ if (!sought[i] || sought[i]->matched)
+ continue;
+ error("no such remote ref %s", sought[i]->name);
+ ret = 1;
+ }
+
while (ref) {
printf("%s %s\n",
sha1_to_hex(ref->old_sha1), ref->name);
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index b49612f0ce..265a9253bf 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -492,7 +492,7 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
if (size == len)
; /* merely annotated */
- else if (verify_signed_buffer(buf, len, buf + len, size - len, &sig)) {
+ else if (verify_signed_buffer(buf, len, buf + len, size - len, &sig, NULL)) {
if (!sig.len)
strbuf_addstr(&sig, "gpg verification failed.\n");
}
diff --git a/builtin/grep.c b/builtin/grep.c
index 8025964987..159e65d47a 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -820,9 +820,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
unsigned char sha1[20];
/* Is it a rev? */
if (!get_sha1(arg, sha1)) {
- struct object *object = parse_object(sha1);
- if (!object)
- die(_("bad object %s"), arg);
+ struct object *object = parse_object_or_die(sha1, arg);
if (!seen_dashdash)
verify_non_filename(prefix, arg);
add_object_array(object, arg, &list);
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 43d364b8d5..ef62124aa4 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1099,7 +1099,7 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
if (fix_thin_pack) {
struct sha1file *f;
unsigned char read_sha1[20], tail_sha1[20];
- char msg[48];
+ struct strbuf msg = STRBUF_INIT;
int nr_unresolved = nr_deltas - nr_resolved_deltas;
int nr_objects_initial = nr_objects;
if (nr_unresolved <= 0)
@@ -1109,9 +1109,10 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
* sizeof(*objects));
f = sha1fd(output_fd, curr_pack);
fix_unresolved_deltas(f, nr_unresolved);
- sprintf(msg, _("completed with %d local objects"),
- nr_objects - nr_objects_initial);
- stop_progress_msg(&progress, msg);
+ strbuf_addf(&msg, _("completed with %d local objects"),
+ nr_objects - nr_objects_initial);
+ stop_progress_msg(&progress, msg.buf);
+ strbuf_release(&msg);
sha1close(f, tail_sha1, 0);
hashcpy(read_sha1, pack_sha1);
fixup_pack_header_footer(output_fd, pack_sha1,
diff --git a/builtin/log.c b/builtin/log.c
index 8f0b2e84fe..59de484bc2 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1086,7 +1086,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
struct commit *origin = NULL, *head = NULL;
const char *in_reply_to = NULL;
struct patch_ids ids;
- char *add_signoff = NULL;
struct strbuf buf = STRBUF_INIT;
int use_patch_format = 0;
int quiet = 0;
@@ -1193,16 +1192,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.subject_prefix = strbuf_detach(&sprefix, NULL);
}
- if (do_signoff) {
- const char *committer;
- const char *endpos;
- committer = git_committer_info(IDENT_STRICT);
- endpos = strchr(committer, '>');
- if (!endpos)
- die(_("bogus committer info %s"), committer);
- add_signoff = xmemdupz(committer, endpos - committer + 1);
- }
-
for (i = 0; i < extra_hdr.nr; i++) {
strbuf_addstr(&buf, extra_hdr.items[i].string);
strbuf_addch(&buf, '\n');
@@ -1393,7 +1382,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
total++;
start_number--;
}
- rev.add_signoff = add_signoff;
+ rev.add_signoff = do_signoff;
while (0 <= --nr) {
int shown;
commit = list[nr];
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 2d4327801e..06296d4bdf 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -130,6 +130,27 @@ static int populate_maildir_list(struct string_list *list, const char *path)
return 0;
}
+static int maildir_filename_cmp(const char *a, const char *b)
+{
+ while (*a && *b) {
+ if (isdigit(*a) && isdigit(*b)) {
+ long int na, nb;
+ na = strtol(a, (char **)&a, 10);
+ nb = strtol(b, (char **)&b, 10);
+ if (na != nb)
+ return na - nb;
+ /* strtol advanced our pointers */
+ }
+ else {
+ if (*a != *b)
+ return (unsigned char)*a - (unsigned char)*b;
+ a++;
+ b++;
+ }
+ }
+ return (unsigned char)*a - (unsigned char)*b;
+}
+
static int split_maildir(const char *maildir, const char *dir,
int nr_prec, int skip)
{
@@ -139,6 +160,8 @@ static int split_maildir(const char *maildir, const char *dir,
int i;
struct string_list list = STRING_LIST_INIT_DUP;
+ list.cmp = maildir_filename_cmp;
+
if (populate_maildir_list(&list, maildir) < 0)
goto out;
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index e0d0b7d28b..bc912e399e 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -245,7 +245,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
unsigned dirmask = 0, mask = 0;
for (i = 0; i < 3; i++) {
- mask |= (1 << 1);
+ mask |= (1 << i);
if (n[i].mode && S_ISDIR(n[i].mode))
dirmask |= (1 << i);
}
diff --git a/builtin/prune.c b/builtin/prune.c
index 8cb8b9186a..85843d4f17 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -149,9 +149,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
const char *name = *argv++;
if (!get_sha1(name, sha1)) {
- struct object *object = parse_object(sha1);
- if (!object)
- die("bad object: %s", name);
+ struct object *object = parse_object_or_die(sha1, name);
add_pending_object(&revs, object, "");
}
else
diff --git a/builtin/push.c b/builtin/push.c
index 42b129d36c..5e4a0e958f 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -437,6 +437,8 @@ int cmd_push(int argc, const char **argv, const char *prefix)
OPT_BIT(0, "prune", &flags, N_("prune locally removed refs"),
TRANSPORT_PUSH_PRUNE),
OPT_BIT(0, "no-verify", &flags, N_("bypass pre-push hook"), TRANSPORT_PUSH_NO_HOOK),
+ OPT_BIT(0, "follow-tags", &flags, N_("push missing but relevant tags"),
+ TRANSPORT_PUSH_FOLLOW_TAGS),
OPT_END()
};
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 1fedf66329..72a0af70c3 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -414,7 +414,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
if (cb.unreachable_expire_kind == UE_HEAD) {
struct commit_list *elem;
for (elem = tips; elem; elem = elem->next)
- clear_commit_marks(tip_commit, REACHABLE);
+ clear_commit_marks(elem->item, REACHABLE);
free_commit_list(tips);
} else {
clear_commit_marks(tip_commit, REACHABLE);
diff --git a/builtin/tag.c b/builtin/tag.c
index f8266888cc..af3af3f649 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -582,7 +582,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
die(_("%s: cannot lock the ref"), ref.buf);
if (write_ref_sha1(lock, object, NULL) < 0)
die(_("%s: cannot update the ref"), ref.buf);
- if (force && hashcmp(prev, object))
+ if (force && !is_null_sha1(prev) && hashcmp(prev, object))
printf(_("Updated tag '%s' (was %s)\n"), tag, find_unique_abbrev(prev, DEFAULT_ABBREV));
strbuf_release(&buf);
diff --git a/builtin/update-index.c b/builtin/update-index.c
index ada1dff846..5c7762eef4 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -796,7 +796,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
};
if (argc == 2 && !strcmp(argv[1], "-h"))
- usage(update_index_usage[0]);
+ usage_with_options(update_index_usage, options);
git_config(git_default_config, NULL);
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index a8eee886a5..9cdf332333 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -29,7 +29,7 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
if (size == len)
return error("no signature found");
- return verify_signed_buffer(buf, len, buf + len, size - len, NULL);
+ return verify_signed_buffer(buf, len, buf + len, size - len, NULL, NULL);
}
static int verify_tag(const char *name, int verbose)
diff --git a/bundle.c b/bundle.c
index 8d12816b9d..505e07e934 100644
--- a/bundle.c
+++ b/bundle.c
@@ -183,17 +183,17 @@ int verify_bundle(struct bundle_header *header, int verbose)
struct ref_list *r;
r = &header->references;
- printf_ln(Q_("The bundle contains %d ref",
- "The bundle contains %d refs",
+ printf_ln(Q_("The bundle contains this ref:",
+ "The bundle contains these %d refs:",
r->nr),
r->nr);
list_refs(r, 0, NULL);
+ r = &header->prerequisites;
if (!r->nr) {
printf_ln(_("The bundle records a complete history."));
} else {
- r = &header->prerequisites;
- printf_ln(Q_("The bundle requires this ref",
- "The bundle requires these %d refs",
+ printf_ln(Q_("The bundle requires this ref:",
+ "The bundle requires these %d refs:",
r->nr),
r->nr);
list_refs(r, 0, NULL);
@@ -279,12 +279,12 @@ int create_bundle(struct bundle_header *header, const char *path,
if (buf.len > 0 && buf.buf[0] == '-') {
write_or_die(bundle_fd, buf.buf, buf.len);
if (!get_sha1_hex(buf.buf + 1, sha1)) {
- struct object *object = parse_object(sha1);
+ struct object *object = parse_object_or_die(sha1, buf.buf);
object->flags |= UNINTERESTING;
add_pending_object(&revs, object, xstrdup(buf.buf));
}
} else if (!get_sha1_hex(buf.buf, sha1)) {
- struct object *object = parse_object(sha1);
+ struct object *object = parse_object_or_die(sha1, buf.buf);
object->flags |= SHOWN;
}
}
@@ -361,7 +361,7 @@ int create_bundle(struct bundle_header *header, const char *path,
* end up triggering "empty bundle"
* error.
*/
- obj = parse_object(sha1);
+ obj = parse_object_or_die(sha1, e->name);
obj->flags |= SHOWN;
add_pending_object(&revs, obj, e->name);
}
diff --git a/cache.h b/cache.h
index db646a2ff8..bcdb3edbc4 100644
--- a/cache.h
+++ b/cache.h
@@ -34,6 +34,7 @@ int git_inflate(git_zstream *, int flush);
void git_deflate_init(git_zstream *, int level);
void git_deflate_init_gzip(git_zstream *, int level);
+void git_deflate_init_raw(git_zstream *, int level);
void git_deflate_end(git_zstream *);
int git_deflate_abort(git_zstream *);
int git_deflate_end_gently(git_zstream *);
@@ -341,9 +342,11 @@ static inline enum object_type object_type(unsigned int mode)
OBJ_BLOB;
}
+/* Double-check local_repo_env below if you add to this list. */
#define GIT_DIR_ENVIRONMENT "GIT_DIR"
#define GIT_NAMESPACE_ENVIRONMENT "GIT_NAMESPACE"
#define GIT_WORK_TREE_ENVIRONMENT "GIT_WORK_TREE"
+#define GIT_PREFIX_ENVIRONMENT "GIT_PREFIX"
#define DEFAULT_GIT_DIR_ENVIRONMENT ".git"
#define DB_ENVIRONMENT "GIT_OBJECT_DIRECTORY"
#define INDEX_ENVIRONMENT "GIT_INDEX_FILE"
@@ -365,13 +368,24 @@ static inline enum object_type object_type(unsigned int mode)
#define GIT_LITERAL_PATHSPECS_ENVIRONMENT "GIT_LITERAL_PATHSPECS"
/*
- * Repository-local GIT_* environment variables
- * The array is NULL-terminated to simplify its usage in contexts such
- * environment creation or simple walk of the list.
- * The number of non-NULL entries is available as a macro.
+ * This environment variable is expected to contain a boolean indicating
+ * whether we should or should not treat:
+ *
+ * GIT_DIR=foo.git git ...
+ *
+ * as if GIT_WORK_TREE=. was given. It's not expected that users will make use
+ * of this, but we use it internally to communicate to sub-processes that we
+ * are in a bare repo. If not set, defaults to true.
+ */
+#define GIT_IMPLICIT_WORK_TREE_ENVIRONMENT "GIT_IMPLICIT_WORK_TREE"
+
+/*
+ * Repository-local GIT_* environment variables; these will be cleared
+ * when git spawns a sub-process that runs inside another repository.
+ * The array is NULL-terminated, which makes it easy to pass in the "env"
+ * parameter of a run-command invocation, or to do a simple walk.
*/
-#define LOCAL_REPO_ENV_SIZE 9
-extern const char *const local_repo_env[LOCAL_REPO_ENV_SIZE + 1];
+extern const char * const local_repo_env[];
extern int is_bare_repository_cfg;
extern int is_bare_repository(void);
@@ -1017,7 +1031,8 @@ struct ref {
force:1,
forced_update:1,
merge:1,
- deletion:1;
+ deletion:1,
+ matched:1;
enum {
REF_STATUS_NONE = 0,
REF_STATUS_OK,
@@ -1059,6 +1074,9 @@ extern const char *parse_feature_value(const char *feature_list, const char *fea
extern struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_path);
+/* A hook for count-objects to report invalid files in pack directory */
+extern void (*report_garbage)(const char *desc, const char *path);
+
extern void prepare_packed_git(void);
extern void reprepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);
diff --git a/combine-diff.c b/combine-diff.c
index 35d41cd56d..6288485965 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -5,6 +5,7 @@
#include "diffcore.h"
#include "quote.h"
#include "xdiff-interface.h"
+#include "xdiff/xmacros.h"
#include "log-tree.h"
#include "refs.h"
#include "userdiff.h"
@@ -122,7 +123,47 @@ static char *grab_blob(const unsigned char *sha1, unsigned int mode,
return blob;
}
-static void append_lost(struct sline *sline, int n, const char *line, int len)
+static int match_string_spaces(const char *line1, int len1,
+ const char *line2, int len2,
+ long flags)
+{
+ if (flags & XDF_WHITESPACE_FLAGS) {
+ for (; len1 > 0 && XDL_ISSPACE(line1[len1 - 1]); len1--);
+ for (; len2 > 0 && XDL_ISSPACE(line2[len2 - 1]); len2--);
+ }
+
+ if (!(flags & (XDF_IGNORE_WHITESPACE | XDF_IGNORE_WHITESPACE_CHANGE)))
+ return (len1 == len2 && !memcmp(line1, line2, len1));
+
+ while (len1 > 0 && len2 > 0) {
+ len1--;
+ len2--;
+ if (XDL_ISSPACE(line1[len1]) || XDL_ISSPACE(line2[len2])) {
+ if ((flags & XDF_IGNORE_WHITESPACE_CHANGE) &&
+ (!XDL_ISSPACE(line1[len1]) || !XDL_ISSPACE(line2[len2])))
+ return 0;
+
+ for (; len1 > 0 && XDL_ISSPACE(line1[len1]); len1--);
+ for (; len2 > 0 && XDL_ISSPACE(line2[len2]); len2--);
+ }
+ if (line1[len1] != line2[len2])
+ return 0;
+ }
+
+ if (flags & XDF_IGNORE_WHITESPACE) {
+ /* Consume remaining spaces */
+ for (; len1 > 0 && XDL_ISSPACE(line1[len1 - 1]); len1--);
+ for (; len2 > 0 && XDL_ISSPACE(line2[len2 - 1]); len2--);
+ }
+
+ /* We matched full line1 and line2 */
+ if (!len1 && !len2)
+ return 1;
+
+ return 0;
+}
+
+static void append_lost(struct sline *sline, int n, const char *line, int len, long flags)
{
struct lline *lline;
unsigned long this_mask = (1UL<<n);
@@ -133,8 +174,8 @@ static void append_lost(struct sline *sline, int n, const char *line, int len)
if (sline->lost_head) {
lline = sline->next_lost;
while (lline) {
- if (lline->len == len &&
- !memcmp(lline->line, line, len)) {
+ if (match_string_spaces(lline->line, lline->len,
+ line, len, flags)) {
lline->parent_map |= this_mask;
sline->next_lost = lline->next;
return;
@@ -162,6 +203,7 @@ struct combine_diff_state {
int n;
struct sline *sline;
struct sline *lost_bucket;
+ long flags;
};
static void consume_line(void *state_, char *line, unsigned long len)
@@ -201,7 +243,7 @@ static void consume_line(void *state_, char *line, unsigned long len)
return; /* not in any hunk yet */
switch (line[0]) {
case '-':
- append_lost(state->lost_bucket, state->n, line+1, len-1);
+ append_lost(state->lost_bucket, state->n, line+1, len-1, state->flags);
break;
case '+':
state->sline[state->lno-1].flag |= state->nmask;
@@ -215,7 +257,7 @@ static void combine_diff(const unsigned char *parent, unsigned int mode,
struct sline *sline, unsigned int cnt, int n,
int num_parent, int result_deleted,
struct userdiff_driver *textconv,
- const char *path)
+ const char *path, long flags)
{
unsigned int p_lno, lno;
unsigned long nmask = (1UL << n);
@@ -231,9 +273,10 @@ static void combine_diff(const unsigned char *parent, unsigned int mode,
parent_file.ptr = grab_blob(parent, mode, &sz, textconv, path);
parent_file.size = sz;
memset(&xpp, 0, sizeof(xpp));
- xpp.flags = 0;
+ xpp.flags = flags;
memset(&xecfg, 0, sizeof(xecfg));
memset(&state, 0, sizeof(state));
+ state.flags = flags;
state.nmask = nmask;
state.sline = sline;
state.lno = 1;
@@ -962,7 +1005,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
elem->parent[i].mode,
&result_file, sline,
cnt, i, num_parent, result_deleted,
- textconv, elem->path);
+ textconv, elem->path, opt->xdl_opts);
}
show_hunks = make_hunks(sline, cnt, num_parent, dense);
diff --git a/commit.c b/commit.c
index e8eb0aec55..b4512ab0b2 100644
--- a/commit.c
+++ b/commit.c
@@ -463,14 +463,23 @@ static void clear_commit_marks_1(struct commit_list **plist,
}
}
-void clear_commit_marks(struct commit *commit, unsigned int mark)
+void clear_commit_marks_many(int nr, struct commit **commit, unsigned int mark)
{
struct commit_list *list = NULL;
- commit_list_insert(commit, &list);
+
+ while (nr--) {
+ commit_list_insert(*commit, &list);
+ commit++;
+ }
while (list)
clear_commit_marks_1(&list, pop_commit(&list), mark);
}
+void clear_commit_marks(struct commit *commit, unsigned int mark)
+{
+ clear_commit_marks_many(1, &commit, mark);
+}
+
void clear_commit_marks_for_object_array(struct object_array *a, unsigned mark)
{
struct object *object;
@@ -797,8 +806,7 @@ struct commit_list *get_merge_bases_many(struct commit *one,
if (!result || !result->next) {
if (cleanup) {
clear_commit_marks(one, all_flags);
- for (i = 0; i < n; i++)
- clear_commit_marks(twos[i], all_flags);
+ clear_commit_marks_many(n, twos, all_flags);
}
return result;
}
@@ -816,8 +824,7 @@ struct commit_list *get_merge_bases_many(struct commit *one,
free_commit_list(result);
clear_commit_marks(one, all_flags);
- for (i = 0; i < n; i++)
- clear_commit_marks(twos[i], all_flags);
+ clear_commit_marks_many(n, twos, all_flags);
cnt = remove_redundant(rslt, cnt);
result = NULL;
@@ -852,25 +859,36 @@ int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
}
/*
- * Is "commit" an ancestor of (i.e. reachable from) the "reference"?
+ * Is "commit" an ancestor of one of the "references"?
*/
-int in_merge_bases(struct commit *commit, struct commit *reference)
+int in_merge_bases_many(struct commit *commit, int nr_reference, struct commit **reference)
{
struct commit_list *bases;
- int ret = 0;
+ int ret = 0, i;
- if (parse_commit(commit) || parse_commit(reference))
+ if (parse_commit(commit))
return ret;
+ for (i = 0; i < nr_reference; i++)
+ if (parse_commit(reference[i]))
+ return ret;
- bases = paint_down_to_common(commit, 1, &reference);
+ bases = paint_down_to_common(commit, nr_reference, reference);
if (commit->object.flags & PARENT2)
ret = 1;
clear_commit_marks(commit, all_flags);
- clear_commit_marks(reference, all_flags);
+ clear_commit_marks_many(nr_reference, reference, all_flags);
free_commit_list(bases);
return ret;
}
+/*
+ * Is "commit" an ancestor of (i.e. reachable from) the "reference"?
+ */
+int in_merge_bases(struct commit *commit, struct commit *reference)
+{
+ return in_merge_bases_many(commit, 1, &reference);
+}
+
struct commit_list *reduce_heads(struct commit_list *heads)
{
struct commit_list *p;
diff --git a/commit.h b/commit.h
index 4138bb4c08..2d90d9c27c 100644
--- a/commit.h
+++ b/commit.h
@@ -137,6 +137,7 @@ struct commit *pop_most_recent_commit(struct commit_list **list,
struct commit *pop_commit(struct commit_list **stack);
void clear_commit_marks(struct commit *commit, unsigned int mark);
+void clear_commit_marks_many(int nr, struct commit **commit, unsigned int mark);
void clear_commit_marks_for_object_array(struct object_array *a, unsigned mark);
/*
@@ -176,6 +177,7 @@ extern struct commit_list *get_shallow_commits(struct object_array *heads,
int is_descendant_of(struct commit *, struct commit_list *);
int in_merge_bases(struct commit *, struct commit *);
+int in_merge_bases_many(struct commit *, int, struct commit **);
extern int interactive_add(int argc, const char **argv, const char *prefix, int patch);
extern int run_add_interactive(const char *revision, const char *patch_mode,
diff --git a/compat/msvc.h b/compat/msvc.h
index aa4b56315a..96b6d605da 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -12,6 +12,8 @@
#define __attribute__(x)
#define strncasecmp _strnicmp
#define ftruncate _chsize
+#define strtoull _strtoui64
+#define strtoll _strtoi64
static __inline int strcasecmp (const char *s1, const char *s2)
{
diff --git a/compat/strtok_r.c b/compat/strtok_r.c
deleted file mode 100644
index 7b5d568a96..0000000000
--- a/compat/strtok_r.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Reentrant string tokenizer. Generic version.
- Copyright (C) 1991,1996-1999,2001,2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "../git-compat-util.h"
-
-/* Parse S into tokens separated by characters in DELIM.
- If S is NULL, the saved pointer in SAVE_PTR is used as
- the next starting point. For example:
- char s[] = "-abc-=-def";
- char *sp;
- x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
- x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
- x = strtok_r(NULL, "=", &sp); // x = NULL
- // s = "abc\0-def\0"
-*/
-char *
-gitstrtok_r (char *s, const char *delim, char **save_ptr)
-{
- char *token;
-
- if (s == NULL)
- s = *save_ptr;
-
- /* Scan leading delimiters. */
- s += strspn (s, delim);
- if (*s == '\0')
- {
- *save_ptr = s;
- return NULL;
- }
-
- /* Find the end of the token. */
- token = s;
- s = strpbrk (token, delim);
- if (s == NULL)
- /* This token finishes the string. */
- *save_ptr = token + strlen (token);
- else
- {
- /* Terminate the token and make *SAVE_PTR point past it. */
- *s = '\0';
- *save_ptr = s + 1;
- }
- return token;
-}
diff --git a/compat/vcbuild/include/sys/poll.h b/compat/vcbuild/include/sys/poll.h
deleted file mode 100644
index 0d8552a2c6..0000000000
--- a/compat/vcbuild/include/sys/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/unistd.h b/compat/vcbuild/include/unistd.h
index b14fcf94da..c65c2cd566 100644
--- a/compat/vcbuild/include/unistd.h
+++ b/compat/vcbuild/include/unistd.h
@@ -49,6 +49,9 @@ typedef int64_t off64_t;
#define INTMAX_MAX _I64_MAX
#define UINTMAX_MAX _UI64_MAX
+#define UINT32_MAX 0xffffffff /* 4294967295U */
+
+#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
diff --git a/config.mak.in b/config.mak.in
index d7c49cd8f3..fa02bdd82a 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@
AR = @AR@
TAR = @TAR@
DIFF = @DIFF@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
prefix = @prefix@
@@ -17,6 +18,7 @@ gitexecdir = @libexecdir@/git-core
datarootdir = @datarootdir@
template_dir = @datadir@/git-core/templates
sysconfdir = @sysconfdir@
+docdir = @docdir@
mandir = @mandir@
htmldir = @htmldir@
diff --git a/config.mak.uname b/config.mak.uname
index 8743a6d0af..9080054f76 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -321,13 +321,11 @@ ifeq ($(uname_S),Windows)
NO_UNSETENV = YesPlease
NO_STRCASESTR = YesPlease
NO_STRLCPY = YesPlease
- NO_STRTOK_R = YesPlease
NO_FNMATCH = YesPlease
NO_MEMMEM = YesPlease
# NEEDS_LIBICONV = YesPlease
NO_ICONV = YesPlease
NO_STRTOUMAX = YesPlease
- NO_STRTOULL = YesPlease
NO_MKDTEMP = YesPlease
NO_MKSTEMPS = YesPlease
SNPRINTF_RETURNS_BOGUS = YesPlease
@@ -344,6 +342,9 @@ ifeq ($(uname_S),Windows)
NO_CURL = YesPlease
NO_PYTHON = YesPlease
BLK_SHA1 = YesPlease
+ ETAGS_TARGET = ETAGS
+ NO_INET_PTON = YesPlease
+ NO_INET_NTOP = YesPlease
NO_POSIX_GOODIES = UnfortunatelyYes
NATIVE_CRLF = YesPlease
DEFAULT_HELP_FORMAT = html
@@ -476,7 +477,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_UNSETENV = YesPlease
NO_STRCASESTR = YesPlease
NO_STRLCPY = YesPlease
- NO_STRTOK_R = YesPlease
NO_FNMATCH = YesPlease
NO_MEMMEM = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/configure.ac b/configure.ac
index 1991258ae0..f3462d9c81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -901,12 +901,6 @@ GIT_CHECK_FUNC(strcasestr,
[NO_STRCASESTR=YesPlease])
GIT_CONF_SUBST([NO_STRCASESTR])
#
-# Define NO_STRTOK_R if you don't have strtok_r
-GIT_CHECK_FUNC(strtok_r,
-[NO_STRTOK_R=],
-[NO_STRTOK_R=YesPlease])
-GIT_CONF_SUBST([NO_STRTOK_R])
-#
# Define NO_FNMATCH if you don't have fnmatch
GIT_CHECK_FUNC(fnmatch,
[NO_FNMATCH=],
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b62bec0279..2ba1461422 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -299,9 +299,12 @@ __git_index_file_list_filter ()
# the second argument.
__git_ls_files_helper ()
{
- # NOTE: $2 is not quoted in order to support multiple options
- cd "$1" && git ls-files --exclude-standard $2
-} 2>/dev/null
+ (
+ test -n "${CDPATH+set}" && unset CDPATH
+ # NOTE: $2 is not quoted in order to support multiple options
+ cd "$1" && git ls-files --exclude-standard $2
+ ) 2>/dev/null
+}
# Execute git diff-index, returning paths relative to the directory
@@ -309,8 +312,11 @@ __git_ls_files_helper ()
# specified in the second argument.
__git_diff_index_helper ()
{
- cd "$1" && git diff-index --name-only --relative "$2"
-} 2>/dev/null
+ (
+ test -n "${CDPATH+set}" && unset CDPATH
+ cd "$1" && git diff-index --name-only --relative "$2"
+ ) 2>/dev/null
+}
# __git_index_files accepts 1 or 2 arguments:
# 1: Options to pass to ls-files (required).
@@ -2413,7 +2419,7 @@ _git_submodule ()
{
__git_has_doubledash && return
- local subcommands="add status init update summary foreach sync"
+ local subcommands="add status init deinit update summary foreach sync"
if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then
case "$cur" in
--*)
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 45775021ff..cf8116d477 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -60,6 +60,15 @@ __gitcomp_nl ()
compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
}
+__gitcomp_file ()
+{
+ emulate -L zsh
+
+ local IFS=$'\n'
+ compset -P '*[=:]'
+ compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
+}
+
_git ()
{
local _ret=1
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 9b2eec21e9..341422a766 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -320,26 +320,25 @@ __git_ps1 ()
b="GIT_DIR!"
fi
elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then
- if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then
- if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then
- git diff --no-ext-diff --quiet --exit-code || w="*"
- if git rev-parse --quiet --verify HEAD >/dev/null; then
- git diff-index --cached --quiet HEAD -- || i="+"
- else
- i="#"
- fi
+ if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
+ [ "$(git config --bool bash.showDirtyState)" != "false" ]
+ then
+ git diff --no-ext-diff --quiet --exit-code || w="*"
+ if git rev-parse --quiet --verify HEAD >/dev/null; then
+ git diff-index --cached --quiet HEAD -- || i="+"
+ else
+ i="#"
fi
fi
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ]; then
git rev-parse --verify refs/stash >/dev/null 2>&1 && s="$"
fi
- if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ]; then
- if [ "$(git config --bool bash.showUntrackedFiles)" != "false" ]; then
- if [ -n "$(git ls-files --others --exclude-standard)" ]; then
- u="%"
- fi
- fi
+ if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
+ [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
+ [ -n "$(git ls-files --others --exclude-standard)" ]
+ then
+ u="%"
fi
if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
diff --git a/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c b/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c
index 41f61c5db3..f2cdefee60 100644
--- a/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c
+++ b/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c
@@ -401,7 +401,7 @@ static void usage(const char *name)
const char *basename = strrchr(name,'/');
basename = (basename) ? basename + 1 : name;
- fprintf(stderr, "Usage: %s <", basename);
+ fprintf(stderr, "usage: %s <", basename);
while(try_op->name) {
fprintf(stderr,"%s",(try_op++)->name);
if(try_op->name)
diff --git a/contrib/credential/netrc/Makefile b/contrib/credential/netrc/Makefile
new file mode 100644
index 0000000000..51b76138a5
--- /dev/null
+++ b/contrib/credential/netrc/Makefile
@@ -0,0 +1,5 @@
+test:
+ ./test.pl
+
+testverbose:
+ ./test.pl -d -v
diff --git a/contrib/credential/netrc/git-credential-netrc b/contrib/credential/netrc/git-credential-netrc
new file mode 100755
index 0000000000..6c51c43885
--- /dev/null
+++ b/contrib/credential/netrc/git-credential-netrc
@@ -0,0 +1,421 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Getopt::Long;
+use File::Basename;
+
+my $VERSION = "0.1";
+
+my %options = (
+ help => 0,
+ debug => 0,
+ verbose => 0,
+ insecure => 0,
+ file => [],
+
+ # identical token maps, e.g. host -> host, will be inserted later
+ tmap => {
+ port => 'protocol',
+ machine => 'host',
+ path => 'path',
+ login => 'username',
+ user => 'username',
+ password => 'password',
+ }
+ );
+
+# Map each credential protocol token to itself on the netrc side.
+foreach (values %{$options{tmap}}) {
+ $options{tmap}->{$_} = $_;
+}
+
+# Now, $options{tmap} has a mapping from the netrc format to the Git credential
+# helper protocol.
+
+# Next, we build the reverse token map.
+
+# When $rmap{foo} contains 'bar', that means that what the Git credential helper
+# protocol calls 'bar' is found as 'foo' in the netrc/authinfo file. Keys in
+# %rmap are what we expect to read from the netrc/authinfo file.
+
+my %rmap;
+foreach my $k (keys %{$options{tmap}}) {
+ push @{$rmap{$options{tmap}->{$k}}}, $k;
+}
+
+Getopt::Long::Configure("bundling");
+
+# TODO: maybe allow the token map $options{tmap} to be configurable.
+GetOptions(\%options,
+ "help|h",
+ "debug|d",
+ "insecure|k",
+ "verbose|v",
+ "file|f=s@",
+ );
+
+if ($options{help}) {
+ my $shortname = basename($0);
+ $shortname =~ s/git-credential-//;
+
+ print <<EOHIPPUS;
+
+$0 [-f AUTHFILE1] [-f AUTHFILEN] [-d] [-v] [-k] get
+
+Version $VERSION by tzz\@lifelogs.com. License: BSD.
+
+Options:
+
+ -f|--file AUTHFILE : specify netrc-style files. Files with the .gpg extension
+ will be decrypted by GPG before parsing. Multiple -f
+ arguments are OK. They are processed in order, and the
+ first matching entry found is returned via the credential
+ helper protocol (see below).
+
+ When no -f option is given, .authinfo.gpg, .netrc.gpg,
+ .authinfo, and .netrc files in your home directory are used
+ in this order.
+
+ -k|--insecure : ignore bad file ownership or permissions
+
+ -d|--debug : turn on debugging (developer info)
+
+ -v|--verbose : be more verbose (show files and information found)
+
+To enable this credential helper:
+
+ git config credential.helper '$shortname -f AUTHFILE1 -f AUTHFILE2'
+
+(Note that Git will prepend "git-credential-" to the helper name and look for it
+in the path.)
+
+...and if you want lots of debugging info:
+
+ git config credential.helper '$shortname -f AUTHFILE -d'
+
+...or to see the files opened and data found:
+
+ git config credential.helper '$shortname -f AUTHFILE -v'
+
+Only "get" mode is supported by this credential helper. It opens every AUTHFILE
+and looks for the first entry that matches the requested search criteria:
+
+ 'port|protocol':
+ The protocol that will be used (e.g., https). (protocol=X)
+
+ 'machine|host':
+ The remote hostname for a network credential. (host=X)
+
+ 'path':
+ The path with which the credential will be used. (path=X)
+
+ 'login|user|username':
+ The credential’s username, if we already have one. (username=X)
+
+Thus, when we get this query on STDIN:
+
+host=github.com
+protocol=https
+username=tzz
+
+this credential helper will look for the first entry in every AUTHFILE that
+matches
+
+machine github.com port https login tzz
+
+OR
+
+machine github.com protocol https login tzz
+
+OR... etc. acceptable tokens as listed above. Any unknown tokens are
+simply ignored.
+
+Then, the helper will print out whatever tokens it got from the entry, including
+"password" tokens, mapping back to Git's helper protocol; e.g. "port" is mapped
+back to "protocol". Any redundant entry tokens (part of the original query) are
+skipped.
+
+Again, note that only the first matching entry from all the AUTHFILEs, processed
+in the sequence given on the command line, is used.
+
+Netrc/authinfo tokens can be quoted as 'STRING' or "STRING".
+
+No caching is performed by this credential helper.
+
+EOHIPPUS
+
+ exit 0;
+}
+
+my $mode = shift @ARGV;
+
+# Credentials must get a parameter, so die if it's missing.
+die "Syntax: $0 [-f AUTHFILE1] [-f AUTHFILEN] [-d] get" unless defined $mode;
+
+# Only support 'get' mode; with any other unsupported ones we just exit.
+exit 0 unless $mode eq 'get';
+
+my $files = $options{file};
+
+# if no files were given, use a predefined list.
+# note that .gpg files come first
+unless (scalar @$files) {
+ my @candidates = qw[
+ ~/.authinfo.gpg
+ ~/.netrc.gpg
+ ~/.authinfo
+ ~/.netrc
+ ];
+
+ $files = $options{file} = [ map { glob $_ } @candidates ];
+}
+
+my $query = read_credential_data_from_stdin();
+
+FILE:
+foreach my $file (@$files) {
+ my $gpgmode = $file =~ m/\.gpg$/;
+ unless (-r $file) {
+ log_verbose("Unable to read $file; skipping it");
+ next FILE;
+ }
+
+ # the following check is copied from Net::Netrc, for non-GPG files
+ # OS/2 and Win32 do not handle stat in a way compatible with this check :-(
+ unless ($gpgmode || $options{insecure} ||
+ $^O eq 'os2'
+ || $^O eq 'MSWin32'
+ || $^O eq 'MacOS'
+ || $^O =~ /^cygwin/) {
+ my @stat = stat($file);
+
+ if (@stat) {
+ if ($stat[2] & 077) {
+ log_verbose("Insecure $file (mode=%04o); skipping it",
+ $stat[2] & 07777);
+ next FILE;
+ }
+
+ if ($stat[4] != $<) {
+ log_verbose("Not owner of $file; skipping it");
+ next FILE;
+ }
+ }
+ }
+
+ my @entries = load_netrc($file, $gpgmode);
+
+ unless (scalar @entries) {
+ if ($!) {
+ log_verbose("Unable to open $file: $!");
+ } else {
+ log_verbose("No netrc entries found in $file");
+ }
+
+ next FILE;
+ }
+
+ my $entry = find_netrc_entry($query, @entries);
+ if ($entry) {
+ print_credential_data($entry, $query);
+ # we're done!
+ last FILE;
+ }
+}
+
+exit 0;
+
+sub load_netrc {
+ my $file = shift @_;
+ my $gpgmode = shift @_;
+
+ my $io;
+ if ($gpgmode) {
+ my @cmd = (qw(gpg --decrypt), $file);
+ log_verbose("Using GPG to open $file: [@cmd]");
+ open $io, "-|", @cmd;
+ } else {
+ log_verbose("Opening $file...");
+ open $io, '<', $file;
+ }
+
+ # nothing to do if the open failed (we log the error later)
+ return unless $io;
+
+ # Net::Netrc does this, but the functionality is merged with the file
+ # detection logic, so we have to extract just the part we need
+ my @netrc_entries = net_netrc_loader($io);
+
+ # these entries will use the credential helper protocol token names
+ my @entries;
+
+ foreach my $nentry (@netrc_entries) {
+ my %entry;
+ my $num_port;
+
+ if (!defined $nentry->{machine}) {
+ next;
+ }
+ if (defined $nentry->{port} && $nentry->{port} =~ m/^\d+$/) {
+ $num_port = $nentry->{port};
+ delete $nentry->{port};
+ }
+
+ # create the new entry for the credential helper protocol
+ $entry{$options{tmap}->{$_}} = $nentry->{$_} foreach keys %$nentry;
+
+ # for "host X port Y" where Y is an integer (captured by
+ # $num_port above), set the host to "X:Y"
+ if (defined $entry{host} && defined $num_port) {
+ $entry{host} = join(':', $entry{host}, $num_port);
+ }
+
+ push @entries, \%entry;
+ }
+
+ return @entries;
+}
+
+sub net_netrc_loader {
+ my $fh = shift @_;
+ my @entries;
+ my ($mach, $macdef, $tok, @tok);
+
+ LINE:
+ while (<$fh>) {
+ undef $macdef if /\A\n\Z/;
+
+ if ($macdef) {
+ next LINE;
+ }
+
+ s/^\s*//;
+ chomp;
+
+ while (length && s/^("((?:[^"]+|\\.)*)"|((?:[^\\\s]+|\\.)*))\s*//) {
+ (my $tok = $+) =~ s/\\(.)/$1/g;
+ push(@tok, $tok);
+ }
+
+ TOKEN:
+ while (@tok) {
+ if ($tok[0] eq "default") {
+ shift(@tok);
+ $mach = { machine => undef };
+ next TOKEN;
+ }
+
+ $tok = shift(@tok);
+
+ if ($tok eq "machine") {
+ my $host = shift @tok;
+ $mach = { machine => $host };
+ push @entries, $mach;
+ } elsif (exists $options{tmap}->{$tok}) {
+ unless ($mach) {
+ log_debug("Skipping token $tok because no machine was given");
+ next TOKEN;
+ }
+
+ my $value = shift @tok;
+ unless (defined $value) {
+ log_debug("Token $tok had no value, skipping it.");
+ next TOKEN;
+ }
+
+ # Following line added by rmerrell to remove '/' escape char in .netrc
+ $value =~ s/\/\\/\\/g;
+ $mach->{$tok} = $value;
+ } elsif ($tok eq "macdef") { # we ignore macros
+ next TOKEN unless $mach;
+ my $value = shift @tok;
+ $macdef = 1;
+ }
+ }
+ }
+
+ return @entries;
+}
+
+sub read_credential_data_from_stdin {
+ # the query: start with every token with no value
+ my %q = map { $_ => undef } values(%{$options{tmap}});
+
+ while (<STDIN>) {
+ next unless m/^([^=]+)=(.+)/;
+
+ my ($token, $value) = ($1, $2);
+ die "Unknown search token $token" unless exists $q{$token};
+ $q{$token} = $value;
+ log_debug("We were given search token $token and value $value");
+ }
+
+ foreach (sort keys %q) {
+ log_debug("Searching for %s = %s", $_, $q{$_} || '(any value)');
+ }
+
+ return \%q;
+}
+
+# takes the search tokens and then a list of entries
+# each entry is a hash reference
+sub find_netrc_entry {
+ my $query = shift @_;
+
+ ENTRY:
+ foreach my $entry (@_)
+ {
+ my $entry_text = join ', ', map { "$_=$entry->{$_}" } keys %$entry;
+ foreach my $check (sort keys %$query) {
+ if (defined $query->{$check}) {
+ log_debug("compare %s [%s] to [%s] (entry: %s)",
+ $check,
+ $entry->{$check},
+ $query->{$check},
+ $entry_text);
+ unless ($query->{$check} eq $entry->{$check}) {
+ next ENTRY;
+ }
+ } else {
+ log_debug("OK: any value satisfies check $check");
+ }
+ }
+
+ return $entry;
+ }
+
+ # nothing was found
+ return;
+}
+
+sub print_credential_data {
+ my $entry = shift @_;
+ my $query = shift @_;
+
+ log_debug("entry has passed all the search checks");
+ TOKEN:
+ foreach my $git_token (sort keys %$entry) {
+ log_debug("looking for useful token $git_token");
+ # don't print unknown (to the credential helper protocol) tokens
+ next TOKEN unless exists $query->{$git_token};
+
+ # don't print things asked in the query (the entry matches them)
+ next TOKEN if defined $query->{$git_token};
+
+ log_debug("FOUND: $git_token=$entry->{$git_token}");
+ printf "%s=%s\n", $git_token, $entry->{$git_token};
+ }
+}
+sub log_verbose {
+ return unless $options{verbose};
+ printf STDERR @_;
+ printf STDERR "\n";
+}
+
+sub log_debug {
+ return unless $options{debug};
+ printf STDERR @_;
+ printf STDERR "\n";
+}
diff --git a/contrib/credential/netrc/test.netrc b/contrib/credential/netrc/test.netrc
new file mode 100644
index 0000000000..ba119a937f
--- /dev/null
+++ b/contrib/credential/netrc/test.netrc
@@ -0,0 +1,13 @@
+machine imap login tzz@lifelogs.com port imaps password letmeknow
+machine imap login bob port imaps password bobwillknow
+
+# comment test
+
+machine imap2 login tzz port 1099 password tzzknow
+machine imap2 login bob password bobwillknow
+
+# another command
+
+machine github.com
+ multilinetoken anothervalue
+ login carol password carolknows
diff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl
new file mode 100755
index 0000000000..169b6463c3
--- /dev/null
+++ b/contrib/credential/netrc/test.pl
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use Test;
+use IPC::Open2;
+
+BEGIN { plan tests => 15 }
+
+my @global_credential_args = @ARGV;
+my $netrc = './test.netrc';
+print "# Testing insecure file, nothing should be found\n";
+chmod 0644, $netrc;
+my $cred = run_credential(['-f', $netrc, 'get'],
+ { host => 'github.com' });
+
+ok(scalar keys %$cred, 0, "Got 0 keys from insecure file");
+
+print "# Testing missing file, nothing should be found\n";
+chmod 0644, $netrc;
+$cred = run_credential(['-f', '///nosuchfile///', 'get'],
+ { host => 'github.com' });
+
+ok(scalar keys %$cred, 0, "Got 0 keys from missing file");
+
+chmod 0600, $netrc;
+
+print "# Testing with invalid data\n";
+$cred = run_credential(['-f', $netrc, 'get'],
+ "bad data");
+ok(scalar keys %$cred, 4, "Got first found keys with bad data");
+
+print "# Testing netrc file for a missing corovamilkbar entry\n";
+$cred = run_credential(['-f', $netrc, 'get'],
+ { host => 'corovamilkbar' });
+
+ok(scalar keys %$cred, 0, "Got no corovamilkbar keys");
+
+print "# Testing netrc file for a github.com entry\n";
+$cred = run_credential(['-f', $netrc, 'get'],
+ { host => 'github.com' });
+
+ok(scalar keys %$cred, 2, "Got 2 Github keys");
+
+ok($cred->{password}, 'carolknows', "Got correct Github password");
+ok($cred->{username}, 'carol', "Got correct Github username");
+
+print "# Testing netrc file for a username-specific entry\n";
+$cred = run_credential(['-f', $netrc, 'get'],
+ { host => 'imap', username => 'bob' });
+
+ok(scalar keys %$cred, 2, "Got 2 username-specific keys");
+
+ok($cred->{password}, 'bobwillknow', "Got correct user-specific password");
+ok($cred->{protocol}, 'imaps', "Got correct user-specific protocol");
+
+print "# Testing netrc file for a host:port-specific entry\n";
+$cred = run_credential(['-f', $netrc, 'get'],
+ { host => 'imap2:1099' });
+
+ok(scalar keys %$cred, 2, "Got 2 host:port-specific keys");
+
+ok($cred->{password}, 'tzzknow', "Got correct host:port-specific password");
+ok($cred->{username}, 'tzz', "Got correct host:port-specific username");
+
+print "# Testing netrc file that 'host:port kills host' entry\n";
+$cred = run_credential(['-f', $netrc, 'get'],
+ { host => 'imap2' });
+
+ok(scalar keys %$cred, 2, "Got 2 'host:port kills host' keys");
+
+ok($cred->{password}, 'bobwillknow', "Got correct 'host:port kills host' password");
+ok($cred->{username}, 'bob', "Got correct 'host:port kills host' username");
+
+sub run_credential
+{
+ my $args = shift @_;
+ my $data = shift @_;
+ my $pid = open2(my $chld_out, my $chld_in,
+ './git-credential-netrc', @global_credential_args,
+ @$args);
+
+ die "Couldn't open pipe to netrc credential helper: $!" unless $pid;
+
+ if (ref $data eq 'HASH')
+ {
+ print $chld_in "$_=$data->{$_}\n" foreach sort keys %$data;
+ }
+ else
+ {
+ print $chld_in "$data\n";
+ }
+
+ close $chld_in;
+ my %ret;
+
+ while (<$chld_out>)
+ {
+ chomp;
+ next unless m/^([^=]+)=(.+)/;
+
+ $ret{$1} = $2;
+ }
+
+ return \%ret;
+}
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 6beed123ab..3940202b36 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -154,7 +154,7 @@ static void read_credential(void)
int main(int argc, const char **argv)
{
const char *usage =
- "Usage: git credential-osxkeychain <get|store|erase>";
+ "usage: git credential-osxkeychain <get|store|erase>";
if (!argv[1])
die(usage);
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index cbaec5f24b..a1d38f035b 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -9,6 +9,8 @@
/* common helpers */
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+
static void die(const char *err, ...)
{
char msg[4096];
@@ -30,14 +32,6 @@ static void *xmalloc(size_t size)
return ret;
}
-static char *xstrdup(const char *str)
-{
- char *ret = strdup(str);
- if (!ret)
- die("Out of memory");
- return ret;
-}
-
/* MinGW doesn't have wincred.h, so we need to define stuff */
typedef struct _CREDENTIAL_ATTRIBUTEW {
@@ -67,20 +61,14 @@ typedef struct _CREDENTIALW {
#define CRED_MAX_ATTRIBUTES 64
typedef BOOL (WINAPI *CredWriteWT)(PCREDENTIALW, DWORD);
-typedef BOOL (WINAPI *CredUnPackAuthenticationBufferWT)(DWORD, PVOID, DWORD,
- LPWSTR, DWORD *, LPWSTR, DWORD *, LPWSTR, DWORD *);
typedef BOOL (WINAPI *CredEnumerateWT)(LPCWSTR, DWORD, DWORD *,
PCREDENTIALW **);
-typedef BOOL (WINAPI *CredPackAuthenticationBufferWT)(DWORD, LPWSTR, LPWSTR,
- PBYTE, DWORD *);
typedef VOID (WINAPI *CredFreeT)(PVOID);
typedef BOOL (WINAPI *CredDeleteWT)(LPCWSTR, DWORD, DWORD);
-static HMODULE advapi, credui;
+static HMODULE advapi;
static CredWriteWT CredWriteW;
-static CredUnPackAuthenticationBufferWT CredUnPackAuthenticationBufferW;
static CredEnumerateWT CredEnumerateW;
-static CredPackAuthenticationBufferWT CredPackAuthenticationBufferW;
static CredFreeT CredFree;
static CredDeleteWT CredDeleteW;
@@ -88,74 +76,84 @@ static void load_cred_funcs(void)
{
/* load DLLs */
advapi = LoadLibrary("advapi32.dll");
- credui = LoadLibrary("credui.dll");
- if (!advapi || !credui)
- die("failed to load DLLs");
+ if (!advapi)
+ die("failed to load advapi32.dll");
/* get function pointers */
CredWriteW = (CredWriteWT)GetProcAddress(advapi, "CredWriteW");
- CredUnPackAuthenticationBufferW = (CredUnPackAuthenticationBufferWT)
- GetProcAddress(credui, "CredUnPackAuthenticationBufferW");
CredEnumerateW = (CredEnumerateWT)GetProcAddress(advapi,
"CredEnumerateW");
- CredPackAuthenticationBufferW = (CredPackAuthenticationBufferWT)
- GetProcAddress(credui, "CredPackAuthenticationBufferW");
CredFree = (CredFreeT)GetProcAddress(advapi, "CredFree");
CredDeleteW = (CredDeleteWT)GetProcAddress(advapi, "CredDeleteW");
- if (!CredWriteW || !CredUnPackAuthenticationBufferW ||
- !CredEnumerateW || !CredPackAuthenticationBufferW || !CredFree ||
- !CredDeleteW)
+ if (!CredWriteW || !CredEnumerateW || !CredFree || !CredDeleteW)
die("failed to load functions");
}
-static char target_buf[1024];
-static char *protocol, *host, *path, *username;
-static WCHAR *wusername, *password, *target;
+static WCHAR *wusername, *password, *protocol, *host, *path, target[1024];
-static void write_item(const char *what, WCHAR *wbuf)
+static void write_item(const char *what, LPCWSTR wbuf, int wlen)
{
char *buf;
- int len = WideCharToMultiByte(CP_UTF8, 0, wbuf, -1, NULL, 0, NULL,
+ int len = WideCharToMultiByte(CP_UTF8, 0, wbuf, wlen, NULL, 0, NULL,
FALSE);
buf = xmalloc(len);
- if (!WideCharToMultiByte(CP_UTF8, 0, wbuf, -1, buf, len, NULL, FALSE))
+ if (!WideCharToMultiByte(CP_UTF8, 0, wbuf, wlen, buf, len, NULL, FALSE))
die("WideCharToMultiByte failed!");
printf("%s=", what);
- fwrite(buf, 1, len - 1, stdout);
+ fwrite(buf, 1, len, stdout);
putchar('\n');
free(buf);
}
-static int match_attr(const CREDENTIALW *cred, const WCHAR *keyword,
- const char *want)
+/*
+ * Match an (optional) expected string and a delimiter in the target string,
+ * consuming the matched text by updating the target pointer.
+ */
+static int match_part(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim)
{
- int i;
- if (!want)
- return 1;
-
- for (i = 0; i < cred->AttributeCount; ++i)
- if (!wcscmp(cred->Attributes[i].Keyword, keyword))
- return !strcmp((const char *)cred->Attributes[i].Value,
- want);
-
- return 0; /* not found */
+ LPCWSTR delim_pos, start = *ptarget;
+ int len;
+
+ /* find start of delimiter (or end-of-string if delim is empty) */
+ if (*delim)
+ delim_pos = wcsstr(start, delim);
+ else
+ delim_pos = start + wcslen(start);
+
+ /*
+ * match text up to delimiter, or end of string (e.g. the '/' after
+ * host is optional if not followed by a path)
+ */
+ if (delim_pos)
+ len = delim_pos - start;
+ else
+ len = wcslen(start);
+
+ /* update ptarget if we either found a delimiter or need a match */
+ if (delim_pos || want)
+ *ptarget = delim_pos ? delim_pos + wcslen(delim) : start + len;
+
+ return !want || (!wcsncmp(want, start, len) && !want[len]);
}
static int match_cred(const CREDENTIALW *cred)
{
- return (!wusername || !wcscmp(wusername, cred->UserName)) &&
- match_attr(cred, L"git_protocol", protocol) &&
- match_attr(cred, L"git_host", host) &&
- match_attr(cred, L"git_path", path);
+ LPCWSTR target = cred->TargetName;
+ if (wusername && wcscmp(wusername, cred->UserName))
+ return 0;
+
+ return match_part(&target, L"git", L":") &&
+ match_part(&target, protocol, L"://") &&
+ match_part(&target, wusername, L"@") &&
+ match_part(&target, host, L"/") &&
+ match_part(&target, path, L"");
}
static void get_credential(void)
{
- WCHAR *user_buf, *pass_buf;
- DWORD user_buf_size = 0, pass_buf_size = 0;
- CREDENTIALW **creds, *cred = NULL;
+ CREDENTIALW **creds;
DWORD num_creds;
int i;
@@ -165,90 +163,36 @@ 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])) {
- cred = creds[i];
+ write_item("username", creds[i]->UserName,
+ wcslen(creds[i]->UserName));
+ write_item("password",
+ (LPCWSTR)creds[i]->CredentialBlob,
+ creds[i]->CredentialBlobSize / sizeof(WCHAR));
break;
}
- if (!cred)
- return;
-
- CredUnPackAuthenticationBufferW(0, cred->CredentialBlob,
- cred->CredentialBlobSize, NULL, &user_buf_size, NULL, NULL,
- NULL, &pass_buf_size);
-
- user_buf = xmalloc(user_buf_size * sizeof(WCHAR));
- pass_buf = xmalloc(pass_buf_size * sizeof(WCHAR));
-
- if (!CredUnPackAuthenticationBufferW(0, cred->CredentialBlob,
- cred->CredentialBlobSize, user_buf, &user_buf_size, NULL, NULL,
- pass_buf, &pass_buf_size))
- die("CredUnPackAuthenticationBuffer failed");
CredFree(creds);
-
- /* zero-terminate (sizes include zero-termination) */
- user_buf[user_buf_size - 1] = L'\0';
- pass_buf[pass_buf_size - 1] = L'\0';
-
- write_item("username", user_buf);
- write_item("password", pass_buf);
-
- free(user_buf);
- free(pass_buf);
-}
-
-static void write_attr(CREDENTIAL_ATTRIBUTEW *attr, const WCHAR *keyword,
- const char *value)
-{
- attr->Keyword = (LPWSTR)keyword;
- attr->Flags = 0;
- attr->ValueSize = strlen(value) + 1; /* store zero-termination */
- attr->Value = (LPBYTE)value;
}
static void store_credential(void)
{
CREDENTIALW cred;
- BYTE *auth_buf;
- DWORD auth_buf_size = 0;
- CREDENTIAL_ATTRIBUTEW attrs[CRED_MAX_ATTRIBUTES];
if (!wusername || !password)
return;
- /* query buffer size */
- CredPackAuthenticationBufferW(0, wusername, password,
- NULL, &auth_buf_size);
-
- auth_buf = xmalloc(auth_buf_size);
-
- if (!CredPackAuthenticationBufferW(0, wusername, password,
- auth_buf, &auth_buf_size))
- die("CredPackAuthenticationBuffer failed");
-
cred.Flags = 0;
cred.Type = CRED_TYPE_GENERIC;
cred.TargetName = target;
cred.Comment = L"saved by git-credential-wincred";
- cred.CredentialBlobSize = auth_buf_size;
- cred.CredentialBlob = auth_buf;
+ cred.CredentialBlobSize = (wcslen(password)) * sizeof(WCHAR);
+ cred.CredentialBlob = (LPVOID)password;
cred.Persist = CRED_PERSIST_LOCAL_MACHINE;
- cred.AttributeCount = 1;
- cred.Attributes = attrs;
+ cred.AttributeCount = 0;
+ cred.Attributes = NULL;
cred.TargetAlias = NULL;
cred.UserName = wusername;
- write_attr(attrs, L"git_protocol", protocol);
-
- if (host) {
- write_attr(attrs + cred.AttributeCount, L"git_host", host);
- cred.AttributeCount++;
- }
-
- if (path) {
- write_attr(attrs + cred.AttributeCount, L"git_path", path);
- cred.AttributeCount++;
- }
-
if (!CredWriteW(&cred, 0))
die("CredWrite failed");
}
@@ -284,10 +228,13 @@ static void read_credential(void)
while (fgets(buf, sizeof(buf), stdin)) {
char *v;
+ int len = strlen(buf);
+ /* strip trailing CR / LF */
+ while (len && strchr("\r\n", buf[len - 1]))
+ buf[--len] = 0;
- if (!strcmp(buf, "\n"))
+ if (!*buf)
break;
- buf[strlen(buf)-1] = '\0';
v = strchr(buf, '=');
if (!v)
@@ -295,13 +242,12 @@ static void read_credential(void)
*v++ = '\0';
if (!strcmp(buf, "protocol"))
- protocol = xstrdup(v);
+ protocol = utf8_to_utf16_dup(v);
else if (!strcmp(buf, "host"))
- host = xstrdup(v);
+ host = utf8_to_utf16_dup(v);
else if (!strcmp(buf, "path"))
- path = xstrdup(v);
+ path = utf8_to_utf16_dup(v);
else if (!strcmp(buf, "username")) {
- username = xstrdup(v);
wusername = utf8_to_utf16_dup(v);
} else if (!strcmp(buf, "password"))
password = utf8_to_utf16_dup(v);
@@ -313,7 +259,7 @@ static void read_credential(void)
int main(int argc, char *argv[])
{
const char *usage =
- "Usage: git credential-wincred <get|store|erase>\n";
+ "usage: git credential-wincred <get|store|erase>\n";
if (!argv[1])
die(usage);
@@ -330,22 +276,20 @@ int main(int argc, char *argv[])
return 0;
/* prepare 'target', the unique key for the credential */
- strncat(target_buf, "git:", sizeof(target_buf));
- strncat(target_buf, protocol, sizeof(target_buf));
- strncat(target_buf, "://", sizeof(target_buf));
- if (username) {
- strncat(target_buf, username, sizeof(target_buf));
- strncat(target_buf, "@", sizeof(target_buf));
+ wcscpy(target, L"git:");
+ wcsncat(target, protocol, ARRAY_SIZE(target));
+ wcsncat(target, L"://", ARRAY_SIZE(target));
+ if (wusername) {
+ wcsncat(target, wusername, ARRAY_SIZE(target));
+ wcsncat(target, L"@", ARRAY_SIZE(target));
}
if (host)
- strncat(target_buf, host, sizeof(target_buf));
+ wcsncat(target, host, ARRAY_SIZE(target));
if (path) {
- strncat(target_buf, "/", sizeof(target_buf));
- strncat(target_buf, path, sizeof(target_buf));
+ wcsncat(target, L"/", ARRAY_SIZE(target));
+ wcsncat(target, path, ARRAY_SIZE(target));
}
- target = utf8_to_utf16_dup(target_buf);
-
if (!strcmp(argv[1], "get"))
get_credential();
else if (!strcmp(argv[1], "store"))
diff --git a/contrib/examples/git-remote.perl b/contrib/examples/git-remote.perl
index b17952a785..d42df7b418 100755
--- a/contrib/examples/git-remote.perl
+++ b/contrib/examples/git-remote.perl
@@ -347,7 +347,7 @@ sub rm_remote {
}
sub add_usage {
- print STDERR "Usage: git remote add [-f] [-t track]* [-m master] <name> <url>\n";
+ print STDERR "usage: git remote add [-f] [-t track]* [-m master] <name> <url>\n";
exit(1);
}
@@ -380,7 +380,7 @@ elsif ($ARGV[0] eq 'show') {
}
}
if ($i >= @ARGV) {
- print STDERR "Usage: git remote show <remote>\n";
+ print STDERR "usage: git remote show <remote>\n";
exit(1);
}
my $status = 0;
@@ -410,7 +410,7 @@ elsif ($ARGV[0] eq 'prune') {
}
}
if ($i >= @ARGV) {
- print STDERR "Usage: git remote prune <remote>\n";
+ print STDERR "usage: git remote prune <remote>\n";
exit(1);
}
my $status = 0;
@@ -458,13 +458,13 @@ elsif ($ARGV[0] eq 'add') {
}
elsif ($ARGV[0] eq 'rm') {
if (@ARGV <= 1) {
- print STDERR "Usage: git remote rm <remote>\n";
+ print STDERR "usage: git remote rm <remote>\n";
exit(1);
}
exit(rm_remote($ARGV[1]));
}
else {
- print STDERR "Usage: git remote\n";
+ print STDERR "usage: git remote\n";
print STDERR " git remote add <name> <url>\n";
print STDERR " git remote rm <name>\n";
print STDERR " git remote show <name>\n";
diff --git a/contrib/examples/git-svnimport.perl b/contrib/examples/git-svnimport.perl
index b09ff8f12f..c414f0d9c7 100755
--- a/contrib/examples/git-svnimport.perl
+++ b/contrib/examples/git-svnimport.perl
@@ -36,7 +36,7 @@ our($opt_h,$opt_o,$opt_v,$opt_u,$opt_C,$opt_i,$opt_m,$opt_M,$opt_t,$opt_T,
sub usage() {
print STDERR <<END;
-Usage: ${\basename $0} # fetch/update GIT from SVN
+usage: ${\basename $0} # fetch/update GIT from SVN
[-o branch-for-HEAD] [-h] [-v] [-l max_rev] [-R repack_each_revs]
[-C GIT_repository] [-t tagname] [-T trunkname] [-b branchname]
[-d|-D] [-i] [-u] [-r] [-I ignorefilename] [-s start_chg]
diff --git a/contrib/fast-import/git-import.perl b/contrib/fast-import/git-import.perl
index f9fef6db28..0891b9e366 100755
--- a/contrib/fast-import/git-import.perl
+++ b/contrib/fast-import/git-import.perl
@@ -7,7 +7,7 @@
use strict;
use File::Find;
-my $USAGE = 'Usage: git-import branch import-message';
+my $USAGE = 'usage: git-import branch import-message';
my $branch = shift or die "$USAGE\n";
my $message = shift or die "$USAGE\n";
diff --git a/contrib/fast-import/git-import.sh b/contrib/fast-import/git-import.sh
index 0ca7718d05..f8d803c5e2 100755
--- a/contrib/fast-import/git-import.sh
+++ b/contrib/fast-import/git-import.sh
@@ -5,7 +5,7 @@
# but is meant to be a simple fast-import example.
if [ -z "$1" -o -z "$2" ]; then
- echo "Usage: git-import branch import-message"
+ echo "usage: git-import branch import-message"
exit 1
fi
diff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py
index 5cec9b0129..d12c296223 100755
--- a/contrib/fast-import/import-zips.py
+++ b/contrib/fast-import/import-zips.py
@@ -14,13 +14,13 @@ from time import mktime
from zipfile import ZipFile
if hexversion < 0x01060000:
- # The limiter is the zipfile module
- sys.stderr.write("import-zips.py: requires Python 1.6.0 or later.\n")
- sys.exit(1)
+ # The limiter is the zipfile module
+ stderr.write("import-zips.py: requires Python 1.6.0 or later.\n")
+ exit(1)
if len(argv) < 2:
- print 'Usage:', argv[0], '<zipfile>...'
- exit(1)
+ print 'usage:', argv[0], '<zipfile>...'
+ exit(1)
branch_ref = 'refs/heads/import-zips'
committer_name = 'Z Ip Creator'
@@ -28,51 +28,51 @@ committer_email = 'zip@example.com'
fast_import = popen('git fast-import --quiet', 'w')
def printlines(list):
- for str in list:
- fast_import.write(str + "\n")
+ for str in list:
+ fast_import.write(str + "\n")
for zipfile in argv[1:]:
- commit_time = 0
- next_mark = 1
- common_prefix = None
- mark = dict()
-
- zip = ZipFile(zipfile, 'r')
- for name in zip.namelist():
- if name.endswith('/'):
- continue
- info = zip.getinfo(name)
-
- if commit_time < info.date_time:
- commit_time = info.date_time
- if common_prefix == None:
- common_prefix = name[:name.rfind('/') + 1]
- else:
- while not name.startswith(common_prefix):
- last_slash = common_prefix[:-1].rfind('/') + 1
- common_prefix = common_prefix[:last_slash]
-
- mark[name] = ':' + str(next_mark)
- next_mark += 1
-
- printlines(('blob', 'mark ' + mark[name], \
- 'data ' + str(info.file_size)))
- fast_import.write(zip.read(name) + "\n")
-
- committer = committer_name + ' <' + committer_email + '> %d +0000' % \
- mktime(commit_time + (0, 0, 0))
-
- printlines(('commit ' + branch_ref, 'committer ' + committer, \
- 'data <<EOM', 'Imported from ' + zipfile + '.', 'EOM', \
- '', 'deleteall'))
-
- for name in mark.keys():
- fast_import.write('M 100644 ' + mark[name] + ' ' +
- name[len(common_prefix):] + "\n")
-
- printlines(('', 'tag ' + path.basename(zipfile), \
- 'from ' + branch_ref, 'tagger ' + committer, \
- 'data <<EOM', 'Package ' + zipfile, 'EOM', ''))
+ commit_time = 0
+ next_mark = 1
+ common_prefix = None
+ mark = dict()
+
+ zip = ZipFile(zipfile, 'r')
+ for name in zip.namelist():
+ if name.endswith('/'):
+ continue
+ info = zip.getinfo(name)
+
+ if commit_time < info.date_time:
+ commit_time = info.date_time
+ if common_prefix == None:
+ common_prefix = name[:name.rfind('/') + 1]
+ else:
+ while not name.startswith(common_prefix):
+ last_slash = common_prefix[:-1].rfind('/') + 1
+ common_prefix = common_prefix[:last_slash]
+
+ mark[name] = ':' + str(next_mark)
+ next_mark += 1
+
+ printlines(('blob', 'mark ' + mark[name], \
+ 'data ' + str(info.file_size)))
+ fast_import.write(zip.read(name) + "\n")
+
+ committer = committer_name + ' <' + committer_email + '> %d +0000' % \
+ mktime(commit_time + (0, 0, 0))
+
+ printlines(('commit ' + branch_ref, 'committer ' + committer, \
+ 'data <<EOM', 'Imported from ' + zipfile + '.', 'EOM', \
+ '', 'deleteall'))
+
+ for name in mark.keys():
+ fast_import.write('M 100644 ' + mark[name] + ' ' +
+ name[len(common_prefix):] + "\n")
+
+ printlines(('', 'tag ' + path.basename(zipfile), \
+ 'from ' + branch_ref, 'tagger ' + committer, \
+ 'data <<EOM', 'Package ' + zipfile, 'EOM', ''))
if fast_import.close():
- exit(1)
+ exit(1)
diff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl
index a577ad095f..2770a1b1d2 100644
--- a/contrib/hooks/setgitperms.perl
+++ b/contrib/hooks/setgitperms.perl
@@ -24,7 +24,7 @@ use File::Find;
use File::Basename;
my $usage =
-"Usage: setgitperms.perl [OPTION]... <--read|--write>
+"usage: setgitperms.perl [OPTION]... <--read|--write>
This program uses a file `.gitmeta` to store/restore permissions and uid/gid
info for all files/dirs tracked by git in the repository.
diff --git a/contrib/mw-to-git/t/install-wiki.sh b/contrib/mw-to-git/t/install-wiki.sh
index c6d6fa3aef..70a53f67fd 100755
--- a/contrib/mw-to-git/t/install-wiki.sh
+++ b/contrib/mw-to-git/t/install-wiki.sh
@@ -15,7 +15,7 @@ fi
. "$WIKI_TEST_DIR"/test-gitmw-lib.sh
usage () {
- echo "Usage: "
+ echo "usage: "
echo " ./install-wiki.sh <install | delete | --help>"
echo " install | -i : Install a wiki on your computer."
echo " delete | -d : Delete the wiki and all its pages and "
diff --git a/daemon.c b/daemon.c
index 82d5bf50e9..6aeddcb98d 100644
--- a/daemon.c
+++ b/daemon.c
@@ -9,10 +9,6 @@
#define HOST_NAME_MAX 256
#endif
-#ifndef NI_MAXSERV
-#define NI_MAXSERV 32
-#endif
-
#ifdef NO_INITGROUPS
#define initgroups(x, y) (0) /* nothing */
#endif
diff --git a/date.c b/date.c
index 57331ed406..df20d0ba1d 100644
--- a/date.c
+++ b/date.c
@@ -383,7 +383,7 @@ static int is_date(int year, int month, int day, struct tm *now_tm, time_t now,
* sense to specify timestamp way into the future. Make
* sure it is not later than ten days from now...
*/
- if (now + 10*24*3600 < specified)
+ if ((specified != -1) && (now + 10*24*3600 < specified))
return 0;
tm->tm_mon = r->tm_mon;
tm->tm_mday = r->tm_mday;
@@ -694,8 +694,14 @@ int parse_date_basic(const char *date, unsigned long *timestamp, int *offset)
/* mktime uses local timezone */
*timestamp = tm_to_time_t(&tm);
- if (*offset == -1)
- *offset = ((time_t)*timestamp - mktime(&tm)) / 60;
+ if (*offset == -1) {
+ time_t temp_time = mktime(&tm);
+ if ((time_t)*timestamp > temp_time) {
+ *offset = ((time_t)*timestamp - temp_time) / 60;
+ } else {
+ *offset = -(int)((temp_time - (time_t)*timestamp) / 60);
+ }
+ }
if (*timestamp == -1)
return -1;
diff --git a/diff.c b/diff.c
index 156fec4470..db952a5bc7 100644
--- a/diff.c
+++ b/diff.c
@@ -1264,6 +1264,7 @@ static char *pprint_rename(const char *a, const char *b)
const char *new = b;
struct strbuf name = STRBUF_INIT;
int pfx_length, sfx_length;
+ int pfx_adjust_for_slash;
int len_a = strlen(a);
int len_b = strlen(b);
int a_midlen, b_midlen;
@@ -1290,7 +1291,18 @@ static char *pprint_rename(const char *a, const char *b)
old = a + len_a;
new = b + len_b;
sfx_length = 0;
- while (a <= old && b <= new && *old == *new) {
+ /*
+ * If there is a common prefix, it must end in a slash. In
+ * that case we let this loop run 1 into the prefix to see the
+ * same slash.
+ *
+ * If there is no common prefix, we cannot do this as it would
+ * underrun the input strings.
+ */
+ pfx_adjust_for_slash = (pfx_length ? 1 : 0);
+ while (a + pfx_length - pfx_adjust_for_slash <= old &&
+ b + pfx_length - pfx_adjust_for_slash <= new &&
+ *old == *new) {
if (*old == '/')
sfx_length = len_a - (old - a);
old--;
@@ -4662,7 +4674,7 @@ int diff_result_code(struct diff_options *opt, int status)
{
int result = 0;
- diff_warn_rename_limit("diff.renamelimit",
+ diff_warn_rename_limit("diff.renameLimit",
opt->needed_rename_limit,
opt->degraded_cc_to_c);
if (!DIFF_OPT_TST(opt, EXIT_WITH_STATUS) &&
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 512d0ac5fd..6c7a72fbe7 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -389,6 +389,7 @@ static int find_exact_renames(struct diff_options *options)
struct hash_table file_table;
init_hash(&file_table);
+ preallocate_hash(&file_table, rename_src_nr + rename_dst_nr);
for (i = 0; i < rename_src_nr; i++)
insert_file_table(&file_table, -1, i, rename_src[i].p->one);
diff --git a/entry.c b/entry.c
index 17a6bccec6..63c52edf60 100644
--- a/entry.c
+++ b/entry.c
@@ -145,7 +145,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
struct stat st;
if (ce_mode_s_ifmt == S_IFREG) {
- struct stream_filter *filter = get_stream_filter(path, ce->sha1);
+ struct stream_filter *filter = get_stream_filter(ce->name, ce->sha1);
if (filter &&
!streaming_write_entry(ce, path, filter,
state, to_tempfile,
diff --git a/environment.c b/environment.c
index 89d6c70c15..e2e75c1660 100644
--- a/environment.c
+++ b/environment.c
@@ -83,20 +83,20 @@ static const char *git_dir;
static char *git_object_dir, *git_index_file, *git_graft_file;
/*
- * Repository-local GIT_* environment variables
- * Remember to update local_repo_env_size in cache.h when
- * the size of the list changes
+ * Repository-local GIT_* environment variables; see cache.h for details.
*/
-const char * const local_repo_env[LOCAL_REPO_ENV_SIZE + 1] = {
+const char * const local_repo_env[] = {
ALTERNATE_DB_ENVIRONMENT,
CONFIG_ENVIRONMENT,
CONFIG_DATA_ENVIRONMENT,
DB_ENVIRONMENT,
GIT_DIR_ENVIRONMENT,
GIT_WORK_TREE_ENVIRONMENT,
+ GIT_IMPLICIT_WORK_TREE_ENVIRONMENT,
GRAFT_ENVIRONMENT,
INDEX_ENVIRONMENT,
NO_REPLACE_OBJECTS_ENVIRONMENT,
+ GIT_PREFIX_ENVIRONMENT,
NULL
};
diff --git a/fast-import.c b/fast-import.c
index c2a814ec66..5f539d7d8f 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2265,7 +2265,7 @@ static void file_change_m(struct branch *b)
const char *p = command_buf.buf + 2;
static struct strbuf uq = STRBUF_INIT;
const char *endp;
- struct object_entry *oe = oe;
+ struct object_entry *oe;
unsigned char sha1[20];
uint16_t mode, inline_data = 0;
@@ -2292,6 +2292,7 @@ static void file_change_m(struct branch *b)
hashcpy(sha1, oe->idx.sha1);
} else if (!prefixcmp(p, "inline ")) {
inline_data = 1;
+ oe = NULL; /* not used with inline_data, but makes gcc happy */
p += strlen("inline"); /* advance to space */
} else {
if (get_sha1_hex(p, sha1))
@@ -2434,7 +2435,7 @@ static void note_change_n(struct branch *b, unsigned char *old_fanout)
{
const char *p = command_buf.buf + 2;
static struct strbuf uq = STRBUF_INIT;
- struct object_entry *oe = oe;
+ struct object_entry *oe;
struct branch *s;
unsigned char sha1[20], commit_sha1[20];
char path[60];
@@ -2464,6 +2465,7 @@ static void note_change_n(struct branch *b, unsigned char *old_fanout)
hashcpy(sha1, oe->idx.sha1);
} else if (!prefixcmp(p, "inline ")) {
inline_data = 1;
+ oe = NULL; /* not used with inline_data, but makes gcc happy */
p += strlen("inline"); /* advance to space */
} else {
if (get_sha1_hex(p, sha1))
@@ -2613,7 +2615,7 @@ static int parse_from(struct branch *b)
static struct hash_list *parse_merge(unsigned int *count)
{
- struct hash_list *list = NULL, *n, *e = e;
+ struct hash_list *list = NULL, **tail = &list, *n;
const char *from;
struct branch *s;
@@ -2641,11 +2643,9 @@ static struct hash_list *parse_merge(unsigned int *count)
die("Invalid ref name or SHA1 expression: %s", from);
n->next = NULL;
- if (list)
- e->next = n;
- else
- list = n;
- e = n;
+ *tail = n;
+ tail = &n->next;
+
(*count)++;
read_next_command();
}
diff --git a/fetch-pack.c b/fetch-pack.c
index 66ff9add89..f156dd4fac 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -36,7 +36,7 @@ static int marked;
#define MAX_IN_VAIN 256
static struct commit_list *rev_list;
-static int non_common_revs, multi_ack, use_sideband;
+static int non_common_revs, multi_ack, use_sideband, allow_tip_sha1_in_want;
static void rev_list_push(struct commit *commit, int mark)
{
@@ -520,47 +520,37 @@ static void mark_recent_complete_commits(struct fetch_pack_args *args,
}
}
-static int non_matching_ref(struct string_list_item *item, void *unused)
-{
- if (item->util) {
- item->util = NULL;
- return 0;
- }
- else
- return 1;
-}
-
static void filter_refs(struct fetch_pack_args *args,
- struct ref **refs, struct string_list *sought)
+ struct ref **refs,
+ struct ref **sought, int nr_sought)
{
struct ref *newlist = NULL;
struct ref **newtail = &newlist;
struct ref *ref, *next;
- int sought_pos;
+ int i;
- sought_pos = 0;
+ i = 0;
for (ref = *refs; ref; ref = next) {
int keep = 0;
next = ref->next;
+
if (!memcmp(ref->name, "refs/", 5) &&
check_refname_format(ref->name + 5, 0))
; /* trash */
else {
- while (sought_pos < sought->nr) {
- int cmp = strcmp(ref->name, sought->items[sought_pos].string);
+ while (i < nr_sought) {
+ int cmp = strcmp(ref->name, sought[i]->name);
if (cmp < 0)
break; /* definitely do not have it */
else if (cmp == 0) {
keep = 1; /* definitely have it */
- sought->items[sought_pos++].util = "matched";
- break;
+ sought[i]->matched = 1;
}
- else
- sought_pos++; /* might have it; keep looking */
+ i++;
}
}
- if (! keep && args->fetch_all &&
+ if (!keep && args->fetch_all &&
(!args->depth || prefixcmp(ref->name, "refs/tags/")))
keep = 1;
@@ -573,7 +563,21 @@ static void filter_refs(struct fetch_pack_args *args,
}
}
- filter_string_list(sought, 0, non_matching_ref, NULL);
+ /* Append unmatched requests to the list */
+ if (allow_tip_sha1_in_want) {
+ for (i = 0; i < nr_sought; i++) {
+ ref = sought[i];
+ if (ref->matched)
+ continue;
+ if (get_sha1_hex(ref->name, ref->old_sha1))
+ continue;
+
+ ref->matched = 1;
+ *newtail = ref;
+ ref->next = NULL;
+ newtail = &ref->next;
+ }
+ }
*refs = newlist;
}
@@ -583,7 +587,8 @@ static void mark_alternate_complete(const struct ref *ref, void *unused)
}
static int everything_local(struct fetch_pack_args *args,
- struct ref **refs, struct string_list *sought)
+ struct ref **refs,
+ struct ref **sought, int nr_sought)
{
struct ref *ref;
int retval;
@@ -637,7 +642,7 @@ static int everything_local(struct fetch_pack_args *args,
}
}
- filter_refs(args, refs, sought);
+ filter_refs(args, refs, sought, nr_sought);
for (retval = 1, ref = *refs; ref ; ref = ref->next) {
const unsigned char *remote = ref->old_sha1;
@@ -767,10 +772,17 @@ static int get_pack(struct fetch_pack_args *args,
return 0;
}
+static int cmp_ref_by_name(const void *a_, const void *b_)
+{
+ const struct ref *a = *((const struct ref **)a_);
+ const struct ref *b = *((const struct ref **)b_);
+ return strcmp(a->name, b->name);
+}
+
static struct ref *do_fetch_pack(struct fetch_pack_args *args,
int fd[2],
const struct ref *orig_ref,
- struct string_list *sought,
+ struct ref **sought, int nr_sought,
char **pack_lockfile)
{
struct ref *ref = copy_ref_list(orig_ref);
@@ -779,6 +791,7 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
int agent_len;
sort_ref_list(&ref, ref_compare_name);
+ qsort(sought, nr_sought, sizeof(*sought), cmp_ref_by_name);
if (is_repository_shallow() && !server_supports("shallow"))
die("Server does not support shallow clients");
@@ -808,6 +821,11 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
fprintf(stderr, "Server supports side-band\n");
use_sideband = 1;
}
+ if (server_supports("allow-tip-sha1-in-want")) {
+ if (args->verbose)
+ fprintf(stderr, "Server supports allow-tip-sha1-in-want\n");
+ allow_tip_sha1_in_want = 1;
+ }
if (!server_supports("thin-pack"))
args->use_thin_pack = 0;
if (!server_supports("no-progress"))
@@ -827,7 +845,7 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
agent_len, agent_feature);
}
- if (everything_local(args, &ref, sought)) {
+ if (everything_local(args, &ref, sought, nr_sought)) {
packet_flush(fd[1]);
goto all_done;
}
@@ -890,11 +908,32 @@ static void fetch_pack_setup(void)
did_setup = 1;
}
+static int remove_duplicates_in_refs(struct ref **ref, int nr)
+{
+ struct string_list names = STRING_LIST_INIT_NODUP;
+ int src, dst;
+
+ for (src = dst = 0; src < nr; src++) {
+ struct string_list_item *item;
+ item = string_list_insert(&names, ref[src]->name);
+ if (item->util)
+ continue; /* already have it */
+ item->util = ref[src];
+ if (src != dst)
+ ref[dst] = ref[src];
+ dst++;
+ }
+ for (src = dst; src < nr; src++)
+ ref[src] = NULL;
+ string_list_clear(&names, 0);
+ return dst;
+}
+
struct ref *fetch_pack(struct fetch_pack_args *args,
int fd[], struct child_process *conn,
const struct ref *ref,
const char *dest,
- struct string_list *sought,
+ struct ref **sought, int nr_sought,
char **pack_lockfile)
{
struct stat st;
@@ -906,16 +945,14 @@ struct ref *fetch_pack(struct fetch_pack_args *args,
st.st_mtime = 0;
}
- if (sought->nr) {
- sort_string_list(sought);
- string_list_remove_duplicates(sought, 0);
- }
+ if (nr_sought)
+ nr_sought = remove_duplicates_in_refs(sought, nr_sought);
if (!ref) {
packet_flush(fd[1]);
die("no matching remote head");
}
- ref_cpy = do_fetch_pack(args, fd, ref, sought, pack_lockfile);
+ ref_cpy = do_fetch_pack(args, fd, ref, sought, nr_sought, pack_lockfile);
if (args->depth > 0) {
static struct lock_file lock;
diff --git a/fetch-pack.h b/fetch-pack.h
index cb148719bf..dc5266c970 100644
--- a/fetch-pack.h
+++ b/fetch-pack.h
@@ -20,17 +20,16 @@ struct fetch_pack_args {
};
/*
- * sought contains the full names of remote references that should be
- * updated from. On return, the names that were found on the remote
- * will have been removed from the list. The util members of the
- * string_list_items are used internally; they must be NULL on entry
- * (and will be NULL on exit).
+ * sought represents remote references that should be updated from.
+ * On return, the names that were found on the remote will have been
+ * marked as such.
*/
struct ref *fetch_pack(struct fetch_pack_args *args,
int fd[], struct child_process *conn,
const struct ref *ref,
const char *dest,
- struct string_list *sought,
+ struct ref **sought,
+ int nr_sought,
char **pack_lockfile);
#endif
diff --git a/git-am.sh b/git-am.sh
index 202130f888..c092855dd7 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -778,13 +778,6 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
action=yes
fi
- if test -f "$dotest/final-commit"
- then
- FIRSTLINE=$(sed 1q "$dotest/final-commit")
- else
- FIRSTLINE=""
- fi
-
if test $action = skip
then
go_next
@@ -797,6 +790,13 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
stop_here $this
fi
+ if test -f "$dotest/final-commit"
+ then
+ FIRSTLINE=$(sed 1q "$dotest/final-commit")
+ else
+ FIRSTLINE=""
+ fi
+
say "$(eval_gettext "Applying: \$FIRSTLINE")"
case "$resolved" in
diff --git a/git-archimport.perl b/git-archimport.perl
index bc32f18d6d..9cb123a07d 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -75,7 +75,7 @@ our($opt_h,$opt_f,$opt_v,$opt_T,$opt_t,$opt_D,$opt_a,$opt_o);
sub usage() {
print STDERR <<END;
-Usage: git archimport # fetch/update GIT from Arch
+usage: git archimport # fetch/update GIT from Arch
[ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ] [ -D depth ] [ -t tempdir ]
repository/arch-branch [ repository/arch-branch] ...
END
diff --git a/git-compat-util.h b/git-compat-util.h
index b7eaaa99a8..90e0372038 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -86,6 +86,9 @@
#define _SGI_SOURCE 1
#ifdef WIN32 /* Both MinGW and MSVC */
+# if defined (_MSC_VER)
+# define _WIN32_WINNT 0x0502
+# endif
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
#include <winsock2.h>
#include <windows.h>
@@ -213,6 +216,17 @@ extern char *gitbasename(char *);
#include <openssl/err.h>
#endif
+/* On most systems <netdb.h> would have given us this, but
+ * not on some systems (e.g. z/OS).
+ */
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#endif
+
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
/* On most systems <limits.h> would have given us this, but
* not on some systems (e.g. GNU/Hurd).
*/
@@ -421,11 +435,6 @@ extern uintmax_t gitstrtoumax(const char *, char **, int);
extern intmax_t gitstrtoimax(const char *, char **, int);
#endif
-#ifdef NO_STRTOK_R
-#define strtok_r gitstrtok_r
-extern char *gitstrtok_r(char *s, const char *delim, char **save_ptr);
-#endif
-
#ifdef NO_HSTRERROR
#define hstrerror githstrerror
extern const char *githstrerror(int herror);
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index e6bf25232c..d13f02da95 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -420,7 +420,7 @@ sleep(1);
sub usage {
print STDERR <<END;
-Usage: GIT_DIR=/path/to/.git git cvsexportcommit [-h] [-p] [-v] [-c] [-f] [-u] [-k] [-w cvsworkdir] [-m msgprefix] [ parent ] commit
+usage: GIT_DIR=/path/to/.git git cvsexportcommit [-h] [-p] [-v] [-c] [-f] [-u] [-k] [-w cvsworkdir] [-m msgprefix] [ parent ] commit
END
exit(1);
}
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 344f1206d1..73d367cea8 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -38,7 +38,7 @@ sub usage(;$) {
my $msg = shift;
print(STDERR "Error: $msg\n") if $msg;
print STDERR <<END;
-Usage: git cvsimport # fetch/update GIT from CVS
+usage: git cvsimport # fetch/update GIT from CVS
[-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]
[-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k]
[-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit]
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 3679074983..f1c3f49a83 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -107,7 +107,7 @@ my $work =
$log->info("--------------- STARTING -----------------");
my $usage =
- "Usage: git cvsserver [options] [pserver|server] [<directory> ...]\n".
+ "usage: git cvsserver [options] [pserver|server] [<directory> ...]\n".
" --base-path <path> : Prepend to requested CVSROOT\n".
" Can be read from GIT_CVSSERVER_BASE_PATH\n".
" --strict-paths : Don't allow recursing into subdirectories\n".
diff --git a/git-difftool.perl b/git-difftool.perl
index 0a90de4146..663640d33c 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -83,6 +83,21 @@ sub exit_cleanup
exit($status | ($status >> 8));
}
+sub use_wt_file
+{
+ my ($repo, $workdir, $file, $sha1, $symlinks) = @_;
+ my $null_sha1 = '0' x 40;
+
+ if ($sha1 eq $null_sha1) {
+ return 1;
+ } elsif (not $symlinks) {
+ return 0;
+ }
+
+ my $wt_sha1 = $repo->command_oneline('hash-object', "$workdir/$file");
+ return $sha1 eq $wt_sha1;
+}
+
sub setup_dir_diff
{
my ($repo, $workdir, $symlinks) = @_;
@@ -159,10 +174,10 @@ EOF
}
if ($rmode ne $null_mode) {
- if ($rsha1 ne $null_sha1) {
- $rindex .= "$rmode $rsha1\t$dst_path\0";
- } else {
+ if (use_wt_file($repo, $workdir, $dst_path, $rsha1, $symlinks)) {
push(@working_tree, $dst_path);
+ } else {
+ $rindex .= "$rmode $rsha1\t$dst_path\0";
}
}
}
@@ -209,7 +224,9 @@ EOF
delete($ENV{GIT_INDEX_FILE});
# Changes in the working tree need special treatment since they are
- # not part of the index
+ # not part of the index. Remove any trailing slash from $workdir
+ # before starting to avoid double slashes in symlink targets.
+ $workdir =~ s|/$||;
for my $file (@working_tree) {
my $dir = dirname($file);
unless (-d "$rdir/$dir") {
@@ -336,7 +353,7 @@ sub main
}
if ($opts{gui}) {
my $guitool = Git::config('diff.guitool');
- if (length($guitool) > 0) {
+ if (defined($guitool) && length($guitool) > 0) {
$ENV{GIT_DIFF_TOOL} = $guitool;
}
}
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index f612cb847a..07dfeb8df4 100755
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
@@ -18,7 +18,7 @@
USAGE='<orig blob> <our blob> <their blob> <path>'
USAGE="$USAGE <orig mode> <our mode> <their mode>"
-LONG_USAGE="Usage: git merge-one-file $USAGE
+LONG_USAGE="usage: git merge-one-file $USAGE
Blob ids and modes should be empty for missing files."
@@ -27,7 +27,7 @@ SUBDIRECTORY_OK=Yes
cd_to_toplevel
require_work_tree
-if ! test "$#" -eq 7
+if test $# != 7
then
echo "$LONG_USAGE"
exit 1
@@ -38,7 +38,8 @@ case "${1:-.}${2:-.}${3:-.}" in
# Deleted in both or deleted in one and unchanged in the other
#
"$1.." | "$1.$1" | "$1$1.")
- if [ "$2" ]; then
+ if test -n "$2"
+ then
echo "Removing $4"
else
# read-tree checked that index matches HEAD already,
@@ -48,7 +49,8 @@ case "${1:-.}${2:-.}${3:-.}" in
# we do not have it in the index, though.
exec git update-index --remove -- "$4"
fi
- if test -f "$4"; then
+ if test -f "$4"
+ then
rm -f -- "$4" &&
rmdir -p "$(expr "z$4" : 'z\(.*\)/')" 2>/dev/null || :
fi &&
@@ -67,7 +69,7 @@ case "${1:-.}${2:-.}${3:-.}" in
echo "Adding $4"
if test -f "$4"
then
- echo "ERROR: untracked $4 is overwritten by the merge."
+ echo "ERROR: untracked $4 is overwritten by the merge." >&2
exit 1
fi
git update-index --add --cacheinfo "$7" "$3" "$4" &&
@@ -78,9 +80,10 @@ case "${1:-.}${2:-.}${3:-.}" in
# Added in both, identically (check for same permissions).
#
".$3$2")
- if [ "$6" != "$7" ]; then
- echo "ERROR: File $4 added identically in both branches,"
- echo "ERROR: but permissions conflict $6->$7."
+ if test "$6" != "$7"
+ then
+ echo "ERROR: File $4 added identically in both branches," >&2
+ echo "ERROR: but permissions conflict $6->$7." >&2
exit 1
fi
echo "Adding $4"
@@ -95,44 +98,36 @@ case "${1:-.}${2:-.}${3:-.}" in
case ",$6,$7," in
*,120000,*)
- echo "ERROR: $4: Not merging symbolic link changes."
+ echo "ERROR: $4: Not merging symbolic link changes." >&2
exit 1
;;
*,160000,*)
- echo "ERROR: $4: Not merging conflicting submodule changes."
+ echo "ERROR: $4: Not merging conflicting submodule changes." >&2
exit 1
;;
esac
- src2=`git-unpack-file $3`
+ src1=$(git-unpack-file $2)
+ src2=$(git-unpack-file $3)
case "$1" in
'')
echo "Added $4 in both, but differently."
- # This extracts OUR file in $orig, and uses git apply to
- # remove lines that are unique to ours.
- orig=`git-unpack-file $2`
- sz0=`wc -c <"$orig"`
- @@DIFF@@ -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
- sz1=`wc -c <"$orig"`
-
- # If we do not have enough common material, it is not
- # worth trying two-file merge using common subsections.
- expr $sz0 \< $sz1 \* 2 >/dev/null || : >$orig
+ orig=$(git-unpack-file $2)
+ create_virtual_base "$orig" "$src2"
;;
*)
echo "Auto-merging $4"
- orig=`git-unpack-file $1`
+ orig=$(git-unpack-file $1)
;;
esac
- # Be careful for funny filename such as "-L" in "$4", which
- # would confuse "merge" greatly.
- src1=`git-unpack-file $2`
git merge-file "$src1" "$orig" "$src2"
ret=$?
msg=
- if [ $ret -ne 0 ]; then
+ if test $ret != 0 || test -z "$1"
+ then
msg='content conflict'
+ ret=1
fi
# Create the working tree file, using "our tree" version from the
@@ -140,26 +135,26 @@ case "${1:-.}${2:-.}${3:-.}" in
git checkout-index -f --stage=2 -- "$4" && cat "$src1" >"$4" || exit 1
rm -f -- "$orig" "$src1" "$src2"
- if [ "$6" != "$7" ]; then
- if [ -n "$msg" ]; then
+ if test "$6" != "$7"
+ then
+ if test -n "$msg"
+ then
msg="$msg, "
fi
msg="${msg}permissions conflict: $5->$6,$7"
ret=1
fi
- if [ "$1" = '' ]; then
- ret=1
- fi
- if [ $ret -ne 0 ]; then
- echo "ERROR: $msg in $4"
+ if test $ret != 0
+ then
+ echo "ERROR: $msg in $4" >&2
exit 1
fi
exec git update-index -- "$4"
;;
*)
- echo "ERROR: $4: Not handling case $1 -> $2 -> $3"
+ echo "ERROR: $4: Not handling case $1 -> $2 -> $3" >&2
;;
esac
exit 1
diff --git a/git-p4.py b/git-p4.py
index 647f110202..911bbce6c5 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -79,12 +79,27 @@ def p4_build_cmd(cmd):
real_cmd += cmd
return real_cmd
-def chdir(dir):
- # P4 uses the PWD environment variable rather than getcwd(). Since we're
- # not using the shell, we have to set it ourselves. This path could
- # be relative, so go there first, then figure out where we ended up.
- os.chdir(dir)
- os.environ['PWD'] = os.getcwd()
+def chdir(path, is_client_path=False):
+ """Do chdir to the given path, and set the PWD environment
+ variable for use by P4. It does not look at getcwd() output.
+ Since we're not using the shell, it is necessary to set the
+ PWD environment variable explicitly.
+
+ Normally, expand the path to force it to be absolute. This
+ addresses the use of relative path names inside P4 settings,
+ e.g. P4CONFIG=.p4config. P4 does not simply open the filename
+ as given; it looks for .p4config using PWD.
+
+ If is_client_path, the path was handed to us directly by p4,
+ and may be a symbolic link. Do not call os.getcwd() in this
+ case, because it will cause p4 to think that PWD is not inside
+ the client path.
+ """
+
+ os.chdir(path)
+ if not is_client_path:
+ path = os.getcwd()
+ os.environ['PWD'] = path
def die(msg):
if verbose:
@@ -1624,7 +1639,7 @@ class P4Submit(Command, P4UserMap):
new_client_dir = True
os.makedirs(self.clientPath)
- chdir(self.clientPath)
+ chdir(self.clientPath, is_client_path=True)
if self.dry_run:
print "Would synchronize p4 checkout in %s" % self.clientPath
else:
diff --git a/git-pull.sh b/git-pull.sh
index 266e682f6c..5d97e97bd9 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -279,7 +279,7 @@ fi
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
case "$rebase" in
true)
- eval="git-rebase $diffstat $strategy_args $merge_args"
+ eval="git-rebase $diffstat $strategy_args $merge_args $verbosity"
eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
;;
*)
diff --git a/git-relink.perl b/git-relink.perl
index f29285c411..236a3521a1 100755
--- a/git-relink.perl
+++ b/git-relink.perl
@@ -163,7 +163,7 @@ sub link_two_files($$) {
sub usage() {
- print("Usage: git relink [--safe] <dir>... <master_dir> \n");
+ print("usage: git relink [--safe] <dir>... <master_dir> \n");
print("All directories should contain a .git/objects/ subdirectory.\n");
print("Options\n");
print("\t--safe\t" .
diff --git a/git-send-email.perl b/git-send-email.perl
index be809e5b59..c3501d987e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1045,6 +1045,47 @@ sub maildomain {
return maildomain_net() || maildomain_mta() || 'localhost.localdomain';
}
+sub smtp_host_string {
+ if (defined $smtp_server_port) {
+ return "$smtp_server:$smtp_server_port";
+ } else {
+ return $smtp_server;
+ }
+}
+
+# Returns 1 if authentication succeeded or was not necessary
+# (smtp_user was not specified), and 0 otherwise.
+
+sub smtp_auth_maybe {
+ if (!defined $smtp_authuser || $auth) {
+ return 1;
+ }
+
+ # Workaround AUTH PLAIN/LOGIN interaction defect
+ # with Authen::SASL::Cyrus
+ eval {
+ require Authen::SASL;
+ Authen::SASL->import(qw(Perl));
+ };
+
+ # TODO: Authentication may fail not because credentials were
+ # invalid but due to other reasons, in which we should not
+ # reject credentials.
+ $auth = Git::credential({
+ 'protocol' => 'smtp',
+ 'host' => smtp_host_string(),
+ 'username' => $smtp_authuser,
+ # if there's no password, "git credential fill" will
+ # give us one, otherwise it'll just pass this one.
+ 'password' => $smtp_authpass
+ }, sub {
+ my $cred = shift;
+ return !!$smtp->auth($cred->{'username'}, $cred->{'password'});
+ });
+
+ return $auth;
+}
+
# Returns 1 if the message was sent, and 0 otherwise.
# In actuality, the whole program dies when there
# is an error sending a message.
@@ -1155,9 +1196,7 @@ X-Mailer: git-send-email $gitversion
else {
require Net::SMTP;
$smtp_domain ||= maildomain();
- $smtp ||= Net::SMTP->new((defined $smtp_server_port)
- ? "$smtp_server:$smtp_server_port"
- : $smtp_server,
+ $smtp ||= Net::SMTP->new(smtp_host_string(),
Hello => $smtp_domain,
Debug => $debug_net_smtp);
if ($smtp_encryption eq 'tls' && $smtp) {
@@ -1185,31 +1224,7 @@ X-Mailer: git-send-email $gitversion
defined $smtp_server_port ? " port=$smtp_server_port" : "";
}
- if (defined $smtp_authuser) {
- # Workaround AUTH PLAIN/LOGIN interaction defect
- # with Authen::SASL::Cyrus
- eval {
- require Authen::SASL;
- Authen::SASL->import(qw(Perl));
- };
-
- if (!defined $smtp_authpass) {
-
- system "stty -echo";
-
- do {
- print "Password: ";
- $_ = <STDIN>;
- print "\n";
- } while (!defined $_);
-
- chomp($smtp_authpass = $_);
-
- system "stty echo";
- }
-
- $auth ||= $smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
- }
+ smtp_auth_maybe or die $smtp->message;
$smtp->mail( $raw_from ) or die $smtp->message;
$smtp->to( @recipients ) or die $smtp->message;
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 795edd2852..2f7835941e 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -84,14 +84,14 @@ if test -n "$OPTIONS_SPEC"; then
else
dashless=$(basename "$0" | sed -e 's/-/ /')
usage() {
- die "Usage: $dashless $USAGE"
+ die "usage: $dashless $USAGE"
}
if [ -z "$LONG_USAGE" ]
then
- LONG_USAGE="Usage: $dashless $USAGE"
+ LONG_USAGE="usage: $dashless $USAGE"
else
- LONG_USAGE="Usage: $dashless $USAGE
+ LONG_USAGE="usage: $dashless $USAGE
$LONG_USAGE"
fi
@@ -249,6 +249,18 @@ clear_local_git_env() {
unset $(git rev-parse --local-env-vars)
}
+# Generate a virtual base file for a two-file merge. Uses git apply to
+# remove lines from $1 that are not in $2, leaving only common lines.
+create_virtual_base() {
+ sz0=$(wc -c <"$1")
+ @@DIFF@@ -u -La/"$1" -Lb/"$1" "$1" "$2" | git apply --no-add
+ sz1=$(wc -c <"$1")
+
+ # If we do not have enough common material, it is not
+ # worth trying two-file merge using common subsections.
+ expr $sz0 \< $sz1 \* 2 >/dev/null || : >"$1"
+}
+
# Platform specific tweaks to work around some commands
case $(uname -s) in
diff --git a/git-submodule.sh b/git-submodule.sh
index 004c034bc0..204bc78a9f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -8,6 +8,7 @@ dashless=$(basename "$0" | sed -e 's/-/ /')
USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: $dashless [--quiet] init [--] [<path>...]
+ or: $dashless [--quiet] deinit [-f|--force] [--] <path>...
or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: $dashless [--quiet] foreach [--recursive] <command>
@@ -547,6 +548,80 @@ cmd_init()
}
#
+# Unregister submodules from .git/config and remove their work tree
+#
+# $@ = requested paths (use '.' to deinit all submodules)
+#
+cmd_deinit()
+{
+ # parse $args after "submodule ... deinit".
+ while test $# -ne 0
+ do
+ case "$1" in
+ -f|--force)
+ force=$1
+ ;;
+ -q|--quiet)
+ GIT_QUIET=1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+ done
+
+ if test $# = 0
+ then
+ die "$(eval_gettext "Use '.' if you really want to deinitialize all submodules")"
+ fi
+
+ module_list "$@" |
+ while read mode sha1 stage sm_path
+ do
+ die_if_unmatched "$mode"
+ name=$(module_name "$sm_path") || exit
+
+ # Remove the submodule work tree (unless the user already did it)
+ if test -d "$sm_path"
+ then
+ # Protect submodules containing a .git directory
+ if test -d "$sm_path/.git"
+ then
+ echo >&2 "$(eval_gettext "Submodule work tree '\$sm_path' contains a .git directory")"
+ die "$(eval_gettext "(use 'rm -rf' if you really want to remove it including all of its history)")"
+ fi
+
+ if test -z "$force"
+ then
+ git rm -n "$sm_path" ||
+ die "$(eval_gettext "Submodule work tree '\$sm_path' contains local modifications; use '-f' to discard them")"
+ fi
+ rm -rf "$sm_path" || say "$(eval_gettext "Could not remove submodule work tree '\$sm_path'")"
+ fi
+
+ mkdir "$sm_path" || say "$(eval_gettext "Could not create empty submodule directory '\$sm_path'")"
+
+ # Remove the .git/config entries (unless the user already did it)
+ if test -n "$(git config --get-regexp submodule."$name\.")"
+ then
+ # Remove the whole section so we have a clean state when
+ # the user later decides to init this submodule again
+ url=$(git config submodule."$name".url)
+ git config --remove-section submodule."$name" 2>/dev/null &&
+ say "$(eval_gettext "Submodule '\$name' (\$url) unregistered for path '\$sm_path'")"
+ fi
+ done
+}
+
+#
# Update each submodule path to correct revision, using clone and checkout as needed
#
# $@ = requested paths (default to all)
@@ -622,7 +697,7 @@ cmd_update()
die_if_unmatched "$mode"
if test "$stage" = U
then
- echo >&2 "Skipping unmerged submodule $sm_path"
+ echo >&2 "Skipping unmerged submodule $prefix$sm_path"
continue
fi
name=$(module_name "$sm_path") || exit
@@ -637,7 +712,7 @@ cmd_update()
if test "$update_module" = "none"
then
- echo "Skipping submodule '$sm_path'"
+ echo "Skipping submodule '$prefix$sm_path'"
continue
fi
@@ -646,7 +721,7 @@ cmd_update()
# Only mention uninitialized submodules when its
# path have been specified
test "$#" != "0" &&
- say "$(eval_gettext "Submodule path '\$sm_path' not initialized
+ say "$(eval_gettext "Submodule path '\$prefix\$sm_path' not initialized
Maybe you want to use 'update --init'?")"
continue
fi
@@ -659,7 +734,7 @@ Maybe you want to use 'update --init'?")"
else
subsha1=$(clear_local_git_env; cd "$sm_path" &&
git rev-parse --verify HEAD) ||
- die "$(eval_gettext "Unable to find current revision in submodule path '\$sm_path'")"
+ die "$(eval_gettext "Unable to find current revision in submodule path '\$prefix\$sm_path'")"
fi
if test -n "$remote"
@@ -692,7 +767,7 @@ Maybe you want to use 'update --init'?")"
(clear_local_git_env; cd "$sm_path" &&
( (rev=$(git rev-list -n 1 $sha1 --not --all 2>/dev/null) &&
test -z "$rev") || git-fetch)) ||
- die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")"
+ die "$(eval_gettext "Unable to fetch in submodule path '\$prefix\$sm_path'")"
fi
# Is this something we just cloned?
@@ -706,20 +781,20 @@ Maybe you want to use 'update --init'?")"
case "$update_module" in
rebase)
command="git rebase"
- die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$sm_path'")"
- say_msg="$(eval_gettext "Submodule path '\$sm_path': rebased into '\$sha1'")"
+ die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$prefix\$sm_path'")"
+ say_msg="$(eval_gettext "Submodule path '\$prefix\$sm_path': rebased into '\$sha1'")"
must_die_on_failure=yes
;;
merge)
command="git merge"
- die_msg="$(eval_gettext "Unable to merge '\$sha1' in submodule path '\$sm_path'")"
- say_msg="$(eval_gettext "Submodule path '\$sm_path': merged in '\$sha1'")"
+ die_msg="$(eval_gettext "Unable to merge '\$sha1' in submodule path '\$prefix\$sm_path'")"
+ say_msg="$(eval_gettext "Submodule path '\$prefix\$sm_path': merged in '\$sha1'")"
must_die_on_failure=yes
;;
*)
command="git checkout $subforce -q"
- die_msg="$(eval_gettext "Unable to checkout '\$sha1' in submodule path '\$sm_path'")"
- say_msg="$(eval_gettext "Submodule path '\$sm_path': checked out '\$sha1'")"
+ die_msg="$(eval_gettext "Unable to checkout '\$sha1' in submodule path '\$prefix\$sm_path'")"
+ say_msg="$(eval_gettext "Submodule path '\$prefix\$sm_path': checked out '\$sha1'")"
;;
esac
@@ -737,11 +812,16 @@ Maybe you want to use 'update --init'?")"
if test -n "$recursive"
then
- (clear_local_git_env; cd "$sm_path" && eval cmd_update "$orig_flags")
+ (
+ prefix="$prefix$sm_path/"
+ clear_local_git_env
+ cd "$sm_path" &&
+ eval cmd_update "$orig_flags"
+ )
res=$?
if test $res -gt 0
then
- die_msg="$(eval_gettext "Failed to recurse into submodule path '\$sm_path'")"
+ die_msg="$(eval_gettext "Failed to recurse into submodule path '\$prefix\$sm_path'")"
if test $res -eq 1
then
err="${err};$die_msg"
@@ -1157,7 +1237,7 @@ cmd_sync()
while test $# != 0 && test -z "$command"
do
case "$1" in
- add | foreach | init | update | status | summary | sync)
+ add | foreach | init | deinit | update | status | summary | sync)
command=$1
;;
-q|--quiet)
diff --git a/git-svn.perl b/git-svn.perl
index b46795f593..6c7bd95032 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -382,7 +382,7 @@ sub usage {
my $fd = $exit ? \*STDERR : \*STDOUT;
print $fd <<"";
git-svn - bidirectional operations between a single Subversion tree and git
-Usage: git svn <command> [options] [arguments]\n
+usage: git svn <command> [options] [arguments]\n
print $fd "Available commands:\n" unless $cmd;
@@ -534,7 +534,7 @@ sub cmd_fetch {
}
my ($remote) = @_;
if (@_ > 1) {
- die "Usage: $0 fetch [--all] [--parent] [svn-remote]\n";
+ die "usage: $0 fetch [--all] [--parent] [svn-remote]\n";
}
$Git::SVN::no_reuse_existing = undef;
if ($_fetch_parent) {
@@ -1404,7 +1404,7 @@ sub cmd_multi_fetch {
# this command is special because it requires no metadata
sub cmd_commit_diff {
my ($ta, $tb, $url) = @_;
- my $usage = "Usage: $0 commit-diff -r<revision> ".
+ my $usage = "usage: $0 commit-diff -r<revision> ".
"<tree-ish> <tree-ish> [<URL>]";
fatal($usage) if (!defined $ta || !defined $tb);
my $svn_path = '';
diff --git a/git.c b/git.c
index b10c18b041..850d3f5527 100644
--- a/git.c
+++ b/git.c
@@ -6,10 +6,10 @@
#include "run-command.h"
const char git_usage_string[] =
- "git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
+ "git [--version] [--help] [-c name=value]\n"
+ " [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
" [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n"
" [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
- " [-c name=value] [--help]\n"
" <command> [<args>]";
const char git_more_info_string[] =
@@ -125,6 +125,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
static char git_dir[PATH_MAX+1];
is_bare_repository_cfg = 1;
setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 0);
+ setenv(GIT_IMPLICIT_WORK_TREE_ENVIRONMENT, "0", 1);
if (envchanged)
*envchanged = 1;
} else if (!strcmp(cmd, "-c")) {
@@ -545,7 +546,7 @@ int main(int argc, const char **argv)
commit_pager_choice();
printf("usage: %s\n\n", git_usage_string);
list_common_cmds_help();
- printf("\n%s\n", git_more_info_string);
+ printf("\n%s\n", _(git_more_info_string));
exit(1);
}
cmd = argv[0];
diff --git a/gitweb/README b/gitweb/README
index 6da4778b73..471dcfb691 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -1,9 +1,6 @@
GIT web Interface
=================
-The one working on:
- http://git.kernel.org/
-
From the git version 1.4.0 gitweb is bundled with git.
diff --git a/gpg-interface.c b/gpg-interface.c
index 45590330aa..8b0e87436b 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -96,15 +96,18 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *sig
/*
* Run "gpg" to see if the payload matches the detached signature.
* gpg_output, when set, receives the diagnostic output from GPG.
+ * gpg_status, when set, receives the status output from GPG.
*/
int verify_signed_buffer(const char *payload, size_t payload_size,
const char *signature, size_t signature_size,
- struct strbuf *gpg_output)
+ struct strbuf *gpg_output, struct strbuf *gpg_status)
{
struct child_process gpg;
- const char *args_gpg[] = {NULL, "--verify", "FILE", "-", NULL};
+ const char *args_gpg[] = {NULL, "--status-fd=1", "--verify", "FILE", "-", NULL};
char path[PATH_MAX];
int fd, ret;
+ struct strbuf buf = STRBUF_INIT;
+ struct strbuf *pbuf = &buf;
args_gpg[0] = gpg_program;
fd = git_mkstemp(path, PATH_MAX, ".git_vtag_tmpXXXXXX");
@@ -119,9 +122,10 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
memset(&gpg, 0, sizeof(gpg));
gpg.argv = args_gpg;
gpg.in = -1;
+ gpg.out = -1;
if (gpg_output)
gpg.err = -1;
- args_gpg[2] = path;
+ args_gpg[3] = path;
if (start_command(&gpg)) {
unlink(path);
return error(_("could not run gpg."));
@@ -134,9 +138,17 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
strbuf_read(gpg_output, gpg.err, 0);
close(gpg.err);
}
+ if (gpg_status)
+ pbuf = gpg_status;
+ strbuf_read(pbuf, gpg.out, 0);
+ close(gpg.out);
+
ret = finish_command(&gpg);
unlink_or_warn(path);
+ ret |= !strstr(pbuf->buf, "\n[GNUPG:] GOODSIG ");
+ strbuf_release(&buf); /* no matter it was used or not */
+
return ret;
}
diff --git a/gpg-interface.h b/gpg-interface.h
index b9c36088ce..cf99021842 100644
--- a/gpg-interface.h
+++ b/gpg-interface.h
@@ -2,7 +2,7 @@
#define GPG_INTERFACE_H
extern int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key);
-extern int verify_signed_buffer(const char *payload, size_t payload_size, const char *signature, size_t signature_size, struct strbuf *gpg_output);
+extern int verify_signed_buffer(const char *payload, size_t payload_size, const char *signature, size_t signature_size, struct strbuf *gpg_output, struct strbuf *gpg_status);
extern int git_gpg_config(const char *, const char *, void *);
extern void set_signing_key(const char *);
extern const char *get_signing_key(void);
diff --git a/graph.c b/graph.c
index 2a3fc5c0ec..b24d04c406 100644
--- a/graph.c
+++ b/graph.c
@@ -8,34 +8,6 @@
/* Internal API */
/*
- * Output the next line for a graph.
- * This formats the next graph line into the specified strbuf. It is not
- * terminated with a newline.
- *
- * Returns 1 if the line includes the current commit, and 0 otherwise.
- * graph_next_line() will return 1 exactly once for each time
- * graph_update() is called.
- */
-static int graph_next_line(struct git_graph *graph, struct strbuf *sb);
-
-/*
- * Set up a custom scheme for column colors.
- *
- * The default column color scheme inserts ANSI color escapes to colorize
- * the graph. The various color escapes are stored in an array of strings
- * where each entry corresponds to a color, except for the last entry,
- * which denotes the escape for resetting the color back to the default.
- * When generating the graph, strings from this array are inserted before
- * and after the various column characters.
- *
- * This function allows you to enable a custom array of color escapes.
- * The 'colors_max' argument is the index of the last "reset" entry.
- *
- * This functions must be called BEFORE graph_init() is called.
- */
-static void graph_set_column_colors(const char **colors, unsigned short colors_max);
-
-/*
* Output a padding line in the graph.
* This is similar to graph_next_line(). However, it is guaranteed to
* never print the current commit line. Instead, if the commit line is
@@ -90,7 +62,7 @@ enum graph_state {
static const char **column_colors;
static unsigned short column_colors_max;
-static void graph_set_column_colors(const char **colors, unsigned short colors_max)
+void graph_set_column_colors(const char **colors, unsigned short colors_max)
{
column_colors = colors;
column_colors_max = colors_max;
@@ -1144,7 +1116,7 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf
graph_update_state(graph, GRAPH_PADDING);
}
-static int graph_next_line(struct git_graph *graph, struct strbuf *sb)
+int graph_next_line(struct git_graph *graph, struct strbuf *sb)
{
switch (graph->state) {
case GRAPH_PADDING:
diff --git a/graph.h b/graph.h
index 19b0f66316..0be62bd8b1 100644
--- a/graph.h
+++ b/graph.h
@@ -4,6 +4,25 @@
/* A graph is a pointer to this opaque structure */
struct git_graph;
+/*
+ * Set up a custom scheme for column colors.
+ *
+ * The default column color scheme inserts ANSI color escapes to colorize
+ * the graph. The various color escapes are stored in an array of strings
+ * where each entry corresponds to a color, except for the last entry,
+ * which denotes the escape for resetting the color back to the default.
+ * When generating the graph, strings from this array are inserted before
+ * and after the various column characters.
+ *
+ * This function allows you to enable a custom array of color escapes.
+ * The 'colors_max' argument is the index of the last "reset" entry.
+ *
+ * This functions must be called BEFORE graph_init() is called.
+ *
+ * NOTE: This function isn't used in Git outside graph.c but it is used
+ * by CGit (http://git.zx2c4.com/cgit/) to use HTML for colors.
+ */
+void graph_set_column_colors(const char **colors, unsigned short colors_max);
/*
* Create a new struct git_graph.
@@ -33,6 +52,20 @@ void graph_update(struct git_graph *graph, struct commit *commit);
*/
int graph_is_commit_finished(struct git_graph const *graph);
+/*
+ * Output the next line for a graph.
+ * This formats the next graph line into the specified strbuf. It is not
+ * terminated with a newline.
+ *
+ * Returns 1 if the line includes the current commit, and 0 otherwise.
+ * graph_next_line() will return 1 exactly once for each time
+ * graph_update() is called.
+ *
+ * NOTE: This function isn't used in Git outside graph.c but it is used
+ * by CGit (http://git.zx2c4.com/cgit/) to wrap HTML around graph lines.
+ */
+int graph_next_line(struct git_graph *graph, struct strbuf *sb);
+
/*
* graph_show_*: helper functions for printing to stdout
diff --git a/grep.c b/grep.c
index 4bd1b8b1dd..bb548cae69 100644
--- a/grep.c
+++ b/grep.c
@@ -625,7 +625,8 @@ static struct grep_expr *prep_header_patterns(struct grep_opt *opt)
for (p = opt->header_list; p; p = p->next) {
if (p->token != GREP_PATTERN_HEAD)
die("bug: a non-header pattern in grep header list.");
- if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)
+ if (p->field < GREP_HEADER_FIELD_MIN ||
+ GREP_HEADER_FIELD_MAX <= p->field)
die("bug: unknown header field %d", p->field);
compile_regexp(p, opt);
}
diff --git a/grep.h b/grep.h
index 8fc854f400..e4a1df56a4 100644
--- a/grep.h
+++ b/grep.h
@@ -28,7 +28,8 @@ enum grep_context {
};
enum grep_header_field {
- GREP_HEADER_AUTHOR = 0,
+ GREP_HEADER_FIELD_MIN = 0,
+ GREP_HEADER_AUTHOR = GREP_HEADER_FIELD_MIN,
GREP_HEADER_COMMITTER,
GREP_HEADER_REFLOG,
diff --git a/hash.h b/hash.h
index b875ce67c4..1d43ac0ba0 100644
--- a/hash.h
+++ b/hash.h
@@ -40,4 +40,11 @@ static inline void init_hash(struct hash_table *table)
table->array = NULL;
}
+static inline void preallocate_hash(struct hash_table *table, unsigned int elts)
+{
+ assert(table->size == 0 && table->nr == 0 && table->array == NULL);
+ table->size = elts * 2;
+ table->array = xcalloc(sizeof(struct hash_table_entry), table->size);
+}
+
#endif
diff --git a/imap-send.c b/imap-send.c
index 21dc20b57d..d9bcfb44dc 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -31,6 +31,7 @@ typedef void *SSL;
#else
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#include <openssl/x509v3.h>
#endif
static const char imap_send_usage[] = "git imap-send < <mbox>";
@@ -200,12 +201,64 @@ static void socket_perror(const char *func, struct imap_socket *sock, int ret)
}
}
+#ifdef NO_OPENSSL
static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int verify)
{
-#ifdef NO_OPENSSL
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
return -1;
+}
+
#else
+
+static int host_matches(const char *host, const char *pattern)
+{
+ if (pattern[0] == '*' && pattern[1] == '.') {
+ pattern += 2;
+ if (!(host = strchr(host, '.')))
+ return 0;
+ host++;
+ }
+
+ return *host && *pattern && !strcasecmp(host, pattern);
+}
+
+static int verify_hostname(X509 *cert, const char *hostname)
+{
+ int len;
+ X509_NAME *subj;
+ char cname[1000];
+ int i, found;
+ STACK_OF(GENERAL_NAME) *subj_alt_names;
+
+ /* try the DNS subjectAltNames */
+ found = 0;
+ if ((subj_alt_names = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL))) {
+ int num_subj_alt_names = sk_GENERAL_NAME_num(subj_alt_names);
+ for (i = 0; !found && i < num_subj_alt_names; i++) {
+ GENERAL_NAME *subj_alt_name = sk_GENERAL_NAME_value(subj_alt_names, i);
+ if (subj_alt_name->type == GEN_DNS &&
+ strlen((const char *)subj_alt_name->d.ia5->data) == (size_t)subj_alt_name->d.ia5->length &&
+ host_matches(hostname, (const char *)(subj_alt_name->d.ia5->data)))
+ found = 1;
+ }
+ sk_GENERAL_NAME_pop_free(subj_alt_names, GENERAL_NAME_free);
+ }
+ if (found)
+ return 0;
+
+ /* try the common name */
+ if (!(subj = X509_get_subject_name(cert)))
+ return error("cannot get certificate subject");
+ if ((len = X509_NAME_get_text_by_NID(subj, NID_commonName, cname, sizeof(cname))) < 0)
+ return error("cannot get certificate common name");
+ if (strlen(cname) == (size_t)len && host_matches(hostname, cname))
+ return 0;
+ return error("certificate owner '%s' does not match hostname '%s'",
+ cname, hostname);
+}
+
+static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int verify)
+{
#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
const SSL_METHOD *meth;
#else
@@ -213,6 +266,7 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
#endif
SSL_CTX *ctx;
int ret;
+ X509 *cert;
SSL_library_init();
SSL_load_error_strings();
@@ -250,15 +304,35 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
return -1;
}
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ /*
+ * SNI (RFC4366)
+ * OpenSSL does not document this function, but the implementation
+ * returns 1 on success, 0 on failure after calling SSLerr().
+ */
+ ret = SSL_set_tlsext_host_name(sock->ssl, server.host);
+ if (ret != 1)
+ warning("SSL_set_tlsext_host_name(%s) failed.", server.host);
+#endif
+
ret = SSL_connect(sock->ssl);
if (ret <= 0) {
socket_perror("SSL_connect", sock, ret);
return -1;
}
+ if (verify) {
+ /* make sure the hostname matches that of the certificate */
+ cert = SSL_get_peer_certificate(sock->ssl);
+ if (!cert)
+ return error("unable to get peer certificate.");
+ if (verify_hostname(cert, server.host) < 0)
+ return -1;
+ }
+
return 0;
-#endif
}
+#endif
static int socket_read(struct imap_socket *sock, char *buf, int len)
{
diff --git a/log-tree.c b/log-tree.c
index 5dc45c4812..92bb2bf48e 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -9,6 +9,7 @@
#include "string-list.h"
#include "color.h"
#include "gpg-interface.h"
+#include "sequencer.h"
struct decoration name_decoration = { "object names" };
@@ -206,89 +207,6 @@ void show_decorations(struct rev_info *opt, struct commit *commit)
putchar(')');
}
-/*
- * Search for "^[-A-Za-z]+: [^@]+@" pattern. It usually matches
- * Signed-off-by: and Acked-by: lines.
- */
-static int detect_any_signoff(char *letter, int size)
-{
- char *cp;
- int seen_colon = 0;
- int seen_at = 0;
- int seen_name = 0;
- int seen_head = 0;
-
- cp = letter + size;
- while (letter <= --cp && *cp == '\n')
- continue;
-
- while (letter <= cp) {
- char ch = *cp--;
- if (ch == '\n')
- break;
-
- if (!seen_at) {
- if (ch == '@')
- seen_at = 1;
- continue;
- }
- if (!seen_colon) {
- if (ch == '@')
- return 0;
- else if (ch == ':')
- seen_colon = 1;
- else
- seen_name = 1;
- continue;
- }
- if (('A' <= ch && ch <= 'Z') ||
- ('a' <= ch && ch <= 'z') ||
- ch == '-') {
- seen_head = 1;
- continue;
- }
- /* no empty last line doesn't match */
- return 0;
- }
- return seen_head && seen_name;
-}
-
-static void append_signoff(struct strbuf *sb, const char *signoff)
-{
- static const char signed_off_by[] = "Signed-off-by: ";
- size_t signoff_len = strlen(signoff);
- int has_signoff = 0;
- char *cp;
-
- cp = sb->buf;
-
- /* First see if we already have the sign-off by the signer */
- while ((cp = strstr(cp, signed_off_by))) {
-
- has_signoff = 1;
-
- cp += strlen(signed_off_by);
- if (cp + signoff_len >= sb->buf + sb->len)
- break;
- if (strncmp(cp, signoff, signoff_len))
- continue;
- if (!isspace(cp[signoff_len]))
- continue;
- /* we already have him */
- return;
- }
-
- if (!has_signoff)
- has_signoff = detect_any_signoff(sb->buf, sb->len);
-
- if (!has_signoff)
- strbuf_addch(sb, '\n');
-
- strbuf_addstr(sb, signed_off_by);
- strbuf_add(sb, signoff, signoff_len);
- strbuf_addch(sb, '\n');
-}
-
static unsigned int digits_in_number(unsigned int number)
{
unsigned int i = 10, result = 1;
@@ -444,7 +362,7 @@ static void show_signature(struct rev_info *opt, struct commit *commit)
status = verify_signed_buffer(payload.buf, payload.len,
signature.buf, signature.len,
- &gpg_output);
+ &gpg_output, NULL);
if (status && !gpg_output.len)
strbuf_addstr(&gpg_output, "No signature\n");
@@ -508,20 +426,17 @@ static void show_one_mergetag(struct rev_info *opt,
gpg_message_offset = verify_message.len;
payload_size = parse_signature(extra->value, extra->len);
- if ((extra->len <= payload_size) ||
- (verify_signed_buffer(extra->value, payload_size,
- extra->value + payload_size,
- extra->len - payload_size,
- &verify_message) &&
- verify_message.len <= gpg_message_offset)) {
- strbuf_addstr(&verify_message, "No signature\n");
- status = -1;
- }
- else if (strstr(verify_message.buf + gpg_message_offset,
- ": Good signature from "))
- status = 0;
- else
- status = -1;
+ status = -1;
+ if (extra->len > payload_size)
+ if (verify_signed_buffer(extra->value, payload_size,
+ extra->value + payload_size,
+ extra->len - payload_size,
+ &verify_message, NULL)) {
+ if (verify_message.len <= gpg_message_offset)
+ strbuf_addstr(&verify_message, "No signature\n");
+ else
+ status = 0;
+ }
show_sig_lines(opt, status, verify_message.buf);
strbuf_release(&verify_message);
@@ -672,8 +587,10 @@ void show_log(struct rev_info *opt)
/*
* And then the pretty-printed message itself
*/
- if (ctx.need_8bit_cte >= 0)
- ctx.need_8bit_cte = has_non_ascii(opt->add_signoff);
+ if (ctx.need_8bit_cte >= 0 && opt->add_signoff)
+ ctx.need_8bit_cte =
+ has_non_ascii(fmt_name(getenv("GIT_COMMITTER_NAME"),
+ getenv("GIT_COMMITTER_EMAIL")));
ctx.date_mode = opt->date_mode;
ctx.date_mode_explicit = opt->date_mode_explicit;
ctx.abbrev = opt->diffopt.abbrev;
@@ -686,7 +603,7 @@ void show_log(struct rev_info *opt)
pretty_print_commit(&ctx, commit, &msgbuf);
if (opt->add_signoff)
- append_signoff(&msgbuf, opt->add_signoff);
+ append_signoff(&msgbuf, 0, APPEND_SIGNOFF_DEDUP);
if ((ctx.fmt != CMIT_FMT_USERFORMAT) &&
ctx.notes_message && *ctx.notes_message) {
diff --git a/mergetools/p4merge b/mergetools/p4merge
index 8a36916567..5a608abf9c 100644
--- a/mergetools/p4merge
+++ b/mergetools/p4merge
@@ -21,8 +21,12 @@ diff_cmd () {
merge_cmd () {
touch "$BACKUP"
- $base_present || >"$BASE"
- "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
+ if ! $base_present
+ then
+ cp -- "$LOCAL" "$BASE"
+ create_virtual_base "$BASE" "$REMOTE"
+ fi
+ "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
check_unchanged
}
diff --git a/name-hash.c b/name-hash.c
index d8d25c23e9..9bac31a6ab 100644
--- a/name-hash.c
+++ b/name-hash.c
@@ -24,11 +24,11 @@ static unsigned int hash_name(const char *name, int namelen)
{
unsigned int hash = 0x123;
- do {
+ while (namelen--) {
unsigned char c = *name++;
c = icase_hash(c);
hash = hash*101 + c;
- } while (--namelen);
+ }
return hash;
}
@@ -92,6 +92,8 @@ static void lazy_init_name_hash(struct index_state *istate)
if (istate->name_hash_initialized)
return;
+ if (istate->cache_nr)
+ preallocate_hash(&istate->name_hash, istate->cache_nr);
for (nr = 0; nr < istate->cache_nr; nr++)
hash_index_entry(istate, istate->cache[nr]);
istate->name_hash_initialized = 1;
diff --git a/object.c b/object.c
index 4af3451bf8..20703f52ed 100644
--- a/object.c
+++ b/object.c
@@ -185,6 +185,16 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
return obj;
}
+struct object *parse_object_or_die(const unsigned char *sha1,
+ const char *name)
+{
+ struct object *o = parse_object(sha1);
+ if (o)
+ return o;
+
+ die(_("unable to parse object: %s"), name ? name : sha1_to_hex(sha1));
+}
+
struct object *parse_object(const unsigned char *sha1)
{
unsigned long size;
diff --git a/object.h b/object.h
index 6a97b6ba1a..97d384b80a 100644
--- a/object.h
+++ b/object.h
@@ -54,9 +54,20 @@ struct object *lookup_object(const unsigned char *sha1);
extern void *create_object(const unsigned char *sha1, int type, void *obj);
-/** Returns the object, having parsed it to find out what it is. **/
+/*
+ * Returns the object, having parsed it to find out what it is.
+ *
+ * Returns NULL if the object is missing or corrupt.
+ */
struct object *parse_object(const unsigned char *sha1);
+/*
+ * Like parse_object, but will die() instead of returning NULL. If the
+ * "name" parameter is not NULL, it is included in the error message
+ * (otherwise, the sha1 hex is given).
+ */
+struct object *parse_object_or_die(const unsigned char *sha1, const char *name);
+
/* Given the result of read_sha1_file(), returns the object after
* parsing it. eaten_p indicates if the object has a borrowed copy
* of buffer and the caller should not free() it.
diff --git a/pack-refs.c b/pack-refs.c
index f09a054228..4461f71a37 100644
--- a/pack-refs.c
+++ b/pack-refs.c
@@ -27,6 +27,7 @@ static int handle_one_ref(const char *path, const unsigned char *sha1,
int flags, void *cb_data)
{
struct pack_refs_cb_data *cb = cb_data;
+ struct object *o;
int is_tag_ref;
/* Do not pack the symbolic refs */
@@ -39,14 +40,13 @@ static int handle_one_ref(const char *path, const unsigned char *sha1,
return 0;
fprintf(cb->refs_file, "%s %s\n", sha1_to_hex(sha1), path);
- if (is_tag_ref) {
- struct object *o = parse_object(sha1);
- if (o->type == OBJ_TAG) {
- o = deref_tag(o, path, 0);
- if (o)
- fprintf(cb->refs_file, "^%s\n",
- sha1_to_hex(o->sha1));
- }
+
+ o = parse_object_or_die(sha1, path);
+ if (o->type == OBJ_TAG) {
+ o = deref_tag(o, path, 0);
+ if (o)
+ fprintf(cb->refs_file, "^%s\n",
+ sha1_to_hex(o->sha1));
}
if ((cb->flags & PACK_REFS_PRUNE) && !do_not_prune(flags)) {
@@ -128,7 +128,7 @@ int pack_refs(unsigned int flags)
die_errno("unable to create ref-pack file structure");
/* perhaps other traits later as well */
- fprintf(cbdata.refs_file, "# pack-refs with: peeled \n");
+ fprintf(cbdata.refs_file, "# pack-refs with: peeled fully-peeled \n");
for_each_ref(handle_one_ref, &cbdata);
if (ferror(cbdata.refs_file))
diff --git a/perl/Git.pm b/perl/Git.pm
index a56d1e76f7..96cac39a4c 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -60,6 +60,7 @@ require Exporter;
version exec_path html_path hash_object git_cmd_try
remote_refs prompt
get_tz_offset
+ credential credential_read credential_write
temp_acquire temp_release temp_reset temp_path);
@@ -269,13 +270,13 @@ sub command {
if (not defined wantarray) {
# Nothing to pepper the possible exception with.
- _cmd_close($fh, $ctx);
+ _cmd_close($ctx, $fh);
} elsif (not wantarray) {
local $/;
my $text = <$fh>;
try {
- _cmd_close($fh, $ctx);
+ _cmd_close($ctx, $fh);
} catch Git::Error::Command with {
# Pepper with the output:
my $E = shift;
@@ -288,7 +289,7 @@ sub command {
my @lines = <$fh>;
defined and chomp for @lines;
try {
- _cmd_close($fh, $ctx);
+ _cmd_close($ctx, $fh);
} catch Git::Error::Command with {
my $E = shift;
$E->{'-outputref'} = \@lines;
@@ -315,7 +316,7 @@ sub command_oneline {
my $line = <$fh>;
defined $line and chomp $line;
try {
- _cmd_close($fh, $ctx);
+ _cmd_close($ctx, $fh);
} catch Git::Error::Command with {
# Pepper with the output:
my $E = shift;
@@ -383,7 +384,7 @@ have more complicated structure.
sub command_close_pipe {
my ($self, $fh, $ctx) = _maybe_self(@_);
$ctx ||= '<unknown>';
- _cmd_close($fh, $ctx);
+ _cmd_close($ctx, $fh);
}
=item command_bidi_pipe ( COMMAND [, ARGUMENTS... ] )
@@ -420,7 +421,7 @@ and it is the fourth value returned by C<command_bidi_pipe()>. The call idiom
is:
my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe('cat-file --batch-check');
- print "000000000\n" $out;
+ print $out "000000000\n";
while (<$in>) { ... }
$r->command_close_bidi_pipe($pid, $in, $out, $ctx);
@@ -428,23 +429,26 @@ Note that you should not rely on whatever actually is in C<CTX>;
currently it is simply the command name but in future the context might
have more complicated structure.
+C<PIPE_IN> and C<PIPE_OUT> may be C<undef> if they have been closed prior to
+calling this function. This may be useful in a query-response type of
+commands where caller first writes a query and later reads response, eg:
+
+ my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe('cat-file --batch-check');
+ print $out "000000000\n";
+ close $out;
+ while (<$in>) { ... }
+ $r->command_close_bidi_pipe($pid, $in, undef, $ctx);
+
+This idiom may prevent potential dead locks caused by data sent to the output
+pipe not being flushed and thus not reaching the executed command.
+
=cut
sub command_close_bidi_pipe {
local $?;
- my ($pid, $in, $out, $ctx) = @_;
- foreach my $fh ($in, $out) {
- unless (close $fh) {
- if ($!) {
- carp "error closing pipe: $!";
- } elsif ($? >> 8) {
- throw Git::Error::Command($ctx, $? >>8);
- }
- }
- }
-
+ my ($self, $pid, $in, $out, $ctx) = _maybe_self(@_);
+ _cmd_close($ctx, (grep { defined } ($in, $out)));
waitpid $pid, 0;
-
if ($? >> 8) {
throw Git::Error::Command($ctx, $? >>8);
}
@@ -965,20 +969,22 @@ sub cat_blob {
my $size = $1;
my $blob;
- my $bytesRead = 0;
+ my $bytesLeft = $size;
while (1) {
- my $bytesLeft = $size - $bytesRead;
last unless $bytesLeft;
my $bytesToRead = $bytesLeft < 1024 ? $bytesLeft : 1024;
- my $read = read($in, $blob, $bytesToRead, $bytesRead);
+ my $read = read($in, $blob, $bytesToRead);
unless (defined($read)) {
$self->_close_cat_blob();
throw Error::Simple("in pipe went bad");
}
-
- $bytesRead += $read;
+ unless (print $fh $blob) {
+ $self->_close_cat_blob();
+ throw Error::Simple("couldn't write to passed in filehandle");
+ }
+ $bytesLeft -= $read;
}
# Skip past the trailing newline.
@@ -993,11 +999,6 @@ sub cat_blob {
throw Error::Simple("didn't find newline after blob");
}
- unless (print $fh $blob) {
- $self->_close_cat_blob();
- throw Error::Simple("couldn't write to passed in filehandle");
- }
-
return $size;
}
@@ -1023,6 +1024,156 @@ sub _close_cat_blob {
}
+=item credential_read( FILEHANDLE )
+
+Reads credential key-value pairs from C<FILEHANDLE>. Reading stops at EOF or
+when an empty line is encountered. Each line must be of the form C<key=value>
+with a non-empty key. Function returns hash with all read values. Any white
+space (other than new-line character) is preserved.
+
+=cut
+
+sub credential_read {
+ my ($self, $reader) = _maybe_self(@_);
+ my %credential;
+ while (<$reader>) {
+ chomp;
+ if ($_ eq '') {
+ last;
+ } elsif (!/^([^=]+)=(.*)$/) {
+ throw Error::Simple("unable to parse git credential data:\n$_");
+ }
+ $credential{$1} = $2;
+ }
+ return %credential;
+}
+
+=item credential_write( FILEHANDLE, CREDENTIAL_HASHREF )
+
+Writes credential key-value pairs from hash referenced by
+C<CREDENTIAL_HASHREF> to C<FILEHANDLE>. Keys and values cannot contain
+new-lines or NUL bytes characters, and key cannot contain equal signs nor be
+empty (if they do Error::Simple is thrown). Any white space is preserved. If
+value for a key is C<undef>, it will be skipped.
+
+If C<'url'> key exists it will be written first. (All the other key-value
+pairs are written in sorted order but you should not depend on that). Once
+all lines are written, an empty line is printed.
+
+=cut
+
+sub credential_write {
+ my ($self, $writer, $credential) = _maybe_self(@_);
+ my ($key, $value);
+
+ # Check if $credential is valid prior to writing anything
+ while (($key, $value) = each %$credential) {
+ if (!defined $key || !length $key) {
+ throw Error::Simple("credential key empty or undefined");
+ } elsif ($key =~ /[=\n\0]/) {
+ throw Error::Simple("credential key contains invalid characters: $key");
+ } elsif (defined $value && $value =~ /[\n\0]/) {
+ throw Error::Simple("credential value for key=$key contains invalid characters: $value");
+ }
+ }
+
+ for $key (sort {
+ # url overwrites other fields, so it must come first
+ return -1 if $a eq 'url';
+ return 1 if $b eq 'url';
+ return $a cmp $b;
+ } keys %$credential) {
+ if (defined $credential->{$key}) {
+ print $writer $key, '=', $credential->{$key}, "\n";
+ }
+ }
+ print $writer "\n";
+}
+
+sub _credential_run {
+ my ($self, $credential, $op) = _maybe_self(@_);
+ my ($pid, $reader, $writer, $ctx) = command_bidi_pipe('credential', $op);
+
+ credential_write $writer, $credential;
+ close $writer;
+
+ if ($op eq "fill") {
+ %$credential = credential_read $reader;
+ }
+ if (<$reader>) {
+ throw Error::Simple("unexpected output from git credential $op response:\n$_\n");
+ }
+
+ command_close_bidi_pipe($pid, $reader, undef, $ctx);
+}
+
+=item credential( CREDENTIAL_HASHREF [, OPERATION ] )
+
+=item credential( CREDENTIAL_HASHREF, CODE )
+
+Executes C<git credential> for a given set of credentials and specified
+operation. In both forms C<CREDENTIAL_HASHREF> needs to be a reference to
+a hash which stores credentials. Under certain conditions the hash can
+change.
+
+In the first form, C<OPERATION> can be C<'fill'>, C<'approve'> or C<'reject'>,
+and function will execute corresponding C<git credential> sub-command. If
+it's omitted C<'fill'> is assumed. In case of C<'fill'> the values stored in
+C<CREDENTIAL_HASHREF> will be changed to the ones returned by the C<git
+credential fill> command. The usual usage would look something like:
+
+ my %cred = (
+ 'protocol' => 'https',
+ 'host' => 'example.com',
+ 'username' => 'bob'
+ );
+ Git::credential \%cred;
+ if (try_to_authenticate($cred{'username'}, $cred{'password'})) {
+ Git::credential \%cred, 'approve';
+ ... do more stuff ...
+ } else {
+ Git::credential \%cred, 'reject';
+ }
+
+In the second form, C<CODE> needs to be a reference to a subroutine. The
+function will execute C<git credential fill> to fill the provided credential
+hash, then call C<CODE> with C<CREDENTIAL_HASHREF> as the sole argument. If
+C<CODE>'s return value is defined, the function will execute C<git credential
+approve> (if return value yields true) or C<git credential reject> (if return
+value is false). If the return value is undef, nothing at all is executed;
+this is useful, for example, if the credential could neither be verified nor
+rejected due to an unrelated network error. The return value is the same as
+what C<CODE> returns. With this form, the usage might look as follows:
+
+ if (Git::credential {
+ 'protocol' => 'https',
+ 'host' => 'example.com',
+ 'username' => 'bob'
+ }, sub {
+ my $cred = shift;
+ return !!try_to_authenticate($cred->{'username'},
+ $cred->{'password'});
+ }) {
+ ... do more stuff ...
+ }
+
+=cut
+
+sub credential {
+ my ($self, $credential, $op_or_code) = (_maybe_self(@_), 'fill');
+
+ if ('CODE' eq ref $op_or_code) {
+ _credential_run $credential, 'fill';
+ my $ret = $op_or_code->($credential);
+ if (defined $ret) {
+ _credential_run $credential, $ret ? 'approve' : 'reject';
+ }
+ return $ret;
+ } else {
+ _credential_run $credential, $op_or_code;
+ }
+}
+
{ # %TEMP_* Lexical Context
my (%TEMP_FILEMAP, %TEMP_FILES);
@@ -1378,9 +1529,11 @@ sub _execv_git_cmd { exec('git', @_); }
# Close pipe to a subprocess.
sub _cmd_close {
- my ($fh, $ctx) = @_;
- if (not close $fh) {
- if ($!) {
+ my $ctx = shift @_;
+ foreach my $fh (@_) {
+ if (close $fh) {
+ # nop
+ } elsif ($!) {
# It's just close, no point in fatalities
carp "error closing pipe: $!";
} elsif ($? >> 8) {
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 0ebc68ac7e..5273ee8867 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1493,13 +1493,18 @@ sub lookup_svn_merge {
my @merged_commit_ranges;
# find the tip
for my $range ( @ranges ) {
+ if ($range =~ /[*]$/) {
+ warn "W: Ignoring partial merge in svn:mergeinfo "
+ ."dirprop: $source:$range\n";
+ next;
+ }
my ($bottom, $top) = split "-", $range;
$top ||= $bottom;
my $bottom_commit = $gs->find_rev_after( $bottom, 1, $top );
my $top_commit = $gs->find_rev_before( $top, 1, $bottom );
unless ($top_commit and $bottom_commit) {
- warn "W:unknown path/rev in svn:mergeinfo "
+ warn "W: unknown path/rev in svn:mergeinfo "
."dirprop: $source:$range\n";
next;
}
diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
index 049c97bfaf..6a212eb7a8 100644
--- a/perl/Git/SVN/Ra.pm
+++ b/perl/Git/SVN/Ra.pm
@@ -295,7 +295,7 @@ sub gs_do_switch {
my $full_url = add_path_to_url( $self->url, $path );
my ($ra, $reparented);
- if ($old_url =~ m#^svn(\+ssh)?://# ||
+ if ($old_url =~ m#^svn(\+\w+)?://# ||
($full_url =~ m#^https?://# &&
canonicalize_url($full_url) ne $full_url)) {
$_[0] = undef;
diff --git a/po/de.po b/po/de.po
index d309415bb8..83c30b1587 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: git 1.8.2\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2013-01-25 12:33+0800\n"
+"POT-Creation-Date: 2013-03-05 12:36+0800\n"
"PO-Revision-Date: 2012-10-02 19:35+0200\n"
"Last-Translator: Ralf Thielow <ralf.thielow@gmail.com>\n"
"Language-Team: German <>\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
-#: advice.c:45
+#: advice.c:49
#, c-format
msgid "hint: %.*s\n"
msgstr "Hinweis: %.*s\n"
@@ -26,7 +26,7 @@ msgstr "Hinweis: %.*s\n"
#. * Message used both when 'git commit' fails and when
#. * other commands doing a merge do.
#.
-#: advice.c:75
+#: advice.c:79
msgid ""
"Fix them up in the work tree,\n"
"and then use 'git add/rm <file>' as\n"
@@ -73,11 +73,11 @@ msgstr "Prefix"
msgid "prepend prefix to each pathname in the archive"
msgstr "stellt einen Präfix vor jeden Pfadnamen in der Ausgabe"
-#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2380
-#: builtin/blame.c:2381 builtin/config.c:55 builtin/fast-export.c:653
+#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2366
+#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:653
#: builtin/fast-export.c:655 builtin/grep.c:715 builtin/hash-object.c:77
-#: builtin/ls-files.c:494 builtin/ls-files.c:497 builtin/notes.c:540
-#: builtin/notes.c:697 builtin/read-tree.c:107 parse-options.h:149
+#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536
+#: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149
msgid "file"
msgstr "Datei"
@@ -117,7 +117,7 @@ msgstr "Projektarchiv"
msgid "retrieve the archive from remote repository <repo>"
msgstr "ruft das Archiv von externem Projektarchiv <Projektarchiv> ab"
-#: archive.c:347 builtin/archive.c:95 builtin/notes.c:619
+#: archive.c:347 builtin/archive.c:95 builtin/notes.c:615
msgid "command"
msgstr "Programm"
@@ -127,10 +127,10 @@ msgstr "Pfad zum externen \"git-upload-archive\"-Programm"
#: attr.c:259
msgid ""
-"Negative patterns are forbidden in git attributes\n"
+"Negative patterns are ignored in git attributes\n"
"Use '\\!' for literal leading exclamation."
msgstr ""
-"Verneinende Muster sind in Git-Attributen verboten.\n"
+"Verneinende Muster werden in Git-Attributen ignoriert.\n"
"Benutzen Sie '\\!' für führende Ausrufezeichen."
#: bundle.c:36
@@ -306,23 +306,23 @@ msgid_plural "%lu years ago"
msgstr[0] "vor %lu Jahr"
msgstr[1] "vor %lu Jahren"
-#: diff.c:111
+#: diff.c:112
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
msgstr ""
" Fehler beim Parsen des abgeschnittenen \"dirstat\" Prozentsatzes '%s'\n"
-#: diff.c:116
+#: diff.c:117
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
msgstr " Unbekannter \"dirstat\" Parameter '%s'\n"
-#: diff.c:194
+#: diff.c:210
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "Unbekannter Wert in Konfigurationsvariable 'diff.dirstat': '%s'"
-#: diff.c:237
+#: diff.c:260
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
@@ -331,7 +331,7 @@ msgstr ""
"Fehler in 'diff.dirstat' Konfigurationsvariable gefunden:\n"
"%s"
-#: diff.c:3494
+#: diff.c:3468
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
@@ -340,12 +340,12 @@ msgstr ""
"Fehler beim Parsen des --dirstat/-X Optionsparameters:\n"
"%s"
-#: diff.c:3508
+#: diff.c:3482
#, c-format
msgid "Failed to parse --submodule option parameter: '%s'"
msgstr "Fehler beim Parsen des --submodule Optionsparameters: '%s'"
-#: gpg-interface.c:59
+#: gpg-interface.c:59 gpg-interface.c:127
msgid "could not run gpg."
msgstr "konnte gpg nicht ausführen"
@@ -357,6 +357,16 @@ msgstr "gpg hat die Daten nicht akzeptiert"
msgid "gpg failed to sign the data"
msgstr "gpg beim Signieren der Daten fehlgeschlagen"
+#: gpg-interface.c:112
+#, c-format
+msgid "could not create temporary file '%s': %s"
+msgstr "konnte temporäre Datei '%s' nicht erstellen: %s"
+
+#: gpg-interface.c:115
+#, c-format
+msgid "failed writing detached signature to '%s': %s"
+msgstr "Fehler beim Schreiben der Signatur nach '%s': %s"
+
#: grep.c:1622
#, c-format
msgid "'%s': unable to read %s"
@@ -381,7 +391,11 @@ msgstr "Vorhandene Git-Kommandos in '%s'"
msgid "git commands available from elsewhere on your $PATH"
msgstr "Vorhandene Git-Kommandos irgendwo in Ihrem $PATH"
-#: help.c:275
+#: help.c:235
+msgid "The most commonly used git commands are:"
+msgstr "Die allgemein verwendeten Git-Kommandos sind:"
+
+#: help.c:292
#, c-format
msgid ""
"'%s' appears to be a git command, but we were not\n"
@@ -390,11 +404,11 @@ msgstr ""
"'%s' scheint ein git-Kommando zu sein, konnte aber\n"
"nicht ausgeführt werden. Vielleicht ist git-%s fehlerhaft?"
-#: help.c:332
+#: help.c:349
msgid "Uh oh. Your system reports no Git commands at all."
msgstr "Uh oh. Keine Git-Kommandos auf Ihrem System vorhanden."
-#: help.c:354
+#: help.c:371
#, c-format
msgid ""
"WARNING: You called a Git command named '%s', which does not exist.\n"
@@ -403,17 +417,17 @@ msgstr ""
"Warnung: Sie haben das nicht existierende Git-Kommando '%s' ausgeführt.\n"
"Setze fort unter der Annahme, dass Sie '%s' gemeint haben"
-#: help.c:359
+#: help.c:376
#, c-format
msgid "in %0.1f seconds automatically..."
msgstr "automatisch in %0.1f Sekunden..."
-#: help.c:366
+#: help.c:383
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
msgstr "git: '%s' ist kein Git-Kommando. Siehe 'git --help'."
-#: help.c:370
+#: help.c:387
msgid ""
"\n"
"Did you mean this?"
@@ -694,39 +708,53 @@ msgstr "Konnte Objekt '%s' nicht parsen."
msgid "Unable to write index."
msgstr "Konnte Bereitstellung nicht schreiben."
-#: parse-options.c:485
+#: parse-options.c:489
msgid "..."
msgstr "..."
-#: parse-options.c:503
+#: parse-options.c:507
#, c-format
msgid "usage: %s"
msgstr "Verwendung: %s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation
-#: parse-options.c:507
+#: parse-options.c:511
#, c-format
msgid " or: %s"
msgstr " oder: %s"
-#: parse-options.c:510
+#: parse-options.c:514
#, c-format
msgid " %s"
msgstr " %s"
-#: remote.c:1686
+#: parse-options.c:548
+msgid "-NUM"
+msgstr "-NUM"
+
+#: pathspec.c:83
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr "Pfad '%s' befindet sich in Unterprojekt '%.*s'"
+
+#: pathspec.c:99
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr "'%s' ist über einem symbolischen Link"
+
+#: remote.c:1653
#, 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] "Ihr Zweig ist vor '%s' um %d Version.\n"
msgstr[1] "Ihr Zweig ist vor '%s' um %d Versionen.\n"
-#: remote.c:1692
+#: remote.c:1659
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (benutzen Sie \"git push\" um lokalen Versionen herauszubringen)\n"
-#: remote.c:1695
+#: remote.c:1662
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
@@ -737,12 +765,12 @@ msgstr[1] ""
"Ihr Zweig ist zu '%s' um %d Versionen hinterher, und kann vorgespult "
"werden.\n"
-#: remote.c:1703
+#: remote.c:1670
msgid " (use \"git pull\" to update your local branch)\n"
msgstr ""
" (benutzen Sie \"git pull\" um Ihren lokalen Zweig zu aktualisieren)\n"
-#: remote.c:1706
+#: remote.c:1673
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -757,20 +785,20 @@ msgstr[1] ""
"Ihr Zweig und '%s' sind divergiert,\n"
"und haben jeweils %d und %d unterschiedliche Versionen.\n"
-#: remote.c:1716
+#: remote.c:1683
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
msgstr ""
" (benutzen Sie \"git pull\" um Ihren Zweig mit dem externen "
"zusammenzuführen)\n"
-#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:875 builtin/merge.c:985
-#: builtin/merge.c:995
+#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:874 builtin/merge.c:984
+#: builtin/merge.c:994
#, c-format
msgid "Could not open '%s' for writing"
msgstr "Konnte '%s' nicht zum Schreiben öffnen."
-#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:987
-#: builtin/merge.c:1000
+#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:986
+#: builtin/merge.c:999
#, c-format
msgid "Could not write to '%s'"
msgstr "Konnte nicht nach '%s' schreiben."
@@ -973,7 +1001,7 @@ msgstr "kann Zweigspitze (HEAD) nicht auflösen"
msgid "cannot abort from a branch yet to be born"
msgstr "kann nicht abbrechen: bin auf einem Zweig, der noch geboren wird"
-#: sequencer.c:821 builtin/apply.c:4016
+#: sequencer.c:821 builtin/apply.c:4056
#, c-format
msgid "cannot open %s: %s"
msgstr "Kann %s nicht öffnen: %s"
@@ -1202,160 +1230,185 @@ msgstr "nicht zusammengeführt: %s"
msgid "bug: unhandled diff status %c"
msgstr "Fehler: unbehandelter Differenz-Status %c"
-#: wt-status.c:787
+#: wt-status.c:789
msgid "You have unmerged paths."
msgstr "Sie haben nicht zusammengeführte Pfade."
-#: wt-status.c:790 wt-status.c:914
+#: wt-status.c:792 wt-status.c:944
msgid " (fix conflicts and run \"git commit\")"
msgstr " (beheben Sie die Konflikte und führen Sie \"git commit\" aus)"
-#: wt-status.c:793
+#: wt-status.c:795
msgid "All conflicts fixed but you are still merging."
msgstr ""
"Alle Konflikte sind behoben, aber Sie sind immer noch beim Zusammenführen."
-#: wt-status.c:796
+#: wt-status.c:798
msgid " (use \"git commit\" to conclude merge)"
msgstr " (benutzen Sie \"git commit\" um die Zusammenführung abzuschließen)"
-#: wt-status.c:806
+#: wt-status.c:808
msgid "You are in the middle of an am session."
msgstr "Eine \"am\"-Sitzung ist im Gange."
-#: wt-status.c:809
+#: wt-status.c:811
msgid "The current patch is empty."
msgstr "Der aktuelle Patch ist leer."
-#: wt-status.c:813
+#: wt-status.c:815
msgid " (fix conflicts and then run \"git am --resolved\")"
msgstr ""
" (beheben Sie die Konflikte und führen Sie dann \"git am --resolved\" aus)"
-#: wt-status.c:815
+#: wt-status.c:817
msgid " (use \"git am --skip\" to skip this patch)"
msgstr " (benutzen Sie \"git am --skip\" um diesen Patch auszulassen)"
-#: wt-status.c:817
+#: wt-status.c:819
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr ""
" (benutzen Sie \"git am --abort\" um den ursprünglichen Zweig "
"wiederherzustellen)"
-#: wt-status.c:875 wt-status.c:885
+#: wt-status.c:879 wt-status.c:896
+#, c-format
+msgid "You are currently rebasing branch '%s' on '%s'."
+msgstr "Sie sind gerade beim Neuaufbau von Zweig '%s' auf '%s'."
+
+#: wt-status.c:884 wt-status.c:901
msgid "You are currently rebasing."
msgstr "Sie sind gerade beim Neuaufbau."
-#: wt-status.c:878
+#: wt-status.c:887
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr ""
" (beheben Sie die Konflikte und führen Sie dann \"git rebase --continue\" "
"aus)"
-#: wt-status.c:880
+#: wt-status.c:889
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (benutzen Sie \"git rebase --skip\" um diesen Patch auszulassen)"
-#: wt-status.c:882
+#: wt-status.c:891
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr ""
" (benutzen Sie \"git rebase --abort\" um den ursprünglichen Zweig "
"auszuchecken)"
-#: wt-status.c:888
+#: wt-status.c:904
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr " (alle Konflikte behoben: führen Sie \"git rebase --continue\" aus)"
-#: wt-status.c:890
+#: wt-status.c:908
+#, c-format
+msgid ""
+"You are currently splitting a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Sie teilen gerade eine Version auf, während ein Neuaufbau von Zweig '%s' auf "
+"'%s' im Gange ist."
+
+#: wt-status.c:913
msgid "You are currently splitting a commit during a rebase."
msgstr "Sie teilen gerade eine Version während eines Neuaufbaus auf."
-#: wt-status.c:893
+#: wt-status.c:916
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr ""
" (Sobald Ihr Arbeitsverzeichnis sauber ist, führen Sie \"git rebase --"
"continue\" aus)"
-#: wt-status.c:895
+#: wt-status.c:920
+#, c-format
+msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Sie editieren gerade eine Version während eines Neuaufbaus von Zweig '%s' "
+"auf '%s'."
+
+#: wt-status.c:925
msgid "You are currently editing a commit during a rebase."
msgstr "Sie editieren gerade eine Version während eines Neuaufbaus."
-#: wt-status.c:898
+#: wt-status.c:928
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
" (benutzen Sie \"git commit --amend\" um die aktuelle Version nachzubessern)"
-#: wt-status.c:900
+#: wt-status.c:930
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr ""
" (benutzen Sie \"git rebase --continue\" sobald Ihre Änderungen "
"abgeschlossen sind)"
-#: wt-status.c:910
+#: wt-status.c:940
msgid "You are currently cherry-picking."
msgstr "Sie führen gerade \"cherry-pick\" aus."
-#: wt-status.c:917
+#: wt-status.c:947
msgid " (all conflicts fixed: run \"git commit\")"
msgstr " (alle Konflikte behoben: führen Sie \"git commit\" aus)"
-#: wt-status.c:926
+#: wt-status.c:958
+#, c-format
+msgid "You are currently bisecting branch '%s'."
+msgstr "Sie sind gerade bei einer binären Suche in Zweig '%s'."
+
+#: wt-status.c:962
msgid "You are currently bisecting."
-msgstr "Sie sind gerade beim Halbieren."
+msgstr "Sie sind gerade bei einer binären Suche."
-#: wt-status.c:929
+#: wt-status.c:965
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr ""
" (benutzen Sie \"git bisect reset\" um zum ursprünglichen Zweig "
"zurückzukehren)"
-#: wt-status.c:980
+#: wt-status.c:1064
msgid "On branch "
msgstr "Auf Zweig "
-#: wt-status.c:987
+#: wt-status.c:1071
msgid "Not currently on any branch."
msgstr "Im Moment auf keinem Zweig."
-#: wt-status.c:999
+#: wt-status.c:1083
msgid "Initial commit"
msgstr "Initiale Version"
-#: wt-status.c:1013
+#: wt-status.c:1097
msgid "Untracked files"
msgstr "Unbeobachtete Dateien"
-#: wt-status.c:1015
+#: wt-status.c:1099
msgid "Ignored files"
msgstr "Ignorierte Dateien"
-#: wt-status.c:1017
+#: wt-status.c:1101
#, c-format
msgid "Untracked files not listed%s"
msgstr "Unbeobachtete Dateien nicht aufgelistet%s"
-#: wt-status.c:1019
+#: wt-status.c:1103
msgid " (use -u option to show untracked files)"
msgstr " (benutzen Sie die Option -u um unbeobachteten Dateien anzuzeigen)"
-#: wt-status.c:1025
+#: wt-status.c:1109
msgid "No changes"
msgstr "Keine Änderungen"
-#: wt-status.c:1030
+#: wt-status.c:1114
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
"keine Änderungen zum Eintragen hinzugefügt (benutzen Sie \"git add\" und/"
"oder \"git commit -a\")\n"
-#: wt-status.c:1033
+#: wt-status.c:1117
#, c-format
msgid "no changes added to commit\n"
msgstr "keine Änderungen zum Eintragen hinzugefügt\n"
-#: wt-status.c:1036
+#: wt-status.c:1120
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
@@ -1364,199 +1417,239 @@ msgstr ""
"nichts zum Eintragen hinzugefügt, aber es gibt unbeobachtete Dateien "
"(benutzen Sie \"git add\" zum Beobachten)\n"
-#: wt-status.c:1039
+#: wt-status.c:1123
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr "nichts zum Eintragen hinzugefügt, aber es gibt unbeobachtete Dateien\n"
-#: wt-status.c:1042
+#: wt-status.c:1126
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr ""
"nichts einzutragen (Erstellen/Kopieren Sie Dateien und benutzen Sie \"git add"
"\" zum Beobachten)\n"
-#: wt-status.c:1045 wt-status.c:1050
+#: wt-status.c:1129 wt-status.c:1134
#, c-format
msgid "nothing to commit\n"
msgstr "nichts einzutragen\n"
-#: wt-status.c:1048
+#: wt-status.c:1132
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr ""
"nichts einzutragen (benutzen Sie die Option -u, um unbeobachtete Dateien "
"anzuzeigen)\n"
-#: wt-status.c:1052
+#: wt-status.c:1136
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr "nichts einzutragen, Arbeitsverzeichnis sauber\n"
-#: wt-status.c:1160
+#: wt-status.c:1244
msgid "HEAD (no branch)"
msgstr "HEAD (kein Zweig)"
-#: wt-status.c:1166
+#: wt-status.c:1250
msgid "Initial commit on "
msgstr "Initiale Version auf "
-#: wt-status.c:1181
+#: wt-status.c:1265
msgid "behind "
msgstr "hinterher "
-#: wt-status.c:1184 wt-status.c:1187
+#: wt-status.c:1268 wt-status.c:1271
msgid "ahead "
msgstr "voraus "
-#: wt-status.c:1189
+#: wt-status.c:1273
msgid ", behind "
msgstr ", hinterher "
-#: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
-msgstr "git add [Optionen] [--] [<Dateimuster>...]"
+#: compat/precompose_utf8.c:58 builtin/clone.c:341
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "Konnte '%s' nicht entfernen."
+
+#: builtin/add.c:20
+msgid "git add [options] [--] <pathspec>..."
+msgstr "git add [Optionen] [--] [<Pfadspezifikation>...]"
-#: builtin/add.c:62
+#: builtin/add.c:63
#, c-format
msgid "unexpected diff status %c"
msgstr "unerwarteter Differenz-Status %c"
-#: builtin/add.c:67 builtin/commit.c:231
+#: builtin/add.c:68 builtin/commit.c:231
msgid "updating files failed"
msgstr "Aktualisierung der Dateien fehlgeschlagen"
-#: builtin/add.c:77
+#: builtin/add.c:78
#, c-format
msgid "remove '%s'\n"
msgstr "lösche '%s'\n"
-#: builtin/add.c:176
-#, c-format
-msgid "Path '%s' is in submodule '%.*s'"
-msgstr "Pfad '%s' befindet sich in Unterprojekt '%.*s'"
-
-#: builtin/add.c:192
+#: builtin/add.c:148
msgid "Unstaged changes after refreshing the index:"
msgstr ""
"Nicht bereitgestellte Änderungen nach Aktualisierung der Bereitstellung:"
-#: builtin/add.c:195 builtin/add.c:460 builtin/rm.c:275
+#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275
#, c-format
msgid "pathspec '%s' did not match any files"
msgstr "Pfadspezifikation '%s' stimmt mit keinen Dateien überein"
-#: builtin/add.c:209
-#, c-format
-msgid "'%s' is beyond a symbolic link"
-msgstr "'%s' ist über einem symbolischen Link"
-
-#: builtin/add.c:276
+#: builtin/add.c:234
msgid "Could not read the index"
msgstr "Konnte die Bereitstellung nicht lesen"
-#: builtin/add.c:286
+#: builtin/add.c:244
#, c-format
msgid "Could not open '%s' for writing."
msgstr "Konnte '%s' nicht zum Schreiben öffnen."
-#: builtin/add.c:290
+#: builtin/add.c:248
msgid "Could not write patch"
msgstr "Konnte Patch nicht schreiben"
-#: builtin/add.c:295
+#: builtin/add.c:253
#, c-format
msgid "Could not stat '%s'"
msgstr "Konnte Verzeichnis '%s' nicht lesen"
-#: builtin/add.c:297
+#: builtin/add.c:255
msgid "Empty patch. Aborted."
msgstr "Leerer Patch. Abgebrochen."
-#: builtin/add.c:303
+#: builtin/add.c:261
#, c-format
msgid "Could not apply '%s'"
msgstr "Konnte '%s' nicht anwenden."
-#: builtin/add.c:313
+#: builtin/add.c:271
msgid "The following paths are ignored by one of your .gitignore files:\n"
msgstr ""
"Die folgenden Pfade werden durch eine Ihrer \".gitignore\" Dateien "
"ignoriert:\n"
-#: builtin/add.c:319 builtin/clean.c:160 builtin/fetch.c:78 builtin/mv.c:63
-#: builtin/prune-packed.c:76 builtin/push.c:396 builtin/remote.c:1253
+#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63
+#: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253
#: builtin/rm.c:206
msgid "dry run"
msgstr "Probelauf"
-#: builtin/add.c:320 builtin/apply.c:4365 builtin/commit.c:1160
-#: builtin/count-objects.c:82 builtin/fsck.c:613 builtin/log.c:1522
-#: builtin/mv.c:62 builtin/read-tree.c:112
+#: builtin/add.c:278 builtin/apply.c:4405 builtin/check-ignore.c:19
+#: builtin/commit.c:1150 builtin/count-objects.c:82 builtin/fsck.c:613
+#: builtin/log.c:1522 builtin/mv.c:62 builtin/read-tree.c:112
msgid "be verbose"
msgstr "erweiterte Ausgaben"
-#: builtin/add.c:322
+#: builtin/add.c:280
msgid "interactive picking"
msgstr "interaktives Auswählen"
-#: builtin/add.c:323 builtin/checkout.c:1031 builtin/reset.c:258
+#: builtin/add.c:281 builtin/checkout.c:1031 builtin/reset.c:258
msgid "select hunks interactively"
msgstr "interaktiv Bereiche auswählen"
-#: builtin/add.c:324
+#: builtin/add.c:282
msgid "edit current diff and apply"
msgstr "aktuelle Unterschiede editieren und anwenden"
-#: builtin/add.c:325
+#: builtin/add.c:283
msgid "allow adding otherwise ignored files"
msgstr "erlaubt das Hinzufügen andernfalls ignorierter Dateien"
-#: builtin/add.c:326
+#: builtin/add.c:284
msgid "update tracked files"
msgstr "aktualisiert beobachtete Dateien"
-#: builtin/add.c:327
+#: builtin/add.c:285
msgid "record only the fact that the path will be added later"
msgstr "speichert nur, dass der Pfad später hinzugefügt werden soll"
-#: builtin/add.c:328
+#: builtin/add.c:286
msgid "add changes from all tracked and untracked files"
msgstr ""
"fügt Änderungen von allen beobachteten und unbeobachteten Dateien hinzu"
-#: builtin/add.c:329
+#: builtin/add.c:287
msgid "don't add, only refresh the index"
msgstr "fügt nichts hinzu, aktualisiert nur die Bereitstellung"
-#: builtin/add.c:330
+#: builtin/add.c:288
msgid "just skip files which cannot be added because of errors"
msgstr ""
"überspringt Dateien, die aufgrund von Fehlern nicht hinzugefügt werden "
"konnten"
-#: builtin/add.c:331
+#: builtin/add.c:289
msgid "check if - even missing - files are ignored in dry run"
msgstr "prüft ob - auch fehlende - Dateien im Probelauf ignoriert werden"
-#: builtin/add.c:353
+#: builtin/add.c:311
#, c-format
msgid "Use -f if you really want to add them.\n"
msgstr "Verwenden Sie -f wenn Sie diese wirklich hinzufügen möchten.\n"
-#: builtin/add.c:354
+#: builtin/add.c:312
msgid "no files added"
msgstr "keine Dateien hinzugefügt"
-#: builtin/add.c:360
+#: builtin/add.c:318
msgid "adding files failed"
msgstr "Hinzufügen von Dateien fehlgeschlagen"
-#: builtin/add.c:392
+#.
+#. * To be consistent with "git add -p" and most Git
+#. * commands, we should default to being tree-wide, but
+#. * this is not the original behavior and can't be
+#. * changed until users trained themselves not to type
+#. * "git add -u" or "git add -A". For now, we warn and
+#. * keep the old behavior. Later, this warning can be
+#. * turned into a die(...), and eventually we may
+#. * reallow the command with a new behavior.
+#.
+#: builtin/add.c:335
+#, c-format
+msgid ""
+"The behavior of 'git add %s (or %s)' with no path argument from a\n"
+"subdirectory of the tree will change in Git 2.0 and should not be used "
+"anymore.\n"
+"To add content for the whole tree, run:\n"
+"\n"
+" git add %s :/\n"
+" (or git add %s :/)\n"
+"\n"
+"To restrict the command to the current directory, run:\n"
+"\n"
+" git add %s .\n"
+" (or git add %s .)\n"
+"\n"
+"With the current Git version, the command is restricted to the current "
+"directory."
+msgstr ""
+"Das Verhalten von 'git add %s (oder %s)' ohne ein Pfad-Argument von\n"
+"einem Unterverzeichnis aus wird in Git 2.0 geändert und sollte nicht\n"
+"mehr verwendet werden.\n"
+"Um Dateien des gesamten Projektverzeichnisses hinzuzufügen, führen Sie aus:\n"
+"\n"
+" git add %s :/\n"
+" (oder git add %s :/)\n"
+"\n"
+"Zur Einschränkung auf das aktuelle Verzeichnis führen Sie aus:\n"
+"\n"
+" git add %s .\n"
+" (oder git add %s .)\n"
+"\n"
+"Mit der aktuellen Version von Git ist das Kommando auf das aktuelle\n"
+"Verzeichnis beschränkt."
+
+#: builtin/add.c:381
msgid "-A and -u are mutually incompatible"
msgstr "Die Optionen -A und -u sind zueinander inkompatibel."
-#: builtin/add.c:394
+#: builtin/add.c:383
msgid "Option --ignore-missing can only be used together with --dry-run"
msgstr ""
"Die Option --ignore-missing kann nur zusammen mit --dry-run verwendet werden."
@@ -1571,12 +1664,12 @@ msgstr "Nichts spezifiziert, nichts hinzugefügt.\n"
msgid "Maybe you wanted to say 'git add .'?\n"
msgstr "Wollten Sie vielleicht 'git add .' sagen?\n"
-#: builtin/add.c:421 builtin/clean.c:203 builtin/commit.c:291 builtin/mv.c:82
-#: builtin/rm.c:235
+#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204
+#: builtin/commit.c:291 builtin/mv.c:82 builtin/rm.c:235
msgid "index file corrupt"
msgstr "Bereitstellungsdatei beschädigt"
-#: builtin/add.c:481 builtin/apply.c:4461 builtin/mv.c:229 builtin/rm.c:370
+#: builtin/add.c:481 builtin/apply.c:4501 builtin/mv.c:229 builtin/rm.c:370
msgid "Unable to write new index file"
msgstr "Konnte neue Bereitstellungsdatei nicht schreiben."
@@ -1633,17 +1726,17 @@ msgstr ""
msgid "git apply: bad git-diff - expected /dev/null on line %d"
msgstr "git apply: ungültiges 'git-diff' - erwartete /dev/null in Zeile %d"
-#: builtin/apply.c:1420
+#: builtin/apply.c:1422
#, c-format
msgid "recount: unexpected line: %.*s"
msgstr "recount: unerwartete Zeile: %.*s"
-#: builtin/apply.c:1477
+#: builtin/apply.c:1479
#, c-format
msgid "patch fragment without header at line %d: %.*s"
msgstr "Patch-Fragment ohne Kopfbereich bei Zeile %d: %.*s"
-#: builtin/apply.c:1494
+#: builtin/apply.c:1496
#, c-format
msgid ""
"git diff header lacks filename information when removing %d leading pathname "
@@ -1658,66 +1751,66 @@ msgstr[1] ""
"Dem Kopfbereich von \"git diff\" fehlen Informationen zum Dateinamen, wenn "
"%d vorangestellte Teile des Pfades entfernt werden (Zeile %d)"
-#: builtin/apply.c:1654
+#: builtin/apply.c:1656
msgid "new file depends on old contents"
msgstr "neue Datei hängt von alten Inhalten ab"
-#: builtin/apply.c:1656
+#: builtin/apply.c:1658
msgid "deleted file still has contents"
msgstr "entfernte Datei hat noch Inhalte"
-#: builtin/apply.c:1682
+#: builtin/apply.c:1684
#, c-format
msgid "corrupt patch at line %d"
msgstr "fehlerhafter Patch bei Zeile %d"
-#: builtin/apply.c:1718
+#: builtin/apply.c:1720
#, c-format
msgid "new file %s depends on old contents"
msgstr "neue Datei %s hängt von alten Inhalten ab"
-#: builtin/apply.c:1720
+#: builtin/apply.c:1722
#, c-format
msgid "deleted file %s still has contents"
msgstr "entfernte Datei %s hat noch Inhalte"
-#: builtin/apply.c:1723
+#: builtin/apply.c:1725
#, c-format
msgid "** warning: file %s becomes empty but is not deleted"
msgstr "** Warnung: Datei %s wird leer, aber nicht entfernt."
-#: builtin/apply.c:1869
+#: builtin/apply.c:1871
#, c-format
msgid "corrupt binary patch at line %d: %.*s"
msgstr "fehlerhafter Binär-Patch bei Zeile %d: %.*s"
#. there has to be one hunk (forward hunk)
-#: builtin/apply.c:1898
+#: builtin/apply.c:1900
#, c-format
msgid "unrecognized binary patch at line %d"
msgstr "nicht erkannter Binär-Patch bei Zeile %d"
-#: builtin/apply.c:1984
+#: builtin/apply.c:1986
#, c-format
msgid "patch with only garbage at line %d"
msgstr "Patch mit nutzlosen Informationen bei Zeile %d"
-#: builtin/apply.c:2074
+#: builtin/apply.c:2076
#, c-format
msgid "unable to read symlink %s"
msgstr "konnte symbolische Verknüpfung %s nicht lesen"
-#: builtin/apply.c:2078
+#: builtin/apply.c:2080
#, c-format
msgid "unable to open or read %s"
msgstr "konnte %s nicht öffnen oder lesen"
-#: builtin/apply.c:2682
+#: builtin/apply.c:2684
#, c-format
msgid "invalid start of line: '%c'"
msgstr "Ungültiger Zeilenanfang: '%c'"
-#: builtin/apply.c:2800
+#: builtin/apply.c:2802
#, c-format
msgid "Hunk #%d succeeded at %d (offset %d line)."
msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
@@ -1725,12 +1818,12 @@ msgstr[0] "Patch-Bereich #%d erfolgreich angewendet bei %d (%d Zeile versetzt)"
msgstr[1] ""
"Patch-Bereich #%d erfolgreich angewendet bei %d (%d Zeilen versetzt)"
-#: builtin/apply.c:2812
+#: builtin/apply.c:2814
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr "Kontext reduziert zu (%ld/%ld) um Patch-Bereich bei %d anzuwenden"
-#: builtin/apply.c:2818
+#: builtin/apply.c:2820
#, c-format
msgid ""
"while searching for:\n"
@@ -1739,340 +1832,340 @@ msgstr ""
"bei der Suche nach:\n"
"%.*s"
-#: builtin/apply.c:2837
+#: builtin/apply.c:2839
#, c-format
msgid "missing binary patch data for '%s'"
msgstr "keine Daten in Binär-Patch für '%s'"
-#: builtin/apply.c:2940
+#: builtin/apply.c:2942
#, c-format
msgid "binary patch does not apply to '%s'"
msgstr "Konnte Binär-Patch nicht auf '%s' anwenden"
-#: builtin/apply.c:2946
+#: builtin/apply.c:2948
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr ""
"Binär-Patch für '%s' erzeugt falsches Ergebnis (erwartete %s, bekam %s)"
-#: builtin/apply.c:2967
+#: builtin/apply.c:2969
#, c-format
msgid "patch failed: %s:%ld"
msgstr "Anwendung des Patches fehlgeschlagen: %s:%ld"
-#: builtin/apply.c:3089
+#: builtin/apply.c:3091
#, c-format
msgid "cannot checkout %s"
msgstr "kann %s nicht auschecken"
-#: builtin/apply.c:3134 builtin/apply.c:3143 builtin/apply.c:3187
+#: builtin/apply.c:3136 builtin/apply.c:3145 builtin/apply.c:3189
#, c-format
msgid "read of %s failed"
msgstr "Konnte %s nicht lesen"
-#: builtin/apply.c:3167 builtin/apply.c:3389
+#: builtin/apply.c:3169 builtin/apply.c:3391
#, c-format
msgid "path %s has been renamed/deleted"
msgstr "Pfad %s wurde umbenannt/gelöscht"
-#: builtin/apply.c:3248 builtin/apply.c:3403
+#: builtin/apply.c:3250 builtin/apply.c:3405
#, c-format
msgid "%s: does not exist in index"
msgstr "%s ist nicht bereitgestellt"
-#: builtin/apply.c:3252 builtin/apply.c:3395 builtin/apply.c:3417
+#: builtin/apply.c:3254 builtin/apply.c:3397 builtin/apply.c:3419
#, c-format
msgid "%s: %s"
msgstr "%s: %s"
-#: builtin/apply.c:3257 builtin/apply.c:3411
+#: builtin/apply.c:3259 builtin/apply.c:3413
#, c-format
msgid "%s: does not match index"
msgstr "%s entspricht nicht der Bereitstellung"
-#: builtin/apply.c:3359
+#: builtin/apply.c:3361
msgid "removal patch leaves file contents"
msgstr "Lösch-Patch hinterlässt Dateiinhalte"
-#: builtin/apply.c:3428
+#: builtin/apply.c:3430
#, c-format
msgid "%s: wrong type"
msgstr "%s: falscher Typ"
-#: builtin/apply.c:3430
+#: builtin/apply.c:3432
#, c-format
msgid "%s has type %o, expected %o"
msgstr "%s ist vom Typ %o, erwartete %o"
-#: builtin/apply.c:3531
+#: builtin/apply.c:3533
#, c-format
msgid "%s: already exists in index"
msgstr "%s ist bereits bereitgestellt"
-#: builtin/apply.c:3534
+#: builtin/apply.c:3536
#, c-format
msgid "%s: already exists in working directory"
msgstr "%s existiert bereits im Arbeitsverzeichnis"
-#: builtin/apply.c:3554
+#: builtin/apply.c:3556
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o)"
msgstr "neuer Modus (%o) von %s entspricht nicht dem alten Modus (%o)"
-#: builtin/apply.c:3559
+#: builtin/apply.c:3561
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o) of %s"
msgstr "neuer Modus (%o) von %s entspricht nicht dem alten Modus (%o) von %s"
-#: builtin/apply.c:3567
+#: builtin/apply.c:3569
#, c-format
msgid "%s: patch does not apply"
msgstr "%s: Patch konnte nicht angewendet werden"
-#: builtin/apply.c:3580
+#: builtin/apply.c:3582
#, c-format
msgid "Checking patch %s..."
msgstr "Prüfe Patch %s..."
-#: builtin/apply.c:3635 builtin/checkout.c:215 builtin/reset.c:124
+#: builtin/apply.c:3675 builtin/checkout.c:215 builtin/reset.c:124
#, c-format
msgid "make_cache_entry failed for path '%s'"
msgstr "make_cache_entry für Pfad '%s' fehlgeschlagen"
-#: builtin/apply.c:3778
+#: builtin/apply.c:3818
#, c-format
msgid "unable to remove %s from index"
msgstr "konnte %s nicht aus der Bereitstellung entfernen"
-#: builtin/apply.c:3806
+#: builtin/apply.c:3846
#, c-format
msgid "corrupt patch for subproject %s"
msgstr "fehlerhafter Patch für Unterprojekt %s"
-#: builtin/apply.c:3810
+#: builtin/apply.c:3850
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr "konnte neu erstellte Datei '%s' nicht lesen"
-#: builtin/apply.c:3815
+#: builtin/apply.c:3855
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr "kann internen Speicher für eben erstellte Datei %s nicht erzeugen"
-#: builtin/apply.c:3818 builtin/apply.c:3926
+#: builtin/apply.c:3858 builtin/apply.c:3966
#, c-format
msgid "unable to add cache entry for %s"
msgstr "kann für %s keinen Eintrag in den Zwischenspeicher hinzufügen"
-#: builtin/apply.c:3851
+#: builtin/apply.c:3891
#, c-format
msgid "closing file '%s'"
msgstr "schließe Datei '%s'"
-#: builtin/apply.c:3900
+#: builtin/apply.c:3940
#, c-format
msgid "unable to write file '%s' mode %o"
msgstr "konnte Datei '%s' mit Modus %o nicht schreiben"
-#: builtin/apply.c:3987
+#: builtin/apply.c:4027
#, c-format
msgid "Applied patch %s cleanly."
msgstr "Patch %s sauber angewendet"
-#: builtin/apply.c:3995
+#: builtin/apply.c:4035
msgid "internal error"
msgstr "interner Fehler"
#. Say this even without --verbose
-#: builtin/apply.c:3998
+#: builtin/apply.c:4038
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
msgstr[0] "Wende Patch %%s mit %d Zurückweisung an..."
msgstr[1] "Wende Patch %%s mit %d Zurückweisungen an..."
-#: builtin/apply.c:4008
+#: builtin/apply.c:4048
#, c-format
msgid "truncating .rej filename to %.*s.rej"
msgstr "Verkürze Name von .rej Datei zu %.*s.rej"
-#: builtin/apply.c:4029
+#: builtin/apply.c:4069
#, c-format
msgid "Hunk #%d applied cleanly."
msgstr "Patch-Bereich #%d sauber angewendet."
-#: builtin/apply.c:4032
+#: builtin/apply.c:4072
#, c-format
msgid "Rejected hunk #%d."
msgstr "Patch-Bereich #%d zurückgewiesen."
-#: builtin/apply.c:4182
+#: builtin/apply.c:4222
msgid "unrecognized input"
msgstr "nicht erkannte Eingabe"
-#: builtin/apply.c:4193
+#: builtin/apply.c:4233
msgid "unable to read index file"
msgstr "Konnte Bereitstellungsdatei nicht lesen"
-#: builtin/apply.c:4312 builtin/apply.c:4315 builtin/clone.c:91
+#: builtin/apply.c:4352 builtin/apply.c:4355 builtin/clone.c:91
#: builtin/fetch.c:63
msgid "path"
msgstr "Pfad"
-#: builtin/apply.c:4313
+#: builtin/apply.c:4353
msgid "don't apply changes matching the given path"
msgstr "wendet keine Änderungen im angegebenen Pfad an"
-#: builtin/apply.c:4316
+#: builtin/apply.c:4356
msgid "apply changes matching the given path"
msgstr "wendet Änderungen nur im angegebenen Pfad an"
-#: builtin/apply.c:4318
+#: builtin/apply.c:4358
msgid "num"
msgstr "Anzahl"
-#: builtin/apply.c:4319
+#: builtin/apply.c:4359
msgid "remove <num> leading slashes from traditional diff paths"
msgstr ""
"entfernt <Anzahl> vorangestellte Schrägstriche von herkömmlichen "
"Differenzpfaden"
-#: builtin/apply.c:4322
+#: builtin/apply.c:4362
msgid "ignore additions made by the patch"
msgstr "ignoriert hinzugefügte Zeilen des Patches"
-#: builtin/apply.c:4324
+#: builtin/apply.c:4364
msgid "instead of applying the patch, output diffstat for the input"
msgstr ""
"anstatt der Anwendung des Patches, wird der \"diffstat\" für die Eingabe "
"ausgegeben"
-#: builtin/apply.c:4328
+#: builtin/apply.c:4368
msgid "show number of added and deleted lines in decimal notation"
msgstr ""
"zeigt die Anzahl von hinzugefügten/entfernten Zeilen in Dezimalnotation"
-#: builtin/apply.c:4330
+#: builtin/apply.c:4370
msgid "instead of applying the patch, output a summary for the input"
msgstr ""
"anstatt der Anwendung des Patches, wird eine Zusammenfassung für die Eingabe "
"ausgegeben"
-#: builtin/apply.c:4332
+#: builtin/apply.c:4372
msgid "instead of applying the patch, see if the patch is applicable"
msgstr ""
"anstatt der Anwendung des Patches, zeige ob Patch angewendet werden kann"
-#: builtin/apply.c:4334
+#: builtin/apply.c:4374
msgid "make sure the patch is applicable to the current index"
msgstr ""
"stellt sicher, dass der Patch in der aktuellen Bereitstellung angewendet "
"werden kann"
-#: builtin/apply.c:4336
+#: builtin/apply.c:4376
msgid "apply a patch without touching the working tree"
msgstr "wendet einen Patch an, ohne Änderungen im Arbeitszweig vorzunehmen"
-#: builtin/apply.c:4338
+#: builtin/apply.c:4378
msgid "also apply the patch (use with --stat/--summary/--check)"
msgstr "wendet den Patch an (Benutzung mit --stat/--summary/--check)"
-#: builtin/apply.c:4340
+#: builtin/apply.c:4380
msgid "attempt three-way merge if a patch does not apply"
msgstr ""
"versucht 3-Wege-Zusammenführung, wenn der Patch nicht angewendet werden "
"konnte"
-#: builtin/apply.c:4342
+#: builtin/apply.c:4382
msgid "build a temporary index based on embedded index information"
msgstr ""
"erstellt eine temporäre Bereitstellung basierend auf den integrierten "
"Bereitstellungsinformationen"
-#: builtin/apply.c:4344 builtin/checkout-index.c:197 builtin/ls-files.c:460
+#: builtin/apply.c:4384 builtin/checkout-index.c:197 builtin/ls-files.c:463
msgid "paths are separated with NUL character"
msgstr "Pfade sind getrennt durch NUL Zeichen"
-#: builtin/apply.c:4347
+#: builtin/apply.c:4387
msgid "ensure at least <n> lines of context match"
msgstr "stellt sicher, dass mindestens <n> Zeilen des Kontextes übereinstimmen"
-#: builtin/apply.c:4348
+#: builtin/apply.c:4388
msgid "action"
msgstr "Aktion"
-#: builtin/apply.c:4349
+#: builtin/apply.c:4389
msgid "detect new or modified lines that have whitespace errors"
msgstr "ermittelt neue oder geänderte Zeilen die Fehler in Leerzeichen haben"
-#: builtin/apply.c:4352 builtin/apply.c:4355
+#: builtin/apply.c:4392 builtin/apply.c:4395
msgid "ignore changes in whitespace when finding context"
msgstr "ignoriert Änderungen in Leerzeichen bei der Suche des Kontextes"
-#: builtin/apply.c:4358
+#: builtin/apply.c:4398
msgid "apply the patch in reverse"
msgstr "wendet den Patch in umgekehrter Reihenfolge an"
-#: builtin/apply.c:4360
+#: builtin/apply.c:4400
msgid "don't expect at least one line of context"
msgstr "erwartet keinen Kontext"
-#: builtin/apply.c:4362
+#: builtin/apply.c:4402
msgid "leave the rejected hunks in corresponding *.rej files"
msgstr ""
"hinterlässt zurückgewiesene Patch-Bereiche in den entsprechenden *.rej "
"Dateien"
-#: builtin/apply.c:4364
+#: builtin/apply.c:4404
msgid "allow overlapping hunks"
msgstr "erlaubt sich überlappende Patch-Bereiche"
-#: builtin/apply.c:4367
+#: builtin/apply.c:4407
msgid "tolerate incorrectly detected missing new-line at the end of file"
msgstr "toleriert fehlerhaft erkannten fehlenden Zeilenumbruch am Dateiende"
-#: builtin/apply.c:4370
+#: builtin/apply.c:4410
msgid "do not trust the line counts in the hunk headers"
msgstr "vertraut nicht den Zeilennummern im Kopf des Patch-Bereiches"
-#: builtin/apply.c:4372
+#: builtin/apply.c:4412
msgid "root"
msgstr "Wurzelverzeichnis"
-#: builtin/apply.c:4373
+#: builtin/apply.c:4413
msgid "prepend <root> to all filenames"
msgstr "stellt <Wurzelverzeichnis> vor alle Dateinamen"
-#: builtin/apply.c:4395
+#: builtin/apply.c:4435
msgid "--3way outside a repository"
msgstr ""
"Die Option --3way kann nicht außerhalb eines Projektarchivs verwendet werden."
-#: builtin/apply.c:4403
+#: builtin/apply.c:4443
msgid "--index outside a repository"
msgstr ""
"Die Option --index kann nicht außerhalb eines Projektarchivs verwendet "
"werden."
-#: builtin/apply.c:4406
+#: builtin/apply.c:4446
msgid "--cached outside a repository"
msgstr ""
"Die Option --cached kann nicht außerhalb eines Projektarchivs verwendet "
"werden."
-#: builtin/apply.c:4422
+#: builtin/apply.c:4462
#, c-format
msgid "can't open patch '%s'"
msgstr "kann Patch '%s' nicht öffnen"
-#: builtin/apply.c:4436
+#: builtin/apply.c:4476
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
msgstr[0] "unterdrückte %d Fehler in Leerzeichen"
msgstr[1] "unterdrückte %d Fehler in Leerzeichen"
-#: builtin/apply.c:4442 builtin/apply.c:4452
+#: builtin/apply.c:4482 builtin/apply.c:4492
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
@@ -2134,96 +2227,96 @@ msgstr "git blame [Optionen] [rev-opts] [rev] [--] Datei"
msgid "[rev-opts] are documented in git-rev-list(1)"
msgstr "[rev-opts] sind dokumentiert in git-rev-list(1)"
-#: builtin/blame.c:2364
+#: builtin/blame.c:2350
msgid "Show blame entries as we find them, incrementally"
msgstr "Zeigt \"blame\"-Einträge schrittweise, während wir sie generieren"
-#: builtin/blame.c:2365
+#: builtin/blame.c:2351
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr "Zeigt leere SHA-1 für Grenzversionen (Standard: aus)"
-#: builtin/blame.c:2366
+#: builtin/blame.c:2352
msgid "Do not treat root commits as boundaries (Default: off)"
msgstr "Behandelt Ursprungsversionen nicht als Grenzen (Standard: aus)"
-#: builtin/blame.c:2367
+#: builtin/blame.c:2353
msgid "Show work cost statistics"
msgstr "Zeigt Statistiken zum Arbeitsaufwand"
-#: builtin/blame.c:2368
+#: builtin/blame.c:2354
msgid "Show output score for blame entries"
msgstr "Zeigt Ausgabebewertung für \"blame\"-Einträge"
-#: builtin/blame.c:2369
+#: builtin/blame.c:2355
msgid "Show original filename (Default: auto)"
msgstr "Zeigt ursprünglichen Dateinamen (Standard: auto)"
-#: builtin/blame.c:2370
+#: builtin/blame.c:2356
msgid "Show original linenumber (Default: off)"
msgstr "Zeigt ursprüngliche Zeilennummer (Standard: aus)"
-#: builtin/blame.c:2371
+#: builtin/blame.c:2357
msgid "Show in a format designed for machine consumption"
msgstr "Anzeige in einem Format für maschinelle Auswertung"
-#: builtin/blame.c:2372
+#: builtin/blame.c:2358
msgid "Show porcelain format with per-line commit information"
msgstr ""
"Anzeige in Format für Fremdprogramme mit Versionsinformationen pro Zeile"
-#: builtin/blame.c:2373
+#: builtin/blame.c:2359
msgid "Use the same output mode as git-annotate (Default: off)"
msgstr "Benutzt den gleichen Ausgabemodus wie \"git-annotate\" (Standard: aus)"
-#: builtin/blame.c:2374
+#: builtin/blame.c:2360
msgid "Show raw timestamp (Default: off)"
msgstr "Zeigt unbearbeiteten Zeitstempel (Standard: aus)"
-#: builtin/blame.c:2375
+#: builtin/blame.c:2361
msgid "Show long commit SHA1 (Default: off)"
msgstr "Zeigt langen Versions-SHA1 (Standard: aus)"
-#: builtin/blame.c:2376
+#: builtin/blame.c:2362
msgid "Suppress author name and timestamp (Default: off)"
msgstr "Unterdrückt den Namen des Autors und den Zeitstempel (Standard: aus)"
-#: builtin/blame.c:2377
+#: builtin/blame.c:2363
msgid "Show author email instead of name (Default: off)"
msgstr "Zeigt anstatt des Namens die Email-Adresse des Autors (Standard: aus)"
-#: builtin/blame.c:2378
+#: builtin/blame.c:2364
msgid "Ignore whitespace differences"
msgstr "Ignoriert Unterschiede in Leerzeichen"
-#: builtin/blame.c:2379
+#: builtin/blame.c:2365
msgid "Spend extra cycles to find better match"
msgstr "arbeite länger, um bessere Übereinstimmungen zu finden"
-#: builtin/blame.c:2380
+#: builtin/blame.c:2366
msgid "Use revisions from <file> instead of calling git-rev-list"
msgstr "Benutzt Revisionen von <Datei> anstatt \"git-rev-list\" aufzurufen"
-#: builtin/blame.c:2381
+#: builtin/blame.c:2367
msgid "Use <file>'s contents as the final image"
msgstr "Benutzt Inhalte der <Datei>en als entgültiges Abbild"
-#: builtin/blame.c:2382 builtin/blame.c:2383
+#: builtin/blame.c:2368 builtin/blame.c:2369
msgid "score"
msgstr "Bewertung"
-#: builtin/blame.c:2382
+#: builtin/blame.c:2368
msgid "Find line copies within and across files"
msgstr "Findet kopierte Zeilen innerhalb oder zwischen Dateien"
-#: builtin/blame.c:2383
+#: builtin/blame.c:2369
msgid "Find line movements within and across files"
msgstr "Findet verschobene Zeilen innerhalb oder zwischen Dateien"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "n,m"
msgstr "n,m"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "Process only line range n,m, counting from 1"
msgstr "Verarbeitet nur Zeilen im Bereich n,m, gezählt von 1"
@@ -2360,10 +2453,19 @@ msgstr "[%s: %d voraus, %d hinterher]"
msgid "[ahead %d, behind %d]"
msgstr "[%d voraus, %d hinterher]"
+#: builtin/branch.c:469
+msgid " **** invalid ref ****"
+msgstr " **** ungültige Referenz ****"
+
#: builtin/branch.c:560
msgid "(no branch)"
msgstr "(kein Zweig)"
+#: builtin/branch.c:593
+#, c-format
+msgid "object '%s' does not point to a commit"
+msgstr "Objekt '%s' zeigt auf keine Version"
+
#: builtin/branch.c:625
msgid "some refs could not be read"
msgstr "Konnte einige Referenzen nicht lesen"
@@ -2437,8 +2539,8 @@ msgid "act on remote-tracking branches"
msgstr "wirkt auf externe Übernahmezweige"
#: builtin/branch.c:761 builtin/branch.c:767 builtin/branch.c:788
-#: builtin/branch.c:794 builtin/commit.c:1378 builtin/commit.c:1379
-#: builtin/commit.c:1380 builtin/commit.c:1381 builtin/tag.c:470
+#: builtin/branch.c:794 builtin/commit.c:1366 builtin/commit.c:1367
+#: builtin/commit.c:1368 builtin/commit.c:1369 builtin/tag.c:468
msgid "commit"
msgstr "Version"
@@ -2507,27 +2609,54 @@ msgstr "Konnte Zweigspitze (HEAD) nicht als gültige Referenz auflösen."
msgid "HEAD not found below refs/heads!"
msgstr "Zweigspitze (HEAD) wurde nicht unter \"refs/heads\" gefunden!"
-#: builtin/branch.c:836
+#: builtin/branch.c:839
msgid "--column and --verbose are incompatible"
msgstr "Die Optionen --column und --verbose sind inkompatibel."
-#: builtin/branch.c:887
+#: builtin/branch.c:845
+msgid "branch name required"
+msgstr "Zweigname erforderlich"
+
+#: builtin/branch.c:860
+msgid "Cannot give description to detached HEAD"
+msgstr ""
+"zu losgelöster Zweigspitze (HEAD) kann keine Beschreibung hinterlegt werden"
+
+#: builtin/branch.c:865
+msgid "cannot edit description of more than one branch"
+msgstr "Beschreibung von mehr als einem Zweig kann nicht bearbeitet werden"
+
+#: builtin/branch.c:872
+#, c-format
+msgid "No commit on branch '%s' yet."
+msgstr "Noch keine Version in Zweig '%s'."
+
+#: builtin/branch.c:875
+#, c-format
+msgid "No branch named '%s'."
+msgstr "Zweig '%s' nicht vorhanden."
+
+#: builtin/branch.c:888
+msgid "too many branches for a rename operation"
+msgstr "zu viele Zweige für eine Umbenennen-Operation angegeben"
+
+#: builtin/branch.c:893
#, c-format
msgid "branch '%s' does not exist"
msgstr "Zweig '%s' existiert nicht"
-#: builtin/branch.c:899
+#: builtin/branch.c:905
#, c-format
msgid "Branch '%s' has no upstream information"
msgstr "Zweig '%s' hat keinen externen Übernahmezweig gesetzt"
-#: builtin/branch.c:914
+#: builtin/branch.c:920
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
msgstr ""
"Die Optionen -a und -r bei 'git branch' können nicht gemeimsam mit einem "
"Zweignamen verwendet werden."
-#: builtin/branch.c:917
+#: builtin/branch.c:923
#, c-format
msgid ""
"The --set-upstream flag is deprecated and will be removed. Consider using --"
@@ -2536,7 +2665,7 @@ msgstr ""
"Die --set-upstream Option ist veraltet und wird entfernt. Benutzen Sie --"
"track oder --set-upstream-to\n"
-#: builtin/branch.c:934
+#: builtin/branch.c:940
#, c-format
msgid ""
"\n"
@@ -2547,12 +2676,12 @@ msgstr ""
"Wenn Sie wollten, dass '%s' den Zweig '%s' als externen Übernahmezweig hat, "
"führen Sie aus:\n"
-#: builtin/branch.c:935
+#: builtin/branch.c:941
#, c-format
msgid " git branch -d %s\n"
msgstr " git branch -d %s\n"
-#: builtin/branch.c:936
+#: builtin/branch.c:942
#, c-format
msgid " git branch --set-upstream-to %s\n"
msgstr " git branch --set-upstream-to %s\n"
@@ -2630,14 +2759,39 @@ msgstr "gibt alle Attribute einer Datei aus"
msgid "use .gitattributes only from the index"
msgstr "verwendet .gitattributes nur von der Bereitstellung"
-#: builtin/check-attr.c:21 builtin/hash-object.c:75
+#: builtin/check-attr.c:21 builtin/check-ignore.c:22 builtin/hash-object.c:75
msgid "read file names from stdin"
msgstr "liest Dateinamen von der Standard-Eingabe"
-#: builtin/check-attr.c:23
+#: builtin/check-attr.c:23 builtin/check-ignore.c:24
msgid "input paths are terminated by a null character"
msgstr "Eingabepfade sind durch ein NUL Zeichen abgeschlossen"
+#: builtin/check-ignore.c:18 builtin/checkout.c:1012 builtin/gc.c:177
+msgid "suppress progress reporting"
+msgstr "unterdrückt Fortschrittsanzeige"
+
+#: builtin/check-ignore.c:151
+msgid "cannot specify pathnames with --stdin"
+msgstr "Angabe von Pfadnamen kann nicht gemeinsam mit --stdin verwendet werden"
+
+#: builtin/check-ignore.c:154
+msgid "-z only makes sense with --stdin"
+msgstr "Die Option -z kann nur mit --stdin verwendet werden."
+
+#: builtin/check-ignore.c:156
+msgid "no path specified"
+msgstr "kein Pfad angegeben"
+
+#: builtin/check-ignore.c:160
+msgid "--quiet is only valid with a single pathname"
+msgstr "Die Option --quiet ist nur mit einem einzelnen Pfadnamen gültig."
+
+#: builtin/check-ignore.c:162
+msgid "cannot have both --quiet and --verbose"
+msgstr ""
+"Die Optionen --quiet und --verbose können nicht gemeinsam verwendet werden."
+
#: builtin/checkout-index.c:126
msgid "git checkout-index [options] [--] [<file>...]"
msgstr "git checkout-index [Optionen] [--] [<Datei>...]"
@@ -2874,10 +3028,6 @@ msgstr "'%s' kann nicht mit '%s' verwendet werden"
msgid "Cannot switch branch to a non-commit '%s'"
msgstr "Kann Zweig nicht zu Nicht-Version '%s' wechseln"
-#: builtin/checkout.c:1012 builtin/gc.c:177
-msgid "suppress progress reporting"
-msgstr "unterdrückt Fortschrittsanzeige"
-
#: builtin/checkout.c:1013 builtin/checkout.c:1015 builtin/clone.c:89
#: builtin/remote.c:169 builtin/remote.c:171
msgid "branch"
@@ -3011,47 +3161,47 @@ msgstr "Würde Projektarchiv %s überspringen\n"
msgid "failed to remove %s"
msgstr "Fehler beim Löschen von %s"
-#: builtin/clean.c:159
+#: builtin/clean.c:160
msgid "do not print names of files removed"
msgstr "gibt keine Namen von gelöschten Dateien aus"
-#: builtin/clean.c:161
+#: builtin/clean.c:162
msgid "force"
msgstr "erzwingt Aktion"
-#: builtin/clean.c:163
+#: builtin/clean.c:164
msgid "remove whole directories"
msgstr "löscht ganze Verzeichnisse"
-#: builtin/clean.c:164 builtin/describe.c:413 builtin/grep.c:717
-#: builtin/ls-files.c:491 builtin/name-rev.c:231 builtin/show-ref.c:182
+#: builtin/clean.c:165 builtin/describe.c:413 builtin/grep.c:717
+#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182
msgid "pattern"
msgstr "Muster"
-#: builtin/clean.c:165
+#: builtin/clean.c:166
msgid "add <pattern> to ignore rules"
msgstr "fügt <Muster> zu den Regeln für ignorierte Pfade hinzu"
-#: builtin/clean.c:166
+#: builtin/clean.c:167
msgid "remove ignored files, too"
msgstr "löscht auch ignorierte Dateien"
-#: builtin/clean.c:168
+#: builtin/clean.c:169
msgid "remove only ignored files"
msgstr "löscht nur ignorierte Dateien"
-#: builtin/clean.c:186
+#: builtin/clean.c:187
msgid "-x and -X cannot be used together"
msgstr "Die Optionen -x und -X können nicht gemeinsam verwendet werden."
-#: builtin/clean.c:190
+#: builtin/clean.c:191
msgid ""
"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
msgstr ""
"clean.requireForce auf \"true\" gesetzt und weder -n noch -f gegeben; "
"Säuberung verweigert"
-#: builtin/clean.c:193
+#: builtin/clean.c:194
msgid ""
"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
"clean"
@@ -3064,7 +3214,7 @@ msgid "git clone [options] [--] <repo> [<dir>]"
msgstr "git clone [Optionen] [--] <Projektarchiv> [<Verzeichnis>]"
#: builtin/clone.c:64 builtin/fetch.c:82 builtin/merge.c:212
-#: builtin/push.c:407
+#: builtin/push.c:436
msgid "force progress reporting"
msgstr "erzwingt Fortschrittsanzeige"
@@ -3178,11 +3328,6 @@ msgstr "%s existiert und ist kein Verzeichnis"
msgid "failed to stat %s\n"
msgstr "Konnte %s nicht lesen\n"
-#: builtin/clone.c:341
-#, c-format
-msgid "failed to unlink '%s'"
-msgstr "Konnte '%s' nicht entfernen"
-
#: builtin/clone.c:346
#, c-format
msgid "failed to create link '%s'"
@@ -3247,7 +3392,7 @@ msgstr "Zielpfad '%s' existiert bereits und ist kein leeres Verzeichnis."
msgid "working tree '%s' already exists."
msgstr "Arbeitsbaum '%s' existiert bereits."
-#: builtin/clone.c:759 builtin/clone.c:773
+#: builtin/clone.c:759 builtin/clone.c:771
#, c-format
msgid "could not create leading directories of '%s'"
msgstr "Konnte führende Verzeichnisse von '%s' nicht erstellen."
@@ -3257,27 +3402,27 @@ msgstr "Konnte führende Verzeichnisse von '%s' nicht erstellen."
msgid "could not create work tree dir '%s'."
msgstr "Konnte Arbeitsverzeichnis '%s' nicht erstellen."
-#: builtin/clone.c:783
+#: builtin/clone.c:781
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr "Klone in bloßes Projektarchiv '%s'...\n"
-#: builtin/clone.c:785
+#: builtin/clone.c:783
#, c-format
msgid "Cloning into '%s'...\n"
msgstr "Klone nach '%s'...\n"
-#: builtin/clone.c:827
+#: builtin/clone.c:818
#, c-format
msgid "Don't know how to clone %s"
msgstr "Weiß nicht wie %s zu klonen ist."
-#: builtin/clone.c:876
+#: builtin/clone.c:867
#, c-format
msgid "Remote branch %s not found in upstream %s"
msgstr "externer Zweig %s nicht im anderen Projektarchiv %s gefunden"
-#: builtin/clone.c:883
+#: builtin/clone.c:874
msgid "You appear to have cloned an empty repository."
msgstr "Sie scheinen ein leeres Projektarchiv geklont zu haben."
@@ -3314,12 +3459,12 @@ msgid "--command must be the first argument"
msgstr "Die Option --command muss an erster Stelle stehen."
#: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
-msgstr "git commit [Optionen] [--] <Dateimuster>..."
+msgid "git commit [options] [--] <pathspec>..."
+msgstr "git commit [Optionen] [--] <Pfadspezifikation>..."
#: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
-msgstr "git status [Optionen] [--] <Dateimuster>..."
+msgid "git status [options] [--] <pathspec>..."
+msgstr "git status [Optionen] [--] <Pfadspezifikation>..."
#: builtin/commit.c:44
msgid ""
@@ -3495,23 +3640,26 @@ msgstr ""
"und versuchen Sie es erneut.\n"
#: builtin/commit.c:735
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be ignored, and an empty message aborts the commit.\n"
+"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
"Bitte geben Sie eine Versionsbeschreibung für Ihre Änderungen ein. Zeilen,\n"
-"die mit '#' beginnen, werden ignoriert, und eine leere Versionsbeschreibung\n"
+"die mit '%c' beginnen, werden ignoriert, und eine leere "
+"Versionsbeschreibung\n"
"bricht die Eintragung ab.\n"
#: builtin/commit.c:740
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be kept; you may remove them yourself if you want to.\n"
+"with '%c' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
"Bitte geben Sie eine Versionsbeschreibung für Ihre Änderungen ein. Zeilen, "
"die\n"
-"mit '#' beginnen, werden beibehalten; wenn Sie möchten, können Sie diese "
+"mit '%c' beginnen, werden beibehalten; wenn Sie möchten, können Sie diese "
"entfernen.\n"
"Eine leere Versionsbeschreibung bricht die Eintragung ab.\n"
@@ -3533,7 +3681,7 @@ msgstr "Kann Bereitstellung nicht lesen"
msgid "Error building trees"
msgstr "Fehler beim Erzeugen der Zweige"
-#: builtin/commit.c:832 builtin/tag.c:361
+#: builtin/commit.c:832 builtin/tag.c:359
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr "Bitte liefere eine Beschreibung entweder mit der Option -m oder -F.\n"
@@ -3543,123 +3691,123 @@ msgstr "Bitte liefere eine Beschreibung entweder mit der Option -m oder -F.\n"
msgid "No existing author found with '%s'"
msgstr "Kein existierender Autor mit '%s' gefunden."
-#: builtin/commit.c:944 builtin/commit.c:1148
+#: builtin/commit.c:944 builtin/commit.c:1138
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr "Ungültiger Modus '%s' für unbeobachtete Dateien"
-#: builtin/commit.c:984
+#: builtin/commit.c:974
msgid "Using both --reset-author and --author does not make sense"
msgstr ""
"Die Optionen --reset-author und --author können nicht gemeinsam verwendet "
"werden."
-#: builtin/commit.c:995
+#: builtin/commit.c:985
msgid "You have nothing to amend."
msgstr "Sie haben nichts zum nachbessern."
-#: builtin/commit.c:998
+#: builtin/commit.c:988
msgid "You are in the middle of a merge -- cannot amend."
msgstr "Eine Zusammenführung ist im Gange -- kann nicht nachbessern."
-#: builtin/commit.c:1000
+#: builtin/commit.c:990
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr "\"cherry-pick\" ist im Gange -- kann nicht nachbessern."
-#: builtin/commit.c:1003
+#: builtin/commit.c:993
msgid "Options --squash and --fixup cannot be used together"
msgstr ""
"Die Optionen --squash und --fixup können nicht gemeinsam verwendet werden."
-#: builtin/commit.c:1013
+#: builtin/commit.c:1003
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr "Es kann nur eine Option von -c/-C/-F/--fixup verwendet werden."
-#: builtin/commit.c:1015
+#: builtin/commit.c:1005
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "Die Option -m kann nicht mit -c/-C/-F/--fixup kombiniert werden."
-#: builtin/commit.c:1023
+#: builtin/commit.c:1013
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr ""
"Die Option --reset--author kann nur mit -C, -c oder --amend verwendet werden."
-#: builtin/commit.c:1040
+#: builtin/commit.c:1030
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr ""
"Es kann nur eine Option von --include/--only/--all/--interactive/--patch "
"verwendet werden."
-#: builtin/commit.c:1042
+#: builtin/commit.c:1032
msgid "No paths with --include/--only does not make sense."
msgstr ""
"Die Optionen --include und --only können nur mit der Angabe von Pfaden "
"verwendet werden."
-#: builtin/commit.c:1044
+#: builtin/commit.c:1034
msgid "Clever... amending the last one with dirty index."
msgstr ""
"Klug... die letzte Version mit einer unsauberen Bereitstellung nachbessern."
-#: builtin/commit.c:1046
+#: builtin/commit.c:1036
msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
msgstr ""
"Explizite Pfade ohne -i oder -o angegeben; unter der Annahme von --only "
"Pfaden..."
-#: builtin/commit.c:1056 builtin/tag.c:577
+#: builtin/commit.c:1046 builtin/tag.c:575
#, c-format
msgid "Invalid cleanup mode %s"
msgstr "Ungültiger \"cleanup\" Modus %s"
-#: builtin/commit.c:1061
+#: builtin/commit.c:1051
msgid "Paths with -a does not make sense."
msgstr "Die Option -a kann nur mit der Angabe von Pfaden verwendet werden."
-#: builtin/commit.c:1067 builtin/commit.c:1202
+#: builtin/commit.c:1057 builtin/commit.c:1192
msgid "--long and -z are incompatible"
msgstr "Die Optionen --long und -z sind inkompatibel."
-#: builtin/commit.c:1162 builtin/commit.c:1400
+#: builtin/commit.c:1152 builtin/commit.c:1388
msgid "show status concisely"
msgstr "zeigt Status im Kurzformat"
-#: builtin/commit.c:1164 builtin/commit.c:1402
+#: builtin/commit.c:1154 builtin/commit.c:1390
msgid "show branch information"
msgstr "zeigt Zweiginformationen"
-#: builtin/commit.c:1166 builtin/commit.c:1404 builtin/push.c:397
+#: builtin/commit.c:1156 builtin/commit.c:1392 builtin/push.c:426
msgid "machine-readable output"
msgstr "maschinenlesbare Ausgabe"
-#: builtin/commit.c:1169 builtin/commit.c:1406
+#: builtin/commit.c:1159 builtin/commit.c:1394
msgid "show status in long format (default)"
msgstr "zeigt Status im Langformat (Standard)"
-#: builtin/commit.c:1172 builtin/commit.c:1409
+#: builtin/commit.c:1162 builtin/commit.c:1397
msgid "terminate entries with NUL"
msgstr "schließt Einträge mit NUL-Zeichen ab"
-#: builtin/commit.c:1174 builtin/commit.c:1412 builtin/fast-export.c:647
-#: builtin/fast-export.c:650 builtin/tag.c:461
+#: builtin/commit.c:1164 builtin/commit.c:1400 builtin/fast-export.c:647
+#: builtin/fast-export.c:650 builtin/tag.c:459
msgid "mode"
msgstr "Modus"
-#: builtin/commit.c:1175 builtin/commit.c:1412
+#: builtin/commit.c:1165 builtin/commit.c:1400
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
"zeigt nicht beobachtete Dateien, optionale Modi: all, normal, no. (Standard: "
"all)"
-#: builtin/commit.c:1178
+#: builtin/commit.c:1168
msgid "show ignored files"
msgstr "zeigt ignorierte Dateien"
-#: builtin/commit.c:1179 parse-options.h:151
+#: builtin/commit.c:1169 parse-options.h:151
msgid "when"
msgstr "wann"
-#: builtin/commit.c:1180
+#: builtin/commit.c:1170
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
@@ -3667,219 +3815,219 @@ msgstr ""
"ignoriert Änderungen in Unterprojekten, optional wenn: all, dirty, "
"untracked. (Standard: all)"
-#: builtin/commit.c:1182
+#: builtin/commit.c:1172
msgid "list untracked files in columns"
msgstr "listet unbeobachtete Dateien in Spalten auf"
-#: builtin/commit.c:1256
+#: builtin/commit.c:1246
msgid "couldn't look up newly created commit"
msgstr "Konnte neu erstellte Version nicht nachschlagen."
-#: builtin/commit.c:1258
+#: builtin/commit.c:1248
msgid "could not parse newly created commit"
msgstr "Konnte neulich erstellte Version nicht analysieren."
-#: builtin/commit.c:1299
+#: builtin/commit.c:1289
msgid "detached HEAD"
msgstr "losgelöste Zweigspitze (HEAD)"
-#: builtin/commit.c:1301
+#: builtin/commit.c:1291
msgid " (root-commit)"
msgstr " (Basis-Version)"
-#: builtin/commit.c:1370
+#: builtin/commit.c:1358
msgid "suppress summary after successful commit"
msgstr "unterdrückt Zusammenfassung nach erfolgreicher Eintragung"
-#: builtin/commit.c:1371
+#: builtin/commit.c:1359
msgid "show diff in commit message template"
msgstr "zeigt Unterschiede in Versionsbeschreibungsvorlage an"
-#: builtin/commit.c:1373
+#: builtin/commit.c:1361
msgid "Commit message options"
msgstr "Optionen für Versionsbeschreibung"
-#: builtin/commit.c:1374 builtin/tag.c:459
+#: builtin/commit.c:1362 builtin/tag.c:457
msgid "read message from file"
msgstr "liest Beschreibung von Datei"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "author"
msgstr "Autor"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "override author for commit"
msgstr "überschreibt Autor von Version"
-#: builtin/commit.c:1376 builtin/gc.c:178
+#: builtin/commit.c:1364 builtin/gc.c:178
msgid "date"
msgstr "Datum"
-#: builtin/commit.c:1376
+#: builtin/commit.c:1364
msgid "override date for commit"
msgstr "überschreibt Datum von Version"
-#: builtin/commit.c:1377 builtin/merge.c:206 builtin/notes.c:537
-#: builtin/notes.c:694 builtin/tag.c:457
+#: builtin/commit.c:1365 builtin/merge.c:206 builtin/notes.c:533
+#: builtin/notes.c:690 builtin/tag.c:455
msgid "message"
msgstr "Beschreibung"
-#: builtin/commit.c:1377
+#: builtin/commit.c:1365
msgid "commit message"
msgstr "Versionsbeschreibung"
-#: builtin/commit.c:1378
+#: builtin/commit.c:1366
msgid "reuse and edit message from specified commit"
msgstr "verwendet wieder und editiert Beschreibung von der angegebenen Version"
-#: builtin/commit.c:1379
+#: builtin/commit.c:1367
msgid "reuse message from specified commit"
msgstr "verwendet Beschreibung der angegebenen Version wieder"
-#: builtin/commit.c:1380
+#: builtin/commit.c:1368
msgid "use autosquash formatted message to fixup specified commit"
msgstr ""
"verwendet eine automatisch zusammengesetzte Beschreibung zum Nachbessern der "
"angegebenen Version"
-#: builtin/commit.c:1381
+#: builtin/commit.c:1369
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
"verwendet eine automatisch zusammengesetzte Beschreibung zum Zusammenführen "
"der angegebenen Version"
-#: builtin/commit.c:1382
+#: builtin/commit.c:1370
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr "Setzt Sie als Autor der Version (verwendet mit -C/-c/--amend)"
-#: builtin/commit.c:1383 builtin/log.c:1102 builtin/revert.c:109
+#: builtin/commit.c:1371 builtin/log.c:1102 builtin/revert.c:109
msgid "add Signed-off-by:"
msgstr "fügt 'Signed-off-by:'-Zeile hinzu"
-#: builtin/commit.c:1384
+#: builtin/commit.c:1372
msgid "use specified template file"
msgstr "verwendet angegebene Vorlagendatei"
-#: builtin/commit.c:1385
+#: builtin/commit.c:1373
msgid "force edit of commit"
msgstr "erzwingt Bearbeitung der Version"
-#: builtin/commit.c:1386
+#: builtin/commit.c:1374
msgid "default"
msgstr "Standard"
-#: builtin/commit.c:1386 builtin/tag.c:462
+#: builtin/commit.c:1374 builtin/tag.c:460
msgid "how to strip spaces and #comments from message"
msgstr ""
"wie Leerzeichen und #Kommentare von der Beschreibung getrennt werden sollen"
-#: builtin/commit.c:1387
+#: builtin/commit.c:1375
msgid "include status in commit message template"
msgstr "fügt Status in die Versionsbeschreibungsvorlage ein"
-#: builtin/commit.c:1388 builtin/merge.c:213 builtin/tag.c:463
+#: builtin/commit.c:1376 builtin/merge.c:213 builtin/tag.c:461
msgid "key id"
msgstr "Schlüssel-ID"
-#: builtin/commit.c:1389 builtin/merge.c:214
+#: builtin/commit.c:1377 builtin/merge.c:214
msgid "GPG sign commit"
msgstr "signiert Version mit GPG"
#. end commit message options
-#: builtin/commit.c:1392
+#: builtin/commit.c:1380
msgid "Commit contents options"
msgstr "Optionen für Versionsinhalt"
-#: builtin/commit.c:1393
+#: builtin/commit.c:1381
msgid "commit all changed files"
msgstr "trägt alle geänderten Dateien ein"
-#: builtin/commit.c:1394
+#: builtin/commit.c:1382
msgid "add specified files to index for commit"
msgstr "trägt die angegebenen Dateien zusätzlich zur Bereitstellung ein"
-#: builtin/commit.c:1395
+#: builtin/commit.c:1383
msgid "interactively add files"
msgstr "interaktives Hinzufügen von Dateien"
-#: builtin/commit.c:1396
+#: builtin/commit.c:1384
msgid "interactively add changes"
msgstr "interaktives Hinzufügen von Änderungen"
-#: builtin/commit.c:1397
+#: builtin/commit.c:1385
msgid "commit only specified files"
msgstr "trägt nur die angegebenen Dateien ein"
-#: builtin/commit.c:1398
+#: builtin/commit.c:1386
msgid "bypass pre-commit hook"
msgstr "umgeht \"pre-commit hook\""
-#: builtin/commit.c:1399
+#: builtin/commit.c:1387
msgid "show what would be committed"
msgstr "zeigt an, was eingetragen werden würde"
-#: builtin/commit.c:1410
+#: builtin/commit.c:1398
msgid "amend previous commit"
msgstr "ändert vorherige Version"
-#: builtin/commit.c:1411
+#: builtin/commit.c:1399
msgid "bypass post-rewrite hook"
msgstr "umgeht \"post-rewrite hook\""
-#: builtin/commit.c:1416
+#: builtin/commit.c:1404
msgid "ok to record an empty change"
msgstr "erlaubt Aufzeichnung einer leeren Änderung"
-#: builtin/commit.c:1419
+#: builtin/commit.c:1407
msgid "ok to record a change with an empty message"
msgstr "erlaubt Aufzeichnung einer Änderung mit einer leeren Beschreibung"
-#: builtin/commit.c:1451
+#: builtin/commit.c:1439
msgid "could not parse HEAD commit"
msgstr "Konnte Version der Zweigspitze (HEAD) nicht analysieren."
-#: builtin/commit.c:1489 builtin/merge.c:508
+#: builtin/commit.c:1477 builtin/merge.c:508
#, c-format
msgid "could not open '%s' for reading"
msgstr "Konnte '%s' nicht zum Lesen öffnen."
-#: builtin/commit.c:1496
+#: builtin/commit.c:1484
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "Beschädigte MERGE_HEAD-Datei (%s)"
-#: builtin/commit.c:1503
+#: builtin/commit.c:1491
msgid "could not read MERGE_MODE"
msgstr "Konnte MERGE_MODE nicht lesen"
-#: builtin/commit.c:1522
+#: builtin/commit.c:1510
#, c-format
msgid "could not read commit message: %s"
msgstr "Konnte Versionsbeschreibung nicht lesen: %s"
-#: builtin/commit.c:1536
+#: builtin/commit.c:1524
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr "Eintragung abgebrochen; Sie haben die Beschreibung nicht editiert.\n"
-#: builtin/commit.c:1541
+#: builtin/commit.c:1529
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr "Eintragung aufgrund leerer Versionsbeschreibung abgebrochen.\n"
-#: builtin/commit.c:1556 builtin/merge.c:833 builtin/merge.c:858
+#: builtin/commit.c:1544 builtin/merge.c:832 builtin/merge.c:857
msgid "failed to write commit object"
msgstr "Fehler beim Schreiben des Versionsobjektes."
-#: builtin/commit.c:1577
+#: builtin/commit.c:1565
msgid "cannot lock HEAD ref"
msgstr "Kann Referenz der Zweigspitze (HEAD) nicht sperren."
-#: builtin/commit.c:1581
+#: builtin/commit.c:1569
msgid "cannot update HEAD ref"
msgstr "Kann Referenz der Zweigspitze (HEAD) nicht aktualisieren."
-#: builtin/commit.c:1592
+#: builtin/commit.c:1580
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
@@ -4291,88 +4439,92 @@ msgstr "erlaubt Aktualisierung der \"HEAD\"-Referenz"
msgid "deepen history of shallow clone"
msgstr "vertieft die Historie eines flachen Klon"
-#: builtin/fetch.c:85 builtin/log.c:1119
+#: builtin/fetch.c:86
+msgid "convert to a complete repository"
+msgstr "konvertiert zu einem vollständigen Projektarchiv"
+
+#: builtin/fetch.c:88 builtin/log.c:1119
msgid "dir"
msgstr "Verzeichnis"
-#: builtin/fetch.c:86
+#: builtin/fetch.c:89
msgid "prepend this to submodule path output"
msgstr "stellt dies an die Ausgabe der Unterprojekt-Pfade voran"
-#: builtin/fetch.c:89
+#: builtin/fetch.c:92
msgid "default mode for recursion"
msgstr "Standard-Modus für Rekursion"
-#: builtin/fetch.c:201
+#: builtin/fetch.c:204
msgid "Couldn't find remote ref HEAD"
msgstr "Konnte externe Referenz der Zweigspitze (HEAD) nicht finden."
-#: builtin/fetch.c:254
+#: builtin/fetch.c:257
#, c-format
msgid "object %s not found"
msgstr "Objekt %s nicht gefunden"
-#: builtin/fetch.c:259
+#: builtin/fetch.c:262
msgid "[up to date]"
msgstr "[aktuell]"
-#: builtin/fetch.c:273
+#: builtin/fetch.c:276
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
msgstr "! %-*s %-*s -> %s (kann nicht im aktuellen Zweig anfordern)"
-#: builtin/fetch.c:274 builtin/fetch.c:360
+#: builtin/fetch.c:277 builtin/fetch.c:363
msgid "[rejected]"
msgstr "[zurückgewiesen]"
-#: builtin/fetch.c:285
+#: builtin/fetch.c:288
msgid "[tag update]"
msgstr "[Markierungsaktualisierung]"
-#: builtin/fetch.c:287 builtin/fetch.c:322 builtin/fetch.c:340
+#: builtin/fetch.c:290 builtin/fetch.c:325 builtin/fetch.c:343
msgid " (unable to update local ref)"
msgstr " (kann lokale Referenz nicht aktualisieren)"
-#: builtin/fetch.c:305
+#: builtin/fetch.c:308
msgid "[new tag]"
msgstr "[neue Markierung]"
-#: builtin/fetch.c:308
+#: builtin/fetch.c:311
msgid "[new branch]"
msgstr "[neuer Zweig]"
-#: builtin/fetch.c:311
+#: builtin/fetch.c:314
msgid "[new ref]"
msgstr "[neue Referenz]"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "unable to update local ref"
msgstr "kann lokale Referenz nicht aktualisieren"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "forced update"
msgstr "Aktualisierung erzwungen"
-#: builtin/fetch.c:362
+#: builtin/fetch.c:365
msgid "(non-fast-forward)"
msgstr "(kein Vorspulen)"
-#: builtin/fetch.c:393 builtin/fetch.c:685
+#: builtin/fetch.c:396 builtin/fetch.c:688
#, c-format
msgid "cannot open %s: %s\n"
msgstr "kann %s nicht öffnen: %s\n"
-#: builtin/fetch.c:402
+#: builtin/fetch.c:405
#, c-format
msgid "%s did not send all necessary objects\n"
msgstr "%s hat nicht alle erforderlichen Objekte gesendet\n"
-#: builtin/fetch.c:488
+#: builtin/fetch.c:491
#, c-format
msgid "From %.*s\n"
msgstr "Von %.*s\n"
-#: builtin/fetch.c:499
+#: builtin/fetch.c:502
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
@@ -4381,57 +4533,57 @@ msgstr ""
"Einige lokale Referenzen konnten nicht aktualisiert werden; versuchen Sie\n"
"'git remote prune %s' um jeden älteren, widersprüchlichen Zweig zu löschen."
-#: builtin/fetch.c:549
+#: builtin/fetch.c:552
#, c-format
msgid " (%s will become dangling)"
msgstr " (%s wird unreferenziert)"
-#: builtin/fetch.c:550
+#: builtin/fetch.c:553
#, c-format
msgid " (%s has become dangling)"
msgstr " (%s wurde unreferenziert)"
-#: builtin/fetch.c:557
+#: builtin/fetch.c:560
msgid "[deleted]"
msgstr "[gelöscht]"
-#: builtin/fetch.c:558 builtin/remote.c:1055
+#: builtin/fetch.c:561 builtin/remote.c:1055
msgid "(none)"
msgstr "(nichts)"
-#: builtin/fetch.c:675
+#: builtin/fetch.c:678
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
msgstr ""
"Das Anfordern in den aktuellen Zweig %s von einem nicht-bloßen Projektarchiv "
"wurde verweigert."
-#: builtin/fetch.c:709
+#: builtin/fetch.c:712
#, c-format
msgid "Don't know how to fetch from %s"
msgstr "Weiß nicht wie von %s angefordert wird."
-#: builtin/fetch.c:786
+#: builtin/fetch.c:789
#, c-format
msgid "Option \"%s\" value \"%s\" is not valid for %s"
msgstr "Option \"%s\" Wert \"%s\" ist nicht gültig für %s"
-#: builtin/fetch.c:789
+#: builtin/fetch.c:792
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
msgstr "Option \"%s\" wird ignoriert für %s\n"
-#: builtin/fetch.c:891
+#: builtin/fetch.c:894
#, c-format
msgid "Fetching %s\n"
msgstr "Fordere an von %s\n"
-#: builtin/fetch.c:893 builtin/remote.c:100
+#: builtin/fetch.c:896 builtin/remote.c:100
#, c-format
msgid "Could not fetch %s"
msgstr "Konnte nicht von %s anfordern"
-#: builtin/fetch.c:912
+#: builtin/fetch.c:915
msgid ""
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
@@ -4440,24 +4592,35 @@ msgstr ""
"oder den Namen des externen Archivs an, von welchem neue\n"
"Revisionen angefordert werden sollen."
-#: builtin/fetch.c:932
+#: builtin/fetch.c:935
msgid "You need to specify a tag name."
msgstr "Sie müssen den Namen der Markierung angeben."
-#: builtin/fetch.c:984
+#: builtin/fetch.c:981
+msgid "--depth and --unshallow cannot be used together"
+msgstr ""
+"Die Optionen --depth und --unshallow können nicht gemeinsam verwendet werden."
+
+#: builtin/fetch.c:983
+msgid "--unshallow on a complete repository does not make sense"
+msgstr ""
+"Die Option --unshallow kann nicht in einem vollständigen Projektarchiv "
+"verwendet werden."
+
+#: builtin/fetch.c:1002
msgid "fetch --all does not take a repository argument"
msgstr "fetch --all akzeptiert kein Projektarchiv als Argument"
-#: builtin/fetch.c:986
+#: builtin/fetch.c:1004
msgid "fetch --all does not make sense with refspecs"
msgstr "fetch --all kann nicht mit Referenzspezifikationen verwendet werden."
-#: builtin/fetch.c:997
+#: builtin/fetch.c:1015
#, c-format
msgid "No such remote or remote group: %s"
msgstr "Kein externes Archiv (einzeln oder Gruppe): %s"
-#: builtin/fetch.c:1005
+#: builtin/fetch.c:1023
msgid "Fetching a group and specifying refspecs does not make sense"
msgstr ""
"Das Abholen einer Gruppe von externen Archiven kann nicht mit der Angabe\n"
@@ -4470,7 +4633,7 @@ msgstr ""
#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701
#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175
-#: builtin/tag.c:448 parse-options.h:133 parse-options.h:239
+#: builtin/tag.c:446 parse-options.h:133 parse-options.h:239
msgid "n"
msgstr "Anzahl"
@@ -4835,31 +4998,31 @@ msgstr "keine Muster angegeben"
msgid "bad object %s"
msgstr "ungültiges Objekt %s"
-#: builtin/grep.c:866
+#: builtin/grep.c:868
msgid "--open-files-in-pager only works on the worktree"
msgstr ""
"Die Option --open-files-in-pager kann nur innerhalb des Arbeitsbaums "
"verwendet werden."
-#: builtin/grep.c:889
+#: builtin/grep.c:891
msgid "--cached or --untracked cannot be used with --no-index."
msgstr ""
"Die Optionen --cached und --untracked können nicht mit --no-index verwendet "
"werden."
-#: builtin/grep.c:894
+#: builtin/grep.c:896
msgid "--no-index or --untracked cannot be used with revs."
msgstr ""
"Die Optionen --no-index und --untracked können nicht mit Versionen verwendet "
"werden."
-#: builtin/grep.c:897
+#: builtin/grep.c:899
msgid "--[no-]exclude-standard cannot be used for tracked contents."
msgstr ""
"Die Option --[no-]exclude-standard kann nicht mit beobachteten Inhalten "
"verwendet werden."
-#: builtin/grep.c:905
+#: builtin/grep.c:907
msgid "both --cached and trees are given."
msgstr "Die Option --cached kann nicht mit Zweigen verwendet werden."
@@ -4899,50 +5062,50 @@ msgstr "speichert Datei wie sie ist, ohne Filter"
msgid "process file as it were from this path"
msgstr "verarbeitet Datei, als ob sie von diesem Pfad wäre"
-#: builtin/help.c:43
+#: builtin/help.c:42
msgid "print all available commands"
msgstr "Anzeige aller vorhandenen Kommandos"
-#: builtin/help.c:44
+#: builtin/help.c:43
msgid "show man page"
msgstr "zeigt Handbuch"
-#: builtin/help.c:45
+#: builtin/help.c:44
msgid "show manual in web browser"
msgstr "zeigt Handbuch in einem Webbrowser"
-#: builtin/help.c:47
+#: builtin/help.c:46
msgid "show info page"
msgstr "zeigt Info-Seite"
-#: builtin/help.c:53
+#: builtin/help.c:52
msgid "git help [--all] [--man|--web|--info] [command]"
msgstr "git help [--all] [--man|--web|--info] [Kommando]"
-#: builtin/help.c:65
+#: builtin/help.c:64
#, c-format
msgid "unrecognized help format '%s'"
msgstr "nicht erkanntes Hilfeformat: %s"
-#: builtin/help.c:93
+#: builtin/help.c:92
msgid "Failed to start emacsclient."
msgstr "Konnte emacsclient nicht starten."
-#: builtin/help.c:106
+#: builtin/help.c:105
msgid "Failed to parse emacsclient version."
msgstr "Konnte Version des emacsclient nicht parsen."
-#: builtin/help.c:114
+#: builtin/help.c:113
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
msgstr "Version des emacsclient '%d' ist zu alt (< 22)."
-#: builtin/help.c:132 builtin/help.c:160 builtin/help.c:169 builtin/help.c:177
+#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176
#, c-format
msgid "failed to exec '%s': %s"
msgstr "Fehler beim Ausführen von '%s': %s"
-#: builtin/help.c:217
+#: builtin/help.c:216
#, c-format
msgid ""
"'%s': path for unsupported man viewer.\n"
@@ -4951,7 +5114,7 @@ msgstr ""
"'%s': Pfad für nicht unterstützten Handbuchbetrachter.\n"
"Sie könnten stattdessen 'man.<Werkzeug>.cmd' benutzen."
-#: builtin/help.c:229
+#: builtin/help.c:228
#, c-format
msgid ""
"'%s': cmd for supported man viewer.\n"
@@ -4960,29 +5123,25 @@ msgstr ""
"'%s': Kommando für unterstützten Handbuchbetrachter.\n"
"Sie könnten stattdessen 'man.<Werkzeug>.path' benutzen."
-#: builtin/help.c:299
-msgid "The most commonly used git commands are:"
-msgstr "Die allgemein verwendeten Git-Kommandos sind:"
-
-#: builtin/help.c:367
+#: builtin/help.c:349
#, c-format
msgid "'%s': unknown man viewer."
msgstr "'%s': unbekannter Handbuch-Betrachter."
-#: builtin/help.c:384
+#: builtin/help.c:366
msgid "no man viewer handled the request"
msgstr "kein Handbuch-Betrachter konnte mit dieser Anfrage umgehen"
-#: builtin/help.c:392
+#: builtin/help.c:374
msgid "no info viewer handled the request"
msgstr "kein Informations-Betrachter konnte mit dieser Anfrage umgehen"
-#: builtin/help.c:447 builtin/help.c:454
+#: builtin/help.c:429 builtin/help.c:436
#, c-format
msgid "usage: %s%s"
msgstr "Verwendung: %s%s"
-#: builtin/help.c:470
+#: builtin/help.c:452
#, c-format
msgid "`git %s' is aliased to `%s'"
msgstr "für `git %s' wurde der Alias `%s' angelegt"
@@ -5683,100 +5842,100 @@ msgstr ""
msgid "Unknown commit %s"
msgstr "Unbekannte Version %s"
-#: builtin/ls-files.c:408
+#: builtin/ls-files.c:409
msgid "git ls-files [options] [<file>...]"
msgstr "git ls-files [Optionen] [<Datei>...]"
-#: builtin/ls-files.c:463
+#: builtin/ls-files.c:466
msgid "identify the file status with tags"
msgstr "zeigt den Dateistatus mit Markierungen"
-#: builtin/ls-files.c:465
+#: builtin/ls-files.c:468
msgid "use lowercase letters for 'assume unchanged' files"
msgstr ""
"verwendet Kleinbuchstaben für Dateien mit 'assume unchanged' Markierung"
-#: builtin/ls-files.c:467
+#: builtin/ls-files.c:470
msgid "show cached files in the output (default)"
msgstr "zeigt zwischengespeicherten Dateien in der Ausgabe an (Standard)"
-#: builtin/ls-files.c:469
+#: builtin/ls-files.c:472
msgid "show deleted files in the output"
msgstr "zeigt entfernte Dateien in der Ausgabe an"
-#: builtin/ls-files.c:471
+#: builtin/ls-files.c:474
msgid "show modified files in the output"
msgstr "zeigt geänderte Dateien in der Ausgabe an"
-#: builtin/ls-files.c:473
+#: builtin/ls-files.c:476
msgid "show other files in the output"
msgstr "zeigt sonstige Dateien in der Ausgabe an"
-#: builtin/ls-files.c:475
+#: builtin/ls-files.c:478
msgid "show ignored files in the output"
msgstr "zeigt ignorierte Dateien in der Ausgabe an"
-#: builtin/ls-files.c:478
+#: builtin/ls-files.c:481
msgid "show staged contents' object name in the output"
msgstr "zeigt Objektnamen von Inhalten in der Bereitstellung in der Ausgabe an"
-#: builtin/ls-files.c:480
+#: builtin/ls-files.c:483
msgid "show files on the filesystem that need to be removed"
msgstr "zeigt Dateien im Dateisystem, die gelöscht werden müssen, an"
-#: builtin/ls-files.c:482
+#: builtin/ls-files.c:485
msgid "show 'other' directories' name only"
msgstr "zeigt nur Namen von 'sonstigen' Verzeichnissen an"
-#: builtin/ls-files.c:485
+#: builtin/ls-files.c:488
msgid "don't show empty directories"
msgstr "zeigt keine leeren Verzeichnisse an"
-#: builtin/ls-files.c:488
+#: builtin/ls-files.c:491
msgid "show unmerged files in the output"
msgstr "zeigt nicht zusammengeführte Dateien in der Ausgabe an"
-#: builtin/ls-files.c:490
+#: builtin/ls-files.c:493
msgid "show resolve-undo information"
msgstr "zeigt 'resolve-undo' Informationen an"
-#: builtin/ls-files.c:492
+#: builtin/ls-files.c:495
msgid "skip files matching pattern"
msgstr "lässt Dateien aus, die einem Muster entsprechen"
-#: builtin/ls-files.c:495
+#: builtin/ls-files.c:498
msgid "exclude patterns are read from <file>"
msgstr "schließt Muster, gelesen von <Datei>, aus"
-#: builtin/ls-files.c:498
+#: builtin/ls-files.c:501
msgid "read additional per-directory exclude patterns in <file>"
msgstr "liest zusätzliche pro-Verzeichnis Auschlussmuster aus <Datei>"
-#: builtin/ls-files.c:500
+#: builtin/ls-files.c:503
msgid "add the standard git exclusions"
msgstr "fügt die standardmäßigen Git-Ausschlüsse hinzu"
-#: builtin/ls-files.c:503
+#: builtin/ls-files.c:506
msgid "make the output relative to the project top directory"
msgstr "Ausgabe relativ zum Projektverzeichnis"
-#: builtin/ls-files.c:506
+#: builtin/ls-files.c:509
msgid "if any <file> is not in the index, treat this as an error"
msgstr ""
"behandle es als Fehler, wenn sich eine <Datei> nicht in der Bereitstellung "
"befindet"
-#: builtin/ls-files.c:507
+#: builtin/ls-files.c:510
msgid "tree-ish"
msgstr "Versionsreferenz"
-#: builtin/ls-files.c:508
+#: builtin/ls-files.c:511
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr ""
"gibt vor, dass Pfade, die seit <Versionsreferenz> gelöscht wurden, immer "
"noch vorhanden sind"
-#: builtin/ls-files.c:510
+#: builtin/ls-files.c:513
msgid "show debugging data"
msgstr "zeigt Ausgaben zur Fehlersuche an"
@@ -5892,7 +6051,7 @@ msgstr "erlaubt Vorspulen (Standard)"
msgid "abort if fast-forward is not possible"
msgstr "bricht ab, wenn kein Vorspulen möglich ist"
-#: builtin/merge.c:202 builtin/notes.c:870 builtin/revert.c:112
+#: builtin/merge.c:202 builtin/notes.c:866 builtin/revert.c:112
msgid "strategy"
msgstr "Strategie"
@@ -6000,11 +6159,12 @@ msgstr ""
"Zusammenführung abzuschließen.\n"
#: builtin/merge.c:788
+#, c-format
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"
-"Lines starting with '#' will be ignored, and an empty message aborts\n"
+"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
"Bitte geben Sie eine Versionsbeschreibung ein um zu erklären, warum diese "
@@ -6012,59 +6172,59 @@ msgstr ""
"insbesondere wenn es einen aktualisierten, externen Zweig mit einem Thema-"
"Zweig zusammenführt.\n"
"\n"
-"Zeilen beginnend mit '#' werden ignoriert, und eine leere Beschreibung "
+"Zeilen beginnend mit '%c' werden ignoriert, und eine leere Beschreibung "
"bricht die Eintragung ab.\n"
-#: builtin/merge.c:813
+#: builtin/merge.c:812
msgid "Empty commit message."
msgstr "Leere Versionsbeschreibung"
-#: builtin/merge.c:825
+#: builtin/merge.c:824
#, c-format
msgid "Wonderful.\n"
msgstr "Wunderbar.\n"
-#: builtin/merge.c:890
+#: builtin/merge.c:889
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
"Automatische Zusammenführung fehlgeschlagen; beheben Sie die Konflikte und "
"tragen Sie dann das Ergebnis ein.\n"
-#: builtin/merge.c:906
+#: builtin/merge.c:905
#, c-format
msgid "'%s' is not a commit"
msgstr "'%s' ist keine Version"
-#: builtin/merge.c:947
+#: builtin/merge.c:946
msgid "No current branch."
msgstr "Sie befinden sich auf keinem Zweig."
-#: builtin/merge.c:949
+#: builtin/merge.c:948
msgid "No remote for the current branch."
msgstr "Kein externes Archiv für den aktuellen Zweig."
-#: builtin/merge.c:951
+#: builtin/merge.c:950
msgid "No default upstream defined for the current branch."
msgstr ""
"Es ist kein externes Standard-Projektarchiv für den aktuellen Zweig "
"definiert."
-#: builtin/merge.c:956
+#: builtin/merge.c:955
#, c-format
msgid "No remote tracking branch for %s from %s"
msgstr "Kein externer Übernahmezweig für %s von %s"
-#: builtin/merge.c:1043 builtin/merge.c:1200
+#: builtin/merge.c:1042 builtin/merge.c:1199
#, c-format
msgid "%s - not something we can merge"
msgstr "%s - nichts was wir zusammenführen können"
-#: builtin/merge.c:1111
+#: builtin/merge.c:1110
msgid "There is no merge to abort (MERGE_HEAD missing)."
msgstr "Es gibt keine Zusammenführung zum Abbrechen (vermisse MERGE_HEAD)"
-#: builtin/merge.c:1127 git-pull.sh:31
+#: builtin/merge.c:1126 git-pull.sh:31
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -6072,12 +6232,12 @@ msgstr ""
"Sie haben Ihre Zusammenführung nicht abgeschlossen (MERGE_HEAD existiert).\n"
"Bitte tragen Sie Ihre Änderungen ein, bevor Sie zusammenführen können."
-#: builtin/merge.c:1130 git-pull.sh:34
+#: builtin/merge.c:1129 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
msgstr ""
"Sie haben Ihre Zusammenführung nicht abgeschlossen (MERGE_HEAD existiert)."
-#: builtin/merge.c:1134
+#: builtin/merge.c:1133
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -6085,82 +6245,82 @@ msgstr ""
"Sie haben \"cherry-pick\" nicht abgeschlossen (CHERRY_PICK_HEAD existiert).\n"
"Bitte tragen Sie Ihre Änderungen ein, bevor Sie zusammenführen können."
-#: builtin/merge.c:1137
+#: builtin/merge.c:1136
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
msgstr ""
"Sie haben \"cherry-pick\" nicht abgeschlossen (CHERRY_PICK_HEAD existiert)."
-#: builtin/merge.c:1146
+#: builtin/merge.c:1145
msgid "You cannot combine --squash with --no-ff."
msgstr "Sie können --squash nicht mit --no-ff kombinieren."
-#: builtin/merge.c:1151
+#: builtin/merge.c:1150
msgid "You cannot combine --no-ff with --ff-only."
msgstr "Sie können --no-ff nicht mit --ff--only kombinieren."
-#: builtin/merge.c:1158
+#: builtin/merge.c:1157
msgid "No commit specified and merge.defaultToUpstream not set."
msgstr "Keine Version angegeben und merge.defaultToUpstream ist nicht gesetzt."
-#: builtin/merge.c:1190
+#: builtin/merge.c:1189
msgid "Can merge only exactly one commit into empty head"
msgstr "Kann nur exakt eine Version in einem leeren Zweig zusammenführen."
-#: builtin/merge.c:1193
+#: builtin/merge.c:1192
msgid "Squash commit into empty head not supported yet"
msgstr "Bin auf einem Zweig, der noch geboren wird; kann nicht quetschen."
-#: builtin/merge.c:1195
+#: builtin/merge.c:1194
msgid "Non-fast-forward commit does not make sense into an empty head"
msgstr ""
"Nicht vorzuspulende Version kann nicht in einem leeren Zweig verwendet "
"werden."
-#: builtin/merge.c:1311
+#: builtin/merge.c:1310
#, c-format
msgid "Updating %s..%s\n"
msgstr "Aktualisiere %s..%s\n"
-#: builtin/merge.c:1350
+#: builtin/merge.c:1349
#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr "Probiere wirklich triviale \"in-index\"-Zusammenführung...\n"
-#: builtin/merge.c:1357
+#: builtin/merge.c:1356
#, c-format
msgid "Nope.\n"
msgstr "Nein.\n"
-#: builtin/merge.c:1389
+#: builtin/merge.c:1388
msgid "Not possible to fast-forward, aborting."
msgstr "Vorspulen nicht möglich, breche ab."
-#: builtin/merge.c:1412 builtin/merge.c:1491
+#: builtin/merge.c:1411 builtin/merge.c:1490
#, c-format
msgid "Rewinding the tree to pristine...\n"
msgstr "Rücklauf des Zweiges bis zum Ursprung...\n"
-#: builtin/merge.c:1416
+#: builtin/merge.c:1415
#, c-format
msgid "Trying merge strategy %s...\n"
msgstr "Probiere Zusammenführungsstrategie %s...\n"
-#: builtin/merge.c:1482
+#: builtin/merge.c:1481
#, c-format
msgid "No merge strategy handled the merge.\n"
msgstr "Keine Zusammenführungsstrategie behandelt diese Zusammenführung.\n"
-#: builtin/merge.c:1484
+#: builtin/merge.c:1483
#, c-format
msgid "Merge with strategy %s failed.\n"
msgstr "Zusammenführung mit Strategie %s fehlgeschlagen.\n"
-#: builtin/merge.c:1493
+#: builtin/merge.c:1492
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr "Benutzen Sie \"%s\" um die Auflösung per Hand vorzubereiten.\n"
-#: builtin/merge.c:1505
+#: builtin/merge.c:1504
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
@@ -6477,82 +6637,77 @@ msgstr "git notes prune [<Optionen>]"
msgid "git notes get-ref"
msgstr "git notes get-ref"
-#: builtin/notes.c:142
+#: builtin/notes.c:139
#, c-format
msgid "unable to start 'show' for object '%s'"
msgstr "konnte 'show' für Objekt '%s' nicht starten"
-#: builtin/notes.c:148
-msgid "can't fdopen 'show' output fd"
-msgstr "konnte Datei-Deskriptor für Ausgabe von 'show' nicht öffnen"
-
-#: builtin/notes.c:158
-#, c-format
-msgid "failed to close pipe to 'show' for object '%s'"
-msgstr "Schließen der Verbindung zu 'show' ist für Objekt '%s' fehlgeschlagen."
+#: builtin/notes.c:143
+msgid "could not read 'show' output"
+msgstr "Konnte Ausgabe von 'show' nicht lesen."
-#: builtin/notes.c:161
+#: builtin/notes.c:151
#, c-format
msgid "failed to finish 'show' for object '%s'"
msgstr "konnte 'show' für Objekt '%s' nicht abschließen"
-#: builtin/notes.c:178 builtin/tag.c:347
+#: builtin/notes.c:169 builtin/tag.c:341
#, c-format
msgid "could not create file '%s'"
msgstr "konnte Datei '%s' nicht erstellen"
-#: builtin/notes.c:192
+#: builtin/notes.c:188
msgid "Please supply the note contents using either -m or -F option"
msgstr ""
"Bitte liefern Sie den Notiz-Inhalt unter Verwendung der Option -m oder -F."
-#: builtin/notes.c:213 builtin/notes.c:976
+#: builtin/notes.c:209 builtin/notes.c:972
#, c-format
msgid "Removing note for object %s\n"
msgstr "Entferne Notiz für Objekt %s\n"
-#: builtin/notes.c:218
+#: builtin/notes.c:214
msgid "unable to write note object"
msgstr "Konnte Notiz-Objekt nicht schreiben"
-#: builtin/notes.c:220
+#: builtin/notes.c:216
#, c-format
msgid "The note contents has been left in %s"
msgstr "Die Notiz-Inhalte wurden in %s belassen"
-#: builtin/notes.c:254 builtin/tag.c:542
+#: builtin/notes.c:250 builtin/tag.c:540
#, c-format
msgid "cannot read '%s'"
msgstr "kann '%s' nicht lesen"
-#: builtin/notes.c:256 builtin/tag.c:545
+#: builtin/notes.c:252 builtin/tag.c:543
#, c-format
msgid "could not open or read '%s'"
msgstr "konnte '%s' nicht öffnen oder lesen"
-#: builtin/notes.c:275 builtin/notes.c:448 builtin/notes.c:450
-#: builtin/notes.c:510 builtin/notes.c:564 builtin/notes.c:647
-#: builtin/notes.c:652 builtin/notes.c:727 builtin/notes.c:769
-#: builtin/notes.c:971 builtin/tag.c:558
+#: builtin/notes.c:271 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:506 builtin/notes.c:560 builtin/notes.c:643
+#: builtin/notes.c:648 builtin/notes.c:723 builtin/notes.c:765
+#: builtin/notes.c:967 builtin/tag.c:556
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
msgstr "Konnte '%s' nicht als gültige Referenz auflösen."
-#: builtin/notes.c:278
+#: builtin/notes.c:274
#, c-format
msgid "Failed to read object '%s'."
msgstr "Fehler beim Lesen des Objektes '%s'."
-#: builtin/notes.c:302
+#: builtin/notes.c:298
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr "Kann uninitialisierten/unreferenzierten Notiz-Baum nicht eintragen."
-#: builtin/notes.c:343
+#: builtin/notes.c:339
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
msgstr "Ungültiger notes.rewriteMode Wert: '%s'"
-#: builtin/notes.c:353
+#: builtin/notes.c:349
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr ""
@@ -6560,58 +6715,58 @@ msgstr ""
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: builtin/notes.c:380
+#: builtin/notes.c:376
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Ungültiger %s Wert: '%s'"
-#: builtin/notes.c:444
+#: builtin/notes.c:440
#, c-format
msgid "Malformed input line: '%s'."
msgstr "Fehlerhafte Eingabezeile: '%s'."
-#: builtin/notes.c:459
+#: builtin/notes.c:455
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
msgstr "Fehler beim Kopieren der Notizen von '%s' nach '%s'"
-#: builtin/notes.c:503 builtin/notes.c:557 builtin/notes.c:630
-#: builtin/notes.c:642 builtin/notes.c:715 builtin/notes.c:762
-#: builtin/notes.c:1036
+#: builtin/notes.c:499 builtin/notes.c:553 builtin/notes.c:626
+#: builtin/notes.c:638 builtin/notes.c:711 builtin/notes.c:758
+#: builtin/notes.c:1032
msgid "too many parameters"
msgstr "zu viele Parameter"
-#: builtin/notes.c:516 builtin/notes.c:775
+#: builtin/notes.c:512 builtin/notes.c:771
#, c-format
msgid "No note found for object %s."
msgstr "Kein Notiz für Objekt %s gefunden."
-#: builtin/notes.c:538 builtin/notes.c:695
+#: builtin/notes.c:534 builtin/notes.c:691
msgid "note contents as a string"
msgstr "Notizinhalte als Zeichenkette"
-#: builtin/notes.c:541 builtin/notes.c:698
+#: builtin/notes.c:537 builtin/notes.c:694
msgid "note contents in a file"
msgstr "Notizinhalte in einer Datei"
-#: builtin/notes.c:543 builtin/notes.c:546 builtin/notes.c:700
-#: builtin/notes.c:703 builtin/tag.c:476
+#: builtin/notes.c:539 builtin/notes.c:542 builtin/notes.c:696
+#: builtin/notes.c:699 builtin/tag.c:474
msgid "object"
msgstr "Objekt"
-#: builtin/notes.c:544 builtin/notes.c:701
+#: builtin/notes.c:540 builtin/notes.c:697
msgid "reuse and edit specified note object"
msgstr "Wiederverwendung und Bearbeitung des angegebenen Notiz-Objektes"
-#: builtin/notes.c:547 builtin/notes.c:704
+#: builtin/notes.c:543 builtin/notes.c:700
msgid "reuse specified note object"
msgstr "Wiederverwendung des angegebenen Notiz-Objektes"
-#: builtin/notes.c:549 builtin/notes.c:617
+#: builtin/notes.c:545 builtin/notes.c:613
msgid "replace existing notes"
msgstr "ersetzt existierende Notizen"
-#: builtin/notes.c:583
+#: builtin/notes.c:579
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -6620,26 +6775,26 @@ msgstr ""
"Konnte Notizen nicht hinzufügen. Existierende Notizen für Objekt %s "
"gefunden. Verwenden Sie '-f' um die existierenden Notizen zu überschreiben."
-#: builtin/notes.c:588 builtin/notes.c:665
+#: builtin/notes.c:584 builtin/notes.c:661
#, c-format
msgid "Overwriting existing notes for object %s\n"
msgstr "Überschreibe existierende Notizen für Objekt %s\n"
-#: builtin/notes.c:618
+#: builtin/notes.c:614
msgid "read objects from stdin"
msgstr "liest Objekte von der Standard-Eingabe"
-#: builtin/notes.c:620
+#: builtin/notes.c:616
msgid "load rewriting config for <command> (implies --stdin)"
msgstr ""
"lädt Konfiguration für <Kommando> beim Umschreiben von Versionen (impliziert "
"--stdin)"
-#: builtin/notes.c:638
+#: builtin/notes.c:634
msgid "too few parameters"
msgstr "zu wenig Parameter"
-#: builtin/notes.c:659
+#: builtin/notes.c:655
#, c-format
msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -6648,12 +6803,12 @@ msgstr ""
"Kann Notizen nicht kopieren. Existierende Notizen für Objekt %s gefunden. "
"Verwenden Sie '-f' um die existierenden Notizen zu überschreiben."
-#: builtin/notes.c:671
+#: builtin/notes.c:667
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
msgstr "Keine Notizen für Quell-Objekt %s. Kopie nicht möglich."
-#: builtin/notes.c:720
+#: builtin/notes.c:716
#, c-format
msgid ""
"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
@@ -6662,15 +6817,15 @@ msgstr ""
"Die Optionen -m/-F/-c/-C sind für das Unterkommando 'edit' veraltet.\n"
"Bitte benutzen Sie stattdessen 'git notes add -f -m/-F/-c/-C'.\n"
-#: builtin/notes.c:867
+#: builtin/notes.c:863
msgid "General options"
msgstr "Allgemeine Optionen"
-#: builtin/notes.c:869
+#: builtin/notes.c:865
msgid "Merge options"
msgstr "Optionen für Zusammenführung"
-#: builtin/notes.c:871
+#: builtin/notes.c:867
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
@@ -6678,46 +6833,46 @@ msgstr ""
"löst Konflikte bei Notizen mit der angegebenen Strategie auf (manual/ours/"
"theirs/union/cat_sort_uniq)"
-#: builtin/notes.c:873
+#: builtin/notes.c:869
msgid "Committing unmerged notes"
msgstr "trägt nicht zusammengeführte Notizen ein"
-#: builtin/notes.c:875
+#: builtin/notes.c:871
msgid "finalize notes merge by committing unmerged notes"
msgstr ""
"schließt Zusammenführung von Notizen ab, in dem nicht zusammengeführte "
"Notizen eingetragen werden"
-#: builtin/notes.c:877
+#: builtin/notes.c:873
msgid "Aborting notes merge resolution"
msgstr "bricht Konfliktauflösung bei Zusammenführung von Notizen ab"
-#: builtin/notes.c:879
+#: builtin/notes.c:875
msgid "abort notes merge"
msgstr "bricht Zusammenführung von Notizen ab"
-#: builtin/notes.c:974
+#: builtin/notes.c:970
#, c-format
msgid "Object %s has no note\n"
msgstr "Objekt %s hat keine Notiz\n"
-#: builtin/notes.c:986
+#: builtin/notes.c:982
msgid "attempt to remove non-existent note is not an error"
msgstr "der Versuch, eine nicht existierende Notiz zu löschen, ist kein Fehler"
-#: builtin/notes.c:989
+#: builtin/notes.c:985
msgid "read object names from the standard input"
msgstr "liest Objektnamen von der Standard-Eingabe"
-#: builtin/notes.c:1070
+#: builtin/notes.c:1066
msgid "notes_ref"
msgstr "Notiz-Referenz"
-#: builtin/notes.c:1071
+#: builtin/notes.c:1067
msgid "use notes from <notes_ref>"
msgstr "verwendet Notizen von <Notiz-Referenz>"
-#: builtin/notes.c:1106 builtin/remote.c:1598
+#: builtin/notes.c:1102 builtin/remote.c:1598
#, c-format
msgid "Unknown subcommand: %s"
msgstr "Unbekanntes Unterkommando: %s"
@@ -7095,28 +7250,56 @@ msgstr ""
#: builtin/push.c:224
msgid ""
-"Updates were rejected because the destination reference already exists\n"
-"in the remote."
+"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 merge the remote changes (e.g.,\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 Fernarchiv Versionen "
+"enthält,\n"
+"die lokal nicht vorhanden sind. Das wird üblicherweise durch das Versenden "
+"von\n"
+"Versionen auf dieselbe Referenz von einem anderen Projektarchiv aus "
+"verursacht.\n"
+"Vielleicht müssen Sie die externen Änderungen zusammenzuführen (z.B. 'git "
+"pull')\n"
+"bevor Sie erneut versenden.\n"
+"Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help'\n"
+"für weitere Details."
+
+#: builtin/push.c:231
+msgid "Updates were rejected because the tag already exists in the remote."
msgstr ""
-"Aktualisierungen wurden zurückgewiesen, weil die Zielreferenz bereits\n"
+"Aktualisierungen wurden zurückgewiesen, weil die Markierung bereits\n"
"im Fernarchiv existiert."
-#: builtin/push.c:269
+#: builtin/push.c:234
+msgid ""
+"You cannot update a remote ref that points at a non-commit object,\n"
+"or update a remote ref to make it point at a non-commit object,\n"
+"without using the '--force' option.\n"
+msgstr ""
+"Sie können keine externe Referenz aktualisieren, die auf ein Objekt zeigt,\n"
+"das keine Version ist, oder es auf ein solches Objekt zeigen lassen, ohne\n"
+"die Option '--force' zu verwenden.\n"
+
+#: builtin/push.c:294
#, c-format
msgid "Pushing to %s\n"
msgstr "Versende nach %s\n"
-#: builtin/push.c:273
+#: builtin/push.c:298
#, c-format
msgid "failed to push some refs to '%s'"
msgstr "Fehler beim Versenden einiger Referenzen nach '%s'"
-#: builtin/push.c:302
+#: builtin/push.c:331
#, c-format
msgid "bad repository '%s'"
msgstr "ungültiges Projektarchiv '%s'"
-#: builtin/push.c:303
+#: builtin/push.c:332
msgid ""
"No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote "
@@ -7138,82 +7321,86 @@ msgstr ""
"\n"
" git push <Name>\n"
-#: builtin/push.c:318
+#: builtin/push.c:347
msgid "--all and --tags are incompatible"
msgstr "Die Optionen --all und --tags sind inkompatibel."
-#: builtin/push.c:319
+#: builtin/push.c:348
msgid "--all can't be combined with refspecs"
msgstr ""
"Die Option --all kann nicht mit Referenzspezifikationen kombiniert werden."
-#: builtin/push.c:324
+#: builtin/push.c:353
msgid "--mirror and --tags are incompatible"
msgstr "Die Optionen --mirror und --tags sind inkompatibel."
-#: builtin/push.c:325
+#: builtin/push.c:354
msgid "--mirror can't be combined with refspecs"
msgstr ""
"Die Option --mirror kann nicht mit Referenzspezifikationen kombiniert werden."
-#: builtin/push.c:330
+#: builtin/push.c:359
msgid "--all and --mirror are incompatible"
msgstr "Die Optionen --all und --mirror sind inkompatibel."
-#: builtin/push.c:390
+#: builtin/push.c:419
msgid "repository"
msgstr "Projektarchiv"
-#: builtin/push.c:391
+#: builtin/push.c:420
msgid "push all refs"
msgstr "versendet alle Referenzen"
-#: builtin/push.c:392
+#: builtin/push.c:421
msgid "mirror all refs"
msgstr "spiegelt alle Referenzen"
-#: builtin/push.c:394
+#: builtin/push.c:423
msgid "delete refs"
msgstr "löscht Referenzen"
-#: builtin/push.c:395
+#: builtin/push.c:424
msgid "push tags (can't be used with --all or --mirror)"
msgstr ""
"versendet Markierungen (kann nicht mit --all oder --mirror verwendet werden)"
-#: builtin/push.c:398
+#: builtin/push.c:427
msgid "force updates"
msgstr "erzwingt Aktualisierung"
-#: builtin/push.c:399
+#: builtin/push.c:428
msgid "check"
msgstr ""
-#: builtin/push.c:400
+#: builtin/push.c:429
msgid "control recursive pushing of submodules"
msgstr "steuert rekursives Versenden von Unterprojekten"
-#: builtin/push.c:402
+#: builtin/push.c:431
msgid "use thin pack"
msgstr "verwendet kleinere Pakete"
-#: builtin/push.c:403 builtin/push.c:404
+#: builtin/push.c:432 builtin/push.c:433
msgid "receive pack program"
msgstr "'receive pack' Programm"
-#: builtin/push.c:405
+#: builtin/push.c:434
msgid "set upstream for git pull/status"
msgstr "setzt externes Projektarchiv für \"git pull/status\""
-#: builtin/push.c:408
+#: builtin/push.c:437
msgid "prune locally removed refs"
msgstr "entfernt lokal gelöschte Referenzen"
-#: builtin/push.c:418
+#: builtin/push.c:439
+msgid "bypass pre-push hook"
+msgstr "umgeht \"pre-push hook\""
+
+#: builtin/push.c:448
msgid "--delete is incompatible with --all, --mirror and --tags"
msgstr "Die Option --delete ist inkompatibel mit --all, --mirror und --tags."
-#: builtin/push.c:420
+#: builtin/push.c:450
msgid "--delete doesn't make sense without any refs"
msgstr "Die Option --delete kann nur mit Referenzen verwendet werden."
@@ -8390,170 +8577,164 @@ msgid "could not verify the tag '%s'"
msgstr "Konnte Markierung '%s' nicht verifizieren"
#: builtin/tag.c:249
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be ignored.\n"
-"#\n"
+"Write a tag message\n"
+"Lines starting with '%c' will be ignored.\n"
msgstr ""
"\n"
-"#\n"
-"# Geben Sie eine Markierungsbeschreibung ein.\n"
-"# Zeilen, die mit '#' beginnen, werden ignoriert.\n"
-"#\n"
+"Geben Sie eine Markierungsbeschreibung ein.\n"
+"Zeilen, die mit '%c' beginnen, werden ignoriert.\n"
-#: builtin/tag.c:256
+#: builtin/tag.c:253
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be kept; you may remove them yourself if you "
+"Write a tag message\n"
+"Lines starting with '%c' will be kept; you may remove them yourself if you "
"want to.\n"
-"#\n"
msgstr ""
"\n"
-"#\n"
-"# Geben Sie eine Markierungsbeschreibung ein.\n"
-"# Zeilen, die mit '#' beginnen, werden behalten; Sie dürfen diese\n"
-"# selbst entfernen wenn Sie möchten.\n"
-"#\n"
+"Geben Sie eine Markierungsbeschreibung ein.\n"
+"Zeilen, die mit '%c' beginnen, werden behalten; Sie dürfen diese\n"
+"selbst entfernen wenn Sie möchten.\n"
-#: builtin/tag.c:298
+#: builtin/tag.c:292
msgid "unable to sign the tag"
msgstr "konnte Markierung nicht signieren"
-#: builtin/tag.c:300
+#: builtin/tag.c:294
msgid "unable to write tag file"
msgstr "konnte Markierungsdatei nicht schreiben"
-#: builtin/tag.c:325
+#: builtin/tag.c:319
msgid "bad object type."
msgstr "ungültiger Objekt-Typ"
-#: builtin/tag.c:338
+#: builtin/tag.c:332
msgid "tag header too big."
msgstr "Markierungskopf zu groß."
-#: builtin/tag.c:370
+#: builtin/tag.c:368
msgid "no tag message?"
msgstr "keine Markierungsbeschreibung?"
-#: builtin/tag.c:376
+#: builtin/tag.c:374
#, c-format
msgid "The tag message has been left in %s\n"
msgstr "Die Markierungsbeschreibung wurde gelassen in %s\n"
-#: builtin/tag.c:425
+#: builtin/tag.c:423
msgid "switch 'points-at' requires an object"
msgstr "Option 'points-at' erfordert ein Objekt"
-#: builtin/tag.c:427
+#: builtin/tag.c:425
#, c-format
msgid "malformed object name '%s'"
msgstr "fehlerhafter Objekt-Name '%s'"
-#: builtin/tag.c:447
+#: builtin/tag.c:445
msgid "list tag names"
msgstr "listet Markierungsnamen auf"
-#: builtin/tag.c:449
+#: builtin/tag.c:447
msgid "print <n> lines of each tag message"
msgstr "zeigt <n> Zeilen jeder Markierungsbeschreibung"
-#: builtin/tag.c:451
+#: builtin/tag.c:449
msgid "delete tags"
msgstr "löscht Markierungen"
-#: builtin/tag.c:452
+#: builtin/tag.c:450
msgid "verify tags"
msgstr "überprüft Markierungen"
-#: builtin/tag.c:454
+#: builtin/tag.c:452
msgid "Tag creation options"
msgstr "Optionen für Erstellung von Markierungen"
-#: builtin/tag.c:456
+#: builtin/tag.c:454
msgid "annotated tag, needs a message"
msgstr "annotierte Markierung, benötigt eine Beschreibung"
-#: builtin/tag.c:458
+#: builtin/tag.c:456
msgid "tag message"
msgstr "Markierungsbeschreibung"
-#: builtin/tag.c:460
+#: builtin/tag.c:458
msgid "annotated and GPG-signed tag"
msgstr "annotierte und GPG-signierte Markierung"
-#: builtin/tag.c:464
+#: builtin/tag.c:462
msgid "use another key to sign the tag"
msgstr "verwendet einen anderen Schlüssel um die Markierung zu signieren"
-#: builtin/tag.c:465
+#: builtin/tag.c:463
msgid "replace the tag if exists"
msgstr "ersetzt die Markierung, wenn sie existiert"
-#: builtin/tag.c:466
+#: builtin/tag.c:464
msgid "show tag list in columns"
msgstr "zeigt Liste der Markierungen in Spalten"
-#: builtin/tag.c:468
+#: builtin/tag.c:466
msgid "Tag listing options"
msgstr "Optionen für Auflistung der Markierungen"
-#: builtin/tag.c:471
+#: builtin/tag.c:469
msgid "print only tags that contain the commit"
msgstr "gibt nur Markierungen aus, die diese Version beinhalten"
-#: builtin/tag.c:477
+#: builtin/tag.c:475
msgid "print only tags of the object"
msgstr "gibt nur Markierungen von dem Objekt aus"
-#: builtin/tag.c:506
+#: builtin/tag.c:504
msgid "--column and -n are incompatible"
msgstr "--column und -n sind inkompatibel"
-#: builtin/tag.c:523
+#: builtin/tag.c:521
msgid "-n option is only allowed with -l."
msgstr "-n Option ist nur erlaubt mit -l."
-#: builtin/tag.c:525
+#: builtin/tag.c:523
msgid "--contains option is only allowed with -l."
msgstr "--contains Option ist nur erlaubt mit -l."
-#: builtin/tag.c:527
+#: builtin/tag.c:525
msgid "--points-at option is only allowed with -l."
msgstr "--points-at Option ist nur erlaubt mit -l."
-#: builtin/tag.c:535
+#: builtin/tag.c:533
msgid "only one -F or -m option is allowed."
msgstr "nur eine -F oder -m Option ist erlaubt."
-#: builtin/tag.c:555
+#: builtin/tag.c:553
msgid "too many params"
msgstr "zu viele Parameter"
-#: builtin/tag.c:561
+#: builtin/tag.c:559
#, c-format
msgid "'%s' is not a valid tag name."
msgstr "'%s' ist kein gültiger Markierungsname."
-#: builtin/tag.c:566
+#: builtin/tag.c:564
#, c-format
msgid "tag '%s' already exists"
msgstr "Markierung '%s' existiert bereits"
-#: builtin/tag.c:584
+#: builtin/tag.c:582
#, c-format
msgid "%s: cannot lock the ref"
msgstr "%s: kann Referenz nicht sperren"
-#: builtin/tag.c:586
+#: builtin/tag.c:584
#, c-format
msgid "%s: cannot update the ref"
msgstr "%s: kann Referenz nicht aktualisieren"
-#: builtin/tag.c:588
+#: builtin/tag.c:586
#, c-format
msgid "Updated tag '%s' (was %s)\n"
msgstr "Aktualisierte Markierung '%s' (war %s)\n"
@@ -8798,7 +8979,7 @@ msgid "Print lines matching a pattern"
msgstr "Stellt Zeilen dar, die einem Muster entsprechen"
#: common-cmds.h:17
-msgid "Create an empty git repository or reinitialize an existing one"
+msgid "Create an empty Git repository or reinitialize an existing one"
msgstr ""
"Erstellt ein leeres Git-Projektarchiv oder initialisiert ein bestehendes neu"
@@ -8832,8 +9013,7 @@ msgstr "Baut lokale Versionen auf einem aktuellerem externen Zweig neu auf"
#: common-cmds.h:24
msgid "Reset current HEAD to the specified state"
-msgstr ""
-"Setzt die aktuelle Zweigspitze (HEAD) zu einem spezifizierten Zustand"
+msgstr "Setzt die aktuelle Zweigspitze (HEAD) zu einem spezifizierten Zustand"
#: common-cmds.h:25
msgid "Remove files from the working tree and from the index"
@@ -9069,7 +9249,7 @@ msgstr ""
#: git-bisect.sh:140
msgid "won't bisect on seeked tree"
-msgstr "\"bisect\" auf gesuchtem Zweig nicht möglich"
+msgstr "binäre Suche auf gesuchtem Zweig nicht möglich"
#: git-bisect.sh:144
msgid "Bad HEAD - strange symbolic ref"
@@ -9102,7 +9282,7 @@ msgstr "'git bisect bad' kann nur ein Argument entgegennehmen."
#. this is less optimum.
#: git-bisect.sh:273
msgid "Warning: bisecting only with a bad commit."
-msgstr "Warnung: halbiere nur mit einer fehlerhaften Version"
+msgstr "Warnung: binäre Suche nur mit einer fehlerhaften Version"
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
@@ -9132,7 +9312,7 @@ msgstr ""
#: git-bisect.sh:347 git-bisect.sh:474
msgid "We are not bisecting."
-msgstr "Wir sind nicht beim Halbieren."
+msgstr "keine binäre Suche im Gange"
#: git-bisect.sh:354
#, sh-format
@@ -9172,12 +9352,12 @@ msgid ""
"bisect run failed:\n"
"exit code $res from '$command' is < 0 or >= 128"
msgstr ""
-"Ausführung der Halbierung fehlgeschlagen:\n"
+"'bisect run' fehlgeschlagen:\n"
"Rückkehrwert $res von '$command' ist < 0 oder >= 128"
#: git-bisect.sh:453
msgid "bisect run cannot continue any more"
-msgstr "Ausführung der Halbierung kann nicht mehr fortgesetzt werden"
+msgstr "'bisect run' kann nicht mehr fortgesetzt werden"
#: git-bisect.sh:459
#, sh-format
@@ -9185,12 +9365,12 @@ msgid ""
"bisect run failed:\n"
"'bisect_state $state' exited with error code $res"
msgstr ""
-"Ausführung der Halbierung fehlgeschlagen:\n"
+"'bisect run' fehlgeschlagen:\n"
"'bisect_state $state' wurde mit Fehlerwert $res beendet"
#: git-bisect.sh:466
msgid "bisect run success"
-msgstr "Halbierung erfolgreich ausgeführt"
+msgstr "'bisect run' erfolgreich ausgeführt"
#: git-pull.sh:21
msgid ""
@@ -9725,18 +9905,25 @@ msgid "blob"
msgstr "Blob"
#: git-submodule.sh:979
-msgid "# Submodules changed but not updated:"
-msgstr "# Unterprojekte geändert, aber nicht aktualisiert:"
+msgid "Submodules changed but not updated:"
+msgstr "Unterprojekte geändert, aber nicht aktualisiert:"
#: git-submodule.sh:981
-msgid "# Submodule changes to be committed:"
-msgstr "# Änderungen in Unterprojekt zum Eintragen:"
+msgid "Submodule changes to be committed:"
+msgstr "Änderungen in Unterprojekt zum Eintragen:"
#: git-submodule.sh:1129
#, sh-format
msgid "Synchronizing submodule url for '$prefix$sm_path'"
msgstr "Synchronisiere Unterprojekt-URL für '$prefix$sm_path'"
+#~ msgid "can't fdopen 'show' output fd"
+#~ msgstr "konnte Datei-Deskriptor für Ausgabe von 'show' nicht öffnen"
+
+#~ msgid "failed to close pipe to 'show' for object '%s'"
+#~ msgstr ""
+#~ "Schließen der Verbindung zu 'show' ist für Objekt '%s' fehlgeschlagen."
+
#~ msgid "You do not have a valid HEAD"
#~ msgstr "Sie haben keine gültige Zweigspitze (HEAD)"
diff --git a/po/git.pot b/po/git.pot
index c0bf4b30cd..a826dcbf9f 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2013-01-25 12:33+0800\n"
+"POT-Creation-Date: 2013-03-05 12:36+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: advice.c:45
+#: advice.c:49
#, c-format
msgid "hint: %.*s\n"
msgstr ""
@@ -27,7 +27,7 @@ msgstr ""
#. * Message used both when 'git commit' fails and when
#. * other commands doing a merge do.
#.
-#: advice.c:75
+#: advice.c:79
msgid ""
"Fix them up in the work tree,\n"
"and then use 'git add/rm <file>' as\n"
@@ -68,11 +68,11 @@ msgstr ""
msgid "prepend prefix to each pathname in the archive"
msgstr ""
-#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2380
-#: builtin/blame.c:2381 builtin/config.c:55 builtin/fast-export.c:653
+#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2366
+#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:653
#: builtin/fast-export.c:655 builtin/grep.c:715 builtin/hash-object.c:77
-#: builtin/ls-files.c:494 builtin/ls-files.c:497 builtin/notes.c:540
-#: builtin/notes.c:697 builtin/read-tree.c:107 parse-options.h:149
+#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536
+#: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149
msgid "file"
msgstr ""
@@ -112,7 +112,7 @@ msgstr ""
msgid "retrieve the archive from remote repository <repo>"
msgstr ""
-#: archive.c:347 builtin/archive.c:95 builtin/notes.c:619
+#: archive.c:347 builtin/archive.c:95 builtin/notes.c:615
msgid "command"
msgstr ""
@@ -122,7 +122,7 @@ msgstr ""
#: attr.c:259
msgid ""
-"Negative patterns are forbidden in git attributes\n"
+"Negative patterns are ignored in git attributes\n"
"Use '\\!' for literal leading exclamation."
msgstr ""
@@ -299,41 +299,41 @@ msgid_plural "%lu years ago"
msgstr[0] ""
msgstr[1] ""
-#: diff.c:111
+#: diff.c:112
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
msgstr ""
-#: diff.c:116
+#: diff.c:117
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
msgstr ""
-#: diff.c:194
+#: diff.c:210
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr ""
-#: diff.c:237
+#: diff.c:260
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
"%s"
msgstr ""
-#: diff.c:3494
+#: diff.c:3468
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
"%s"
msgstr ""
-#: diff.c:3508
+#: diff.c:3482
#, c-format
msgid "Failed to parse --submodule option parameter: '%s'"
msgstr ""
-#: gpg-interface.c:59
+#: gpg-interface.c:59 gpg-interface.c:127
msgid "could not run gpg."
msgstr ""
@@ -345,6 +345,16 @@ msgstr ""
msgid "gpg failed to sign the data"
msgstr ""
+#: gpg-interface.c:112
+#, c-format
+msgid "could not create temporary file '%s': %s"
+msgstr ""
+
+#: gpg-interface.c:115
+#, c-format
+msgid "failed writing detached signature to '%s': %s"
+msgstr ""
+
#: grep.c:1622
#, c-format
msgid "'%s': unable to read %s"
@@ -369,35 +379,39 @@ msgstr ""
msgid "git commands available from elsewhere on your $PATH"
msgstr ""
-#: help.c:275
+#: help.c:235
+msgid "The most commonly used git commands are:"
+msgstr ""
+
+#: help.c:292
#, 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 ""
-#: help.c:332
+#: help.c:349
msgid "Uh oh. Your system reports no Git commands at all."
msgstr ""
-#: help.c:354
+#: help.c:371
#, c-format
msgid ""
"WARNING: You called a Git command named '%s', which does not exist.\n"
"Continuing under the assumption that you meant '%s'"
msgstr ""
-#: help.c:359
+#: help.c:376
#, c-format
msgid "in %0.1f seconds automatically..."
msgstr ""
-#: help.c:366
+#: help.c:383
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
msgstr ""
-#: help.c:370
+#: help.c:387
msgid ""
"\n"
"Did you mean this?"
@@ -662,39 +676,53 @@ msgstr ""
msgid "Unable to write index."
msgstr ""
-#: parse-options.c:485
+#: parse-options.c:489
msgid "..."
msgstr ""
-#: parse-options.c:503
+#: parse-options.c:507
#, c-format
msgid "usage: %s"
msgstr ""
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation
-#: parse-options.c:507
+#: parse-options.c:511
#, c-format
msgid " or: %s"
msgstr ""
-#: parse-options.c:510
+#: parse-options.c:514
#, c-format
msgid " %s"
msgstr ""
-#: remote.c:1686
+#: parse-options.c:548
+msgid "-NUM"
+msgstr ""
+
+#: pathspec.c:83
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr ""
+
+#: pathspec.c:99
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr ""
+
+#: remote.c:1653
#, 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] ""
msgstr[1] ""
-#: remote.c:1692
+#: remote.c:1659
msgid " (use \"git push\" to publish your local commits)\n"
msgstr ""
-#: remote.c:1695
+#: remote.c:1662
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
@@ -702,11 +730,11 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: remote.c:1703
+#: remote.c:1670
msgid " (use \"git pull\" to update your local branch)\n"
msgstr ""
-#: remote.c:1706
+#: remote.c:1673
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -717,18 +745,18 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: remote.c:1716
+#: remote.c:1683
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
msgstr ""
-#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:875 builtin/merge.c:985
-#: builtin/merge.c:995
+#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:874 builtin/merge.c:984
+#: builtin/merge.c:994
#, c-format
msgid "Could not open '%s' for writing"
msgstr ""
-#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:987
-#: builtin/merge.c:1000
+#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:986
+#: builtin/merge.c:999
#, c-format
msgid "Could not write to '%s'"
msgstr ""
@@ -921,7 +949,7 @@ msgstr ""
msgid "cannot abort from a branch yet to be born"
msgstr ""
-#: sequencer.c:821 builtin/apply.c:4016
+#: sequencer.c:821 builtin/apply.c:4056
#, c-format
msgid "cannot open %s: %s"
msgstr ""
@@ -1135,332 +1163,378 @@ msgstr ""
msgid "bug: unhandled diff status %c"
msgstr ""
-#: wt-status.c:787
+#: wt-status.c:789
msgid "You have unmerged paths."
msgstr ""
-#: wt-status.c:790 wt-status.c:914
+#: wt-status.c:792 wt-status.c:944
msgid " (fix conflicts and run \"git commit\")"
msgstr ""
-#: wt-status.c:793
+#: wt-status.c:795
msgid "All conflicts fixed but you are still merging."
msgstr ""
-#: wt-status.c:796
+#: wt-status.c:798
msgid " (use \"git commit\" to conclude merge)"
msgstr ""
-#: wt-status.c:806
+#: wt-status.c:808
msgid "You are in the middle of an am session."
msgstr ""
-#: wt-status.c:809
+#: wt-status.c:811
msgid "The current patch is empty."
msgstr ""
-#: wt-status.c:813
+#: wt-status.c:815
msgid " (fix conflicts and then run \"git am --resolved\")"
msgstr ""
-#: wt-status.c:815
+#: wt-status.c:817
msgid " (use \"git am --skip\" to skip this patch)"
msgstr ""
-#: wt-status.c:817
+#: wt-status.c:819
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr ""
-#: wt-status.c:875 wt-status.c:885
+#: wt-status.c:879 wt-status.c:896
+#, c-format
+msgid "You are currently rebasing branch '%s' on '%s'."
+msgstr ""
+
+#: wt-status.c:884 wt-status.c:901
msgid "You are currently rebasing."
msgstr ""
-#: wt-status.c:878
+#: wt-status.c:887
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr ""
-#: wt-status.c:880
+#: wt-status.c:889
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr ""
-#: wt-status.c:882
+#: wt-status.c:891
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr ""
-#: wt-status.c:888
+#: wt-status.c:904
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr ""
-#: wt-status.c:890
+#: wt-status.c:908
+#, c-format
+msgid ""
+"You are currently splitting a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+
+#: wt-status.c:913
msgid "You are currently splitting a commit during a rebase."
msgstr ""
-#: wt-status.c:893
+#: wt-status.c:916
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr ""
-#: wt-status.c:895
+#: wt-status.c:920
+#, c-format
+msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+
+#: wt-status.c:925
msgid "You are currently editing a commit during a rebase."
msgstr ""
-#: wt-status.c:898
+#: wt-status.c:928
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
-#: wt-status.c:900
+#: wt-status.c:930
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr ""
-#: wt-status.c:910
+#: wt-status.c:940
msgid "You are currently cherry-picking."
msgstr ""
-#: wt-status.c:917
+#: wt-status.c:947
msgid " (all conflicts fixed: run \"git commit\")"
msgstr ""
-#: wt-status.c:926
+#: wt-status.c:958
+#, c-format
+msgid "You are currently bisecting branch '%s'."
+msgstr ""
+
+#: wt-status.c:962
msgid "You are currently bisecting."
msgstr ""
-#: wt-status.c:929
+#: wt-status.c:965
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr ""
-#: wt-status.c:980
+#: wt-status.c:1064
msgid "On branch "
msgstr ""
-#: wt-status.c:987
+#: wt-status.c:1071
msgid "Not currently on any branch."
msgstr ""
-#: wt-status.c:999
+#: wt-status.c:1083
msgid "Initial commit"
msgstr ""
-#: wt-status.c:1013
+#: wt-status.c:1097
msgid "Untracked files"
msgstr ""
-#: wt-status.c:1015
+#: wt-status.c:1099
msgid "Ignored files"
msgstr ""
-#: wt-status.c:1017
+#: wt-status.c:1101
#, c-format
msgid "Untracked files not listed%s"
msgstr ""
-#: wt-status.c:1019
+#: wt-status.c:1103
msgid " (use -u option to show untracked files)"
msgstr ""
-#: wt-status.c:1025
+#: wt-status.c:1109
msgid "No changes"
msgstr ""
-#: wt-status.c:1030
+#: wt-status.c:1114
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
-#: wt-status.c:1033
+#: wt-status.c:1117
#, c-format
msgid "no changes added to commit\n"
msgstr ""
-#: wt-status.c:1036
+#: wt-status.c:1120
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
"track)\n"
msgstr ""
-#: wt-status.c:1039
+#: wt-status.c:1123
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr ""
-#: wt-status.c:1042
+#: wt-status.c:1126
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr ""
-#: wt-status.c:1045 wt-status.c:1050
+#: wt-status.c:1129 wt-status.c:1134
#, c-format
msgid "nothing to commit\n"
msgstr ""
-#: wt-status.c:1048
+#: wt-status.c:1132
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr ""
-#: wt-status.c:1052
+#: wt-status.c:1136
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr ""
-#: wt-status.c:1160
+#: wt-status.c:1244
msgid "HEAD (no branch)"
msgstr ""
-#: wt-status.c:1166
+#: wt-status.c:1250
msgid "Initial commit on "
msgstr ""
-#: wt-status.c:1181
+#: wt-status.c:1265
msgid "behind "
msgstr ""
-#: wt-status.c:1184 wt-status.c:1187
+#: wt-status.c:1268 wt-status.c:1271
msgid "ahead "
msgstr ""
-#: wt-status.c:1189
+#: wt-status.c:1273
msgid ", behind "
msgstr ""
-#: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
+#: compat/precompose_utf8.c:58 builtin/clone.c:341
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr ""
+
+#: builtin/add.c:20
+msgid "git add [options] [--] <pathspec>..."
msgstr ""
-#: builtin/add.c:62
+#: builtin/add.c:63
#, c-format
msgid "unexpected diff status %c"
msgstr ""
-#: builtin/add.c:67 builtin/commit.c:231
+#: builtin/add.c:68 builtin/commit.c:231
msgid "updating files failed"
msgstr ""
-#: builtin/add.c:77
+#: builtin/add.c:78
#, c-format
msgid "remove '%s'\n"
msgstr ""
-#: builtin/add.c:176
-#, c-format
-msgid "Path '%s' is in submodule '%.*s'"
-msgstr ""
-
-#: builtin/add.c:192
+#: builtin/add.c:148
msgid "Unstaged changes after refreshing the index:"
msgstr ""
-#: builtin/add.c:195 builtin/add.c:460 builtin/rm.c:275
+#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275
#, c-format
msgid "pathspec '%s' did not match any files"
msgstr ""
-#: builtin/add.c:209
-#, c-format
-msgid "'%s' is beyond a symbolic link"
-msgstr ""
-
-#: builtin/add.c:276
+#: builtin/add.c:234
msgid "Could not read the index"
msgstr ""
-#: builtin/add.c:286
+#: builtin/add.c:244
#, c-format
msgid "Could not open '%s' for writing."
msgstr ""
-#: builtin/add.c:290
+#: builtin/add.c:248
msgid "Could not write patch"
msgstr ""
-#: builtin/add.c:295
+#: builtin/add.c:253
#, c-format
msgid "Could not stat '%s'"
msgstr ""
-#: builtin/add.c:297
+#: builtin/add.c:255
msgid "Empty patch. Aborted."
msgstr ""
-#: builtin/add.c:303
+#: builtin/add.c:261
#, c-format
msgid "Could not apply '%s'"
msgstr ""
-#: builtin/add.c:313
+#: builtin/add.c:271
msgid "The following paths are ignored by one of your .gitignore files:\n"
msgstr ""
-#: builtin/add.c:319 builtin/clean.c:160 builtin/fetch.c:78 builtin/mv.c:63
-#: builtin/prune-packed.c:76 builtin/push.c:396 builtin/remote.c:1253
+#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63
+#: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253
#: builtin/rm.c:206
msgid "dry run"
msgstr ""
-#: builtin/add.c:320 builtin/apply.c:4365 builtin/commit.c:1160
-#: builtin/count-objects.c:82 builtin/fsck.c:613 builtin/log.c:1522
-#: builtin/mv.c:62 builtin/read-tree.c:112
+#: builtin/add.c:278 builtin/apply.c:4405 builtin/check-ignore.c:19
+#: builtin/commit.c:1150 builtin/count-objects.c:82 builtin/fsck.c:613
+#: builtin/log.c:1522 builtin/mv.c:62 builtin/read-tree.c:112
msgid "be verbose"
msgstr ""
-#: builtin/add.c:322
+#: builtin/add.c:280
msgid "interactive picking"
msgstr ""
-#: builtin/add.c:323 builtin/checkout.c:1031 builtin/reset.c:258
+#: builtin/add.c:281 builtin/checkout.c:1031 builtin/reset.c:258
msgid "select hunks interactively"
msgstr ""
-#: builtin/add.c:324
+#: builtin/add.c:282
msgid "edit current diff and apply"
msgstr ""
-#: builtin/add.c:325
+#: builtin/add.c:283
msgid "allow adding otherwise ignored files"
msgstr ""
-#: builtin/add.c:326
+#: builtin/add.c:284
msgid "update tracked files"
msgstr ""
-#: builtin/add.c:327
+#: builtin/add.c:285
msgid "record only the fact that the path will be added later"
msgstr ""
-#: builtin/add.c:328
+#: builtin/add.c:286
msgid "add changes from all tracked and untracked files"
msgstr ""
-#: builtin/add.c:329
+#: builtin/add.c:287
msgid "don't add, only refresh the index"
msgstr ""
-#: builtin/add.c:330
+#: builtin/add.c:288
msgid "just skip files which cannot be added because of errors"
msgstr ""
-#: builtin/add.c:331
+#: builtin/add.c:289
msgid "check if - even missing - files are ignored in dry run"
msgstr ""
-#: builtin/add.c:353
+#: builtin/add.c:311
#, c-format
msgid "Use -f if you really want to add them.\n"
msgstr ""
-#: builtin/add.c:354
+#: builtin/add.c:312
msgid "no files added"
msgstr ""
-#: builtin/add.c:360
+#: builtin/add.c:318
msgid "adding files failed"
msgstr ""
-#: builtin/add.c:392
+#.
+#. * To be consistent with "git add -p" and most Git
+#. * commands, we should default to being tree-wide, but
+#. * this is not the original behavior and can't be
+#. * changed until users trained themselves not to type
+#. * "git add -u" or "git add -A". For now, we warn and
+#. * keep the old behavior. Later, this warning can be
+#. * turned into a die(...), and eventually we may
+#. * reallow the command with a new behavior.
+#.
+#: builtin/add.c:335
+#, c-format
+msgid ""
+"The behavior of 'git add %s (or %s)' with no path argument from a\n"
+"subdirectory of the tree will change in Git 2.0 and should not be used "
+"anymore.\n"
+"To add content for the whole tree, run:\n"
+"\n"
+" git add %s :/\n"
+" (or git add %s :/)\n"
+"\n"
+"To restrict the command to the current directory, run:\n"
+"\n"
+" git add %s .\n"
+" (or git add %s .)\n"
+"\n"
+"With the current Git version, the command is restricted to the current "
+"directory."
+msgstr ""
+
+#: builtin/add.c:381
msgid "-A and -u are mutually incompatible"
msgstr ""
-#: builtin/add.c:394
+#: builtin/add.c:383
msgid "Option --ignore-missing can only be used together with --dry-run"
msgstr ""
@@ -1474,12 +1548,12 @@ msgstr ""
msgid "Maybe you wanted to say 'git add .'?\n"
msgstr ""
-#: builtin/add.c:421 builtin/clean.c:203 builtin/commit.c:291 builtin/mv.c:82
-#: builtin/rm.c:235
+#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204
+#: builtin/commit.c:291 builtin/mv.c:82 builtin/rm.c:235
msgid "index file corrupt"
msgstr ""
-#: builtin/add.c:481 builtin/apply.c:4461 builtin/mv.c:229 builtin/rm.c:370
+#: builtin/add.c:481 builtin/apply.c:4501 builtin/mv.c:229 builtin/rm.c:370
msgid "Unable to write new index file"
msgstr ""
@@ -1532,17 +1606,17 @@ msgstr ""
msgid "git apply: bad git-diff - expected /dev/null on line %d"
msgstr ""
-#: builtin/apply.c:1420
+#: builtin/apply.c:1422
#, c-format
msgid "recount: unexpected line: %.*s"
msgstr ""
-#: builtin/apply.c:1477
+#: builtin/apply.c:1479
#, c-format
msgid "patch fragment without header at line %d: %.*s"
msgstr ""
-#: builtin/apply.c:1494
+#: builtin/apply.c:1496
#, c-format
msgid ""
"git diff header lacks filename information when removing %d leading pathname "
@@ -1553,396 +1627,396 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: builtin/apply.c:1654
+#: builtin/apply.c:1656
msgid "new file depends on old contents"
msgstr ""
-#: builtin/apply.c:1656
+#: builtin/apply.c:1658
msgid "deleted file still has contents"
msgstr ""
-#: builtin/apply.c:1682
+#: builtin/apply.c:1684
#, c-format
msgid "corrupt patch at line %d"
msgstr ""
-#: builtin/apply.c:1718
+#: builtin/apply.c:1720
#, c-format
msgid "new file %s depends on old contents"
msgstr ""
-#: builtin/apply.c:1720
+#: builtin/apply.c:1722
#, c-format
msgid "deleted file %s still has contents"
msgstr ""
-#: builtin/apply.c:1723
+#: builtin/apply.c:1725
#, c-format
msgid "** warning: file %s becomes empty but is not deleted"
msgstr ""
-#: builtin/apply.c:1869
+#: builtin/apply.c:1871
#, c-format
msgid "corrupt binary patch at line %d: %.*s"
msgstr ""
#. there has to be one hunk (forward hunk)
-#: builtin/apply.c:1898
+#: builtin/apply.c:1900
#, c-format
msgid "unrecognized binary patch at line %d"
msgstr ""
-#: builtin/apply.c:1984
+#: builtin/apply.c:1986
#, c-format
msgid "patch with only garbage at line %d"
msgstr ""
-#: builtin/apply.c:2074
+#: builtin/apply.c:2076
#, c-format
msgid "unable to read symlink %s"
msgstr ""
-#: builtin/apply.c:2078
+#: builtin/apply.c:2080
#, c-format
msgid "unable to open or read %s"
msgstr ""
-#: builtin/apply.c:2682
+#: builtin/apply.c:2684
#, c-format
msgid "invalid start of line: '%c'"
msgstr ""
-#: builtin/apply.c:2800
+#: builtin/apply.c:2802
#, c-format
msgid "Hunk #%d succeeded at %d (offset %d line)."
msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
msgstr[0] ""
msgstr[1] ""
-#: builtin/apply.c:2812
+#: builtin/apply.c:2814
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr ""
-#: builtin/apply.c:2818
+#: builtin/apply.c:2820
#, c-format
msgid ""
"while searching for:\n"
"%.*s"
msgstr ""
-#: builtin/apply.c:2837
+#: builtin/apply.c:2839
#, c-format
msgid "missing binary patch data for '%s'"
msgstr ""
-#: builtin/apply.c:2940
+#: builtin/apply.c:2942
#, c-format
msgid "binary patch does not apply to '%s'"
msgstr ""
-#: builtin/apply.c:2946
+#: builtin/apply.c:2948
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr ""
-#: builtin/apply.c:2967
+#: builtin/apply.c:2969
#, c-format
msgid "patch failed: %s:%ld"
msgstr ""
-#: builtin/apply.c:3089
+#: builtin/apply.c:3091
#, c-format
msgid "cannot checkout %s"
msgstr ""
-#: builtin/apply.c:3134 builtin/apply.c:3143 builtin/apply.c:3187
+#: builtin/apply.c:3136 builtin/apply.c:3145 builtin/apply.c:3189
#, c-format
msgid "read of %s failed"
msgstr ""
-#: builtin/apply.c:3167 builtin/apply.c:3389
+#: builtin/apply.c:3169 builtin/apply.c:3391
#, c-format
msgid "path %s has been renamed/deleted"
msgstr ""
-#: builtin/apply.c:3248 builtin/apply.c:3403
+#: builtin/apply.c:3250 builtin/apply.c:3405
#, c-format
msgid "%s: does not exist in index"
msgstr ""
-#: builtin/apply.c:3252 builtin/apply.c:3395 builtin/apply.c:3417
+#: builtin/apply.c:3254 builtin/apply.c:3397 builtin/apply.c:3419
#, c-format
msgid "%s: %s"
msgstr ""
-#: builtin/apply.c:3257 builtin/apply.c:3411
+#: builtin/apply.c:3259 builtin/apply.c:3413
#, c-format
msgid "%s: does not match index"
msgstr ""
-#: builtin/apply.c:3359
+#: builtin/apply.c:3361
msgid "removal patch leaves file contents"
msgstr ""
-#: builtin/apply.c:3428
+#: builtin/apply.c:3430
#, c-format
msgid "%s: wrong type"
msgstr ""
-#: builtin/apply.c:3430
+#: builtin/apply.c:3432
#, c-format
msgid "%s has type %o, expected %o"
msgstr ""
-#: builtin/apply.c:3531
+#: builtin/apply.c:3533
#, c-format
msgid "%s: already exists in index"
msgstr ""
-#: builtin/apply.c:3534
+#: builtin/apply.c:3536
#, c-format
msgid "%s: already exists in working directory"
msgstr ""
-#: builtin/apply.c:3554
+#: builtin/apply.c:3556
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o)"
msgstr ""
-#: builtin/apply.c:3559
+#: builtin/apply.c:3561
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o) of %s"
msgstr ""
-#: builtin/apply.c:3567
+#: builtin/apply.c:3569
#, c-format
msgid "%s: patch does not apply"
msgstr ""
-#: builtin/apply.c:3580
+#: builtin/apply.c:3582
#, c-format
msgid "Checking patch %s..."
msgstr ""
-#: builtin/apply.c:3635 builtin/checkout.c:215 builtin/reset.c:124
+#: builtin/apply.c:3675 builtin/checkout.c:215 builtin/reset.c:124
#, c-format
msgid "make_cache_entry failed for path '%s'"
msgstr ""
-#: builtin/apply.c:3778
+#: builtin/apply.c:3818
#, c-format
msgid "unable to remove %s from index"
msgstr ""
-#: builtin/apply.c:3806
+#: builtin/apply.c:3846
#, c-format
msgid "corrupt patch for subproject %s"
msgstr ""
-#: builtin/apply.c:3810
+#: builtin/apply.c:3850
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr ""
-#: builtin/apply.c:3815
+#: builtin/apply.c:3855
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr ""
-#: builtin/apply.c:3818 builtin/apply.c:3926
+#: builtin/apply.c:3858 builtin/apply.c:3966
#, c-format
msgid "unable to add cache entry for %s"
msgstr ""
-#: builtin/apply.c:3851
+#: builtin/apply.c:3891
#, c-format
msgid "closing file '%s'"
msgstr ""
-#: builtin/apply.c:3900
+#: builtin/apply.c:3940
#, c-format
msgid "unable to write file '%s' mode %o"
msgstr ""
-#: builtin/apply.c:3987
+#: builtin/apply.c:4027
#, c-format
msgid "Applied patch %s cleanly."
msgstr ""
-#: builtin/apply.c:3995
+#: builtin/apply.c:4035
msgid "internal error"
msgstr ""
#. Say this even without --verbose
-#: builtin/apply.c:3998
+#: builtin/apply.c:4038
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
msgstr[0] ""
msgstr[1] ""
-#: builtin/apply.c:4008
+#: builtin/apply.c:4048
#, c-format
msgid "truncating .rej filename to %.*s.rej"
msgstr ""
-#: builtin/apply.c:4029
+#: builtin/apply.c:4069
#, c-format
msgid "Hunk #%d applied cleanly."
msgstr ""
-#: builtin/apply.c:4032
+#: builtin/apply.c:4072
#, c-format
msgid "Rejected hunk #%d."
msgstr ""
-#: builtin/apply.c:4182
+#: builtin/apply.c:4222
msgid "unrecognized input"
msgstr ""
-#: builtin/apply.c:4193
+#: builtin/apply.c:4233
msgid "unable to read index file"
msgstr ""
-#: builtin/apply.c:4312 builtin/apply.c:4315 builtin/clone.c:91
+#: builtin/apply.c:4352 builtin/apply.c:4355 builtin/clone.c:91
#: builtin/fetch.c:63
msgid "path"
msgstr ""
-#: builtin/apply.c:4313
+#: builtin/apply.c:4353
msgid "don't apply changes matching the given path"
msgstr ""
-#: builtin/apply.c:4316
+#: builtin/apply.c:4356
msgid "apply changes matching the given path"
msgstr ""
-#: builtin/apply.c:4318
+#: builtin/apply.c:4358
msgid "num"
msgstr ""
-#: builtin/apply.c:4319
+#: builtin/apply.c:4359
msgid "remove <num> leading slashes from traditional diff paths"
msgstr ""
-#: builtin/apply.c:4322
+#: builtin/apply.c:4362
msgid "ignore additions made by the patch"
msgstr ""
-#: builtin/apply.c:4324
+#: builtin/apply.c:4364
msgid "instead of applying the patch, output diffstat for the input"
msgstr ""
-#: builtin/apply.c:4328
+#: builtin/apply.c:4368
msgid "show number of added and deleted lines in decimal notation"
msgstr ""
-#: builtin/apply.c:4330
+#: builtin/apply.c:4370
msgid "instead of applying the patch, output a summary for the input"
msgstr ""
-#: builtin/apply.c:4332
+#: builtin/apply.c:4372
msgid "instead of applying the patch, see if the patch is applicable"
msgstr ""
-#: builtin/apply.c:4334
+#: builtin/apply.c:4374
msgid "make sure the patch is applicable to the current index"
msgstr ""
-#: builtin/apply.c:4336
+#: builtin/apply.c:4376
msgid "apply a patch without touching the working tree"
msgstr ""
-#: builtin/apply.c:4338
+#: builtin/apply.c:4378
msgid "also apply the patch (use with --stat/--summary/--check)"
msgstr ""
-#: builtin/apply.c:4340
+#: builtin/apply.c:4380
msgid "attempt three-way merge if a patch does not apply"
msgstr ""
-#: builtin/apply.c:4342
+#: builtin/apply.c:4382
msgid "build a temporary index based on embedded index information"
msgstr ""
-#: builtin/apply.c:4344 builtin/checkout-index.c:197 builtin/ls-files.c:460
+#: builtin/apply.c:4384 builtin/checkout-index.c:197 builtin/ls-files.c:463
msgid "paths are separated with NUL character"
msgstr ""
-#: builtin/apply.c:4347
+#: builtin/apply.c:4387
msgid "ensure at least <n> lines of context match"
msgstr ""
-#: builtin/apply.c:4348
+#: builtin/apply.c:4388
msgid "action"
msgstr ""
-#: builtin/apply.c:4349
+#: builtin/apply.c:4389
msgid "detect new or modified lines that have whitespace errors"
msgstr ""
-#: builtin/apply.c:4352 builtin/apply.c:4355
+#: builtin/apply.c:4392 builtin/apply.c:4395
msgid "ignore changes in whitespace when finding context"
msgstr ""
-#: builtin/apply.c:4358
+#: builtin/apply.c:4398
msgid "apply the patch in reverse"
msgstr ""
-#: builtin/apply.c:4360
+#: builtin/apply.c:4400
msgid "don't expect at least one line of context"
msgstr ""
-#: builtin/apply.c:4362
+#: builtin/apply.c:4402
msgid "leave the rejected hunks in corresponding *.rej files"
msgstr ""
-#: builtin/apply.c:4364
+#: builtin/apply.c:4404
msgid "allow overlapping hunks"
msgstr ""
-#: builtin/apply.c:4367
+#: builtin/apply.c:4407
msgid "tolerate incorrectly detected missing new-line at the end of file"
msgstr ""
-#: builtin/apply.c:4370
+#: builtin/apply.c:4410
msgid "do not trust the line counts in the hunk headers"
msgstr ""
-#: builtin/apply.c:4372
+#: builtin/apply.c:4412
msgid "root"
msgstr ""
-#: builtin/apply.c:4373
+#: builtin/apply.c:4413
msgid "prepend <root> to all filenames"
msgstr ""
-#: builtin/apply.c:4395
+#: builtin/apply.c:4435
msgid "--3way outside a repository"
msgstr ""
-#: builtin/apply.c:4403
+#: builtin/apply.c:4443
msgid "--index outside a repository"
msgstr ""
-#: builtin/apply.c:4406
+#: builtin/apply.c:4446
msgid "--cached outside a repository"
msgstr ""
-#: builtin/apply.c:4422
+#: builtin/apply.c:4462
#, c-format
msgid "can't open patch '%s'"
msgstr ""
-#: builtin/apply.c:4436
+#: builtin/apply.c:4476
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
msgstr[0] ""
msgstr[1] ""
-#: builtin/apply.c:4442 builtin/apply.c:4452
+#: builtin/apply.c:4482 builtin/apply.c:4492
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
@@ -2004,95 +2078,95 @@ msgstr ""
msgid "[rev-opts] are documented in git-rev-list(1)"
msgstr ""
-#: builtin/blame.c:2364
+#: builtin/blame.c:2350
msgid "Show blame entries as we find them, incrementally"
msgstr ""
-#: builtin/blame.c:2365
+#: builtin/blame.c:2351
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr ""
-#: builtin/blame.c:2366
+#: builtin/blame.c:2352
msgid "Do not treat root commits as boundaries (Default: off)"
msgstr ""
-#: builtin/blame.c:2367
+#: builtin/blame.c:2353
msgid "Show work cost statistics"
msgstr ""
-#: builtin/blame.c:2368
+#: builtin/blame.c:2354
msgid "Show output score for blame entries"
msgstr ""
-#: builtin/blame.c:2369
+#: builtin/blame.c:2355
msgid "Show original filename (Default: auto)"
msgstr ""
-#: builtin/blame.c:2370
+#: builtin/blame.c:2356
msgid "Show original linenumber (Default: off)"
msgstr ""
-#: builtin/blame.c:2371
+#: builtin/blame.c:2357
msgid "Show in a format designed for machine consumption"
msgstr ""
-#: builtin/blame.c:2372
+#: builtin/blame.c:2358
msgid "Show porcelain format with per-line commit information"
msgstr ""
-#: builtin/blame.c:2373
+#: builtin/blame.c:2359
msgid "Use the same output mode as git-annotate (Default: off)"
msgstr ""
-#: builtin/blame.c:2374
+#: builtin/blame.c:2360
msgid "Show raw timestamp (Default: off)"
msgstr ""
-#: builtin/blame.c:2375
+#: builtin/blame.c:2361
msgid "Show long commit SHA1 (Default: off)"
msgstr ""
-#: builtin/blame.c:2376
+#: builtin/blame.c:2362
msgid "Suppress author name and timestamp (Default: off)"
msgstr ""
-#: builtin/blame.c:2377
+#: builtin/blame.c:2363
msgid "Show author email instead of name (Default: off)"
msgstr ""
-#: builtin/blame.c:2378
+#: builtin/blame.c:2364
msgid "Ignore whitespace differences"
msgstr ""
-#: builtin/blame.c:2379
+#: builtin/blame.c:2365
msgid "Spend extra cycles to find better match"
msgstr ""
-#: builtin/blame.c:2380
+#: builtin/blame.c:2366
msgid "Use revisions from <file> instead of calling git-rev-list"
msgstr ""
-#: builtin/blame.c:2381
+#: builtin/blame.c:2367
msgid "Use <file>'s contents as the final image"
msgstr ""
-#: builtin/blame.c:2382 builtin/blame.c:2383
+#: builtin/blame.c:2368 builtin/blame.c:2369
msgid "score"
msgstr ""
-#: builtin/blame.c:2382
+#: builtin/blame.c:2368
msgid "Find line copies within and across files"
msgstr ""
-#: builtin/blame.c:2383
+#: builtin/blame.c:2369
msgid "Find line movements within and across files"
msgstr ""
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "n,m"
msgstr ""
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "Process only line range n,m, counting from 1"
msgstr ""
@@ -2220,10 +2294,19 @@ msgstr ""
msgid "[ahead %d, behind %d]"
msgstr ""
+#: builtin/branch.c:469
+msgid " **** invalid ref ****"
+msgstr ""
+
#: builtin/branch.c:560
msgid "(no branch)"
msgstr ""
+#: builtin/branch.c:593
+#, c-format
+msgid "object '%s' does not point to a commit"
+msgstr ""
+
#: builtin/branch.c:625
msgid "some refs could not be read"
msgstr ""
@@ -2294,8 +2377,8 @@ msgid "act on remote-tracking branches"
msgstr ""
#: builtin/branch.c:761 builtin/branch.c:767 builtin/branch.c:788
-#: builtin/branch.c:794 builtin/commit.c:1378 builtin/commit.c:1379
-#: builtin/commit.c:1380 builtin/commit.c:1381 builtin/tag.c:470
+#: builtin/branch.c:794 builtin/commit.c:1366 builtin/commit.c:1367
+#: builtin/commit.c:1368 builtin/commit.c:1369 builtin/tag.c:468
msgid "commit"
msgstr ""
@@ -2363,32 +2446,58 @@ msgstr ""
msgid "HEAD not found below refs/heads!"
msgstr ""
-#: builtin/branch.c:836
+#: builtin/branch.c:839
msgid "--column and --verbose are incompatible"
msgstr ""
-#: builtin/branch.c:887
+#: builtin/branch.c:845
+msgid "branch name required"
+msgstr ""
+
+#: builtin/branch.c:860
+msgid "Cannot give description to detached HEAD"
+msgstr ""
+
+#: builtin/branch.c:865
+msgid "cannot edit description of more than one branch"
+msgstr ""
+
+#: builtin/branch.c:872
+#, c-format
+msgid "No commit on branch '%s' yet."
+msgstr ""
+
+#: builtin/branch.c:875
+#, c-format
+msgid "No branch named '%s'."
+msgstr ""
+
+#: builtin/branch.c:888
+msgid "too many branches for a rename operation"
+msgstr ""
+
+#: builtin/branch.c:893
#, c-format
msgid "branch '%s' does not exist"
msgstr ""
-#: builtin/branch.c:899
+#: builtin/branch.c:905
#, c-format
msgid "Branch '%s' has no upstream information"
msgstr ""
-#: builtin/branch.c:914
+#: builtin/branch.c:920
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
msgstr ""
-#: builtin/branch.c:917
+#: builtin/branch.c:923
#, c-format
msgid ""
"The --set-upstream flag is deprecated and will be removed. Consider using --"
"track or --set-upstream-to\n"
msgstr ""
-#: builtin/branch.c:934
+#: builtin/branch.c:940
#, c-format
msgid ""
"\n"
@@ -2396,12 +2505,12 @@ msgid ""
"\n"
msgstr ""
-#: builtin/branch.c:935
+#: builtin/branch.c:941
#, c-format
msgid " git branch -d %s\n"
msgstr ""
-#: builtin/branch.c:936
+#: builtin/branch.c:942
#, c-format
msgid " git branch --set-upstream-to %s\n"
msgstr ""
@@ -2475,14 +2584,38 @@ msgstr ""
msgid "use .gitattributes only from the index"
msgstr ""
-#: builtin/check-attr.c:21 builtin/hash-object.c:75
+#: builtin/check-attr.c:21 builtin/check-ignore.c:22 builtin/hash-object.c:75
msgid "read file names from stdin"
msgstr ""
-#: builtin/check-attr.c:23
+#: builtin/check-attr.c:23 builtin/check-ignore.c:24
msgid "input paths are terminated by a null character"
msgstr ""
+#: builtin/check-ignore.c:18 builtin/checkout.c:1012 builtin/gc.c:177
+msgid "suppress progress reporting"
+msgstr ""
+
+#: builtin/check-ignore.c:151
+msgid "cannot specify pathnames with --stdin"
+msgstr ""
+
+#: builtin/check-ignore.c:154
+msgid "-z only makes sense with --stdin"
+msgstr ""
+
+#: builtin/check-ignore.c:156
+msgid "no path specified"
+msgstr ""
+
+#: builtin/check-ignore.c:160
+msgid "--quiet is only valid with a single pathname"
+msgstr ""
+
+#: builtin/check-ignore.c:162
+msgid "cannot have both --quiet and --verbose"
+msgstr ""
+
#: builtin/checkout-index.c:126
msgid "git checkout-index [options] [--] [<file>...]"
msgstr ""
@@ -2703,10 +2836,6 @@ msgstr ""
msgid "Cannot switch branch to a non-commit '%s'"
msgstr ""
-#: builtin/checkout.c:1012 builtin/gc.c:177
-msgid "suppress progress reporting"
-msgstr ""
-
#: builtin/checkout.c:1013 builtin/checkout.c:1015 builtin/clone.c:89
#: builtin/remote.c:169 builtin/remote.c:171
msgid "branch"
@@ -2835,45 +2964,45 @@ msgstr ""
msgid "failed to remove %s"
msgstr ""
-#: builtin/clean.c:159
+#: builtin/clean.c:160
msgid "do not print names of files removed"
msgstr ""
-#: builtin/clean.c:161
+#: builtin/clean.c:162
msgid "force"
msgstr ""
-#: builtin/clean.c:163
+#: builtin/clean.c:164
msgid "remove whole directories"
msgstr ""
-#: builtin/clean.c:164 builtin/describe.c:413 builtin/grep.c:717
-#: builtin/ls-files.c:491 builtin/name-rev.c:231 builtin/show-ref.c:182
+#: builtin/clean.c:165 builtin/describe.c:413 builtin/grep.c:717
+#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182
msgid "pattern"
msgstr ""
-#: builtin/clean.c:165
+#: builtin/clean.c:166
msgid "add <pattern> to ignore rules"
msgstr ""
-#: builtin/clean.c:166
+#: builtin/clean.c:167
msgid "remove ignored files, too"
msgstr ""
-#: builtin/clean.c:168
+#: builtin/clean.c:169
msgid "remove only ignored files"
msgstr ""
-#: builtin/clean.c:186
+#: builtin/clean.c:187
msgid "-x and -X cannot be used together"
msgstr ""
-#: builtin/clean.c:190
+#: builtin/clean.c:191
msgid ""
"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
msgstr ""
-#: builtin/clean.c:193
+#: builtin/clean.c:194
msgid ""
"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
"clean"
@@ -2884,7 +3013,7 @@ msgid "git clone [options] [--] <repo> [<dir>]"
msgstr ""
#: builtin/clone.c:64 builtin/fetch.c:82 builtin/merge.c:212
-#: builtin/push.c:407
+#: builtin/push.c:436
msgid "force progress reporting"
msgstr ""
@@ -2997,11 +3126,6 @@ msgstr ""
msgid "failed to stat %s\n"
msgstr ""
-#: builtin/clone.c:341
-#, c-format
-msgid "failed to unlink '%s'"
-msgstr ""
-
#: builtin/clone.c:346
#, c-format
msgid "failed to create link '%s'"
@@ -3062,7 +3186,7 @@ msgstr ""
msgid "working tree '%s' already exists."
msgstr ""
-#: builtin/clone.c:759 builtin/clone.c:773
+#: builtin/clone.c:759 builtin/clone.c:771
#, c-format
msgid "could not create leading directories of '%s'"
msgstr ""
@@ -3072,27 +3196,27 @@ msgstr ""
msgid "could not create work tree dir '%s'."
msgstr ""
-#: builtin/clone.c:783
+#: builtin/clone.c:781
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr ""
-#: builtin/clone.c:785
+#: builtin/clone.c:783
#, c-format
msgid "Cloning into '%s'...\n"
msgstr ""
-#: builtin/clone.c:827
+#: builtin/clone.c:818
#, c-format
msgid "Don't know how to clone %s"
msgstr ""
-#: builtin/clone.c:876
+#: builtin/clone.c:867
#, c-format
msgid "Remote branch %s not found in upstream %s"
msgstr ""
-#: builtin/clone.c:883
+#: builtin/clone.c:874
msgid "You appear to have cloned an empty repository."
msgstr ""
@@ -3129,11 +3253,11 @@ msgid "--command must be the first argument"
msgstr ""
#: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
+msgid "git commit [options] [--] <pathspec>..."
msgstr ""
#: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
+msgid "git status [options] [--] <pathspec>..."
msgstr ""
#: builtin/commit.c:44
@@ -3274,15 +3398,17 @@ msgid ""
msgstr ""
#: builtin/commit.c:735
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be ignored, and an empty message aborts the commit.\n"
+"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
#: builtin/commit.c:740
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be kept; you may remove them yourself if you want to.\n"
+"with '%c' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
@@ -3304,7 +3430,7 @@ msgstr ""
msgid "Error building trees"
msgstr ""
-#: builtin/commit.c:832 builtin/tag.c:361
+#: builtin/commit.c:832 builtin/tag.c:359
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr ""
@@ -3314,323 +3440,323 @@ msgstr ""
msgid "No existing author found with '%s'"
msgstr ""
-#: builtin/commit.c:944 builtin/commit.c:1148
+#: builtin/commit.c:944 builtin/commit.c:1138
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr ""
-#: builtin/commit.c:984
+#: builtin/commit.c:974
msgid "Using both --reset-author and --author does not make sense"
msgstr ""
-#: builtin/commit.c:995
+#: builtin/commit.c:985
msgid "You have nothing to amend."
msgstr ""
-#: builtin/commit.c:998
+#: builtin/commit.c:988
msgid "You are in the middle of a merge -- cannot amend."
msgstr ""
-#: builtin/commit.c:1000
+#: builtin/commit.c:990
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr ""
-#: builtin/commit.c:1003
+#: builtin/commit.c:993
msgid "Options --squash and --fixup cannot be used together"
msgstr ""
-#: builtin/commit.c:1013
+#: builtin/commit.c:1003
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr ""
-#: builtin/commit.c:1015
+#: builtin/commit.c:1005
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr ""
-#: builtin/commit.c:1023
+#: builtin/commit.c:1013
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr ""
-#: builtin/commit.c:1040
+#: builtin/commit.c:1030
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr ""
-#: builtin/commit.c:1042
+#: builtin/commit.c:1032
msgid "No paths with --include/--only does not make sense."
msgstr ""
-#: builtin/commit.c:1044
+#: builtin/commit.c:1034
msgid "Clever... amending the last one with dirty index."
msgstr ""
-#: builtin/commit.c:1046
+#: builtin/commit.c:1036
msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
msgstr ""
-#: builtin/commit.c:1056 builtin/tag.c:577
+#: builtin/commit.c:1046 builtin/tag.c:575
#, c-format
msgid "Invalid cleanup mode %s"
msgstr ""
-#: builtin/commit.c:1061
+#: builtin/commit.c:1051
msgid "Paths with -a does not make sense."
msgstr ""
-#: builtin/commit.c:1067 builtin/commit.c:1202
+#: builtin/commit.c:1057 builtin/commit.c:1192
msgid "--long and -z are incompatible"
msgstr ""
-#: builtin/commit.c:1162 builtin/commit.c:1400
+#: builtin/commit.c:1152 builtin/commit.c:1388
msgid "show status concisely"
msgstr ""
-#: builtin/commit.c:1164 builtin/commit.c:1402
+#: builtin/commit.c:1154 builtin/commit.c:1390
msgid "show branch information"
msgstr ""
-#: builtin/commit.c:1166 builtin/commit.c:1404 builtin/push.c:397
+#: builtin/commit.c:1156 builtin/commit.c:1392 builtin/push.c:426
msgid "machine-readable output"
msgstr ""
-#: builtin/commit.c:1169 builtin/commit.c:1406
+#: builtin/commit.c:1159 builtin/commit.c:1394
msgid "show status in long format (default)"
msgstr ""
-#: builtin/commit.c:1172 builtin/commit.c:1409
+#: builtin/commit.c:1162 builtin/commit.c:1397
msgid "terminate entries with NUL"
msgstr ""
-#: builtin/commit.c:1174 builtin/commit.c:1412 builtin/fast-export.c:647
-#: builtin/fast-export.c:650 builtin/tag.c:461
+#: builtin/commit.c:1164 builtin/commit.c:1400 builtin/fast-export.c:647
+#: builtin/fast-export.c:650 builtin/tag.c:459
msgid "mode"
msgstr ""
-#: builtin/commit.c:1175 builtin/commit.c:1412
+#: builtin/commit.c:1165 builtin/commit.c:1400
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
-#: builtin/commit.c:1178
+#: builtin/commit.c:1168
msgid "show ignored files"
msgstr ""
-#: builtin/commit.c:1179 parse-options.h:151
+#: builtin/commit.c:1169 parse-options.h:151
msgid "when"
msgstr ""
-#: builtin/commit.c:1180
+#: builtin/commit.c:1170
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
msgstr ""
-#: builtin/commit.c:1182
+#: builtin/commit.c:1172
msgid "list untracked files in columns"
msgstr ""
-#: builtin/commit.c:1256
+#: builtin/commit.c:1246
msgid "couldn't look up newly created commit"
msgstr ""
-#: builtin/commit.c:1258
+#: builtin/commit.c:1248
msgid "could not parse newly created commit"
msgstr ""
-#: builtin/commit.c:1299
+#: builtin/commit.c:1289
msgid "detached HEAD"
msgstr ""
-#: builtin/commit.c:1301
+#: builtin/commit.c:1291
msgid " (root-commit)"
msgstr ""
-#: builtin/commit.c:1370
+#: builtin/commit.c:1358
msgid "suppress summary after successful commit"
msgstr ""
-#: builtin/commit.c:1371
+#: builtin/commit.c:1359
msgid "show diff in commit message template"
msgstr ""
-#: builtin/commit.c:1373
+#: builtin/commit.c:1361
msgid "Commit message options"
msgstr ""
-#: builtin/commit.c:1374 builtin/tag.c:459
+#: builtin/commit.c:1362 builtin/tag.c:457
msgid "read message from file"
msgstr ""
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "author"
msgstr ""
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "override author for commit"
msgstr ""
-#: builtin/commit.c:1376 builtin/gc.c:178
+#: builtin/commit.c:1364 builtin/gc.c:178
msgid "date"
msgstr ""
-#: builtin/commit.c:1376
+#: builtin/commit.c:1364
msgid "override date for commit"
msgstr ""
-#: builtin/commit.c:1377 builtin/merge.c:206 builtin/notes.c:537
-#: builtin/notes.c:694 builtin/tag.c:457
+#: builtin/commit.c:1365 builtin/merge.c:206 builtin/notes.c:533
+#: builtin/notes.c:690 builtin/tag.c:455
msgid "message"
msgstr ""
-#: builtin/commit.c:1377
+#: builtin/commit.c:1365
msgid "commit message"
msgstr ""
-#: builtin/commit.c:1378
+#: builtin/commit.c:1366
msgid "reuse and edit message from specified commit"
msgstr ""
-#: builtin/commit.c:1379
+#: builtin/commit.c:1367
msgid "reuse message from specified commit"
msgstr ""
-#: builtin/commit.c:1380
+#: builtin/commit.c:1368
msgid "use autosquash formatted message to fixup specified commit"
msgstr ""
-#: builtin/commit.c:1381
+#: builtin/commit.c:1369
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
-#: builtin/commit.c:1382
+#: builtin/commit.c:1370
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr ""
-#: builtin/commit.c:1383 builtin/log.c:1102 builtin/revert.c:109
+#: builtin/commit.c:1371 builtin/log.c:1102 builtin/revert.c:109
msgid "add Signed-off-by:"
msgstr ""
-#: builtin/commit.c:1384
+#: builtin/commit.c:1372
msgid "use specified template file"
msgstr ""
-#: builtin/commit.c:1385
+#: builtin/commit.c:1373
msgid "force edit of commit"
msgstr ""
-#: builtin/commit.c:1386
+#: builtin/commit.c:1374
msgid "default"
msgstr ""
-#: builtin/commit.c:1386 builtin/tag.c:462
+#: builtin/commit.c:1374 builtin/tag.c:460
msgid "how to strip spaces and #comments from message"
msgstr ""
-#: builtin/commit.c:1387
+#: builtin/commit.c:1375
msgid "include status in commit message template"
msgstr ""
-#: builtin/commit.c:1388 builtin/merge.c:213 builtin/tag.c:463
+#: builtin/commit.c:1376 builtin/merge.c:213 builtin/tag.c:461
msgid "key id"
msgstr ""
-#: builtin/commit.c:1389 builtin/merge.c:214
+#: builtin/commit.c:1377 builtin/merge.c:214
msgid "GPG sign commit"
msgstr ""
#. end commit message options
-#: builtin/commit.c:1392
+#: builtin/commit.c:1380
msgid "Commit contents options"
msgstr ""
-#: builtin/commit.c:1393
+#: builtin/commit.c:1381
msgid "commit all changed files"
msgstr ""
-#: builtin/commit.c:1394
+#: builtin/commit.c:1382
msgid "add specified files to index for commit"
msgstr ""
-#: builtin/commit.c:1395
+#: builtin/commit.c:1383
msgid "interactively add files"
msgstr ""
-#: builtin/commit.c:1396
+#: builtin/commit.c:1384
msgid "interactively add changes"
msgstr ""
-#: builtin/commit.c:1397
+#: builtin/commit.c:1385
msgid "commit only specified files"
msgstr ""
-#: builtin/commit.c:1398
+#: builtin/commit.c:1386
msgid "bypass pre-commit hook"
msgstr ""
-#: builtin/commit.c:1399
+#: builtin/commit.c:1387
msgid "show what would be committed"
msgstr ""
-#: builtin/commit.c:1410
+#: builtin/commit.c:1398
msgid "amend previous commit"
msgstr ""
-#: builtin/commit.c:1411
+#: builtin/commit.c:1399
msgid "bypass post-rewrite hook"
msgstr ""
-#: builtin/commit.c:1416
+#: builtin/commit.c:1404
msgid "ok to record an empty change"
msgstr ""
-#: builtin/commit.c:1419
+#: builtin/commit.c:1407
msgid "ok to record a change with an empty message"
msgstr ""
-#: builtin/commit.c:1451
+#: builtin/commit.c:1439
msgid "could not parse HEAD commit"
msgstr ""
-#: builtin/commit.c:1489 builtin/merge.c:508
+#: builtin/commit.c:1477 builtin/merge.c:508
#, c-format
msgid "could not open '%s' for reading"
msgstr ""
-#: builtin/commit.c:1496
+#: builtin/commit.c:1484
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr ""
-#: builtin/commit.c:1503
+#: builtin/commit.c:1491
msgid "could not read MERGE_MODE"
msgstr ""
-#: builtin/commit.c:1522
+#: builtin/commit.c:1510
#, c-format
msgid "could not read commit message: %s"
msgstr ""
-#: builtin/commit.c:1536
+#: builtin/commit.c:1524
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr ""
-#: builtin/commit.c:1541
+#: builtin/commit.c:1529
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr ""
-#: builtin/commit.c:1556 builtin/merge.c:833 builtin/merge.c:858
+#: builtin/commit.c:1544 builtin/merge.c:832 builtin/merge.c:857
msgid "failed to write commit object"
msgstr ""
-#: builtin/commit.c:1577
+#: builtin/commit.c:1565
msgid "cannot lock HEAD ref"
msgstr ""
-#: builtin/commit.c:1581
+#: builtin/commit.c:1569
msgid "cannot update HEAD ref"
msgstr ""
-#: builtin/commit.c:1592
+#: builtin/commit.c:1580
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
@@ -4029,166 +4155,178 @@ msgstr ""
msgid "deepen history of shallow clone"
msgstr ""
-#: builtin/fetch.c:85 builtin/log.c:1119
+#: builtin/fetch.c:86
+msgid "convert to a complete repository"
+msgstr ""
+
+#: builtin/fetch.c:88 builtin/log.c:1119
msgid "dir"
msgstr ""
-#: builtin/fetch.c:86
+#: builtin/fetch.c:89
msgid "prepend this to submodule path output"
msgstr ""
-#: builtin/fetch.c:89
+#: builtin/fetch.c:92
msgid "default mode for recursion"
msgstr ""
-#: builtin/fetch.c:201
+#: builtin/fetch.c:204
msgid "Couldn't find remote ref HEAD"
msgstr ""
-#: builtin/fetch.c:254
+#: builtin/fetch.c:257
#, c-format
msgid "object %s not found"
msgstr ""
-#: builtin/fetch.c:259
+#: builtin/fetch.c:262
msgid "[up to date]"
msgstr ""
-#: builtin/fetch.c:273
+#: builtin/fetch.c:276
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
msgstr ""
-#: builtin/fetch.c:274 builtin/fetch.c:360
+#: builtin/fetch.c:277 builtin/fetch.c:363
msgid "[rejected]"
msgstr ""
-#: builtin/fetch.c:285
+#: builtin/fetch.c:288
msgid "[tag update]"
msgstr ""
-#: builtin/fetch.c:287 builtin/fetch.c:322 builtin/fetch.c:340
+#: builtin/fetch.c:290 builtin/fetch.c:325 builtin/fetch.c:343
msgid " (unable to update local ref)"
msgstr ""
-#: builtin/fetch.c:305
+#: builtin/fetch.c:308
msgid "[new tag]"
msgstr ""
-#: builtin/fetch.c:308
+#: builtin/fetch.c:311
msgid "[new branch]"
msgstr ""
-#: builtin/fetch.c:311
+#: builtin/fetch.c:314
msgid "[new ref]"
msgstr ""
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "unable to update local ref"
msgstr ""
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "forced update"
msgstr ""
-#: builtin/fetch.c:362
+#: builtin/fetch.c:365
msgid "(non-fast-forward)"
msgstr ""
-#: builtin/fetch.c:393 builtin/fetch.c:685
+#: builtin/fetch.c:396 builtin/fetch.c:688
#, c-format
msgid "cannot open %s: %s\n"
msgstr ""
-#: builtin/fetch.c:402
+#: builtin/fetch.c:405
#, c-format
msgid "%s did not send all necessary objects\n"
msgstr ""
-#: builtin/fetch.c:488
+#: builtin/fetch.c:491
#, c-format
msgid "From %.*s\n"
msgstr ""
-#: builtin/fetch.c:499
+#: builtin/fetch.c:502
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting branches"
msgstr ""
-#: builtin/fetch.c:549
+#: builtin/fetch.c:552
#, c-format
msgid " (%s will become dangling)"
msgstr ""
-#: builtin/fetch.c:550
+#: builtin/fetch.c:553
#, c-format
msgid " (%s has become dangling)"
msgstr ""
-#: builtin/fetch.c:557
+#: builtin/fetch.c:560
msgid "[deleted]"
msgstr ""
-#: builtin/fetch.c:558 builtin/remote.c:1055
+#: builtin/fetch.c:561 builtin/remote.c:1055
msgid "(none)"
msgstr ""
-#: builtin/fetch.c:675
+#: builtin/fetch.c:678
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
msgstr ""
-#: builtin/fetch.c:709
+#: builtin/fetch.c:712
#, c-format
msgid "Don't know how to fetch from %s"
msgstr ""
-#: builtin/fetch.c:786
+#: builtin/fetch.c:789
#, c-format
msgid "Option \"%s\" value \"%s\" is not valid for %s"
msgstr ""
-#: builtin/fetch.c:789
+#: builtin/fetch.c:792
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
msgstr ""
-#: builtin/fetch.c:891
+#: builtin/fetch.c:894
#, c-format
msgid "Fetching %s\n"
msgstr ""
-#: builtin/fetch.c:893 builtin/remote.c:100
+#: builtin/fetch.c:896 builtin/remote.c:100
#, c-format
msgid "Could not fetch %s"
msgstr ""
-#: builtin/fetch.c:912
+#: builtin/fetch.c:915
msgid ""
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
msgstr ""
-#: builtin/fetch.c:932
+#: builtin/fetch.c:935
msgid "You need to specify a tag name."
msgstr ""
-#: builtin/fetch.c:984
+#: builtin/fetch.c:981
+msgid "--depth and --unshallow cannot be used together"
+msgstr ""
+
+#: builtin/fetch.c:983
+msgid "--unshallow on a complete repository does not make sense"
+msgstr ""
+
+#: builtin/fetch.c:1002
msgid "fetch --all does not take a repository argument"
msgstr ""
-#: builtin/fetch.c:986
+#: builtin/fetch.c:1004
msgid "fetch --all does not make sense with refspecs"
msgstr ""
-#: builtin/fetch.c:997
+#: builtin/fetch.c:1015
#, c-format
msgid "No such remote or remote group: %s"
msgstr ""
-#: builtin/fetch.c:1005
+#: builtin/fetch.c:1023
msgid "Fetching a group and specifying refspecs does not make sense"
msgstr ""
@@ -4198,7 +4336,7 @@ msgstr ""
#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701
#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175
-#: builtin/tag.c:448 parse-options.h:133 parse-options.h:239
+#: builtin/tag.c:446 parse-options.h:133 parse-options.h:239
msgid "n"
msgstr ""
@@ -4555,23 +4693,23 @@ msgstr ""
msgid "bad object %s"
msgstr ""
-#: builtin/grep.c:866
+#: builtin/grep.c:868
msgid "--open-files-in-pager only works on the worktree"
msgstr ""
-#: builtin/grep.c:889
+#: builtin/grep.c:891
msgid "--cached or --untracked cannot be used with --no-index."
msgstr ""
-#: builtin/grep.c:894
+#: builtin/grep.c:896
msgid "--no-index or --untracked cannot be used with revs."
msgstr ""
-#: builtin/grep.c:897
+#: builtin/grep.c:899
msgid "--[no-]exclude-standard cannot be used for tracked contents."
msgstr ""
-#: builtin/grep.c:905
+#: builtin/grep.c:907
msgid "both --cached and trees are given."
msgstr ""
@@ -4609,86 +4747,82 @@ msgstr ""
msgid "process file as it were from this path"
msgstr ""
-#: builtin/help.c:43
+#: builtin/help.c:42
msgid "print all available commands"
msgstr ""
-#: builtin/help.c:44
+#: builtin/help.c:43
msgid "show man page"
msgstr ""
-#: builtin/help.c:45
+#: builtin/help.c:44
msgid "show manual in web browser"
msgstr ""
-#: builtin/help.c:47
+#: builtin/help.c:46
msgid "show info page"
msgstr ""
-#: builtin/help.c:53
+#: builtin/help.c:52
msgid "git help [--all] [--man|--web|--info] [command]"
msgstr ""
-#: builtin/help.c:65
+#: builtin/help.c:64
#, c-format
msgid "unrecognized help format '%s'"
msgstr ""
-#: builtin/help.c:93
+#: builtin/help.c:92
msgid "Failed to start emacsclient."
msgstr ""
-#: builtin/help.c:106
+#: builtin/help.c:105
msgid "Failed to parse emacsclient version."
msgstr ""
-#: builtin/help.c:114
+#: builtin/help.c:113
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
msgstr ""
-#: builtin/help.c:132 builtin/help.c:160 builtin/help.c:169 builtin/help.c:177
+#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176
#, c-format
msgid "failed to exec '%s': %s"
msgstr ""
-#: builtin/help.c:217
+#: builtin/help.c:216
#, c-format
msgid ""
"'%s': path for unsupported man viewer.\n"
"Please consider using 'man.<tool>.cmd' instead."
msgstr ""
-#: builtin/help.c:229
+#: builtin/help.c:228
#, c-format
msgid ""
"'%s': cmd for supported man viewer.\n"
"Please consider using 'man.<tool>.path' instead."
msgstr ""
-#: builtin/help.c:299
-msgid "The most commonly used git commands are:"
-msgstr ""
-
-#: builtin/help.c:367
+#: builtin/help.c:349
#, c-format
msgid "'%s': unknown man viewer."
msgstr ""
-#: builtin/help.c:384
+#: builtin/help.c:366
msgid "no man viewer handled the request"
msgstr ""
-#: builtin/help.c:392
+#: builtin/help.c:374
msgid "no info viewer handled the request"
msgstr ""
-#: builtin/help.c:447 builtin/help.c:454
+#: builtin/help.c:429 builtin/help.c:436
#, c-format
msgid "usage: %s%s"
msgstr ""
-#: builtin/help.c:470
+#: builtin/help.c:452
#, c-format
msgid "`git %s' is aliased to `%s'"
msgstr ""
@@ -5088,8 +5222,8 @@ msgstr ""
#: builtin/init-db.c:467
msgid ""
-"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared"
-"[=<permissions>]] [directory]"
+"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--"
+"shared[=<permissions>]] [directory]"
msgstr ""
#: builtin/init-db.c:490
@@ -5380,95 +5514,95 @@ msgstr ""
msgid "Unknown commit %s"
msgstr ""
-#: builtin/ls-files.c:408
+#: builtin/ls-files.c:409
msgid "git ls-files [options] [<file>...]"
msgstr ""
-#: builtin/ls-files.c:463
+#: builtin/ls-files.c:466
msgid "identify the file status with tags"
msgstr ""
-#: builtin/ls-files.c:465
+#: builtin/ls-files.c:468
msgid "use lowercase letters for 'assume unchanged' files"
msgstr ""
-#: builtin/ls-files.c:467
+#: builtin/ls-files.c:470
msgid "show cached files in the output (default)"
msgstr ""
-#: builtin/ls-files.c:469
+#: builtin/ls-files.c:472
msgid "show deleted files in the output"
msgstr ""
-#: builtin/ls-files.c:471
+#: builtin/ls-files.c:474
msgid "show modified files in the output"
msgstr ""
-#: builtin/ls-files.c:473
+#: builtin/ls-files.c:476
msgid "show other files in the output"
msgstr ""
-#: builtin/ls-files.c:475
+#: builtin/ls-files.c:478
msgid "show ignored files in the output"
msgstr ""
-#: builtin/ls-files.c:478
+#: builtin/ls-files.c:481
msgid "show staged contents' object name in the output"
msgstr ""
-#: builtin/ls-files.c:480
+#: builtin/ls-files.c:483
msgid "show files on the filesystem that need to be removed"
msgstr ""
-#: builtin/ls-files.c:482
+#: builtin/ls-files.c:485
msgid "show 'other' directories' name only"
msgstr ""
-#: builtin/ls-files.c:485
+#: builtin/ls-files.c:488
msgid "don't show empty directories"
msgstr ""
-#: builtin/ls-files.c:488
+#: builtin/ls-files.c:491
msgid "show unmerged files in the output"
msgstr ""
-#: builtin/ls-files.c:490
+#: builtin/ls-files.c:493
msgid "show resolve-undo information"
msgstr ""
-#: builtin/ls-files.c:492
+#: builtin/ls-files.c:495
msgid "skip files matching pattern"
msgstr ""
-#: builtin/ls-files.c:495
+#: builtin/ls-files.c:498
msgid "exclude patterns are read from <file>"
msgstr ""
-#: builtin/ls-files.c:498
+#: builtin/ls-files.c:501
msgid "read additional per-directory exclude patterns in <file>"
msgstr ""
-#: builtin/ls-files.c:500
+#: builtin/ls-files.c:503
msgid "add the standard git exclusions"
msgstr ""
-#: builtin/ls-files.c:503
+#: builtin/ls-files.c:506
msgid "make the output relative to the project top directory"
msgstr ""
-#: builtin/ls-files.c:506
+#: builtin/ls-files.c:509
msgid "if any <file> is not in the index, treat this as an error"
msgstr ""
-#: builtin/ls-files.c:507
+#: builtin/ls-files.c:510
msgid "tree-ish"
msgstr ""
-#: builtin/ls-files.c:508
+#: builtin/ls-files.c:511
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr ""
-#: builtin/ls-files.c:510
+#: builtin/ls-files.c:513
msgid "show debugging data"
msgstr ""
@@ -5575,7 +5709,7 @@ msgstr ""
msgid "abort if fast-forward is not possible"
msgstr ""
-#: builtin/merge.c:202 builtin/notes.c:870 builtin/revert.c:112
+#: builtin/merge.c:202 builtin/notes.c:866 builtin/revert.c:112
msgid "strategy"
msgstr ""
@@ -5677,148 +5811,149 @@ msgid "Not committing merge; use 'git commit' to complete the merge.\n"
msgstr ""
#: builtin/merge.c:788
+#, c-format
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"
-"Lines starting with '#' will be ignored, and an empty message aborts\n"
+"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
-#: builtin/merge.c:813
+#: builtin/merge.c:812
msgid "Empty commit message."
msgstr ""
-#: builtin/merge.c:825
+#: builtin/merge.c:824
#, c-format
msgid "Wonderful.\n"
msgstr ""
-#: builtin/merge.c:890
+#: builtin/merge.c:889
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
-#: builtin/merge.c:906
+#: builtin/merge.c:905
#, c-format
msgid "'%s' is not a commit"
msgstr ""
-#: builtin/merge.c:947
+#: builtin/merge.c:946
msgid "No current branch."
msgstr ""
-#: builtin/merge.c:949
+#: builtin/merge.c:948
msgid "No remote for the current branch."
msgstr ""
-#: builtin/merge.c:951
+#: builtin/merge.c:950
msgid "No default upstream defined for the current branch."
msgstr ""
-#: builtin/merge.c:956
+#: builtin/merge.c:955
#, c-format
msgid "No remote tracking branch for %s from %s"
msgstr ""
-#: builtin/merge.c:1043 builtin/merge.c:1200
+#: builtin/merge.c:1042 builtin/merge.c:1199
#, c-format
msgid "%s - not something we can merge"
msgstr ""
-#: builtin/merge.c:1111
+#: builtin/merge.c:1110
msgid "There is no merge to abort (MERGE_HEAD missing)."
msgstr ""
-#: builtin/merge.c:1127 git-pull.sh:31
+#: builtin/merge.c:1126 git-pull.sh:31
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you can merge."
msgstr ""
-#: builtin/merge.c:1130 git-pull.sh:34
+#: builtin/merge.c:1129 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
msgstr ""
-#: builtin/merge.c:1134
+#: builtin/merge.c:1133
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you can merge."
msgstr ""
-#: builtin/merge.c:1137
+#: builtin/merge.c:1136
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
msgstr ""
-#: builtin/merge.c:1146
+#: builtin/merge.c:1145
msgid "You cannot combine --squash with --no-ff."
msgstr ""
-#: builtin/merge.c:1151
+#: builtin/merge.c:1150
msgid "You cannot combine --no-ff with --ff-only."
msgstr ""
-#: builtin/merge.c:1158
+#: builtin/merge.c:1157
msgid "No commit specified and merge.defaultToUpstream not set."
msgstr ""
-#: builtin/merge.c:1190
+#: builtin/merge.c:1189
msgid "Can merge only exactly one commit into empty head"
msgstr ""
-#: builtin/merge.c:1193
+#: builtin/merge.c:1192
msgid "Squash commit into empty head not supported yet"
msgstr ""
-#: builtin/merge.c:1195
+#: builtin/merge.c:1194
msgid "Non-fast-forward commit does not make sense into an empty head"
msgstr ""
-#: builtin/merge.c:1311
+#: builtin/merge.c:1310
#, c-format
msgid "Updating %s..%s\n"
msgstr ""
-#: builtin/merge.c:1350
+#: builtin/merge.c:1349
#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr ""
-#: builtin/merge.c:1357
+#: builtin/merge.c:1356
#, c-format
msgid "Nope.\n"
msgstr ""
-#: builtin/merge.c:1389
+#: builtin/merge.c:1388
msgid "Not possible to fast-forward, aborting."
msgstr ""
-#: builtin/merge.c:1412 builtin/merge.c:1491
+#: builtin/merge.c:1411 builtin/merge.c:1490
#, c-format
msgid "Rewinding the tree to pristine...\n"
msgstr ""
-#: builtin/merge.c:1416
+#: builtin/merge.c:1415
#, c-format
msgid "Trying merge strategy %s...\n"
msgstr ""
-#: builtin/merge.c:1482
+#: builtin/merge.c:1481
#, c-format
msgid "No merge strategy handled the merge.\n"
msgstr ""
-#: builtin/merge.c:1484
+#: builtin/merge.c:1483
#, c-format
msgid "Merge with strategy %s failed.\n"
msgstr ""
-#: builtin/merge.c:1493
+#: builtin/merge.c:1492
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr ""
-#: builtin/merge.c:1505
+#: builtin/merge.c:1504
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
@@ -6124,233 +6259,228 @@ msgstr ""
msgid "git notes get-ref"
msgstr ""
-#: builtin/notes.c:142
+#: builtin/notes.c:139
#, c-format
msgid "unable to start 'show' for object '%s'"
msgstr ""
-#: builtin/notes.c:148
-msgid "can't fdopen 'show' output fd"
-msgstr ""
-
-#: builtin/notes.c:158
-#, c-format
-msgid "failed to close pipe to 'show' for object '%s'"
+#: builtin/notes.c:143
+msgid "could not read 'show' output"
msgstr ""
-#: builtin/notes.c:161
+#: builtin/notes.c:151
#, c-format
msgid "failed to finish 'show' for object '%s'"
msgstr ""
-#: builtin/notes.c:178 builtin/tag.c:347
+#: builtin/notes.c:169 builtin/tag.c:341
#, c-format
msgid "could not create file '%s'"
msgstr ""
-#: builtin/notes.c:192
+#: builtin/notes.c:188
msgid "Please supply the note contents using either -m or -F option"
msgstr ""
-#: builtin/notes.c:213 builtin/notes.c:976
+#: builtin/notes.c:209 builtin/notes.c:972
#, c-format
msgid "Removing note for object %s\n"
msgstr ""
-#: builtin/notes.c:218
+#: builtin/notes.c:214
msgid "unable to write note object"
msgstr ""
-#: builtin/notes.c:220
+#: builtin/notes.c:216
#, c-format
msgid "The note contents has been left in %s"
msgstr ""
-#: builtin/notes.c:254 builtin/tag.c:542
+#: builtin/notes.c:250 builtin/tag.c:540
#, c-format
msgid "cannot read '%s'"
msgstr ""
-#: builtin/notes.c:256 builtin/tag.c:545
+#: builtin/notes.c:252 builtin/tag.c:543
#, c-format
msgid "could not open or read '%s'"
msgstr ""
-#: builtin/notes.c:275 builtin/notes.c:448 builtin/notes.c:450
-#: builtin/notes.c:510 builtin/notes.c:564 builtin/notes.c:647
-#: builtin/notes.c:652 builtin/notes.c:727 builtin/notes.c:769
-#: builtin/notes.c:971 builtin/tag.c:558
+#: builtin/notes.c:271 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:506 builtin/notes.c:560 builtin/notes.c:643
+#: builtin/notes.c:648 builtin/notes.c:723 builtin/notes.c:765
+#: builtin/notes.c:967 builtin/tag.c:556
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
msgstr ""
-#: builtin/notes.c:278
+#: builtin/notes.c:274
#, c-format
msgid "Failed to read object '%s'."
msgstr ""
-#: builtin/notes.c:302
+#: builtin/notes.c:298
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr ""
-#: builtin/notes.c:343
+#: builtin/notes.c:339
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
msgstr ""
-#: builtin/notes.c:353
+#: builtin/notes.c:349
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr ""
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: builtin/notes.c:380
+#: builtin/notes.c:376
#, c-format
msgid "Bad %s value: '%s'"
msgstr ""
-#: builtin/notes.c:444
+#: builtin/notes.c:440
#, c-format
msgid "Malformed input line: '%s'."
msgstr ""
-#: builtin/notes.c:459
+#: builtin/notes.c:455
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
msgstr ""
-#: builtin/notes.c:503 builtin/notes.c:557 builtin/notes.c:630
-#: builtin/notes.c:642 builtin/notes.c:715 builtin/notes.c:762
-#: builtin/notes.c:1036
+#: builtin/notes.c:499 builtin/notes.c:553 builtin/notes.c:626
+#: builtin/notes.c:638 builtin/notes.c:711 builtin/notes.c:758
+#: builtin/notes.c:1032
msgid "too many parameters"
msgstr ""
-#: builtin/notes.c:516 builtin/notes.c:775
+#: builtin/notes.c:512 builtin/notes.c:771
#, c-format
msgid "No note found for object %s."
msgstr ""
-#: builtin/notes.c:538 builtin/notes.c:695
+#: builtin/notes.c:534 builtin/notes.c:691
msgid "note contents as a string"
msgstr ""
-#: builtin/notes.c:541 builtin/notes.c:698
+#: builtin/notes.c:537 builtin/notes.c:694
msgid "note contents in a file"
msgstr ""
-#: builtin/notes.c:543 builtin/notes.c:546 builtin/notes.c:700
-#: builtin/notes.c:703 builtin/tag.c:476
+#: builtin/notes.c:539 builtin/notes.c:542 builtin/notes.c:696
+#: builtin/notes.c:699 builtin/tag.c:474
msgid "object"
msgstr ""
-#: builtin/notes.c:544 builtin/notes.c:701
+#: builtin/notes.c:540 builtin/notes.c:697
msgid "reuse and edit specified note object"
msgstr ""
-#: builtin/notes.c:547 builtin/notes.c:704
+#: builtin/notes.c:543 builtin/notes.c:700
msgid "reuse specified note object"
msgstr ""
-#: builtin/notes.c:549 builtin/notes.c:617
+#: builtin/notes.c:545 builtin/notes.c:613
msgid "replace existing notes"
msgstr ""
-#: builtin/notes.c:583
+#: builtin/notes.c:579
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr ""
-#: builtin/notes.c:588 builtin/notes.c:665
+#: builtin/notes.c:584 builtin/notes.c:661
#, c-format
msgid "Overwriting existing notes for object %s\n"
msgstr ""
-#: builtin/notes.c:618
+#: builtin/notes.c:614
msgid "read objects from stdin"
msgstr ""
-#: builtin/notes.c:620
+#: builtin/notes.c:616
msgid "load rewriting config for <command> (implies --stdin)"
msgstr ""
-#: builtin/notes.c:638
+#: builtin/notes.c:634
msgid "too few parameters"
msgstr ""
-#: builtin/notes.c:659
+#: builtin/notes.c:655
#, c-format
msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr ""
-#: builtin/notes.c:671
+#: builtin/notes.c:667
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
msgstr ""
-#: builtin/notes.c:720
+#: builtin/notes.c:716
#, 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 ""
-#: builtin/notes.c:867
+#: builtin/notes.c:863
msgid "General options"
msgstr ""
-#: builtin/notes.c:869
+#: builtin/notes.c:865
msgid "Merge options"
msgstr ""
-#: builtin/notes.c:871
+#: builtin/notes.c:867
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
msgstr ""
-#: builtin/notes.c:873
+#: builtin/notes.c:869
msgid "Committing unmerged notes"
msgstr ""
-#: builtin/notes.c:875
+#: builtin/notes.c:871
msgid "finalize notes merge by committing unmerged notes"
msgstr ""
-#: builtin/notes.c:877
+#: builtin/notes.c:873
msgid "Aborting notes merge resolution"
msgstr ""
-#: builtin/notes.c:879
+#: builtin/notes.c:875
msgid "abort notes merge"
msgstr ""
-#: builtin/notes.c:974
+#: builtin/notes.c:970
#, c-format
msgid "Object %s has no note\n"
msgstr ""
-#: builtin/notes.c:986
+#: builtin/notes.c:982
msgid "attempt to remove non-existent note is not an error"
msgstr ""
-#: builtin/notes.c:989
+#: builtin/notes.c:985
msgid "read object names from the standard input"
msgstr ""
-#: builtin/notes.c:1070
+#: builtin/notes.c:1066
msgid "notes_ref"
msgstr ""
-#: builtin/notes.c:1071
+#: builtin/notes.c:1067
msgid "use notes from <notes_ref>"
msgstr ""
-#: builtin/notes.c:1106 builtin/remote.c:1598
+#: builtin/notes.c:1102 builtin/remote.c:1598
#, c-format
msgid "Unknown subcommand: %s"
msgstr ""
@@ -6654,26 +6784,40 @@ msgstr ""
#: builtin/push.c:224
msgid ""
-"Updates were rejected because the destination reference already exists\n"
-"in the remote."
+"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 merge the remote changes (e.g.,\n"
+"'git pull') before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
+msgstr ""
+
+#: builtin/push.c:231
+msgid "Updates were rejected because the tag already exists in the remote."
+msgstr ""
+
+#: builtin/push.c:234
+msgid ""
+"You cannot update a remote ref that points at a non-commit object,\n"
+"or update a remote ref to make it point at a non-commit object,\n"
+"without using the '--force' option.\n"
msgstr ""
-#: builtin/push.c:269
+#: builtin/push.c:294
#, c-format
msgid "Pushing to %s\n"
msgstr ""
-#: builtin/push.c:273
+#: builtin/push.c:298
#, c-format
msgid "failed to push some refs to '%s'"
msgstr ""
-#: builtin/push.c:302
+#: builtin/push.c:331
#, c-format
msgid "bad repository '%s'"
msgstr ""
-#: builtin/push.c:303
+#: builtin/push.c:332
msgid ""
"No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote "
@@ -6686,79 +6830,83 @@ msgid ""
" git push <name>\n"
msgstr ""
-#: builtin/push.c:318
+#: builtin/push.c:347
msgid "--all and --tags are incompatible"
msgstr ""
-#: builtin/push.c:319
+#: builtin/push.c:348
msgid "--all can't be combined with refspecs"
msgstr ""
-#: builtin/push.c:324
+#: builtin/push.c:353
msgid "--mirror and --tags are incompatible"
msgstr ""
-#: builtin/push.c:325
+#: builtin/push.c:354
msgid "--mirror can't be combined with refspecs"
msgstr ""
-#: builtin/push.c:330
+#: builtin/push.c:359
msgid "--all and --mirror are incompatible"
msgstr ""
-#: builtin/push.c:390
+#: builtin/push.c:419
msgid "repository"
msgstr ""
-#: builtin/push.c:391
+#: builtin/push.c:420
msgid "push all refs"
msgstr ""
-#: builtin/push.c:392
+#: builtin/push.c:421
msgid "mirror all refs"
msgstr ""
-#: builtin/push.c:394
+#: builtin/push.c:423
msgid "delete refs"
msgstr ""
-#: builtin/push.c:395
+#: builtin/push.c:424
msgid "push tags (can't be used with --all or --mirror)"
msgstr ""
-#: builtin/push.c:398
+#: builtin/push.c:427
msgid "force updates"
msgstr ""
-#: builtin/push.c:399
+#: builtin/push.c:428
msgid "check"
msgstr ""
-#: builtin/push.c:400
+#: builtin/push.c:429
msgid "control recursive pushing of submodules"
msgstr ""
-#: builtin/push.c:402
+#: builtin/push.c:431
msgid "use thin pack"
msgstr ""
-#: builtin/push.c:403 builtin/push.c:404
+#: builtin/push.c:432 builtin/push.c:433
msgid "receive pack program"
msgstr ""
-#: builtin/push.c:405
+#: builtin/push.c:434
msgid "set upstream for git pull/status"
msgstr ""
-#: builtin/push.c:408
+#: builtin/push.c:437
msgid "prune locally removed refs"
msgstr ""
-#: builtin/push.c:418
+#: builtin/push.c:439
+msgid "bypass pre-push hook"
+msgstr ""
+
+#: builtin/push.c:448
msgid "--delete is incompatible with --all, --mirror and --tags"
msgstr ""
-#: builtin/push.c:420
+#: builtin/push.c:450
msgid "--delete doesn't make sense without any refs"
msgstr ""
@@ -7748,8 +7896,8 @@ msgstr ""
#: builtin/show-ref.c:10
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] [-s|--"
+"hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*] "
msgstr ""
#: builtin/show-ref.c:11
@@ -7861,159 +8009,157 @@ msgid "could not verify the tag '%s'"
msgstr ""
#: builtin/tag.c:249
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be ignored.\n"
-"#\n"
+"Write a tag message\n"
+"Lines starting with '%c' will be ignored.\n"
msgstr ""
-#: builtin/tag.c:256
+#: builtin/tag.c:253
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be kept; you may remove them yourself if you "
+"Write a tag message\n"
+"Lines starting with '%c' will be kept; you may remove them yourself if you "
"want to.\n"
-"#\n"
msgstr ""
-#: builtin/tag.c:298
+#: builtin/tag.c:292
msgid "unable to sign the tag"
msgstr ""
-#: builtin/tag.c:300
+#: builtin/tag.c:294
msgid "unable to write tag file"
msgstr ""
-#: builtin/tag.c:325
+#: builtin/tag.c:319
msgid "bad object type."
msgstr ""
-#: builtin/tag.c:338
+#: builtin/tag.c:332
msgid "tag header too big."
msgstr ""
-#: builtin/tag.c:370
+#: builtin/tag.c:368
msgid "no tag message?"
msgstr ""
-#: builtin/tag.c:376
+#: builtin/tag.c:374
#, c-format
msgid "The tag message has been left in %s\n"
msgstr ""
-#: builtin/tag.c:425
+#: builtin/tag.c:423
msgid "switch 'points-at' requires an object"
msgstr ""
-#: builtin/tag.c:427
+#: builtin/tag.c:425
#, c-format
msgid "malformed object name '%s'"
msgstr ""
-#: builtin/tag.c:447
+#: builtin/tag.c:445
msgid "list tag names"
msgstr ""
-#: builtin/tag.c:449
+#: builtin/tag.c:447
msgid "print <n> lines of each tag message"
msgstr ""
-#: builtin/tag.c:451
+#: builtin/tag.c:449
msgid "delete tags"
msgstr ""
-#: builtin/tag.c:452
+#: builtin/tag.c:450
msgid "verify tags"
msgstr ""
-#: builtin/tag.c:454
+#: builtin/tag.c:452
msgid "Tag creation options"
msgstr ""
-#: builtin/tag.c:456
+#: builtin/tag.c:454
msgid "annotated tag, needs a message"
msgstr ""
-#: builtin/tag.c:458
+#: builtin/tag.c:456
msgid "tag message"
msgstr ""
-#: builtin/tag.c:460
+#: builtin/tag.c:458
msgid "annotated and GPG-signed tag"
msgstr ""
-#: builtin/tag.c:464
+#: builtin/tag.c:462
msgid "use another key to sign the tag"
msgstr ""
-#: builtin/tag.c:465
+#: builtin/tag.c:463
msgid "replace the tag if exists"
msgstr ""
-#: builtin/tag.c:466
+#: builtin/tag.c:464
msgid "show tag list in columns"
msgstr ""
-#: builtin/tag.c:468
+#: builtin/tag.c:466
msgid "Tag listing options"
msgstr ""
-#: builtin/tag.c:471
+#: builtin/tag.c:469
msgid "print only tags that contain the commit"
msgstr ""
-#: builtin/tag.c:477
+#: builtin/tag.c:475
msgid "print only tags of the object"
msgstr ""
-#: builtin/tag.c:506
+#: builtin/tag.c:504
msgid "--column and -n are incompatible"
msgstr ""
-#: builtin/tag.c:523
+#: builtin/tag.c:521
msgid "-n option is only allowed with -l."
msgstr ""
-#: builtin/tag.c:525
+#: builtin/tag.c:523
msgid "--contains option is only allowed with -l."
msgstr ""
-#: builtin/tag.c:527
+#: builtin/tag.c:525
msgid "--points-at option is only allowed with -l."
msgstr ""
-#: builtin/tag.c:535
+#: builtin/tag.c:533
msgid "only one -F or -m option is allowed."
msgstr ""
-#: builtin/tag.c:555
+#: builtin/tag.c:553
msgid "too many params"
msgstr ""
-#: builtin/tag.c:561
+#: builtin/tag.c:559
#, c-format
msgid "'%s' is not a valid tag name."
msgstr ""
-#: builtin/tag.c:566
+#: builtin/tag.c:564
#, c-format
msgid "tag '%s' already exists"
msgstr ""
-#: builtin/tag.c:584
+#: builtin/tag.c:582
#, c-format
msgid "%s: cannot lock the ref"
msgstr ""
-#: builtin/tag.c:586
+#: builtin/tag.c:584
#, c-format
msgid "%s: cannot update the ref"
msgstr ""
-#: builtin/tag.c:588
+#: builtin/tag.c:586
#, c-format
msgid "Updated tag '%s' (was %s)\n"
msgstr ""
@@ -8247,7 +8393,7 @@ msgid "Print lines matching a pattern"
msgstr ""
#: common-cmds.h:17
-msgid "Create an empty git repository or reinitialize an existing one"
+msgid "Create an empty Git repository or reinitialize an existing one"
msgstr ""
#: common-cmds.h:18
@@ -9060,11 +9206,11 @@ msgid "blob"
msgstr ""
#: git-submodule.sh:979
-msgid "# Submodules changed but not updated:"
+msgid "Submodules changed but not updated:"
msgstr ""
#: git-submodule.sh:981
-msgid "# Submodule changes to be committed:"
+msgid "Submodule changes to be committed:"
msgstr ""
#: git-submodule.sh:1129
diff --git a/po/sv.po b/po/sv.po
index d518ab42ae..15f1aa82a0 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: git 1.8.1\n"
+"Project-Id-Version: git 1.8.2\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2013-01-25 12:33+0800\n"
-"PO-Revision-Date: 2013-01-27 22:36+0100\n"
+"POT-Creation-Date: 2013-03-05 12:36+0800\n"
+"PO-Revision-Date: 2013-03-05 09:17+0100\n"
"Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: advice.c:45
+#: advice.c:49
#, c-format
msgid "hint: %.*s\n"
msgstr "tips: %.*s\n"
@@ -26,7 +26,7 @@ msgstr "tips: %.*s\n"
#. * Message used both when 'git commit' fails and when
#. * other commands doing a merge do.
#.
-#: advice.c:75
+#: advice.c:79
msgid ""
"Fix them up in the work tree,\n"
"and then use 'git add/rm <file>' as\n"
@@ -73,11 +73,11 @@ msgstr "prefix"
msgid "prepend prefix to each pathname in the archive"
msgstr "lägg till prefix till varje sökväg i arkivet"
-#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2380
-#: builtin/blame.c:2381 builtin/config.c:55 builtin/fast-export.c:653
+#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2366
+#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:653
#: builtin/fast-export.c:655 builtin/grep.c:715 builtin/hash-object.c:77
-#: builtin/ls-files.c:494 builtin/ls-files.c:497 builtin/notes.c:540
-#: builtin/notes.c:697 builtin/read-tree.c:107 parse-options.h:149
+#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536
+#: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149
msgid "file"
msgstr "fil"
@@ -117,7 +117,7 @@ msgstr "arkiv"
msgid "retrieve the archive from remote repository <repo>"
msgstr "hämta arkivet från fjärrarkivet <arkiv>"
-#: archive.c:347 builtin/archive.c:95 builtin/notes.c:619
+#: archive.c:347 builtin/archive.c:95 builtin/notes.c:615
msgid "command"
msgstr "kommando"
@@ -127,10 +127,10 @@ msgstr "sökväg till kommandot git-upload-archive på fjärren"
#: attr.c:259
msgid ""
-"Negative patterns are forbidden in git attributes\n"
+"Negative patterns are ignored in git attributes\n"
"Use '\\!' for literal leading exclamation."
msgstr ""
-"Negativa mönster är förbjudna i git-attribut\n"
+"Negativa mönster ignoreras i git-attribut\n"
"Använd '\\!' för att inleda med ett utropstecken."
#: bundle.c:36
@@ -306,22 +306,22 @@ msgid_plural "%lu years ago"
msgstr[0] "%lu år sedan"
msgstr[1] "%lu år sedan"
-#: diff.c:111
+#: diff.c:112
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
msgstr " Misslyckades tolka dirstat-avskärningsprocentandel \"%s\"\n"
-#: diff.c:116
+#: diff.c:117
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
msgstr " Okänd dirstat-parameter \"%s\"\n"
-#: diff.c:194
+#: diff.c:210
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "Okänt värde för konfigurationsvariabeln \"diff.submodule\": \"%s\""
-#: diff.c:237
+#: diff.c:260
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
@@ -330,7 +330,7 @@ msgstr ""
"Hittade fel i konfigurationsvariabeln \"diff.dirstat\":\n"
"%s"
-#: diff.c:3494
+#: diff.c:3468
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
@@ -339,12 +339,12 @@ msgstr ""
"Misslyckades tolka argument till flaggan --dirstat/-X;\n"
"%s"
-#: diff.c:3508
+#: diff.c:3482
#, c-format
msgid "Failed to parse --submodule option parameter: '%s'"
msgstr "Misslyckades tolka argument till flaggan --submodule: \"%s\""
-#: gpg-interface.c:59
+#: gpg-interface.c:59 gpg-interface.c:127
msgid "could not run gpg."
msgstr "kunde inte köra gpg."
@@ -356,6 +356,16 @@ msgstr "gpg godtog inte data"
msgid "gpg failed to sign the data"
msgstr "gpg misslyckades signera data"
+#: gpg-interface.c:112
+#, c-format
+msgid "could not create temporary file '%s': %s"
+msgstr "kunde inte skapa temporära filen \"%s\": %s"
+
+#: gpg-interface.c:115
+#, c-format
+msgid "failed writing detached signature to '%s': %s"
+msgstr "misslyckades skriva fristående signatur till \"%s\": %s"
+
#: grep.c:1622
#, c-format
msgid "'%s': unable to read %s"
@@ -380,7 +390,11 @@ msgstr "git-kommandon tillgängliga i \"%s\""
msgid "git commands available from elsewhere on your $PATH"
msgstr "git-kommandon från andra platser i din $PATH"
-#: help.c:275
+#: help.c:235
+msgid "The most commonly used git commands are:"
+msgstr "De mest använda git-kommandona är:"
+
+#: help.c:292
#, c-format
msgid ""
"'%s' appears to be a git command, but we were not\n"
@@ -389,11 +403,11 @@ msgstr ""
"\"%s\" verkar vara ett git-kommando, men vi kan inte\n"
"köra det. Kanske git-%s är trasigt?"
-#: help.c:332
+#: help.c:349
msgid "Uh oh. Your system reports no Git commands at all."
msgstr "Oj då. Ditt system rapporterar inga Git-kommandon alls."
-#: help.c:354
+#: help.c:371
#, c-format
msgid ""
"WARNING: You called a Git command named '%s', which does not exist.\n"
@@ -402,17 +416,17 @@ msgstr ""
"VARNING: Du anropade ett Git-kommando vid namn \"%s\", som inte finns.\n"
"Fortsätter under förutsättningen att du menade \"%s\""
-#: help.c:359
+#: help.c:376
#, c-format
msgid "in %0.1f seconds automatically..."
msgstr "automatiskt om %0.1f sekunder..."
-#: help.c:366
+#: help.c:383
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
msgstr "git: \"%s\" är inte ett git-kommando. Se \"git --help\"."
-#: help.c:370
+#: help.c:387
msgid ""
"\n"
"Did you mean this?"
@@ -689,39 +703,53 @@ msgstr "Kunde inte tolka objektet \"%s\""
msgid "Unable to write index."
msgstr "Kunde inte skriva indexet."
-#: parse-options.c:485
+#: parse-options.c:489
msgid "..."
msgstr "..."
-#: parse-options.c:503
+#: parse-options.c:507
#, c-format
msgid "usage: %s"
msgstr "användning: %s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation
-#: parse-options.c:507
+#: parse-options.c:511
#, c-format
msgid " or: %s"
msgstr " eller: %s"
-#: parse-options.c:510
+#: parse-options.c:514
#, c-format
msgid " %s"
msgstr " %s"
-#: remote.c:1686
+#: parse-options.c:548
+msgid "-NUM"
+msgstr "-TAL"
+
+#: pathspec.c:83
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr "Sökvägen \"%s\" är i undermodulen \"%.*s\""
+
+#: pathspec.c:99
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr "\"%s\" är på andra sidan av en symbolisk länk"
+
+#: remote.c:1653
#, 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] "Din gren ligger före \"%s\" med %d incheckning.\n"
msgstr[1] "Din gren ligger före \"%s\" med %d incheckningar.\n"
-#: remote.c:1692
+#: remote.c:1659
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (använd \"git push\" för att publicera dina lokala incheckningar)\n"
-#: remote.c:1695
+#: remote.c:1662
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
@@ -731,11 +759,11 @@ msgstr[0] ""
msgstr[1] ""
"Din gren ligger efter \"%s\" med %d incheckningar, och kan snabbspolas.\n"
-#: remote.c:1703
+#: remote.c:1670
msgid " (use \"git pull\" to update your local branch)\n"
msgstr " (använd \"git pull\" för att uppdatera din lokala gren)\n"
-#: remote.c:1706
+#: remote.c:1673
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -750,18 +778,18 @@ msgstr[1] ""
"Din gren och \"%s\" har divergerat,\n"
"och har %d respektive %d olika incheckningar.\n"
-#: remote.c:1716
+#: remote.c:1683
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"
-#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:875 builtin/merge.c:985
-#: builtin/merge.c:995
+#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:874 builtin/merge.c:984
+#: builtin/merge.c:994
#, c-format
msgid "Could not open '%s' for writing"
msgstr "Kunde inte öppna \"%s\" för skrivning"
-#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:987
-#: builtin/merge.c:1000
+#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:986
+#: builtin/merge.c:999
#, c-format
msgid "Could not write to '%s'"
msgstr "Kunde inte skriva till \"%s\""
@@ -959,7 +987,7 @@ msgstr "kan inte bestämma HEAD"
msgid "cannot abort from a branch yet to be born"
msgstr "kan inte avbryta från en gren som ännu inte är född"
-#: sequencer.c:821 builtin/apply.c:4016
+#: sequencer.c:821 builtin/apply.c:4056
#, c-format
msgid "cannot open %s: %s"
msgstr "kan inte öppna %s: %s"
@@ -1179,148 +1207,173 @@ msgstr "osammansl.: %s"
msgid "bug: unhandled diff status %c"
msgstr "programfel: diff-status %c ej hanterad"
-#: wt-status.c:787
+#: wt-status.c:789
msgid "You have unmerged paths."
msgstr "Du har ej sammanslagna sökvägar."
-#: wt-status.c:790 wt-status.c:914
+#: wt-status.c:792 wt-status.c:944
msgid " (fix conflicts and run \"git commit\")"
msgstr " (rätta konflikter och kör \"git commit\")"
-#: wt-status.c:793
+#: wt-status.c:795
msgid "All conflicts fixed but you are still merging."
msgstr "Alla konflikter har rättats men du är fortfarande i en sammanslagning."
-#: wt-status.c:796
+#: wt-status.c:798
msgid " (use \"git commit\" to conclude merge)"
msgstr " (använd \"git commit\" för att slutföra sammanslagningen)"
-#: wt-status.c:806
+#: wt-status.c:808
msgid "You are in the middle of an am session."
msgstr "Du är i mitten av en körning av \"git am\"."
-#: wt-status.c:809
+#: wt-status.c:811
msgid "The current patch is empty."
msgstr "Aktuell patch är tom."
-#: wt-status.c:813
+#: wt-status.c:815
msgid " (fix conflicts and then run \"git am --resolved\")"
msgstr " (rätta konflikter och kör sedan \"git am --resolved\")"
-#: wt-status.c:815
+#: wt-status.c:817
msgid " (use \"git am --skip\" to skip this patch)"
msgstr " (använd \"git am --skip\" för att hoppa över patchen)"
-#: wt-status.c:817
+#: wt-status.c:819
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr " (använd \"git am --abort\" för att återställa ursprungsgrenen)"
-#: wt-status.c:875 wt-status.c:885
+#: wt-status.c:879 wt-status.c:896
+#, c-format
+msgid "You are currently rebasing branch '%s' on '%s'."
+msgstr "Du håller på att ombasera grenen \"%s\" ovanpå \"%s\"."
+
+#: wt-status.c:884 wt-status.c:901
msgid "You are currently rebasing."
msgstr "Du håller på med en ombasering."
-#: wt-status.c:878
+#: wt-status.c:887
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr " (rätta konflikter och kör sedan \"git rebase --continue\")"
-#: wt-status.c:880
+#: wt-status.c:889
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (använd \"git rebase --skip\" för att hoppa över patchen)"
-#: wt-status.c:882
+#: wt-status.c:891
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr " (använd \"git rebase --abort\" för att checka ut ursprungsgrenen)"
-#: wt-status.c:888
+#: wt-status.c:904
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr " (alla konflikter rättade: kör \"git rebase --continue\")"
-#: wt-status.c:890
+#: wt-status.c:908
+#, c-format
+msgid ""
+"You are currently splitting a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Du håller på att dela upp en incheckning medan du ombaserar grenen \"%s\" "
+"ovanpå \"%s\"."
+
+#: wt-status.c:913
msgid "You are currently splitting a commit during a rebase."
msgstr "Du håller på att dela upp en incheckning i en ombasering."
-#: wt-status.c:893
+#: wt-status.c:916
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr " (Så fort din arbetskatalog är ren, kör \"git rebase --continue\")"
-#: wt-status.c:895
+#: wt-status.c:920
+#, c-format
+msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Du håller på att redigera en incheckning medan du ombaserar grenen \"%s\" "
+"ovanpå \"%s\"."
+
+#: wt-status.c:925
msgid "You are currently editing a commit during a rebase."
msgstr "Du håller på att redigera en incheckning under en ombasering."
-#: wt-status.c:898
+#: wt-status.c:928
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
" (använd \"git commit --amend\" för att lägga till på aktuell incheckning)"
-#: wt-status.c:900
+#: wt-status.c:930
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr " (använd \"git rebase --continue\" när du är nöjd med dina ändringar)"
-#: wt-status.c:910
+#: wt-status.c:940
msgid "You are currently cherry-picking."
msgstr "Du håller på med en \"cherry-pick\"."
-#: wt-status.c:917
+#: wt-status.c:947
msgid " (all conflicts fixed: run \"git commit\")"
msgstr " (alla konflikter har rättats: kör \"git commit\")"
-#: wt-status.c:926
+#: wt-status.c:958
+#, c-format
+msgid "You are currently bisecting branch '%s'."
+msgstr "Du håller på med en \"bisect\" på grenen \"%s\"."
+
+#: wt-status.c:962
msgid "You are currently bisecting."
msgstr "Du håller på med en \"bisect\"."
-#: wt-status.c:929
+#: wt-status.c:965
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr ""
" (använd \"git bisect reset\" för att komma tillbaka till ursprungsgrenen)"
-#: wt-status.c:980
+#: wt-status.c:1064
msgid "On branch "
msgstr "På grenen "
-#: wt-status.c:987
+#: wt-status.c:1071
msgid "Not currently on any branch."
msgstr "Inte på någon gren för närvarande."
-#: wt-status.c:999
+#: wt-status.c:1083
msgid "Initial commit"
msgstr "Första incheckning"
-#: wt-status.c:1013
+#: wt-status.c:1097
msgid "Untracked files"
msgstr "Ospårade filer"
-#: wt-status.c:1015
+#: wt-status.c:1099
msgid "Ignored files"
msgstr "Ignorerade filer"
# %s är nästa sträng eller tom.
-#: wt-status.c:1017
+#: wt-status.c:1101
#, c-format
msgid "Untracked files not listed%s"
msgstr "Ospårade filer visas ej%s"
-#: wt-status.c:1019
+#: wt-status.c:1103
msgid " (use -u option to show untracked files)"
msgstr " (använd flaggan -u för att visa ospårade filer)"
-#: wt-status.c:1025
+#: wt-status.c:1109
msgid "No changes"
msgstr "Inga ändringar"
-#: wt-status.c:1030
+#: wt-status.c:1114
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
"inga ändringar att checka in (använd \"git add\" och/eller \"git commit -a"
"\")\n"
-#: wt-status.c:1033
+#: wt-status.c:1117
#, c-format
msgid "no changes added to commit\n"
msgstr "inga ändringar att checka in\n"
-#: wt-status.c:1036
+#: wt-status.c:1120
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
@@ -1329,189 +1382,228 @@ msgstr ""
"inget köat för incheckning, men ospårade filer finns (spåra med \"git add"
"\")\n"
-#: wt-status.c:1039
+#: wt-status.c:1123
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr "inget köat för incheckning, men ospårade filer finns\n"
-#: wt-status.c:1042
+#: wt-status.c:1126
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr "inget att checka in (skapa/kopiera filer och spåra med \"git add\")\n"
-#: wt-status.c:1045 wt-status.c:1050
+#: wt-status.c:1129 wt-status.c:1134
#, c-format
msgid "nothing to commit\n"
msgstr "inget att checka in\n"
-#: wt-status.c:1048
+#: wt-status.c:1132
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr "inget att checka in (använd -u för att visa ospårade filer)\n"
-#: wt-status.c:1052
+#: wt-status.c:1136
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr "inget att checka in, arbetskatalogen ren\n"
-#: wt-status.c:1160
+#: wt-status.c:1244
msgid "HEAD (no branch)"
msgstr "HEAD (ingen gren)"
-#: wt-status.c:1166
+#: wt-status.c:1250
msgid "Initial commit on "
msgstr "Första incheckning på "
-#: wt-status.c:1181
+#: wt-status.c:1265
msgid "behind "
msgstr "efter "
-#: wt-status.c:1184 wt-status.c:1187
+#: wt-status.c:1268 wt-status.c:1271
msgid "ahead "
msgstr "före "
-#: wt-status.c:1189
+#: wt-status.c:1273
msgid ", behind "
msgstr ", efter "
-#: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
-msgstr "git add [flaggor] [--] <filmönster>..."
+#: compat/precompose_utf8.c:58 builtin/clone.c:341
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "misslyckades ta bort länken \"%s\""
+
+#: builtin/add.c:20
+msgid "git add [options] [--] <pathspec>..."
+msgstr "git add [flaggor] [--] <sökväg>..."
-#: builtin/add.c:62
+#: builtin/add.c:63
#, c-format
msgid "unexpected diff status %c"
msgstr "diff-status %c förväntades inte"
-#: builtin/add.c:67 builtin/commit.c:231
+#: builtin/add.c:68 builtin/commit.c:231
msgid "updating files failed"
msgstr "misslyckades uppdatera filer"
-#: builtin/add.c:77
+#: builtin/add.c:78
#, c-format
msgid "remove '%s'\n"
msgstr "ta bort \"%s\"\n"
-#: builtin/add.c:176
-#, c-format
-msgid "Path '%s' is in submodule '%.*s'"
-msgstr "Sökvägen \"%s\" är i undermodulen \"%.*s\""
-
-#: builtin/add.c:192
+#: builtin/add.c:148
msgid "Unstaged changes after refreshing the index:"
msgstr "Ospårade ändringar efter att ha uppdaterat indexet:"
-#: builtin/add.c:195 builtin/add.c:460 builtin/rm.c:275
+#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275
#, c-format
msgid "pathspec '%s' did not match any files"
msgstr "sökvägsangivelsen \"%s\" motsvarade inte några filer"
-#: builtin/add.c:209
-#, c-format
-msgid "'%s' is beyond a symbolic link"
-msgstr "\"%s\" är på andra sidan av en symbolisk länk"
-
-#: builtin/add.c:276
+#: builtin/add.c:234
msgid "Could not read the index"
msgstr "Kunde inte läsa indexet"
-#: builtin/add.c:286
+#: builtin/add.c:244
#, c-format
msgid "Could not open '%s' for writing."
msgstr "Kunde inte öppna \"%s\" för skrivning"
-#: builtin/add.c:290
+#: builtin/add.c:248
msgid "Could not write patch"
msgstr "Kunde inte skriva patch"
-#: builtin/add.c:295
+#: builtin/add.c:253
#, c-format
msgid "Could not stat '%s'"
msgstr "Kunde inte ta status på \"%s\""
-#: builtin/add.c:297
+#: builtin/add.c:255
msgid "Empty patch. Aborted."
msgstr "Tom patch. Avbryter."
-#: builtin/add.c:303
+#: builtin/add.c:261
#, c-format
msgid "Could not apply '%s'"
msgstr "Kunde inte tillämpa \"%s\""
-#: builtin/add.c:313
+#: builtin/add.c:271
msgid "The following paths are ignored by one of your .gitignore files:\n"
msgstr "Följande sökvägar ignoreras av en av dina .gitignore-filer:\n"
-#: builtin/add.c:319 builtin/clean.c:160 builtin/fetch.c:78 builtin/mv.c:63
-#: builtin/prune-packed.c:76 builtin/push.c:396 builtin/remote.c:1253
+#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63
+#: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253
#: builtin/rm.c:206
msgid "dry run"
msgstr "testkörning"
-#: builtin/add.c:320 builtin/apply.c:4365 builtin/commit.c:1160
-#: builtin/count-objects.c:82 builtin/fsck.c:613 builtin/log.c:1522
-#: builtin/mv.c:62 builtin/read-tree.c:112
+#: builtin/add.c:278 builtin/apply.c:4405 builtin/check-ignore.c:19
+#: builtin/commit.c:1150 builtin/count-objects.c:82 builtin/fsck.c:613
+#: builtin/log.c:1522 builtin/mv.c:62 builtin/read-tree.c:112
msgid "be verbose"
msgstr "var pratsam"
-#: builtin/add.c:322
+#: builtin/add.c:280
msgid "interactive picking"
msgstr "plocka interaktivt"
-#: builtin/add.c:323 builtin/checkout.c:1031 builtin/reset.c:258
+#: builtin/add.c:281 builtin/checkout.c:1031 builtin/reset.c:258
msgid "select hunks interactively"
msgstr "välj stycken interaktivt"
-#: builtin/add.c:324
+#: builtin/add.c:282
msgid "edit current diff and apply"
msgstr "redigera aktuell diff och applicera"
-#: builtin/add.c:325
+#: builtin/add.c:283
msgid "allow adding otherwise ignored files"
msgstr "tillåt lägga till annars ignorerade filer"
-#: builtin/add.c:326
+#: builtin/add.c:284
msgid "update tracked files"
msgstr "uppdatera spårade filer"
-#: builtin/add.c:327
+#: builtin/add.c:285
msgid "record only the fact that the path will be added later"
msgstr "registrera endast att sökvägen kommer läggas till senare"
-#: builtin/add.c:328
+#: builtin/add.c:286
msgid "add changes from all tracked and untracked files"
msgstr "lägg till ändringar från alla spårade och ospårade filer"
-#: builtin/add.c:329
+#: builtin/add.c:287
msgid "don't add, only refresh the index"
msgstr "lägg inte till, uppdatera endast indexet"
-#: builtin/add.c:330
+#: builtin/add.c:288
msgid "just skip files which cannot be added because of errors"
msgstr "hoppa bara över filer som inte kan läggas till på grund av fel"
-#: builtin/add.c:331
+#: builtin/add.c:289
msgid "check if - even missing - files are ignored in dry run"
msgstr "se om - även saknade - filer ignoreras i testkörning"
-#: builtin/add.c:353
+#: builtin/add.c:311
#, c-format
msgid "Use -f if you really want to add them.\n"
msgstr "Använd -f om du verkligen vill lägga till dem.\n"
-#: builtin/add.c:354
+#: builtin/add.c:312
msgid "no files added"
msgstr "inga filer har lagts till"
-#: builtin/add.c:360
+#: builtin/add.c:318
msgid "adding files failed"
msgstr "misslyckades lägga till filer"
-#: builtin/add.c:392
+#.
+#. * To be consistent with "git add -p" and most Git
+#. * commands, we should default to being tree-wide, but
+#. * this is not the original behavior and can't be
+#. * changed until users trained themselves not to type
+#. * "git add -u" or "git add -A". For now, we warn and
+#. * keep the old behavior. Later, this warning can be
+#. * turned into a die(...), and eventually we may
+#. * reallow the command with a new behavior.
+#.
+#: builtin/add.c:335
+#, c-format
+msgid ""
+"The behavior of 'git add %s (or %s)' with no path argument from a\n"
+"subdirectory of the tree will change in Git 2.0 and should not be used "
+"anymore.\n"
+"To add content for the whole tree, run:\n"
+"\n"
+" git add %s :/\n"
+" (or git add %s :/)\n"
+"\n"
+"To restrict the command to the current directory, run:\n"
+"\n"
+" git add %s .\n"
+" (or git add %s .)\n"
+"\n"
+"With the current Git version, the command is restricted to the current "
+"directory."
+msgstr ""
+"Beteendet för \"git add %s (eller %s)\" utan sökvägsargument från en\n"
+"underkatalog i ett träd kommer ändras i Git 2.0 och bör inte längre "
+"användas.\n"
+"För att lägga till innehållet för hela trädet, använd:\n"
+"\n"
+" git add %s :/\n"
+" (eller git add %s :/)\n"
+"\n"
+"För att begränsa kommandot till aktuell katalog, använd:\n"
+"\n"
+" git add %s .\n"
+" (eller git add %s .)\n"
+"\n"
+"I nuvarande version av Git begränsas kommandot till aktuell katalog."
+
+#: builtin/add.c:381
msgid "-A and -u are mutually incompatible"
msgstr "-A och -u är ömsesidigt inkompatibla"
-#: builtin/add.c:394
+#: builtin/add.c:383
msgid "Option --ignore-missing can only be used together with --dry-run"
msgstr "Flaggan --ignore-missing kan endast användas tillsammans med --dry-run"
@@ -1525,12 +1617,12 @@ msgstr "Inget angivet, inget tillagt.\n"
msgid "Maybe you wanted to say 'git add .'?\n"
msgstr "Kanske menade du att skriva \"git add .\"?\n"
-#: builtin/add.c:421 builtin/clean.c:203 builtin/commit.c:291 builtin/mv.c:82
-#: builtin/rm.c:235
+#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204
+#: builtin/commit.c:291 builtin/mv.c:82 builtin/rm.c:235
msgid "index file corrupt"
msgstr "indexfilen trasig"
-#: builtin/add.c:481 builtin/apply.c:4461 builtin/mv.c:229 builtin/rm.c:370
+#: builtin/add.c:481 builtin/apply.c:4501 builtin/mv.c:229 builtin/rm.c:370
msgid "Unable to write new index file"
msgstr "Kunde inte skriva ny indexfil"
@@ -1583,17 +1675,17 @@ msgstr "git apply: dålig git-diff - motsägande gammalt filnamn på rad %d"
msgid "git apply: bad git-diff - expected /dev/null on line %d"
msgstr "git apply: dålig git-diff - förväntade /dev/null på rad %d"
-#: builtin/apply.c:1420
+#: builtin/apply.c:1422
#, c-format
msgid "recount: unexpected line: %.*s"
msgstr "recount: förväntade rad: %.*s"
-#: builtin/apply.c:1477
+#: builtin/apply.c:1479
#, c-format
msgid "patch fragment without header at line %d: %.*s"
msgstr "patch-fragment utan huvud på rad %d: %.*s"
-#: builtin/apply.c:1494
+#: builtin/apply.c:1496
#, c-format
msgid ""
"git diff header lacks filename information when removing %d leading pathname "
@@ -1609,78 +1701,78 @@ msgstr[1] ""
"sökvägskomponenter\n"
"tas bort (rad %d)"
-#: builtin/apply.c:1654
+#: builtin/apply.c:1656
msgid "new file depends on old contents"
msgstr "ny fil beror på gammalt innehåll"
-#: builtin/apply.c:1656
+#: builtin/apply.c:1658
msgid "deleted file still has contents"
msgstr "borttagen fil har fortfarande innehåll"
-#: builtin/apply.c:1682
+#: builtin/apply.c:1684
#, c-format
msgid "corrupt patch at line %d"
msgstr "trasig patch på rad %d"
-#: builtin/apply.c:1718
+#: builtin/apply.c:1720
#, c-format
msgid "new file %s depends on old contents"
msgstr "nya filen %s beror på gammalt innehåll"
-#: builtin/apply.c:1720
+#: builtin/apply.c:1722
#, c-format
msgid "deleted file %s still has contents"
msgstr "borttagna filen %s har fortfarande innehåll"
-#: builtin/apply.c:1723
+#: builtin/apply.c:1725
#, c-format
msgid "** warning: file %s becomes empty but is not deleted"
msgstr "** varning: filen %s blir tom men har inte tagits bort"
-#: builtin/apply.c:1869
+#: builtin/apply.c:1871
#, c-format
msgid "corrupt binary patch at line %d: %.*s"
msgstr "trasig binärpatch på rad %d: %.*s"
#. there has to be one hunk (forward hunk)
-#: builtin/apply.c:1898
+#: builtin/apply.c:1900
#, c-format
msgid "unrecognized binary patch at line %d"
msgstr "binärpatchen på rad %d känns inte igen"
-#: builtin/apply.c:1984
+#: builtin/apply.c:1986
#, c-format
msgid "patch with only garbage at line %d"
msgstr "patch med bara skräp på rad %d"
-#: builtin/apply.c:2074
+#: builtin/apply.c:2076
#, c-format
msgid "unable to read symlink %s"
msgstr "kunde inte läsa symboliska länken %s"
-#: builtin/apply.c:2078
+#: builtin/apply.c:2080
#, c-format
msgid "unable to open or read %s"
msgstr "kunde inte öppna eller läsa %s"
-#: builtin/apply.c:2682
+#: builtin/apply.c:2684
#, c-format
msgid "invalid start of line: '%c'"
msgstr "felaktig inledning på rad: \"%c\""
-#: builtin/apply.c:2800
+#: builtin/apply.c:2802
#, c-format
msgid "Hunk #%d succeeded at %d (offset %d line)."
msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
msgstr[0] "Stycke %d lyckades på %d (offset %d rad)."
msgstr[1] "Stycke %d lyckades på %d (offset %d rader)."
-#: builtin/apply.c:2812
+#: builtin/apply.c:2814
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr "Sammanhang reducerat till (%ld/%ld) för att tillämpa fragment vid %d"
-#: builtin/apply.c:2818
+#: builtin/apply.c:2820
#, c-format
msgid ""
"while searching for:\n"
@@ -1689,318 +1781,318 @@ msgstr ""
"vid sökning efter:\n"
"%.*s"
-#: builtin/apply.c:2837
+#: builtin/apply.c:2839
#, c-format
msgid "missing binary patch data for '%s'"
msgstr "saknar binära patchdata för \"%s\""
-#: builtin/apply.c:2940
+#: builtin/apply.c:2942
#, c-format
msgid "binary patch does not apply to '%s'"
msgstr "binärpatchen kan inte tillämpas på \"%s\""
-#: builtin/apply.c:2946
+#: builtin/apply.c:2948
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr "binärpatchen på \"%s\" ger felaktigt resultat (förväntade %s, fick %s)"
-#: builtin/apply.c:2967
+#: builtin/apply.c:2969
#, c-format
msgid "patch failed: %s:%ld"
msgstr "patch misslyckades: %s:%ld"
-#: builtin/apply.c:3089
+#: builtin/apply.c:3091
#, c-format
msgid "cannot checkout %s"
msgstr "kan inte checka ut %s"
-#: builtin/apply.c:3134 builtin/apply.c:3143 builtin/apply.c:3187
+#: builtin/apply.c:3136 builtin/apply.c:3145 builtin/apply.c:3189
#, c-format
msgid "read of %s failed"
msgstr "misslyckades läsa %s"
-#: builtin/apply.c:3167 builtin/apply.c:3389
+#: builtin/apply.c:3169 builtin/apply.c:3391
#, c-format
msgid "path %s has been renamed/deleted"
msgstr "sökvägen %s har ändrat namn/tagits bort"
-#: builtin/apply.c:3248 builtin/apply.c:3403
+#: builtin/apply.c:3250 builtin/apply.c:3405
#, c-format
msgid "%s: does not exist in index"
msgstr "%s: finns inte i indexet"
-#: builtin/apply.c:3252 builtin/apply.c:3395 builtin/apply.c:3417
+#: builtin/apply.c:3254 builtin/apply.c:3397 builtin/apply.c:3419
#, c-format
msgid "%s: %s"
msgstr "%s: %s"
-#: builtin/apply.c:3257 builtin/apply.c:3411
+#: builtin/apply.c:3259 builtin/apply.c:3413
#, c-format
msgid "%s: does not match index"
msgstr "%s: motsvarar inte indexet"
-#: builtin/apply.c:3359
+#: builtin/apply.c:3361
msgid "removal patch leaves file contents"
msgstr "patch för borttagning lämnar kvar filinnehåll"
-#: builtin/apply.c:3428
+#: builtin/apply.c:3430
#, c-format
msgid "%s: wrong type"
msgstr "%s: fel typ"
-#: builtin/apply.c:3430
+#: builtin/apply.c:3432
#, c-format
msgid "%s has type %o, expected %o"
msgstr "%s har typen %o, förväntade %o"
-#: builtin/apply.c:3531
+#: builtin/apply.c:3533
#, c-format
msgid "%s: already exists in index"
msgstr "%s: finns redan i indexet"
-#: builtin/apply.c:3534
+#: builtin/apply.c:3536
#, c-format
msgid "%s: already exists in working directory"
msgstr "%s: finns redan i arbetskatalogen"
-#: builtin/apply.c:3554
+#: builtin/apply.c:3556
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o)"
msgstr "nytt läge (%o) för %s motsvarar inte gammalt läge (%o)"
-#: builtin/apply.c:3559
+#: builtin/apply.c:3561
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o) of %s"
msgstr "nytt läge (%o) för %s motsvarar inte gammalt läge (%o) för %s"
-#: builtin/apply.c:3567
+#: builtin/apply.c:3569
#, c-format
msgid "%s: patch does not apply"
msgstr "%s: patchen kan inte tillämpas"
-#: builtin/apply.c:3580
+#: builtin/apply.c:3582
#, c-format
msgid "Checking patch %s..."
msgstr "Kontrollerar patchen %s..."
-#: builtin/apply.c:3635 builtin/checkout.c:215 builtin/reset.c:124
+#: builtin/apply.c:3675 builtin/checkout.c:215 builtin/reset.c:124
#, c-format
msgid "make_cache_entry failed for path '%s'"
msgstr "make_cache_entry misslyckades för sökvägen \"%s\""
-#: builtin/apply.c:3778
+#: builtin/apply.c:3818
#, c-format
msgid "unable to remove %s from index"
msgstr "kan inte ta bort %s från indexet"
-#: builtin/apply.c:3806
+#: builtin/apply.c:3846
#, c-format
msgid "corrupt patch for subproject %s"
msgstr "trasig patch för underprojektet %s"
-#: builtin/apply.c:3810
+#: builtin/apply.c:3850
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr "kan inte ta status på nyligen skapade filen \"%s\""
-#: builtin/apply.c:3815
+#: builtin/apply.c:3855
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr "kan inte skapa säkerhetsminne för nyligen skapade filen %s"
-#: builtin/apply.c:3818 builtin/apply.c:3926
+#: builtin/apply.c:3858 builtin/apply.c:3966
#, c-format
msgid "unable to add cache entry for %s"
msgstr "kan inte lägga till cachepost för %s"
-#: builtin/apply.c:3851
+#: builtin/apply.c:3891
#, c-format
msgid "closing file '%s'"
msgstr "stänger filen \"%s\""
-#: builtin/apply.c:3900
+#: builtin/apply.c:3940
#, c-format
msgid "unable to write file '%s' mode %o"
msgstr "kan inte skriva filen \"%s\" läge %o"
-#: builtin/apply.c:3987
+#: builtin/apply.c:4027
#, c-format
msgid "Applied patch %s cleanly."
msgstr "Tillämpade patchen %s rent."
-#: builtin/apply.c:3995
+#: builtin/apply.c:4035
msgid "internal error"
msgstr "internt fel"
#. Say this even without --verbose
-#: builtin/apply.c:3998
+#: builtin/apply.c:4038
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
msgstr[0] "Tillämpade patchen %%s med %d refuserad..."
msgstr[1] "Tillämpade patchen %%s med %d refuserade..."
-#: builtin/apply.c:4008
+#: builtin/apply.c:4048
#, c-format
msgid "truncating .rej filename to %.*s.rej"
msgstr "trunkerar .rej-filnamnet till %.*s.rej"
-#: builtin/apply.c:4029
+#: builtin/apply.c:4069
#, c-format
msgid "Hunk #%d applied cleanly."
msgstr "Stycke %d tillämpades rent."
-#: builtin/apply.c:4032
+#: builtin/apply.c:4072
#, c-format
msgid "Rejected hunk #%d."
msgstr "Refuserar stycke %d."
-#: builtin/apply.c:4182
+#: builtin/apply.c:4222
msgid "unrecognized input"
msgstr "indata känns inte igen"
-#: builtin/apply.c:4193
+#: builtin/apply.c:4233
msgid "unable to read index file"
msgstr "kan inte läsa indexfilen"
-#: builtin/apply.c:4312 builtin/apply.c:4315 builtin/clone.c:91
+#: builtin/apply.c:4352 builtin/apply.c:4355 builtin/clone.c:91
#: builtin/fetch.c:63
msgid "path"
msgstr "sökväg"
-#: builtin/apply.c:4313
+#: builtin/apply.c:4353
msgid "don't apply changes matching the given path"
msgstr "tillämpa inte ändringar som motsvarar given sökväg"
-#: builtin/apply.c:4316
+#: builtin/apply.c:4356
msgid "apply changes matching the given path"
msgstr "tillämpa ändringar som motsvarar given sökväg"
-#: builtin/apply.c:4318
+#: builtin/apply.c:4358
msgid "num"
msgstr "antal"
-#: builtin/apply.c:4319
+#: builtin/apply.c:4359
msgid "remove <num> leading slashes from traditional diff paths"
msgstr "ta bort <antal> inledande snedstreck från traditionella diff-sökvägar"
-#: builtin/apply.c:4322
+#: builtin/apply.c:4362
msgid "ignore additions made by the patch"
msgstr "ignorera tillägg gjorda av patchen"
-#: builtin/apply.c:4324
+#: builtin/apply.c:4364
msgid "instead of applying the patch, output diffstat for the input"
msgstr "istället för att tillämpa patchen, skriv ut diffstat för indata"
-#: builtin/apply.c:4328
+#: builtin/apply.c:4368
msgid "show number of added and deleted lines in decimal notation"
msgstr "visa antal tillagda och borttagna rader decimalt"
-#: builtin/apply.c:4330
+#: builtin/apply.c:4370
msgid "instead of applying the patch, output a summary for the input"
msgstr "istället för att tillämpa patchen, skriv ut en summering av indata"
-#: builtin/apply.c:4332
+#: builtin/apply.c:4372
msgid "instead of applying the patch, see if the patch is applicable"
msgstr "istället för att tillämpa patchen, se om patchen kan tillämpas"
-#: builtin/apply.c:4334
+#: builtin/apply.c:4374
msgid "make sure the patch is applicable to the current index"
msgstr "se till att patchen kan tillämpas på aktuellt index"
-#: builtin/apply.c:4336
+#: builtin/apply.c:4376
msgid "apply a patch without touching the working tree"
msgstr "tillämpa en patch utan att röra arbetskatalogen"
-#: builtin/apply.c:4338
+#: builtin/apply.c:4378
msgid "also apply the patch (use with --stat/--summary/--check)"
msgstr "tillämpa också patchen (använd med --stat/--summary/--check)"
-#: builtin/apply.c:4340
+#: builtin/apply.c:4380
msgid "attempt three-way merge if a patch does not apply"
msgstr "försök en trevägssammanslagning om patchen inte kan tillämpas"
-#: builtin/apply.c:4342
+#: builtin/apply.c:4382
msgid "build a temporary index based on embedded index information"
msgstr "bygg ett temporärt index baserat på inbyggd indexinformation"
-#: builtin/apply.c:4344 builtin/checkout-index.c:197 builtin/ls-files.c:460
+#: builtin/apply.c:4384 builtin/checkout-index.c:197 builtin/ls-files.c:463
msgid "paths are separated with NUL character"
msgstr "sökvägar avdelas med NUL-tecken"
-#: builtin/apply.c:4347
+#: builtin/apply.c:4387
msgid "ensure at least <n> lines of context match"
msgstr "se till att åtminstone <n> rader sammanhang är lika"
-#: builtin/apply.c:4348
+#: builtin/apply.c:4388
msgid "action"
msgstr "åtgärd"
-#: builtin/apply.c:4349
+#: builtin/apply.c:4389
msgid "detect new or modified lines that have whitespace errors"
msgstr "detektera nya eller ändrade rader som har fel i blanktecken"
-#: builtin/apply.c:4352 builtin/apply.c:4355
+#: builtin/apply.c:4392 builtin/apply.c:4395
msgid "ignore changes in whitespace when finding context"
msgstr "ignorera ändringar i blanktecken för sammanhang"
-#: builtin/apply.c:4358
+#: builtin/apply.c:4398
msgid "apply the patch in reverse"
msgstr "tillämpa patchen baklänges"
-#: builtin/apply.c:4360
+#: builtin/apply.c:4400
msgid "don't expect at least one line of context"
msgstr "förvänta inte minst en rad sammanhang"
-#: builtin/apply.c:4362
+#: builtin/apply.c:4402
msgid "leave the rejected hunks in corresponding *.rej files"
msgstr "lämna refuserade stycken i motsvarande *.rej-filer"
-#: builtin/apply.c:4364
+#: builtin/apply.c:4404
msgid "allow overlapping hunks"
msgstr "tillåt överlappande stycken"
-#: builtin/apply.c:4367
+#: builtin/apply.c:4407
msgid "tolerate incorrectly detected missing new-line at the end of file"
msgstr "tolerera felaktigt detekterade saknade nyradstecken vid filslut"
-#: builtin/apply.c:4370
+#: builtin/apply.c:4410
msgid "do not trust the line counts in the hunk headers"
msgstr "lite inte på antalet linjer i styckehuvuden"
-#: builtin/apply.c:4372
+#: builtin/apply.c:4412
msgid "root"
msgstr "rot"
-#: builtin/apply.c:4373
+#: builtin/apply.c:4413
msgid "prepend <root> to all filenames"
msgstr "lägg till <rot> i alla filnamn"
-#: builtin/apply.c:4395
+#: builtin/apply.c:4435
msgid "--3way outside a repository"
msgstr "--3way utanför arkiv"
-#: builtin/apply.c:4403
+#: builtin/apply.c:4443
msgid "--index outside a repository"
msgstr "--index utanför arkiv"
-#: builtin/apply.c:4406
+#: builtin/apply.c:4446
msgid "--cached outside a repository"
msgstr "--cached utanför arkiv"
-#: builtin/apply.c:4422
+#: builtin/apply.c:4462
#, c-format
msgid "can't open patch '%s'"
msgstr "kan inte öppna patchen \"%s\""
-#: builtin/apply.c:4436
+#: builtin/apply.c:4476
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
msgstr[0] "undertryckte %d fel i blanksteg"
msgstr[1] "undertryckte %d fel i blanksteg"
-#: builtin/apply.c:4442 builtin/apply.c:4452
+#: builtin/apply.c:4482 builtin/apply.c:4492
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
@@ -2062,95 +2154,95 @@ msgstr "git blame [flaggor] [rev-flaggor] [rev] [--] fil"
msgid "[rev-opts] are documented in git-rev-list(1)"
msgstr "[rev-flaggor] dokumenteras i git-rev-list(1)"
-#: builtin/blame.c:2364
+#: builtin/blame.c:2350
msgid "Show blame entries as we find them, incrementally"
msgstr "Visa klandringsposter när vi hittar dem, interaktivt"
-#: builtin/blame.c:2365
+#: builtin/blame.c:2351
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr "Visa blank SHA-1 för gränsincheckningar (Standard: av)"
-#: builtin/blame.c:2366
+#: builtin/blame.c:2352
msgid "Do not treat root commits as boundaries (Default: off)"
msgstr "Behandla inte rotincheckningar som gränser (Standard: av)"
-#: builtin/blame.c:2367
+#: builtin/blame.c:2353
msgid "Show work cost statistics"
msgstr "Visa statistik över arbetskostnad"
-#: builtin/blame.c:2368
+#: builtin/blame.c:2354
msgid "Show output score for blame entries"
msgstr "Visa utdatapoäng för klandringsposter"
-#: builtin/blame.c:2369
+#: builtin/blame.c:2355
msgid "Show original filename (Default: auto)"
msgstr "Visa originalfilnamn (Standard: auto)"
-#: builtin/blame.c:2370
+#: builtin/blame.c:2356
msgid "Show original linenumber (Default: off)"
msgstr "Visa ursprungligt radnummer (Standard: av)"
-#: builtin/blame.c:2371
+#: builtin/blame.c:2357
msgid "Show in a format designed for machine consumption"
msgstr "Visa i ett format avsett för maskinkonsumtion"
-#: builtin/blame.c:2372
+#: builtin/blame.c:2358
msgid "Show porcelain format with per-line commit information"
msgstr "Visa porslinsformat med per-rad-incheckningsinformation"
-#: builtin/blame.c:2373
+#: builtin/blame.c:2359
msgid "Use the same output mode as git-annotate (Default: off)"
msgstr "Använd samma utdataläge som git-annotate (Standard: av)"
-#: builtin/blame.c:2374
+#: builtin/blame.c:2360
msgid "Show raw timestamp (Default: off)"
msgstr "Visa rå tidsstämpel (Standard: av)"
-#: builtin/blame.c:2375
+#: builtin/blame.c:2361
msgid "Show long commit SHA1 (Default: off)"
msgstr "Visa lång inchecknings-SHA1 (Standard: av)"
-#: builtin/blame.c:2376
+#: builtin/blame.c:2362
msgid "Suppress author name and timestamp (Default: off)"
msgstr "Undertryck författarnamn och tidsstämpel (Standard: av)"
-#: builtin/blame.c:2377
+#: builtin/blame.c:2363
msgid "Show author email instead of name (Default: off)"
msgstr "Visa författarens e-post istället för namn (Standard: av)"
-#: builtin/blame.c:2378
+#: builtin/blame.c:2364
msgid "Ignore whitespace differences"
msgstr "Ignorera ändringar i blanksteg"
-#: builtin/blame.c:2379
+#: builtin/blame.c:2365
msgid "Spend extra cycles to find better match"
msgstr "Slösa extra cykler med att hitta bättre träff"
-#: builtin/blame.c:2380
+#: builtin/blame.c:2366
msgid "Use revisions from <file> instead of calling git-rev-list"
msgstr "Använd revisioner från <fil> istället för att anropa git-rev-list"
-#: builtin/blame.c:2381
+#: builtin/blame.c:2367
msgid "Use <file>'s contents as the final image"
msgstr "Använd <fil>s innehåll som slutgiltig bild"
-#: builtin/blame.c:2382 builtin/blame.c:2383
+#: builtin/blame.c:2368 builtin/blame.c:2369
msgid "score"
msgstr "poäng"
-#: builtin/blame.c:2382
+#: builtin/blame.c:2368
msgid "Find line copies within and across files"
msgstr "Hitta kopierade rader inuti och mellan filer"
-#: builtin/blame.c:2383
+#: builtin/blame.c:2369
msgid "Find line movements within and across files"
msgstr "Hitta flyttade rader inuti och mellan filer"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "n,m"
msgstr "n,m"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "Process only line range n,m, counting from 1"
msgstr "Behandla endast radintervallet n,m, med början på 1"
@@ -2284,10 +2376,19 @@ msgstr "[%s: före %d, bakom %d] "
msgid "[ahead %d, behind %d]"
msgstr "[före %d, bakom %d] "
+#: builtin/branch.c:469
+msgid " **** invalid ref ****"
+msgstr " **** ogiltig ref ****"
+
#: builtin/branch.c:560
msgid "(no branch)"
msgstr "(ingen gren)"
+#: builtin/branch.c:593
+#, c-format
+msgid "object '%s' does not point to a commit"
+msgstr "objektet \"%s\" pekar på en incheckning"
+
#: builtin/branch.c:625
msgid "some refs could not be read"
msgstr "vissa referenser kunde inte läsas"
@@ -2359,8 +2460,8 @@ msgid "act on remote-tracking branches"
msgstr "arbeta på fjärrspårande grenar"
#: builtin/branch.c:761 builtin/branch.c:767 builtin/branch.c:788
-#: builtin/branch.c:794 builtin/commit.c:1378 builtin/commit.c:1379
-#: builtin/commit.c:1380 builtin/commit.c:1381 builtin/tag.c:470
+#: builtin/branch.c:794 builtin/commit.c:1366 builtin/commit.c:1367
+#: builtin/commit.c:1368 builtin/commit.c:1369 builtin/tag.c:468
msgid "commit"
msgstr "incheckning"
@@ -2428,27 +2529,53 @@ msgstr "Misslyckades slå upp HEAD som giltig referens"
msgid "HEAD not found below refs/heads!"
msgstr "HEAD hittades inte under refs/heads!"
-#: builtin/branch.c:836
+#: builtin/branch.c:839
msgid "--column and --verbose are incompatible"
msgstr "--column och --verbose är inkompatibla"
-#: builtin/branch.c:887
+#: builtin/branch.c:845
+msgid "branch name required"
+msgstr "grennamn krävs"
+
+#: builtin/branch.c:860
+msgid "Cannot give description to detached HEAD"
+msgstr "Kan inte beskriva frånkopplad HEAD"
+
+#: builtin/branch.c:865
+msgid "cannot edit description of more than one branch"
+msgstr "kan inte redigera beskrivning för mer än en gren"
+
+#: builtin/branch.c:872
+#, c-format
+msgid "No commit on branch '%s' yet."
+msgstr "Inga incheckningar på grenen \"%s\" ännu"
+
+#: builtin/branch.c:875
+#, c-format
+msgid "No branch named '%s'."
+msgstr "Ingen gren vid namnet \"%s\"."
+
+#: builtin/branch.c:888
+msgid "too many branches for a rename operation"
+msgstr "för många grenar för namnbyte"
+
+#: builtin/branch.c:893
#, c-format
msgid "branch '%s' does not exist"
msgstr "grenen \"%s\" finns inte"
-#: builtin/branch.c:899
+#: builtin/branch.c:905
#, c-format
msgid "Branch '%s' has no upstream information"
msgstr "Grenen \"%s\" har ingen uppströmsinformation"
-#: builtin/branch.c:914
+#: builtin/branch.c:920
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
msgstr ""
"flaggorna -a och -r på \"git branch\" kan inte anges tillsammans med ett "
"grennamn"
-#: builtin/branch.c:917
+#: builtin/branch.c:923
#, c-format
msgid ""
"The --set-upstream flag is deprecated and will be removed. Consider using --"
@@ -2457,7 +2584,7 @@ msgstr ""
"Flaggan --set-upstream rekommenderas ej och kommer tas bort. Använd --track "
"eller --set-upstream-to\n"
-#: builtin/branch.c:934
+#: builtin/branch.c:940
#, c-format
msgid ""
"\n"
@@ -2468,12 +2595,12 @@ msgstr ""
"Om du vill göra så att \"%s\" spårar \"%s\" gör du så här:\n"
"\n"
-#: builtin/branch.c:935
+#: builtin/branch.c:941
#, c-format
msgid " git branch -d %s\n"
msgstr " git branch -d %s\n"
-#: builtin/branch.c:936
+#: builtin/branch.c:942
#, c-format
msgid " git branch --set-upstream-to %s\n"
msgstr " git branch --set-upstream-to %s\n"
@@ -2547,14 +2674,38 @@ msgstr "visa alla attribut som satts på filen"
msgid "use .gitattributes only from the index"
msgstr "använd .gitattributes endast från indexet"
-#: builtin/check-attr.c:21 builtin/hash-object.c:75
+#: builtin/check-attr.c:21 builtin/check-ignore.c:22 builtin/hash-object.c:75
msgid "read file names from stdin"
msgstr "läs filnamn från standard in"
-#: builtin/check-attr.c:23
+#: builtin/check-attr.c:23 builtin/check-ignore.c:24
msgid "input paths are terminated by a null character"
msgstr "sökvägar avdelas med null-tecken"
+#: builtin/check-ignore.c:18 builtin/checkout.c:1012 builtin/gc.c:177
+msgid "suppress progress reporting"
+msgstr "undertryck förloppsrapportering"
+
+#: builtin/check-ignore.c:151
+msgid "cannot specify pathnames with --stdin"
+msgstr "kan inte ange sökvägsnamn med --stdin"
+
+#: builtin/check-ignore.c:154
+msgid "-z only makes sense with --stdin"
+msgstr "-z kan endast användas tillsammans med --stdin"
+
+#: builtin/check-ignore.c:156
+msgid "no path specified"
+msgstr "ingen sökväg angavs"
+
+#: builtin/check-ignore.c:160
+msgid "--quiet is only valid with a single pathname"
+msgstr "--quiet kan endast användas med ett enkelt sökvägsnamn"
+
+#: builtin/check-ignore.c:162
+msgid "cannot have both --quiet and --verbose"
+msgstr "kan inte använda både --quiet och --verbose"
+
#: builtin/checkout-index.c:126
msgid "git checkout-index [options] [--] [<file>...]"
msgstr "git checkout-index [flaggor] [--] [<fil>...]"
@@ -2788,10 +2939,6 @@ msgstr "\"%s\" kan inte användas med \"%s\""
msgid "Cannot switch branch to a non-commit '%s'"
msgstr "Kan inte växla gren till icke-incheckningen \"%s\""
-#: builtin/checkout.c:1012 builtin/gc.c:177
-msgid "suppress progress reporting"
-msgstr "undertryck förloppsrapportering"
-
#: builtin/checkout.c:1013 builtin/checkout.c:1015 builtin/clone.c:89
#: builtin/remote.c:169 builtin/remote.c:171
msgid "branch"
@@ -2925,47 +3072,47 @@ msgstr "Skulle hoppa över arkivet %s\n"
msgid "failed to remove %s"
msgstr "misslyckades ta bort %s"
-#: builtin/clean.c:159
+#: builtin/clean.c:160
msgid "do not print names of files removed"
msgstr "skriv inte ut namn på borttagna filer"
-#: builtin/clean.c:161
+#: builtin/clean.c:162
msgid "force"
msgstr "tvinga"
-#: builtin/clean.c:163
+#: builtin/clean.c:164
msgid "remove whole directories"
msgstr "ta bort hela kataloger"
-#: builtin/clean.c:164 builtin/describe.c:413 builtin/grep.c:717
-#: builtin/ls-files.c:491 builtin/name-rev.c:231 builtin/show-ref.c:182
+#: builtin/clean.c:165 builtin/describe.c:413 builtin/grep.c:717
+#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182
msgid "pattern"
msgstr "mönster"
-#: builtin/clean.c:165
+#: builtin/clean.c:166
msgid "add <pattern> to ignore rules"
msgstr "lägg till <mönster> till ignoreringsregler"
-#: builtin/clean.c:166
+#: builtin/clean.c:167
msgid "remove ignored files, too"
msgstr "ta även bort ignorerade filer"
-#: builtin/clean.c:168
+#: builtin/clean.c:169
msgid "remove only ignored files"
msgstr "ta endast bort ignorerade filer"
-#: builtin/clean.c:186
+#: builtin/clean.c:187
msgid "-x and -X cannot be used together"
msgstr "-x och -X kan inte användas samtidigt"
-#: builtin/clean.c:190
+#: builtin/clean.c:191
msgid ""
"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
msgstr ""
"clean.requireForce satt till true, men varken -n eller -f angavs; vägrar "
"städa"
-#: builtin/clean.c:193
+#: builtin/clean.c:194
msgid ""
"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
"clean"
@@ -2978,7 +3125,7 @@ msgid "git clone [options] [--] <repo> [<dir>]"
msgstr "git clone [flaggor] [--] <arkiv> [<kat>]"
#: builtin/clone.c:64 builtin/fetch.c:82 builtin/merge.c:212
-#: builtin/push.c:407
+#: builtin/push.c:436
msgid "force progress reporting"
msgstr "tvinga förloppsrapportering"
@@ -3091,11 +3238,6 @@ msgstr "%s finns och är ingen katalog"
msgid "failed to stat %s\n"
msgstr "misslyckades ta status på %s\n"
-#: builtin/clone.c:341
-#, c-format
-msgid "failed to unlink '%s'"
-msgstr "misslyckades ta bort länken \"%s\""
-
#: builtin/clone.c:346
#, c-format
msgid "failed to create link '%s'"
@@ -3157,7 +3299,7 @@ msgstr "destinationssökvägen \"%s\" finns redan och är inte en tom katalog."
msgid "working tree '%s' already exists."
msgstr "arbetsträdet \"%s\" finns redan."
-#: builtin/clone.c:759 builtin/clone.c:773
+#: builtin/clone.c:759 builtin/clone.c:771
#, c-format
msgid "could not create leading directories of '%s'"
msgstr "kunde inte skapa inledande kataloger för \"%s\""
@@ -3167,27 +3309,27 @@ msgstr "kunde inte skapa inledande kataloger för \"%s\""
msgid "could not create work tree dir '%s'."
msgstr "kunde inte skapa arbetskatalogen \"%s\""
-#: builtin/clone.c:783
+#: builtin/clone.c:781
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr "Klonar till ett naket arkiv \"%s\"...\n"
-#: builtin/clone.c:785
+#: builtin/clone.c:783
#, c-format
msgid "Cloning into '%s'...\n"
msgstr "Klonar till \"%s\"...\n"
-#: builtin/clone.c:827
+#: builtin/clone.c:818
#, c-format
msgid "Don't know how to clone %s"
msgstr "Vet inte hur man klonar %s"
-#: builtin/clone.c:876
+#: builtin/clone.c:867
#, c-format
msgid "Remote branch %s not found in upstream %s"
msgstr "Fjärrgrenen %s hittades inte i uppströmsarkivet %s"
-#: builtin/clone.c:883
+#: builtin/clone.c:874
msgid "You appear to have cloned an empty repository."
msgstr "Du verkar ha klonat ett tomt arkiv."
@@ -3224,12 +3366,12 @@ msgid "--command must be the first argument"
msgstr "--command måste vara första argument"
#: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
-msgstr "git commit [flaggor] [--] <filmöster>..."
+msgid "git commit [options] [--] <pathspec>..."
+msgstr "git commit [flaggor] [--] <sökväg>..."
#: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
-msgstr "git status [flaggor] [--] <filmönster>..."
+msgid "git status [options] [--] <pathspec>..."
+msgstr "git status [flaggor] [--] <sökväg>..."
#: builtin/commit.c:44
msgid ""
@@ -3399,21 +3541,24 @@ msgstr ""
"och försöker igen.\n"
#: builtin/commit.c:735
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be ignored, and an empty message aborts the commit.\n"
+"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
"Ange incheckningsmeddelandet för dina ändringar. Rader som inleds\n"
-"med \"#\" kommer ignoreras, och ett tomt meddelande avbryter incheckningen.\n"
+"med \"%c\" kommer ignoreras, och ett tomt meddelande avbryter "
+"incheckningen.\n"
#: builtin/commit.c:740
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be kept; you may remove them yourself if you want to.\n"
+"with '%c' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
"Ange incheckningsmeddelandet för dina ändringar. Rader som inleds\n"
-"med \"#\" kommer behållas; du kan själv ta bort dem om du vill.\n"
+"med \"%c\" kommer behållas; du kan själv ta bort dem om du vill.\n"
"Ett tomt meddelande avbryter incheckningen.\n"
#: builtin/commit.c:753
@@ -3434,7 +3579,7 @@ msgstr "Kan inte läsa indexet"
msgid "Error building trees"
msgstr "Fel vid byggande av träd"
-#: builtin/commit.c:832 builtin/tag.c:361
+#: builtin/commit.c:832 builtin/tag.c:359
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr "Ange meddelandet en av flaggorna -m eller -F.\n"
@@ -3444,111 +3589,111 @@ msgstr "Ange meddelandet en av flaggorna -m eller -F.\n"
msgid "No existing author found with '%s'"
msgstr "Hittade ingen befintlig författare med \"%s\""
-#: builtin/commit.c:944 builtin/commit.c:1148
+#: builtin/commit.c:944 builtin/commit.c:1138
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr "Ogiltigt läge för ospårade filer: \"%s\""
-#: builtin/commit.c:984
+#: builtin/commit.c:974
msgid "Using both --reset-author and --author does not make sense"
msgstr "Kan inte använda både --reset-author och --author"
-#: builtin/commit.c:995
+#: builtin/commit.c:985
msgid "You have nothing to amend."
msgstr "Du har inget att utöka."
-#: builtin/commit.c:998
+#: builtin/commit.c:988
msgid "You are in the middle of a merge -- cannot amend."
msgstr "Du är i mitten av en sammanslagning -- kan inte utöka."
-#: builtin/commit.c:1000
+#: builtin/commit.c:990
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr "Du är i mitten av en cherry-pick -- kan inte utöka."
-#: builtin/commit.c:1003
+#: builtin/commit.c:993
msgid "Options --squash and --fixup cannot be used together"
msgstr "Flaggorna --squash och --fixup kan inte användas samtidigt"
-#: builtin/commit.c:1013
+#: builtin/commit.c:1003
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr "Endast en av -c/-C/-F/--fixup kan användas."
-#: builtin/commit.c:1015
+#: builtin/commit.c:1005
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "Flaggan -m kan inte kombineras med -c/-C/-F/--fixup."
-#: builtin/commit.c:1023
+#: builtin/commit.c:1013
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr "--reset-author kan endast användas med -C, -c eller --amend."
-#: builtin/commit.c:1040
+#: builtin/commit.c:1030
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr ""
"Endast en av --include/--only/--all/--interactive/--patch kan användas."
-#: builtin/commit.c:1042
+#: builtin/commit.c:1032
msgid "No paths with --include/--only does not make sense."
msgstr "Du måste ange sökvägar tillsammans med --include/--only."
-#: builtin/commit.c:1044
+#: builtin/commit.c:1034
msgid "Clever... amending the last one with dirty index."
msgstr "Smart... utöka den senaste med smutsigt index."
-#: builtin/commit.c:1046
+#: builtin/commit.c:1036
msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
msgstr "Explicita sökvägar angavs utan -i eller -o; antar --only sökvägar..."
-#: builtin/commit.c:1056 builtin/tag.c:577
+#: builtin/commit.c:1046 builtin/tag.c:575
#, c-format
msgid "Invalid cleanup mode %s"
msgstr "Felaktigt städningsläge %s"
-#: builtin/commit.c:1061
+#: builtin/commit.c:1051
msgid "Paths with -a does not make sense."
msgstr "Kan inte ange sökvägar med -a."
-#: builtin/commit.c:1067 builtin/commit.c:1202
+#: builtin/commit.c:1057 builtin/commit.c:1192
msgid "--long and -z are incompatible"
msgstr "--long och -z är inkompatibla"
-#: builtin/commit.c:1162 builtin/commit.c:1400
+#: builtin/commit.c:1152 builtin/commit.c:1388
msgid "show status concisely"
msgstr "vis koncis status"
-#: builtin/commit.c:1164 builtin/commit.c:1402
+#: builtin/commit.c:1154 builtin/commit.c:1390
msgid "show branch information"
msgstr "visa information om gren"
-#: builtin/commit.c:1166 builtin/commit.c:1404 builtin/push.c:397
+#: builtin/commit.c:1156 builtin/commit.c:1392 builtin/push.c:426
msgid "machine-readable output"
msgstr "maskinläsbar utdata"
-#: builtin/commit.c:1169 builtin/commit.c:1406
+#: builtin/commit.c:1159 builtin/commit.c:1394
msgid "show status in long format (default)"
msgstr "visa status i långt format (standard)"
-#: builtin/commit.c:1172 builtin/commit.c:1409
+#: builtin/commit.c:1162 builtin/commit.c:1397
msgid "terminate entries with NUL"
msgstr "terminera poster med NUL"
-#: builtin/commit.c:1174 builtin/commit.c:1412 builtin/fast-export.c:647
-#: builtin/fast-export.c:650 builtin/tag.c:461
+#: builtin/commit.c:1164 builtin/commit.c:1400 builtin/fast-export.c:647
+#: builtin/fast-export.c:650 builtin/tag.c:459
msgid "mode"
msgstr "läge"
-#: builtin/commit.c:1175 builtin/commit.c:1412
+#: builtin/commit.c:1165 builtin/commit.c:1400
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr "visa ospårade filer, valfria lägen: alla, normal, no. (Standard: all)"
-#: builtin/commit.c:1178
+#: builtin/commit.c:1168
msgid "show ignored files"
msgstr "visa ignorerade filer"
-#: builtin/commit.c:1179 parse-options.h:151
+#: builtin/commit.c:1169 parse-options.h:151
msgid "when"
msgstr "när"
-#: builtin/commit.c:1180
+#: builtin/commit.c:1170
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
@@ -3556,217 +3701,217 @@ msgstr ""
"ignorera ändringar i undermoduler, valfritt när: all, dirty, untracked. "
"(Default: all)"
-#: builtin/commit.c:1182
+#: builtin/commit.c:1172
msgid "list untracked files in columns"
msgstr "visa ospårade filer i spalter"
-#: builtin/commit.c:1256
+#: builtin/commit.c:1246
msgid "couldn't look up newly created commit"
msgstr "kunde inte slå upp en precis skapad incheckning"
-#: builtin/commit.c:1258
+#: builtin/commit.c:1248
msgid "could not parse newly created commit"
msgstr "kunde inte tolka en precis skapad incheckning"
-#: builtin/commit.c:1299
+#: builtin/commit.c:1289
msgid "detached HEAD"
msgstr "frånkopplad HEAD"
-#: builtin/commit.c:1301
+#: builtin/commit.c:1291
msgid " (root-commit)"
msgstr " (rotincheckning)"
-#: builtin/commit.c:1370
+#: builtin/commit.c:1358
msgid "suppress summary after successful commit"
msgstr "undertryck sammanfattning efter framgångsrik incheckning"
-#: builtin/commit.c:1371
+#: builtin/commit.c:1359
msgid "show diff in commit message template"
msgstr "visa diff i mallen för incheckningsmeddelandet"
-#: builtin/commit.c:1373
+#: builtin/commit.c:1361
msgid "Commit message options"
msgstr "Alternativ för incheckningsmeddelande"
-#: builtin/commit.c:1374 builtin/tag.c:459
+#: builtin/commit.c:1362 builtin/tag.c:457
msgid "read message from file"
msgstr "läs meddelande från fil"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "author"
msgstr "författare"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "override author for commit"
msgstr "överstyr författare för incheckningen"
-#: builtin/commit.c:1376 builtin/gc.c:178
+#: builtin/commit.c:1364 builtin/gc.c:178
msgid "date"
msgstr "datum"
-#: builtin/commit.c:1376
+#: builtin/commit.c:1364
msgid "override date for commit"
msgstr "överstyr datum för inchecknignen"
-#: builtin/commit.c:1377 builtin/merge.c:206 builtin/notes.c:537
-#: builtin/notes.c:694 builtin/tag.c:457
+#: builtin/commit.c:1365 builtin/merge.c:206 builtin/notes.c:533
+#: builtin/notes.c:690 builtin/tag.c:455
msgid "message"
msgstr "meddelande"
-#: builtin/commit.c:1377
+#: builtin/commit.c:1365
msgid "commit message"
msgstr "incheckningsmeddelande"
-#: builtin/commit.c:1378
+#: builtin/commit.c:1366
msgid "reuse and edit message from specified commit"
msgstr "återanvänd och redigera meddelande från angiven incheckning"
-#: builtin/commit.c:1379
+#: builtin/commit.c:1367
msgid "reuse message from specified commit"
msgstr "återanvänd meddelande från angiven incheckning"
-#: builtin/commit.c:1380
+#: builtin/commit.c:1368
msgid "use autosquash formatted message to fixup specified commit"
msgstr ""
"använd autosquash-formaterat meddelande för att fixa angiven incheckning"
-#: builtin/commit.c:1381
+#: builtin/commit.c:1369
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
"använd autosquash-formaterat meddelande för att slå ihop med angiven "
"incheckning"
-#: builtin/commit.c:1382
+#: builtin/commit.c:1370
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr "jag är nu författare av incheckningen (används med -C/-c/--amend)"
-#: builtin/commit.c:1383 builtin/log.c:1102 builtin/revert.c:109
+#: builtin/commit.c:1371 builtin/log.c:1102 builtin/revert.c:109
msgid "add Signed-off-by:"
msgstr "lägg till Signed-off-by:"
-#: builtin/commit.c:1384
+#: builtin/commit.c:1372
msgid "use specified template file"
msgstr "använd angiven mallfil"
-#: builtin/commit.c:1385
+#: builtin/commit.c:1373
msgid "force edit of commit"
msgstr "tvinga redigering av incheckning"
-#: builtin/commit.c:1386
+#: builtin/commit.c:1374
msgid "default"
msgstr "standard"
-#: builtin/commit.c:1386 builtin/tag.c:462
+#: builtin/commit.c:1374 builtin/tag.c:460
msgid "how to strip spaces and #comments from message"
msgstr "hur blanksteg och #kommentarer skall tas bort från meddelande"
-#: builtin/commit.c:1387
+#: builtin/commit.c:1375
msgid "include status in commit message template"
msgstr "inkludera status i mallen för incheckningsmeddelandet"
-#: builtin/commit.c:1388 builtin/merge.c:213 builtin/tag.c:463
+#: builtin/commit.c:1376 builtin/merge.c:213 builtin/tag.c:461
msgid "key id"
msgstr "nyckel-id"
-#: builtin/commit.c:1389 builtin/merge.c:214
+#: builtin/commit.c:1377 builtin/merge.c:214
msgid "GPG sign commit"
msgstr "GPG-signera incheckning"
#. end commit message options
-#: builtin/commit.c:1392
+#: builtin/commit.c:1380
msgid "Commit contents options"
msgstr "Alternativ för incheckningens innehåll"
-#: builtin/commit.c:1393
+#: builtin/commit.c:1381
msgid "commit all changed files"
msgstr "checka in alla ändrade filer"
-#: builtin/commit.c:1394
+#: builtin/commit.c:1382
msgid "add specified files to index for commit"
msgstr "lägg till angivna filer till indexet för incheckning"
-#: builtin/commit.c:1395
+#: builtin/commit.c:1383
msgid "interactively add files"
msgstr "lägg till filer interaktivt"
-#: builtin/commit.c:1396
+#: builtin/commit.c:1384
msgid "interactively add changes"
msgstr "lägg till ändringar interaktivt"
-#: builtin/commit.c:1397
+#: builtin/commit.c:1385
msgid "commit only specified files"
msgstr "checka endast in angivna filer"
-#: builtin/commit.c:1398
+#: builtin/commit.c:1386
msgid "bypass pre-commit hook"
msgstr "förbigå pre-commit-krok"
-#: builtin/commit.c:1399
+#: builtin/commit.c:1387
msgid "show what would be committed"
msgstr "visa vad som skulle checkas in"
-#: builtin/commit.c:1410
+#: builtin/commit.c:1398
msgid "amend previous commit"
msgstr "lägg till föregående incheckning"
-#: builtin/commit.c:1411
+#: builtin/commit.c:1399
msgid "bypass post-rewrite hook"
msgstr "förbigå post-rewrite-krok"
-#: builtin/commit.c:1416
+#: builtin/commit.c:1404
msgid "ok to record an empty change"
msgstr "ok att registrera en tom ändring"
-#: builtin/commit.c:1419
+#: builtin/commit.c:1407
msgid "ok to record a change with an empty message"
msgstr "ok att registrera en ändring med tomt meddelande"
-#: builtin/commit.c:1451
+#: builtin/commit.c:1439
msgid "could not parse HEAD commit"
msgstr "kunde inte tolka HEAD:s incheckning"
-#: builtin/commit.c:1489 builtin/merge.c:508
+#: builtin/commit.c:1477 builtin/merge.c:508
#, c-format
msgid "could not open '%s' for reading"
msgstr "kunde inte öppna \"%s\" för läsning"
-#: builtin/commit.c:1496
+#: builtin/commit.c:1484
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "Trasig MERGE_HEAD-fil (%s)"
-#: builtin/commit.c:1503
+#: builtin/commit.c:1491
msgid "could not read MERGE_MODE"
msgstr "kunde inte läsa MERGE_MODE"
-#: builtin/commit.c:1522
+#: builtin/commit.c:1510
#, c-format
msgid "could not read commit message: %s"
msgstr "kunde inte läsa incheckningsmeddelande: %s"
-#: builtin/commit.c:1536
+#: builtin/commit.c:1524
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr "Avbryter incheckning; meddelandet inte redigerat.\n"
-#: builtin/commit.c:1541
+#: builtin/commit.c:1529
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr "Avbryter på grund av tomt incheckningsmeddelande.\n"
-#: builtin/commit.c:1556 builtin/merge.c:833 builtin/merge.c:858
+#: builtin/commit.c:1544 builtin/merge.c:832 builtin/merge.c:857
msgid "failed to write commit object"
msgstr "kunde inte skriva incheckningsobjekt"
-#: builtin/commit.c:1577
+#: builtin/commit.c:1565
msgid "cannot lock HEAD ref"
msgstr "kunde inte låsa HEAD-referens"
-#: builtin/commit.c:1581
+#: builtin/commit.c:1569
msgid "cannot update HEAD ref"
msgstr "kunde inte uppdatera HEAD-referens"
-#: builtin/commit.c:1592
+#: builtin/commit.c:1580
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
@@ -4175,88 +4320,92 @@ msgstr "tillåt uppdatering av HEAD-referens"
msgid "deepen history of shallow clone"
msgstr "fördjupa historik för grund klon"
-#: builtin/fetch.c:85 builtin/log.c:1119
+#: builtin/fetch.c:86
+msgid "convert to a complete repository"
+msgstr "konvertera till komplett arkiv"
+
+#: builtin/fetch.c:88 builtin/log.c:1119
msgid "dir"
msgstr "kat"
-#: builtin/fetch.c:86
+#: builtin/fetch.c:89
msgid "prepend this to submodule path output"
msgstr "lägg till i början av undermodulens sökvägsutdata"
-#: builtin/fetch.c:89
+#: builtin/fetch.c:92
msgid "default mode for recursion"
msgstr "standardläge för rekursion"
-#: builtin/fetch.c:201
+#: builtin/fetch.c:204
msgid "Couldn't find remote ref HEAD"
msgstr "Kunde inte hitta fjärr-referensen HEAD"
-#: builtin/fetch.c:254
+#: builtin/fetch.c:257
#, c-format
msgid "object %s not found"
msgstr "objektet %s hittades inte"
-#: builtin/fetch.c:259
+#: builtin/fetch.c:262
msgid "[up to date]"
msgstr "[àjour]"
-#: builtin/fetch.c:273
+#: builtin/fetch.c:276
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
msgstr "! %-*s %-*s -> %s (kan inte hämta i aktuell gren)"
-#: builtin/fetch.c:274 builtin/fetch.c:360
+#: builtin/fetch.c:277 builtin/fetch.c:363
msgid "[rejected]"
msgstr "[refuserad]"
-#: builtin/fetch.c:285
+#: builtin/fetch.c:288
msgid "[tag update]"
msgstr "[uppdaterad tagg]"
-#: builtin/fetch.c:287 builtin/fetch.c:322 builtin/fetch.c:340
+#: builtin/fetch.c:290 builtin/fetch.c:325 builtin/fetch.c:343
msgid " (unable to update local ref)"
msgstr " (kunde inte uppdatera lokal ref)"
-#: builtin/fetch.c:305
+#: builtin/fetch.c:308
msgid "[new tag]"
msgstr "[ny tagg]"
-#: builtin/fetch.c:308
+#: builtin/fetch.c:311
msgid "[new branch]"
msgstr "[ny gren]"
-#: builtin/fetch.c:311
+#: builtin/fetch.c:314
msgid "[new ref]"
msgstr "[ny ref]"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "unable to update local ref"
msgstr "kunde inte uppdatera lokal ref"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "forced update"
msgstr "tvingad uppdatering"
-#: builtin/fetch.c:362
+#: builtin/fetch.c:365
msgid "(non-fast-forward)"
msgstr "(ej snabbspolad)"
-#: builtin/fetch.c:393 builtin/fetch.c:685
+#: builtin/fetch.c:396 builtin/fetch.c:688
#, c-format
msgid "cannot open %s: %s\n"
msgstr "kan inte öppna %s: %s\n"
-#: builtin/fetch.c:402
+#: builtin/fetch.c:405
#, c-format
msgid "%s did not send all necessary objects\n"
msgstr "%s sände inte alla nödvändiga objekt\n"
-#: builtin/fetch.c:488
+#: builtin/fetch.c:491
#, c-format
msgid "From %.*s\n"
msgstr "Från %.*s\n"
-#: builtin/fetch.c:499
+#: builtin/fetch.c:502
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
@@ -4265,55 +4414,55 @@ msgstr ""
"vissa lokala referenser kunde inte uppdateras; testa att köra\n"
" \"git remote prune %s\" för att ta bort gamla grenar som står i konflikt"
-#: builtin/fetch.c:549
+#: builtin/fetch.c:552
#, c-format
msgid " (%s will become dangling)"
msgstr " (%s kommer bli dinglande)"
-#: builtin/fetch.c:550
+#: builtin/fetch.c:553
#, c-format
msgid " (%s has become dangling)"
msgstr " (%s har blivit dinglande)"
-#: builtin/fetch.c:557
+#: builtin/fetch.c:560
msgid "[deleted]"
msgstr "[borttagen]"
-#: builtin/fetch.c:558 builtin/remote.c:1055
+#: builtin/fetch.c:561 builtin/remote.c:1055
msgid "(none)"
msgstr "(ingen)"
-#: builtin/fetch.c:675
+#: builtin/fetch.c:678
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
msgstr "Vägrar hämta till aktuell gren %s i ett icke-naket arkiv"
-#: builtin/fetch.c:709
+#: builtin/fetch.c:712
#, c-format
msgid "Don't know how to fetch from %s"
msgstr "Vet inte hur man hämtar från %s"
-#: builtin/fetch.c:786
+#: builtin/fetch.c:789
#, c-format
msgid "Option \"%s\" value \"%s\" is not valid for %s"
msgstr "Flaggan \"%s\" och värdet \"%s\" är inte giltigt för %s"
-#: builtin/fetch.c:789
+#: builtin/fetch.c:792
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
msgstr "Flaggan \"%s\" ignoreras för %s\n"
-#: builtin/fetch.c:891
+#: builtin/fetch.c:894
#, c-format
msgid "Fetching %s\n"
msgstr "Hämtar %s\n"
-#: builtin/fetch.c:893 builtin/remote.c:100
+#: builtin/fetch.c:896 builtin/remote.c:100
#, c-format
msgid "Could not fetch %s"
msgstr "Kunde inte hämta %s"
-#: builtin/fetch.c:912
+#: builtin/fetch.c:915
msgid ""
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
@@ -4321,24 +4470,32 @@ msgstr ""
"Inget fjärrarkiv angavs. Ange antingen en URL eller namnet på ett\n"
"fjärrarkiv som nya incheckningar skall hämtas från."
-#: builtin/fetch.c:932
+#: builtin/fetch.c:935
msgid "You need to specify a tag name."
msgstr "Du måste ange namnet på en tagg."
-#: builtin/fetch.c:984
+#: builtin/fetch.c:981
+msgid "--depth and --unshallow cannot be used together"
+msgstr "--depth och --unshallow kan inte användas samtidigt"
+
+#: builtin/fetch.c:983
+msgid "--unshallow on a complete repository does not make sense"
+msgstr "--unshallow kan inte användas på ett komplett arkiv"
+
+#: builtin/fetch.c:1002
msgid "fetch --all does not take a repository argument"
msgstr "fetch --all tar inte namnet på ett arkiv som argument"
-#: builtin/fetch.c:986
+#: builtin/fetch.c:1004
msgid "fetch --all does not make sense with refspecs"
msgstr "fetch --all kan inte anges med referensspecifikationer"
-#: builtin/fetch.c:997
+#: builtin/fetch.c:1015
#, c-format
msgid "No such remote or remote group: %s"
msgstr "Fjärren eller fjärrgruppen finns inte: %s"
-#: builtin/fetch.c:1005
+#: builtin/fetch.c:1023
msgid "Fetching a group and specifying refspecs does not make sense"
msgstr "Kan inte hämta från grupp och ange referensspecifikationer"
@@ -4349,7 +4506,7 @@ msgstr ""
#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701
#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175
-#: builtin/tag.c:448 parse-options.h:133 parse-options.h:239
+#: builtin/tag.c:446 parse-options.h:133 parse-options.h:239
msgid "n"
msgstr "n"
@@ -4710,23 +4867,23 @@ msgstr "inget mönster angavs."
msgid "bad object %s"
msgstr "felaktigt objekt %s"
-#: builtin/grep.c:866
+#: builtin/grep.c:868
msgid "--open-files-in-pager only works on the worktree"
msgstr "--open-files-in-pager fungerar endast i arbetskatalogen"
-#: builtin/grep.c:889
+#: builtin/grep.c:891
msgid "--cached or --untracked cannot be used with --no-index."
msgstr "--cached och --untracked kan inte användas med --no-index."
-#: builtin/grep.c:894
+#: builtin/grep.c:896
msgid "--no-index or --untracked cannot be used with revs."
msgstr "--no-index och --untracked kan inte användas med revisioner."
-#: builtin/grep.c:897
+#: builtin/grep.c:899
msgid "--[no-]exclude-standard cannot be used for tracked contents."
msgstr "--[no-]exclude-standard kan inte användas för spårat innehåll."
-#: builtin/grep.c:905
+#: builtin/grep.c:907
msgid "both --cached and trees are given."
msgstr "både --cached och träd angavs."
@@ -4766,50 +4923,50 @@ msgstr "spara filen som den är utan filer"
msgid "process file as it were from this path"
msgstr "hantera filen som om den kom från sökvägen"
-#: builtin/help.c:43
+#: builtin/help.c:42
msgid "print all available commands"
msgstr "visa alla tillgängliga kommandon"
-#: builtin/help.c:44
+#: builtin/help.c:43
msgid "show man page"
msgstr "visa manualsida"
-#: builtin/help.c:45
+#: builtin/help.c:44
msgid "show manual in web browser"
msgstr "visa manual i webbläsare"
-#: builtin/help.c:47
+#: builtin/help.c:46
msgid "show info page"
msgstr "visa info-sida"
-#: builtin/help.c:53
+#: builtin/help.c:52
msgid "git help [--all] [--man|--web|--info] [command]"
msgstr "git help [--all] [--man|--web|--info] [kommando]"
-#: builtin/help.c:65
+#: builtin/help.c:64
#, c-format
msgid "unrecognized help format '%s'"
msgstr "okänt hjälpformat: %s"
-#: builtin/help.c:93
+#: builtin/help.c:92
msgid "Failed to start emacsclient."
msgstr "Misslyckades starta emacsclient."
-#: builtin/help.c:106
+#: builtin/help.c:105
msgid "Failed to parse emacsclient version."
msgstr "Kunde inte tolka emacsclient-version."
-#: builtin/help.c:114
+#: builtin/help.c:113
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
msgstr "emacsclient version \"%d\" för gammal (< 22)."
-#: builtin/help.c:132 builtin/help.c:160 builtin/help.c:169 builtin/help.c:177
+#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176
#, c-format
msgid "failed to exec '%s': %s"
msgstr "exec misslyckades för \"%s\": %s"
-#: builtin/help.c:217
+#: builtin/help.c:216
#, c-format
msgid ""
"'%s': path for unsupported man viewer.\n"
@@ -4818,7 +4975,7 @@ msgstr ""
"\"%s\": sökväg för man-visare som ej stöds.\n"
"Använd \"man.<verktyg>.cmd\" istället."
-#: builtin/help.c:229
+#: builtin/help.c:228
#, c-format
msgid ""
"'%s': cmd for supported man viewer.\n"
@@ -4827,29 +4984,25 @@ msgstr ""
"\"%s\": kommando för man-visare som stöds.\n"
"Använd \"man.<verktyg>.path\" istället."
-#: builtin/help.c:299
-msgid "The most commonly used git commands are:"
-msgstr "De mest använda git-kommandona är:"
-
-#: builtin/help.c:367
+#: builtin/help.c:349
#, c-format
msgid "'%s': unknown man viewer."
msgstr "\"%s\": okänd man-visare."
-#: builtin/help.c:384
+#: builtin/help.c:366
msgid "no man viewer handled the request"
msgstr "ingen man-visare hanterade förfrågan"
-#: builtin/help.c:392
+#: builtin/help.c:374
msgid "no info viewer handled the request"
msgstr "ingen info-visare hanterade förfrågan"
-#: builtin/help.c:447 builtin/help.c:454
+#: builtin/help.c:429 builtin/help.c:436
#, c-format
msgid "usage: %s%s"
msgstr "användning: %s%s"
-#: builtin/help.c:470
+#: builtin/help.c:452
#, c-format
msgid "`git %s' is aliased to `%s'"
msgstr "\"git %s\" är ett alias för \"%s\""
@@ -5545,95 +5698,95 @@ msgstr "Kunde inte hitta en spårad fjärrgren, ange <uppström> manuellt.\n"
msgid "Unknown commit %s"
msgstr "Okänd incheckning %s"
-#: builtin/ls-files.c:408
+#: builtin/ls-files.c:409
msgid "git ls-files [options] [<file>...]"
msgstr "git ls-files [flaggor] [<fil>...]"
-#: builtin/ls-files.c:463
+#: builtin/ls-files.c:466
msgid "identify the file status with tags"
msgstr "identifiera filstatus med taggar"
-#: builtin/ls-files.c:465
+#: builtin/ls-files.c:468
msgid "use lowercase letters for 'assume unchanged' files"
msgstr "använd små bokstäver för \"anta oförändrade\"-filer"
-#: builtin/ls-files.c:467
+#: builtin/ls-files.c:470
msgid "show cached files in the output (default)"
msgstr "visa cachade filer i utdata (standard)"
-#: builtin/ls-files.c:469
+#: builtin/ls-files.c:472
msgid "show deleted files in the output"
msgstr "visa borttagna filer i utdata"
-#: builtin/ls-files.c:471
+#: builtin/ls-files.c:474
msgid "show modified files in the output"
msgstr "visa modifierade filer i utdata"
-#: builtin/ls-files.c:473
+#: builtin/ls-files.c:476
msgid "show other files in the output"
msgstr "visa andra filer i utdata"
-#: builtin/ls-files.c:475
+#: builtin/ls-files.c:478
msgid "show ignored files in the output"
msgstr "visa ignorerade filer i utdata"
-#: builtin/ls-files.c:478
+#: builtin/ls-files.c:481
msgid "show staged contents' object name in the output"
msgstr "visa köat innehålls objektnamn i utdata"
-#: builtin/ls-files.c:480
+#: builtin/ls-files.c:483
msgid "show files on the filesystem that need to be removed"
msgstr "visa filer i filsystemet som behöver tas bort"
-#: builtin/ls-files.c:482
+#: builtin/ls-files.c:485
msgid "show 'other' directories' name only"
msgstr "visa endast namn för \"andra\" kataloger"
-#: builtin/ls-files.c:485
+#: builtin/ls-files.c:488
msgid "don't show empty directories"
msgstr "visa inte tomma kataloger"
-#: builtin/ls-files.c:488
+#: builtin/ls-files.c:491
msgid "show unmerged files in the output"
msgstr "visa ej sammanslagna filer i utdata"
-#: builtin/ls-files.c:490
+#: builtin/ls-files.c:493
msgid "show resolve-undo information"
msgstr "visa \"resolve-undo\"-information"
-#: builtin/ls-files.c:492
+#: builtin/ls-files.c:495
msgid "skip files matching pattern"
msgstr "hoppa över filer som motsvarar mönster"
-#: builtin/ls-files.c:495
+#: builtin/ls-files.c:498
msgid "exclude patterns are read from <file>"
msgstr "exkludera mönster som läses från <fil>"
-#: builtin/ls-files.c:498
+#: builtin/ls-files.c:501
msgid "read additional per-directory exclude patterns in <file>"
msgstr "läs ytterligare per-katalog-exkluderingsmönster från <fil>"
-#: builtin/ls-files.c:500
+#: builtin/ls-files.c:503
msgid "add the standard git exclusions"
msgstr "lägg till git:s standardexkluderingar"
-#: builtin/ls-files.c:503
+#: builtin/ls-files.c:506
msgid "make the output relative to the project top directory"
msgstr "gör utdata relativ till projektets toppkatalog"
-#: builtin/ls-files.c:506
+#: builtin/ls-files.c:509
msgid "if any <file> is not in the index, treat this as an error"
msgstr "om en <fil> inte är indexet, betrakta det som ett fel"
-#: builtin/ls-files.c:507
+#: builtin/ls-files.c:510
msgid "tree-ish"
msgstr "träd-igt"
-#: builtin/ls-files.c:508
+#: builtin/ls-files.c:511
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr "låtsas att sökvägar borttagna sedan <träd-igt> fortfarande finns"
-#: builtin/ls-files.c:510
+#: builtin/ls-files.c:513
msgid "show debugging data"
msgstr "visa felsökningsutdata"
@@ -5741,7 +5894,7 @@ msgstr "tillåt snabbspolning (standard)"
msgid "abort if fast-forward is not possible"
msgstr "avbryt om snabbspolning inte är möjlig"
-#: builtin/merge.c:202 builtin/notes.c:870 builtin/revert.c:112
+#: builtin/merge.c:202 builtin/notes.c:866 builtin/revert.c:112
msgid "strategy"
msgstr "strategi"
@@ -5845,67 +5998,68 @@ msgstr ""
"den.\n"
#: builtin/merge.c:788
+#, c-format
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"
-"Lines starting with '#' will be ignored, and an empty message aborts\n"
+"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
"Ange ett incheckningsmeddelande för att förklara varför sammanslagningen\n"
"är nödvändig, speciellt om den slår in en uppdaterad uppström i en\n"
"temagren.\n"
"\n"
-"Rader som inleds med \"#\" kommer ignoreras, och ett tomt meddelande\n"
+"Rader som inleds med \"%c\" kommer ignoreras, och ett tomt meddelande\n"
"avbryter incheckningen.\n"
-#: builtin/merge.c:813
+#: builtin/merge.c:812
msgid "Empty commit message."
msgstr "Tomt incheckningsmeddelande."
-#: builtin/merge.c:825
+#: builtin/merge.c:824
#, c-format
msgid "Wonderful.\n"
msgstr "Underbart.\n"
-#: builtin/merge.c:890
+#: builtin/merge.c:889
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
"Kunde inte slå ihop automatiskt; fixa konflikter och checka in resultatet.\n"
-#: builtin/merge.c:906
+#: builtin/merge.c:905
#, c-format
msgid "'%s' is not a commit"
msgstr "\"%s\" är inte en incheckning"
-#: builtin/merge.c:947
+#: builtin/merge.c:946
msgid "No current branch."
msgstr "Inte på någon gren."
-#: builtin/merge.c:949
+#: builtin/merge.c:948
msgid "No remote for the current branch."
msgstr "Ingen fjärr för aktuell gren."
-#: builtin/merge.c:951
+#: builtin/merge.c:950
msgid "No default upstream defined for the current branch."
msgstr "Ingen standarduppström angiven för aktuell gren."
-#: builtin/merge.c:956
+#: builtin/merge.c:955
#, c-format
msgid "No remote tracking branch for %s from %s"
msgstr "Ingen fjärrspårande gren för %s från %s"
-#: builtin/merge.c:1043 builtin/merge.c:1200
+#: builtin/merge.c:1042 builtin/merge.c:1199
#, c-format
msgid "%s - not something we can merge"
msgstr "%s - inte något vi kan slå ihop"
-#: builtin/merge.c:1111
+#: builtin/merge.c:1110
msgid "There is no merge to abort (MERGE_HEAD missing)."
msgstr "Det finns ingen sammanslagning att avbryta (MERGE_HEAD saknas)."
-#: builtin/merge.c:1127 git-pull.sh:31
+#: builtin/merge.c:1126 git-pull.sh:31
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -5913,11 +6067,11 @@ msgstr ""
"Du har inte avslutat sammanslagningen (MERGE_HEAD finns).\n"
"Checka in dina ändringar innan du kan slå ihop."
-#: builtin/merge.c:1130 git-pull.sh:34
+#: builtin/merge.c:1129 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
msgstr "Du har inte avslutat sammanslagningen (MERGE_HEAD finns)."
-#: builtin/merge.c:1134
+#: builtin/merge.c:1133
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -5925,79 +6079,79 @@ msgstr ""
"Du har inte avslutat din \"cherry-pick\" (CHERRY_PICK_HEAD finns).\n"
"Checka in dina ändringar innan du kan slå ihop."
-#: builtin/merge.c:1137
+#: builtin/merge.c:1136
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
msgstr "Du har inte avslutat din \"cherry-pick\" (CHERRY_PICK_HEAD finns)."
-#: builtin/merge.c:1146
+#: builtin/merge.c:1145
msgid "You cannot combine --squash with --no-ff."
msgstr "Du kan inte kombinera --squash med --no-ff."
-#: builtin/merge.c:1151
+#: builtin/merge.c:1150
msgid "You cannot combine --no-ff with --ff-only."
msgstr "Du kan inte kombinera --no-ff med --ff-only."
-#: builtin/merge.c:1158
+#: builtin/merge.c:1157
msgid "No commit specified and merge.defaultToUpstream not set."
msgstr "Ingen incheckning angiven och merge.defaultToUpstream är ej satt."
-#: builtin/merge.c:1190
+#: builtin/merge.c:1189
msgid "Can merge only exactly one commit into empty head"
msgstr "Kan endast slå ihop en enda incheckning i ett tomt huvud."
-#: builtin/merge.c:1193
+#: builtin/merge.c:1192
msgid "Squash commit into empty head not supported yet"
msgstr "Stöder inte en tillplattningsincheckning på ett tomt huvud ännu"
-#: builtin/merge.c:1195
+#: builtin/merge.c:1194
msgid "Non-fast-forward commit does not make sense into an empty head"
msgstr "Icke-snabbspolad incheckning kan inte användas med ett tomt huvud"
-#: builtin/merge.c:1311
+#: builtin/merge.c:1310
#, c-format
msgid "Updating %s..%s\n"
msgstr "Uppdaterar %s..%s\n"
-#: builtin/merge.c:1350
+#: builtin/merge.c:1349
#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr "Försöker riktigt enkel sammanslagning i indexet...\n"
-#: builtin/merge.c:1357
+#: builtin/merge.c:1356
#, c-format
msgid "Nope.\n"
msgstr "Nej.\n"
-#: builtin/merge.c:1389
+#: builtin/merge.c:1388
msgid "Not possible to fast-forward, aborting."
msgstr "Kan inte snabbspola, avbryter."
-#: builtin/merge.c:1412 builtin/merge.c:1491
+#: builtin/merge.c:1411 builtin/merge.c:1490
#, c-format
msgid "Rewinding the tree to pristine...\n"
msgstr "Återspolar trädet till orört...\n"
-#: builtin/merge.c:1416
+#: builtin/merge.c:1415
#, c-format
msgid "Trying merge strategy %s...\n"
msgstr "Försöker sammanslagninsstrategin %s...\n"
-#: builtin/merge.c:1482
+#: builtin/merge.c:1481
#, c-format
msgid "No merge strategy handled the merge.\n"
msgstr "Ingen sammanslagningsstrategi hanterade sammanslagningen.\n"
-#: builtin/merge.c:1484
+#: builtin/merge.c:1483
#, c-format
msgid "Merge with strategy %s failed.\n"
msgstr "Sammanslagning med strategin %s misslyckades.\n"
-#: builtin/merge.c:1493
+#: builtin/merge.c:1492
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr "Använder %s för att förbereda lösning för hand.\n"
-#: builtin/merge.c:1505
+#: builtin/merge.c:1504
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
@@ -6312,139 +6466,134 @@ msgstr "git notes prune [<flaggor>]"
msgid "git notes get-ref"
msgstr "git notes get-ref"
-#: builtin/notes.c:142
+#: builtin/notes.c:139
#, c-format
msgid "unable to start 'show' for object '%s'"
msgstr "kunde inte starta \"show\" för objektet \"%s\""
-#: builtin/notes.c:148
-msgid "can't fdopen 'show' output fd"
-msgstr "kunde inte öppna (fdopen) \"show\"-utdata-filhandtag"
-
-#: builtin/notes.c:158
-#, c-format
-msgid "failed to close pipe to 'show' for object '%s'"
-msgstr "kunde inte stänga röret till \"show\" för objektet \"%s\""
+#: builtin/notes.c:143
+msgid "could not read 'show' output"
+msgstr "kunde inte läsa utdata från \"show\""
-#: builtin/notes.c:161
+#: builtin/notes.c:151
#, c-format
msgid "failed to finish 'show' for object '%s'"
msgstr "kunde inte avsluta \"show\" för objektet \"%s\""
-#: builtin/notes.c:178 builtin/tag.c:347
+#: builtin/notes.c:169 builtin/tag.c:341
#, c-format
msgid "could not create file '%s'"
msgstr "kunde inte skapa filen \"%s\""
-#: builtin/notes.c:192
+#: builtin/notes.c:188
msgid "Please supply the note contents using either -m or -F option"
msgstr "Ange innehåll för anteckningen med antingen -m eller -F"
-#: builtin/notes.c:213 builtin/notes.c:976
+#: builtin/notes.c:209 builtin/notes.c:972
#, c-format
msgid "Removing note for object %s\n"
msgstr "Tar bort anteckning för objektet %s\n"
-#: builtin/notes.c:218
+#: builtin/notes.c:214
msgid "unable to write note object"
msgstr "kunde inte skriva anteckningsobjekt"
-#: builtin/notes.c:220
+#: builtin/notes.c:216
#, c-format
msgid "The note contents has been left in %s"
msgstr "Anteckningens innehåll har lämnats kvar i %s"
-#: builtin/notes.c:254 builtin/tag.c:542
+#: builtin/notes.c:250 builtin/tag.c:540
#, c-format
msgid "cannot read '%s'"
msgstr "kunde inte läsa \"%s\""
-#: builtin/notes.c:256 builtin/tag.c:545
+#: builtin/notes.c:252 builtin/tag.c:543
#, c-format
msgid "could not open or read '%s'"
msgstr "kunde inte öppna eller läsa \"%s\""
-#: builtin/notes.c:275 builtin/notes.c:448 builtin/notes.c:450
-#: builtin/notes.c:510 builtin/notes.c:564 builtin/notes.c:647
-#: builtin/notes.c:652 builtin/notes.c:727 builtin/notes.c:769
-#: builtin/notes.c:971 builtin/tag.c:558
+#: builtin/notes.c:271 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:506 builtin/notes.c:560 builtin/notes.c:643
+#: builtin/notes.c:648 builtin/notes.c:723 builtin/notes.c:765
+#: builtin/notes.c:967 builtin/tag.c:556
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
msgstr "Kunde inte slå upp \"%s\" som en giltig referens."
-#: builtin/notes.c:278
+#: builtin/notes.c:274
#, c-format
msgid "Failed to read object '%s'."
msgstr "Kunde inte läsa objektet \"%s\"."
-#: builtin/notes.c:302
+#: builtin/notes.c:298
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr "Kan inte checka in oinitierat/orefererat anteckningsträd"
-#: builtin/notes.c:343
+#: builtin/notes.c:339
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
msgstr "Felaktigt värde för notes.rewriteMode: '%s'"
-#: builtin/notes.c:353
+#: builtin/notes.c:349
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr "Vägrar skriva över anteckningar i %s (utanför refs/notes/)"
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: builtin/notes.c:380
+#: builtin/notes.c:376
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Felaktigt värde på %s: \"%s\""
-#: builtin/notes.c:444
+#: builtin/notes.c:440
#, c-format
msgid "Malformed input line: '%s'."
msgstr "Felaktig indatarad: \"%s\"."
-#: builtin/notes.c:459
+#: builtin/notes.c:455
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
msgstr "Misslyckades kopiera anteckningar från \"%s\" till \"%s\""
-#: builtin/notes.c:503 builtin/notes.c:557 builtin/notes.c:630
-#: builtin/notes.c:642 builtin/notes.c:715 builtin/notes.c:762
-#: builtin/notes.c:1036
+#: builtin/notes.c:499 builtin/notes.c:553 builtin/notes.c:626
+#: builtin/notes.c:638 builtin/notes.c:711 builtin/notes.c:758
+#: builtin/notes.c:1032
msgid "too many parameters"
msgstr "för många parametrar"
-#: builtin/notes.c:516 builtin/notes.c:775
+#: builtin/notes.c:512 builtin/notes.c:771
#, c-format
msgid "No note found for object %s."
msgstr "Inga anteckningar hittades för objektet %s."
-#: builtin/notes.c:538 builtin/notes.c:695
+#: builtin/notes.c:534 builtin/notes.c:691
msgid "note contents as a string"
msgstr "anteckningsinnehåll som sträng"
-#: builtin/notes.c:541 builtin/notes.c:698
+#: builtin/notes.c:537 builtin/notes.c:694
msgid "note contents in a file"
msgstr "anteckningsinnehåll i en fil"
-#: builtin/notes.c:543 builtin/notes.c:546 builtin/notes.c:700
-#: builtin/notes.c:703 builtin/tag.c:476
+#: builtin/notes.c:539 builtin/notes.c:542 builtin/notes.c:696
+#: builtin/notes.c:699 builtin/tag.c:474
msgid "object"
msgstr "objekt"
-#: builtin/notes.c:544 builtin/notes.c:701
+#: builtin/notes.c:540 builtin/notes.c:697
msgid "reuse and edit specified note object"
msgstr "återanvänd och redigera angivet anteckningsobjekt"
-#: builtin/notes.c:547 builtin/notes.c:704
+#: builtin/notes.c:543 builtin/notes.c:700
msgid "reuse specified note object"
msgstr "återanvänd angivet anteckningsobjekt"
-#: builtin/notes.c:549 builtin/notes.c:617
+#: builtin/notes.c:545 builtin/notes.c:613
msgid "replace existing notes"
msgstr "ersätt befintliga anteckningar"
-#: builtin/notes.c:583
+#: builtin/notes.c:579
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -6453,24 +6602,24 @@ msgstr ""
"Kan inte lägga till anteckningar. Hittade befintliga anteckningar för "
"objektet %s. Använd \"-f\" för att skriva över befintliga anteckningar"
-#: builtin/notes.c:588 builtin/notes.c:665
+#: builtin/notes.c:584 builtin/notes.c:661
#, c-format
msgid "Overwriting existing notes for object %s\n"
msgstr "Skriver över befintliga anteckningar för objektet %s\n"
-#: builtin/notes.c:618
+#: builtin/notes.c:614
msgid "read objects from stdin"
msgstr "läs objekt från standard in"
-#: builtin/notes.c:620
+#: builtin/notes.c:616
msgid "load rewriting config for <command> (implies --stdin)"
msgstr "läs omskrivningsinställning för <kommando> (implicerar --stdin)"
-#: builtin/notes.c:638
+#: builtin/notes.c:634
msgid "too few parameters"
msgstr "för få parametrar"
-#: builtin/notes.c:659
+#: builtin/notes.c:655
#, c-format
msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -6479,12 +6628,12 @@ msgstr ""
"Kan inte kopiera anteckningar. Hittade befintliga anteckningar för objektet "
"%s. Använd \"-f\" för att skriva över befintliga anteckningar"
-#: builtin/notes.c:671
+#: builtin/notes.c:667
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
msgstr "Anteckningar på källobjektet %s saknas. Kan inte kopiera."
-#: builtin/notes.c:720
+#: builtin/notes.c:716
#, c-format
msgid ""
"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
@@ -6493,15 +6642,15 @@ msgstr ""
"Flaggorna -m/-F/-c/-C rekommenderas inte för underkommandot \"edit\".\n"
"Använd \"git notes add -f -m/-F/-c/-C\" istället.\n"
-#: builtin/notes.c:867
+#: builtin/notes.c:863
msgid "General options"
msgstr "Allmänna flaggor"
-#: builtin/notes.c:869
+#: builtin/notes.c:865
msgid "Merge options"
msgstr "Flaggor för sammanslagning"
-#: builtin/notes.c:871
+#: builtin/notes.c:867
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
@@ -6509,46 +6658,46 @@ msgstr ""
"läs konflikter i anteckningar med angiven strategi (manual/ours/theirs/union/"
"cat_sort_uniq)"
-#: builtin/notes.c:873
+#: builtin/notes.c:869
msgid "Committing unmerged notes"
msgstr "Checkar in ej sammanslagna anteckningar"
-#: builtin/notes.c:875
+#: builtin/notes.c:871
msgid "finalize notes merge by committing unmerged notes"
msgstr ""
"färdigställ sammanslagning av anteckningar genom att checka in ej "
"sammanslagna anteckningar"
-#: builtin/notes.c:877
+#: builtin/notes.c:873
msgid "Aborting notes merge resolution"
msgstr "Avbryt lösning av sammanslagning av anteckningar"
-#: builtin/notes.c:879
+#: builtin/notes.c:875
msgid "abort notes merge"
msgstr "avbryt sammanslagning av anteckningar"
-#: builtin/notes.c:974
+#: builtin/notes.c:970
#, c-format
msgid "Object %s has no note\n"
msgstr "Objektet %s har ingen anteckning\n"
-#: builtin/notes.c:986
+#: builtin/notes.c:982
msgid "attempt to remove non-existent note is not an error"
msgstr "försök att ta bort icke-existerande anteckningar är inte ett fel"
-#: builtin/notes.c:989
+#: builtin/notes.c:985
msgid "read object names from the standard input"
msgstr "läs objektnamn från standard in"
-#: builtin/notes.c:1070
+#: builtin/notes.c:1066
msgid "notes_ref"
msgstr "anteckningar-ref"
-#: builtin/notes.c:1071
+#: builtin/notes.c:1067
msgid "use notes from <notes_ref>"
msgstr "använd anteckningar från <anteckningsref>"
-#: builtin/notes.c:1106 builtin/remote.c:1598
+#: builtin/notes.c:1102 builtin/remote.c:1598
#, c-format
msgid "Unknown subcommand: %s"
msgstr "Okänt underkommando: %s"
@@ -6909,28 +7058,49 @@ msgstr ""
#: builtin/push.c:224
msgid ""
-"Updates were rejected because the destination reference already exists\n"
-"in the remote."
+"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 merge the remote changes (e.g.,\n"
+"'git pull') before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Uppdateringarna avvisades eftersom målreferensen redan finns på\n"
-"fjärren."
+"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 slå ihop fjärrändringarna\n"
+"(t.ex. \"git pull\") innan du sänder igen.\n"
+"Se avsnittet \"Note about fast-forwards\" i \"git push --help\" för detaljer."
-#: builtin/push.c:269
+#: builtin/push.c:231
+msgid "Updates were rejected because the tag already exists in the remote."
+msgstr "Uppdateringarna avvisades eftersom taggen redan finns på fjärren."
+
+#: builtin/push.c:234
+msgid ""
+"You cannot update a remote ref that points at a non-commit object,\n"
+"or update a remote ref to make it point at a non-commit object,\n"
+"without using the '--force' option.\n"
+msgstr ""
+"Du kan inte uppdatera en fjärr-referens som pekar på ett objekt som\n"
+"inte är en incheckning, eller uppdatera en fjärr-referens så att den\n"
+"pekar på något som inte är en incheckning, utan att använda flaggan\n"
+"\"--force\".\n"
+
+#: builtin/push.c:294
#, c-format
msgid "Pushing to %s\n"
msgstr "Sänder till %s\n"
-#: builtin/push.c:273
+#: builtin/push.c:298
#, c-format
msgid "failed to push some refs to '%s'"
msgstr "misslyckades sända vissa referenser till \"%s\""
-#: builtin/push.c:302
+#: builtin/push.c:331
#, c-format
msgid "bad repository '%s'"
msgstr "felaktigt arkiv \"%s\""
-#: builtin/push.c:303
+#: builtin/push.c:332
msgid ""
"No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote "
@@ -6951,79 +7121,83 @@ msgstr ""
"\n"
" git push <namn>\n"
-#: builtin/push.c:318
+#: builtin/push.c:347
msgid "--all and --tags are incompatible"
msgstr "--all och --tags är inkompatibla"
-#: builtin/push.c:319
+#: builtin/push.c:348
msgid "--all can't be combined with refspecs"
msgstr "--all kan inte kombineras med referensspecifikationer"
-#: builtin/push.c:324
+#: builtin/push.c:353
msgid "--mirror and --tags are incompatible"
msgstr "--mirror och --tags är inkompatibla"
-#: builtin/push.c:325
+#: builtin/push.c:354
msgid "--mirror can't be combined with refspecs"
msgstr "--mirror kan inte kombineras med referensspecifikationer"
-#: builtin/push.c:330
+#: builtin/push.c:359
msgid "--all and --mirror are incompatible"
msgstr "--all och --mirror är inkompatibla"
-#: builtin/push.c:390
+#: builtin/push.c:419
msgid "repository"
msgstr "arkiv"
-#: builtin/push.c:391
+#: builtin/push.c:420
msgid "push all refs"
msgstr "sänd alla referenser"
-#: builtin/push.c:392
+#: builtin/push.c:421
msgid "mirror all refs"
msgstr "spegla alla referenser"
-#: builtin/push.c:394
+#: builtin/push.c:423
msgid "delete refs"
msgstr "ta bort referenser"
-#: builtin/push.c:395
+#: builtin/push.c:424
msgid "push tags (can't be used with --all or --mirror)"
msgstr "sänd taggar (kan inte användas med --all eller --mirror)"
-#: builtin/push.c:398
+#: builtin/push.c:427
msgid "force updates"
msgstr "tvinga uppdateringar"
-#: builtin/push.c:399
+#: builtin/push.c:428
msgid "check"
msgstr "kontrollera"
-#: builtin/push.c:400
+#: builtin/push.c:429
msgid "control recursive pushing of submodules"
msgstr "styr rekursiv insändning av undermoduler"
-#: builtin/push.c:402
+#: builtin/push.c:431
msgid "use thin pack"
msgstr "använd tunna paket"
-#: builtin/push.c:403 builtin/push.c:404
+#: builtin/push.c:432 builtin/push.c:433
msgid "receive pack program"
msgstr "program för att ta emot paket"
-#: builtin/push.c:405
+#: builtin/push.c:434
msgid "set upstream for git pull/status"
msgstr "ställ in uppström för git pull/status"
-#: builtin/push.c:408
+#: builtin/push.c:437
msgid "prune locally removed refs"
msgstr "ta bort lokalt borttagna referenser"
-#: builtin/push.c:418
+#: builtin/push.c:439
+msgid "bypass pre-push hook"
+msgstr "förbigå pre-push-krok"
+
+#: builtin/push.c:448
msgid "--delete is incompatible with --all, --mirror and --tags"
msgstr "--delete är imkompatibel med --all, --mirror och --tags"
-#: builtin/push.c:420
+#: builtin/push.c:450
msgid "--delete doesn't make sense without any refs"
msgstr "--delete kan inte användas utan referenser"
@@ -8169,170 +8343,164 @@ msgid "could not verify the tag '%s'"
msgstr "kunde inte bekräfta taggen \"%s\""
#: builtin/tag.c:249
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be ignored.\n"
-"#\n"
+"Write a tag message\n"
+"Lines starting with '%c' will be ignored.\n"
msgstr ""
"\n"
-"#\n"
-"# Skriv ett taggmeddelande\n"
-"# Rader som inleds med \"#\" ignoreras.\n"
-"#\n"
+"Skriv ett taggmeddelande\n"
+"Rader som inleds med \"%c\" ignoreras.\n"
-#: builtin/tag.c:256
+#: builtin/tag.c:253
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be kept; you may remove them yourself if you "
+"Write a tag message\n"
+"Lines starting with '%c' will be kept; you may remove them yourself if you "
"want to.\n"
-"#\n"
msgstr ""
"\n"
-"#\n"
-"# Skriv ett taggmeddelande\n"
-"# Rader som inleds med \"#\" kommer behållas; du kan själv ta bort dem om\n"
-"# du vill.\n"
-"#\n"
+"Skriv ett taggmeddelande\n"
+"Rader som inleds med \"%c\" kommer behållas; du kan själv ta bort dem om\n"
+"du vill.\n"
-#: builtin/tag.c:298
+#: builtin/tag.c:292
msgid "unable to sign the tag"
msgstr "kunde inte signera taggen"
-#: builtin/tag.c:300
+#: builtin/tag.c:294
msgid "unable to write tag file"
msgstr "kunde inte skriva tagg-filen"
-#: builtin/tag.c:325
+#: builtin/tag.c:319
msgid "bad object type."
msgstr "felaktig objekttyp"
-#: builtin/tag.c:338
+#: builtin/tag.c:332
msgid "tag header too big."
msgstr "tagghuvud för stort."
-#: builtin/tag.c:370
+#: builtin/tag.c:368
msgid "no tag message?"
msgstr "inget taggmeddelande?"
-#: builtin/tag.c:376
+#: builtin/tag.c:374
#, c-format
msgid "The tag message has been left in %s\n"
msgstr "Taggmeddelandet har lämnats i %s\n"
-#: builtin/tag.c:425
+#: builtin/tag.c:423
msgid "switch 'points-at' requires an object"
msgstr "flaggan \"points-at\" behöver ett object"
-#: builtin/tag.c:427
+#: builtin/tag.c:425
#, c-format
msgid "malformed object name '%s'"
msgstr "felformat objektnamn \"%s\""
-#: builtin/tag.c:447
+#: builtin/tag.c:445
msgid "list tag names"
msgstr "lista taggnamn"
-#: builtin/tag.c:449
+#: builtin/tag.c:447
msgid "print <n> lines of each tag message"
msgstr "visa <n> rader från varje taggmeddelande"
-#: builtin/tag.c:451
+#: builtin/tag.c:449
msgid "delete tags"
msgstr "ta bort taggar"
-#: builtin/tag.c:452
+#: builtin/tag.c:450
msgid "verify tags"
msgstr "verifiera taggar"
-#: builtin/tag.c:454
+#: builtin/tag.c:452
msgid "Tag creation options"
msgstr "Alternativ för att skapa taggar"
-#: builtin/tag.c:456
+#: builtin/tag.c:454
msgid "annotated tag, needs a message"
msgstr "annoterad tagg, behöver meddelande"
-#: builtin/tag.c:458
+#: builtin/tag.c:456
msgid "tag message"
msgstr "taggmeddelande"
-#: builtin/tag.c:460
+#: builtin/tag.c:458
msgid "annotated and GPG-signed tag"
msgstr "annoterad och GPG-signerad tagg"
-#: builtin/tag.c:464
+#: builtin/tag.c:462
msgid "use another key to sign the tag"
msgstr "använd annan nyckel för att signera taggen"
-#: builtin/tag.c:465
+#: builtin/tag.c:463
msgid "replace the tag if exists"
msgstr "ersätt taggen om den finns"
-#: builtin/tag.c:466
+#: builtin/tag.c:464
msgid "show tag list in columns"
msgstr "lista taggar i spalter"
-#: builtin/tag.c:468
+#: builtin/tag.c:466
msgid "Tag listing options"
msgstr "Alternativ för listning av taggar"
-#: builtin/tag.c:471
+#: builtin/tag.c:469
msgid "print only tags that contain the commit"
msgstr "visa endast taggar som innehåller incheckningen"
-#: builtin/tag.c:477
+#: builtin/tag.c:475
msgid "print only tags of the object"
msgstr "visa endast taggar för objektet"
-#: builtin/tag.c:506
+#: builtin/tag.c:504
msgid "--column and -n are incompatible"
msgstr "--column och -n är inkompatibla"
-#: builtin/tag.c:523
+#: builtin/tag.c:521
msgid "-n option is only allowed with -l."
msgstr "Flaggan -n är endast tillåten tillsammans med -l."
-#: builtin/tag.c:525
+#: builtin/tag.c:523
msgid "--contains option is only allowed with -l."
msgstr "Flaggan --contains är endast tillåten tillsammans med -l"
-#: builtin/tag.c:527
+#: builtin/tag.c:525
msgid "--points-at option is only allowed with -l."
msgstr "Flaggan --points-at är endast tillåten tillsammans med -l."
-#: builtin/tag.c:535
+#: builtin/tag.c:533
msgid "only one -F or -m option is allowed."
msgstr "endast en av flaggorna -F eller -m tillåts."
-#: builtin/tag.c:555
+#: builtin/tag.c:553
msgid "too many params"
msgstr "för många parametrar"
-#: builtin/tag.c:561
+#: builtin/tag.c:559
#, c-format
msgid "'%s' is not a valid tag name."
msgstr "\"%s\" är inte ett giltigt taggnamn."
-#: builtin/tag.c:566
+#: builtin/tag.c:564
#, c-format
msgid "tag '%s' already exists"
msgstr "taggen \"%s\" finns redan"
-#: builtin/tag.c:584
+#: builtin/tag.c:582
#, c-format
msgid "%s: cannot lock the ref"
msgstr "%s: kan inte låsa referensen"
-#: builtin/tag.c:586
+#: builtin/tag.c:584
#, c-format
msgid "%s: cannot update the ref"
msgstr "%s: kan inte uppdatera referensen"
-#: builtin/tag.c:588
+#: builtin/tag.c:586
#, c-format
msgid "Updated tag '%s' (was %s)\n"
msgstr "Uppdaterad tagg \"%s\" (var %s)\n"
@@ -8567,8 +8735,8 @@ msgid "Print lines matching a pattern"
msgstr "Visa rader som motsvarar mönster"
#: common-cmds.h:17
-msgid "Create an empty git repository or reinitialize an existing one"
-msgstr "Skapa tomt git-arkiv eller ominitiera ett befintligt"
+msgid "Create an empty Git repository or reinitialize an existing one"
+msgstr "Skapa tomt Git-arkiv eller ominitiera ett befintligt"
#: common-cmds.h:18
msgid "Show commit logs"
@@ -9452,18 +9620,24 @@ msgid "blob"
msgstr "blob"
#: git-submodule.sh:979
-msgid "# Submodules changed but not updated:"
-msgstr "# Undermoduler ändrade men inte uppdaterade:"
+msgid "Submodules changed but not updated:"
+msgstr "Undermoduler ändrade men inte uppdaterade:"
#: git-submodule.sh:981
-msgid "# Submodule changes to be committed:"
-msgstr "# Undermodulers ändringar att checka in:"
+msgid "Submodule changes to be committed:"
+msgstr "Undermodulers ändringar att checka in:"
#: git-submodule.sh:1129
#, sh-format
msgid "Synchronizing submodule url for '$prefix$sm_path'"
msgstr "Synkroniserar undermodul-url för \"$prefix$sm_path\""
+#~ msgid "can't fdopen 'show' output fd"
+#~ msgstr "kunde inte öppna (fdopen) \"show\"-utdata-filhandtag"
+
+#~ msgid "failed to close pipe to 'show' for object '%s'"
+#~ msgstr "kunde inte stänga röret till \"show\" för objektet \"%s\""
+
#~ msgid "You do not have a valid HEAD"
#~ msgstr "Du har ingen giltig HEAD"
diff --git a/po/vi.po b/po/vi.po
index bae7a17608..7d9d05d6cb 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: git-v1.8.1-476-gec3ae6e\n"
+"Project-Id-Version: git-v1.8.2-rc2-4-g77995\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2013-01-25 12:33+0800\n"
-"PO-Revision-Date: 2013-01-25 14:00+0700\n"
+"POT-Creation-Date: 2013-03-05 12:36+0800\n"
+"PO-Revision-Date: 2013-03-06 13:55+0700\n"
"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
"Language: vi\n"
@@ -21,7 +21,7 @@ msgstr ""
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: ../\n"
-#: advice.c:45
+#: advice.c:49
#, c-format
msgid "hint: %.*s\n"
msgstr "gợi ý: %.*s\n"
@@ -30,7 +30,7 @@ msgstr "gợi ý: %.*s\n"
#. * Message used both when 'git commit' fails and when
#. * other commands doing a merge do.
#.
-#: advice.c:75
+#: advice.c:79
msgid ""
"Fix them up in the work tree,\n"
"and then use 'git add/rm <file>' as\n"
@@ -77,11 +77,11 @@ msgstr "tiền tố"
msgid "prepend prefix to each pathname in the archive"
msgstr "nối thêm tiền tố vào từng đường dẫn tập tin trong kho lưu"
-#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2380
-#: builtin/blame.c:2381 builtin/config.c:55 builtin/fast-export.c:653
+#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2366
+#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:653
#: builtin/fast-export.c:655 builtin/grep.c:715 builtin/hash-object.c:77
-#: builtin/ls-files.c:494 builtin/ls-files.c:497 builtin/notes.c:540
-#: builtin/notes.c:697 builtin/read-tree.c:107 parse-options.h:149
+#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536
+#: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149
msgid "file"
msgstr "tập-tin"
@@ -121,7 +121,7 @@ msgstr "kho"
msgid "retrieve the archive from remote repository <repo>"
msgstr "nhận kho lưu từ kho chứa <kho> trên máy chủ"
-#: archive.c:347 builtin/archive.c:95 builtin/notes.c:619
+#: archive.c:347 builtin/archive.c:95 builtin/notes.c:615
msgid "command"
msgstr "lệnh"
@@ -131,11 +131,11 @@ msgstr "đường dẫn đến lệnh git-upload-pack trên máy chủ"
#: attr.c:259
msgid ""
-"Negative patterns are forbidden in git attributes\n"
+"Negative patterns are ignored in git attributes\n"
"Use '\\!' for literal leading exclamation."
msgstr ""
-"Mấu dạng phủ định bị cấm chỉ dùng trong các thuộc tính của git\n"
-"Dùng '\\!' cho các chuỗi văn bản có dấu chấm than."
+"Các mẫu dạng phủ định bị cấm dùng cho các thuộc tính của git\n"
+"Dùng “\\!” cho các chuỗi văn bản có dấu chấm than dẫn đầu."
#: bundle.c:36
#, c-format
@@ -154,7 +154,7 @@ msgstr "không thể mở “%s”"
#: bundle.c:140
msgid "Repository lacks these prerequisite commits:"
-msgstr "Khó chứa thiếu những lần chuyển giao (commit) cần trước hết này:"
+msgstr "Kho chứa thiếu những lần chuyển giao (commit) cần trước hết này:"
#: bundle.c:164 sequencer.c:566 sequencer.c:998 builtin/log.c:299
#: builtin/log.c:751 builtin/log.c:1358 builtin/log.c:1574 builtin/merge.c:347
@@ -310,22 +310,22 @@ msgid_plural "%lu years ago"
msgstr[0] "%lu năm trước"
msgstr[1] "%lu năm trước"
-#: diff.c:111
+#: diff.c:112
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
-msgstr " Gặp lỗi khi phân tích dirstat cắt bỏ phần trăm '%s'\n"
+msgstr " Gặp lỗi khi phân tích dirstat cắt bỏ phần trăm “%s”\n"
-#: diff.c:116
+#: diff.c:117
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
-msgstr " Không hiểu đối số dirstat '%s'\n"
+msgstr " Không hiểu đối số dirstat “%s”\n"
-#: diff.c:194
+#: diff.c:210
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
-msgstr "Không hiểu giá trị cho biến cấu hình “diff.submodule”: `%s'"
+msgstr "Không hiểu giá trị cho biến cấu hình “diff.submodule”: “%s”"
-#: diff.c:237
+#: diff.c:260
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
@@ -334,7 +334,7 @@ msgstr ""
"Tìm thấy các lỗi trong biến cấu hình “diff.dirstat”:\n"
"%s"
-#: diff.c:3494
+#: diff.c:3468
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
@@ -343,23 +343,33 @@ msgstr ""
"Gặp lỗi khi phân tích đối số tùy chọn --dirstat/-X:\n"
"%s"
-#: diff.c:3508
+#: diff.c:3482
#, c-format
msgid "Failed to parse --submodule option parameter: '%s'"
-msgstr "Gặp lỗi khi phân tích đối số tùy chọn --submodule: `%s'"
+msgstr "Gặp lỗi khi phân tích đối số tùy chọn --submodule: “%s”"
-#: gpg-interface.c:59
+#: gpg-interface.c:59 gpg-interface.c:127
msgid "could not run gpg."
msgstr "không thể chạy gpg."
#: gpg-interface.c:71
msgid "gpg did not accept the data"
-msgstr "gpg đã không đồng ý dữ liệu"
+msgstr "gpg đã không chấp nhận dữ liệu"
#: gpg-interface.c:82
msgid "gpg failed to sign the data"
msgstr "gpg gặp lỗi khi ký dữ liệu"
+#: gpg-interface.c:112
+#, c-format
+msgid "could not create temporary file '%s': %s"
+msgstr "không thể tạo tập tin tạm thời “%s”: %s"
+
+#: gpg-interface.c:115
+#, c-format
+msgid "failed writing detached signature to '%s': %s"
+msgstr "gặp lỗi khi ghi chữ ký đính kèm vào “%s”: %s"
+
#: grep.c:1622
#, c-format
msgid "'%s': unable to read %s"
@@ -384,7 +394,11 @@ msgstr "các lệnh git sẵn sàng để dùng trong “%s”"
msgid "git commands available from elsewhere on your $PATH"
msgstr "các lệnh git sẵn sàng để dùng từ một nơi khác trong $PATH của bạn"
-#: help.c:275
+#: help.c:235
+msgid "The most commonly used git commands are:"
+msgstr "Những lệnh git hay được sử dụng nhất là:"
+
+#: help.c:292
#, c-format
msgid ""
"'%s' appears to be a git command, but we were not\n"
@@ -393,11 +407,11 @@ msgstr ""
"“%s” trông như là một lệnh git, nhưng chúng tôi không\n"
"thể thực thi nó. Có lẽ là lệnh git-%s đã bị hỏng?"
-#: help.c:332
+#: help.c:349
msgid "Uh oh. Your system reports no Git commands at all."
msgstr "Ối chà. Hệ thống của bạn báo rằng chẳng có lệnh Git nào cả."
-#: help.c:354
+#: help.c:371
#, c-format
msgid ""
"WARNING: You called a Git command named '%s', which does not exist.\n"
@@ -406,17 +420,17 @@ msgstr ""
"CẢNH BÁO: Bạn đã gọi lệnh Git có tên “%s”, mà nó lại không có sẵn.\n"
"Giả định rằng ý bạn là “%s”"
-#: help.c:359
+#: help.c:376
#, c-format
msgid "in %0.1f seconds automatically..."
msgstr "trong %0.1f giây một cách tự động..."
-#: help.c:366
+#: help.c:383
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
msgstr "git: “%s” không phải là một lệnh của git. Xem “git --help”."
-#: help.c:370
+#: help.c:387
msgid ""
"\n"
"Did you mean this?"
@@ -695,39 +709,53 @@ msgstr "Không thể phân tích đối tượng “%s”"
msgid "Unable to write index."
msgstr "Không thể ghi bảng mục lục"
-#: parse-options.c:485
+#: parse-options.c:489
msgid "..."
msgstr "..."
-#: parse-options.c:503
+#: parse-options.c:507
#, c-format
msgid "usage: %s"
msgstr "cách dùng: %s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation
-#: parse-options.c:507
+#: parse-options.c:511
#, c-format
msgid " or: %s"
msgstr " hoặc: %s"
-#: parse-options.c:510
+#: parse-options.c:514
#, c-format
msgid " %s"
msgstr " %s"
-#: remote.c:1686
+#: parse-options.c:548
+msgid "-NUM"
+msgstr "-SỐ"
+
+#: pathspec.c:83
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr "Đường dẫn “%s” thì ở trong mô-đun-con “%.*s”"
+
+#: pathspec.c:99
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr "“%s” nằm ngoài một liên kết tượng trưng"
+
+#: remote.c:1653
#, 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] "Nhánh của bạn là đầu của “%s” bởi %d lần chuyển giao (commit).\n"
msgstr[1] "Nhánh của bạn là đầu của “%s” bởi %d lần chuyển giao (commit).\n"
-#: remote.c:1692
+#: remote.c:1659
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (dùng \"git push\" để xuất bản các lần chuyển giao nội bộ của bạn)\n"
-#: remote.c:1695
+#: remote.c:1662
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
@@ -739,11 +767,11 @@ msgstr[1] ""
"Nhánh của bạn thì ở đằng sau “%s” bởi %d lần chuyển giao (commit), và có thể "
"được fast-forward.\n"
-#: remote.c:1703
+#: remote.c:1670
msgid " (use \"git pull\" to update your local branch)\n"
msgstr " (dùng \"git pull\" để cập nhật nhánh nội bộ của bạn)\n"
-#: remote.c:1706
+#: remote.c:1673
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -759,20 +787,20 @@ msgstr[1] ""
"Your branch and “%s” have diverged,\n"
"and have %d and %d different commit each, respectively.\n"
-#: remote.c:1716
+#: remote.c:1683
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
msgstr ""
" (dùng \"git pull\" để hòa trộn nhánh trên máy chủ vào trong nhánh của "
"bạn)\n"
-#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:875 builtin/merge.c:985
-#: builtin/merge.c:995
+#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:874 builtin/merge.c:984
+#: builtin/merge.c:994
#, c-format
msgid "Could not open '%s' for writing"
msgstr "Không thể mở “%s” để ghi"
-#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:987
-#: builtin/merge.c:1000
+#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:986
+#: builtin/merge.c:999
#, c-format
msgid "Could not write to '%s'"
msgstr "Không thể ghi vào “%s”"
@@ -974,7 +1002,7 @@ msgstr "không thể phân giải HEAD"
msgid "cannot abort from a branch yet to be born"
msgstr "không thể hủy bỏ từ một nhánh mà nó còn chưa được tạo ra"
-#: sequencer.c:821 builtin/apply.c:4016
+#: sequencer.c:821 builtin/apply.c:4056
#, c-format
msgid "cannot open %s: %s"
msgstr "không thể mở %s: %s"
@@ -1035,7 +1063,7 @@ msgstr "không thể truy cập “%s”: %s"
#: wrapper.c:423
#, c-format
msgid "unable to access '%s'"
-msgstr "không thể truy cập '%s'"
+msgstr "không thể truy cập “%s”"
#: wrapper.c:434
#, c-format
@@ -1123,7 +1151,7 @@ msgstr "bị xóa bởi cả hai:"
#: wt-status.c:250
msgid "added by us:"
-msgstr "được thêm vào bởi chúng tôi:"
+msgstr "được thêm vào bởi chúng ta:"
#: wt-status.c:251
msgid "deleted by them:"
@@ -1135,7 +1163,7 @@ msgstr "được thêm vào bởi họ:"
#: wt-status.c:253
msgid "deleted by us:"
-msgstr "bị xóa bởi chúng tôi:"
+msgstr "bị xóa bởi chúng ta:"
#: wt-status.c:254
msgid "both added:"
@@ -1151,7 +1179,7 @@ msgstr "lần chuyển giao (commit) mới, "
#: wt-status.c:287
msgid "modified content, "
-msgstr "nội dung được sửa đổi, "
+msgstr "nội dung bị sửa đổi, "
#: wt-status.c:289
msgid "untracked content, "
@@ -1202,153 +1230,180 @@ msgstr "chưa hòa trộn: %s"
msgid "bug: unhandled diff status %c"
msgstr "lỗi: không lấy được trạng thái lệnh diff %c"
-#: wt-status.c:787
+#: wt-status.c:789
msgid "You have unmerged paths."
msgstr "Bạn có những đường dẫn chưa được hòa trộn."
-#: wt-status.c:790 wt-status.c:914
+#: wt-status.c:792 wt-status.c:944
msgid " (fix conflicts and run \"git commit\")"
msgstr " (sửa các xung đột sau đó chạy \"git commit\")"
-#: wt-status.c:793
+#: wt-status.c:795
msgid "All conflicts fixed but you are still merging."
msgstr "Tất cả các xung đột đã được giải quyết nhưng bạn vẫn đang hòa trộn."
-#: wt-status.c:796
+#: wt-status.c:798
msgid " (use \"git commit\" to conclude merge)"
msgstr " (dùng \"git commit\" để hoàn tất việc hòa trộn)"
-#: wt-status.c:806
+#: wt-status.c:808
msgid "You are in the middle of an am session."
msgstr "Bạn đang ở giữa của một phiên “am”."
-#: wt-status.c:809
+#: wt-status.c:811
msgid "The current patch is empty."
msgstr "Miếng vá hiện tại bị trống rỗng."
-#: wt-status.c:813
+#: wt-status.c:815
msgid " (fix conflicts and then run \"git am --resolved\")"
msgstr " (sửa các xung đột và sau đó chạy lệnh \"git am --resolved\")"
-#: wt-status.c:815
+#: wt-status.c:817
msgid " (use \"git am --skip\" to skip this patch)"
-msgstr " (dùng \"git am --skip\" để bỏ qua lần vá này)"
+msgstr " (dùng \"git am --skip\" để bỏ qua miếng vá này)"
-#: wt-status.c:817
+#: wt-status.c:819
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr " (dùng \"git am --abort\" để phục hồi lại nhánh nguyên thủy)"
-#: wt-status.c:875 wt-status.c:885
+#: wt-status.c:879 wt-status.c:896
+#, c-format
+msgid "You are currently rebasing branch '%s' on '%s'."
+msgstr "Bạn hiện nay đang thực hiện việc rebase nhánh “%s” trên “%s”."
+
+#: wt-status.c:884 wt-status.c:901
msgid "You are currently rebasing."
msgstr "Bạn hiện nay đang thực hiện việc rebase (tái cấu trúc)."
-#: wt-status.c:878
+#: wt-status.c:887
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr " (sửa các xung đột và sau đó chạy lệnh \"git rebase --continue\")"
-#: wt-status.c:880
+#: wt-status.c:889
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (dùng \"git rebase --skip\" để bỏ qua lần vá này)"
-#: wt-status.c:882
+#: wt-status.c:891
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr " (dùng \"git rebase --abort\" để check-out nhánh nguyên thủy)"
-#: wt-status.c:888
+#: wt-status.c:904
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr ""
" (khi tất cả các xung đột đã sửa xong: chạy lệnh \"git rebase --continue\")"
-#: wt-status.c:890
+#: wt-status.c:908
+#, c-format
+msgid ""
+"You are currently splitting a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Bạn hiện nay đang thực hiện việc chia tách một lần chuyển giao (commit) "
+"trong khi đang rebase nhánh “%s” trên “%s”."
+
+#: wt-status.c:913
msgid "You are currently splitting a commit during a rebase."
msgstr ""
"Bạn hiện tại đang cắt đôi một lần chuyển giao trong khi đang thực hiện việc "
"rebase."
-#: wt-status.c:893
+#: wt-status.c:916
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr ""
" (Một khi thư mục làm việc của bạn đã gọn gàng, chạy \"git rebase --continue"
"\")"
-#: wt-status.c:895
+#: wt-status.c:920
+#, c-format
+msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Bạn hiện nay đang thực hiện việc sửa chữa một lần chuyển giao (commit) trong "
+"khi đang rebase nhánh “%s” trên “%s”."
+
+#: wt-status.c:925
msgid "You are currently editing a commit during a rebase."
msgstr "Bạn hiện đang sửa một lần chuyển giao trong khi bạn thực hiện rebase."
-#: wt-status.c:898
+#: wt-status.c:928
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
" (dùng \"git commit --amend\" để tu bổ lần chuyển giao (commit) hiện tại)"
-#: wt-status.c:900
+#: wt-status.c:930
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr ""
" (dùng \"git rebase --continue\" một khi bạn cảm thấy hài lòng về những "
"thay đổi của mình)"
-#: wt-status.c:910
+#: wt-status.c:940
msgid "You are currently cherry-picking."
msgstr "Bạn hiện nay đang thực hiện việc cherry-pick."
-#: wt-status.c:917
+#: wt-status.c:947
msgid " (all conflicts fixed: run \"git commit\")"
msgstr " (khi tất cả các xung đột đã sửa xong: chạy lệnh \"git commit\")"
-#: wt-status.c:926
+#: wt-status.c:958
+#, c-format
+msgid "You are currently bisecting branch '%s'."
+msgstr ""
+"Bạn hiện nay đang thực hiện thao tác di chuyển nửa bước (bisect) trên nhánh "
+"“%s”."
+
+#: wt-status.c:962
msgid "You are currently bisecting."
msgstr "Bạn hiện tại đang thực hiện việc bisect (chia đôi)."
-#: wt-status.c:929
+#: wt-status.c:965
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr " (dùng \"git bisect reset\" để quay trở lại nhánh nguyên thủy)"
-#: wt-status.c:980
+#: wt-status.c:1064
msgid "On branch "
msgstr "Trên nhánh "
-#: wt-status.c:987
+#: wt-status.c:1071
msgid "Not currently on any branch."
msgstr "Hiện tại chẳng ở nhánh nào cả."
-#: wt-status.c:999
+#: wt-status.c:1083
msgid "Initial commit"
msgstr "Lần chuyển giao (commit) khởi đầu"
-#: wt-status.c:1013
+#: wt-status.c:1097
msgid "Untracked files"
msgstr "Những tập tin chưa được theo dõi"
-#: wt-status.c:1015
+#: wt-status.c:1099
msgid "Ignored files"
msgstr "Những tập tin bị lờ đi"
-#: wt-status.c:1017
+#: wt-status.c:1101
#, c-format
msgid "Untracked files not listed%s"
msgstr "Những tập tin không bị theo vết không được liệt kê ra %s"
-#: wt-status.c:1019
+#: wt-status.c:1103
msgid " (use -u option to show untracked files)"
msgstr " (dùng tùy chọn -u để hiển thị các tập tin chưa được theo dõi)"
-#: wt-status.c:1025
+#: wt-status.c:1109
msgid "No changes"
msgstr "Không có thay đổi nào"
-#: wt-status.c:1030
+#: wt-status.c:1114
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
"không có thay đổi nào được thêm vào commit (dùng \"git add\" và/hoặc \"git "
"commit -a\")\n"
-#: wt-status.c:1033
+#: wt-status.c:1117
#, c-format
msgid "no changes added to commit\n"
msgstr "không có thay đổi nào được thêm vào lần chuyển giao (commit)\n"
-#: wt-status.c:1036
+#: wt-status.c:1120
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
@@ -1357,201 +1412,241 @@ msgstr ""
"không có gì được thêm vào lần chuyển giao (commit) nhưng có những tập tin "
"không được theo dấu vết hiện diện (dùng \"git add\" để đưa vào theo dõi)\n"
-#: wt-status.c:1039
+#: wt-status.c:1123
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr ""
"không có gì được thêm vào lần chuyển giao (commit) nhưng có những tập tin "
"không được theo dấu vết hiện diện\n"
-#: wt-status.c:1042
+#: wt-status.c:1126
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr ""
" không có gì để commit (tạo/sao-chép các tập tin và dùng \"git add\" để theo "
"dõi dấu vết)\n"
-#: wt-status.c:1045 wt-status.c:1050
+#: wt-status.c:1129 wt-status.c:1134
#, c-format
msgid "nothing to commit\n"
msgstr "không có gì để chuyển giao (commit)\n"
-#: wt-status.c:1048
+#: wt-status.c:1132
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr ""
"không có gì để chuyển giao (commit) (dùng -u để bỏ các tập tin cần theo dấu "
"vết)\n"
-#: wt-status.c:1052
+#: wt-status.c:1136
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr "không có gì để chuyển giao (commit), thư mục làm việc sạch sẽ\n"
-#: wt-status.c:1160
+#: wt-status.c:1244
msgid "HEAD (no branch)"
msgstr "HEAD (không nhánh)"
-#: wt-status.c:1166
+#: wt-status.c:1250
msgid "Initial commit on "
msgstr "Lần chuyển giao (commit) khởi tạo trên "
-#: wt-status.c:1181
+#: wt-status.c:1265
msgid "behind "
msgstr "đằng sau "
-#: wt-status.c:1184 wt-status.c:1187
+#: wt-status.c:1268 wt-status.c:1271
msgid "ahead "
msgstr "phía trước "
-#: wt-status.c:1189
+#: wt-status.c:1273
msgid ", behind "
msgstr ", đằng sau "
-#: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
-msgstr "git add [các-tùy-chọn] [--] <mẫu-tập-tin>..."
+#: compat/precompose_utf8.c:58 builtin/clone.c:341
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "bỏ liên kết (unlink) %s không thành công"
+
+#: builtin/add.c:20
+msgid "git add [options] [--] <pathspec>..."
+msgstr "git add [các-tùy-chọn] [--] <pathspec>..."
-#: builtin/add.c:62
+#: builtin/add.c:63
#, c-format
msgid "unexpected diff status %c"
msgstr "trạng thái lệnh diff không như mong đợi %c"
-#: builtin/add.c:67 builtin/commit.c:231
+#: builtin/add.c:68 builtin/commit.c:231
msgid "updating files failed"
msgstr "Cập nhật tập tin gặp lỗi"
-#: builtin/add.c:77
+#: builtin/add.c:78
#, c-format
msgid "remove '%s'\n"
msgstr "gỡ bỏ “%s”\n"
-#: builtin/add.c:176
-#, c-format
-msgid "Path '%s' is in submodule '%.*s'"
-msgstr "Đường dẫn “%s” thì ở trong mô-đun-con “%.*s”"
-
-#: builtin/add.c:192
+#: builtin/add.c:148
msgid "Unstaged changes after refreshing the index:"
msgstr ""
"Các thay đổi không được lưu trạng thái sau khi làm tươi mới lại bảng mục lục:"
-#: builtin/add.c:195 builtin/add.c:460 builtin/rm.c:275
+#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275
#, c-format
msgid "pathspec '%s' did not match any files"
msgstr "pathspec “%s” không khớp với bất kỳ tập tin nào"
-#: builtin/add.c:209
-#, c-format
-msgid "'%s' is beyond a symbolic link"
-msgstr "“%s” nằm ngoài một liên kết tượng trưng"
-
-#: builtin/add.c:276
+#: builtin/add.c:234
msgid "Could not read the index"
msgstr "Không thể đọc bảng mục lục"
-#: builtin/add.c:286
+#: builtin/add.c:244
#, c-format
msgid "Could not open '%s' for writing."
-msgstr "Không thể mở “%s” để ghi"
+msgstr "Không thể mở “%s” để ghi."
-#: builtin/add.c:290
+#: builtin/add.c:248
msgid "Could not write patch"
msgstr "Không thể ghi ra miếng vá"
-#: builtin/add.c:295
+#: builtin/add.c:253
#, c-format
msgid "Could not stat '%s'"
msgstr "không thể lấy trạng thái về “%s”"
-#: builtin/add.c:297
+#: builtin/add.c:255
msgid "Empty patch. Aborted."
msgstr "Miếng vá trống rỗng. Đã bỏ qua."
-#: builtin/add.c:303
+#: builtin/add.c:261
#, c-format
msgid "Could not apply '%s'"
msgstr "Không thể apply (áp dụng miếng vá) “%s”"
-#: builtin/add.c:313
+#: builtin/add.c:271
msgid "The following paths are ignored by one of your .gitignore files:\n"
msgstr ""
"Các đường dẫn theo sau đây sẽ bị lờ đi bởi một trong các tập tin .gitignore "
"của bạn:\n"
-#: builtin/add.c:319 builtin/clean.c:160 builtin/fetch.c:78 builtin/mv.c:63
-#: builtin/prune-packed.c:76 builtin/push.c:396 builtin/remote.c:1253
+#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63
+#: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253
#: builtin/rm.c:206
msgid "dry run"
msgstr "chạy thử"
-#: builtin/add.c:320 builtin/apply.c:4365 builtin/commit.c:1160
-#: builtin/count-objects.c:82 builtin/fsck.c:613 builtin/log.c:1522
-#: builtin/mv.c:62 builtin/read-tree.c:112
+#: builtin/add.c:278 builtin/apply.c:4405 builtin/check-ignore.c:19
+#: builtin/commit.c:1150 builtin/count-objects.c:82 builtin/fsck.c:613
+#: builtin/log.c:1522 builtin/mv.c:62 builtin/read-tree.c:112
msgid "be verbose"
msgstr "chi tiết"
-#: builtin/add.c:322
+#: builtin/add.c:280
msgid "interactive picking"
msgstr "sửa bằng cách tương tác"
-#: builtin/add.c:323 builtin/checkout.c:1031 builtin/reset.c:258
+#: builtin/add.c:281 builtin/checkout.c:1031 builtin/reset.c:258
msgid "select hunks interactively"
msgstr "chọn “hunks” một cách tương tác"
-#: builtin/add.c:324
+#: builtin/add.c:282
msgid "edit current diff and apply"
msgstr "sửa diff hiện nay và áp dụng nó"
-#: builtin/add.c:325
+#: builtin/add.c:283
msgid "allow adding otherwise ignored files"
msgstr "cho phép thêm các tập tin bị bỏ qua khác"
-#: builtin/add.c:326
+#: builtin/add.c:284
msgid "update tracked files"
msgstr "cập nhật các tập tin được theo vết"
-#: builtin/add.c:327
+#: builtin/add.c:285
msgid "record only the fact that the path will be added later"
msgstr "chỉ ghi lại sự việc mà đường dẫn sẽ được thêm vào sau"
-#: builtin/add.c:328
+#: builtin/add.c:286
msgid "add changes from all tracked and untracked files"
msgstr ""
"thêm các thay đổi từ tất cả các tập tin có cũng như không được theo dõi dấu "
"vết"
-#: builtin/add.c:329
+#: builtin/add.c:287
msgid "don't add, only refresh the index"
msgstr "không thêm, chỉ làm tươi mới bảng mục lục"
-#: builtin/add.c:330
+#: builtin/add.c:288
msgid "just skip files which cannot be added because of errors"
msgstr "chie bỏ qua những tập tin mà nó không thể được thêm vào bởi vì gặp lỗi"
-#: builtin/add.c:331
+#: builtin/add.c:289
msgid "check if - even missing - files are ignored in dry run"
msgstr ""
"kiểm tra xem - thậm chí thiếu - tập tin bị bỏ qua trong quá trình chạy thử"
-#: builtin/add.c:353
+#: builtin/add.c:311
#, c-format
msgid "Use -f if you really want to add them.\n"
msgstr "Sử dụng tùy chọn -f nếu bạn thực sự muốn thêm chúng vào.\n"
-#: builtin/add.c:354
+#: builtin/add.c:312
msgid "no files added"
msgstr "chưa có tập tin nào được thêm vào"
-#: builtin/add.c:360
+#: builtin/add.c:318
msgid "adding files failed"
msgstr "thêm tập tin gặp lỗi"
-#: builtin/add.c:392
+#.
+#. * To be consistent with "git add -p" and most Git
+#. * commands, we should default to being tree-wide, but
+#. * this is not the original behavior and can't be
+#. * changed until users trained themselves not to type
+#. * "git add -u" or "git add -A". For now, we warn and
+#. * keep the old behavior. Later, this warning can be
+#. * turned into a die(...), and eventually we may
+#. * reallow the command with a new behavior.
+#.
+#: builtin/add.c:335
+#, c-format
+msgid ""
+"The behavior of 'git add %s (or %s)' with no path argument from a\n"
+"subdirectory of the tree will change in Git 2.0 and should not be used "
+"anymore.\n"
+"To add content for the whole tree, run:\n"
+"\n"
+" git add %s :/\n"
+" (or git add %s :/)\n"
+"\n"
+"To restrict the command to the current directory, run:\n"
+"\n"
+" git add %s .\n"
+" (or git add %s .)\n"
+"\n"
+"With the current Git version, the command is restricted to the current "
+"directory."
+msgstr ""
+"Cách ứng xử của lệnh “git add %s (hay %s)” khi không có tham số đường dẫn "
+"từ\n"
+"thư-mục con của cây sẽ thay đổi kể từ Git 2.0 và không thể sử dụng như thế "
+"nữa.\n"
+"Để thêm nội dung cho toàn bộ cây, chạy:\n"
+"\n"
+" git add %s :/\n"
+" (hay git add %s :/)\n"
+"\n"
+"Để hạn chế lệnh cho thư-mục hiện tại, chạy:\n"
+"\n"
+" git add %s .\n"
+" (hay git add %s .)\n"
+"\n"
+"Với phiên bản hiện tại của Git, lệnh bị hạn chế cho thư-mục hiện tại."
+
+#: builtin/add.c:381
msgid "-A and -u are mutually incompatible"
msgstr "-A và -u xung khắc nhau"
-#: builtin/add.c:394
+#: builtin/add.c:383
msgid "Option --ignore-missing can only be used together with --dry-run"
msgstr "Tùy chọn --ignore-missing chỉ có thể được dùng cùng với --dry-run"
@@ -1565,12 +1660,12 @@ msgstr "Không có gì được chỉ ra, không có gì được thêm vào.\n"
msgid "Maybe you wanted to say 'git add .'?\n"
msgstr "Có lẽ bạn muốn là “git add .” phải không?\n"
-#: builtin/add.c:421 builtin/clean.c:203 builtin/commit.c:291 builtin/mv.c:82
-#: builtin/rm.c:235
+#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204
+#: builtin/commit.c:291 builtin/mv.c:82 builtin/rm.c:235
msgid "index file corrupt"
msgstr "tập tin ghi bảng mục lục bị hỏng"
-#: builtin/add.c:481 builtin/apply.c:4461 builtin/mv.c:229 builtin/rm.c:370
+#: builtin/add.c:481 builtin/apply.c:4501 builtin/mv.c:229 builtin/rm.c:370
msgid "Unable to write new index file"
msgstr "Không thể ghi tập tin lưu bảng mục lục mới"
@@ -1623,19 +1718,19 @@ msgstr "git apply: git-diff sai - tên tập tin cũ mâu thuấn trên dòng %d
#: builtin/apply.c:957
#, c-format
msgid "git apply: bad git-diff - expected /dev/null on line %d"
-msgstr "git apply: git-diff sai - mong đợi /dev/null trên dòng %d"
+msgstr "git apply: git-diff sai - cần /dev/null trên dòng %d"
-#: builtin/apply.c:1420
+#: builtin/apply.c:1422
#, c-format
msgid "recount: unexpected line: %.*s"
-msgstr "chi tiết: dòng không được mong đợi: %.*s"
+msgstr "chi tiết: dòng không cần: %.*s"
-#: builtin/apply.c:1477
+#: builtin/apply.c:1479
#, c-format
msgid "patch fragment without header at line %d: %.*s"
msgstr "miếng vá phân mảnh mà không có phần đầu tại dòng %d: %.*s"
-#: builtin/apply.c:1494
+#: builtin/apply.c:1496
#, c-format
msgid ""
"git diff header lacks filename information when removing %d leading pathname "
@@ -1650,78 +1745,78 @@ msgstr[1] ""
"phần đầu diff cho git thiếu thông tin tên tập tin khi gỡ bỏ đi %d trong "
"thành phần dẫn đầu tên của đường dẫn (dòng %d)"
-#: builtin/apply.c:1654
+#: builtin/apply.c:1656
msgid "new file depends on old contents"
msgstr "tập tin mới phụ thuộc vào nội dung cũ"
-#: builtin/apply.c:1656
+#: builtin/apply.c:1658
msgid "deleted file still has contents"
msgstr "tập tin đã xóa vẫn còn nội dung"
-#: builtin/apply.c:1682
+#: builtin/apply.c:1684
#, c-format
msgid "corrupt patch at line %d"
msgstr "miếng vá hỏng tại dòng %d"
-#: builtin/apply.c:1718
+#: builtin/apply.c:1720
#, c-format
msgid "new file %s depends on old contents"
msgstr "tập tin mới %s phụ thuộc vào nội dung cũ"
-#: builtin/apply.c:1720
+#: builtin/apply.c:1722
#, c-format
msgid "deleted file %s still has contents"
msgstr "tập tin đã xóa %s vẫn còn nội dung"
-#: builtin/apply.c:1723
+#: builtin/apply.c:1725
#, c-format
msgid "** warning: file %s becomes empty but is not deleted"
msgstr "** cảnh báo: tập tin %s trở nên trống rỗng nhưng không bị xóa"
-#: builtin/apply.c:1869
+#: builtin/apply.c:1871
#, c-format
msgid "corrupt binary patch at line %d: %.*s"
msgstr "miếng vá định dạng nhị phân sai hỏng tại dòng %d: %.*s"
#. there has to be one hunk (forward hunk)
-#: builtin/apply.c:1898
+#: builtin/apply.c:1900
#, c-format
msgid "unrecognized binary patch at line %d"
msgstr "miếng vá định dạng nhị phân không được nhận ra tại dòng %d"
-#: builtin/apply.c:1984
+#: builtin/apply.c:1986
#, c-format
msgid "patch with only garbage at line %d"
msgstr "vá chỉ với “garbage” tại dòng %d"
-#: builtin/apply.c:2074
+#: builtin/apply.c:2076
#, c-format
msgid "unable to read symlink %s"
msgstr "không thể đọc liên kết tượng trưng %s"
-#: builtin/apply.c:2078
+#: builtin/apply.c:2080
#, c-format
msgid "unable to open or read %s"
-msgstr "không thể mở để đọc hay ghi %s"
+msgstr "không thể mở hay đọc %s"
-#: builtin/apply.c:2682
+#: builtin/apply.c:2684
#, c-format
msgid "invalid start of line: '%c'"
msgstr "sai khởi đầu dòng: “%c”"
-#: builtin/apply.c:2800
+#: builtin/apply.c:2802
#, c-format
msgid "Hunk #%d succeeded at %d (offset %d line)."
msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
msgstr[0] "Khối dữ liệu #%d thành công tại %d (offset %d dòng)."
msgstr[1] "Khối dữ liệu #%d thành công tại %d (offset %d dòng)."
-#: builtin/apply.c:2812
+#: builtin/apply.c:2814
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr "Nội dung bị giảm xuống (%ld/%ld) để áp dụng mảnh dữ liệu tại %d"
-#: builtin/apply.c:2818
+#: builtin/apply.c:2820
#, c-format
msgid ""
"while searching for:\n"
@@ -1730,325 +1825,325 @@ msgstr ""
"Trong khi đang tìm kiếm cho:\n"
"%.*s"
-#: builtin/apply.c:2837
+#: builtin/apply.c:2839
#, c-format
msgid "missing binary patch data for '%s'"
msgstr "thiếu dữ liệu của miếng vá định dạng nhị phân cho “%s”"
-#: builtin/apply.c:2940
+#: builtin/apply.c:2942
#, c-format
msgid "binary patch does not apply to '%s'"
msgstr "miếng vá định dạng nhị phân không được áp dụng cho “%s”"
-#: builtin/apply.c:2946
+#: builtin/apply.c:2948
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr ""
"vá nhị phân cho “%s” tạo ra kết quả không chính xác (mong chờ %s, lại nhận "
"%s)"
-#: builtin/apply.c:2967
+#: builtin/apply.c:2969
#, c-format
msgid "patch failed: %s:%ld"
msgstr "vá gặp lỗi: %s:%ld"
-#: builtin/apply.c:3089
+#: builtin/apply.c:3091
#, c-format
msgid "cannot checkout %s"
msgstr "không thể \"checkout\" %s"
-#: builtin/apply.c:3134 builtin/apply.c:3143 builtin/apply.c:3187
+#: builtin/apply.c:3136 builtin/apply.c:3145 builtin/apply.c:3189
#, c-format
msgid "read of %s failed"
msgstr "đọc %s gặp lỗi"
-#: builtin/apply.c:3167 builtin/apply.c:3389
+#: builtin/apply.c:3169 builtin/apply.c:3391
#, c-format
msgid "path %s has been renamed/deleted"
msgstr "đường dẫn %s đã bị xóa/đổi tên"
-#: builtin/apply.c:3248 builtin/apply.c:3403
+#: builtin/apply.c:3250 builtin/apply.c:3405
#, c-format
msgid "%s: does not exist in index"
msgstr "%s: không tồn tại trong bảng mục lục"
-#: builtin/apply.c:3252 builtin/apply.c:3395 builtin/apply.c:3417
+#: builtin/apply.c:3254 builtin/apply.c:3397 builtin/apply.c:3419
#, c-format
msgid "%s: %s"
msgstr "%s: %s"
-#: builtin/apply.c:3257 builtin/apply.c:3411
+#: builtin/apply.c:3259 builtin/apply.c:3413
#, c-format
msgid "%s: does not match index"
msgstr "%s: không khớp trong mục lục"
-#: builtin/apply.c:3359
+#: builtin/apply.c:3361
msgid "removal patch leaves file contents"
msgstr "loại bỏ miếng vá để lại nội dung tập tin"
-#: builtin/apply.c:3428
+#: builtin/apply.c:3430
#, c-format
msgid "%s: wrong type"
msgstr "%s: sai kiểu"
-#: builtin/apply.c:3430
+#: builtin/apply.c:3432
#, c-format
msgid "%s has type %o, expected %o"
msgstr "%s có kiểu %o, mong chờ %o"
-#: builtin/apply.c:3531
+#: builtin/apply.c:3533
#, c-format
msgid "%s: already exists in index"
msgstr "%s: đã có từ trước trong bảng mục lục"
-#: builtin/apply.c:3534
+#: builtin/apply.c:3536
#, c-format
msgid "%s: already exists in working directory"
msgstr "%s: đã sẵn có trong thư mục đang làm việc"
-#: builtin/apply.c:3554
+#: builtin/apply.c:3556
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o)"
msgstr "chế độ mới (%o) của %s không khớp với chế độ cũ (%o)"
-#: builtin/apply.c:3559
+#: builtin/apply.c:3561
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o) of %s"
msgstr "chế độ mới (%o) của %s không khớp với chế độ cũ (%o) của %s"
-#: builtin/apply.c:3567
+#: builtin/apply.c:3569
#, c-format
msgid "%s: patch does not apply"
msgstr "%s: miếng vá không được áp dụng"
-#: builtin/apply.c:3580
+#: builtin/apply.c:3582
#, c-format
msgid "Checking patch %s..."
msgstr "Đang kiểm tra miếng vá %s..."
-#: builtin/apply.c:3635 builtin/checkout.c:215 builtin/reset.c:124
+#: builtin/apply.c:3675 builtin/checkout.c:215 builtin/reset.c:124
#, c-format
msgid "make_cache_entry failed for path '%s'"
msgstr "make_cache_entry gặp lỗi đối với đường dẫn “%s”"
-#: builtin/apply.c:3778
+#: builtin/apply.c:3818
#, c-format
msgid "unable to remove %s from index"
msgstr "không thể gỡ bỏ %s từ mục lục"
-#: builtin/apply.c:3806
+#: builtin/apply.c:3846
#, c-format
msgid "corrupt patch for subproject %s"
msgstr "miếng vá sai hỏng cho dự án con (subproject) %s"
-#: builtin/apply.c:3810
+#: builtin/apply.c:3850
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr "không thể lấy trạng thái về tập tin %s mới hơn đã được tạo"
-#: builtin/apply.c:3815
+#: builtin/apply.c:3855
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr "không thể tạo “backing store” cho tập tin được tạo mới hơn %s"
-#: builtin/apply.c:3818 builtin/apply.c:3926
+#: builtin/apply.c:3858 builtin/apply.c:3966
#, c-format
msgid "unable to add cache entry for %s"
msgstr "không thể thêm mục nhớ tạm cho %s"
-#: builtin/apply.c:3851
+#: builtin/apply.c:3891
#, c-format
msgid "closing file '%s'"
msgstr "đang đóng tập tin “%s”"
-#: builtin/apply.c:3900
+#: builtin/apply.c:3940
#, c-format
msgid "unable to write file '%s' mode %o"
msgstr "không thể ghi vào tập tin “%s” chế độ (mode) %o"
-#: builtin/apply.c:3987
+#: builtin/apply.c:4027
#, c-format
msgid "Applied patch %s cleanly."
msgstr "Đã áp dụng miếng và %s một cách sạch sẽ."
-#: builtin/apply.c:3995
+#: builtin/apply.c:4035
msgid "internal error"
msgstr "lỗi nội bộ"
#. Say this even without --verbose
-#: builtin/apply.c:3998
+#: builtin/apply.c:4038
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
msgstr[0] "Đang áp dụng miếng vá %%s với %d lần từ chối..."
msgstr[1] "Đang áp dụng miếng vá %%s với %d lần từ chối..."
-#: builtin/apply.c:4008
+#: builtin/apply.c:4048
#, c-format
msgid "truncating .rej filename to %.*s.rej"
msgstr "đang cắt cụt tên tập tin .rej thành %.*s.rej"
-#: builtin/apply.c:4029
+#: builtin/apply.c:4069
#, c-format
msgid "Hunk #%d applied cleanly."
msgstr "Khối nhớ #%d được áp dụng gọn gàng."
-#: builtin/apply.c:4032
+#: builtin/apply.c:4072
#, c-format
msgid "Rejected hunk #%d."
msgstr "hunk #%d bị từ chối."
-#: builtin/apply.c:4182
+#: builtin/apply.c:4222
msgid "unrecognized input"
msgstr "không thừa nhận đầu vào"
-#: builtin/apply.c:4193
+#: builtin/apply.c:4233
msgid "unable to read index file"
msgstr "không thể đọc tập tin lưu bảng mục lục"
-#: builtin/apply.c:4312 builtin/apply.c:4315 builtin/clone.c:91
+#: builtin/apply.c:4352 builtin/apply.c:4355 builtin/clone.c:91
#: builtin/fetch.c:63
msgid "path"
msgstr "đường-dẫn"
-#: builtin/apply.c:4313
+#: builtin/apply.c:4353
msgid "don't apply changes matching the given path"
msgstr "không áp dụng các thay đổi khớp với đường dẫn đã cho"
-#: builtin/apply.c:4316
+#: builtin/apply.c:4356
msgid "apply changes matching the given path"
msgstr "áp dụng các thay đổi khớp với đường dẫn đã cho"
-#: builtin/apply.c:4318
+#: builtin/apply.c:4358
msgid "num"
msgstr "số"
-#: builtin/apply.c:4319
+#: builtin/apply.c:4359
msgid "remove <num> leading slashes from traditional diff paths"
msgstr "gỡ bỏ <số> phần dẫn đầu (slashe) từ đường dẫn diff cổ điển"
-#: builtin/apply.c:4322
+#: builtin/apply.c:4362
msgid "ignore additions made by the patch"
msgstr "lờ đi phần phụ thêm tạo ra bởi miếng vá"
-#: builtin/apply.c:4324
+#: builtin/apply.c:4364
msgid "instead of applying the patch, output diffstat for the input"
msgstr ""
"thay vì áp dụng một miếng vá, kết xuất kết quả từ lệnh diffstat cho đầu ra"
-#: builtin/apply.c:4328
+#: builtin/apply.c:4368
msgid "show number of added and deleted lines in decimal notation"
msgstr ""
"hiển thị số lượng các dòng được thêm vào và xóa đi theo ký hiệu thập phân"
-#: builtin/apply.c:4330
+#: builtin/apply.c:4370
msgid "instead of applying the patch, output a summary for the input"
msgstr "thay vì áp dụng một miếng vá, kết xuất kết quả cho đầu vào"
-#: builtin/apply.c:4332
+#: builtin/apply.c:4372
msgid "instead of applying the patch, see if the patch is applicable"
msgstr "thay vì áp dụng miếng vá, hãy xem xem miếng vá có thích hợp không"
-#: builtin/apply.c:4334
+#: builtin/apply.c:4374
msgid "make sure the patch is applicable to the current index"
msgstr "hãy chắc chắn là miếng vá thích hợp với bảng mục lục hiện hành"
-#: builtin/apply.c:4336
+#: builtin/apply.c:4376
msgid "apply a patch without touching the working tree"
msgstr "áp dụng một miếng vá mà không động chạm đến cây làm việc"
-#: builtin/apply.c:4338
+#: builtin/apply.c:4378
msgid "also apply the patch (use with --stat/--summary/--check)"
msgstr ""
"đồng thời áp dụng miếng vá (dùng với tùy chọn --stat/--summary/--check)"
-#: builtin/apply.c:4340
+#: builtin/apply.c:4380
msgid "attempt three-way merge if a patch does not apply"
msgstr "thử hòa trộn kiểu three-way nếu việc vá không thể thực hiện được"
-#: builtin/apply.c:4342
+#: builtin/apply.c:4382
msgid "build a temporary index based on embedded index information"
msgstr ""
"xây dựng bảng mục lục tạm thời trên cơ sở thông tin bảng mục lục được nhúng"
-#: builtin/apply.c:4344 builtin/checkout-index.c:197 builtin/ls-files.c:460
+#: builtin/apply.c:4384 builtin/checkout-index.c:197 builtin/ls-files.c:463
msgid "paths are separated with NUL character"
msgstr "các đường dẫn bị ngăn cách bởi ký tự NULL"
-#: builtin/apply.c:4347
+#: builtin/apply.c:4387
msgid "ensure at least <n> lines of context match"
msgstr "đảm bảo rằng có ít nhất <n> dòng nội dung khớp"
-#: builtin/apply.c:4348
+#: builtin/apply.c:4388
msgid "action"
msgstr "hành động"
-#: builtin/apply.c:4349
+#: builtin/apply.c:4389
msgid "detect new or modified lines that have whitespace errors"
msgstr "tìm thấy một dòng mới hoặc bị sửa đổi mà nó có lỗi do khoảng trắng"
-#: builtin/apply.c:4352 builtin/apply.c:4355
+#: builtin/apply.c:4392 builtin/apply.c:4395
msgid "ignore changes in whitespace when finding context"
msgstr "lờ đi sự thay đổi do khoảng trắng khi quét nội dung"
-#: builtin/apply.c:4358
+#: builtin/apply.c:4398
msgid "apply the patch in reverse"
msgstr "áp dụng miếng vá theo chiều ngược"
-#: builtin/apply.c:4360
+#: builtin/apply.c:4400
msgid "don't expect at least one line of context"
msgstr "đừng hy vọng có ít nhất một dòng nội dung"
-#: builtin/apply.c:4362
+#: builtin/apply.c:4402
msgid "leave the rejected hunks in corresponding *.rej files"
msgstr "để lại khối dữ liệu bị từ chối trong các tập tin *.rej tương ứng"
-#: builtin/apply.c:4364
+#: builtin/apply.c:4404
msgid "allow overlapping hunks"
msgstr "cho phép chồng khối nhớ"
-#: builtin/apply.c:4367
+#: builtin/apply.c:4407
msgid "tolerate incorrectly detected missing new-line at the end of file"
msgstr ""
"đã dò tìm thấy dung sai không chính xác thiếu dòng mới tại cuối tập tin"
-#: builtin/apply.c:4370
+#: builtin/apply.c:4410
msgid "do not trust the line counts in the hunk headers"
msgstr "không tin số lượng dòng trong phần đầu khối dữ liệu"
-#: builtin/apply.c:4372
+#: builtin/apply.c:4412
msgid "root"
msgstr "root"
-#: builtin/apply.c:4373
+#: builtin/apply.c:4413
msgid "prepend <root> to all filenames"
msgstr "treo thêm <root> vào tất cả các tên tập tin"
-#: builtin/apply.c:4395
+#: builtin/apply.c:4435
msgid "--3way outside a repository"
msgstr "--3way ở ngoài một kho chứa"
-#: builtin/apply.c:4403
+#: builtin/apply.c:4443
msgid "--index outside a repository"
msgstr "--index ở ngoài một kho chứa"
-#: builtin/apply.c:4406
+#: builtin/apply.c:4446
msgid "--cached outside a repository"
msgstr "--cached ở ngoài một kho chứa"
-#: builtin/apply.c:4422
+#: builtin/apply.c:4462
#, c-format
msgid "can't open patch '%s'"
msgstr "không thể mở miếng vá “%s”"
-#: builtin/apply.c:4436
+#: builtin/apply.c:4476
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
msgstr[0] "đã chấm dứt %d lỗi khoảng trắng"
msgstr[1] "đã chấm dứt %d lỗi khoảng trắng"
-#: builtin/apply.c:4442 builtin/apply.c:4452
+#: builtin/apply.c:4482 builtin/apply.c:4492
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
@@ -2112,97 +2207,97 @@ msgstr "git blame [các-tùy-chọn] [rev-opts] [rev] [--] tập-tin"
msgid "[rev-opts] are documented in git-rev-list(1)"
msgstr "[rev-opts] được mô tả trong git-rev-list(1)"
-#: builtin/blame.c:2364
+#: builtin/blame.c:2350
msgid "Show blame entries as we find them, incrementally"
msgstr "Hiển thị các mục “blame” như là chúng ta thấy chúng, tăng dần"
-#: builtin/blame.c:2365
+#: builtin/blame.c:2351
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr ""
"Hiển thị SHA-1 trắng cho những lần chuyển giao biên giới (Mặc định: off)"
-#: builtin/blame.c:2366
+#: builtin/blame.c:2352
msgid "Do not treat root commits as boundaries (Default: off)"
msgstr "Không coi các lần chuyển giao gốc là giới hạn (Mặc định: off)"
-#: builtin/blame.c:2367
+#: builtin/blame.c:2353
msgid "Show work cost statistics"
msgstr "Hiển thị thống kê công sức làm việc"
-#: builtin/blame.c:2368
+#: builtin/blame.c:2354
msgid "Show output score for blame entries"
msgstr "Hiển thị kết xuất điểm số có các mục tin “blame”"
-#: builtin/blame.c:2369
+#: builtin/blame.c:2355
msgid "Show original filename (Default: auto)"
msgstr "Hiển thị tên tập tin gốc (Mặc định: auto)"
-#: builtin/blame.c:2370
+#: builtin/blame.c:2356
msgid "Show original linenumber (Default: off)"
msgstr "Hiển thị số dòng gốc (Mặc định: off)"
-#: builtin/blame.c:2371
+#: builtin/blame.c:2357
msgid "Show in a format designed for machine consumption"
msgstr "Hiển thị ở định dạng đã thiết kế cho sự tiêu dùng bằng máy"
-#: builtin/blame.c:2372
+#: builtin/blame.c:2358
msgid "Show porcelain format with per-line commit information"
msgstr "Hiển thị định dạng “porcelain” với thông tin chuyển giao mỗi dòng"
-#: builtin/blame.c:2373
+#: builtin/blame.c:2359
msgid "Use the same output mode as git-annotate (Default: off)"
msgstr "Dùng cùng chế độ xuất ra vóigit-annotate (Mặc định: off)"
-#: builtin/blame.c:2374
+#: builtin/blame.c:2360
msgid "Show raw timestamp (Default: off)"
msgstr "Hiển thị dấu vết thời gian dạng thô (Mặc định: off)"
-#: builtin/blame.c:2375
+#: builtin/blame.c:2361
msgid "Show long commit SHA1 (Default: off)"
msgstr "Hiển thị SHA1 của lần chuyển giao (commit) dạng dài (Mặc định: off)"
-#: builtin/blame.c:2376
+#: builtin/blame.c:2362
msgid "Suppress author name and timestamp (Default: off)"
msgstr "Không hiển thị tên tác giả và dấu vết thời gian (Mặc định: off)"
-#: builtin/blame.c:2377
+#: builtin/blame.c:2363
msgid "Show author email instead of name (Default: off)"
msgstr "Hiển thị thư điện tử của tác giả thay vì tên (Mặc định: off)"
-#: builtin/blame.c:2378
+#: builtin/blame.c:2364
msgid "Ignore whitespace differences"
msgstr "Bỏ qua các khác biệt do khoảng trắng gây ra"
-#: builtin/blame.c:2379
+#: builtin/blame.c:2365
msgid "Spend extra cycles to find better match"
msgstr "Tiêu thụ thêm năng tài nguyên máy móc để tìm kiếm tốt hơn nữa"
-#: builtin/blame.c:2380
+#: builtin/blame.c:2366
msgid "Use revisions from <file> instead of calling git-rev-list"
msgstr ""
"Sử dụng điểm xét duyệt (revision) từ <tập tin> thay vì gọi “git-rev-list”"
-#: builtin/blame.c:2381
+#: builtin/blame.c:2367
msgid "Use <file>'s contents as the final image"
msgstr "Sử dụng nội dung của <tập tin> như là ảnh cuối cùng"
-#: builtin/blame.c:2382 builtin/blame.c:2383
+#: builtin/blame.c:2368 builtin/blame.c:2369
msgid "score"
msgstr "điểm số"
-#: builtin/blame.c:2382
+#: builtin/blame.c:2368
msgid "Find line copies within and across files"
msgstr "Tìm các bản sao chép dòng trong và ngang qua tập tin"
-#: builtin/blame.c:2383
+#: builtin/blame.c:2369
msgid "Find line movements within and across files"
msgstr "Tìm các di chuyển dòng trong và ngang qua tập tin"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "n,m"
msgstr "n,m"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "Process only line range n,m, counting from 1"
msgstr "Xử lý chỉ dòng vùng n,m, tính từ 1"
@@ -2284,7 +2379,7 @@ msgstr "không tìm thấy nhánh “%s”."
#: builtin/branch.c:250
#, c-format
msgid "Error deleting remote branch '%s'"
-msgstr "Gặp lỗi khi đang xóa nhánh máy chủ “%s”"
+msgstr "Gặp lỗi khi đang xóa nhánh trên máy chủ “%s”"
#: builtin/branch.c:251
#, c-format
@@ -2294,7 +2389,7 @@ msgstr "Lỗi khi xoá bỏ nhánh “%s”"
#: builtin/branch.c:258
#, c-format
msgid "Deleted remote branch %s (was %s).\n"
-msgstr "Nhánh máy chủ \"%s\" đã bị xóa (từng là %s).\n"
+msgstr "Nhánh trên máy chủ \"%s\" đã bị xóa (từng là %s).\n"
#: builtin/branch.c:259
#, c-format
@@ -2336,10 +2431,19 @@ msgstr "[%s: trước %d, sau %d]"
msgid "[ahead %d, behind %d]"
msgstr "[trước %d, sau %d]"
+#: builtin/branch.c:469
+msgid " **** invalid ref ****"
+msgstr " **** tham chiếu sai ****"
+
#: builtin/branch.c:560
msgid "(no branch)"
msgstr "(không nhánh)"
+#: builtin/branch.c:593
+#, c-format
+msgid "object '%s' does not point to a commit"
+msgstr "đối tượng “%s” không chỉ đến một lần chuyển giao (commit) nào cả"
+
#: builtin/branch.c:625
msgid "some refs could not be read"
msgstr "một số tham chiếu đã không thể đọc được"
@@ -2410,8 +2514,8 @@ msgid "act on remote-tracking branches"
msgstr "thao tác trên nhánh “remote-tracking”"
#: builtin/branch.c:761 builtin/branch.c:767 builtin/branch.c:788
-#: builtin/branch.c:794 builtin/commit.c:1378 builtin/commit.c:1379
-#: builtin/commit.c:1380 builtin/commit.c:1381 builtin/tag.c:470
+#: builtin/branch.c:794 builtin/commit.c:1366 builtin/commit.c:1367
+#: builtin/commit.c:1368 builtin/commit.c:1369 builtin/tag.c:468
msgid "commit"
msgstr "commit"
@@ -2479,27 +2583,53 @@ msgstr "Gặp lỗi khi phân giải HEAD như là một tham chiếu (ref) hợ
msgid "HEAD not found below refs/heads!"
msgstr "không tìm thấy HEAD ở dưới refs/heads!"
-#: builtin/branch.c:836
+#: builtin/branch.c:839
msgid "--column and --verbose are incompatible"
msgstr "--column và --verbose xung khắc nhau"
-#: builtin/branch.c:887
+#: builtin/branch.c:845
+msgid "branch name required"
+msgstr "cần tên nhánh"
+
+#: builtin/branch.c:860
+msgid "Cannot give description to detached HEAD"
+msgstr "Không thể đưa ra mô tả HEAD đã tách rời"
+
+#: builtin/branch.c:865
+msgid "cannot edit description of more than one branch"
+msgstr "không thể sửa mô tả cho nhiều hơn một nhánh"
+
+#: builtin/branch.c:872
+#, c-format
+msgid "No commit on branch '%s' yet."
+msgstr "Vẫn chưa chuyển giao trên nhánh “%s”."
+
+#: builtin/branch.c:875
+#, c-format
+msgid "No branch named '%s'."
+msgstr "Không có nhánh nào có tên “%s”."
+
+#: builtin/branch.c:888
+msgid "too many branches for a rename operation"
+msgstr "quá nhiều nhánh dành cho thao tác đổi tên"
+
+#: builtin/branch.c:893
#, c-format
msgid "branch '%s' does not exist"
msgstr "nhánh “%s” chưa sẵn có"
-#: builtin/branch.c:899
+#: builtin/branch.c:905
#, c-format
msgid "Branch '%s' has no upstream information"
msgstr "Nhánh “%s” không có thông tin thượng nguồn (upstream)"
-#: builtin/branch.c:914
+#: builtin/branch.c:920
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
msgstr ""
"hai tùy chọn -a và -r áp dụng cho lệnh “git branch” không hợp lý đối với tên "
"nhánh"
-#: builtin/branch.c:917
+#: builtin/branch.c:923
#, c-format
msgid ""
"The --set-upstream flag is deprecated and will be removed. Consider using --"
@@ -2508,7 +2638,7 @@ msgstr ""
"Cờ --set-upstream bị phản đối và sẽ bị xóa bỏ. Nên dùng --track hoặc --set-"
"upstream-to\n"
-#: builtin/branch.c:934
+#: builtin/branch.c:940
#, c-format
msgid ""
"\n"
@@ -2519,12 +2649,12 @@ msgstr ""
"Nếu bạn muốn “%s” theo dõi “%s”, thực hiện lệnh sau:\n"
"\n"
-#: builtin/branch.c:935
+#: builtin/branch.c:941
#, c-format
msgid " git branch -d %s\n"
msgstr " git branch -d %s\n"
-#: builtin/branch.c:936
+#: builtin/branch.c:942
#, c-format
msgid " git branch --set-upstream-to %s\n"
msgstr " git branch --set-upstream-to %s\n"
@@ -2600,14 +2730,38 @@ msgstr "báo cáo tất cả các thuộc tính đặt trên tập tin"
msgid "use .gitattributes only from the index"
msgstr "chỉ sử dụng .gitattributes từ bảng mục lục"
-#: builtin/check-attr.c:21 builtin/hash-object.c:75
+#: builtin/check-attr.c:21 builtin/check-ignore.c:22 builtin/hash-object.c:75
msgid "read file names from stdin"
msgstr "đọc tên tập tin từ đầu vào tiêu chuẩn"
-#: builtin/check-attr.c:23
+#: builtin/check-attr.c:23 builtin/check-ignore.c:24
msgid "input paths are terminated by a null character"
msgstr "các đường dẫn được ngăn cách bởi ký tự null"
+#: builtin/check-ignore.c:18 builtin/checkout.c:1012 builtin/gc.c:177
+msgid "suppress progress reporting"
+msgstr "chặn các báo cáo tiến trình hoạt động"
+
+#: builtin/check-ignore.c:151
+msgid "cannot specify pathnames with --stdin"
+msgstr "không thể chỉ định các tên đường dẫn với --stdin"
+
+#: builtin/check-ignore.c:154
+msgid "-z only makes sense with --stdin"
+msgstr "-z chỉ hợp lý với --stdin"
+
+#: builtin/check-ignore.c:156
+msgid "no path specified"
+msgstr "chưa ghi rõ đường dẫn"
+
+#: builtin/check-ignore.c:160
+msgid "--quiet is only valid with a single pathname"
+msgstr "--quiet chỉ hợp lệ với tên đường dẫn đơn"
+
+#: builtin/check-ignore.c:162
+msgid "cannot have both --quiet and --verbose"
+msgstr "không thể dùng cả hai tùy chọn --quiet và --verbose"
+
#: builtin/checkout-index.c:126
msgid "git checkout-index [options] [--] [<file>...]"
msgstr "git checkout-index [các-tùy-chọn] [--] [<tập-tin>...]"
@@ -2846,10 +3000,6 @@ msgstr "“%s” không thể được sử dụng với “%s”"
msgid "Cannot switch branch to a non-commit '%s'"
msgstr "Không thể chuyển nhánh đến một non-commit “%s”"
-#: builtin/checkout.c:1012 builtin/gc.c:177
-msgid "suppress progress reporting"
-msgstr "chặn các báo cáo tiến trình hoạt động"
-
#: builtin/checkout.c:1013 builtin/checkout.c:1015 builtin/clone.c:89
#: builtin/remote.c:169 builtin/remote.c:171
msgid "branch"
@@ -2985,47 +3135,47 @@ msgstr "Nên bỏ qua kho chứa %s\n"
msgid "failed to remove %s"
msgstr "gặp lỗi khi gỡ bỏ %s"
-#: builtin/clean.c:159
+#: builtin/clean.c:160
msgid "do not print names of files removed"
msgstr "không hiển thị tên của các tập tin đã gỡ bỏ"
-#: builtin/clean.c:161
+#: builtin/clean.c:162
msgid "force"
msgstr "ép buộc"
-#: builtin/clean.c:163
+#: builtin/clean.c:164
msgid "remove whole directories"
msgstr "gỡ bỏ toàn bộ thư mục"
-#: builtin/clean.c:164 builtin/describe.c:413 builtin/grep.c:717
-#: builtin/ls-files.c:491 builtin/name-rev.c:231 builtin/show-ref.c:182
+#: builtin/clean.c:165 builtin/describe.c:413 builtin/grep.c:717
+#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182
msgid "pattern"
msgstr "mẫu"
-#: builtin/clean.c:165
+#: builtin/clean.c:166
msgid "add <pattern> to ignore rules"
msgstr "thêm <mẫu> vào trong qui tắc bỏ qua"
-#: builtin/clean.c:166
+#: builtin/clean.c:167
msgid "remove ignored files, too"
msgstr "đồng thời gỡ bỏ cả các tập tin bị bỏ qua"
-#: builtin/clean.c:168
+#: builtin/clean.c:169
msgid "remove only ignored files"
msgstr "chỉ gỡ bỏ những tập tin bị bỏ qua"
-#: builtin/clean.c:186
+#: builtin/clean.c:187
msgid "-x and -X cannot be used together"
msgstr "-x và -X không thể dùng cùng một lúc với nhau"
-#: builtin/clean.c:190
+#: builtin/clean.c:191
msgid ""
"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
msgstr ""
"clean.requireForce được đặt thành true và không đưa ra tùy chọn -n mà cũng "
"không -f; từ chối lệnh dọn dẹp (clean)"
-#: builtin/clean.c:193
+#: builtin/clean.c:194
msgid ""
"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
"clean"
@@ -3038,7 +3188,7 @@ msgid "git clone [options] [--] <repo> [<dir>]"
msgstr "git clone [các-tùy-chọn] [--] <kho> [<t.mục>]"
#: builtin/clone.c:64 builtin/fetch.c:82 builtin/merge.c:212
-#: builtin/push.c:407
+#: builtin/push.c:436
msgid "force progress reporting"
msgstr "ép buộc báo cáo tiến trình"
@@ -3151,11 +3301,6 @@ msgstr "%s tồn tại nhưng không phải là một thư mục"
msgid "failed to stat %s\n"
msgstr "lỗi stat (lấy trạng thái về) %s\n"
-#: builtin/clone.c:341
-#, c-format
-msgid "failed to unlink '%s'"
-msgstr "bỏ liên kết (unlink) %s không thành công"
-
#: builtin/clone.c:346
#, c-format
msgid "failed to create link '%s'"
@@ -3216,7 +3361,7 @@ msgstr "đường dẫn đích “%s” đã có từ trước và không phải
msgid "working tree '%s' already exists."
msgstr "cây làm việc “%s” đã sẵn tồn tại rồi."
-#: builtin/clone.c:759 builtin/clone.c:773
+#: builtin/clone.c:759 builtin/clone.c:771
#, c-format
msgid "could not create leading directories of '%s'"
msgstr "không thể tạo các thư mục dẫn đầu của “%s”"
@@ -3226,27 +3371,27 @@ msgstr "không thể tạo các thư mục dẫn đầu của “%s”"
msgid "could not create work tree dir '%s'."
msgstr "không thể tạo cây thư mục làm việc dir “%s”."
-#: builtin/clone.c:783
+#: builtin/clone.c:781
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr "Đang nhân bản thành kho chứa bare “%s”...\n"
-#: builtin/clone.c:785
+#: builtin/clone.c:783
#, c-format
msgid "Cloning into '%s'...\n"
msgstr "Đang nhân bản thành “%s”...\n"
-#: builtin/clone.c:827
+#: builtin/clone.c:818
#, c-format
msgid "Don't know how to clone %s"
msgstr "Không biết làm cách nào để nhân bản (clone) %s"
-#: builtin/clone.c:876
+#: builtin/clone.c:867
#, c-format
msgid "Remote branch %s not found in upstream %s"
msgstr "Nhánh máy chủ %s không tìm thấy trong thượng nguồn (upstream) %s"
-#: builtin/clone.c:883
+#: builtin/clone.c:874
msgid "You appear to have cloned an empty repository."
msgstr "Bạn hình như là đã nhân bản một kho trống rỗng."
@@ -3283,12 +3428,12 @@ msgid "--command must be the first argument"
msgstr "--command phải là đối số đầu tiên"
#: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
-msgstr "git commit [các-tùy-chọn] [--] <mẫu-tập-tin>..."
+msgid "git commit [options] [--] <pathspec>..."
+msgstr "git commit [các-tùy-chọn] [--] <pathspec>..."
#: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
-msgstr "git status [các-tùy-chọn] [--] <mẫu-tập-tin>..."
+msgid "git status [options] [--] <pathspec>..."
+msgstr "git status [các-tùy-chọn] [--] <pathspec>..."
#: builtin/commit.c:44
msgid ""
@@ -3469,25 +3614,27 @@ msgstr ""
"và thử lại.\n"
#: builtin/commit.c:735
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be ignored, and an empty message aborts the commit.\n"
+"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
"Hãy nhập vào các thông tin để giải thích các thay đổi của bạn. Những dòng "
"được\n"
-"bắt đầu bằng “#” sẽ được bỏ qua, phần chú thích này nếu rỗng sẽ làm hủy bỏ "
-"lần chuyển giao (commit).\n"
+"bắt đầu bằng “%c” sẽ được bỏ qua, nếu phần chú thích rỗng sẽ hủy bỏ lần "
+"chuyển giao (commit).\n"
#: builtin/commit.c:740
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be kept; you may remove them yourself if you want to.\n"
+"with '%c' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
-"Hãy nhập vào các thông tin để giải thích các thay đổi của bạn.Những dòng "
+"Hãy nhập vào các thông tin để giải thích các thay đổi của bạn. Những dòng "
"được\n"
-"bắt đầu bằng “#” sẽ được bỏ qua; bạn có thể xóa chúng đi nếu muốn.\n"
-"Phần chú thích này nếu rỗng sẽ làm hủy bỏ lần chuyển giao (commit).\n"
+"bắt đầu bằng “%c” sẽ được bỏ qua; bạn có thể xóa chúng đi nếu muốn thế.\n"
+"Phần chú thích này nếu trống rỗng sẽ hủy bỏ lần chuyển giao (commit).\n"
#: builtin/commit.c:753
#, c-format
@@ -3507,7 +3654,7 @@ msgstr "không đọc được bảng mục lục"
msgid "Error building trees"
msgstr "Gặp lỗi khi xây dựng cây"
-#: builtin/commit.c:832 builtin/tag.c:361
+#: builtin/commit.c:832 builtin/tag.c:359
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr "Xin hãy áp dụng thông điệp sử dụng hoặc là tùy chọn -m hoặc là -F.\n"
@@ -3517,120 +3664,120 @@ msgstr "Xin hãy áp dụng thông điệp sử dụng hoặc là tùy chọn -m
msgid "No existing author found with '%s'"
msgstr "Không tìm thấy tác giả có sẵn với “%s”"
-#: builtin/commit.c:944 builtin/commit.c:1148
+#: builtin/commit.c:944 builtin/commit.c:1138
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr "Chế độ cho các tập tin không bị theo vết không hợp lệ “%s”"
-#: builtin/commit.c:984
+#: builtin/commit.c:974
msgid "Using both --reset-author and --author does not make sense"
msgstr "Sử dụng cả hai tùy chọn --reset-author và --author không hợp lý"
-#: builtin/commit.c:995
+#: builtin/commit.c:985
msgid "You have nothing to amend."
msgstr "Không có gì để amend (tu bổ) cả."
-#: builtin/commit.c:998
+#: builtin/commit.c:988
msgid "You are in the middle of a merge -- cannot amend."
msgstr ""
"Bạn đang ở giữa của quá trình hòa trộn -- không thể thực hiện amend (tu bổ)."
-#: builtin/commit.c:1000
+#: builtin/commit.c:990
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr ""
"Bạn đang ở giữa của quá trình cherry-pick -- không thể thực hiện amend (tu "
"bổ)."
-#: builtin/commit.c:1003
+#: builtin/commit.c:993
msgid "Options --squash and --fixup cannot be used together"
msgstr "Các tùy chọn --squash và --fixup không thể sử dụng cùng với nhau"
-#: builtin/commit.c:1013
+#: builtin/commit.c:1003
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr "Chỉ một tùy chọn trong số -c/-C/-F/--fixup được sử dụng"
-#: builtin/commit.c:1015
+#: builtin/commit.c:1005
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "Tùy chọn -m không thể được tổ hợp cùng với -c/-C/-F/--fixup."
-#: builtin/commit.c:1023
+#: builtin/commit.c:1013
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr ""
"--reset-author chỉ có thể được sử dụng với tùy chọn -C, -c hay --amend."
-#: builtin/commit.c:1040
+#: builtin/commit.c:1030
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr ""
"Chỉ một trong các tùy chọn --include/--only/--all/--interactive/--patch được "
"sử dụng."
-#: builtin/commit.c:1042
+#: builtin/commit.c:1032
msgid "No paths with --include/--only does not make sense."
msgstr "Không đường dẫn với các tùy chọn --include/--only không hợp lý."
-#: builtin/commit.c:1044
+#: builtin/commit.c:1034
msgid "Clever... amending the last one with dirty index."
msgstr "Giỏi... tu bổ cái cuối với bảng mục lục phi nghĩa."
-#: builtin/commit.c:1046
+#: builtin/commit.c:1036
msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
msgstr ""
"Những đường dẫn rõ ràng được chỉ ra không có tùy chọn -i cũng không -o; đang "
"giả định --only những-đường-dẫn..."
-#: builtin/commit.c:1056 builtin/tag.c:577
+#: builtin/commit.c:1046 builtin/tag.c:575
#, c-format
msgid "Invalid cleanup mode %s"
msgstr "Chế độ dọn dẹp không hợp lệ %s"
-#: builtin/commit.c:1061
+#: builtin/commit.c:1051
msgid "Paths with -a does not make sense."
msgstr "Các đường dẫn với tùy chọn -a không hợp lý."
-#: builtin/commit.c:1067 builtin/commit.c:1202
+#: builtin/commit.c:1057 builtin/commit.c:1192
msgid "--long and -z are incompatible"
msgstr "hai tùy chọn -long và -z không tương thích với nhau"
-#: builtin/commit.c:1162 builtin/commit.c:1400
+#: builtin/commit.c:1152 builtin/commit.c:1388
msgid "show status concisely"
msgstr "hiển thị trạng thái ở dạng súc tích"
-#: builtin/commit.c:1164 builtin/commit.c:1402
+#: builtin/commit.c:1154 builtin/commit.c:1390
msgid "show branch information"
msgstr "hiển thị thông tin nhánh"
-#: builtin/commit.c:1166 builtin/commit.c:1404 builtin/push.c:397
+#: builtin/commit.c:1156 builtin/commit.c:1392 builtin/push.c:426
msgid "machine-readable output"
msgstr "kết xuất dạng máy-có-thể-đọc"
-#: builtin/commit.c:1169 builtin/commit.c:1406
+#: builtin/commit.c:1159 builtin/commit.c:1394
msgid "show status in long format (default)"
msgstr "hiển thị trạng thái ở định dạng dài (mặc định)"
-#: builtin/commit.c:1172 builtin/commit.c:1409
+#: builtin/commit.c:1162 builtin/commit.c:1397
msgid "terminate entries with NUL"
msgstr "chấm dứt các mục bằng NUL"
-#: builtin/commit.c:1174 builtin/commit.c:1412 builtin/fast-export.c:647
-#: builtin/fast-export.c:650 builtin/tag.c:461
+#: builtin/commit.c:1164 builtin/commit.c:1400 builtin/fast-export.c:647
+#: builtin/fast-export.c:650 builtin/tag.c:459
msgid "mode"
msgstr "chế độ"
-#: builtin/commit.c:1175 builtin/commit.c:1412
+#: builtin/commit.c:1165 builtin/commit.c:1400
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
"hiển thị các tập tin chưa được theo dõi dấu vết, các chế độ tùy chọn: all, "
"normal, no. (Mặc định: all)"
-#: builtin/commit.c:1178
+#: builtin/commit.c:1168
msgid "show ignored files"
msgstr "hiển thị các tập tin ẩn"
-#: builtin/commit.c:1179 parse-options.h:151
+#: builtin/commit.c:1169 parse-options.h:151
msgid "when"
msgstr "khi"
-#: builtin/commit.c:1180
+#: builtin/commit.c:1170
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
@@ -3638,223 +3785,223 @@ msgstr ""
"bỏ qua các thay đổi trong mô-đun con, tùy chọn khi: all, dirty, untracked. "
"(Mặc định: all)"
-#: builtin/commit.c:1182
+#: builtin/commit.c:1172
msgid "list untracked files in columns"
msgstr "hiển thị danh sách các tập-tin chưa được theo dõi trong các cột"
-#: builtin/commit.c:1256
+#: builtin/commit.c:1246
msgid "couldn't look up newly created commit"
msgstr "không thể tìm thấy lần chuyển giao (commit) mới hơn đã được tạo"
-#: builtin/commit.c:1258
+#: builtin/commit.c:1248
msgid "could not parse newly created commit"
msgstr ""
"không thể phân tích cú pháp của đối tượng chuyển giao mới hơn đã được tạo"
-#: builtin/commit.c:1299
+#: builtin/commit.c:1289
msgid "detached HEAD"
msgstr "đã rời khỏi HEAD"
-#: builtin/commit.c:1301
+#: builtin/commit.c:1291
msgid " (root-commit)"
msgstr " (root-commit)"
-#: builtin/commit.c:1370
+#: builtin/commit.c:1358
msgid "suppress summary after successful commit"
msgstr "không hiển thị tổng kết sau khi chuyển giao thành công"
-#: builtin/commit.c:1371
+#: builtin/commit.c:1359
msgid "show diff in commit message template"
msgstr "hiển thị sự khác biệt trong mẫu tin nhắn chuyển giao"
-#: builtin/commit.c:1373
+#: builtin/commit.c:1361
msgid "Commit message options"
msgstr "Các tùy chọn ghi chú commit"
-#: builtin/commit.c:1374 builtin/tag.c:459
+#: builtin/commit.c:1362 builtin/tag.c:457
msgid "read message from file"
msgstr "đọc chú thích từ tập tin"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "author"
msgstr "tác giả"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "override author for commit"
msgstr "ghi đè tác giả cho commit"
-#: builtin/commit.c:1376 builtin/gc.c:178
+#: builtin/commit.c:1364 builtin/gc.c:178
msgid "date"
msgstr "ngày tháng"
-#: builtin/commit.c:1376
+#: builtin/commit.c:1364
msgid "override date for commit"
msgstr "ghi đè ngày tháng cho commit"
-#: builtin/commit.c:1377 builtin/merge.c:206 builtin/notes.c:537
-#: builtin/notes.c:694 builtin/tag.c:457
+#: builtin/commit.c:1365 builtin/merge.c:206 builtin/notes.c:533
+#: builtin/notes.c:690 builtin/tag.c:455
msgid "message"
msgstr "thông điệp"
-#: builtin/commit.c:1377
+#: builtin/commit.c:1365
msgid "commit message"
msgstr "chú thích của lần commit"
-#: builtin/commit.c:1378
+#: builtin/commit.c:1366
msgid "reuse and edit message from specified commit"
msgstr ""
"dùng lại các ghi chú từ lần chuyển giao (commit) đã cho nhưng có cho sửa chữa"
-#: builtin/commit.c:1379
+#: builtin/commit.c:1367
msgid "reuse message from specified commit"
msgstr "dùng lại các ghi chú từ lần chuyển giao (commit) đã cho"
-#: builtin/commit.c:1380
+#: builtin/commit.c:1368
msgid "use autosquash formatted message to fixup specified commit"
msgstr ""
"dùng ghi chú có định dạng autosquash để sửa chữa lần chuyển giao đã chỉ ra"
-#: builtin/commit.c:1381
+#: builtin/commit.c:1369
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
"dùng lời nhắn có định dạng tự động nén để nén lại các lần chuyển giao đã chỉ "
"ra"
-#: builtin/commit.c:1382
+#: builtin/commit.c:1370
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr ""
"lần chuyển giao nhận tôi là tác giả (được dùng với tùy chọn -C/-c/--amend)"
-#: builtin/commit.c:1383 builtin/log.c:1102 builtin/revert.c:109
+#: builtin/commit.c:1371 builtin/log.c:1102 builtin/revert.c:109
msgid "add Signed-off-by:"
msgstr "thêm dòng Signed-off-by:"
-#: builtin/commit.c:1384
+#: builtin/commit.c:1372
msgid "use specified template file"
msgstr "sử dụng tập tin mẫu đã cho"
-#: builtin/commit.c:1385
+#: builtin/commit.c:1373
msgid "force edit of commit"
msgstr "ép buộc sửa lần commit"
-#: builtin/commit.c:1386
+#: builtin/commit.c:1374
msgid "default"
msgstr "mặc định"
-#: builtin/commit.c:1386 builtin/tag.c:462
+#: builtin/commit.c:1374 builtin/tag.c:460
msgid "how to strip spaces and #comments from message"
msgstr "làm thế nào để cắt bỏ khoảng trắng và #ghichú từ mẩu tin nhắn"
-#: builtin/commit.c:1387
+#: builtin/commit.c:1375
msgid "include status in commit message template"
msgstr "bao gồm các trạng thái ghi mẫu ghi chú chuyển giao (commit)"
-#: builtin/commit.c:1388 builtin/merge.c:213 builtin/tag.c:463
+#: builtin/commit.c:1376 builtin/merge.c:213 builtin/tag.c:461
msgid "key id"
msgstr "id khóa"
-#: builtin/commit.c:1389 builtin/merge.c:214
+#: builtin/commit.c:1377 builtin/merge.c:214
msgid "GPG sign commit"
msgstr "ký lần commit dùng GPG"
#. end commit message options
-#: builtin/commit.c:1392
+#: builtin/commit.c:1380
msgid "Commit contents options"
msgstr "Các tùy nội dung ghi chú commit"
-#: builtin/commit.c:1393
+#: builtin/commit.c:1381
msgid "commit all changed files"
msgstr "chuyển giao tất cả các tập tin có thay đổi"
-#: builtin/commit.c:1394
+#: builtin/commit.c:1382
msgid "add specified files to index for commit"
msgstr "thêm các tập tin đã chỉ ra vào bảng mục lục để chuyển giao (commit)"
-#: builtin/commit.c:1395
+#: builtin/commit.c:1383
msgid "interactively add files"
msgstr "thêm các tập-tin bằng tương tác"
-#: builtin/commit.c:1396
+#: builtin/commit.c:1384
msgid "interactively add changes"
msgstr "thêm các thay đổi bằng tương tác"
-#: builtin/commit.c:1397
+#: builtin/commit.c:1385
msgid "commit only specified files"
msgstr "chỉ chuyển giao các tập tin đã chỉ ra"
-#: builtin/commit.c:1398
+#: builtin/commit.c:1386
msgid "bypass pre-commit hook"
msgstr "vòng qua móc (hook) pre-commit"
-#: builtin/commit.c:1399
+#: builtin/commit.c:1387
msgid "show what would be committed"
msgstr "hiển thị xem cái gì có thể được chuyển giao"
-#: builtin/commit.c:1410
+#: builtin/commit.c:1398
msgid "amend previous commit"
msgstr "tu bổ (amend) lần commit trước"
-#: builtin/commit.c:1411
+#: builtin/commit.c:1399
msgid "bypass post-rewrite hook"
msgstr "vòng qua móc (hook) post-rewrite"
-#: builtin/commit.c:1416
+#: builtin/commit.c:1404
msgid "ok to record an empty change"
msgstr "ok để ghi lại một thay đổi trống rỗng"
-#: builtin/commit.c:1419
+#: builtin/commit.c:1407
msgid "ok to record a change with an empty message"
msgstr "ok để ghi các thay đổi với lời nhắn trống rỗng"
-#: builtin/commit.c:1451
+#: builtin/commit.c:1439
msgid "could not parse HEAD commit"
msgstr "không thể phân tích commit (lần chuyển giao) HEAD"
-#: builtin/commit.c:1489 builtin/merge.c:508
+#: builtin/commit.c:1477 builtin/merge.c:508
#, c-format
msgid "could not open '%s' for reading"
msgstr "không thể mở “%s” để đọc"
-#: builtin/commit.c:1496
+#: builtin/commit.c:1484
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "Tập tin MERGE_HEAD sai hỏng (%s)"
-#: builtin/commit.c:1503
+#: builtin/commit.c:1491
msgid "could not read MERGE_MODE"
msgstr "không thể đọc MERGE_MODE"
-#: builtin/commit.c:1522
+#: builtin/commit.c:1510
#, c-format
msgid "could not read commit message: %s"
msgstr "không thể đọc thông điệp (message) commit (lần chuyển giao): %s"
-#: builtin/commit.c:1536
+#: builtin/commit.c:1524
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr ""
"Đang bỏ qua việc chuyển giao (commit); bạn đã không biên soạn thông điệp "
"(message).\n"
-#: builtin/commit.c:1541
+#: builtin/commit.c:1529
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr ""
"Đang bỏ qua lần chuyển giao (commit) bởi vì thông điệp của nó trống rỗng.\n"
-#: builtin/commit.c:1556 builtin/merge.c:833 builtin/merge.c:858
+#: builtin/commit.c:1544 builtin/merge.c:832 builtin/merge.c:857
msgid "failed to write commit object"
msgstr "gặp lỗi khi ghi đối tượng chuyển giao (commit)"
-#: builtin/commit.c:1577
+#: builtin/commit.c:1565
msgid "cannot lock HEAD ref"
msgstr "không thể khóa HEAD ref (tham chiếu)"
-#: builtin/commit.c:1581
+#: builtin/commit.c:1569
msgid "cannot update HEAD ref"
msgstr "không thể cập nhật ref (tham chiếu) HEAD"
-#: builtin/commit.c:1592
+#: builtin/commit.c:1580
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
@@ -4265,88 +4412,92 @@ msgstr "cho phép cập nhật ref (tham chiếu) HEAD"
msgid "deepen history of shallow clone"
msgstr "làm sâu hơn lịch sử của bản sao"
-#: builtin/fetch.c:85 builtin/log.c:1119
+#: builtin/fetch.c:86
+msgid "convert to a complete repository"
+msgstr "chuyển đổi hoàn toàn sang kho git"
+
+#: builtin/fetch.c:88 builtin/log.c:1119
msgid "dir"
msgstr "tmục"
-#: builtin/fetch.c:86
+#: builtin/fetch.c:89
msgid "prepend this to submodule path output"
msgstr "soạn sẵn cái này cho kết xuất đường dẫn mô-đun-con"
-#: builtin/fetch.c:89
+#: builtin/fetch.c:92
msgid "default mode for recursion"
msgstr "chế độ mặc định cho đệ qui"
-#: builtin/fetch.c:201
+#: builtin/fetch.c:204
msgid "Couldn't find remote ref HEAD"
msgstr "Không thể tìm thấy máy chủ cho tham chiếu HEAD"
-#: builtin/fetch.c:254
+#: builtin/fetch.c:257
#, c-format
msgid "object %s not found"
msgstr "Không tìm thấy đối tượng %s"
-#: builtin/fetch.c:259
+#: builtin/fetch.c:262
msgid "[up to date]"
msgstr "[đã cập nhật]"
-#: builtin/fetch.c:273
+#: builtin/fetch.c:276
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
msgstr "! %-*s %-*s -> %s (không thể fetch (lấy) về nhánh hiện hành)"
-#: builtin/fetch.c:274 builtin/fetch.c:360
+#: builtin/fetch.c:277 builtin/fetch.c:363
msgid "[rejected]"
msgstr "[Bị từ chối]"
-#: builtin/fetch.c:285
+#: builtin/fetch.c:288
msgid "[tag update]"
msgstr "[cập nhật thẻ]"
-#: builtin/fetch.c:287 builtin/fetch.c:322 builtin/fetch.c:340
+#: builtin/fetch.c:290 builtin/fetch.c:325 builtin/fetch.c:343
msgid " (unable to update local ref)"
msgstr " (không thể cập nhật tham chiếu (ref) nội bộ)"
-#: builtin/fetch.c:305
+#: builtin/fetch.c:308
msgid "[new tag]"
msgstr "[thẻ mới]"
-#: builtin/fetch.c:308
+#: builtin/fetch.c:311
msgid "[new branch]"
msgstr "[nhánh mới]"
-#: builtin/fetch.c:311
+#: builtin/fetch.c:314
msgid "[new ref]"
msgstr "[ref (tham chiếu) mới]"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "unable to update local ref"
msgstr "không thể cập nhật tham chiếu (ref) nội bộ"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "forced update"
msgstr "cưỡng bức cập nhật"
-#: builtin/fetch.c:362
+#: builtin/fetch.c:365
msgid "(non-fast-forward)"
msgstr "(non-fast-forward)"
-#: builtin/fetch.c:393 builtin/fetch.c:685
+#: builtin/fetch.c:396 builtin/fetch.c:688
#, c-format
msgid "cannot open %s: %s\n"
msgstr "không thể mở %s: %s\n"
-#: builtin/fetch.c:402
+#: builtin/fetch.c:405
#, c-format
msgid "%s did not send all necessary objects\n"
msgstr "%s đã không gửi tất cả các đối tượng cần thiết\n"
-#: builtin/fetch.c:488
+#: builtin/fetch.c:491
#, c-format
msgid "From %.*s\n"
msgstr "Từ %.*s\n"
-#: builtin/fetch.c:499
+#: builtin/fetch.c:502
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
@@ -4355,57 +4506,57 @@ msgstr ""
"một số tham chiếu (refs) nội bộ không thể được cập nhật; hãy thử chạy\n"
" “git remote prune %s” để bỏ đi những nhánh cũ, hay bị xung đột"
-#: builtin/fetch.c:549
+#: builtin/fetch.c:552
#, c-format
msgid " (%s will become dangling)"
msgstr " (%s sẽ trở thành không đầu (không được quản lý))"
-#: builtin/fetch.c:550
+#: builtin/fetch.c:553
#, c-format
msgid " (%s has become dangling)"
msgstr " (%s đã trở thành không đầu (không được quản lý))"
-#: builtin/fetch.c:557
+#: builtin/fetch.c:560
msgid "[deleted]"
msgstr "[đã xóa]"
-#: builtin/fetch.c:558 builtin/remote.c:1055
+#: builtin/fetch.c:561 builtin/remote.c:1055
msgid "(none)"
msgstr "(không)"
-#: builtin/fetch.c:675
+#: builtin/fetch.c:678
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
msgstr ""
"Từ chối việc lấy (fetch) vào trong nhánh hiện tại %s của một kho chứa không "
"phải kho trần (bare)"
-#: builtin/fetch.c:709
+#: builtin/fetch.c:712
#, c-format
msgid "Don't know how to fetch from %s"
msgstr "Không biết làm cách nào để lấy về (fetch) từ %s"
-#: builtin/fetch.c:786
+#: builtin/fetch.c:789
#, c-format
msgid "Option \"%s\" value \"%s\" is not valid for %s"
msgstr "Tùy chọn \"%s\" có giá trị \"%s\" là không hợp lệ cho %s"
-#: builtin/fetch.c:789
+#: builtin/fetch.c:792
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
msgstr "Tùy chọn \"%s\" bị bỏ qua với %s\n"
-#: builtin/fetch.c:891
+#: builtin/fetch.c:894
#, c-format
msgid "Fetching %s\n"
msgstr "Đang lấy (fetch) %s\n"
-#: builtin/fetch.c:893 builtin/remote.c:100
+#: builtin/fetch.c:896 builtin/remote.c:100
#, c-format
msgid "Could not fetch %s"
msgstr "không thể fetch (lấy) %s"
-#: builtin/fetch.c:912
+#: builtin/fetch.c:915
msgid ""
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
@@ -4413,24 +4564,32 @@ msgstr ""
"Chưa chỉ ra kho chứa máy chủ. Xin hãy chỉ định hoặc là URL hoặc\n"
"tên máy chủ từ cái mà những điểm xét duyệt mới có thể được fetch (lấy về)."
-#: builtin/fetch.c:932
+#: builtin/fetch.c:935
msgid "You need to specify a tag name."
msgstr "Bạn phải định rõ tên thẻ."
-#: builtin/fetch.c:984
+#: builtin/fetch.c:981
+msgid "--depth and --unshallow cannot be used together"
+msgstr "tùy chọn --depth và --unshallow không thể sử dụng cùng với nhau"
+
+#: builtin/fetch.c:983
+msgid "--unshallow on a complete repository does not make sense"
+msgstr "--unshallow trên kho hoàn chỉnh là không hợp lý"
+
+#: builtin/fetch.c:1002
msgid "fetch --all does not take a repository argument"
msgstr "lệnh lấy về \"fetch --all\" không lấy đối số kho chứa"
-#: builtin/fetch.c:986
+#: builtin/fetch.c:1004
msgid "fetch --all does not make sense with refspecs"
msgstr "lệnh lấy về \"fetch --all\" không hợp lý với refspecs"
-#: builtin/fetch.c:997
+#: builtin/fetch.c:1015
#, c-format
msgid "No such remote or remote group: %s"
msgstr "không có nhóm máy chủ hay máy chủ như thế: %s"
-#: builtin/fetch.c:1005
+#: builtin/fetch.c:1023
msgid "Fetching a group and specifying refspecs does not make sense"
msgstr "Việc lấy về cả một nhóm và chỉ định refspecs không hợp lý"
@@ -4441,7 +4600,7 @@ msgstr ""
#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701
#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175
-#: builtin/tag.c:448 parse-options.h:133 parse-options.h:239
+#: builtin/tag.c:446 parse-options.h:133 parse-options.h:239
msgid "n"
msgstr "n"
@@ -4619,7 +4778,7 @@ msgstr "không thể thực hiện lệnh grep (lọc tìm) từ đối tượng
#: builtin/grep.c:551
#, c-format
msgid "switch `%c' expects a numerical value"
-msgstr "chuyển đến `%c' cần một giá trị bằng số"
+msgstr "chuyển đến “%c” cần một giá trị bằng số"
#: builtin/grep.c:568
#, c-format
@@ -4804,25 +4963,25 @@ msgstr "chưa chỉ ra mẫu."
msgid "bad object %s"
msgstr "đối tượng sai %s"
-#: builtin/grep.c:866
+#: builtin/grep.c:868
msgid "--open-files-in-pager only works on the worktree"
msgstr "--open-files-in-pager chỉ làm việc trên cây-làm-việc"
-#: builtin/grep.c:889
+#: builtin/grep.c:891
msgid "--cached or --untracked cannot be used with --no-index."
msgstr "--cached hay --untracked không được sử dụng với --no-index."
-#: builtin/grep.c:894
+#: builtin/grep.c:896
msgid "--no-index or --untracked cannot be used with revs."
msgstr ""
"--no-index hay --untracked không được sử dụng cùng với các tùy chọn liên "
"quan đến revs."
-#: builtin/grep.c:897
+#: builtin/grep.c:899
msgid "--[no-]exclude-standard cannot be used for tracked contents."
msgstr "--[no-]exclude-standard không thể sử dụng cho nội dung lưu dấu vết."
-#: builtin/grep.c:905
+#: builtin/grep.c:907
msgid "both --cached and trees are given."
msgstr "cả hai --cached và các cây phải được chỉ ra."
@@ -4862,50 +5021,50 @@ msgstr "lưu các tập tin mà nó không có các bộ lọc"
msgid "process file as it were from this path"
msgstr "xử lý tập tin như là nó đang ở thư mục này"
-#: builtin/help.c:43
+#: builtin/help.c:42
msgid "print all available commands"
msgstr "hiển thị danh sách các câu lệnh người dùng có thể sử dụng"
-#: builtin/help.c:44
+#: builtin/help.c:43
msgid "show man page"
msgstr "hiển thị trang man"
-#: builtin/help.c:45
+#: builtin/help.c:44
msgid "show manual in web browser"
msgstr "hiển thị hướng dẫn sử dụng trong trình duyệt web"
-#: builtin/help.c:47
+#: builtin/help.c:46
msgid "show info page"
msgstr "hiện trang info"
-#: builtin/help.c:53
+#: builtin/help.c:52
msgid "git help [--all] [--man|--web|--info] [command]"
msgstr "git help [--all] [--man|--web|--info] [lệnh]"
-#: builtin/help.c:65
+#: builtin/help.c:64
#, c-format
msgid "unrecognized help format '%s'"
msgstr "không nhận ra định dạng trợ giúp “%s”"
-#: builtin/help.c:93
+#: builtin/help.c:92
msgid "Failed to start emacsclient."
msgstr "Lỗi khởi chạy emacsclient."
-#: builtin/help.c:106
+#: builtin/help.c:105
msgid "Failed to parse emacsclient version."
msgstr "Gặp lỗi khi phân tích phiên bản emacsclient."
-#: builtin/help.c:114
+#: builtin/help.c:113
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
msgstr "phiên bản của emacsclient “%d” quá cũ (< 22)."
-#: builtin/help.c:132 builtin/help.c:160 builtin/help.c:169 builtin/help.c:177
+#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176
#, c-format
msgid "failed to exec '%s': %s"
msgstr "gặp lỗi khi thực thi “%s”: %s"
-#: builtin/help.c:217
+#: builtin/help.c:216
#, c-format
msgid ""
"'%s': path for unsupported man viewer.\n"
@@ -4914,7 +5073,7 @@ msgstr ""
"“%s”: đường dẫn không hỗ trợ bộ trình chiếu man.\n"
"Hãy cân nhắc đến việc sử dụng “man.<tool>.cmd” để thay thế."
-#: builtin/help.c:229
+#: builtin/help.c:228
#, c-format
msgid ""
"'%s': cmd for supported man viewer.\n"
@@ -4923,32 +5082,28 @@ msgstr ""
"“%s”: cmd (lệnh) hỗ trợ bộ trình chiếu man.\n"
"Hãy cân nhắc đến việc sử dụng “man.<tool>.path” để thay thế."
-#: builtin/help.c:299
-msgid "The most commonly used git commands are:"
-msgstr "Những lệnh git hay được sử dụng nhất là:"
-
-#: builtin/help.c:367
+#: builtin/help.c:349
#, c-format
msgid "'%s': unknown man viewer."
msgstr "“%s”: không rõ chương trình xem man."
-#: builtin/help.c:384
+#: builtin/help.c:366
msgid "no man viewer handled the request"
msgstr "không có trình xem trợ giúp dạng manpage tiếp hợp với yêu cầu"
-#: builtin/help.c:392
+#: builtin/help.c:374
msgid "no info viewer handled the request"
msgstr "không có trình xem trợ giúp dạng info tiếp hợp với yêu cầu"
-#: builtin/help.c:447 builtin/help.c:454
+#: builtin/help.c:429 builtin/help.c:436
#, c-format
msgid "usage: %s%s"
msgstr "cách sử dụng: %s%s"
-#: builtin/help.c:470
+#: builtin/help.c:452
#, c-format
msgid "`git %s' is aliased to `%s'"
-msgstr "`git %s' được đặt bí danh thành `%s'"
+msgstr "“git %s” được đặt bí danh thành “%s”"
#: builtin/index-pack.c:170
#, c-format
@@ -5643,98 +5798,98 @@ msgstr ""
msgid "Unknown commit %s"
msgstr "Không hiểu lần chuyển giao (commit) %s"
-#: builtin/ls-files.c:408
+#: builtin/ls-files.c:409
msgid "git ls-files [options] [<file>...]"
msgstr "git ls-files [các-tùy-chọn] [<tập-tin>...]"
-#: builtin/ls-files.c:463
+#: builtin/ls-files.c:466
msgid "identify the file status with tags"
msgstr "nhận dạng các trạng thái tập tin với thẻ"
-#: builtin/ls-files.c:465
+#: builtin/ls-files.c:468
msgid "use lowercase letters for 'assume unchanged' files"
msgstr ""
"dùng chữ cái viết thường cho các tập tin “assume unchanged” (giả định không "
"thay đổi)"
-#: builtin/ls-files.c:467
+#: builtin/ls-files.c:470
msgid "show cached files in the output (default)"
msgstr "hiển thị các tập tin được nhớ tạm vào đầu ra (mặc định)"
-#: builtin/ls-files.c:469
+#: builtin/ls-files.c:472
msgid "show deleted files in the output"
msgstr "hiển thị các tập tin đã xóa trong kết xuất"
-#: builtin/ls-files.c:471
+#: builtin/ls-files.c:474
msgid "show modified files in the output"
msgstr "hiển thị các tập tin đã bị sửa đổi ra kết xuất"
-#: builtin/ls-files.c:473
+#: builtin/ls-files.c:476
msgid "show other files in the output"
msgstr "hiển thị các tập tin khác trong kết xuất"
-#: builtin/ls-files.c:475
+#: builtin/ls-files.c:478
msgid "show ignored files in the output"
msgstr "hiển thị các tập tin bị bỏ qua trong kết xuất"
-#: builtin/ls-files.c:478
+#: builtin/ls-files.c:481
msgid "show staged contents' object name in the output"
msgstr "hiển thị tên đối tượng của nội dung được lưu trạng thái ở kết xuất"
-#: builtin/ls-files.c:480
+#: builtin/ls-files.c:483
msgid "show files on the filesystem that need to be removed"
msgstr "hiển thị các tập tin trên hệ thống tập tin mà nó cần được gỡ bỏ"
-#: builtin/ls-files.c:482
+#: builtin/ls-files.c:485
msgid "show 'other' directories' name only"
msgstr "chỉ hiển thị tên của các thư mục “khác”"
-#: builtin/ls-files.c:485
+#: builtin/ls-files.c:488
msgid "don't show empty directories"
msgstr "không hiển thị thư mục rỗng"
-#: builtin/ls-files.c:488
+#: builtin/ls-files.c:491
msgid "show unmerged files in the output"
msgstr "hiển thị các tập tin chưa hòa trộn trong kết xuất"
-#: builtin/ls-files.c:490
+#: builtin/ls-files.c:493
msgid "show resolve-undo information"
msgstr "hiển thị thông tin resolve-undo"
-#: builtin/ls-files.c:492
+#: builtin/ls-files.c:495
msgid "skip files matching pattern"
msgstr "bỏ qua những tập tin khớp với một mẫu"
-#: builtin/ls-files.c:495
+#: builtin/ls-files.c:498
msgid "exclude patterns are read from <file>"
msgstr "mẫu loại trừ được đọc từ <tập tin>"
-#: builtin/ls-files.c:498
+#: builtin/ls-files.c:501
msgid "read additional per-directory exclude patterns in <file>"
msgstr "đọc thêm các mẫu ngoại trừ mỗi thư mục trong <tập tin>"
-#: builtin/ls-files.c:500
+#: builtin/ls-files.c:503
msgid "add the standard git exclusions"
msgstr "thêm loại trừ tiêu chuẩn kiểu git"
-#: builtin/ls-files.c:503
+#: builtin/ls-files.c:506
msgid "make the output relative to the project top directory"
msgstr "làm cho kết xuất liên quan đến thư mục ở mức cao nhất (gốc) của dự án"
-#: builtin/ls-files.c:506
+#: builtin/ls-files.c:509
msgid "if any <file> is not in the index, treat this as an error"
msgstr "nếu <tập tin> bất kỳ không ở trong bảng mục lục, xử lý nó như một lỗi"
-#: builtin/ls-files.c:507
+#: builtin/ls-files.c:510
msgid "tree-ish"
msgstr "tree-ish"
-#: builtin/ls-files.c:508
+#: builtin/ls-files.c:511
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr ""
"giả định rằng các đường dẫn đã bị gỡ bỏ kể từ <tree-ish> nay vẫn hiện diện"
-#: builtin/ls-files.c:510
+#: builtin/ls-files.c:513
msgid "show debugging data"
msgstr "hiển thị dữ liệu gỡ lỗi"
@@ -5788,7 +5943,7 @@ msgstr "git merge --abort"
#: builtin/merge.c:90
msgid "switch `m' requires a value"
-msgstr "switch `m' yêu cầu một giá trị"
+msgstr "switch “m” yêu cầu một giá trị"
#: builtin/merge.c:127
#, c-format
@@ -5841,7 +5996,7 @@ msgstr "cho phép fast-forward (mặc định)"
msgid "abort if fast-forward is not possible"
msgstr "bỏ qua nếu fast-forward không thể được"
-#: builtin/merge.c:202 builtin/notes.c:870 builtin/revert.c:112
+#: builtin/merge.c:202 builtin/notes.c:866 builtin/revert.c:112
msgid "strategy"
msgstr "chiến lược"
@@ -5946,71 +6101,72 @@ msgstr ""
"hoàn tất việc hòa trộn.\n"
#: builtin/merge.c:788
+#, c-format
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"
-"Lines starting with '#' will be ignored, and an empty message aborts\n"
+"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
"Hãy nhập vào các thông tin để giải thích tại sao sự hòa trộn này là cần "
"thiết,\n"
-"đặc biệt là khi nó hòa trộn thượng nguồn đã cập nhật vào trong một nhánh "
+"đặc biệt là khi nó hòa trộn ngược dòng đã cập nhật vào trong một nhánh "
"topic.\n"
"\n"
-"Những dòng được bắt đầu bằng “#” sẽ được bỏ qua, và phần chú thích này nếu "
+"Những dòng được bắt đầu bằng “%c” sẽ được bỏ qua, và phần chú thích này nếu "
"rỗng\n"
-"sẽ làm hủy bỏ lần chuyển giao (commit).\n"
+"sẽ hủy bỏ lần chuyển giao (commit).\n"
-#: builtin/merge.c:813
+#: builtin/merge.c:812
msgid "Empty commit message."
msgstr "Chú thích của lần commit (chuyển giao) bị trống rỗng."
-#: builtin/merge.c:825
+#: builtin/merge.c:824
#, c-format
msgid "Wonderful.\n"
msgstr "Thần kỳ.\n"
-#: builtin/merge.c:890
+#: builtin/merge.c:889
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
"Việc tự động hòa trộn gặp lỗi; hãy sửa các xung đột sau đó chuyển giao "
"(commit) kết quả.\n"
-#: builtin/merge.c:906
+#: builtin/merge.c:905
#, c-format
msgid "'%s' is not a commit"
msgstr "%s không phải là một lần commit (chuyển giao)"
-#: builtin/merge.c:947
+#: builtin/merge.c:946
msgid "No current branch."
msgstr "không phải nhánh hiện hành"
-#: builtin/merge.c:949
+#: builtin/merge.c:948
msgid "No remote for the current branch."
msgstr "Không có máy chủ cho nhánh hiện hành."
-#: builtin/merge.c:951
+#: builtin/merge.c:950
msgid "No default upstream defined for the current branch."
msgstr "Không có thượng nguồn mặc định được định nghĩa cho nhánh hiện hành."
-#: builtin/merge.c:956
+#: builtin/merge.c:955
#, c-format
msgid "No remote tracking branch for %s from %s"
msgstr "Không nhánh mạng theo vết cho %s từ %s"
-#: builtin/merge.c:1043 builtin/merge.c:1200
+#: builtin/merge.c:1042 builtin/merge.c:1199
#, c-format
msgid "%s - not something we can merge"
msgstr "%s - không phải là một số thứ chúng tôi có thể hòa trộn"
-#: builtin/merge.c:1111
+#: builtin/merge.c:1110
msgid "There is no merge to abort (MERGE_HEAD missing)."
msgstr ""
"Ở đây không có lần hòa trộn nào được hủy bỏ giữa chừng cả (thiếu MERGE_HEAD)."
-#: builtin/merge.c:1127 git-pull.sh:31
+#: builtin/merge.c:1126 git-pull.sh:31
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -6018,11 +6174,11 @@ msgstr ""
"Bạn chưa kết thúc việc hòa trộng (MERGE_HEAD vẫn tồn tại).\n"
"Hãy chuyển giao (commit) các thay đổi trước khi bạn có thể hòa trộn."
-#: builtin/merge.c:1130 git-pull.sh:34
+#: builtin/merge.c:1129 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
msgstr "Bạn chưa kết thúc việc hòa trộng (MERGE_HEAD vẫn tồn tại)."
-#: builtin/merge.c:1134
+#: builtin/merge.c:1133
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -6030,85 +6186,85 @@ msgstr ""
"Bạn chưa kết thúc việc cherry-pick (CHERRY_PICK_HEAD vẫn tồn tại).\n"
"Hãy chuyển giao (commit) các thay đổi trước khi bạn có thể hòa trộn."
-#: builtin/merge.c:1137
+#: builtin/merge.c:1136
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
msgstr "Bạn chưa kết thúc việc cherry-pick (CHERRY_PICK_HEAD vẫn tồn tại)."
-#: builtin/merge.c:1146
+#: builtin/merge.c:1145
msgid "You cannot combine --squash with --no-ff."
msgstr "Bạn không thể kết hợp --squash với --no-ff."
-#: builtin/merge.c:1151
+#: builtin/merge.c:1150
msgid "You cannot combine --no-ff with --ff-only."
msgstr "Bạn không thể kết hợp --no-ff với --ff-only."
-#: builtin/merge.c:1158
+#: builtin/merge.c:1157
msgid "No commit specified and merge.defaultToUpstream not set."
msgstr ""
"Không chỉ ra lần chuyển giao (commit) và merge.defaultToUpstream chưa được "
"đặt."
-#: builtin/merge.c:1190
+#: builtin/merge.c:1189
msgid "Can merge only exactly one commit into empty head"
msgstr ""
"Không thể hòa trộn một cách đúng đắn một lần chuyển giao (commit) vào một "
"head rỗng"
-#: builtin/merge.c:1193
+#: builtin/merge.c:1192
msgid "Squash commit into empty head not supported yet"
msgstr "Squash commit vào một head trống rỗng vẫn chưa được hỗ trợ"
-#: builtin/merge.c:1195
+#: builtin/merge.c:1194
msgid "Non-fast-forward commit does not make sense into an empty head"
msgstr ""
"Chuyển giao (commit) không-fast-forward không hợp lý ở trong một head trống "
"rỗng"
-#: builtin/merge.c:1311
+#: builtin/merge.c:1310
#, c-format
msgid "Updating %s..%s\n"
msgstr "Đang cập nhật %s..%s\n"
-#: builtin/merge.c:1350
+#: builtin/merge.c:1349
#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr "Đang thử hòa trộn kiểu “trivial in-index”...\n"
-#: builtin/merge.c:1357
+#: builtin/merge.c:1356
#, c-format
msgid "Nope.\n"
msgstr "Không.\n"
-#: builtin/merge.c:1389
+#: builtin/merge.c:1388
msgid "Not possible to fast-forward, aborting."
msgstr "Thực hiện lệnh fast-forward là không thể được, đang bỏ qua."
-#: builtin/merge.c:1412 builtin/merge.c:1491
+#: builtin/merge.c:1411 builtin/merge.c:1490
#, c-format
msgid "Rewinding the tree to pristine...\n"
msgstr "Đang tua lại cây thành thời xa xưa...\n"
-#: builtin/merge.c:1416
+#: builtin/merge.c:1415
#, c-format
msgid "Trying merge strategy %s...\n"
msgstr "Đang thử chiến lược hòa trộn %s...\n"
-#: builtin/merge.c:1482
+#: builtin/merge.c:1481
#, c-format
msgid "No merge strategy handled the merge.\n"
msgstr "Không có chiến lược hòa trộn nào được nắm giữ (handle) sự hòa trộn.\n"
-#: builtin/merge.c:1484
+#: builtin/merge.c:1483
#, c-format
msgid "Merge with strategy %s failed.\n"
msgstr "Hòa trộn với chiến lược %s gặp lỗi.\n"
-#: builtin/merge.c:1493
+#: builtin/merge.c:1492
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr "Sử dụng %s để chuẩn bị giải quyết bằng tay.\n"
-#: builtin/merge.c:1505
+#: builtin/merge.c:1504
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
@@ -6312,7 +6468,7 @@ msgstr "đọc từ đầu vào tiêu chuẩn"
#: builtin/name-rev.c:236
msgid "allow to print `undefined` names"
-msgstr "cho phép hiển thị các tên `chưa định nghĩa`"
+msgstr "cho phép hiển thị các tên “chưa định nghĩa“"
#: builtin/notes.c:26
msgid "git notes [--ref <notes_ref>] [list [<object>]]"
@@ -6424,142 +6580,137 @@ msgstr "git notes prune [<các-tùy-chọn>]"
msgid "git notes get-ref"
msgstr "git notes get-ref"
-#: builtin/notes.c:142
+#: builtin/notes.c:139
#, c-format
msgid "unable to start 'show' for object '%s'"
msgstr "không thể khởi chạy “show” cho đối tượng “%s”"
-#: builtin/notes.c:148
-msgid "can't fdopen 'show' output fd"
-msgstr "không thể fdopen “show” (lệnh hiển thị) mô tả tập tin (fd) kết xuất"
+#: builtin/notes.c:143
+msgid "could not read 'show' output"
+msgstr "không thể đọc kết xuất “show”"
-#: builtin/notes.c:158
-#, c-format
-msgid "failed to close pipe to 'show' for object '%s'"
-msgstr "gặp lỗi khi đóng đường ống cho lệnh “show” cho đối tượng “%s”"
-
-#: builtin/notes.c:161
+#: builtin/notes.c:151
#, c-format
msgid "failed to finish 'show' for object '%s'"
msgstr "gặp lỗi khi hoàn thành “show” cho đối tượng “%s”"
-#: builtin/notes.c:178 builtin/tag.c:347
+#: builtin/notes.c:169 builtin/tag.c:341
#, c-format
msgid "could not create file '%s'"
msgstr "không thể tạo tập tin “%s”"
-#: builtin/notes.c:192
+#: builtin/notes.c:188
msgid "Please supply the note contents using either -m or -F option"
msgstr ""
"Xin hãy áp dụng nội dung của ghi chú sử dụng hoặc là tùy chọn -m hoặc là -F"
-#: builtin/notes.c:213 builtin/notes.c:976
+#: builtin/notes.c:209 builtin/notes.c:972
#, c-format
msgid "Removing note for object %s\n"
msgstr "Đang gỡ bỏ ghi chú (note) cho đối tượng %s\n"
-#: builtin/notes.c:218
+#: builtin/notes.c:214
msgid "unable to write note object"
msgstr "không thể ghi đối tượng ghi chú (note)"
-#: builtin/notes.c:220
+#: builtin/notes.c:216
#, c-format
msgid "The note contents has been left in %s"
msgstr "Nội dung ghi chú còn lại %s"
-#: builtin/notes.c:254 builtin/tag.c:542
+#: builtin/notes.c:250 builtin/tag.c:540
#, c-format
msgid "cannot read '%s'"
msgstr "không thể đọc “%s”"
-#: builtin/notes.c:256 builtin/tag.c:545
+#: builtin/notes.c:252 builtin/tag.c:543
#, c-format
msgid "could not open or read '%s'"
msgstr "không thể mở hay đọc “%s”"
-#: builtin/notes.c:275 builtin/notes.c:448 builtin/notes.c:450
-#: builtin/notes.c:510 builtin/notes.c:564 builtin/notes.c:647
-#: builtin/notes.c:652 builtin/notes.c:727 builtin/notes.c:769
-#: builtin/notes.c:971 builtin/tag.c:558
+#: builtin/notes.c:271 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:506 builtin/notes.c:560 builtin/notes.c:643
+#: builtin/notes.c:648 builtin/notes.c:723 builtin/notes.c:765
+#: builtin/notes.c:967 builtin/tag.c:556
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
msgstr "Gặp lỗi khi phân giải “%s” như là một tham chiếu (ref) hợp lệ."
-#: builtin/notes.c:278
+#: builtin/notes.c:274
#, c-format
msgid "Failed to read object '%s'."
msgstr "Gặp lỗi khi đọc đối tượng “%s”."
-#: builtin/notes.c:302
+#: builtin/notes.c:298
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr ""
"Không thể chuyển giao (commit) chưa được khởi tạo hoặc không được tham chiếu "
"cây ghi chú"
-#: builtin/notes.c:343
+#: builtin/notes.c:339
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
msgstr "Giá trị notes.rewriteMode sai: “%s”"
-#: builtin/notes.c:353
+#: builtin/notes.c:349
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr "Từ chối ghi đè ghi chú trong %s (nằm ngoài của refs/notes/)"
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: builtin/notes.c:380
+#: builtin/notes.c:376
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Giá trị %s sai: “%s”"
-#: builtin/notes.c:444
+#: builtin/notes.c:440
#, c-format
msgid "Malformed input line: '%s'."
msgstr "Dòng nhập vào dị hình: “%s”."
-#: builtin/notes.c:459
+#: builtin/notes.c:455
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
msgstr "Gặp lỗi khi sao chép ghi chú (note) từ “%s” tới “%s”"
-#: builtin/notes.c:503 builtin/notes.c:557 builtin/notes.c:630
-#: builtin/notes.c:642 builtin/notes.c:715 builtin/notes.c:762
-#: builtin/notes.c:1036
+#: builtin/notes.c:499 builtin/notes.c:553 builtin/notes.c:626
+#: builtin/notes.c:638 builtin/notes.c:711 builtin/notes.c:758
+#: builtin/notes.c:1032
msgid "too many parameters"
msgstr "quá nhiều đối số"
-#: builtin/notes.c:516 builtin/notes.c:775
+#: builtin/notes.c:512 builtin/notes.c:771
#, c-format
msgid "No note found for object %s."
msgstr "không tìm thấy ghi chú cho đối tượng %s."
-#: builtin/notes.c:538 builtin/notes.c:695
+#: builtin/notes.c:534 builtin/notes.c:691
msgid "note contents as a string"
msgstr "nội dung ghi chú (note) nằm trong một chuỗi"
-#: builtin/notes.c:541 builtin/notes.c:698
+#: builtin/notes.c:537 builtin/notes.c:694
msgid "note contents in a file"
msgstr "nội dung ghi chú (note) nằm trong một tập tin"
-#: builtin/notes.c:543 builtin/notes.c:546 builtin/notes.c:700
-#: builtin/notes.c:703 builtin/tag.c:476
+#: builtin/notes.c:539 builtin/notes.c:542 builtin/notes.c:696
+#: builtin/notes.c:699 builtin/tag.c:474
msgid "object"
msgstr "đối tượng"
-#: builtin/notes.c:544 builtin/notes.c:701
+#: builtin/notes.c:540 builtin/notes.c:697
msgid "reuse and edit specified note object"
msgstr "dùng lại nhưng có sửa chữa đối tượng note đã chỉ ra"
-#: builtin/notes.c:547 builtin/notes.c:704
+#: builtin/notes.c:543 builtin/notes.c:700
msgid "reuse specified note object"
msgstr "dùng lại đối tượng ghi chú (note) đã chỉ ra"
-#: builtin/notes.c:549 builtin/notes.c:617
+#: builtin/notes.c:545 builtin/notes.c:613
msgid "replace existing notes"
msgstr "thay thế ghi chú trước"
-#: builtin/notes.c:583
+#: builtin/notes.c:579
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -6568,24 +6719,24 @@ msgstr ""
"Không thể thêm các ghi chú. Đã tìm thấy các ghi chú đã có sẵn cho đối tượng "
"%s. Sử dụng tùy chọn “-f” để ghi đè lên các ghi chú cũ"
-#: builtin/notes.c:588 builtin/notes.c:665
+#: builtin/notes.c:584 builtin/notes.c:661
#, c-format
msgid "Overwriting existing notes for object %s\n"
msgstr "Đang ghi đè lên ghi chú cũ cho đối tượng %s\n"
-#: builtin/notes.c:618
+#: builtin/notes.c:614
msgid "read objects from stdin"
msgstr "đọc các đối tượng từ đầu vào tiêu chuẩn"
-#: builtin/notes.c:620
+#: builtin/notes.c:616
msgid "load rewriting config for <command> (implies --stdin)"
msgstr "tải cấu hình chép lại cho <lệnh> (ngầm định là --stdin)"
-#: builtin/notes.c:638
+#: builtin/notes.c:634
msgid "too few parameters"
msgstr "quá ít đối số"
-#: builtin/notes.c:659
+#: builtin/notes.c:655
#, c-format
msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -6594,12 +6745,12 @@ msgstr ""
"Không thể sao chép các ghi chú. Đã tìm thấy các ghi chú đã có sẵn cho đối "
"tượng %s. Sử dụng tùy chọn “-f” để ghi đè lên các ghi chú cũ"
-#: builtin/notes.c:671
+#: builtin/notes.c:667
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
msgstr "Thiếu ghi chú trên đối tượng nguốn %s. Không thể sao chép."
-#: builtin/notes.c:720
+#: builtin/notes.c:716
#, c-format
msgid ""
"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
@@ -6608,15 +6759,15 @@ msgstr ""
"Các tùy chọn -m/-F/-c/-C đã cổ không còn dùng nữa cho lệnh con “edit”.\n"
"Xin hãy sử dụng lệnh sau để thay thế: “git notes add -f -m/-F/-c/-C”.\n"
-#: builtin/notes.c:867
+#: builtin/notes.c:863
msgid "General options"
msgstr "Tùy chọn chung"
-#: builtin/notes.c:869
+#: builtin/notes.c:865
msgid "Merge options"
msgstr "Tùy chọn về hòa trộn"
-#: builtin/notes.c:871
+#: builtin/notes.c:867
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
@@ -6624,46 +6775,46 @@ msgstr ""
"phân giải các xung đột “notes” sử dụng chiến lược đã đưa ra (manual/ours/"
"theirs/union/cat_sort_uniq)"
-#: builtin/notes.c:873
+#: builtin/notes.c:869
msgid "Committing unmerged notes"
msgstr "Chuyển giao các note chưa được hòa trộn"
-#: builtin/notes.c:875
+#: builtin/notes.c:871
msgid "finalize notes merge by committing unmerged notes"
msgstr ""
"các note cuối cùng được hòa trộn bởi các note chưa hòa trộn của lần chuyển "
"giao"
-#: builtin/notes.c:877
+#: builtin/notes.c:873
msgid "Aborting notes merge resolution"
msgstr "Hủy bỏ phân giải ghi chú (note) hòa trộn"
-#: builtin/notes.c:879
+#: builtin/notes.c:875
msgid "abort notes merge"
msgstr "bỏ qua hòa trộn các ghi chú (note)"
-#: builtin/notes.c:974
+#: builtin/notes.c:970
#, c-format
msgid "Object %s has no note\n"
msgstr "Đối tượng %s không có ghi chú (note)\n"
-#: builtin/notes.c:986
+#: builtin/notes.c:982
msgid "attempt to remove non-existent note is not an error"
msgstr "cố gắng gỡ bỏ một note chưa từng tồn tại không phải là một lỗi"
-#: builtin/notes.c:989
+#: builtin/notes.c:985
msgid "read object names from the standard input"
msgstr "đọc tên đối tượng từ thiết bị nhập chuẩn"
-#: builtin/notes.c:1070
+#: builtin/notes.c:1066
msgid "notes_ref"
msgstr "notes_ref"
-#: builtin/notes.c:1071
+#: builtin/notes.c:1067
msgid "use notes from <notes_ref>"
msgstr "dùng “notes” từ <notes_ref>"
-#: builtin/notes.c:1106 builtin/remote.c:1598
+#: builtin/notes.c:1102 builtin/remote.c:1598
#, c-format
msgid "Unknown subcommand: %s"
msgstr "Không hiểu câu lệnh con: %s"
@@ -7035,28 +7186,52 @@ msgstr ""
#: builtin/push.c:224
msgid ""
-"Updates were rejected because the destination reference already exists\n"
-"in the remote."
+"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 merge the remote changes (e.g.,\n"
+"'git pull') before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
msgstr ""
-"Việc cập nhật bị từ chối bởi vì tham chiếu đích đã sẵn có từ trước\n"
-"trên máy chủ."
+"Việc cập nhật bị từ chối bởi vì máy chủ có chứa công việc mà bạn không\n"
+"có ở máy nội bộ của mình. Lỗi này thường có nguyên nhân bởi kho khác đẩy dữ "
+"liệu lên\n"
+"cùng một tham chiếu. Bạn có lẽ muốn hòa trộn với các thay đổi từ máy chủ\n"
+"(v.d. “git pull”) trước khi lại push lần nữa.\n"
+"Xem trong phần “Note about fast-forwards” từ lệnh “git push --help” để có "
+"thông tin chi tiết."
-#: builtin/push.c:269
+#: builtin/push.c:231
+msgid "Updates were rejected because the tag already exists in the remote."
+msgstr "Việc cập nhật bị từ chối bởi vì thẻ đã sẵn có từ trước trên máy chủ."
+
+#: builtin/push.c:234
+msgid ""
+"You cannot update a remote ref that points at a non-commit object,\n"
+"or update a remote ref to make it point at a non-commit object,\n"
+"without using the '--force' option.\n"
+msgstr ""
+"Không thể cập nhật một tham chiếu trên máy chủ mà nó chỉ đến đối tượng "
+"không\n"
+"phải chuyển giao, hoặc cập nhật một tham chiếu máy chủ để nó chỉ đến đối "
+"tượng\n"
+"không phải chuyển giao, mà không sử dụng tùy chọn “--force”.\n"
+
+#: builtin/push.c:294
#, c-format
msgid "Pushing to %s\n"
msgstr "Đang push (đẩy) lên %s\n"
-#: builtin/push.c:273
+#: builtin/push.c:298
#, c-format
msgid "failed to push some refs to '%s'"
msgstr "gặp lỗi khi push (đẩy lên) một số tham chiếu (ref) đến “%s”"
-#: builtin/push.c:302
+#: builtin/push.c:331
#, c-format
msgid "bad repository '%s'"
msgstr "repository (kho) sai “%s”"
-#: builtin/push.c:303
+#: builtin/push.c:332
msgid ""
"No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote "
@@ -7077,80 +7252,84 @@ msgstr ""
"\n"
" git push <tên>\n"
-#: builtin/push.c:318
+#: builtin/push.c:347
msgid "--all and --tags are incompatible"
msgstr "--all và --tags xung khắc nhau"
-#: builtin/push.c:319
+#: builtin/push.c:348
msgid "--all can't be combined with refspecs"
msgstr "--all không thể được tổ hợp cùng với refspecs"
-#: builtin/push.c:324
+#: builtin/push.c:353
msgid "--mirror and --tags are incompatible"
msgstr "--mirror và --tags xung khắc nhau"
-#: builtin/push.c:325
+#: builtin/push.c:354
msgid "--mirror can't be combined with refspecs"
msgstr "--mirror không thể được tổ hợp cùng với refspecs"
-#: builtin/push.c:330
+#: builtin/push.c:359
msgid "--all and --mirror are incompatible"
msgstr "--all và --mirror xung khắc nhau"
-#: builtin/push.c:390
+#: builtin/push.c:419
msgid "repository"
msgstr "kho"
-#: builtin/push.c:391
+#: builtin/push.c:420
msgid "push all refs"
msgstr "push tất cả refs"
-#: builtin/push.c:392
+#: builtin/push.c:421
msgid "mirror all refs"
msgstr "mirror tất cả refs"
-#: builtin/push.c:394
+#: builtin/push.c:423
msgid "delete refs"
msgstr "xóa refs"
-#: builtin/push.c:395
+#: builtin/push.c:424
msgid "push tags (can't be used with --all or --mirror)"
msgstr ""
"các thẻ push (không thể sử dụng cùng với các tùy chọn --all hay --mirror)"
-#: builtin/push.c:398
+#: builtin/push.c:427
msgid "force updates"
msgstr "ép buộc cập nhật"
-#: builtin/push.c:399
+#: builtin/push.c:428
msgid "check"
msgstr "kiểm tra"
-#: builtin/push.c:400
+#: builtin/push.c:429
msgid "control recursive pushing of submodules"
msgstr "điều khiển việc đẩy lên (push) đệ qui của mô-đun-con"
-#: builtin/push.c:402
+#: builtin/push.c:431
msgid "use thin pack"
msgstr "tạo gói nhẹ"
-#: builtin/push.c:403 builtin/push.c:404
+#: builtin/push.c:432 builtin/push.c:433
msgid "receive pack program"
msgstr "nhận về chương trình pack"
-#: builtin/push.c:405
+#: builtin/push.c:434
msgid "set upstream for git pull/status"
msgstr "đặt thượng nguồn (upstream) cho git pull/status"
-#: builtin/push.c:408
+#: builtin/push.c:437
msgid "prune locally removed refs"
msgstr "prune (cắt cụt) những tham chiếu (refs) bị gỡ bỏ"
-#: builtin/push.c:418
+#: builtin/push.c:439
+msgid "bypass pre-push hook"
+msgstr "vòng qua “pre-push hook”"
+
+#: builtin/push.c:448
msgid "--delete is incompatible with --all, --mirror and --tags"
msgstr "--delete là xung khắc với các tùy chọn --all, --mirror và --tags"
-#: builtin/push.c:420
+#: builtin/push.c:450
msgid "--delete doesn't make sense without any refs"
msgstr "--delete không hợp lý nếu không có bất kỳ tham chiếu (refs) nào"
@@ -7838,7 +8017,7 @@ msgstr "đặt lại HEAD nhưng giữ lại các thay đổi nội bộ"
#: builtin/reset.c:275
#, c-format
msgid "Failed to resolve '%s' as a valid revision."
-msgstr "Gặp lỗi khi phân giải '%s' như là điểm xét duyệt hợp lệ."
+msgstr "Gặp lỗi khi phân giải “%s” như là điểm xét duyệt hợp lệ."
#: builtin/reset.c:278 builtin/reset.c:286
#, c-format
@@ -7848,7 +8027,7 @@ msgstr "không thể phân tích đối tượng “%s”."
#: builtin/reset.c:283
#, c-format
msgid "Failed to resolve '%s' as a valid tree."
-msgstr "Gặp lỗi khi phân giải '%s' như là một cây (tree) hợp lệ."
+msgstr "Gặp lỗi khi phân giải “%s” như là một cây (tree) hợp lệ."
#: builtin/reset.c:292
msgid "--patch is incompatible with --{hard,mixed,soft}"
@@ -7889,7 +8068,7 @@ msgstr "git rev-parse --parseopt [các-tùy-chọn] -- [<th.số>...]"
#: builtin/rev-parse.c:344
msgid "keep the `--` passed as an arg"
-msgstr "giữ `--` chuyển qua làm tham số"
+msgstr "giữ “--“ chuyển qua làm tham số"
#: builtin/rev-parse.c:346
msgid "stop parsing after the first non-option argument"
@@ -8008,8 +8187,8 @@ msgid ""
"submodule '%s' (or one of its nested submodules) uses a .git directory\n"
"(use 'rm -rf' if you really want to remove it including all of its history)"
msgstr ""
-"mô-đun-con '%s' (hoặc cái nằm trong các mô-đun-con) dùng thư mục .git\n"
-"(dùng 'rm -rf' nếu bạn thực sự muốn gỡ bỏ nó cùng với tất cả lịch sử của "
+"mô-đun-con “%s” (hoặc cái nằm trong các mô-đun-con) dùng thư mục .git\n"
+"(dùng “rm -rf” nếu bạn thực sự muốn gỡ bỏ nó cùng với tất cả lịch sử của "
"chúng)"
#: builtin/rm.c:174
@@ -8304,170 +8483,164 @@ msgid "could not verify the tag '%s'"
msgstr "không thể thẩm tra thẻ “%s”"
#: builtin/tag.c:249
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be ignored.\n"
-"#\n"
+"Write a tag message\n"
+"Lines starting with '%c' will be ignored.\n"
msgstr ""
"\n"
-"#\n"
-"# Viết các ghi chú cho (thẻ) tag\n"
-"# Những dòng được bắt đầu bằng “#” sẽ được bỏ qua.\n"
-"#\n"
+"Viết các ghi chú cho (thẻ) tag\n"
+"Những dòng được bắt đầu bằng “%c” sẽ được bỏ qua.\n"
-#: builtin/tag.c:256
+#: builtin/tag.c:253
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be kept; you may remove them yourself if you "
+"Write a tag message\n"
+"Lines starting with '%c' will be kept; you may remove them yourself if you "
"want to.\n"
-"#\n"
msgstr ""
"\n"
-"#\n"
-"# Viết các ghi chú cho (thẻ) tag\n"
-"# Những dòng được bắt đầu bằng “#” sẽ được bỏ qua; bạn có thể xóa chúng đi "
+"Viết các ghi chú cho (thẻ) tag\n"
+"Những dòng được bắt đầu bằng “%c” sẽ được bỏ qua; bạn có thể xóa chúng đi "
"nếu muốn.\n"
-"#\n"
-#: builtin/tag.c:298
+#: builtin/tag.c:292
msgid "unable to sign the tag"
msgstr "không thể ký thẻ"
-#: builtin/tag.c:300
+#: builtin/tag.c:294
msgid "unable to write tag file"
msgstr "không thể ghi vào tập tin lưu thẻ"
-#: builtin/tag.c:325
+#: builtin/tag.c:319
msgid "bad object type."
msgstr "kiểu đối tượng sai."
-#: builtin/tag.c:338
+#: builtin/tag.c:332
msgid "tag header too big."
msgstr "đầu thẻ (tag) quá lớn."
-#: builtin/tag.c:370
+#: builtin/tag.c:368
msgid "no tag message?"
msgstr "không có thông điệp (message) cho thẻ (tag)?"
-#: builtin/tag.c:376
+#: builtin/tag.c:374
#, c-format
msgid "The tag message has been left in %s\n"
msgstr "Nội dung ghi chú còn lại %s\n"
-#: builtin/tag.c:425
+#: builtin/tag.c:423
msgid "switch 'points-at' requires an object"
msgstr "chuyển đến “points-at” yêu cần một đối tượng"
-#: builtin/tag.c:427
+#: builtin/tag.c:425
#, c-format
msgid "malformed object name '%s'"
msgstr "tên đối tượng dị hình “%s”"
-#: builtin/tag.c:447
+#: builtin/tag.c:445
msgid "list tag names"
msgstr "chỉ liệt kê tên các thẻ"
-#: builtin/tag.c:449
+#: builtin/tag.c:447
msgid "print <n> lines of each tag message"
msgstr "hiển thị <n> dòng cho mỗi ghi chú"
-#: builtin/tag.c:451
+#: builtin/tag.c:449
msgid "delete tags"
msgstr "xóa thẻ"
-#: builtin/tag.c:452
+#: builtin/tag.c:450
msgid "verify tags"
msgstr "thẩm tra thẻ"
-#: builtin/tag.c:454
+#: builtin/tag.c:452
msgid "Tag creation options"
msgstr "Tùy chọn tạo tag"
-#: builtin/tag.c:456
+#: builtin/tag.c:454
msgid "annotated tag, needs a message"
msgstr "để chú giải cho thẻ, cần một lời ghi chú"
-#: builtin/tag.c:458
+#: builtin/tag.c:456
msgid "tag message"
msgstr "tin nhắn cho thẻ (tag)"
-#: builtin/tag.c:460
+#: builtin/tag.c:458
msgid "annotated and GPG-signed tag"
msgstr "thẻ chú giải và ký kiểu GPG"
-#: builtin/tag.c:464
+#: builtin/tag.c:462
msgid "use another key to sign the tag"
msgstr "dùng kháo khác để ký thẻ"
-#: builtin/tag.c:465
+#: builtin/tag.c:463
msgid "replace the tag if exists"
msgstr "thay thế nếu tag đó đã có trước"
-#: builtin/tag.c:466
+#: builtin/tag.c:464
msgid "show tag list in columns"
msgstr "hiển thị danh sách thẻ trong các cột"
-#: builtin/tag.c:468
+#: builtin/tag.c:466
msgid "Tag listing options"
msgstr "Các tùy chọn liệt kê thẻ"
-#: builtin/tag.c:471
+#: builtin/tag.c:469
msgid "print only tags that contain the commit"
msgstr "chỉ hiển thị những nhánh mà nó chứa lần chuyển giao"
-#: builtin/tag.c:477
+#: builtin/tag.c:475
msgid "print only tags of the object"
msgstr "chỉ hiển thị các thẻ của đối tượng"
-#: builtin/tag.c:506
+#: builtin/tag.c:504
msgid "--column and -n are incompatible"
msgstr "--column và -n xung khắc nhau"
-#: builtin/tag.c:523
+#: builtin/tag.c:521
msgid "-n option is only allowed with -l."
msgstr "tùy chọn -n chỉ cho phép dùng với -l."
-#: builtin/tag.c:525
+#: builtin/tag.c:523
msgid "--contains option is only allowed with -l."
msgstr "tùy chọn --contains chỉ cho phép dùng với -l."
-#: builtin/tag.c:527
+#: builtin/tag.c:525
msgid "--points-at option is only allowed with -l."
msgstr "tùy chọn --points-at chỉ cho phép dùng với -l."
-#: builtin/tag.c:535
+#: builtin/tag.c:533
msgid "only one -F or -m option is allowed."
msgstr "chỉ có một tùy chọn -F hoặc -m là được phép."
-#: builtin/tag.c:555
+#: builtin/tag.c:553
msgid "too many params"
msgstr "quá nhiều đối số"
-#: builtin/tag.c:561
+#: builtin/tag.c:559
#, c-format
msgid "'%s' is not a valid tag name."
msgstr "“%s” không phải thẻ hợp lệ."
-#: builtin/tag.c:566
+#: builtin/tag.c:564
#, c-format
msgid "tag '%s' already exists"
msgstr "Thẻ “%s” đã tồn tại rồi"
-#: builtin/tag.c:584
+#: builtin/tag.c:582
#, c-format
msgid "%s: cannot lock the ref"
msgstr "%s: không thể khóa ref (tham chiếu)"
-#: builtin/tag.c:586
+#: builtin/tag.c:584
#, c-format
msgid "%s: cannot update the ref"
msgstr "%s: không thể cập nhật ref (tham chiếu)"
-#: builtin/tag.c:588
+#: builtin/tag.c:586
#, c-format
msgid "Updated tag '%s' (was %s)\n"
msgstr "Đã cập nhật thẻ “%s” (trước là %s)\n"
@@ -8708,7 +8881,7 @@ msgid "Print lines matching a pattern"
msgstr "In ra những dòng khớp với một mẫu"
#: common-cmds.h:17
-msgid "Create an empty git repository or reinitialize an existing one"
+msgid "Create an empty Git repository or reinitialize an existing one"
msgstr ""
"Tạo một kho git trống rỗng hay khởi tạo lại một kho đã tồn tại từ trước"
@@ -9462,7 +9635,7 @@ msgstr "”$sm_path” đã tồn tại từ trước và không phải là mộ
#, sh-format
msgid "A git directory for '$sm_name' is found locally with remote(s):"
msgstr ""
-"Thư mục git cho '$sm_name' được tìm thấy một cách cục bộ với các máy chủ:"
+"Thư mục git cho “$sm_name” được tìm thấy một cách cục bộ với các máy chủ:"
#: git-submodule.sh:394
#, sh-format
@@ -9475,7 +9648,7 @@ msgstr "Nếu bạn muốn dùng lại thư mục git nội bộ này thay vì n
msgid ""
"use the '--force' option. If the local git directory is not the correct repo"
msgstr ""
-"dùng tùy chọn '--force'. Nếu thư mục git nội bộ không phải là repo (kho) đúng"
+"dùng tùy chọn “--force”. Nếu thư mục git nội bộ không phải là repo (kho) đúng"
#: git-submodule.sh:397
#, sh-format
@@ -9483,14 +9656,14 @@ msgid ""
"or you are unsure what this means choose another name with the '--name' "
"option."
msgstr ""
-"hay bạn không chắc chắn điều đó có nghĩa gì chọn tên khác với tùy chọn '--"
-"name'."
+"hay bạn không chắc chắn điều đó có nghĩa gì chọn tên khác với tùy chọn “--"
+"name”."
#: git-submodule.sh:399
#, sh-format
msgid "Reactivating local git directory for submodule '$sm_name'."
msgstr ""
-"Phục hồi sự hoạt động của thư mục git nội bộ cho mô-đun-con '$sm_name'."
+"Phục hồi sự hoạt động của thư mục git nội bộ cho mô-đun-con “$sm_name”."
#: git-submodule.sh:411
#, sh-format
@@ -9627,17 +9800,23 @@ msgid "blob"
msgstr "blob"
#: git-submodule.sh:979
-msgid "# Submodules changed but not updated:"
-msgstr "# Các mô-đun-con đã bị thay đổi nhưng chưa được cập nhật:"
+msgid "Submodules changed but not updated:"
+msgstr "Những mô-đun-con đã bị thay đổi nhưng chưa được cập nhật:"
#: git-submodule.sh:981
-msgid "# Submodule changes to be committed:"
-msgstr "# Những thay đổi mô-đun-con được chuyển giao (commit):"
+msgid "Submodule changes to be committed:"
+msgstr "Những mô-đun-con thay đổi đã được chuyển giao (commit):"
#: git-submodule.sh:1129
#, sh-format
msgid "Synchronizing submodule url for '$prefix$sm_path'"
-msgstr "Url Mô-đun-con đồng bộ hóa cho '$prefix$sm_path'"
+msgstr "Url Mô-đun-con đồng bộ hóa cho “$prefix$sm_path”"
+
+#~ msgid "can't fdopen 'show' output fd"
+#~ msgstr "không thể fdopen “show” (lệnh hiển thị) mô tả tập tin (fd) kết xuất"
+
+#~ msgid "failed to close pipe to 'show' for object '%s'"
+#~ msgstr "gặp lỗi khi đóng đường ống cho lệnh “show” cho đối tượng “%s”"
#~ msgid "You do not have a valid HEAD"
#~ msgstr "Bạn không có HEAD nào hợp lệ"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 1fb9c22a17..c48ae10d78 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -12,8 +12,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2013-01-25 12:33+0800\n"
-"PO-Revision-Date: 2013-02-09 00:47+0800\n"
+"POT-Creation-Date: 2013-03-05 12:36+0800\n"
+"PO-Revision-Date: 2013-03-05 13:07+0800\n"
"Last-Translator: Jiang Xin <worldhello.net@gmail.com>\n"
"Language-Team: GitHub <https://github.com/gotgit/git/>\n"
"Language: zh_CN\n"
@@ -22,7 +22,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: advice.c:45
+#: advice.c:49
#, c-format
msgid "hint: %.*s\n"
msgstr "提示:%.*s\n"
@@ -31,7 +31,7 @@ msgstr "提示:%.*s\n"
#. * Message used both when 'git commit' fails and when
#. * other commands doing a merge do.
#.
-#: advice.c:75
+#: advice.c:79
msgid ""
"Fix them up in the work tree,\n"
"and then use 'git add/rm <file>' as\n"
@@ -76,11 +76,11 @@ msgstr "前缀"
msgid "prepend prefix to each pathname in the archive"
msgstr "为归档中每个路径名加上前缀"
-#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2380
-#: builtin/blame.c:2381 builtin/config.c:55 builtin/fast-export.c:653
+#: archive.c:326 builtin/archive.c:91 builtin/blame.c:2366
+#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:653
#: builtin/fast-export.c:655 builtin/grep.c:715 builtin/hash-object.c:77
-#: builtin/ls-files.c:494 builtin/ls-files.c:497 builtin/notes.c:540
-#: builtin/notes.c:697 builtin/read-tree.c:107 parse-options.h:149
+#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536
+#: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149
msgid "file"
msgstr "文件"
@@ -120,7 +120,7 @@ msgstr "版本库"
msgid "retrieve the archive from remote repository <repo>"
msgstr "从远程版本库(<版本库>)提取归档文件"
-#: archive.c:347 builtin/archive.c:95 builtin/notes.c:619
+#: archive.c:347 builtin/archive.c:95 builtin/notes.c:615
msgid "command"
msgstr "命令"
@@ -130,10 +130,10 @@ msgstr "远程 git-upload-archive 命令的路径"
#: attr.c:259
msgid ""
-"Negative patterns are forbidden in git attributes\n"
+"Negative patterns are ignored in git attributes\n"
"Use '\\!' for literal leading exclamation."
msgstr ""
-"在 git attributes 中不允许使用负值模版\n"
+"负值模版在 git attributes 中被忽略\n"
"当字符串确实要以感叹号开始时,使用 '\\!'。"
#: bundle.c:36
@@ -310,23 +310,23 @@ msgstr[0] "%lu 年前"
msgstr[1] "%lu 年前"
# 译者:注意保持前导空格
-#: diff.c:111
+#: diff.c:112
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
msgstr " 无法解析 dirstat 截止(cut-off)百分比 '%s'\n"
# 译者:注意保持前导空格
-#: diff.c:116
+#: diff.c:117
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
msgstr " 未知的 dirstat 参数 '%s'\n"
-#: diff.c:194
+#: diff.c:210
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "配置变量 'diff.submodule' 未知的取值:'%s'"
-#: diff.c:237
+#: diff.c:260
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
@@ -335,7 +335,7 @@ msgstr ""
"发现配置变量 'diff.dirstat' 中的错误:\n"
"%s"
-#: diff.c:3494
+#: diff.c:3468
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
@@ -344,12 +344,12 @@ msgstr ""
"无法解析 --dirstat/-X 选项的参数:\n"
"%s"
-#: diff.c:3508
+#: diff.c:3482
#, c-format
msgid "Failed to parse --submodule option parameter: '%s'"
msgstr "无法解析 --submodule 选项的参数:'%s'"
-#: gpg-interface.c:59
+#: gpg-interface.c:59 gpg-interface.c:127
msgid "could not run gpg."
msgstr "不能执行 gpg。"
@@ -361,6 +361,16 @@ msgstr "gpg 没有接受数据"
msgid "gpg failed to sign the data"
msgstr "gpg 无法为数据签名"
+#: gpg-interface.c:112
+#, c-format
+msgid "could not create temporary file '%s': %s"
+msgstr "不能创建临时文件 '%s':%s"
+
+#: gpg-interface.c:115
+#, c-format
+msgid "failed writing detached signature to '%s': %s"
+msgstr "无法将分离式签名写入 '%s':%s"
+
#: grep.c:1622
#, c-format
msgid "'%s': unable to read %s"
@@ -385,7 +395,11 @@ msgstr "在 '%s' 下可用的 git 命令"
msgid "git commands available from elsewhere on your $PATH"
msgstr "在 $PATH 路径中的其他地方可用的 git 命令"
-#: help.c:275
+#: help.c:235
+msgid "The most commonly used git commands are:"
+msgstr "最常用的 git 命令有:"
+
+#: help.c:292
#, c-format
msgid ""
"'%s' appears to be a git command, but we were not\n"
@@ -394,11 +408,11 @@ msgstr ""
"'%s' 像是一个 git 命令,但却无法运行。\n"
"可能是 git-%s 受损?"
-#: help.c:332
+#: help.c:349
msgid "Uh oh. Your system reports no Git commands at all."
msgstr "唉呀,您的系统中未发现 Git 命令。"
-#: help.c:354
+#: help.c:371
#, c-format
msgid ""
"WARNING: You called a Git command named '%s', which does not exist.\n"
@@ -407,17 +421,17 @@ msgstr ""
"警告:您运行一个不存在的 Git 命令 '%s'。继续执行假定您要要运行的\n"
"是 '%s'"
-#: help.c:359
+#: help.c:376
#, c-format
msgid "in %0.1f seconds automatically..."
msgstr "在 %0.1f 秒钟后自动运行..."
-#: help.c:366
+#: help.c:383
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
msgstr "git:'%s' 不是一个 git 命令。参见 'git --help'。"
-#: help.c:370
+#: help.c:387
msgid ""
"\n"
"Did you mean this?"
@@ -694,40 +708,54 @@ msgstr "不能解析对象 '%s'"
msgid "Unable to write index."
msgstr "不能写入索引。"
-#: parse-options.c:485
+#: parse-options.c:489
msgid "..."
msgstr "..."
-#: parse-options.c:503
+#: parse-options.c:507
#, c-format
msgid "usage: %s"
msgstr "用法:%s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation
-#: parse-options.c:507
+#: parse-options.c:511
#, c-format
msgid " or: %s"
msgstr " 或:%s"
# 译者:为保证在输出中对齐,注意调整句中空格!
-#: parse-options.c:510
+#: parse-options.c:514
#, c-format
msgid " %s"
msgstr " %s"
-#: remote.c:1686
+#: parse-options.c:548
+msgid "-NUM"
+msgstr "-数字"
+
+#: pathspec.c:83
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr "路径 '%s' 属于模组 '%.*s'"
+
+#: pathspec.c:99
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr "'%s' 位于符号链接中"
+
+#: remote.c:1653
#, 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"
-#: remote.c:1692
+#: remote.c:1659
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (使用 \"git push\" 来发布您的本地提交)\n"
-#: remote.c:1695
+#: remote.c:1662
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
@@ -736,11 +764,11 @@ msgstr[0] "您的分支落后 '%s' 共 %d 个提交,并且可以快进。\n"
msgstr[1] "您的分支落后 '%s' 共 %d 个提交,并且可以快进。\n"
# 译者:注意保持前导空格
-#: remote.c:1703
+#: remote.c:1670
msgid " (use \"git pull\" to update your local branch)\n"
msgstr " (使用 \"git pull\" 来更新您的本地分支)\n"
-#: remote.c:1706
+#: remote.c:1673
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -756,18 +784,18 @@ msgstr[1] ""
"并且分别有 %d 和 %d 处不同的提交。\n"
# 译者:注意保持前导空格
-#: remote.c:1716
+#: remote.c:1683
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
msgstr " (使用 \"git pull\" 来合并远程分支)\n"
-#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:875 builtin/merge.c:985
-#: builtin/merge.c:995
+#: sequencer.c:123 builtin/merge.c:761 builtin/merge.c:874 builtin/merge.c:984
+#: builtin/merge.c:994
#, c-format
msgid "Could not open '%s' for writing"
msgstr "不能为写入打开 '%s'"
-#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:987
-#: builtin/merge.c:1000
+#: sequencer.c:125 builtin/merge.c:333 builtin/merge.c:764 builtin/merge.c:986
+#: builtin/merge.c:999
#, c-format
msgid "Could not write to '%s'"
msgstr "不能写入 '%s'"
@@ -964,7 +992,7 @@ msgstr "不能解析 HEAD"
msgid "cannot abort from a branch yet to be born"
msgstr "不能从尚未建立的分支终止"
-#: sequencer.c:821 builtin/apply.c:4016
+#: sequencer.c:821 builtin/apply.c:4056
#, c-format
msgid "cannot open %s: %s"
msgstr "不能打开 %s:%s"
@@ -1199,355 +1227,415 @@ msgstr "未合并: %s"
msgid "bug: unhandled diff status %c"
msgstr "bug:未处理的差异状态 %c"
-#: wt-status.c:787
+#: wt-status.c:789
msgid "You have unmerged paths."
msgstr "您有尚未合并的路径。"
# 译者:注意保持前导空格
-#: wt-status.c:790 wt-status.c:914
+#: wt-status.c:792 wt-status.c:944
msgid " (fix conflicts and run \"git commit\")"
msgstr " (解决冲突并运行 \"git commit\")"
-#: wt-status.c:793
+#: wt-status.c:795
msgid "All conflicts fixed but you are still merging."
msgstr "所有冲突已解决但您仍处于合并中。"
# 译者:注意保持前导空格
-#: wt-status.c:796
+#: wt-status.c:798
msgid " (use \"git commit\" to conclude merge)"
msgstr " (使用 \"git commit\" 结束合并)"
-#: wt-status.c:806
+#: wt-status.c:808
msgid "You are in the middle of an am session."
msgstr "您正处于一个 am 过程中。"
-#: wt-status.c:809
+#: wt-status.c:811
msgid "The current patch is empty."
msgstr "当前的补丁为空。"
# 译者:注意保持前导空格
-#: wt-status.c:813
+#: wt-status.c:815
msgid " (fix conflicts and then run \"git am --resolved\")"
msgstr " (解决冲突,然后运行 \"git am --resolved\")"
# 译者:注意保持前导空格
-#: wt-status.c:815
+#: wt-status.c:817
msgid " (use \"git am --skip\" to skip this patch)"
msgstr " (使用 \"git am --skip\" 跳过此补丁)"
# 译者:注意保持前导空格
-#: wt-status.c:817
+#: wt-status.c:819
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr " (使用 \"git am --abort\" 恢复原有分支)"
-#: wt-status.c:875 wt-status.c:885
+#: wt-status.c:879 wt-status.c:896
+#, c-format
+msgid "You are currently rebasing branch '%s' on '%s'."
+msgstr "您正在将分支 '%s' 变基到 '%s'。"
+
+#: wt-status.c:884 wt-status.c:901
msgid "You are currently rebasing."
msgstr "您正在变基。"
# 译者:注意保持前导空格
-#: wt-status.c:878
+#: wt-status.c:887
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr " (解决冲突,然后运行 \"git rebase --continue\")"
# 译者:注意保持前导空格
-#: wt-status.c:880
+#: wt-status.c:889
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (使用 \"git rebase --skip\" 跳过此补丁)"
# 译者:注意保持前导空格
-#: wt-status.c:882
+#: wt-status.c:891
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr " (使用 \"git rebase --abort\" 以检出原有分支)"
# 译者:注意保持前导空格
-#: wt-status.c:888
+#: wt-status.c:904
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr " (所有冲突已解决:运行 \"git rebase --continue\")"
-#: wt-status.c:890
+#: wt-status.c:908
+#, c-format
+msgid ""
+"You are currently splitting a commit while rebasing branch '%s' on '%s'."
+msgstr "您正在将分支 '%s' 变基到 '%s' 过程中拆分一个提交。"
+
+#: wt-status.c:913
msgid "You are currently splitting a commit during a rebase."
msgstr "您正在变基过程中拆分一个提交。"
# 译者:注意保持前导空格
-#: wt-status.c:893
+#: wt-status.c:916
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr " (一旦您工作目录提交干净后,运行 \"git rebase --continue\")"
-#: wt-status.c:895
+#: wt-status.c:920
+#, c-format
+msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
+msgstr "您正在将分支 '%s' 变基到 '%s' 过程中编辑一个提交。"
+
+#: wt-status.c:925
msgid "You are currently editing a commit during a rebase."
msgstr "您正在变基过程中编辑一个提交。"
# 译者:注意保持前导空格
-#: wt-status.c:898
+#: wt-status.c:928
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr " (使用 \"git commit --amend\" 修补当前提交)"
# 译者:注意保持前导空格
-#: wt-status.c:900
+#: wt-status.c:930
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr " (当您对您的修改满意后执行 \"git rebase --continue\")"
-#: wt-status.c:910
+#: wt-status.c:940
msgid "You are currently cherry-picking."
msgstr "您正在做拣选操作。"
# 译者:注意保持前导空格
-#: wt-status.c:917
+#: wt-status.c:947
msgid " (all conflicts fixed: run \"git commit\")"
msgstr " (解决所有冲突后,执行 \"git commit\")"
-#: wt-status.c:926
+#: wt-status.c:958
+#, c-format
+msgid "You are currently bisecting branch '%s'."
+msgstr "您正在分支 '%s' 中做二分查找。"
+
+#: wt-status.c:962
msgid "You are currently bisecting."
msgstr "您正在做二分查找。"
# 译者:注意保持前导空格
-#: wt-status.c:929
+#: wt-status.c:965
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr " (使用 \"git bisect reset\" 以回到原有分支)"
-#: wt-status.c:980
+#: wt-status.c:1064
msgid "On branch "
msgstr "位于分支 "
-#: wt-status.c:987
+#: wt-status.c:1071
msgid "Not currently on any branch."
msgstr "当前不在任何分支上。"
-#: wt-status.c:999
+#: wt-status.c:1083
msgid "Initial commit"
msgstr "初始提交"
-#: wt-status.c:1013
+#: wt-status.c:1097
msgid "Untracked files"
msgstr "未跟踪的文件"
-#: wt-status.c:1015
+#: wt-status.c:1099
msgid "Ignored files"
msgstr "忽略的文件"
-#: wt-status.c:1017
+#: wt-status.c:1101
#, c-format
msgid "Untracked files not listed%s"
msgstr "未跟踪的文件没有列出%s"
# 译者:中文字符串拼接,可删除前导空格
-#: wt-status.c:1019
+#: wt-status.c:1103
msgid " (use -u option to show untracked files)"
msgstr "(使用 -u 参数显示未跟踪的文件)"
-#: wt-status.c:1025
+#: wt-status.c:1109
msgid "No changes"
msgstr "没有修改"
# 译者:中文字符串拼接,可删除前导空格
-#: wt-status.c:1030
+#: wt-status.c:1114
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr "修改尚未加入提交(使用 \"git add\" 和/或 \"git commit -a\")\n"
-#: wt-status.c:1033
+#: wt-status.c:1117
#, c-format
msgid "no changes added to commit\n"
msgstr "修改尚未加入提交\n"
-#: wt-status.c:1036
+#: wt-status.c:1120
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
"track)\n"
msgstr "提交为空,但是存在尚未跟踪的文件(使用 \"git add\" 建立跟踪)\n"
-#: wt-status.c:1039
+#: wt-status.c:1123
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr "提交为空,但是存在尚未跟踪的文件\n"
# 译者:中文字符串拼接,可删除前导空格
-#: wt-status.c:1042
+#: wt-status.c:1126
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr "无文件要提交(创建/拷贝文件并使用 \"git add\" 建立跟踪)\n"
-#: wt-status.c:1045 wt-status.c:1050
+#: wt-status.c:1129 wt-status.c:1134
#, c-format
msgid "nothing to commit\n"
msgstr "无文件要提交\n"
# 译者:中文字符串拼接,可删除前导空格
-#: wt-status.c:1048
+#: wt-status.c:1132
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr "无文件要提交(使用 -u 显示未跟踪的文件)\n"
# 译者:中文字符串拼接,可删除前导空格
-#: wt-status.c:1052
+#: wt-status.c:1136
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr "无文件要提交,干净的工作区\n"
-#: wt-status.c:1160
+#: wt-status.c:1244
msgid "HEAD (no branch)"
msgstr "HEAD(非分支)"
# 译者:注意保持句尾空格
-#: wt-status.c:1166
+#: wt-status.c:1250
msgid "Initial commit on "
msgstr "初始提交于 "
# 译者:注意保持句尾空格
-#: wt-status.c:1181
+#: wt-status.c:1265
msgid "behind "
msgstr "落后 "
# 译者:注意保持句尾空格
-#: wt-status.c:1184 wt-status.c:1187
+#: wt-status.c:1268 wt-status.c:1271
msgid "ahead "
msgstr "领先 "
# 译者:注意保持句尾空格
-#: wt-status.c:1189
+#: wt-status.c:1273
msgid ", behind "
msgstr ",落后 "
-#: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
-msgstr "git add [选项] [--] <filepattern>..."
+#: compat/precompose_utf8.c:58 builtin/clone.c:341
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "无法删除 '%s'"
+
+#: builtin/add.c:20
+msgid "git add [options] [--] <pathspec>..."
+msgstr "git add [选项] [--] <路径匹配>..."
-#: builtin/add.c:62
+#: builtin/add.c:63
#, c-format
msgid "unexpected diff status %c"
msgstr "意外的差异状态 %c"
-#: builtin/add.c:67 builtin/commit.c:231
+#: builtin/add.c:68 builtin/commit.c:231
msgid "updating files failed"
msgstr "更新文件失败"
-#: builtin/add.c:77
+#: builtin/add.c:78
#, c-format
msgid "remove '%s'\n"
msgstr "删除 '%s'\n"
-#: builtin/add.c:176
-#, c-format
-msgid "Path '%s' is in submodule '%.*s'"
-msgstr "路径 '%s' 属于模组 '%.*s'"
-
-#: builtin/add.c:192
+#: builtin/add.c:148
msgid "Unstaged changes after refreshing the index:"
msgstr "刷新索引之后尚未被暂存的变更:"
-#: builtin/add.c:195 builtin/add.c:460 builtin/rm.c:275
+#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275
#, c-format
msgid "pathspec '%s' did not match any files"
msgstr "路径 '%s' 未匹配任何文件"
-#: builtin/add.c:209
-#, c-format
-msgid "'%s' is beyond a symbolic link"
-msgstr "'%s' 位于符号链接中"
-
-#: builtin/add.c:276
+#: builtin/add.c:234
msgid "Could not read the index"
msgstr "不能读取索引"
-#: builtin/add.c:286
+#: builtin/add.c:244
#, c-format
msgid "Could not open '%s' for writing."
msgstr "不能打开 '%s' 以写入。"
-#: builtin/add.c:290
+#: builtin/add.c:248
msgid "Could not write patch"
msgstr "不能生成补丁"
-#: builtin/add.c:295
+#: builtin/add.c:253
#, c-format
msgid "Could not stat '%s'"
msgstr "不能查看文件状态 '%s'"
-#: builtin/add.c:297
+#: builtin/add.c:255
msgid "Empty patch. Aborted."
msgstr "空补丁。异常终止。"
-#: builtin/add.c:303
+#: builtin/add.c:261
#, c-format
msgid "Could not apply '%s'"
msgstr "不能应用 '%s'"
-#: builtin/add.c:313
+#: builtin/add.c:271
msgid "The following paths are ignored by one of your .gitignore files:\n"
msgstr "下列路径根据您的一个 .gitignore 文件而被忽略:\n"
-#: builtin/add.c:319 builtin/clean.c:160 builtin/fetch.c:78 builtin/mv.c:63
-#: builtin/prune-packed.c:76 builtin/push.c:396 builtin/remote.c:1253
+#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63
+#: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253
#: builtin/rm.c:206
msgid "dry run"
msgstr "演习"
-#: builtin/add.c:320 builtin/apply.c:4365 builtin/commit.c:1160
-#: builtin/count-objects.c:82 builtin/fsck.c:613 builtin/log.c:1522
-#: builtin/mv.c:62 builtin/read-tree.c:112
+#: builtin/add.c:278 builtin/apply.c:4405 builtin/check-ignore.c:19
+#: builtin/commit.c:1150 builtin/count-objects.c:82 builtin/fsck.c:613
+#: builtin/log.c:1522 builtin/mv.c:62 builtin/read-tree.c:112
msgid "be verbose"
msgstr "冗长输出"
-#: builtin/add.c:322
+#: builtin/add.c:280
msgid "interactive picking"
msgstr "交互式拣选"
-#: builtin/add.c:323 builtin/checkout.c:1031 builtin/reset.c:258
+#: builtin/add.c:281 builtin/checkout.c:1031 builtin/reset.c:258
msgid "select hunks interactively"
msgstr "交互式挑选数据块"
-#: builtin/add.c:324
+#: builtin/add.c:282
msgid "edit current diff and apply"
msgstr "编辑当前差异并应用"
-#: builtin/add.c:325
+#: builtin/add.c:283
msgid "allow adding otherwise ignored files"
msgstr "允许添加忽略的文件"
-#: builtin/add.c:326
+#: builtin/add.c:284
msgid "update tracked files"
msgstr "更新已跟踪的文件"
-#: builtin/add.c:327
+#: builtin/add.c:285
msgid "record only the fact that the path will be added later"
msgstr "只记录,该路径稍后再添加"
-#: builtin/add.c:328
+#: builtin/add.c:286
msgid "add changes from all tracked and untracked files"
msgstr "添加所有改变的已跟踪文件和未跟踪文件"
-#: builtin/add.c:329
+#: builtin/add.c:287
msgid "don't add, only refresh the index"
msgstr "不添加,只刷新索引"
-#: builtin/add.c:330
+#: builtin/add.c:288
msgid "just skip files which cannot be added because of errors"
msgstr "跳过因出错不能添加的文件"
-#: builtin/add.c:331
+#: builtin/add.c:289
msgid "check if - even missing - files are ignored in dry run"
msgstr "检查在演习模式下文件(即使不存在)是否被忽略"
-#: builtin/add.c:353
+#: builtin/add.c:311
#, c-format
msgid "Use -f if you really want to add them.\n"
msgstr "使用 -f 参数如果您确实要添加它们。\n"
-#: builtin/add.c:354
+#: builtin/add.c:312
msgid "no files added"
msgstr "没有文件被添加"
-#: builtin/add.c:360
+#: builtin/add.c:318
msgid "adding files failed"
msgstr "添加文件失败"
-#: builtin/add.c:392
+# 译者:字符串首行行首要添加“warning: ”字串,故此首行要较其余行短
+#.
+#. * To be consistent with "git add -p" and most Git
+#. * commands, we should default to being tree-wide, but
+#. * this is not the original behavior and can't be
+#. * changed until users trained themselves not to type
+#. * "git add -u" or "git add -A". For now, we warn and
+#. * keep the old behavior. Later, this warning can be
+#. * turned into a die(...), and eventually we may
+#. * reallow the command with a new behavior.
+#.
+#: builtin/add.c:335
+#, c-format
+msgid ""
+"The behavior of 'git add %s (or %s)' with no path argument from a\n"
+"subdirectory of the tree will change in Git 2.0 and should not be used "
+"anymore.\n"
+"To add content for the whole tree, run:\n"
+"\n"
+" git add %s :/\n"
+" (or git add %s :/)\n"
+"\n"
+"To restrict the command to the current directory, run:\n"
+"\n"
+" git add %s .\n"
+" (or git add %s .)\n"
+"\n"
+"With the current Git version, the command is restricted to the current "
+"directory."
+msgstr ""
+"在 Git 2.0 版本,将不再允许在一个子目录下不带任何路径参数地执行\n"
+"命令 'git add %s (或 %s)'。所以不要再继续使用了。\n"
+"如果要添加整个目录树的内容,执行:\n"
+"\n"
+" git add %s :/\n"
+" (或 git add %s :/)\n"
+"\n"
+"如果要限制该命令只作用于当前目录,执行:\n"
+"\n"
+" git add %s .\n"
+" (或 git add %s .)\n"
+"\n"
+"对于当前版本的 Git,这条命令只作用于当前目录。"
+
+#: builtin/add.c:381
msgid "-A and -u are mutually incompatible"
msgstr "-A 和 -u 选项互斥"
-#: builtin/add.c:394
+#: builtin/add.c:383
msgid "Option --ignore-missing can only be used together with --dry-run"
msgstr "选项 --ignore-missing 只能和 --dry-run 同时使用"
@@ -1561,12 +1649,12 @@ msgstr "没有指定文件,也没有文件被添加。\n"
msgid "Maybe you wanted to say 'git add .'?\n"
msgstr "也许您想要执行 'git add .'?\n"
-#: builtin/add.c:421 builtin/clean.c:203 builtin/commit.c:291 builtin/mv.c:82
-#: builtin/rm.c:235
+#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204
+#: builtin/commit.c:291 builtin/mv.c:82 builtin/rm.c:235
msgid "index file corrupt"
msgstr "索引文件损坏"
-#: builtin/add.c:481 builtin/apply.c:4461 builtin/mv.c:229 builtin/rm.c:370
+#: builtin/add.c:481 builtin/apply.c:4501 builtin/mv.c:229 builtin/rm.c:370
msgid "Unable to write new index file"
msgstr "无法写入新索引文件"
@@ -1619,17 +1707,17 @@ msgstr "git apply:错误的 git-diff - 第 %d 行上旧文件名不一致"
msgid "git apply: bad git-diff - expected /dev/null on line %d"
msgstr "git apply:错误的 git-diff - 第 %d 行处应为 /dev/null"
-#: builtin/apply.c:1420
+#: builtin/apply.c:1422
#, c-format
msgid "recount: unexpected line: %.*s"
msgstr "recount:意外的行:%.*s"
-#: builtin/apply.c:1477
+#: builtin/apply.c:1479
#, c-format
msgid "patch fragment without header at line %d: %.*s"
msgstr "第 %d 行的补丁片段没有头信息:%.*s"
-#: builtin/apply.c:1494
+#: builtin/apply.c:1496
#, c-format
msgid ""
"git diff header lacks filename information when removing %d leading pathname "
@@ -1640,78 +1728,78 @@ msgid_plural ""
msgstr[0] "当移除 %d 个前导路径后 git diff 头缺乏文件名信息(第 %d 行)"
msgstr[1] "当移除 %d 个前导路径后 git diff 头缺乏文件名信息(第 %d 行)"
-#: builtin/apply.c:1654
+#: builtin/apply.c:1656
msgid "new file depends on old contents"
msgstr "新文件依赖旧内容"
-#: builtin/apply.c:1656
+#: builtin/apply.c:1658
msgid "deleted file still has contents"
msgstr "删除的文件仍有内容"
-#: builtin/apply.c:1682
+#: builtin/apply.c:1684
#, c-format
msgid "corrupt patch at line %d"
msgstr "补丁在第 %d 行损坏"
-#: builtin/apply.c:1718
+#: builtin/apply.c:1720
#, c-format
msgid "new file %s depends on old contents"
msgstr "新文件 %s 依赖旧内容"
-#: builtin/apply.c:1720
+#: builtin/apply.c:1722
#, c-format
msgid "deleted file %s still has contents"
msgstr "删除的文件 %s 仍有内容"
-#: builtin/apply.c:1723
+#: builtin/apply.c:1725
#, c-format
msgid "** warning: file %s becomes empty but is not deleted"
msgstr "** 警告:文件 %s 成为空文件但并未删除"
-#: builtin/apply.c:1869
+#: builtin/apply.c:1871
#, c-format
msgid "corrupt binary patch at line %d: %.*s"
msgstr "二进制补丁在第 %d 行损坏:%.*s"
#. there has to be one hunk (forward hunk)
-#: builtin/apply.c:1898
+#: builtin/apply.c:1900
#, c-format
msgid "unrecognized binary patch at line %d"
msgstr "未能识别的二进制补丁位于第 %d 行"
-#: builtin/apply.c:1984
+#: builtin/apply.c:1986
#, c-format
msgid "patch with only garbage at line %d"
msgstr "补丁文件的第 %d 行只有垃圾数据"
-#: builtin/apply.c:2074
+#: builtin/apply.c:2076
#, c-format
msgid "unable to read symlink %s"
msgstr "无法读取符号链接 %s"
-#: builtin/apply.c:2078
+#: builtin/apply.c:2080
#, c-format
msgid "unable to open or read %s"
msgstr "不能打开或读取 %s"
-#: builtin/apply.c:2682
+#: builtin/apply.c:2684
#, c-format
msgid "invalid start of line: '%c'"
msgstr "无效的行首字符:'%c'"
-#: builtin/apply.c:2800
+#: builtin/apply.c:2802
#, c-format
msgid "Hunk #%d succeeded at %d (offset %d line)."
msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
msgstr[0] "块 #%d 成功应用于 %d(偏移 %d 行)"
msgstr[1] "块 #%d 成功应用于 %d(偏移 %d 行)"
-#: builtin/apply.c:2812
+#: builtin/apply.c:2814
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr "上下文减少到(%ld/%ld)以在第 %d 行应用补丁片段"
-#: builtin/apply.c:2818
+#: builtin/apply.c:2820
#, c-format
msgid ""
"while searching for:\n"
@@ -1720,318 +1808,318 @@ msgstr ""
"当查询:\n"
"%.*s"
-#: builtin/apply.c:2837
+#: builtin/apply.c:2839
#, c-format
msgid "missing binary patch data for '%s'"
msgstr "缺失 '%s' 的二进制补丁数据"
-#: builtin/apply.c:2940
+#: builtin/apply.c:2942
#, c-format
msgid "binary patch does not apply to '%s'"
msgstr "二进制补丁未应用到 '%s'"
-#: builtin/apply.c:2946
+#: builtin/apply.c:2948
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr "到 '%s' 的二进制补丁产生了不正确的结果(应为 %s,却为 %s)"
-#: builtin/apply.c:2967
+#: builtin/apply.c:2969
#, c-format
msgid "patch failed: %s:%ld"
msgstr "打补丁失败:%s:%ld"
-#: builtin/apply.c:3089
+#: builtin/apply.c:3091
#, c-format
msgid "cannot checkout %s"
msgstr "不能检出 %s"
-#: builtin/apply.c:3134 builtin/apply.c:3143 builtin/apply.c:3187
+#: builtin/apply.c:3136 builtin/apply.c:3145 builtin/apply.c:3189
#, c-format
msgid "read of %s failed"
msgstr "读取 %s 失败"
-#: builtin/apply.c:3167 builtin/apply.c:3389
+#: builtin/apply.c:3169 builtin/apply.c:3391
#, c-format
msgid "path %s has been renamed/deleted"
msgstr "路径 %s 已经被重命名/删除"
-#: builtin/apply.c:3248 builtin/apply.c:3403
+#: builtin/apply.c:3250 builtin/apply.c:3405
#, c-format
msgid "%s: does not exist in index"
msgstr "%s:不存在于索引中"
-#: builtin/apply.c:3252 builtin/apply.c:3395 builtin/apply.c:3417
+#: builtin/apply.c:3254 builtin/apply.c:3397 builtin/apply.c:3419
#, c-format
msgid "%s: %s"
msgstr "%s:%s"
-#: builtin/apply.c:3257 builtin/apply.c:3411
+#: builtin/apply.c:3259 builtin/apply.c:3413
#, c-format
msgid "%s: does not match index"
msgstr "%s:和索引不匹配"
-#: builtin/apply.c:3359
+#: builtin/apply.c:3361
msgid "removal patch leaves file contents"
msgstr "移除补丁仍留下了文件内容"
-#: builtin/apply.c:3428
+#: builtin/apply.c:3430
#, c-format
msgid "%s: wrong type"
msgstr "%s:错误类型"
-#: builtin/apply.c:3430
+#: builtin/apply.c:3432
#, c-format
msgid "%s has type %o, expected %o"
msgstr "%s 的类型是 %o,应为 %o"
-#: builtin/apply.c:3531
+#: builtin/apply.c:3533
#, c-format
msgid "%s: already exists in index"
msgstr "%s:已经存在于索引中"
-#: builtin/apply.c:3534
+#: builtin/apply.c:3536
#, c-format
msgid "%s: already exists in working directory"
msgstr "%s:已经存在于工作区中"
-#: builtin/apply.c:3554
+#: builtin/apply.c:3556
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o)"
msgstr "%2$s 的新模式(%1$o)和旧模式(%3$o)不匹配"
-#: builtin/apply.c:3559
+#: builtin/apply.c:3561
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o) of %s"
msgstr "%2$s 的新模式(%1$o)和 %4$s 的旧模式(%3$o)不匹配"
-#: builtin/apply.c:3567
+#: builtin/apply.c:3569
#, c-format
msgid "%s: patch does not apply"
msgstr "%s:补丁未应用"
-#: builtin/apply.c:3580
+#: builtin/apply.c:3582
#, c-format
msgid "Checking patch %s..."
msgstr "检查补丁 %s..."
-#: builtin/apply.c:3635 builtin/checkout.c:215 builtin/reset.c:124
+#: builtin/apply.c:3675 builtin/checkout.c:215 builtin/reset.c:124
#, c-format
msgid "make_cache_entry failed for path '%s'"
msgstr "对路径 '%s' 的 make_cache_entry 操作失败"
-#: builtin/apply.c:3778
+#: builtin/apply.c:3818
#, c-format
msgid "unable to remove %s from index"
msgstr "不能从索引中移除 %s"
-#: builtin/apply.c:3806
+#: builtin/apply.c:3846
#, c-format
msgid "corrupt patch for subproject %s"
msgstr "子项目 %s 损坏的补丁"
-#: builtin/apply.c:3810
+#: builtin/apply.c:3850
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr "不能枚举新建文件 '%s' 的状态"
-#: builtin/apply.c:3815
+#: builtin/apply.c:3855
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr "不能为新建文件 %s 创建后端存储"
-#: builtin/apply.c:3818 builtin/apply.c:3926
+#: builtin/apply.c:3858 builtin/apply.c:3966
#, c-format
msgid "unable to add cache entry for %s"
msgstr "无法为 %s 添加缓存条目"
-#: builtin/apply.c:3851
+#: builtin/apply.c:3891
#, c-format
msgid "closing file '%s'"
msgstr "关闭文件 '%s'"
-#: builtin/apply.c:3900
+#: builtin/apply.c:3940
#, c-format
msgid "unable to write file '%s' mode %o"
msgstr "不能写文件 '%s' 权限 %o"
-#: builtin/apply.c:3987
+#: builtin/apply.c:4027
#, c-format
msgid "Applied patch %s cleanly."
msgstr "成功应用补丁 %s。"
-#: builtin/apply.c:3995
+#: builtin/apply.c:4035
msgid "internal error"
msgstr "内部错误"
#. Say this even without --verbose
-#: builtin/apply.c:3998
+#: builtin/apply.c:4038
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
msgstr[0] "应用 %%s 个补丁,其中 %d 个被拒绝..."
msgstr[1] "应用 %%s 个补丁,其中 %d 个被拒绝..."
-#: builtin/apply.c:4008
+#: builtin/apply.c:4048
#, c-format
msgid "truncating .rej filename to %.*s.rej"
msgstr "截短 .rej 文件名为 %.*s.rej"
-#: builtin/apply.c:4029
+#: builtin/apply.c:4069
#, c-format
msgid "Hunk #%d applied cleanly."
msgstr "第 #%d 个片段成功应用。"
-#: builtin/apply.c:4032
+#: builtin/apply.c:4072
#, c-format
msgid "Rejected hunk #%d."
msgstr "拒绝第 #%d 个片段。"
-#: builtin/apply.c:4182
+#: builtin/apply.c:4222
msgid "unrecognized input"
msgstr "未能识别的输入"
-#: builtin/apply.c:4193
+#: builtin/apply.c:4233
msgid "unable to read index file"
msgstr "无法读取索引文件"
-#: builtin/apply.c:4312 builtin/apply.c:4315 builtin/clone.c:91
+#: builtin/apply.c:4352 builtin/apply.c:4355 builtin/clone.c:91
#: builtin/fetch.c:63
msgid "path"
msgstr "路径"
-#: builtin/apply.c:4313
+#: builtin/apply.c:4353
msgid "don't apply changes matching the given path"
msgstr "不要应用与给出路径向匹配的变更"
-#: builtin/apply.c:4316
+#: builtin/apply.c:4356
msgid "apply changes matching the given path"
msgstr "应用与给出路径向匹配的变更"
-#: builtin/apply.c:4318
+#: builtin/apply.c:4358
msgid "num"
msgstr "数字"
-#: builtin/apply.c:4319
+#: builtin/apply.c:4359
msgid "remove <num> leading slashes from traditional diff paths"
msgstr "从传统的 diff 路径中移除指定数量的前导斜线"
-#: builtin/apply.c:4322
+#: builtin/apply.c:4362
msgid "ignore additions made by the patch"
msgstr "忽略补丁中的添加的文件"
-#: builtin/apply.c:4324
+#: builtin/apply.c:4364
msgid "instead of applying the patch, output diffstat for the input"
msgstr "不应用补丁,而是显示输入的差异统计(diffstat)"
-#: builtin/apply.c:4328
+#: builtin/apply.c:4368
msgid "show number of added and deleted lines in decimal notation"
msgstr "以十进制数显示添加和删除的行数"
-#: builtin/apply.c:4330
+#: builtin/apply.c:4370
msgid "instead of applying the patch, output a summary for the input"
msgstr "不应用补丁,而是显示输入的概要"
-#: builtin/apply.c:4332
+#: builtin/apply.c:4372
msgid "instead of applying the patch, see if the patch is applicable"
msgstr "不应用补丁,而是查看补丁是否可应用"
-#: builtin/apply.c:4334
+#: builtin/apply.c:4374
msgid "make sure the patch is applicable to the current index"
msgstr "确认补丁可以应用到当前索引"
-#: builtin/apply.c:4336
+#: builtin/apply.c:4376
msgid "apply a patch without touching the working tree"
msgstr "应用补丁而不修改工作区"
-#: builtin/apply.c:4338
+#: builtin/apply.c:4378
msgid "also apply the patch (use with --stat/--summary/--check)"
msgstr "还应用此补丁(与 --stat/--summary/--check 选项同时使用)"
-#: builtin/apply.c:4340
+#: builtin/apply.c:4380
msgid "attempt three-way merge if a patch does not apply"
msgstr "如果一个补丁不能应用则尝试三路合并"
-#: builtin/apply.c:4342
+#: builtin/apply.c:4382
msgid "build a temporary index based on embedded index information"
msgstr "创建一个临时索引基于嵌入的索引信息"
-#: builtin/apply.c:4344 builtin/checkout-index.c:197 builtin/ls-files.c:460
+#: builtin/apply.c:4384 builtin/checkout-index.c:197 builtin/ls-files.c:463
msgid "paths are separated with NUL character"
msgstr "路径以 NUL 字符分隔"
-#: builtin/apply.c:4347
+#: builtin/apply.c:4387
msgid "ensure at least <n> lines of context match"
msgstr "确保至少匹配 <n> 行上下文"
-#: builtin/apply.c:4348
+#: builtin/apply.c:4388
msgid "action"
msgstr "动作"
-#: builtin/apply.c:4349
+#: builtin/apply.c:4389
msgid "detect new or modified lines that have whitespace errors"
msgstr "检查新增和修改的行中间的空白字符滥用"
-#: builtin/apply.c:4352 builtin/apply.c:4355
+#: builtin/apply.c:4392 builtin/apply.c:4395
msgid "ignore changes in whitespace when finding context"
msgstr "查找上下文时忽略空白字符的变更"
-#: builtin/apply.c:4358
+#: builtin/apply.c:4398
msgid "apply the patch in reverse"
msgstr "反向应用补丁"
-#: builtin/apply.c:4360
+#: builtin/apply.c:4400
msgid "don't expect at least one line of context"
msgstr "无需至少一行上下文"
-#: builtin/apply.c:4362
+#: builtin/apply.c:4402
msgid "leave the rejected hunks in corresponding *.rej files"
msgstr "将拒绝的补丁片段保存在对应的 *.rej 文件中"
-#: builtin/apply.c:4364
+#: builtin/apply.c:4404
msgid "allow overlapping hunks"
msgstr "允许重叠的补丁片段"
-#: builtin/apply.c:4367
+#: builtin/apply.c:4407
msgid "tolerate incorrectly detected missing new-line at the end of file"
msgstr "允许不正确的文件末尾换行符"
-#: builtin/apply.c:4370
+#: builtin/apply.c:4410
msgid "do not trust the line counts in the hunk headers"
msgstr "不信任补丁片段的头信息中的行号"
-#: builtin/apply.c:4372
+#: builtin/apply.c:4412
msgid "root"
msgstr "根目录"
-#: builtin/apply.c:4373
+#: builtin/apply.c:4413
msgid "prepend <root> to all filenames"
msgstr "为所有文件名前添加 <根目录>"
-#: builtin/apply.c:4395
+#: builtin/apply.c:4435
msgid "--3way outside a repository"
msgstr "--3way 在一个版本库之外"
-#: builtin/apply.c:4403
+#: builtin/apply.c:4443
msgid "--index outside a repository"
msgstr "--index 在一个版本库之外"
-#: builtin/apply.c:4406
+#: builtin/apply.c:4446
msgid "--cached outside a repository"
msgstr "--cached 在一个版本库之外"
-#: builtin/apply.c:4422
+#: builtin/apply.c:4462
#, c-format
msgid "can't open patch '%s'"
msgstr "不能打开补丁 '%s'"
-#: builtin/apply.c:4436
+#: builtin/apply.c:4476
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
msgstr[0] "抑制下仍有 %d 个空白字符误用"
msgstr[1] "抑制下仍有 %d 个空白字符误用"
-#: builtin/apply.c:4442 builtin/apply.c:4452
+#: builtin/apply.c:4482 builtin/apply.c:4492
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
@@ -2093,95 +2181,95 @@ msgstr "git blame [选项] [版本选项] [版本] [--] 文件"
msgid "[rev-opts] are documented in git-rev-list(1)"
msgstr "[版本选项] 的文档记录在 git-rev-list(1) 中"
-#: builtin/blame.c:2364
+#: builtin/blame.c:2350
msgid "Show blame entries as we find them, incrementally"
msgstr "增量式地显示发现的 blame 条目"
-#: builtin/blame.c:2365
+#: builtin/blame.c:2351
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr "边界提交显示空的 SHA-1(默认:关闭)"
-#: builtin/blame.c:2366
+#: builtin/blame.c:2352
msgid "Do not treat root commits as boundaries (Default: off)"
msgstr "不把根提交作为边界(默认:关闭)"
-#: builtin/blame.c:2367
+#: builtin/blame.c:2353
msgid "Show work cost statistics"
msgstr "显示命令消耗统计"
-#: builtin/blame.c:2368
+#: builtin/blame.c:2354
msgid "Show output score for blame entries"
msgstr "显示判断 blame 条目位移的得分诊断信息"
-#: builtin/blame.c:2369
+#: builtin/blame.c:2355
msgid "Show original filename (Default: auto)"
msgstr "显示原始文件名(默认:自动)"
-#: builtin/blame.c:2370
+#: builtin/blame.c:2356
msgid "Show original linenumber (Default: off)"
msgstr "显示原始的行号(默认:关闭)"
-#: builtin/blame.c:2371
+#: builtin/blame.c:2357
msgid "Show in a format designed for machine consumption"
msgstr "显示为一个适合机器读取的格式"
-#: builtin/blame.c:2372
+#: builtin/blame.c:2358
msgid "Show porcelain format with per-line commit information"
msgstr "为每一行显示机器适用的提交信息"
-#: builtin/blame.c:2373
+#: builtin/blame.c:2359
msgid "Use the same output mode as git-annotate (Default: off)"
msgstr "使用和 git-annotate 相同的输出模式(默认:关闭)"
-#: builtin/blame.c:2374
+#: builtin/blame.c:2360
msgid "Show raw timestamp (Default: off)"
msgstr "显示原始时间戳(默认:关闭)"
-#: builtin/blame.c:2375
+#: builtin/blame.c:2361
msgid "Show long commit SHA1 (Default: off)"
msgstr "显示长的SHA1提交号(默认:关闭)"
-#: builtin/blame.c:2376
+#: builtin/blame.c:2362
msgid "Suppress author name and timestamp (Default: off)"
msgstr "隐藏作者名字和时间戳(默认:关闭)"
-#: builtin/blame.c:2377
+#: builtin/blame.c:2363
msgid "Show author email instead of name (Default: off)"
msgstr "显示作者的邮箱而不是名字(默认:关闭)"
-#: builtin/blame.c:2378
+#: builtin/blame.c:2364
msgid "Ignore whitespace differences"
msgstr "忽略空白差异"
-#: builtin/blame.c:2379
+#: builtin/blame.c:2365
msgid "Spend extra cycles to find better match"
msgstr "花费额外的循环来找到更好的匹配"
-#: builtin/blame.c:2380
+#: builtin/blame.c:2366
msgid "Use revisions from <file> instead of calling git-rev-list"
msgstr "使用来自 <file> 的修订集而不是调用 git-rev-list"
-#: builtin/blame.c:2381
+#: builtin/blame.c:2367
msgid "Use <file>'s contents as the final image"
msgstr "使用 <file> 的内容作为最终的图片"
-#: builtin/blame.c:2382 builtin/blame.c:2383
+#: builtin/blame.c:2368 builtin/blame.c:2369
msgid "score"
msgstr "得分"
-#: builtin/blame.c:2382
+#: builtin/blame.c:2368
msgid "Find line copies within and across files"
msgstr "找到文件内及跨文件的行拷贝"
-#: builtin/blame.c:2383
+#: builtin/blame.c:2369
msgid "Find line movements within and across files"
msgstr "找到文件内及跨文件的行移动"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "n,m"
msgstr "n,m"
-#: builtin/blame.c:2384
+#: builtin/blame.c:2370
msgid "Process only line range n,m, counting from 1"
msgstr "只处理行范围在 n 和 m 之间的,从 1 开始"
@@ -2317,10 +2405,19 @@ msgstr "[%s:领先 %d,落后 %d]"
msgid "[ahead %d, behind %d]"
msgstr "[领先 %d,落后 %d]"
+#: builtin/branch.c:469
+msgid " **** invalid ref ****"
+msgstr " **** 无效引用 ****"
+
#: builtin/branch.c:560
msgid "(no branch)"
msgstr "(非分支)"
+#: builtin/branch.c:593
+#, c-format
+msgid "object '%s' does not point to a commit"
+msgstr "对象 '%s' 没有指向一个提交"
+
#: builtin/branch.c:625
msgid "some refs could not be read"
msgstr "一些引用不能读取"
@@ -2391,8 +2488,8 @@ msgid "act on remote-tracking branches"
msgstr "作用于远程跟踪分支"
#: builtin/branch.c:761 builtin/branch.c:767 builtin/branch.c:788
-#: builtin/branch.c:794 builtin/commit.c:1378 builtin/commit.c:1379
-#: builtin/commit.c:1380 builtin/commit.c:1381 builtin/tag.c:470
+#: builtin/branch.c:794 builtin/commit.c:1366 builtin/commit.c:1367
+#: builtin/commit.c:1368 builtin/commit.c:1369 builtin/tag.c:468
msgid "commit"
msgstr "提交"
@@ -2460,25 +2557,51 @@ msgstr "无法将 HEAD 解析为有效引用。"
msgid "HEAD not found below refs/heads!"
msgstr "HEAD 没有位于 /refs/heads 之下!"
-#: builtin/branch.c:836
+#: builtin/branch.c:839
msgid "--column and --verbose are incompatible"
msgstr "--column 和 --verbose 不兼容"
-#: builtin/branch.c:887
+#: builtin/branch.c:845
+msgid "branch name required"
+msgstr "必须提供分支名"
+
+#: builtin/branch.c:860
+msgid "Cannot give description to detached HEAD"
+msgstr "不能向分离头指针提供描述"
+
+#: builtin/branch.c:865
+msgid "cannot edit description of more than one branch"
+msgstr "不能为一个以上的分支编辑描述"
+
+#: builtin/branch.c:872
+#, c-format
+msgid "No commit on branch '%s' yet."
+msgstr "分支 '%s' 尚无提交。"
+
+#: builtin/branch.c:875
+#, c-format
+msgid "No branch named '%s'."
+msgstr "没有分支 '%s'。"
+
+#: builtin/branch.c:888
+msgid "too many branches for a rename operation"
+msgstr "为重命名操作提供了太多的分支名"
+
+#: builtin/branch.c:893
#, c-format
msgid "branch '%s' does not exist"
msgstr "分支 '%s' 不存在"
-#: builtin/branch.c:899
+#: builtin/branch.c:905
#, c-format
msgid "Branch '%s' has no upstream information"
msgstr "分支 '%s' 没有上游信息"
-#: builtin/branch.c:914
+#: builtin/branch.c:920
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
msgstr "'git branch' 的 -a 和 -r 选项带一个分支名参数没有意义"
-#: builtin/branch.c:917
+#: builtin/branch.c:923
#, c-format
msgid ""
"The --set-upstream flag is deprecated and will be removed. Consider using --"
@@ -2486,7 +2609,7 @@ msgid ""
msgstr ""
"选项 --set-upstream 已弃用并将被移除。考虑使用 --track 或 --set-upstream-to\n"
-#: builtin/branch.c:934
+#: builtin/branch.c:940
#, c-format
msgid ""
"\n"
@@ -2497,12 +2620,12 @@ msgstr ""
"如果你想用 '%s' 跟踪 '%s', 这么做:\n"
"\n"
-#: builtin/branch.c:935
+#: builtin/branch.c:941
#, c-format
msgid " git branch -d %s\n"
msgstr " git branch -d %s\n"
-#: builtin/branch.c:936
+#: builtin/branch.c:942
#, c-format
msgid " git branch --set-upstream-to %s\n"
msgstr " git branch --set-upstream-to %s\n"
@@ -2576,14 +2699,38 @@ msgstr "报告设置在文件上的所有属性"
msgid "use .gitattributes only from the index"
msgstr "只使用索引中的 .gitattributes"
-#: builtin/check-attr.c:21 builtin/hash-object.c:75
+#: builtin/check-attr.c:21 builtin/check-ignore.c:22 builtin/hash-object.c:75
msgid "read file names from stdin"
msgstr "从标准输入读出文件名"
-#: builtin/check-attr.c:23
+#: builtin/check-attr.c:23 builtin/check-ignore.c:24
msgid "input paths are terminated by a null character"
msgstr "输入路径以null字符终止"
+#: builtin/check-ignore.c:18 builtin/checkout.c:1012 builtin/gc.c:177
+msgid "suppress progress reporting"
+msgstr "不显示进度报告"
+
+#: builtin/check-ignore.c:151
+msgid "cannot specify pathnames with --stdin"
+msgstr "不能同时提供路径及 --stdin 参数"
+
+#: builtin/check-ignore.c:154
+msgid "-z only makes sense with --stdin"
+msgstr "-z 需要和 --stdin 参数共用才有意义"
+
+#: builtin/check-ignore.c:156
+msgid "no path specified"
+msgstr "未指定路径"
+
+#: builtin/check-ignore.c:160
+msgid "--quiet is only valid with a single pathname"
+msgstr "参数 --quiet 只在提供一个路径名时有效"
+
+#: builtin/check-ignore.c:162
+msgid "cannot have both --quiet and --verbose"
+msgstr "不能同时提供 --quiet 和 --verbose 参数"
+
#: builtin/checkout-index.c:126
msgid "git checkout-index [options] [--] [<file>...]"
msgstr "git checkout-index [选项] [--] [<文件>...]"
@@ -2816,10 +2963,6 @@ msgstr "'%s' 不能和 '%s' 同时使用"
msgid "Cannot switch branch to a non-commit '%s'"
msgstr "不能切换分支到一个非提交 '%s'"
-#: builtin/checkout.c:1012 builtin/gc.c:177
-msgid "suppress progress reporting"
-msgstr "不显示进度报告"
-
#: builtin/checkout.c:1013 builtin/checkout.c:1015 builtin/clone.c:89
#: builtin/remote.c:169 builtin/remote.c:171
msgid "branch"
@@ -2951,46 +3094,46 @@ msgstr "将忽略版本库 %s\n"
msgid "failed to remove %s"
msgstr "无法删除 %s"
-#: builtin/clean.c:159
+#: builtin/clean.c:160
msgid "do not print names of files removed"
msgstr "不打印删除文件的名称"
-#: builtin/clean.c:161
+#: builtin/clean.c:162
msgid "force"
msgstr "强制"
-#: builtin/clean.c:163
+#: builtin/clean.c:164
msgid "remove whole directories"
msgstr "删除整个目录"
-#: builtin/clean.c:164 builtin/describe.c:413 builtin/grep.c:717
-#: builtin/ls-files.c:491 builtin/name-rev.c:231 builtin/show-ref.c:182
+#: builtin/clean.c:165 builtin/describe.c:413 builtin/grep.c:717
+#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182
msgid "pattern"
msgstr "模式"
-#: builtin/clean.c:165
+#: builtin/clean.c:166
msgid "add <pattern> to ignore rules"
msgstr "添加<模式>到忽略规则"
-#: builtin/clean.c:166
+#: builtin/clean.c:167
msgid "remove ignored files, too"
msgstr "也删除忽略的文件"
-#: builtin/clean.c:168
+#: builtin/clean.c:169
msgid "remove only ignored files"
msgstr "只删除忽略的文件"
-#: builtin/clean.c:186
+#: builtin/clean.c:187
msgid "-x and -X cannot be used together"
msgstr "-x 和 -X 不能同时使用"
-#: builtin/clean.c:190
+#: builtin/clean.c:191
msgid ""
"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
msgstr ""
"clean.requireForce 设置为 true 且未提供 -n 或 -f 选项,拒绝执行清理动作"
-#: builtin/clean.c:193
+#: builtin/clean.c:194
msgid ""
"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
"clean"
@@ -3002,7 +3145,7 @@ msgid "git clone [options] [--] <repo> [<dir>]"
msgstr "git clone [选项] [--] <版本库> [<路径>]"
#: builtin/clone.c:64 builtin/fetch.c:82 builtin/merge.c:212
-#: builtin/push.c:407
+#: builtin/push.c:436
msgid "force progress reporting"
msgstr "强制显示进度报告"
@@ -3115,11 +3258,6 @@ msgstr "%s 存在且不是一个目录"
msgid "failed to stat %s\n"
msgstr "无法枚举 %s 状态\n"
-#: builtin/clone.c:341
-#, c-format
-msgid "failed to unlink '%s'"
-msgstr "无法删除 '%s'"
-
#: builtin/clone.c:346
#, c-format
msgid "failed to create link '%s'"
@@ -3180,7 +3318,7 @@ msgstr "目标路径 '%s' 已经存在,并且不是一个空目录。"
msgid "working tree '%s' already exists."
msgstr "工作区 '%s' 已经存在。"
-#: builtin/clone.c:759 builtin/clone.c:773
+#: builtin/clone.c:759 builtin/clone.c:771
#, c-format
msgid "could not create leading directories of '%s'"
msgstr "不能为 '%s' 创建先导目录"
@@ -3190,27 +3328,27 @@ msgstr "不能为 '%s' 创建先导目录"
msgid "could not create work tree dir '%s'."
msgstr "不能为 '%s' 创建工作区目录。"
-#: builtin/clone.c:783
+#: builtin/clone.c:781
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr "克隆到裸版本库 '%s'...\n"
-#: builtin/clone.c:785
+#: builtin/clone.c:783
#, c-format
msgid "Cloning into '%s'...\n"
msgstr "正克隆到 '%s'...\n"
-#: builtin/clone.c:827
+#: builtin/clone.c:818
#, c-format
msgid "Don't know how to clone %s"
msgstr "不知道如何克隆 %s"
-#: builtin/clone.c:876
+#: builtin/clone.c:867
#, c-format
msgid "Remote branch %s not found in upstream %s"
msgstr "远程分支 %s 在上游 %s 未发现"
-#: builtin/clone.c:883
+#: builtin/clone.c:874
msgid "You appear to have cloned an empty repository."
msgstr "您似乎克隆了一个空版本库。"
@@ -3247,12 +3385,12 @@ msgid "--command must be the first argument"
msgstr "--command 必须是第一个参数"
#: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
-msgstr "git commit [选项] [--] <文件模式>..."
+msgid "git commit [options] [--] <pathspec>..."
+msgstr "git commit [选项] [--] <路径匹配>..."
#: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
-msgstr "git status [选项] [--] <文件模式>..."
+msgid "git status [options] [--] <pathspec>..."
+msgstr "git status [选项] [--] <路径匹配>..."
#: builtin/commit.c:44
msgid ""
@@ -3417,21 +3555,23 @@ msgstr ""
"然后重试。\n"
#: builtin/commit.c:735
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be ignored, and an empty message aborts the commit.\n"
+"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
-"请为您的变更输入提交说明。以 '#' 开始的行将被忽略,而一个空的提交\n"
+"请为您的变更输入提交说明。以 '%c' 开始的行将被忽略,而一个空的提交\n"
"说明将会终止提交。\n"
#: builtin/commit.c:740
+#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
-"with '#' will be kept; you may remove them yourself if you want to.\n"
+"with '%c' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
-"请为您的变更输入提交说明。以 '#' 开始的行将被保留,您可以删除它们\n"
-"如果您想这样做的话。而一个空的提交说明将会终止提交。\n"
+"请为您的变更输入提交说明。以 '%c' 开始的行将被保留,如果您原意\n"
+"也可以删除它们。一个空的提交说明将会终止提交。\n"
# 译者:为保证在输出中对齐,注意调整句中空格!
#: builtin/commit.c:753
@@ -3453,7 +3593,7 @@ msgstr "无法读取索引"
msgid "Error building trees"
msgstr "无法创建树对象"
-#: builtin/commit.c:832 builtin/tag.c:361
+#: builtin/commit.c:832 builtin/tag.c:359
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr "请使用 -m 或 -F 选项提供提交说明。\n"
@@ -3463,326 +3603,326 @@ msgstr "请使用 -m 或 -F 选项提供提交说明。\n"
msgid "No existing author found with '%s'"
msgstr "没有找到匹配 '%s' 的作者"
-#: builtin/commit.c:944 builtin/commit.c:1148
+#: builtin/commit.c:944 builtin/commit.c:1138
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr "无效的未追踪文件参数 '%s'"
-#: builtin/commit.c:984
+#: builtin/commit.c:974
msgid "Using both --reset-author and --author does not make sense"
msgstr "同时使用 --reset-author 和 --author 没有意义"
-#: builtin/commit.c:995
+#: builtin/commit.c:985
msgid "You have nothing to amend."
msgstr "您没有可修补的提交。"
-#: builtin/commit.c:998
+#: builtin/commit.c:988
msgid "You are in the middle of a merge -- cannot amend."
msgstr "您正处于一个合并过程中 -- 无法修补提交。"
-#: builtin/commit.c:1000
+#: builtin/commit.c:990
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr "您正处于一个拣选过程中 -- 无法修补提交。"
-#: builtin/commit.c:1003
+#: builtin/commit.c:993
msgid "Options --squash and --fixup cannot be used together"
msgstr "选项 --squash 和 --fixup 不能同时使用"
-#: builtin/commit.c:1013
+#: builtin/commit.c:1003
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr "只能用一个 -c/-C/-F/--fixup 选项。"
-#: builtin/commit.c:1015
+#: builtin/commit.c:1005
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "选项 -m 不能和 -c/-C/-F/--fixup 同时使用。"
-#: builtin/commit.c:1023
+#: builtin/commit.c:1013
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr "--reset-author 只能和 -C、-c 或 --amend 同时使用。"
-#: builtin/commit.c:1040
+#: builtin/commit.c:1030
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr "只能用一个 --include/--only/--all/--interactive/--patch 选项。"
-#: builtin/commit.c:1042
+#: builtin/commit.c:1032
msgid "No paths with --include/--only does not make sense."
msgstr "参数 --include/--only 不跟路径没有意义。"
-#: builtin/commit.c:1044
+#: builtin/commit.c:1034
msgid "Clever... amending the last one with dirty index."
msgstr "聪明... 在索引不干净下修补最后的提交。"
-#: builtin/commit.c:1046
+#: builtin/commit.c:1036
msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
msgstr "指定了明确的路径而没有使用 -i 或 -o 选项;认为是 --only paths..."
-#: builtin/commit.c:1056 builtin/tag.c:577
+#: builtin/commit.c:1046 builtin/tag.c:575
#, c-format
msgid "Invalid cleanup mode %s"
msgstr "无效的清理模式 %s"
-#: builtin/commit.c:1061
+#: builtin/commit.c:1051
msgid "Paths with -a does not make sense."
msgstr "路径和 -a 选项同时使用没有意义。"
-#: builtin/commit.c:1067 builtin/commit.c:1202
+#: builtin/commit.c:1057 builtin/commit.c:1192
msgid "--long and -z are incompatible"
msgstr "--long 和 -z 选项不兼容"
-#: builtin/commit.c:1162 builtin/commit.c:1400
+#: builtin/commit.c:1152 builtin/commit.c:1388
msgid "show status concisely"
msgstr "以简洁的格式显示状态"
-#: builtin/commit.c:1164 builtin/commit.c:1402
+#: builtin/commit.c:1154 builtin/commit.c:1390
msgid "show branch information"
msgstr "显示分支信息"
-#: builtin/commit.c:1166 builtin/commit.c:1404 builtin/push.c:397
+#: builtin/commit.c:1156 builtin/commit.c:1392 builtin/push.c:426
msgid "machine-readable output"
msgstr "机器可读的输出"
-#: builtin/commit.c:1169 builtin/commit.c:1406
+#: builtin/commit.c:1159 builtin/commit.c:1394
msgid "show status in long format (default)"
msgstr "以长格式显示状态(默认)"
-#: builtin/commit.c:1172 builtin/commit.c:1409
+#: builtin/commit.c:1162 builtin/commit.c:1397
msgid "terminate entries with NUL"
msgstr "条目以NUL字符结尾"
-#: builtin/commit.c:1174 builtin/commit.c:1412 builtin/fast-export.c:647
-#: builtin/fast-export.c:650 builtin/tag.c:461
+#: builtin/commit.c:1164 builtin/commit.c:1400 builtin/fast-export.c:647
+#: builtin/fast-export.c:650 builtin/tag.c:459
msgid "mode"
msgstr "模式"
-#: builtin/commit.c:1175 builtin/commit.c:1412
+#: builtin/commit.c:1165 builtin/commit.c:1400
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr "显示未跟踪的文件,“模式”的可选参数:all、normal、no。(默认:all)"
-#: builtin/commit.c:1178
+#: builtin/commit.c:1168
msgid "show ignored files"
msgstr "显示忽略的文件"
-#: builtin/commit.c:1179 parse-options.h:151
+#: builtin/commit.c:1169 parse-options.h:151
msgid "when"
msgstr "何时"
-#: builtin/commit.c:1180
+#: builtin/commit.c:1170
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
msgstr ""
"忽略子模组的更改,“何时”的可选参数:all、dirty、untracked。(默认:all)"
-#: builtin/commit.c:1182
+#: builtin/commit.c:1172
msgid "list untracked files in columns"
msgstr "以列的方式显示未跟踪的文件"
-#: builtin/commit.c:1256
+#: builtin/commit.c:1246
msgid "couldn't look up newly created commit"
msgstr "无法找到新创建的提交"
-#: builtin/commit.c:1258
+#: builtin/commit.c:1248
msgid "could not parse newly created commit"
msgstr "不能解析新创建的提交"
-#: builtin/commit.c:1299
+#: builtin/commit.c:1289
msgid "detached HEAD"
msgstr "分离头指针"
# 译者:中文字符串拼接,可删除前导空格
-#: builtin/commit.c:1301
+#: builtin/commit.c:1291
msgid " (root-commit)"
msgstr "(根提交)"
-#: builtin/commit.c:1370
+#: builtin/commit.c:1358
msgid "suppress summary after successful commit"
msgstr "提交成功后不显示概述信息"
-#: builtin/commit.c:1371
+#: builtin/commit.c:1359
msgid "show diff in commit message template"
msgstr "在提交说明模板里显示差异"
-#: builtin/commit.c:1373
+#: builtin/commit.c:1361
msgid "Commit message options"
msgstr "提交说明选项"
-#: builtin/commit.c:1374 builtin/tag.c:459
+#: builtin/commit.c:1362 builtin/tag.c:457
msgid "read message from file"
msgstr "从文件中读取提交说明"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "author"
msgstr "作者"
-#: builtin/commit.c:1375
+#: builtin/commit.c:1363
msgid "override author for commit"
msgstr "提交时覆盖作者"
-#: builtin/commit.c:1376 builtin/gc.c:178
+#: builtin/commit.c:1364 builtin/gc.c:178
msgid "date"
msgstr "日期"
-#: builtin/commit.c:1376
+#: builtin/commit.c:1364
msgid "override date for commit"
msgstr "提交时覆盖日期"
-#: builtin/commit.c:1377 builtin/merge.c:206 builtin/notes.c:537
-#: builtin/notes.c:694 builtin/tag.c:457
+#: builtin/commit.c:1365 builtin/merge.c:206 builtin/notes.c:533
+#: builtin/notes.c:690 builtin/tag.c:455
msgid "message"
msgstr "说明"
-#: builtin/commit.c:1377
+#: builtin/commit.c:1365
msgid "commit message"
msgstr "提交说明"
-#: builtin/commit.c:1378
+#: builtin/commit.c:1366
msgid "reuse and edit message from specified commit"
msgstr "重用并编辑指定提交的提交说明"
-#: builtin/commit.c:1379
+#: builtin/commit.c:1367
msgid "reuse message from specified commit"
msgstr "重用指定提交的提交说明"
-#: builtin/commit.c:1380
+#: builtin/commit.c:1368
msgid "use autosquash formatted message to fixup specified commit"
msgstr "使用 autosquash 格式的提交说明用以修正指定的提交"
-#: builtin/commit.c:1381
+#: builtin/commit.c:1369
msgid "use autosquash formatted message to squash specified commit"
msgstr "使用 autosquash 格式的提交说明用以压缩至指定的提交"
-#: builtin/commit.c:1382
+#: builtin/commit.c:1370
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr "现在将该提交的作者改为我(和 -C/-c/--amend 参数共用)"
-#: builtin/commit.c:1383 builtin/log.c:1102 builtin/revert.c:109
+#: builtin/commit.c:1371 builtin/log.c:1102 builtin/revert.c:109
msgid "add Signed-off-by:"
msgstr "添加 Signed-off-by: 签名"
-#: builtin/commit.c:1384
+#: builtin/commit.c:1372
msgid "use specified template file"
msgstr "使用指定的模板文件"
-#: builtin/commit.c:1385
+#: builtin/commit.c:1373
msgid "force edit of commit"
msgstr "强制编辑提交"
# 译者:可选值,不能翻译(或是原文中笔误,应为 mode)
-#: builtin/commit.c:1386
+#: builtin/commit.c:1374
msgid "default"
msgstr "default"
-#: builtin/commit.c:1386 builtin/tag.c:462
+#: builtin/commit.c:1374 builtin/tag.c:460
msgid "how to strip spaces and #comments from message"
msgstr "设置如何删除提交说明里的空格和#注释"
-#: builtin/commit.c:1387
+#: builtin/commit.c:1375
msgid "include status in commit message template"
msgstr "在提交说明模板里包含状态信息"
-#: builtin/commit.c:1388 builtin/merge.c:213 builtin/tag.c:463
+#: builtin/commit.c:1376 builtin/merge.c:213 builtin/tag.c:461
msgid "key id"
msgstr "key id"
-#: builtin/commit.c:1389 builtin/merge.c:214
+#: builtin/commit.c:1377 builtin/merge.c:214
msgid "GPG sign commit"
msgstr "GPG 提交签名"
#. end commit message options
-#: builtin/commit.c:1392
+#: builtin/commit.c:1380
msgid "Commit contents options"
msgstr "提交内容选项"
-#: builtin/commit.c:1393
+#: builtin/commit.c:1381
msgid "commit all changed files"
msgstr "提交所有改动的文件"
-#: builtin/commit.c:1394
+#: builtin/commit.c:1382
msgid "add specified files to index for commit"
msgstr "添加指定的文件到索引区等待提交"
-#: builtin/commit.c:1395
+#: builtin/commit.c:1383
msgid "interactively add files"
msgstr "交互式添加文件"
-#: builtin/commit.c:1396
+#: builtin/commit.c:1384
msgid "interactively add changes"
msgstr "交互式添加变更"
-#: builtin/commit.c:1397
+#: builtin/commit.c:1385
msgid "commit only specified files"
msgstr "只提交指定的文件"
-#: builtin/commit.c:1398
+#: builtin/commit.c:1386
msgid "bypass pre-commit hook"
msgstr "绕过 pre-commit 钩子"
-#: builtin/commit.c:1399
+#: builtin/commit.c:1387
msgid "show what would be committed"
msgstr "显示将要提交的内容"
-#: builtin/commit.c:1410
+#: builtin/commit.c:1398
msgid "amend previous commit"
msgstr "修改先前的提交"
-#: builtin/commit.c:1411
+#: builtin/commit.c:1399
msgid "bypass post-rewrite hook"
msgstr "绕过 post-rewrite 钩子"
-#: builtin/commit.c:1416
+#: builtin/commit.c:1404
msgid "ok to record an empty change"
msgstr "允许一个空提交"
-#: builtin/commit.c:1419
+#: builtin/commit.c:1407
msgid "ok to record a change with an empty message"
msgstr "允许空的提交说明"
-#: builtin/commit.c:1451
+#: builtin/commit.c:1439
msgid "could not parse HEAD commit"
msgstr "不能解析 HEAD 提交"
-#: builtin/commit.c:1489 builtin/merge.c:508
+#: builtin/commit.c:1477 builtin/merge.c:508
#, c-format
msgid "could not open '%s' for reading"
msgstr "不能为读入打开 '%s'"
-#: builtin/commit.c:1496
+#: builtin/commit.c:1484
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "损坏的 MERGE_HEAD 文件(%s)"
-#: builtin/commit.c:1503
+#: builtin/commit.c:1491
msgid "could not read MERGE_MODE"
msgstr "不能读取 MERGE_MODE"
-#: builtin/commit.c:1522
+#: builtin/commit.c:1510
#, c-format
msgid "could not read commit message: %s"
msgstr "不能读取提交说明:%s"
-#: builtin/commit.c:1536
+#: builtin/commit.c:1524
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr "终止提交;您未更改来自模版的提交说明。\n"
-#: builtin/commit.c:1541
+#: builtin/commit.c:1529
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr "终止提交因为提交说明为空。\n"
-#: builtin/commit.c:1556 builtin/merge.c:833 builtin/merge.c:858
+#: builtin/commit.c:1544 builtin/merge.c:832 builtin/merge.c:857
msgid "failed to write commit object"
msgstr "无法写提交对象"
-#: builtin/commit.c:1577
+#: builtin/commit.c:1565
msgid "cannot lock HEAD ref"
msgstr "无法锁定 HEAD 引用"
-#: builtin/commit.c:1581
+#: builtin/commit.c:1569
msgid "cannot update HEAD ref"
msgstr "无法更新 HEAD 引用"
-#: builtin/commit.c:1592
+#: builtin/commit.c:1580
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
@@ -4190,89 +4330,93 @@ msgstr "允许更新 HEAD 引用"
msgid "deepen history of shallow clone"
msgstr "深化浅克隆的历史"
-#: builtin/fetch.c:85 builtin/log.c:1119
+#: builtin/fetch.c:86
+msgid "convert to a complete repository"
+msgstr "转换为一个完整的版本库"
+
+#: builtin/fetch.c:88 builtin/log.c:1119
msgid "dir"
msgstr "目录"
-#: builtin/fetch.c:86
+#: builtin/fetch.c:89
msgid "prepend this to submodule path output"
msgstr "在子模组路径输出的前面加上此目录"
-#: builtin/fetch.c:89
+#: builtin/fetch.c:92
msgid "default mode for recursion"
msgstr "递归的默认模式"
-#: builtin/fetch.c:201
+#: builtin/fetch.c:204
msgid "Couldn't find remote ref HEAD"
msgstr "无法发现远程 HEAD 引用"
-#: builtin/fetch.c:254
+#: builtin/fetch.c:257
#, c-format
msgid "object %s not found"
msgstr "对象 %s 未发现"
-#: builtin/fetch.c:259
+#: builtin/fetch.c:262
msgid "[up to date]"
msgstr "[最新]"
-#: builtin/fetch.c:273
+#: builtin/fetch.c:276
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
msgstr "! %-*s %-*s -> %s (在当前分支下不能获取)"
-#: builtin/fetch.c:274 builtin/fetch.c:360
+#: builtin/fetch.c:277 builtin/fetch.c:363
msgid "[rejected]"
msgstr "[已拒绝]"
-#: builtin/fetch.c:285
+#: builtin/fetch.c:288
msgid "[tag update]"
msgstr "[tag更新]"
# 译者:注意保持前导空格
-#: builtin/fetch.c:287 builtin/fetch.c:322 builtin/fetch.c:340
+#: builtin/fetch.c:290 builtin/fetch.c:325 builtin/fetch.c:343
msgid " (unable to update local ref)"
msgstr " (不能更新本地引用)"
-#: builtin/fetch.c:305
+#: builtin/fetch.c:308
msgid "[new tag]"
msgstr "[新tag]"
-#: builtin/fetch.c:308
+#: builtin/fetch.c:311
msgid "[new branch]"
msgstr "[新分支]"
-#: builtin/fetch.c:311
+#: builtin/fetch.c:314
msgid "[new ref]"
msgstr "[新引用]"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "unable to update local ref"
msgstr "不能更新本地引用"
-#: builtin/fetch.c:356
+#: builtin/fetch.c:359
msgid "forced update"
msgstr "强制更新"
-#: builtin/fetch.c:362
+#: builtin/fetch.c:365
msgid "(non-fast-forward)"
msgstr "(非快进式)"
-#: builtin/fetch.c:393 builtin/fetch.c:685
+#: builtin/fetch.c:396 builtin/fetch.c:688
#, c-format
msgid "cannot open %s: %s\n"
msgstr "无法打开 %s:%s\n"
-#: builtin/fetch.c:402
+#: builtin/fetch.c:405
#, c-format
msgid "%s did not send all necessary objects\n"
msgstr "%s 未发送所有必须的对象\n"
-#: builtin/fetch.c:488
+#: builtin/fetch.c:491
#, c-format
msgid "From %.*s\n"
msgstr "来自 %.*s\n"
-#: builtin/fetch.c:499
+#: builtin/fetch.c:502
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
@@ -4282,79 +4426,87 @@ msgstr ""
" 'git remote prune %s' 来删除旧的、有冲突的分支"
# 译者:注意保持前导空格
-#: builtin/fetch.c:549
+#: builtin/fetch.c:552
#, c-format
msgid " (%s will become dangling)"
msgstr " (%s 将成为摇摆状态)"
# 译者:注意保持前导空格
-#: builtin/fetch.c:550
+#: builtin/fetch.c:553
#, c-format
msgid " (%s has become dangling)"
msgstr " (%s 已成为摇摆状态)"
-#: builtin/fetch.c:557
+#: builtin/fetch.c:560
msgid "[deleted]"
msgstr "[已删除]"
-#: builtin/fetch.c:558 builtin/remote.c:1055
+#: builtin/fetch.c:561 builtin/remote.c:1055
msgid "(none)"
msgstr "(无)"
-#: builtin/fetch.c:675
+#: builtin/fetch.c:678
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
msgstr "拒绝获取到非裸版本库的当前分支 %s"
-#: builtin/fetch.c:709
+#: builtin/fetch.c:712
#, c-format
msgid "Don't know how to fetch from %s"
msgstr "不知道如何从 %s 获取"
-#: builtin/fetch.c:786
+#: builtin/fetch.c:789
#, c-format
msgid "Option \"%s\" value \"%s\" is not valid for %s"
msgstr "选项 \"%s\" 的值 \"%s\" 对于 %s 是无效的"
-#: builtin/fetch.c:789
+#: builtin/fetch.c:792
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
msgstr "选项 \"%s\" 为 %s 所忽略\n"
-#: builtin/fetch.c:891
+#: builtin/fetch.c:894
#, c-format
msgid "Fetching %s\n"
msgstr "正在获取 %s\n"
-#: builtin/fetch.c:893 builtin/remote.c:100
+#: builtin/fetch.c:896 builtin/remote.c:100
#, c-format
msgid "Could not fetch %s"
msgstr "不能获取 %s"
-#: builtin/fetch.c:912
+#: builtin/fetch.c:915
msgid ""
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
msgstr "未指定远程版本库。请通过一个URL或远程版本库名指定,用以获取新提交。"
-#: builtin/fetch.c:932
+#: builtin/fetch.c:935
msgid "You need to specify a tag name."
msgstr "您需要指定一个 tag 名称。"
-#: builtin/fetch.c:984
+#: builtin/fetch.c:981
+msgid "--depth and --unshallow cannot be used together"
+msgstr "--depth 和 --unshallow 不能同时使用"
+
+#: builtin/fetch.c:983
+msgid "--unshallow on a complete repository does not make sense"
+msgstr "对于一个完整的版本库,参数 --unshallow 没有意义"
+
+#: builtin/fetch.c:1002
msgid "fetch --all does not take a repository argument"
msgstr "fetch --all 不能带一个版本库参数"
-#: builtin/fetch.c:986
+#: builtin/fetch.c:1004
msgid "fetch --all does not make sense with refspecs"
msgstr "fetch --all 带引用表达式没有任何意义"
-#: builtin/fetch.c:997
+#: builtin/fetch.c:1015
#, c-format
msgid "No such remote or remote group: %s"
msgstr "没有这样的远程或远程组:%s"
-#: builtin/fetch.c:1005
+#: builtin/fetch.c:1023
msgid "Fetching a group and specifying refspecs does not make sense"
msgstr "获取组并指定引用表达式没有意义"
@@ -4365,7 +4517,7 @@ msgstr ""
#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701
#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175
-#: builtin/tag.c:448 parse-options.h:133 parse-options.h:239
+#: builtin/tag.c:446 parse-options.h:133 parse-options.h:239
msgid "n"
msgstr "n"
@@ -4725,23 +4877,23 @@ msgstr "未提供模式匹配。"
msgid "bad object %s"
msgstr "坏对象 %s"
-#: builtin/grep.c:866
+#: builtin/grep.c:868
msgid "--open-files-in-pager only works on the worktree"
msgstr "--open-files-in-pager 仅用于工作区"
-#: builtin/grep.c:889
+#: builtin/grep.c:891
msgid "--cached or --untracked cannot be used with --no-index."
msgstr "--cached 或 --untracked 不能与 --no-index 同时使用。"
-#: builtin/grep.c:894
+#: builtin/grep.c:896
msgid "--no-index or --untracked cannot be used with revs."
msgstr "--no-index 或 --untracked 不能和版本同时使用。"
-#: builtin/grep.c:897
+#: builtin/grep.c:899
msgid "--[no-]exclude-standard cannot be used for tracked contents."
msgstr "--[no-]exclude-standard 不能用于已跟踪内容。"
-#: builtin/grep.c:905
+#: builtin/grep.c:907
msgid "both --cached and trees are given."
msgstr "同时给出了 --cached 和树对象。"
@@ -4781,50 +4933,50 @@ msgstr "原样存储文件不使用过滤器"
msgid "process file as it were from this path"
msgstr "处理文件并假设其来自于此路径"
-#: builtin/help.c:43
+#: builtin/help.c:42
msgid "print all available commands"
msgstr "打印所有可用的命令"
-#: builtin/help.c:44
+#: builtin/help.c:43
msgid "show man page"
msgstr "显示 man 手册"
-#: builtin/help.c:45
+#: builtin/help.c:44
msgid "show manual in web browser"
msgstr "在 web 浏览器中显示手册"
-#: builtin/help.c:47
+#: builtin/help.c:46
msgid "show info page"
msgstr "显示 info 手册"
-#: builtin/help.c:53
+#: builtin/help.c:52
msgid "git help [--all] [--man|--web|--info] [command]"
msgstr "git help [--all] [--man|--web|--info] [命令]"
-#: builtin/help.c:65
+#: builtin/help.c:64
#, c-format
msgid "unrecognized help format '%s'"
msgstr "未能识别的帮助格式 '%s'"
-#: builtin/help.c:93
+#: builtin/help.c:92
msgid "Failed to start emacsclient."
msgstr "无法启动 emacsclient。"
-#: builtin/help.c:106
+#: builtin/help.c:105
msgid "Failed to parse emacsclient version."
msgstr "无法解析 emacsclient 版本。"
-#: builtin/help.c:114
+#: builtin/help.c:113
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
msgstr "emacsclient 版本 '%d' 太老(< 22)。"
-#: builtin/help.c:132 builtin/help.c:160 builtin/help.c:169 builtin/help.c:177
+#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176
#, c-format
msgid "failed to exec '%s': %s"
msgstr "无法执行 '%s':%s"
-#: builtin/help.c:217
+#: builtin/help.c:216
#, c-format
msgid ""
"'%s': path for unsupported man viewer.\n"
@@ -4833,7 +4985,7 @@ msgstr ""
"'%s':不支持的 man 手册查看器的路径。\n"
"请使用 'man.<tool>.cmd'。"
-#: builtin/help.c:229
+#: builtin/help.c:228
#, c-format
msgid ""
"'%s': cmd for supported man viewer.\n"
@@ -4842,29 +4994,25 @@ msgstr ""
"'%s': 支持的 man 手册查看器命令。\n"
"请使用 'man.<tool>.path'。"
-#: builtin/help.c:299
-msgid "The most commonly used git commands are:"
-msgstr "最常用的 git 命令有:"
-
-#: builtin/help.c:367
+#: builtin/help.c:349
#, c-format
msgid "'%s': unknown man viewer."
msgstr "'%s':未知的 man 查看器。"
-#: builtin/help.c:384
+#: builtin/help.c:366
msgid "no man viewer handled the request"
msgstr "没有 man 查看器处理此请求"
-#: builtin/help.c:392
+#: builtin/help.c:374
msgid "no info viewer handled the request"
msgstr "没有 info 查看器处理此请求"
-#: builtin/help.c:447 builtin/help.c:454
+#: builtin/help.c:429 builtin/help.c:436
#, c-format
msgid "usage: %s%s"
msgstr "用法:%s%s"
-#: builtin/help.c:470
+#: builtin/help.c:452
#, c-format
msgid "`git %s' is aliased to `%s'"
msgstr "`git %s' 是 `%s' 的别名"
@@ -5265,8 +5413,8 @@ msgstr "无法获知当前路径"
#: builtin/init-db.c:467
msgid ""
-"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared"
-"[=<permissions>]] [directory]"
+"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--"
+"shared[=<permissions>]] [directory]"
msgstr ""
"git init [-q | --quiet] [--bare] [--template=<模板目录>] [--shared[=<权限>]] "
"[目录]"
@@ -5561,95 +5709,95 @@ msgstr "不能找到跟踪的远程分支,请手工指定 <upstream>。\n"
msgid "Unknown commit %s"
msgstr "未知提交 %s"
-#: builtin/ls-files.c:408
+#: builtin/ls-files.c:409
msgid "git ls-files [options] [<file>...]"
msgstr "git ls-files [选项] [<文件>...]"
-#: builtin/ls-files.c:463
+#: builtin/ls-files.c:466
msgid "identify the file status with tags"
msgstr "用标签标识文件的状态"
-#: builtin/ls-files.c:465
+#: builtin/ls-files.c:468
msgid "use lowercase letters for 'assume unchanged' files"
msgstr "使用小写字母表示 '假设未改变的' 文件"
-#: builtin/ls-files.c:467
+#: builtin/ls-files.c:470
msgid "show cached files in the output (default)"
msgstr "显示缓存的文件(默认)"
-#: builtin/ls-files.c:469
+#: builtin/ls-files.c:472
msgid "show deleted files in the output"
msgstr "显示已删除的文件"
-#: builtin/ls-files.c:471
+#: builtin/ls-files.c:474
msgid "show modified files in the output"
msgstr "显示已修改的文件"
-#: builtin/ls-files.c:473
+#: builtin/ls-files.c:476
msgid "show other files in the output"
msgstr "显示其它文件"
-#: builtin/ls-files.c:475
+#: builtin/ls-files.c:478
msgid "show ignored files in the output"
msgstr "显示忽略的文件"
-#: builtin/ls-files.c:478
+#: builtin/ls-files.c:481
msgid "show staged contents' object name in the output"
msgstr "显示暂存区内容的对象名称"
-#: builtin/ls-files.c:480
+#: builtin/ls-files.c:483
msgid "show files on the filesystem that need to be removed"
msgstr "显示文件系统需要删除的文件"
-#: builtin/ls-files.c:482
+#: builtin/ls-files.c:485
msgid "show 'other' directories' name only"
msgstr "只显示“其他”目录的名称"
-#: builtin/ls-files.c:485
+#: builtin/ls-files.c:488
msgid "don't show empty directories"
msgstr "不显示空目录"
-#: builtin/ls-files.c:488
+#: builtin/ls-files.c:491
msgid "show unmerged files in the output"
msgstr "显示未合并的文件"
-#: builtin/ls-files.c:490
+#: builtin/ls-files.c:493
msgid "show resolve-undo information"
msgstr "显示 resolve-undo 信息"
-#: builtin/ls-files.c:492
+#: builtin/ls-files.c:495
msgid "skip files matching pattern"
msgstr "匹配排除文件的模式"
-#: builtin/ls-files.c:495
+#: builtin/ls-files.c:498
msgid "exclude patterns are read from <file>"
msgstr "从 <文件> 中读取排除模式"
-#: builtin/ls-files.c:498
+#: builtin/ls-files.c:501
msgid "read additional per-directory exclude patterns in <file>"
msgstr "从 <文件> 读取额外的每个目录的排除模式"
-#: builtin/ls-files.c:500
+#: builtin/ls-files.c:503
msgid "add the standard git exclusions"
msgstr "添加标准的 git 排除"
-#: builtin/ls-files.c:503
+#: builtin/ls-files.c:506
msgid "make the output relative to the project top directory"
msgstr "显示相对于顶级目录的文件名"
-#: builtin/ls-files.c:506
+#: builtin/ls-files.c:509
msgid "if any <file> is not in the index, treat this as an error"
msgstr "如果任何 <文件> 都不在索引区,视为错误"
-#: builtin/ls-files.c:507
+#: builtin/ls-files.c:510
msgid "tree-ish"
msgstr "树或提交"
-#: builtin/ls-files.c:508
+#: builtin/ls-files.c:511
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr "假装自从 <树或提交> 之后删除的路径仍然存在"
-#: builtin/ls-files.c:510
+#: builtin/ls-files.c:513
msgid "show debugging data"
msgstr "显示调试数据"
@@ -5756,7 +5904,7 @@ msgstr "允许快进(默认)"
msgid "abort if fast-forward is not possible"
msgstr "如果不能快进就放弃合并"
-#: builtin/merge.c:202 builtin/notes.c:870 builtin/revert.c:112
+#: builtin/merge.c:202 builtin/notes.c:866 builtin/revert.c:112
msgid "strategy"
msgstr "策略"
@@ -5859,64 +6007,65 @@ msgid "Not committing merge; use 'git commit' to complete the merge.\n"
msgstr "未提交合并,使用 'git commit' 完成此次合并。\n"
#: builtin/merge.c:788
+#, c-format
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"
-"Lines starting with '#' will be ignored, and an empty message aborts\n"
+"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
"请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支\n"
"合并到主题分支。\n"
"\n"
-"以 '#' 开头的行将被忽略,而且空提交说明将会终止提交。\n"
+"以 '%c' 开头的行将被忽略,而且空提交说明将会终止提交。\n"
-#: builtin/merge.c:813
+#: builtin/merge.c:812
msgid "Empty commit message."
msgstr "空提交信息。"
-#: builtin/merge.c:825
+#: builtin/merge.c:824
#, c-format
msgid "Wonderful.\n"
msgstr "太棒了。\n"
-#: builtin/merge.c:890
+#: builtin/merge.c:889
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr "自动合并失败,修正冲突然后提交修正的结果。\n"
-#: builtin/merge.c:906
+#: builtin/merge.c:905
#, c-format
msgid "'%s' is not a commit"
msgstr "'%s' 不是一个提交"
-#: builtin/merge.c:947
+#: builtin/merge.c:946
msgid "No current branch."
msgstr "没有当前分支。"
-#: builtin/merge.c:949
+#: builtin/merge.c:948
msgid "No remote for the current branch."
msgstr "当前分支没有对应的远程版本库。"
-#: builtin/merge.c:951
+#: builtin/merge.c:950
msgid "No default upstream defined for the current branch."
msgstr "当前分支没有定义默认的上游分支。"
-#: builtin/merge.c:956
+#: builtin/merge.c:955
#, c-format
msgid "No remote tracking branch for %s from %s"
msgstr "%s 没有来自 %s 的远程跟踪分支"
-#: builtin/merge.c:1043 builtin/merge.c:1200
+#: builtin/merge.c:1042 builtin/merge.c:1199
#, c-format
msgid "%s - not something we can merge"
msgstr "%s - 不能被合并"
-#: builtin/merge.c:1111
+#: builtin/merge.c:1110
msgid "There is no merge to abort (MERGE_HEAD missing)."
msgstr "没有要终止的合并(MERGE_HEAD 丢失)。"
-#: builtin/merge.c:1127 git-pull.sh:31
+#: builtin/merge.c:1126 git-pull.sh:31
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -5924,11 +6073,11 @@ msgstr ""
"您尚未结束您的合并(存在 MERGE_HEAD)。\n"
"请在合并前先提交您的修改。"
-#: builtin/merge.c:1130 git-pull.sh:34
+#: builtin/merge.c:1129 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
msgstr "您尚未结束您的合并(存在 MERGE_HEAD)。"
-#: builtin/merge.c:1134
+#: builtin/merge.c:1133
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you can merge."
@@ -5936,79 +6085,79 @@ msgstr ""
"您尚未结束您的拣选(存在 CHERRY_PICK_HEAD)。\n"
"请在合并前先提交您的修改。"
-#: builtin/merge.c:1137
+#: builtin/merge.c:1136
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
msgstr "您尚未结束您的拣选(存在 CHERRY_PICK_HEAD)。"
-#: builtin/merge.c:1146
+#: builtin/merge.c:1145
msgid "You cannot combine --squash with --no-ff."
msgstr "您不能将 --squash 与 --no-ff 同时使用。"
-#: builtin/merge.c:1151
+#: builtin/merge.c:1150
msgid "You cannot combine --no-ff with --ff-only."
msgstr "您不能将 --no-ff 与 --ff-only 同时使用。"
-#: builtin/merge.c:1158
+#: builtin/merge.c:1157
msgid "No commit specified and merge.defaultToUpstream not set."
msgstr "未指定提交并且 merge.defaultToUpstream 未设置。"
-#: builtin/merge.c:1190
+#: builtin/merge.c:1189
msgid "Can merge only exactly one commit into empty head"
msgstr "只能将一个提交合并到空分支上"
-#: builtin/merge.c:1193
+#: builtin/merge.c:1192
msgid "Squash commit into empty head not supported yet"
msgstr "尚不支持到空分支的压缩提交"
-#: builtin/merge.c:1195
+#: builtin/merge.c:1194
msgid "Non-fast-forward commit does not make sense into an empty head"
msgstr "到空分支的非快进式提交没有意义"
-#: builtin/merge.c:1311
+#: builtin/merge.c:1310
#, c-format
msgid "Updating %s..%s\n"
msgstr "更新 %s..%s\n"
-#: builtin/merge.c:1350
+#: builtin/merge.c:1349
#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr "尝试非常小的索引内合并...\n"
-#: builtin/merge.c:1357
+#: builtin/merge.c:1356
#, c-format
msgid "Nope.\n"
msgstr "无。\n"
-#: builtin/merge.c:1389
+#: builtin/merge.c:1388
msgid "Not possible to fast-forward, aborting."
msgstr "无法快进,终止。"
-#: builtin/merge.c:1412 builtin/merge.c:1491
+#: builtin/merge.c:1411 builtin/merge.c:1490
#, c-format
msgid "Rewinding the tree to pristine...\n"
msgstr "将树回滚至原始状态...\n"
-#: builtin/merge.c:1416
+#: builtin/merge.c:1415
#, c-format
msgid "Trying merge strategy %s...\n"
msgstr "尝试合并策略 %s...\n"
-#: builtin/merge.c:1482
+#: builtin/merge.c:1481
#, c-format
msgid "No merge strategy handled the merge.\n"
msgstr "没有合并策略处理此合并。\n"
-#: builtin/merge.c:1484
+#: builtin/merge.c:1483
#, c-format
msgid "Merge with strategy %s failed.\n"
msgstr "使用策略 %s 合并失败。\n"
-#: builtin/merge.c:1493
+#: builtin/merge.c:1492
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr "使用 %s 以准备手工解决。\n"
-#: builtin/merge.c:1505
+#: builtin/merge.c:1504
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr "自动合并进展顺利,按要求在提交前停止\n"
@@ -6319,175 +6468,170 @@ msgstr "git notes prune [<选项>]"
msgid "git notes get-ref"
msgstr "git notes get-ref"
-#: builtin/notes.c:142
+#: builtin/notes.c:139
#, c-format
msgid "unable to start 'show' for object '%s'"
msgstr "不能为对象 '%s' 开始 'show'"
-#: builtin/notes.c:148
-msgid "can't fdopen 'show' output fd"
-msgstr "不能打开 'show' 输出文件句柄"
-
-#: builtin/notes.c:158
-#, c-format
-msgid "failed to close pipe to 'show' for object '%s'"
-msgstr "无法为对象 '%s' 的 'show' 关闭管道"
+#: builtin/notes.c:143
+msgid "could not read 'show' output"
+msgstr "不能读取 'show' 的输出"
-#: builtin/notes.c:161
+#: builtin/notes.c:151
#, c-format
msgid "failed to finish 'show' for object '%s'"
msgstr "无法为对象 '%s' 完成 'show'"
-#: builtin/notes.c:178 builtin/tag.c:347
+#: builtin/notes.c:169 builtin/tag.c:341
#, c-format
msgid "could not create file '%s'"
msgstr "不能创建文件 '%s'"
-#: builtin/notes.c:192
+#: builtin/notes.c:188
msgid "Please supply the note contents using either -m or -F option"
msgstr "请通过 -m 或 -F 选项为注解提供内容"
-#: builtin/notes.c:213 builtin/notes.c:976
+#: builtin/notes.c:209 builtin/notes.c:972
#, c-format
msgid "Removing note for object %s\n"
msgstr "删除对象 %s 的注解\n"
-#: builtin/notes.c:218
+#: builtin/notes.c:214
msgid "unable to write note object"
msgstr "不能写注解对象"
-#: builtin/notes.c:220
+#: builtin/notes.c:216
#, c-format
msgid "The note contents has been left in %s"
msgstr "注解内容被留在文件 %s 中"
-#: builtin/notes.c:254 builtin/tag.c:542
+#: builtin/notes.c:250 builtin/tag.c:540
#, c-format
msgid "cannot read '%s'"
msgstr "不能读取 '%s'"
-#: builtin/notes.c:256 builtin/tag.c:545
+#: builtin/notes.c:252 builtin/tag.c:543
#, c-format
msgid "could not open or read '%s'"
msgstr "不能打开或读取 '%s'"
-#: builtin/notes.c:275 builtin/notes.c:448 builtin/notes.c:450
-#: builtin/notes.c:510 builtin/notes.c:564 builtin/notes.c:647
-#: builtin/notes.c:652 builtin/notes.c:727 builtin/notes.c:769
-#: builtin/notes.c:971 builtin/tag.c:558
+#: builtin/notes.c:271 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:506 builtin/notes.c:560 builtin/notes.c:643
+#: builtin/notes.c:648 builtin/notes.c:723 builtin/notes.c:765
+#: builtin/notes.c:967 builtin/tag.c:556
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
msgstr "无法解析 '%s' 为一个有效引用。"
-#: builtin/notes.c:278
+#: builtin/notes.c:274
#, c-format
msgid "Failed to read object '%s'."
msgstr "无法读取对象 '%s'。"
-#: builtin/notes.c:302
+#: builtin/notes.c:298
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr "不能提交未初始化/未引用的注解树"
-#: builtin/notes.c:343
+#: builtin/notes.c:339
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
msgstr "坏的 notes.rewriteMode 值:'%s'"
-#: builtin/notes.c:353
+#: builtin/notes.c:349
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr "拒绝向 %s(在 refs/notes/ 之外)写入注解"
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: builtin/notes.c:380
+#: builtin/notes.c:376
#, c-format
msgid "Bad %s value: '%s'"
msgstr "坏的 %s 值:'%s'"
-#: builtin/notes.c:444
+#: builtin/notes.c:440
#, c-format
msgid "Malformed input line: '%s'."
msgstr "非法的输入行:'%s'。"
-#: builtin/notes.c:459
+#: builtin/notes.c:455
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
msgstr "无法从 '%s' 到 '%s' 拷贝注解"
-#: builtin/notes.c:503 builtin/notes.c:557 builtin/notes.c:630
-#: builtin/notes.c:642 builtin/notes.c:715 builtin/notes.c:762
-#: builtin/notes.c:1036
+#: builtin/notes.c:499 builtin/notes.c:553 builtin/notes.c:626
+#: builtin/notes.c:638 builtin/notes.c:711 builtin/notes.c:758
+#: builtin/notes.c:1032
msgid "too many parameters"
msgstr "参数太多"
-#: builtin/notes.c:516 builtin/notes.c:775
+#: builtin/notes.c:512 builtin/notes.c:771
#, c-format
msgid "No note found for object %s."
msgstr "未发现对象 %s 的注解。"
-#: builtin/notes.c:538 builtin/notes.c:695
+#: builtin/notes.c:534 builtin/notes.c:691
msgid "note contents as a string"
msgstr "注解内容作为一个字符串"
-#: builtin/notes.c:541 builtin/notes.c:698
+#: builtin/notes.c:537 builtin/notes.c:694
msgid "note contents in a file"
msgstr "注解内容到一个文件中"
-#: builtin/notes.c:543 builtin/notes.c:546 builtin/notes.c:700
-#: builtin/notes.c:703 builtin/tag.c:476
+#: builtin/notes.c:539 builtin/notes.c:542 builtin/notes.c:696
+#: builtin/notes.c:699 builtin/tag.c:474
msgid "object"
msgstr "对象"
-#: builtin/notes.c:544 builtin/notes.c:701
+#: builtin/notes.c:540 builtin/notes.c:697
msgid "reuse and edit specified note object"
msgstr "重用和编辑指定的注解对象"
-#: builtin/notes.c:547 builtin/notes.c:704
+#: builtin/notes.c:543 builtin/notes.c:700
msgid "reuse specified note object"
msgstr "重用指定的注解对象"
-#: builtin/notes.c:549 builtin/notes.c:617
+#: builtin/notes.c:545 builtin/notes.c:613
msgid "replace existing notes"
msgstr "替换已存在的注解"
-#: builtin/notes.c:583
+#: builtin/notes.c:579
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr "不能添加注解。发现对象 %s 已存在注解。使用 '-f' 覆盖现存注解"
-#: builtin/notes.c:588 builtin/notes.c:665
+#: builtin/notes.c:584 builtin/notes.c:661
#, c-format
msgid "Overwriting existing notes for object %s\n"
msgstr "覆盖对象 %s 现存注解\n"
-#: builtin/notes.c:618
+#: builtin/notes.c:614
msgid "read objects from stdin"
msgstr "从标准输入读取对象"
-#: builtin/notes.c:620
+#: builtin/notes.c:616
msgid "load rewriting config for <command> (implies --stdin)"
msgstr "重新加载 <命令> 的配置(隐含 --stdin)"
-#: builtin/notes.c:638
+#: builtin/notes.c:634
msgid "too few parameters"
msgstr "参数太少"
-#: builtin/notes.c:659
+#: builtin/notes.c:655
#, c-format
msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr "不能拷贝注解。发现对象 %s 已存在注解。使用 '-f' 覆盖现存注解"
-#: builtin/notes.c:671
+#: builtin/notes.c:667
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
msgstr "源对象 %s 缺少注解。不能拷贝。"
-#: builtin/notes.c:720
+#: builtin/notes.c:716
#, c-format
msgid ""
"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
@@ -6496,58 +6640,58 @@ msgstr ""
"子命令 'edit' 的选项 -m/-F/-c/-C 已弃用。\n"
"请换用 'git notes add -f -m/-F/-c/-C'。\n"
-#: builtin/notes.c:867
+#: builtin/notes.c:863
msgid "General options"
msgstr "通用选项"
-#: builtin/notes.c:869
+#: builtin/notes.c:865
msgid "Merge options"
msgstr "合并选项"
-#: builtin/notes.c:871
+#: builtin/notes.c:867
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
msgstr "使用指定的策略解决注解冲突 (manual/ours/theirs/union/cat_sort_uniq)"
-#: builtin/notes.c:873
+#: builtin/notes.c:869
msgid "Committing unmerged notes"
msgstr "提交未合并的注解"
-#: builtin/notes.c:875
+#: builtin/notes.c:871
msgid "finalize notes merge by committing unmerged notes"
msgstr "通过提交未合并的注解来完成注解合并"
-#: builtin/notes.c:877
+#: builtin/notes.c:873
msgid "Aborting notes merge resolution"
msgstr "中止注解合并的方案"
-#: builtin/notes.c:879
+#: builtin/notes.c:875
msgid "abort notes merge"
msgstr "中止注解合并"
-#: builtin/notes.c:974
+#: builtin/notes.c:970
#, c-format
msgid "Object %s has no note\n"
msgstr "对象 %s 没有注解\n"
-#: builtin/notes.c:986
+#: builtin/notes.c:982
msgid "attempt to remove non-existent note is not an error"
msgstr "尝试删除不存在的注解不是一个错误"
-#: builtin/notes.c:989
+#: builtin/notes.c:985
msgid "read object names from the standard input"
msgstr "从标准输入读取对象名称"
-#: builtin/notes.c:1070
+#: builtin/notes.c:1066
msgid "notes_ref"
msgstr "注解引用"
-#: builtin/notes.c:1071
+#: builtin/notes.c:1067
msgid "use notes from <notes_ref>"
msgstr "从 <注解引用> 使用注解"
-#: builtin/notes.c:1106 builtin/remote.c:1598
+#: builtin/notes.c:1102 builtin/remote.c:1598
#, c-format
msgid "Unknown subcommand: %s"
msgstr "未知子命令:%s"
@@ -6896,26 +7040,46 @@ msgstr ""
#: builtin/push.c:224
msgid ""
-"Updates were rejected because the destination reference already exists\n"
-"in the remote."
-msgstr "更新被拒绝因为目标引用在远程已经存在。"
+"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 merge the remote changes (e.g.,\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' 小节。"
-#: builtin/push.c:269
+#: builtin/push.c:231
+msgid "Updates were rejected because the tag already exists in the remote."
+msgstr "更新被拒绝因为 tag 在远程已经存在。"
+
+#: builtin/push.c:234
+msgid ""
+"You cannot update a remote ref that points at a non-commit object,\n"
+"or update a remote ref to make it point at a non-commit object,\n"
+"without using the '--force' option.\n"
+msgstr ""
+"如果不使用 '--force' 参数,您不能更新一个指向非提交对象的远程引用,\n"
+"也不能更新远程引用让其指向一个非提交对象。\n"
+
+#: builtin/push.c:294
#, c-format
msgid "Pushing to %s\n"
msgstr "推送到 %s\n"
-#: builtin/push.c:273
+#: builtin/push.c:298
#, c-format
msgid "failed to push some refs to '%s'"
msgstr "无法推送一些引用到 '%s'"
-#: builtin/push.c:302
+#: builtin/push.c:331
#, c-format
msgid "bad repository '%s'"
msgstr "坏的版本库 '%s'"
-#: builtin/push.c:303
+#: builtin/push.c:332
msgid ""
"No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote "
@@ -6936,79 +7100,83 @@ msgstr ""
"\n"
" git push <name>\n"
-#: builtin/push.c:318
+#: builtin/push.c:347
msgid "--all and --tags are incompatible"
msgstr "--all 和 --tags 不兼容"
-#: builtin/push.c:319
+#: builtin/push.c:348
msgid "--all can't be combined with refspecs"
msgstr "--all 不能和引用表达式同时使用"
-#: builtin/push.c:324
+#: builtin/push.c:353
msgid "--mirror and --tags are incompatible"
msgstr "--mirror 和 --tags 不兼容"
-#: builtin/push.c:325
+#: builtin/push.c:354
msgid "--mirror can't be combined with refspecs"
msgstr "--mirror 不能和引用表达式同时使用"
-#: builtin/push.c:330
+#: builtin/push.c:359
msgid "--all and --mirror are incompatible"
msgstr "--all 和 --mirror 不兼容"
-#: builtin/push.c:390
+#: builtin/push.c:419
msgid "repository"
msgstr "版本库"
-#: builtin/push.c:391
+#: builtin/push.c:420
msgid "push all refs"
msgstr "推送所有引用"
-#: builtin/push.c:392
+#: builtin/push.c:421
msgid "mirror all refs"
msgstr "镜像所有引用"
-#: builtin/push.c:394
+#: builtin/push.c:423
msgid "delete refs"
msgstr "删除引用"
-#: builtin/push.c:395
+#: builtin/push.c:424
msgid "push tags (can't be used with --all or --mirror)"
msgstr "推送 tags(不能使用 --all or --mirror)"
-#: builtin/push.c:398
+#: builtin/push.c:427
msgid "force updates"
msgstr "强制更新"
-#: builtin/push.c:399
+#: builtin/push.c:428
msgid "check"
msgstr "检查"
-#: builtin/push.c:400
+#: builtin/push.c:429
msgid "control recursive pushing of submodules"
msgstr "控制子模组的递归推送"
-#: builtin/push.c:402
+#: builtin/push.c:431
msgid "use thin pack"
msgstr "使用精简打包"
-#: builtin/push.c:403 builtin/push.c:404
+#: builtin/push.c:432 builtin/push.c:433
msgid "receive pack program"
msgstr "接收包程序"
-#: builtin/push.c:405
+#: builtin/push.c:434
msgid "set upstream for git pull/status"
msgstr "设置 git pull/status 的上游"
-#: builtin/push.c:408
+#: builtin/push.c:437
msgid "prune locally removed refs"
msgstr "清除本地删除的引用"
-#: builtin/push.c:418
+#: builtin/push.c:439
+msgid "bypass pre-push hook"
+msgstr "绕过 pre-push 钩子"
+
+#: builtin/push.c:448
msgid "--delete is incompatible with --all, --mirror and --tags"
msgstr "--delete 与 --all、--mirror 及 --tags 不兼容"
-#: builtin/push.c:420
+#: builtin/push.c:450
msgid "--delete doesn't make sense without any refs"
msgstr "--delete 未接任何引用没有意义"
@@ -8031,11 +8199,11 @@ msgstr "显示从 base 开始的 <n> 条最近的引用日志记录"
#: builtin/show-ref.c:10
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] [-s|--"
+"hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*] "
msgstr ""
-"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] [-s|--"
+"hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*] "
#: builtin/show-ref.c:11
msgid "git show-ref --exclude-existing[=pattern] < ref-list"
@@ -8104,8 +8272,7 @@ msgstr "更新的原因"
#: builtin/tag.c:22
msgid ""
"git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]"
-msgstr ""
-"git tag [-a|-s|-u <key-id>] [-f] [-m <说明>|-F <文件>] <标签名> [<头>]"
+msgstr "git tag [-a|-s|-u <key-id>] [-f] [-m <说明>|-F <文件>] <标签名> [<头>]"
#: builtin/tag.c:23
msgid "git tag -d <tagname>..."
@@ -8149,169 +8316,163 @@ msgid "could not verify the tag '%s'"
msgstr "不能校验 tag '%s'"
#: builtin/tag.c:249
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be ignored.\n"
-"#\n"
+"Write a tag message\n"
+"Lines starting with '%c' will be ignored.\n"
msgstr ""
"\n"
-"#\n"
-"# 输入一个 tag 说明\n"
-"# 以 '#' 开头的行将被忽略。\n"
-"#\n"
+"输入一个 tag 说明\n"
+"以 '%c' 开头的行将被忽略。\n"
-#: builtin/tag.c:256
+#: builtin/tag.c:253
+#, c-format
msgid ""
"\n"
-"#\n"
-"# Write a tag message\n"
-"# Lines starting with '#' will be kept; you may remove them yourself if you "
+"Write a tag message\n"
+"Lines starting with '%c' will be kept; you may remove them yourself if you "
"want to.\n"
-"#\n"
msgstr ""
"\n"
-"#\n"
-"# 输入一个 tag 说明\n"
-"# 以 '#' 开头的行将被忽略,您可以删除它们如果您想这样做。\n"
-"#\n"
+"输入一个 tag 说明\n"
+"以 '%c' 开头的行将被保留,如果您愿意也可以删除它们。\n"
-#: builtin/tag.c:298
+#: builtin/tag.c:292
msgid "unable to sign the tag"
msgstr "无法签署 tag"
-#: builtin/tag.c:300
+#: builtin/tag.c:294
msgid "unable to write tag file"
msgstr "无法写 tag 文件"
-#: builtin/tag.c:325
+#: builtin/tag.c:319
msgid "bad object type."
msgstr "坏的对象类型。"
-#: builtin/tag.c:338
+#: builtin/tag.c:332
msgid "tag header too big."
msgstr "tag 头信息太大。"
-#: builtin/tag.c:370
+#: builtin/tag.c:368
msgid "no tag message?"
msgstr "无 tag 说明?"
-#: builtin/tag.c:376
+#: builtin/tag.c:374
#, c-format
msgid "The tag message has been left in %s\n"
msgstr "tag 说明被保留在 %s\n"
-#: builtin/tag.c:425
+#: builtin/tag.c:423
msgid "switch 'points-at' requires an object"
msgstr "开关 'points-at' 需要一个对象"
-#: builtin/tag.c:427
+#: builtin/tag.c:425
#, c-format
msgid "malformed object name '%s'"
msgstr "非法的对象名 '%s'"
-#: builtin/tag.c:447
+#: builtin/tag.c:445
msgid "list tag names"
msgstr "列出tag名称"
-#: builtin/tag.c:449
+#: builtin/tag.c:447
msgid "print <n> lines of each tag message"
msgstr "每个 tag 信息打印 <n> 行"
-#: builtin/tag.c:451
+#: builtin/tag.c:449
msgid "delete tags"
msgstr "删除 tags"
-#: builtin/tag.c:452
+#: builtin/tag.c:450
msgid "verify tags"
msgstr "验证 tags"
-#: builtin/tag.c:454
+#: builtin/tag.c:452
msgid "Tag creation options"
msgstr "Tag 创建选项"
-#: builtin/tag.c:456
+#: builtin/tag.c:454
msgid "annotated tag, needs a message"
msgstr "注解 tag,需要一个说明"
-#: builtin/tag.c:458
+#: builtin/tag.c:456
msgid "tag message"
msgstr "tag 说明"
-#: builtin/tag.c:460
+#: builtin/tag.c:458
msgid "annotated and GPG-signed tag"
msgstr "注解并 GPG 签名的 tag"
-#: builtin/tag.c:464
+#: builtin/tag.c:462
msgid "use another key to sign the tag"
msgstr "使用另外的私钥签名 tag"
-#: builtin/tag.c:465
+#: builtin/tag.c:463
msgid "replace the tag if exists"
msgstr "如果存在,替换现有的 tag"
-#: builtin/tag.c:466
+#: builtin/tag.c:464
msgid "show tag list in columns"
msgstr "以列的方式显示 tag"
-#: builtin/tag.c:468
+#: builtin/tag.c:466
msgid "Tag listing options"
msgstr "Tag 列表选项"
-#: builtin/tag.c:471
+#: builtin/tag.c:469
msgid "print only tags that contain the commit"
msgstr "只打印包含提交的tags"
-#: builtin/tag.c:477
+#: builtin/tag.c:475
msgid "print only tags of the object"
msgstr "只打印tags对象"
-#: builtin/tag.c:506
+#: builtin/tag.c:504
msgid "--column and -n are incompatible"
msgstr "--column 和 -n 不兼容"
-#: builtin/tag.c:523
+#: builtin/tag.c:521
msgid "-n option is only allowed with -l."
msgstr "-n 选项只允许和 -l 同时使用。"
-#: builtin/tag.c:525
+#: builtin/tag.c:523
msgid "--contains option is only allowed with -l."
msgstr "--contains 选项只允许和 -l 同时使用。"
-#: builtin/tag.c:527
+#: builtin/tag.c:525
msgid "--points-at option is only allowed with -l."
msgstr "--points-at 选项只允许和 -l 同时使用。"
-#: builtin/tag.c:535
+#: builtin/tag.c:533
msgid "only one -F or -m option is allowed."
msgstr "只允许一个 -F 或 -m 选项。"
-#: builtin/tag.c:555
+#: builtin/tag.c:553
msgid "too many params"
msgstr "太多参数"
-#: builtin/tag.c:561
+#: builtin/tag.c:559
#, c-format
msgid "'%s' is not a valid tag name."
msgstr "'%s' 不是一个有效的tag名称。"
-#: builtin/tag.c:566
+#: builtin/tag.c:564
#, c-format
msgid "tag '%s' already exists"
msgstr "tag '%s' 已存在"
-#: builtin/tag.c:584
+#: builtin/tag.c:582
#, c-format
msgid "%s: cannot lock the ref"
msgstr "%s:不能锁定引用"
-#: builtin/tag.c:586
+#: builtin/tag.c:584
#, c-format
msgid "%s: cannot update the ref"
msgstr "%s:不能更新引用"
-#: builtin/tag.c:588
+#: builtin/tag.c:586
#, c-format
msgid "Updated tag '%s' (was %s)\n"
msgstr "已更新tag '%s'(曾为 %s)\n"
@@ -8545,8 +8706,8 @@ msgid "Print lines matching a pattern"
msgstr "输出和模式匹配的行"
#: common-cmds.h:17
-msgid "Create an empty git repository or reinitialize an existing one"
-msgstr "创建一个空的 git 版本库或重新初始化一个"
+msgid "Create an empty Git repository or reinitialize an existing one"
+msgstr "创建一个空的 Git 版本库或重新初始化一个已存在的版本库"
#: common-cmds.h:18
msgid "Show commit logs"
@@ -8623,7 +8784,7 @@ msgstr "版本库缺乏必要的数据(blob)对象以进行三路合并。"
#: git-am.sh:139
msgid "Using index info to reconstruct a base tree..."
-msgstr "更新索引信息以重建基树..."
+msgstr "使用索引来重建一个(三路合并的)基础目录树..."
#: git-am.sh:154
msgid ""
@@ -8734,7 +8895,7 @@ msgstr "您的索引中仍有未合并的路径。您是否忘了执行 'git add
#: git-am.sh:845
msgid "No changes -- Patch already applied."
-msgstr "没有变更 -- 补丁已经应用过。"
+msgstr "没有变更 —— 补丁已经应用过。"
#: git-am.sh:855
#, sh-format
@@ -9413,11 +9574,11 @@ msgid "blob"
msgstr "数据对象"
#: git-submodule.sh:979
-msgid "# Submodules changed but not updated:"
-msgstr "# 子模组已修改但尚未更新:"
+msgid "Submodules changed but not updated:"
+msgstr "子模组已修改但尚未更新:"
#: git-submodule.sh:981
-msgid "# Submodule changes to be committed:"
+msgid "Submodule changes to be committed:"
msgstr "要提交的子模组变更:"
#: git-submodule.sh:1129
@@ -9425,8 +9586,11 @@ msgstr "要提交的子模组变更:"
msgid "Synchronizing submodule url for '$prefix$sm_path'"
msgstr "为 '$prefix$sm_path' 同步子模组 url"
-#~ msgid "-NUM"
-#~ msgstr "-数字"
+#~ msgid "can't fdopen 'show' output fd"
+#~ msgstr "不能打开 'show' 输出文件句柄"
+
+#~ msgid "failed to close pipe to 'show' for object '%s'"
+#~ msgstr "无法为对象 '%s' 的 'show' 关闭管道"
#~ msgid " 0 files changed"
#~ msgstr " 0 个文件被修改"
diff --git a/pretty.c b/pretty.c
index eae57ad9d7..41f04e669d 100644
--- a/pretty.c
+++ b/pretty.c
@@ -345,7 +345,7 @@ static int needs_rfc2047_encoding(const char *line, int len,
return 0;
}
-static void add_rfc2047(struct strbuf *sb, const char *line, int len,
+static void add_rfc2047(struct strbuf *sb, const char *line, size_t len,
const char *encoding, enum rfc2047_type type)
{
static const int max_encoded_length = 76; /* per rfc2047 */
@@ -355,9 +355,22 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len,
strbuf_grow(sb, len * 3 + strlen(encoding) + 100);
strbuf_addf(sb, "=?%s?q?", encoding);
line_len += strlen(encoding) + 5; /* 5 for =??q? */
- for (i = 0; i < len; i++) {
- unsigned ch = line[i] & 0xFF;
- int is_special = is_rfc2047_special(ch, type);
+
+ while (len) {
+ /*
+ * RFC 2047, section 5 (3):
+ *
+ * Each 'encoded-word' MUST represent an integral number of
+ * characters. A multi-octet character may not be split across
+ * adjacent 'encoded- word's.
+ */
+ const unsigned char *p = (const unsigned char *)line;
+ int chrlen = mbs_chrlen(&line, &len, encoding);
+ int is_special = (chrlen > 1) || is_rfc2047_special(*p, type);
+
+ /* "=%02X" * chrlen, or the byte itself */
+ const char *encoded_fmt = is_special ? "=%02X" : "%c";
+ int encoded_len = is_special ? 3 * chrlen : 1;
/*
* According to RFC 2047, we could encode the special character
@@ -367,18 +380,15 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len,
* causes ' ' to be encoded as '=20', avoiding this problem.
*/
- if (line_len + 2 + (is_special ? 3 : 1) > max_encoded_length) {
+ if (line_len + encoded_len + 2 > max_encoded_length) {
+ /* It won't fit with trailing "?=" --- break the line */
strbuf_addf(sb, "?=\n =?%s?q?", encoding);
line_len = strlen(encoding) + 5 + 1; /* =??q? plus SP */
}
- if (is_special) {
- strbuf_addf(sb, "=%02X", ch);
- line_len += 3;
- } else {
- strbuf_addch(sb, ch);
- line_len++;
- }
+ for (i = 0; i < chrlen; i++)
+ strbuf_addf(sb, encoded_fmt, p[i]);
+ line_len += encoded_len;
}
strbuf_addstr(sb, "?=");
}
@@ -759,8 +769,10 @@ struct format_commit_context {
unsigned commit_signature_parsed:1;
struct {
char *gpg_output;
+ char *gpg_status;
char good_bad;
char *signer;
+ char *key;
} signature;
char *message;
size_t width, indent1, indent2;
@@ -948,13 +960,13 @@ static struct {
char result;
const char *check;
} signature_check[] = {
- { 'G', ": Good signature from " },
- { 'B', ": BAD signature from " },
+ { 'G', "\n[GNUPG:] GOODSIG " },
+ { 'B', "\n[GNUPG:] BADSIG " },
};
static void parse_signature_lines(struct format_commit_context *ctx)
{
- const char *buf = ctx->signature.gpg_output;
+ const char *buf = ctx->signature.gpg_status;
int i;
for (i = 0; i < ARRAY_SIZE(signature_check); i++) {
@@ -964,6 +976,8 @@ static void parse_signature_lines(struct format_commit_context *ctx)
continue;
ctx->signature.good_bad = signature_check[i].result;
found += strlen(signature_check[i].check);
+ ctx->signature.key = xmemdupz(found, 16);
+ found += 17;
next = strchrnul(found, '\n');
ctx->signature.signer = xmemdupz(found, next - found);
break;
@@ -975,6 +989,7 @@ static void parse_commit_signature(struct format_commit_context *ctx)
struct strbuf payload = STRBUF_INIT;
struct strbuf signature = STRBUF_INIT;
struct strbuf gpg_output = STRBUF_INIT;
+ struct strbuf gpg_status = STRBUF_INIT;
int status;
ctx->commit_signature_parsed = 1;
@@ -984,13 +999,15 @@ static void parse_commit_signature(struct format_commit_context *ctx)
goto out;
status = verify_signed_buffer(payload.buf, payload.len,
signature.buf, signature.len,
- &gpg_output);
+ &gpg_output, &gpg_status);
if (status && !gpg_output.len)
goto out;
ctx->signature.gpg_output = strbuf_detach(&gpg_output, NULL);
+ ctx->signature.gpg_status = strbuf_detach(&gpg_status, NULL);
parse_signature_lines(ctx);
out:
+ strbuf_release(&gpg_status);
strbuf_release(&gpg_output);
strbuf_release(&payload);
strbuf_release(&signature);
@@ -1200,6 +1217,10 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
if (c->signature.signer)
strbuf_addstr(sb, c->signature.signer);
break;
+ case 'K':
+ if (c->signature.key)
+ strbuf_addstr(sb, c->signature.key);
+ break;
}
return 2;
}
diff --git a/reachable.c b/reachable.c
index bf7970661f..e7e6a1e342 100644
--- a/reachable.c
+++ b/reachable.c
@@ -152,11 +152,9 @@ static int add_one_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
static int add_one_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
{
- struct object *object = parse_object(sha1);
+ struct object *object = parse_object_or_die(sha1, path);
struct rev_info *revs = (struct rev_info *)cb_data;
- if (!object)
- die("bad object ref: %s:%s", path, sha1_to_hex(sha1));
add_pending_object(revs, object, "");
return 0;
diff --git a/read-cache.c b/read-cache.c
index 827ae55c50..670a06bc79 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1260,7 +1260,7 @@ static int verify_hdr(struct cache_header *hdr, unsigned long size)
if (hdr->hdr_signature != htonl(CACHE_SIGNATURE))
return error("bad signature");
hdr_version = ntohl(hdr->hdr_version);
- if (hdr_version < 2 || 4 < hdr_version)
+ if (hdr_version < INDEX_FORMAT_LB || INDEX_FORMAT_UB < hdr_version)
return error("bad index version %d", hdr_version);
git_SHA1_Init(&c);
git_SHA1_Update(&c, hdr, size - 20);
diff --git a/refs.c b/refs.c
index 175b9fcaa2..de2d8eb866 100644
--- a/refs.c
+++ b/refs.c
@@ -803,11 +803,38 @@ static const char *parse_ref_line(char *line, unsigned char *sha1)
return line;
}
+/*
+ * Read f, which is a packed-refs file, into dir.
+ *
+ * A comment line of the form "# pack-refs with: " may contain zero or
+ * more traits. We interpret the traits as follows:
+ *
+ * No traits:
+ *
+ * Probably no references are peeled. But if the file contains a
+ * peeled value for a reference, we will use it.
+ *
+ * peeled:
+ *
+ * References under "refs/tags/", if they *can* be peeled, *are*
+ * peeled in this file. References outside of "refs/tags/" are
+ * probably not peeled even if they could have been, but if we find
+ * a peeled value for such a reference we will use it.
+ *
+ * fully-peeled:
+ *
+ * All references in the file that can be peeled are peeled.
+ * Inversely (and this is more important), any references in the
+ * file for which no peeled value is recorded is not peelable. This
+ * trait should typically be written alongside "peeled" for
+ * compatibility with older clients, but we do not require it
+ * (i.e., "peeled" is a no-op if "fully-peeled" is set).
+ */
static void read_packed_refs(FILE *f, struct ref_dir *dir)
{
struct ref_entry *last = NULL;
char refline[PATH_MAX];
- int flag = REF_ISPACKED;
+ enum { PEELED_NONE, PEELED_TAGS, PEELED_FULLY } peeled = PEELED_NONE;
while (fgets(refline, sizeof(refline), f)) {
unsigned char sha1[20];
@@ -816,15 +843,20 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
if (!strncmp(refline, header, sizeof(header)-1)) {
const char *traits = refline + sizeof(header) - 1;
- if (strstr(traits, " peeled "))
- flag |= REF_KNOWS_PEELED;
+ if (strstr(traits, " fully-peeled "))
+ peeled = PEELED_FULLY;
+ else if (strstr(traits, " peeled "))
+ peeled = PEELED_TAGS;
/* perhaps other traits later as well */
continue;
}
refname = parse_ref_line(refline, sha1);
if (refname) {
- last = create_ref_entry(refname, sha1, flag, 1);
+ last = create_ref_entry(refname, sha1, REF_ISPACKED, 1);
+ if (peeled == PEELED_FULLY ||
+ (peeled == PEELED_TAGS && !prefixcmp(refname, "refs/tags/")))
+ last->flag |= REF_KNOWS_PEELED;
add_ref(dir, last);
continue;
}
@@ -832,8 +864,15 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
refline[0] == '^' &&
strlen(refline) == 42 &&
refline[41] == '\n' &&
- !get_sha1_hex(refline + 1, sha1))
+ !get_sha1_hex(refline + 1, sha1)) {
hashcpy(last->u.value.peeled, sha1);
+ /*
+ * Regardless of what the file header said,
+ * we definitely know the value of *this*
+ * reference:
+ */
+ last->flag |= REF_KNOWS_PEELED;
+ }
}
}
@@ -2293,59 +2332,117 @@ int read_ref_at(const char *refname, unsigned long at_time, int cnt,
return 1;
}
-int for_each_recent_reflog_ent(const char *refname, each_reflog_ent_fn fn, long ofs, void *cb_data)
+static int show_one_reflog_ent(struct strbuf *sb, each_reflog_ent_fn fn, void *cb_data)
+{
+ unsigned char osha1[20], nsha1[20];
+ char *email_end, *message;
+ unsigned long timestamp;
+ int tz;
+
+ /* old SP new SP name <email> SP time TAB msg LF */
+ if (sb->len < 83 || sb->buf[sb->len - 1] != '\n' ||
+ get_sha1_hex(sb->buf, osha1) || sb->buf[40] != ' ' ||
+ get_sha1_hex(sb->buf + 41, nsha1) || sb->buf[81] != ' ' ||
+ !(email_end = strchr(sb->buf + 82, '>')) ||
+ email_end[1] != ' ' ||
+ !(timestamp = strtoul(email_end + 2, &message, 10)) ||
+ !message || message[0] != ' ' ||
+ (message[1] != '+' && message[1] != '-') ||
+ !isdigit(message[2]) || !isdigit(message[3]) ||
+ !isdigit(message[4]) || !isdigit(message[5]))
+ return 0; /* corrupt? */
+ email_end[1] = '\0';
+ tz = strtol(message + 1, NULL, 10);
+ if (message[6] != '\t')
+ message += 6;
+ else
+ message += 7;
+ return fn(osha1, nsha1, sb->buf + 82, timestamp, tz, message, cb_data);
+}
+
+static char *find_beginning_of_line(char *bob, char *scan)
+{
+ while (bob < scan && *(--scan) != '\n')
+ ; /* keep scanning backwards */
+ /*
+ * Return either beginning of the buffer, or LF at the end of
+ * the previous line.
+ */
+ return scan;
+}
+
+int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn, void *cb_data)
{
- const char *logfile;
- FILE *logfp;
struct strbuf sb = STRBUF_INIT;
- int ret = 0;
+ FILE *logfp;
+ long pos;
+ int ret = 0, at_tail = 1;
- logfile = git_path("logs/%s", refname);
- logfp = fopen(logfile, "r");
+ logfp = fopen(git_path("logs/%s", refname), "r");
if (!logfp)
return -1;
- if (ofs) {
- struct stat statbuf;
- if (fstat(fileno(logfp), &statbuf) ||
- statbuf.st_size < ofs ||
- fseek(logfp, -ofs, SEEK_END) ||
- strbuf_getwholeline(&sb, logfp, '\n')) {
- fclose(logfp);
- strbuf_release(&sb);
- return -1;
+ /* Jump to the end */
+ if (fseek(logfp, 0, SEEK_END) < 0)
+ return error("cannot seek back reflog for %s: %s",
+ refname, strerror(errno));
+ pos = ftell(logfp);
+ while (!ret && 0 < pos) {
+ int cnt;
+ size_t nread;
+ char buf[BUFSIZ];
+ char *endp, *scanp;
+
+ /* Fill next block from the end */
+ cnt = (sizeof(buf) < pos) ? sizeof(buf) : pos;
+ if (fseek(logfp, pos - cnt, SEEK_SET))
+ return error("cannot seek back reflog for %s: %s",
+ refname, strerror(errno));
+ nread = fread(buf, cnt, 1, logfp);
+ if (nread != 1)
+ return error("cannot read %d bytes from reflog for %s: %s",
+ cnt, refname, strerror(errno));
+ pos -= cnt;
+
+ scanp = endp = buf + cnt;
+ if (at_tail && scanp[-1] == '\n')
+ /* Looking at the final LF at the end of the file */
+ scanp--;
+ at_tail = 0;
+
+ while (buf < scanp) {
+ /*
+ * terminating LF of the previous line, or the beginning
+ * of the buffer.
+ */
+ char *bp;
+
+ bp = find_beginning_of_line(buf, scanp);
+
+ if (*bp != '\n') {
+ strbuf_splice(&sb, 0, 0, buf, endp - buf);
+ if (pos)
+ break; /* need to fill another block */
+ scanp = buf - 1; /* leave loop */
+ } else {
+ /*
+ * (bp + 1) thru endp is the beginning of the
+ * current line we have in sb
+ */
+ strbuf_splice(&sb, 0, 0, bp + 1, endp - (bp + 1));
+ scanp = bp;
+ endp = bp + 1;
+ }
+ ret = show_one_reflog_ent(&sb, fn, cb_data);
+ strbuf_reset(&sb);
+ if (ret)
+ break;
}
- }
- while (!strbuf_getwholeline(&sb, logfp, '\n')) {
- unsigned char osha1[20], nsha1[20];
- char *email_end, *message;
- unsigned long timestamp;
- int tz;
-
- /* old SP new SP name <email> SP time TAB msg LF */
- if (sb.len < 83 || sb.buf[sb.len - 1] != '\n' ||
- get_sha1_hex(sb.buf, osha1) || sb.buf[40] != ' ' ||
- get_sha1_hex(sb.buf + 41, nsha1) || sb.buf[81] != ' ' ||
- !(email_end = strchr(sb.buf + 82, '>')) ||
- email_end[1] != ' ' ||
- !(timestamp = strtoul(email_end + 2, &message, 10)) ||
- !message || message[0] != ' ' ||
- (message[1] != '+' && message[1] != '-') ||
- !isdigit(message[2]) || !isdigit(message[3]) ||
- !isdigit(message[4]) || !isdigit(message[5]))
- continue; /* corrupt? */
- email_end[1] = '\0';
- tz = strtol(message + 1, NULL, 10);
- if (message[6] != '\t')
- message += 6;
- else
- message += 7;
- ret = fn(osha1, nsha1, sb.buf + 82, timestamp, tz, message,
- cb_data);
- if (ret)
- break;
}
+ if (!ret && sb.len)
+ ret = show_one_reflog_ent(&sb, fn, cb_data);
+
fclose(logfp);
strbuf_release(&sb);
return ret;
@@ -2353,9 +2450,20 @@ int for_each_recent_reflog_ent(const char *refname, each_reflog_ent_fn fn, long
int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn, void *cb_data)
{
- return for_each_recent_reflog_ent(refname, fn, 0, cb_data);
-}
+ FILE *logfp;
+ struct strbuf sb = STRBUF_INIT;
+ int ret = 0;
+ logfp = fopen(git_path("logs/%s", refname), "r");
+ if (!logfp)
+ return -1;
+
+ while (!ret && !strbuf_getwholeline(&sb, logfp, '\n'))
+ ret = show_one_reflog_ent(&sb, fn, cb_data);
+ fclose(logfp);
+ strbuf_release(&sb);
+ return ret;
+}
/*
* Call fn for each reflog in the namespace indicated by name. name
* must be empty or end with '/'. Name will be used as a scratch
diff --git a/refs.h b/refs.h
index 1b2e2d3a98..a35eafc4ee 100644
--- a/refs.h
+++ b/refs.h
@@ -103,7 +103,7 @@ extern int read_ref_at(const char *refname, unsigned long at_time, int cnt,
/* iterate over reflog entries */
typedef int each_reflog_ent_fn(unsigned char *osha1, unsigned char *nsha1, const char *, unsigned long, int, const char *, void *);
int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn, void *cb_data);
-int for_each_recent_reflog_ent(const char *refname, each_reflog_ent_fn fn, long, void *cb_data);
+int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn, void *cb_data);
/*
* Calls the specified function for each reflog file until it returns nonzero,
diff --git a/remote.c b/remote.c
index e53a6eb776..57f36e14da 100644
--- a/remote.c
+++ b/remote.c
@@ -15,6 +15,7 @@ static struct refspec s_tag_refspec = {
0,
1,
0,
+ 0,
"refs/tags/*",
"refs/tags/*"
};
@@ -538,7 +539,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp
/*
* Before going on, special case ":" (or "+:") as a refspec
- * for matching refs.
+ * for pushing matching refs.
*/
if (!fetch && rhs == lhs && rhs[1] == '\0') {
rs[i].matching = 1;
@@ -565,26 +566,25 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp
flags = REFNAME_ALLOW_ONELEVEL | (is_glob ? REFNAME_REFSPEC_PATTERN : 0);
if (fetch) {
- /*
- * LHS
- * - empty is allowed; it means HEAD.
- * - otherwise it must be a valid looking ref.
- */
+ unsigned char unused[40];
+
+ /* LHS */
if (!*rs[i].src)
- ; /* empty is ok */
- else if (check_refname_format(rs[i].src, flags))
+ ; /* empty is ok; it means "HEAD" */
+ else if (llen == 40 && !get_sha1_hex(rs[i].src, unused))
+ rs[i].exact_sha1 = 1; /* ok */
+ else if (!check_refname_format(rs[i].src, flags))
+ ; /* valid looking ref is ok */
+ else
goto invalid;
- /*
- * RHS
- * - missing is ok, and is same as empty.
- * - empty is ok; it means not to store.
- * - otherwise it must be a valid looking ref.
- */
+ /* RHS */
if (!rs[i].dst)
- ; /* ok */
+ ; /* missing is ok; it is the same as empty */
else if (!*rs[i].dst)
- ; /* ok */
- else if (check_refname_format(rs[i].dst, flags))
+ ; /* empty is ok; it means "do not store" */
+ else if (!check_refname_format(rs[i].dst, flags))
+ ; /* valid looking ref is ok */
+ else
goto invalid;
} else {
/*
@@ -1195,6 +1195,101 @@ static struct ref **tail_ref(struct ref **head)
return tail;
}
+struct tips {
+ struct commit **tip;
+ int nr, alloc;
+};
+
+static void add_to_tips(struct tips *tips, const unsigned char *sha1)
+{
+ struct commit *commit;
+
+ if (is_null_sha1(sha1))
+ return;
+ commit = lookup_commit_reference_gently(sha1, 1);
+ if (!commit || (commit->object.flags & TMP_MARK))
+ return;
+ commit->object.flags |= TMP_MARK;
+ ALLOC_GROW(tips->tip, tips->nr + 1, tips->alloc);
+ tips->tip[tips->nr++] = commit;
+}
+
+static void add_missing_tags(struct ref *src, struct ref **dst, struct ref ***dst_tail)
+{
+ struct string_list dst_tag = STRING_LIST_INIT_NODUP;
+ struct string_list src_tag = STRING_LIST_INIT_NODUP;
+ struct string_list_item *item;
+ struct ref *ref;
+ struct tips sent_tips;
+
+ /*
+ * Collect everything we know they would have at the end of
+ * this push, and collect all tags they have.
+ */
+ memset(&sent_tips, 0, sizeof(sent_tips));
+ for (ref = *dst; ref; ref = ref->next) {
+ if (ref->peer_ref &&
+ !is_null_sha1(ref->peer_ref->new_sha1))
+ add_to_tips(&sent_tips, ref->peer_ref->new_sha1);
+ else
+ add_to_tips(&sent_tips, ref->old_sha1);
+ if (!prefixcmp(ref->name, "refs/tags/"))
+ string_list_append(&dst_tag, ref->name);
+ }
+ clear_commit_marks_many(sent_tips.nr, sent_tips.tip, TMP_MARK);
+
+ sort_string_list(&dst_tag);
+
+ /* Collect tags they do not have. */
+ for (ref = src; ref; ref = ref->next) {
+ if (prefixcmp(ref->name, "refs/tags/"))
+ continue; /* not a tag */
+ if (string_list_has_string(&dst_tag, ref->name))
+ continue; /* they already have it */
+ if (sha1_object_info(ref->new_sha1, NULL) != OBJ_TAG)
+ continue; /* be conservative */
+ item = string_list_append(&src_tag, ref->name);
+ item->util = ref;
+ }
+ string_list_clear(&dst_tag, 0);
+
+ /*
+ * At this point, src_tag lists tags that are missing from
+ * dst, and sent_tips lists the tips we are pushing or those
+ * that we know they already have. An element in the src_tag
+ * that is an ancestor of any of the sent_tips needs to be
+ * sent to the other side.
+ */
+ if (sent_tips.nr) {
+ for_each_string_list_item(item, &src_tag) {
+ struct ref *ref = item->util;
+ struct ref *dst_ref;
+ struct commit *commit;
+
+ if (is_null_sha1(ref->new_sha1))
+ continue;
+ commit = lookup_commit_reference_gently(ref->new_sha1, 1);
+ if (!commit)
+ /* not pushing a commit, which is not an error */
+ continue;
+
+ /*
+ * Is this tag, which they do not have, reachable from
+ * any of the commits we are sending?
+ */
+ if (!in_merge_bases_many(commit, sent_tips.nr, sent_tips.tip))
+ continue;
+
+ /* Add it in */
+ dst_ref = make_linked_ref(ref->name, dst_tail);
+ hashcpy(dst_ref->new_sha1, ref->new_sha1);
+ dst_ref->peer_ref = copy_ref(ref);
+ }
+ }
+ string_list_clear(&src_tag, 0);
+ free(sent_tips.tip);
+}
+
/*
* Given the set of refs the local repository has, the set of refs the
* remote repository has, and the refspec used for push, determine
@@ -1257,6 +1352,10 @@ int match_push_refs(struct ref *src, struct ref **dst,
free_name:
free(dst_name);
}
+
+ if (flags & MATCH_REFS_FOLLOW_TAGS)
+ add_missing_tags(src, dst, &dst_tail);
+
if (send_prune) {
/* check for missing refs on the remote */
for (ref = *dst; ref; ref = ref->next) {
@@ -1466,7 +1565,12 @@ int get_fetch_map(const struct ref *remote_refs,
} else {
const char *name = refspec->src[0] ? refspec->src : "HEAD";
- ref_map = get_remote_ref(remote_refs, name);
+ if (refspec->exact_sha1) {
+ ref_map = alloc_ref(name);
+ get_sha1_hex(name, ref_map->old_sha1);
+ } else {
+ ref_map = get_remote_ref(remote_refs, name);
+ }
if (!missing_ok && !ref_map)
die("Couldn't find remote ref %s", name);
if (ref_map) {
diff --git a/remote.h b/remote.h
index 251d8fd965..8743d6ef9d 100644
--- a/remote.h
+++ b/remote.h
@@ -62,6 +62,7 @@ struct refspec {
unsigned force : 1;
unsigned pattern : 1;
unsigned matching : 1;
+ unsigned exact_sha1 : 1;
char *src;
char *dst;
@@ -148,7 +149,8 @@ enum match_refs_flags {
MATCH_REFS_NONE = 0,
MATCH_REFS_ALL = (1 << 0),
MATCH_REFS_MIRROR = (1 << 1),
- MATCH_REFS_PRUNE = (1 << 2)
+ MATCH_REFS_PRUNE = (1 << 2),
+ MATCH_REFS_FOLLOW_TAGS = (1 << 3)
};
/* Reporting of tracking info */
diff --git a/revision.c b/revision.c
index ef60205412..71e62d8312 100644
--- a/revision.c
+++ b/revision.c
@@ -709,7 +709,7 @@ static int still_interesting(struct commit_list *src, unsigned long date, int sl
* Does the destination list contain entries with a date
* before the source list? Definitely _not_ done.
*/
- if (date < src->item->date)
+ if (date <= src->item->date)
return SLOP;
/*
@@ -1970,6 +1970,22 @@ static struct merge_simplify_state *locate_simplify_state(struct rev_info *revs,
return st;
}
+static void remove_treesame_parents(struct commit *commit)
+{
+ struct commit_list **pp, *p;
+
+ pp = &commit->parents;
+ while ((p = *pp) != NULL) {
+ struct commit *parent = p->item;
+ if (parent->object.flags & TREESAME) {
+ *pp = p->next;
+ free(p);
+ continue;
+ }
+ pp = &p->next;
+ }
+}
+
static struct commit_list **simplify_one(struct rev_info *revs, struct commit *commit, struct commit_list **tail)
{
struct commit_list *p;
@@ -2022,10 +2038,18 @@ static struct commit_list **simplify_one(struct rev_info *revs, struct commit *c
if (revs->first_parent_only)
break;
}
- if (!revs->first_parent_only)
- cnt = remove_duplicate_parents(commit);
- else
+
+ if (revs->first_parent_only) {
cnt = 1;
+ } else {
+ /*
+ * A merge with a tree-same parent is useless
+ */
+ if (commit->parents && commit->parents->next)
+ remove_treesame_parents(commit);
+
+ cnt = remove_duplicate_parents(commit);
+ }
/*
* It is possible that we are a merge and one side branch
diff --git a/revision.h b/revision.h
index 5da09ee3ef..01bd2b7c07 100644
--- a/revision.h
+++ b/revision.h
@@ -138,7 +138,7 @@ struct rev_info {
int reroll_count;
char *message_id;
struct string_list *ref_message_ids;
- const char *add_signoff;
+ int add_signoff;
const char *extra_headers;
const char *log_reencode;
const char *subject_prefix;
diff --git a/run-command.c b/run-command.c
index 07e27ff4c8..765c2ce056 100644
--- a/run-command.c
+++ b/run-command.c
@@ -273,7 +273,7 @@ int start_command(struct child_process *cmd)
{
int need_in, need_out, need_err;
int fdin[2], fdout[2], fderr[2];
- int failed_errno = failed_errno;
+ int failed_errno;
char *str;
/*
@@ -341,6 +341,7 @@ fail_pipe:
notify_pipe[0] = notify_pipe[1] = -1;
cmd->pid = fork();
+ failed_errno = errno;
if (!cmd->pid) {
/*
* Redirect the channel to write syscall error messages to
@@ -420,7 +421,7 @@ fail_pipe:
}
if (cmd->pid < 0)
error("cannot fork() for %s: %s", cmd->argv[0],
- strerror(failed_errno = errno));
+ strerror(errno));
else if (cmd->clean_on_exit)
mark_child_for_cleanup(cmd->pid);
diff --git a/sequencer.c b/sequencer.c
index aef5e8a017..baa031052e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -18,6 +18,89 @@
#define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
const char sign_off_header[] = "Signed-off-by: ";
+static const char cherry_picked_prefix[] = "(cherry picked from commit ";
+
+static int is_rfc2822_line(const char *buf, int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++) {
+ int ch = buf[i];
+ if (ch == ':')
+ return 1;
+ if (!isalnum(ch) && ch != '-')
+ break;
+ }
+
+ return 0;
+}
+
+static int is_cherry_picked_from_line(const char *buf, int len)
+{
+ /*
+ * We only care that it looks roughly like (cherry picked from ...)
+ */
+ return len > strlen(cherry_picked_prefix) + 1 &&
+ !prefixcmp(buf, cherry_picked_prefix) && buf[len - 1] == ')';
+}
+
+/*
+ * Returns 0 for non-conforming footer
+ * Returns 1 for conforming footer
+ * Returns 2 when sob exists within conforming footer
+ * Returns 3 when sob exists within conforming footer as last entry
+ */
+static int has_conforming_footer(struct strbuf *sb, struct strbuf *sob,
+ int ignore_footer)
+{
+ char prev;
+ int i, k;
+ int len = sb->len - ignore_footer;
+ const char *buf = sb->buf;
+ int found_sob = 0;
+
+ /* footer must end with newline */
+ if (!len || buf[len - 1] != '\n')
+ return 0;
+
+ prev = '\0';
+ for (i = len - 1; i > 0; i--) {
+ char ch = buf[i];
+ if (prev == '\n' && ch == '\n') /* paragraph break */
+ break;
+ prev = ch;
+ }
+
+ /* require at least one blank line */
+ if (prev != '\n' || buf[i] != '\n')
+ return 0;
+
+ /* advance to start of last paragraph */
+ while (i < len - 1 && buf[i] == '\n')
+ i++;
+
+ for (; i < len; i = k) {
+ int found_rfc2822;
+
+ for (k = i; k < len && buf[k] != '\n'; k++)
+ ; /* do nothing */
+ k++;
+
+ found_rfc2822 = is_rfc2822_line(buf + i, k - i - 1);
+ if (found_rfc2822 && sob &&
+ !strncmp(buf + i, sob->buf, sob->len))
+ found_sob = k;
+
+ if (!(found_rfc2822 ||
+ is_cherry_picked_from_line(buf + i, k - i - 1)))
+ return 0;
+ }
+ if (found_sob == i)
+ return 3;
+ if (found_sob)
+ return 2;
+ return 1;
+}
static void remove_sequencer_state(void)
{
@@ -237,7 +320,7 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
rollback_lock_file(&index_lock);
if (opts->signoff)
- append_signoff(msgbuf, 0);
+ append_signoff(msgbuf, 0, 0);
if (!clean) {
int i;
@@ -496,7 +579,9 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
}
if (opts->record_origin) {
- strbuf_addstr(&msgbuf, "(cherry picked from commit ");
+ if (!has_conforming_footer(&msgbuf, NULL, 0))
+ strbuf_addch(&msgbuf, '\n');
+ strbuf_addstr(&msgbuf, cherry_picked_prefix);
strbuf_addstr(&msgbuf, sha1_to_hex(commit->object.sha1));
strbuf_addstr(&msgbuf, ")\n");
}
@@ -1021,62 +1106,67 @@ int sequencer_pick_revisions(struct replay_opts *opts)
return pick_commits(todo_list, opts);
}
-static int ends_rfc2822_footer(struct strbuf *sb, int ignore_footer)
-{
- int ch;
- int hit = 0;
- int i, j, k;
- int len = sb->len - ignore_footer;
- int first = 1;
- const char *buf = sb->buf;
-
- for (i = len - 1; i > 0; i--) {
- if (hit && buf[i] == '\n')
- break;
- hit = (buf[i] == '\n');
- }
-
- while (i < len - 1 && buf[i] == '\n')
- i++;
-
- for (; i < len; i = k) {
- for (k = i; k < len && buf[k] != '\n'; k++)
- ; /* do nothing */
- k++;
-
- if ((buf[k] == ' ' || buf[k] == '\t') && !first)
- continue;
-
- first = 0;
-
- for (j = 0; i + j < len; j++) {
- ch = buf[i + j];
- if (ch == ':')
- break;
- if (isalnum(ch) ||
- (ch == '-'))
- continue;
- return 0;
- }
- }
- return 1;
-}
-
-void append_signoff(struct strbuf *msgbuf, int ignore_footer)
+void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag)
{
+ unsigned no_dup_sob = flag & APPEND_SIGNOFF_DEDUP;
struct strbuf sob = STRBUF_INIT;
- int i;
+ int has_footer;
strbuf_addstr(&sob, sign_off_header);
strbuf_addstr(&sob, fmt_name(getenv("GIT_COMMITTER_NAME"),
getenv("GIT_COMMITTER_EMAIL")));
strbuf_addch(&sob, '\n');
- for (i = msgbuf->len - 1 - ignore_footer; i > 0 && msgbuf->buf[i - 1] != '\n'; i--)
- ; /* do nothing */
- if (prefixcmp(msgbuf->buf + i, sob.buf)) {
- if (!i || !ends_rfc2822_footer(msgbuf, ignore_footer))
- strbuf_splice(msgbuf, msgbuf->len - ignore_footer, 0, "\n", 1);
- strbuf_splice(msgbuf, msgbuf->len - ignore_footer, 0, sob.buf, sob.len);
+
+ /*
+ * If the whole message buffer is equal to the sob, pretend that we
+ * found a conforming footer with a matching sob
+ */
+ if (msgbuf->len - ignore_footer == sob.len &&
+ !strncmp(msgbuf->buf, sob.buf, sob.len))
+ has_footer = 3;
+ else
+ has_footer = has_conforming_footer(msgbuf, &sob, ignore_footer);
+
+ if (!has_footer) {
+ const char *append_newlines = NULL;
+ size_t len = msgbuf->len - ignore_footer;
+
+ if (!len) {
+ /*
+ * The buffer is completely empty. Leave foom for
+ * the title and body to be filled in by the user.
+ */
+ append_newlines = "\n\n";
+ } else if (msgbuf->buf[len - 1] != '\n') {
+ /*
+ * Incomplete line. Complete the line and add a
+ * blank one so that there is an empty line between
+ * the message body and the sob.
+ */
+ append_newlines = "\n\n";
+ } else if (len == 1) {
+ /*
+ * Buffer contains a single newline. Add another
+ * so that we leave room for the title and body.
+ */
+ append_newlines = "\n";
+ } else if (msgbuf->buf[len - 2] != '\n') {
+ /*
+ * Buffer ends with a single newline. Add another
+ * so that there is an empty line between the message
+ * body and the sob.
+ */
+ append_newlines = "\n";
+ } /* else, the buffer already ends with two newlines. */
+
+ if (append_newlines)
+ strbuf_splice(msgbuf, msgbuf->len - ignore_footer, 0,
+ append_newlines, strlen(append_newlines));
}
+
+ if (has_footer != 3 && (!no_dup_sob || has_footer != 2))
+ strbuf_splice(msgbuf, msgbuf->len - ignore_footer, 0,
+ sob.buf, sob.len);
+
strbuf_release(&sob);
}
diff --git a/sequencer.h b/sequencer.h
index 9d57d57524..1fc22dcabe 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -6,6 +6,8 @@
#define SEQ_TODO_FILE "sequencer/todo"
#define SEQ_OPTS_FILE "sequencer/opts"
+#define APPEND_SIGNOFF_DEDUP (1u << 0)
+
enum replay_action {
REPLAY_REVERT,
REPLAY_PICK
@@ -48,6 +50,6 @@ int sequencer_pick_revisions(struct replay_opts *opts);
extern const char sign_off_header[];
-void append_signoff(struct strbuf *msgbuf, int ignore_footer);
+void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
#endif
diff --git a/setup.c b/setup.c
index 2e1521b09e..94c1e61bda 100644
--- a/setup.c
+++ b/setup.c
@@ -207,10 +207,11 @@ static const char *prefix_pathspec(const char *prefix, int prefixlen, const char
*copyfrom && *copyfrom != ')';
copyfrom = nextat) {
size_t len = strcspn(copyfrom, ",)");
- if (copyfrom[len] == ')')
- nextat = copyfrom + len;
- else
+ if (copyfrom[len] == ',')
nextat = copyfrom + len + 1;
+ else
+ /* handle ')' and '\0' */
+ nextat = copyfrom + len;
if (!len)
continue;
for (i = 0; i < ARRAY_SIZE(pathspec_magic); i++)
@@ -223,8 +224,9 @@ static const char *prefix_pathspec(const char *prefix, int prefixlen, const char
die("Invalid pathspec magic '%.*s' in '%s'",
(int) len, copyfrom, elt);
}
- if (*copyfrom == ')')
- copyfrom++;
+ if (*copyfrom != ')')
+ die("Missing ')' at the end of pathspec magic in '%s'", elt);
+ copyfrom++;
} else {
/* shorthand */
for (copyfrom = elt + 1;
@@ -523,6 +525,12 @@ static const char *setup_explicit_git_dir(const char *gitdirenv,
set_git_work_tree(core_worktree);
}
}
+ else if (!git_env_bool(GIT_IMPLICIT_WORK_TREE_ENVIRONMENT, 1)) {
+ /* #16d */
+ set_git_dir(gitdirenv);
+ free(gitfile);
+ return NULL;
+ }
else /* #2, #10 */
set_git_work_tree(".");
@@ -601,6 +609,8 @@ static const char *setup_bare_git_dir(char *cwd, int offset, int len, int *nongi
if (check_repository_format_gently(".", nongit_ok))
return NULL;
+ setenv(GIT_IMPLICIT_WORK_TREE_ENVIRONMENT, "0", 1);
+
/* --work-tree is set without --git-dir; use discovered one */
if (getenv(GIT_WORK_TREE_ENVIRONMENT) || git_work_tree_cfg) {
const char *gitdir;
@@ -650,22 +660,32 @@ static dev_t get_device_or_die(const char *path, const char *prefix, int prefix_
/*
* A "string_list_each_func_t" function that canonicalizes an entry
* from GIT_CEILING_DIRECTORIES using real_path_if_valid(), or
- * discards it if unusable.
+ * discards it if unusable. The presence of an empty entry in
+ * GIT_CEILING_DIRECTORIES turns off canonicalization for all
+ * subsequent entries.
*/
static int canonicalize_ceiling_entry(struct string_list_item *item,
- void *unused)
+ void *cb_data)
{
+ int *empty_entry_found = cb_data;
char *ceil = item->string;
- const char *real_path;
- if (!*ceil || !is_absolute_path(ceil))
+ if (!*ceil) {
+ *empty_entry_found = 1;
return 0;
- real_path = real_path_if_valid(ceil);
- if (!real_path)
+ } else if (!is_absolute_path(ceil)) {
return 0;
- free(item->string);
- item->string = xstrdup(real_path);
- return 1;
+ } else if (*empty_entry_found) {
+ /* Keep entry but do not canonicalize it */
+ return 1;
+ } else {
+ const char *real_path = real_path_if_valid(ceil);
+ if (!real_path)
+ return 0;
+ free(item->string);
+ item->string = xstrdup(real_path);
+ return 1;
+ }
}
/*
@@ -705,9 +725,11 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
return setup_explicit_git_dir(gitdirenv, cwd, len, nongit_ok);
if (env_ceiling_dirs) {
+ int empty_entry_found = 0;
+
string_list_split(&ceiling_dirs, env_ceiling_dirs, PATH_SEP, -1);
filter_string_list(&ceiling_dirs, 0,
- canonicalize_ceiling_entry, NULL);
+ canonicalize_ceiling_entry, &empty_entry_found);
ceil_offset = longest_ancestor_length(cwd, &ceiling_dirs);
string_list_clear(&ceiling_dirs, 0);
}
@@ -782,9 +804,9 @@ const char *setup_git_directory_gently(int *nongit_ok)
prefix = setup_git_directory_gently_1(nongit_ok);
if (prefix)
- setenv("GIT_PREFIX", prefix, 1);
+ setenv(GIT_PREFIX_ENVIRONMENT, prefix, 1);
else
- setenv("GIT_PREFIX", "", 1);
+ setenv(GIT_PREFIX_ENVIRONMENT, "", 1);
if (startup_info) {
startup_info->have_repository = !nongit_ok || !*nongit_ok;
diff --git a/sha1_file.c b/sha1_file.c
index 40b23297b2..16967d3b9a 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -21,6 +21,7 @@
#include "sha1-lookup.h"
#include "bulk-checkin.h"
#include "streaming.h"
+#include "dir.h"
#ifndef O_NOATIME
#if defined(__linux__) && (defined(__i386__) || defined(__PPC__))
@@ -1000,6 +1001,63 @@ void install_packed_git(struct packed_git *pack)
packed_git = pack;
}
+void (*report_garbage)(const char *desc, const char *path);
+
+static void report_helper(const struct string_list *list,
+ int seen_bits, int first, int last)
+{
+ const char *msg;
+ switch (seen_bits) {
+ case 0:
+ msg = "no corresponding .idx nor .pack";
+ break;
+ case 1:
+ msg = "no corresponding .idx";
+ break;
+ case 2:
+ msg = "no corresponding .pack";
+ break;
+ default:
+ return;
+ }
+ for (; first < last; first++)
+ report_garbage(msg, list->items[first].string);
+}
+
+static void report_pack_garbage(struct string_list *list)
+{
+ int i, baselen = -1, first = 0, seen_bits = 0;
+
+ if (!report_garbage)
+ return;
+
+ sort_string_list(list);
+
+ for (i = 0; i < list->nr; i++) {
+ const char *path = list->items[i].string;
+ if (baselen != -1 &&
+ strncmp(path, list->items[first].string, baselen)) {
+ report_helper(list, seen_bits, first, i);
+ baselen = -1;
+ seen_bits = 0;
+ }
+ if (baselen == -1) {
+ const char *dot = strrchr(path, '.');
+ if (!dot) {
+ report_garbage("garbage found", path);
+ continue;
+ }
+ baselen = dot - path + 1;
+ first = i;
+ }
+ if (!strcmp(path + baselen, "pack"))
+ seen_bits |= 1;
+ else if (!strcmp(path + baselen, "idx"))
+ seen_bits |= 2;
+ }
+ report_helper(list, seen_bits, first, list->nr);
+}
+
static void prepare_packed_git_one(char *objdir, int local)
{
/* Ensure that this buffer is large enough so that we can
@@ -1009,6 +1067,7 @@ static void prepare_packed_git_one(char *objdir, int local)
int len;
DIR *dir;
struct dirent *de;
+ struct string_list garbage = STRING_LIST_INIT_DUP;
sprintf(path, "%s/pack", objdir);
len = strlen(path);
@@ -1024,29 +1083,49 @@ static void prepare_packed_git_one(char *objdir, int local)
int namelen = strlen(de->d_name);
struct packed_git *p;
- if (!has_extension(de->d_name, ".idx"))
+ if (len + namelen + 1 > sizeof(path)) {
+ if (report_garbage) {
+ struct strbuf sb = STRBUF_INIT;
+ strbuf_addf(&sb, "%.*s/%s", len - 1, path, de->d_name);
+ report_garbage("path too long", sb.buf);
+ strbuf_release(&sb);
+ }
continue;
+ }
- if (len + namelen + 1 > sizeof(path))
+ if (is_dot_or_dotdot(de->d_name))
continue;
- /* Don't reopen a pack we already have. */
strcpy(path + len, de->d_name);
- for (p = packed_git; p; p = p->next) {
- if (!memcmp(path, p->pack_name, len + namelen - 4))
- break;
+
+ if (has_extension(de->d_name, ".idx")) {
+ /* Don't reopen a pack we already have. */
+ for (p = packed_git; p; p = p->next) {
+ if (!memcmp(path, p->pack_name, len + namelen - 4))
+ break;
+ }
+ if (p == NULL &&
+ /*
+ * See if it really is a valid .idx file with
+ * corresponding .pack file that we can map.
+ */
+ (p = add_packed_git(path, len + namelen, local)) != NULL)
+ install_packed_git(p);
}
- if (p)
- continue;
- /* See if it really is a valid .idx file with corresponding
- * .pack file that we can map.
- */
- p = add_packed_git(path, len + namelen, local);
- if (!p)
+
+ if (!report_garbage)
continue;
- install_packed_git(p);
+
+ if (has_extension(de->d_name, ".idx") ||
+ has_extension(de->d_name, ".pack") ||
+ has_extension(de->d_name, ".keep"))
+ string_list_append(&garbage, path);
+ else
+ report_garbage("garbage found", path);
}
closedir(dir);
+ report_pack_garbage(&garbage);
+ string_list_clear(&garbage, 0);
}
static int sort_pack(const void *a_, const void *b_)
diff --git a/sha1_name.c b/sha1_name.c
index 95003c77ea..2fbda48e02 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -856,8 +856,8 @@ static int get_sha1_oneline(const char *prefix, unsigned char *sha1,
}
struct grab_nth_branch_switch_cbdata {
- long cnt, alloc;
- struct strbuf *buf;
+ int remaining;
+ struct strbuf buf;
};
static int grab_nth_branch_switch(unsigned char *osha1, unsigned char *nsha1,
@@ -867,7 +867,6 @@ static int grab_nth_branch_switch(unsigned char *osha1, unsigned char *nsha1,
struct grab_nth_branch_switch_cbdata *cb = cb_data;
const char *match = NULL, *target = NULL;
size_t len;
- int nth;
if (!prefixcmp(message, "checkout: moving from ")) {
match = message + strlen("checkout: moving from ");
@@ -876,11 +875,12 @@ static int grab_nth_branch_switch(unsigned char *osha1, unsigned char *nsha1,
if (!match || !target)
return 0;
-
- len = target - match;
- nth = cb->cnt++ % cb->alloc;
- strbuf_reset(&cb->buf[nth]);
- strbuf_add(&cb->buf[nth], match, len);
+ if (--(cb->remaining) == 0) {
+ len = target - match;
+ strbuf_reset(&cb->buf);
+ strbuf_add(&cb->buf, match, len);
+ return 1; /* we are done */
+ }
return 0;
}
@@ -891,7 +891,7 @@ static int grab_nth_branch_switch(unsigned char *osha1, unsigned char *nsha1,
static int interpret_nth_prior_checkout(const char *name, struct strbuf *buf)
{
long nth;
- int i, retval;
+ int retval;
struct grab_nth_branch_switch_cbdata cb;
const char *brace;
char *num_end;
@@ -901,34 +901,22 @@ static int interpret_nth_prior_checkout(const char *name, struct strbuf *buf)
brace = strchr(name, '}');
if (!brace)
return -1;
- nth = strtol(name+3, &num_end, 10);
+ nth = strtol(name + 3, &num_end, 10);
if (num_end != brace)
return -1;
if (nth <= 0)
return -1;
- cb.alloc = nth;
- cb.buf = xmalloc(nth * sizeof(struct strbuf));
- for (i = 0; i < nth; i++)
- strbuf_init(&cb.buf[i], 20);
- cb.cnt = 0;
+ cb.remaining = nth;
+ strbuf_init(&cb.buf, 20);
+
retval = 0;
- for_each_recent_reflog_ent("HEAD", grab_nth_branch_switch, 40960, &cb);
- if (cb.cnt < nth) {
- cb.cnt = 0;
- for_each_reflog_ent("HEAD", grab_nth_branch_switch, &cb);
+ if (0 < for_each_reflog_ent_reverse("HEAD", grab_nth_branch_switch, &cb)) {
+ strbuf_reset(buf);
+ strbuf_add(buf, cb.buf.buf, cb.buf.len);
+ retval = brace - name + 1;
}
- if (cb.cnt < nth)
- goto release_return;
- i = cb.cnt % nth;
- strbuf_reset(buf);
- strbuf_add(buf, cb.buf[i].buf, cb.buf[i].len);
- retval = brace-name+1;
-
-release_return:
- for (i = 0; i < nth; i++)
- strbuf_release(&cb.buf[i]);
- free(cb.buf);
+ strbuf_release(&cb.buf);
return retval;
}
@@ -1137,7 +1125,8 @@ int get_sha1_blob(const char *name, unsigned char *sha1)
static void diagnose_invalid_sha1_path(const char *prefix,
const char *filename,
const unsigned char *tree_sha1,
- const char *object_name)
+ const char *object_name,
+ int object_name_len)
{
struct stat st;
unsigned char sha1[20];
@@ -1147,8 +1136,8 @@ static void diagnose_invalid_sha1_path(const char *prefix,
prefix = "";
if (!lstat(filename, &st))
- die("Path '%s' exists on disk, but not in '%s'.",
- filename, object_name);
+ die("Path '%s' exists on disk, but not in '%.*s'.",
+ filename, object_name_len, object_name);
if (errno == ENOENT || errno == ENOTDIR) {
char *fullname = xmalloc(strlen(filename)
+ strlen(prefix) + 1);
@@ -1158,16 +1147,16 @@ static void diagnose_invalid_sha1_path(const char *prefix,
if (!get_tree_entry(tree_sha1, fullname,
sha1, &mode)) {
die("Path '%s' exists, but not '%s'.\n"
- "Did you mean '%s:%s' aka '%s:./%s'?",
+ "Did you mean '%.*s:%s' aka '%.*s:./%s'?",
fullname,
filename,
- object_name,
+ object_name_len, object_name,
fullname,
- object_name,
+ object_name_len, object_name,
filename);
}
- die("Path '%s' does not exist in '%s'",
- filename, object_name);
+ die("Path '%s' does not exist in '%.*s'",
+ filename, object_name_len, object_name);
}
}
@@ -1332,13 +1321,8 @@ static int get_sha1_with_context_1(const char *name,
}
if (*cp == ':') {
unsigned char tree_sha1[20];
- char *object_name = NULL;
- if (only_to_die) {
- object_name = xmalloc(cp-name+1);
- strncpy(object_name, name, cp-name);
- object_name[cp-name] = '\0';
- }
- if (!get_sha1_1(name, cp-name, tree_sha1, GET_SHA1_TREEISH)) {
+ int len = cp - name;
+ if (!get_sha1_1(name, len, tree_sha1, GET_SHA1_TREEISH)) {
const char *filename = cp+1;
char *new_filename = NULL;
@@ -1348,8 +1332,8 @@ static int get_sha1_with_context_1(const char *name,
ret = get_tree_entry(tree_sha1, filename, sha1, &oc->mode);
if (ret && only_to_die) {
diagnose_invalid_sha1_path(prefix, filename,
- tree_sha1, object_name);
- free(object_name);
+ tree_sha1,
+ name, len);
}
hashcpy(oc->tree, tree_sha1);
strncpy(oc->path, filename,
@@ -1360,7 +1344,7 @@ static int get_sha1_with_context_1(const char *name,
return ret;
} else {
if (only_to_die)
- die("Invalid object name '%s'.", object_name);
+ die("Invalid object name '%.*s'.", len, name);
}
}
return ret;
diff --git a/shell.c b/shell.c
index 84b237fef3..1429870a8f 100644
--- a/shell.c
+++ b/shell.c
@@ -6,6 +6,7 @@
#define COMMAND_DIR "git-shell-commands"
#define HELP_COMMAND COMMAND_DIR "/help"
+#define NOLOGIN_COMMAND COMMAND_DIR "/no-interactive-login"
static int do_generic_cmd(const char *me, char *arg)
{
@@ -65,6 +66,18 @@ static void run_shell(void)
{
int done = 0;
static const char *help_argv[] = { HELP_COMMAND, NULL };
+
+ if (!access(NOLOGIN_COMMAND, F_OK)) {
+ /* Interactive login disabled. */
+ const char *argv[] = { NOLOGIN_COMMAND, NULL };
+ int status;
+
+ status = run_command_v_opt(argv, 0);
+ if (status < 0)
+ exit(127);
+ exit(status);
+ }
+
/* Print help if enabled */
run_command_v_opt(help_argv, RUN_SILENT_EXEC_FAILURE);
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index 199f22c231..c5e55b190b 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -148,7 +148,7 @@ stop_httpd () {
convert_to_rev_db () {
"$PERL_PATH" -w -- - "$@" <<\EOF
use strict;
-@ARGV == 2 or die "Usage: convert_to_rev_db <input> <output>";
+@ARGV == 2 or die "usage: convert_to_rev_db <input> <output>";
open my $wr, '+>', $ARGV[1] or die "$!: couldn't open: $ARGV[1]";
open my $rd, '<', $ARGV[0] or die "$!: couldn't open: $ARGV[0]";
my $size = (stat($rd))[7];
diff --git a/t/perf/README b/t/perf/README
index b2dbad4d50..c552f561bf 100644
--- a/t/perf/README
+++ b/t/perf/README
@@ -56,7 +56,7 @@ You can set the following variables (also in your config.mak):
GIT_PERF_REPEAT_COUNT
Number of times a test should be repeated for best-of-N
- measurements. Defaults to 5.
+ measurements. Defaults to 3.
GIT_PERF_MAKE_OPTS
Options to use when automatically building a git tree for
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 43b25137e9..0b98b6f8d0 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -198,7 +198,8 @@ test_expect_success 'root subdir attribute test' '
test_expect_success 'negative patterns' '
echo "!f test=bar" >.gitattributes &&
- test_must_fail git check-attr test -- f
+ git check-attr test -- '"'"'!f'"'"' 2>errors &&
+ test_i18ngrep "Negative patterns are ignored" errors
'
test_expect_success 'patterns starting with exclamation' '
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index d7df7198c4..9c1bde1fd6 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -75,6 +75,16 @@ test_check_ignore () {
stderr_empty_on_success "$expect_code"
}
+# Runs the same code with 3 different levels of output verbosity,
+# expecting success each time. Takes advantage of the fact that
+# check-ignore --verbose output is the same as normal output except
+# for the extra first column.
+#
+# Arguments:
+# - (optional) prereqs for this test, e.g. 'SYMLINKS'
+# - test name
+# - output to expect from -v / --verbose mode
+# - code to run (should invoke test_check_ignore)
test_expect_success_multi () {
prereq=
if test $# -eq 4
@@ -128,6 +138,7 @@ test_expect_success 'setup' '
cat <<-\EOF >.gitignore &&
one
ignored-*
+ top-level-dir/
EOF
for dir in . a
do
@@ -167,6 +178,10 @@ test_expect_success 'setup' '
#
# test invalid inputs
+test_expect_success_multi '. corner-case' '' '
+ test_check_ignore . 1
+'
+
test_expect_success_multi 'empty command line' '' '
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
diff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh
index 5378787e1b..4e9fa3cd68 100755
--- a/t/t0024-crlf-archive.sh
+++ b/t/t0024-crlf-archive.sh
@@ -3,12 +3,6 @@
test_description='respect crlf in git archive'
. ./test-lib.sh
-GIT_UNZIP=${GIT_UNZIP:-unzip}
-
-test_lazy_prereq UNZIP '
- "$GIT_UNZIP" -v
- test $? -ne 127
-'
test_expect_success setup '
diff --git a/t/t1504-ceiling-dirs.sh b/t/t1504-ceiling-dirs.sh
index cce87a5ab5..3d51615e42 100755
--- a/t/t1504-ceiling-dirs.sh
+++ b/t/t1504-ceiling-dirs.sh
@@ -44,6 +44,10 @@ test_prefix ceil_at_sub ""
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
test_prefix ceil_at_sub_slash ""
+if test_have_prereq SYMLINKS
+then
+ ln -s sub top
+fi
mkdir -p sub/dir || exit 1
cd sub/dir || exit 1
@@ -68,6 +72,19 @@ test_fail subdir_ceil_at_sub
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
test_fail subdir_ceil_at_sub_slash
+if test_have_prereq SYMLINKS
+then
+ GIT_CEILING_DIRECTORIES="$TRASH_ROOT/top"
+ test_fail subdir_ceil_at_top
+ GIT_CEILING_DIRECTORIES="$TRASH_ROOT/top/"
+ test_fail subdir_ceil_at_top_slash
+
+ GIT_CEILING_DIRECTORIES=":$TRASH_ROOT/top"
+ test_prefix subdir_ceil_at_top_no_resolve "sub/dir/"
+ GIT_CEILING_DIRECTORIES=":$TRASH_ROOT/top/"
+ test_prefix subdir_ceil_at_top_slash_no_resolve "sub/dir/"
+fi
+
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/dir"
test_prefix subdir_ceil_at_subdir "sub/dir/"
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index d6e576192f..b27a7209f7 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -54,6 +54,10 @@ test_expect_success 'my-side@{upstream} resolves to correct full name' '
test refs/remotes/origin/side = "$(full_name my-side@{u})"
'
+test_expect_success 'refs/heads/my-side@{upstream} does not resolve to my-side{upstream}' '
+ test_must_fail full_name refs/heads/my-side@{upstream}
+'
+
test_expect_success 'my-side@{u} resolves to correct commit' '
git checkout side &&
test_commit 5 &&
diff --git a/t/t1509/prepare-chroot.sh b/t/t1509/prepare-chroot.sh
index c5334a8fa4..62691172e3 100755
--- a/t/t1509/prepare-chroot.sh
+++ b/t/t1509/prepare-chroot.sh
@@ -14,7 +14,7 @@ xmkdir() {
R="$1"
-[ -n "$R" ] || die "Usage: prepare-chroot.sh <root>"
+[ -n "$R" ] || die "usage: prepare-chroot.sh <root>"
[ -x git ] || die "This script needs to be executed at git source code's top directory"
[ -x /bin/busybox ] || die "You need busybox"
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index 80aedfca8c..cf2ee7885a 100755
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
@@ -517,6 +517,25 @@ test_expect_success '#16c: bare .git has no worktree' '
"$here/16c/.git" "(null)" "$here/16c/sub" "(null)"
'
+test_expect_success '#16d: bareness preserved across alias' '
+ setup_repo 16d unset "" unset &&
+ (
+ cd 16d/.git &&
+ test_must_fail git status &&
+ git config alias.st status &&
+ test_must_fail git st
+ )
+'
+
+test_expect_success '#16e: bareness preserved by --bare' '
+ setup_repo 16e unset "" unset &&
+ (
+ cd 16e/.git &&
+ test_must_fail git status &&
+ test_must_fail git --bare status
+ )
+'
+
test_expect_success '#17: GIT_WORK_TREE without explicit GIT_DIR is accepted (bare case)' '
# Just like #16.
setup_repo 17a unset "" true &&
diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
index 02a4fc5d36..ff163cf675 100755
--- a/t/t2003-checkout-cache-mkdir.sh
+++ b/t/t2003-checkout-cache-mkdir.sh
@@ -12,85 +12,108 @@ the GIT controlled paths.
. ./test-lib.sh
-test_expect_success \
- 'setup' \
- 'mkdir path1 &&
- echo frotz >path0 &&
- echo rezrov >path1/file1 &&
- git update-index --add path0 path1/file1'
+test_expect_success 'setup' '
+ mkdir path1 &&
+ echo frotz >path0 &&
+ echo rezrov >path1/file1 &&
+ git update-index --add path0 path1/file1
+'
+
+test_expect_success SYMLINKS 'have symlink in place where dir is expected.' '
+ rm -fr path0 path1 &&
+ mkdir path2 &&
+ ln -s path2 path1 &&
+ git checkout-index -f -a &&
+ test ! -h path1 && test -d path1 &&
+ test -f path1/file1 && test ! -f path2/file1
+'
-test_expect_success SYMLINKS \
- 'have symlink in place where dir is expected.' \
- 'rm -fr path0 path1 &&
- mkdir path2 &&
- ln -s path2 path1 &&
- git checkout-index -f -a &&
- test ! -h path1 && test -d path1 &&
- test -f path1/file1 && test ! -f path2/file1'
+test_expect_success 'use --prefix=path2/' '
+ rm -fr path0 path1 path2 &&
+ mkdir path2 &&
+ git checkout-index --prefix=path2/ -f -a &&
+ test -f path2/path0 &&
+ test -f path2/path1/file1 &&
+ test ! -f path0 &&
+ test ! -f path1/file1
+'
+
+test_expect_success 'use --prefix=tmp-' '
+ rm -fr path0 path1 path2 tmp* &&
+ git checkout-index --prefix=tmp- -f -a &&
+ test -f tmp-path0 &&
+ test -f tmp-path1/file1 &&
+ test ! -f path0 &&
+ test ! -f path1/file1
+'
-test_expect_success \
- 'use --prefix=path2/' \
- 'rm -fr path0 path1 path2 &&
- mkdir path2 &&
- git checkout-index --prefix=path2/ -f -a &&
- test -f path2/path0 &&
- test -f path2/path1/file1 &&
- test ! -f path0 &&
- test ! -f path1/file1'
+test_expect_success 'use --prefix=tmp- but with a conflicting file and dir' '
+ rm -fr path0 path1 path2 tmp* &&
+ echo nitfol >tmp-path1 &&
+ mkdir tmp-path0 &&
+ git checkout-index --prefix=tmp- -f -a &&
+ test -f tmp-path0 &&
+ test -f tmp-path1/file1 &&
+ test ! -f path0 &&
+ test ! -f path1/file1
+'
-test_expect_success \
- 'use --prefix=tmp-' \
- 'rm -fr path0 path1 path2 tmp* &&
- git checkout-index --prefix=tmp- -f -a &&
- test -f tmp-path0 &&
- test -f tmp-path1/file1 &&
- test ! -f path0 &&
- test ! -f path1/file1'
+test_expect_success SYMLINKS 'use --prefix=tmp/orary/ where tmp is a symlink' '
+ rm -fr path0 path1 path2 tmp* &&
+ mkdir tmp1 tmp1/orary &&
+ ln -s tmp1 tmp &&
+ git checkout-index --prefix=tmp/orary/ -f -a &&
+ test -d tmp1/orary &&
+ test -f tmp1/orary/path0 &&
+ test -f tmp1/orary/path1/file1 &&
+ test -h tmp
+'
-test_expect_success \
- 'use --prefix=tmp- but with a conflicting file and dir' \
- 'rm -fr path0 path1 path2 tmp* &&
- echo nitfol >tmp-path1 &&
- mkdir tmp-path0 &&
- git checkout-index --prefix=tmp- -f -a &&
- test -f tmp-path0 &&
- test -f tmp-path1/file1 &&
- test ! -f path0 &&
- test ! -f path1/file1'
+test_expect_success SYMLINKS 'use --prefix=tmp/orary- where tmp is a symlink' '
+ rm -fr path0 path1 path2 tmp* &&
+ mkdir tmp1 &&
+ ln -s tmp1 tmp &&
+ git checkout-index --prefix=tmp/orary- -f -a &&
+ test -f tmp1/orary-path0 &&
+ test -f tmp1/orary-path1/file1 &&
+ test -h tmp
+'
-# Linus fix #1
-test_expect_success SYMLINKS \
- 'use --prefix=tmp/orary/ where tmp is a symlink' \
- 'rm -fr path0 path1 path2 tmp* &&
- mkdir tmp1 tmp1/orary &&
- ln -s tmp1 tmp &&
- git checkout-index --prefix=tmp/orary/ -f -a &&
- test -d tmp1/orary &&
- test -f tmp1/orary/path0 &&
- test -f tmp1/orary/path1/file1 &&
- test -h tmp'
+test_expect_success SYMLINKS 'use --prefix=tmp- where tmp-path1 is a symlink' '
+ rm -fr path0 path1 path2 tmp* &&
+ mkdir tmp1 &&
+ ln -s tmp1 tmp-path1 &&
+ git checkout-index --prefix=tmp- -f -a &&
+ test -f tmp-path0 &&
+ test ! -h tmp-path1 &&
+ test -d tmp-path1 &&
+ test -f tmp-path1/file1
+'
-# Linus fix #2
-test_expect_success SYMLINKS \
- 'use --prefix=tmp/orary- where tmp is a symlink' \
- 'rm -fr path0 path1 path2 tmp* &&
- mkdir tmp1 &&
- ln -s tmp1 tmp &&
- git checkout-index --prefix=tmp/orary- -f -a &&
- test -f tmp1/orary-path0 &&
- test -f tmp1/orary-path1/file1 &&
- test -h tmp'
+test_expect_success 'apply filter from working tree .gitattributes with --prefix' '
+ rm -fr path0 path1 path2 tmp* &&
+ mkdir path1 &&
+ mkdir tmp &&
+ git config filter.replace-all.smudge "sed -e s/./,/g" &&
+ git config filter.replace-all.clean cat &&
+ git config filter.replace-all.required true &&
+ echo "file1 filter=replace-all" >path1/.gitattributes &&
+ git checkout-index --prefix=tmp/ -f -a &&
+ echo frotz >expected &&
+ test_cmp expected tmp/path0 &&
+ echo ,,,,,, >expected &&
+ test_cmp expected tmp/path1/file1
+'
-# Linus fix #3
-test_expect_success SYMLINKS \
- 'use --prefix=tmp- where tmp-path1 is a symlink' \
- 'rm -fr path0 path1 path2 tmp* &&
- mkdir tmp1 &&
- ln -s tmp1 tmp-path1 &&
- git checkout-index --prefix=tmp- -f -a &&
- test -f tmp-path0 &&
- test ! -h tmp-path1 &&
- test -d tmp-path1 &&
- test -f tmp-path1/file1'
+test_expect_success 'apply CRLF filter from working tree .gitattributes with --prefix' '
+ rm -fr path0 path1 path2 tmp* &&
+ mkdir path1 &&
+ mkdir tmp &&
+ echo "file1 eol=crlf" >path1/.gitattributes &&
+ git checkout-index --prefix=tmp/ -f -a &&
+ echo rezrovQ >expected &&
+ tr \\015 Q <tmp/path1/file1 >actual &&
+ test_cmp expected actual
+'
test_done
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 4cdebda6a5..c317254b9a 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -80,6 +80,22 @@ test_expect_success 'change gets noticed' '
'
+# Note that this is scheduled to change in Git 2.0, when
+# "git add -u" will become full-tree by default.
+test_expect_success 'non-limited update in subdir leaves root alone' '
+ (
+ cd dir1 &&
+ echo even more >>sub2 &&
+ git add -u
+ ) &&
+ cat >expect <<-\EOF &&
+ check
+ top
+ EOF
+ git diff-files --name-only >actual &&
+ test_cmp expect actual
+'
+
test_expect_success SYMLINKS 'replace a file with a symlink' '
rm foo &&
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index f3e0e4a38c..b08c9f2295 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -7,20 +7,18 @@ test_description='git branch assorted tests'
. ./test-lib.sh
-test_expect_success \
- 'prepare a trivial repository' \
- 'echo Hello > A &&
- git update-index --add A &&
- git commit -m "Initial commit." &&
- echo World >> A &&
- git update-index --add A &&
- git commit -m "Second commit." &&
- HEAD=$(git rev-parse --verify HEAD)'
-
-test_expect_success \
- 'git branch --help should not have created a bogus branch' '
- test_might_fail git branch --help </dev/null >/dev/null 2>/dev/null &&
- test_path_is_missing .git/refs/heads/--help
+test_expect_success 'prepare a trivial repository' '
+ echo Hello >A &&
+ git update-index --add A &&
+ git commit -m "Initial commit." &&
+ echo World >>A &&
+ git update-index --add A &&
+ git commit -m "Second commit." &&
+ HEAD=$(git rev-parse --verify HEAD)'
+
+test_expect_success 'git branch --help should not have created a bogus branch' '
+ test_might_fail git branch --help </dev/null >/dev/null 2>/dev/null &&
+ test_path_is_missing .git/refs/heads/--help
'
test_expect_success 'branch -h in broken repository' '
@@ -34,63 +32,67 @@ test_expect_success 'branch -h in broken repository' '
test_i18ngrep "[Uu]sage" broken/usage
'
-test_expect_success \
- 'git branch abc should create a branch' \
- 'git branch abc && test_path_is_file .git/refs/heads/abc'
+test_expect_success 'git branch abc should create a branch' '
+ git branch abc && test_path_is_file .git/refs/heads/abc
+'
+
+test_expect_success 'git branch a/b/c should create a branch' '
+ git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c
+'
-test_expect_success \
- 'git branch a/b/c should create a branch' \
- 'git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c'
+test_expect_success 'git branch HEAD should fail' '
+ test_must_fail git branch HEAD
+'
cat >expect <<EOF
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
EOF
-test_expect_success \
- 'git branch -l d/e/f should create a branch and a log' \
- 'GIT_COMMITTER_DATE="2005-05-26 23:30" \
- git branch -l d/e/f &&
- test_path_is_file .git/refs/heads/d/e/f &&
- test_path_is_file .git/logs/refs/heads/d/e/f &&
- test_cmp expect .git/logs/refs/heads/d/e/f'
-
-test_expect_success \
- 'git branch -d d/e/f should delete a branch and a log' \
- 'git branch -d d/e/f &&
- test_path_is_missing .git/refs/heads/d/e/f &&
- test_path_is_missing .git/logs/refs/heads/d/e/f'
-
-test_expect_success \
- 'git branch j/k should work after branch j has been deleted' \
- 'git branch j &&
- git branch -d j &&
- git branch j/k'
-
-test_expect_success \
- 'git branch l should work after branch l/m has been deleted' \
- 'git branch l/m &&
- git branch -d l/m &&
- git branch l'
-
-test_expect_success \
- 'git branch -m dumps usage' \
- 'test_expect_code 128 git branch -m 2>err &&
- test_i18ngrep "too many branches for a rename operation" err'
-
-test_expect_success \
- 'git branch -m m m/m should work' \
- 'git branch -l m &&
- git branch -m m m/m &&
- test_path_is_file .git/logs/refs/heads/m/m'
-
-test_expect_success \
- 'git branch -m n/n n should work' \
- 'git branch -l n/n &&
+test_expect_success 'git branch -l d/e/f should create a branch and a log' '
+ GIT_COMMITTER_DATE="2005-05-26 23:30" \
+ git branch -l d/e/f &&
+ test_path_is_file .git/refs/heads/d/e/f &&
+ test_path_is_file .git/logs/refs/heads/d/e/f &&
+ test_cmp expect .git/logs/refs/heads/d/e/f
+'
+
+test_expect_success 'git branch -d d/e/f should delete a branch and a log' '
+ git branch -d d/e/f &&
+ test_path_is_missing .git/refs/heads/d/e/f &&
+ test_path_is_missing .git/logs/refs/heads/d/e/f
+'
+
+test_expect_success 'git branch j/k should work after branch j has been deleted' '
+ git branch j &&
+ git branch -d j &&
+ git branch j/k
+'
+
+test_expect_success 'git branch l should work after branch l/m has been deleted' '
+ git branch l/m &&
+ git branch -d l/m &&
+ git branch l
+'
+
+test_expect_success 'git branch -m dumps usage' '
+ test_expect_code 128 git branch -m 2>err &&
+ test_i18ngrep "too many branches for a rename operation" err
+'
+
+test_expect_success 'git branch -m m m/m should work' '
+ git branch -l m &&
+ git branch -m m m/m &&
+ test_path_is_file .git/logs/refs/heads/m/m
+'
+
+test_expect_success 'git branch -m n/n n should work' '
+ git branch -l n/n &&
git branch -m n/n n &&
- test_path_is_file .git/logs/refs/heads/n'
+ test_path_is_file .git/logs/refs/heads/n
+'
test_expect_success 'git branch -m o/o o should fail when o/p exists' '
git branch o/o &&
- git branch o/p &&
+ git branch o/p &&
test_must_fail git branch -m o/o o
'
@@ -248,19 +250,20 @@ mv .git/config-saved .git/config
git config branch.s/s.dummy Hello
-test_expect_success \
- 'git branch -m s/s s should work when s/t is deleted' \
- 'git branch -l s/s &&
+test_expect_success 'git branch -m s/s s should work when s/t is deleted' '
+ git branch -l s/s &&
test_path_is_file .git/logs/refs/heads/s/s &&
- git branch -l s/t &&
+ git branch -l s/t &&
test_path_is_file .git/logs/refs/heads/s/t &&
- git branch -d s/t &&
- git branch -m s/s s &&
- test_path_is_file .git/logs/refs/heads/s'
+ git branch -d s/t &&
+ git branch -m s/s s &&
+ test_path_is_file .git/logs/refs/heads/s
+'
-test_expect_success 'config information was renamed, too' \
- "test $(git config branch.s.dummy) = Hello &&
- test_must_fail git config branch.s/s/dummy"
+test_expect_success 'config information was renamed, too' '
+ test $(git config branch.s.dummy) = Hello &&
+ test_must_fail git config branch.s/s/dummy
+'
test_expect_success 'deleting a symref' '
git branch target &&
@@ -281,8 +284,7 @@ test_expect_success 'deleting a dangling symref' '
test_i18ncmp expect actual
'
-test_expect_success 'renaming a symref is not allowed' \
-'
+test_expect_success 'renaming a symref is not allowed' '
git symbolic-ref refs/heads/master2 refs/heads/master &&
test_must_fail git branch -m master2 master3 &&
git symbolic-ref refs/heads/master2 &&
@@ -290,146 +292,179 @@ test_expect_success 'renaming a symref is not allowed' \
test_path_is_missing .git/refs/heads/master3
'
-test_expect_success SYMLINKS \
- 'git branch -m u v should fail when the reflog for u is a symlink' '
- git branch -l u &&
- mv .git/logs/refs/heads/u real-u &&
- ln -s real-u .git/logs/refs/heads/u &&
- test_must_fail git branch -m u v
-'
-
-test_expect_success 'test tracking setup via --track' \
- 'git config remote.local.url . &&
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track my1 local/master &&
- test $(git config branch.my1.remote) = local &&
- test $(git config branch.my1.merge) = refs/heads/master'
-
-test_expect_success 'test tracking setup (non-wildcard, matching)' \
- 'git config remote.local.url . &&
- git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track my4 local/master &&
- test $(git config branch.my4.remote) = local &&
- test $(git config branch.my4.merge) = refs/heads/master'
-
-test_expect_success 'test tracking setup (non-wildcard, not matching)' \
- 'git config remote.local.url . &&
- git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track my5 local/master &&
- ! test "$(git config branch.my5.remote)" = local &&
- ! test "$(git config branch.my5.merge)" = refs/heads/master'
-
-test_expect_success 'test tracking setup via config' \
- 'git config branch.autosetupmerge true &&
- git config remote.local.url . &&
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch my3 local/master &&
- test $(git config branch.my3.remote) = local &&
- test $(git config branch.my3.merge) = refs/heads/master'
-
-test_expect_success 'test overriding tracking setup via --no-track' \
- 'git config branch.autosetupmerge true &&
- git config remote.local.url . &&
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track my2 local/master &&
- git config branch.autosetupmerge false &&
- ! test "$(git config branch.my2.remote)" = local &&
- ! test "$(git config branch.my2.merge)" = refs/heads/master'
-
-test_expect_success 'no tracking without .fetch entries' \
- 'git config branch.autosetupmerge true &&
- git branch my6 s &&
- git config branch.automsetupmerge false &&
- test -z "$(git config branch.my6.remote)" &&
- test -z "$(git config branch.my6.merge)"'
-
-test_expect_success 'test tracking setup via --track but deeper' \
- 'git config remote.local.url . &&
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/o/o || git fetch local) &&
- git branch --track my7 local/o/o &&
- test "$(git config branch.my7.remote)" = local &&
- test "$(git config branch.my7.merge)" = refs/heads/o/o'
-
-test_expect_success 'test deleting branch deletes branch config' \
- 'git branch -d my7 &&
- test -z "$(git config branch.my7.remote)" &&
- test -z "$(git config branch.my7.merge)"'
-
-test_expect_success 'test deleting branch without config' \
- 'git branch my7 s &&
- sha1=$(git rev-parse my7 | cut -c 1-7) &&
- echo "Deleted branch my7 (was $sha1)." >expect &&
- git branch -d my7 >actual 2>&1 &&
- test_i18ncmp expect actual'
-
-test_expect_success 'test --track without .fetch entries' \
- 'git branch --track my8 &&
- test "$(git config branch.my8.remote)" &&
- test "$(git config branch.my8.merge)"'
-
-test_expect_success \
- 'branch from non-branch HEAD w/autosetupmerge=always' \
- 'git config branch.autosetupmerge always &&
- git branch my9 HEAD^ &&
- git config branch.autosetupmerge false'
-
-test_expect_success \
- 'branch from non-branch HEAD w/--track causes failure' \
- 'test_must_fail git branch --track my10 HEAD^'
-
-test_expect_success \
- 'branch from tag w/--track causes failure' \
- 'git tag foobar &&
- test_must_fail git branch --track my11 foobar'
-
-test_expect_success 'use --set-upstream-to modify HEAD' \
- 'test_config branch.master.remote foo &&
- test_config branch.master.merge foo &&
- git branch my12
- git branch --set-upstream-to my12 &&
- test "$(git config branch.master.remote)" = "." &&
- test "$(git config branch.master.merge)" = "refs/heads/my12"'
-
-test_expect_success 'use --set-upstream-to modify a particular branch' \
- 'git branch my13
- git branch --set-upstream-to master my13 &&
- test "$(git config branch.my13.remote)" = "." &&
- test "$(git config branch.my13.merge)" = "refs/heads/master"'
-
-test_expect_success '--unset-upstream should fail if given a non-existent branch' \
- 'test_must_fail git branch --unset-upstream i-dont-exist'
-
-test_expect_success 'test --unset-upstream on HEAD' \
- 'git branch my14
- test_config branch.master.remote foo &&
- test_config branch.master.merge foo &&
- git branch --set-upstream-to my14 &&
- git branch --unset-upstream &&
- test_must_fail git config branch.master.remote &&
- test_must_fail git config branch.master.merge &&
- # fail for a branch without upstream set
- test_must_fail git branch --unset-upstream
-'
-
-test_expect_success 'test --unset-upstream on a particular branch' \
- 'git branch my15
- git branch --set-upstream-to master my14 &&
- git branch --unset-upstream my14 &&
- test_must_fail git config branch.my14.remote &&
- test_must_fail git config branch.my14.merge'
-
-test_expect_success '--set-upstream shows message when creating a new branch that exists as remote-tracking' \
- 'git update-ref refs/remotes/origin/master HEAD &&
- git branch --set-upstream origin/master 2>actual &&
- test_when_finished git update-ref -d refs/remotes/origin/master &&
- test_when_finished git branch -d origin/master &&
- cat >expected <<EOF &&
+test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '
+ git branch -l u &&
+ mv .git/logs/refs/heads/u real-u &&
+ ln -s real-u .git/logs/refs/heads/u &&
+ test_must_fail git branch -m u v
+'
+
+test_expect_success 'test tracking setup via --track' '
+ git config remote.local.url . &&
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ git branch --track my1 local/master &&
+ test $(git config branch.my1.remote) = local &&
+ test $(git config branch.my1.merge) = refs/heads/master
+'
+
+test_expect_success 'test tracking setup (non-wildcard, matching)' '
+ git config remote.local.url . &&
+ git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ git branch --track my4 local/master &&
+ test $(git config branch.my4.remote) = local &&
+ test $(git config branch.my4.merge) = refs/heads/master
+'
+
+test_expect_success 'test tracking setup (non-wildcard, not matching)' '
+ git config remote.local.url . &&
+ git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ git branch --track my5 local/master &&
+ ! test "$(git config branch.my5.remote)" = local &&
+ ! test "$(git config branch.my5.merge)" = refs/heads/master
+'
+
+test_expect_success 'test tracking setup via config' '
+ git config branch.autosetupmerge true &&
+ git config remote.local.url . &&
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ git branch my3 local/master &&
+ test $(git config branch.my3.remote) = local &&
+ test $(git config branch.my3.merge) = refs/heads/master
+'
+
+test_expect_success 'test overriding tracking setup via --no-track' '
+ git config branch.autosetupmerge true &&
+ git config remote.local.url . &&
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ git branch --no-track my2 local/master &&
+ git config branch.autosetupmerge false &&
+ ! test "$(git config branch.my2.remote)" = local &&
+ ! test "$(git config branch.my2.merge)" = refs/heads/master
+'
+
+test_expect_success 'no tracking without .fetch entries' '
+ git config branch.autosetupmerge true &&
+ git branch my6 s &&
+ git config branch.automsetupmerge false &&
+ test -z "$(git config branch.my6.remote)" &&
+ test -z "$(git config branch.my6.merge)"
+'
+
+test_expect_success 'test tracking setup via --track but deeper' '
+ git config remote.local.url . &&
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
+ (git show-ref -q refs/remotes/local/o/o || git fetch local) &&
+ git branch --track my7 local/o/o &&
+ test "$(git config branch.my7.remote)" = local &&
+ test "$(git config branch.my7.merge)" = refs/heads/o/o
+'
+
+test_expect_success 'test deleting branch deletes branch config' '
+ git branch -d my7 &&
+ test -z "$(git config branch.my7.remote)" &&
+ test -z "$(git config branch.my7.merge)"
+'
+
+test_expect_success 'test deleting branch without config' '
+ git branch my7 s &&
+ sha1=$(git rev-parse my7 | cut -c 1-7) &&
+ echo "Deleted branch my7 (was $sha1)." >expect &&
+ git branch -d my7 >actual 2>&1 &&
+ test_i18ncmp expect actual
+'
+
+test_expect_success 'test --track without .fetch entries' '
+ git branch --track my8 &&
+ test "$(git config branch.my8.remote)" &&
+ test "$(git config branch.my8.merge)"
+'
+
+test_expect_success 'branch from non-branch HEAD w/autosetupmerge=always' '
+ git config branch.autosetupmerge always &&
+ git branch my9 HEAD^ &&
+ git config branch.autosetupmerge false
+'
+
+test_expect_success 'branch from non-branch HEAD w/--track causes failure' '
+ test_must_fail git branch --track my10 HEAD^
+'
+
+test_expect_success 'branch from tag w/--track causes failure' '
+ git tag foobar &&
+ test_must_fail git branch --track my11 foobar
+'
+
+test_expect_success '--set-upstream-to fails on multiple branches' '
+ test_must_fail git branch --set-upstream-to master a b c
+'
+
+test_expect_success '--set-upstream-to fails on detached HEAD' '
+ git checkout HEAD^{} &&
+ test_must_fail git branch --set-upstream-to master &&
+ git checkout -
+'
+
+test_expect_success 'use --set-upstream-to modify HEAD' '
+ test_config branch.master.remote foo &&
+ test_config branch.master.merge foo &&
+ git branch my12
+ git branch --set-upstream-to my12 &&
+ test "$(git config branch.master.remote)" = "." &&
+ test "$(git config branch.master.merge)" = "refs/heads/my12"
+'
+
+test_expect_success 'use --set-upstream-to modify a particular branch' '
+ git branch my13
+ git branch --set-upstream-to master my13 &&
+ test "$(git config branch.my13.remote)" = "." &&
+ test "$(git config branch.my13.merge)" = "refs/heads/master"
+'
+
+test_expect_success '--unset-upstream should fail if given a non-existent branch' '
+ test_must_fail git branch --unset-upstream i-dont-exist
+'
+
+test_expect_success 'test --unset-upstream on HEAD' '
+ git branch my14
+ test_config branch.master.remote foo &&
+ test_config branch.master.merge foo &&
+ git branch --set-upstream-to my14 &&
+ git branch --unset-upstream &&
+ test_must_fail git config branch.master.remote &&
+ test_must_fail git config branch.master.merge &&
+ # fail for a branch without upstream set
+ test_must_fail git branch --unset-upstream
+'
+
+test_expect_success '--unset-upstream should fail on multiple branches' '
+ test_must_fail git branch --unset-upstream a b c
+'
+
+test_expect_success '--unset-upstream should fail on detached HEAD' '
+ git checkout HEAD^{} &&
+ test_must_fail git branch --unset-upstream &&
+ git checkout -
+'
+
+test_expect_success 'test --unset-upstream on a particular branch' '
+ git branch my15
+ git branch --set-upstream-to master my14 &&
+ git branch --unset-upstream my14 &&
+ test_must_fail git config branch.my14.remote &&
+ test_must_fail git config branch.my14.merge
+'
+
+test_expect_success '--set-upstream shows message when creating a new branch that exists as remote-tracking' '
+ git update-ref refs/remotes/origin/master HEAD &&
+ git branch --set-upstream origin/master 2>actual &&
+ test_when_finished git update-ref -d refs/remotes/origin/master &&
+ test_when_finished git branch -d origin/master &&
+ cat >expected <<EOF &&
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
If you wanted to make '"'master'"' track '"'origin/master'"', do this:
@@ -437,38 +472,38 @@ If you wanted to make '"'master'"' track '"'origin/master'"', do this:
git branch -d origin/master
git branch --set-upstream-to origin/master
EOF
- test_cmp expected actual
+ test_cmp expected actual
'
-test_expect_success '--set-upstream with two args only shows the deprecation message' \
- 'git branch --set-upstream master my13 2>actual &&
- test_when_finished git branch --unset-upstream master &&
- cat >expected <<EOF &&
+test_expect_success '--set-upstream with two args only shows the deprecation message' '
+ git branch --set-upstream master my13 2>actual &&
+ test_when_finished git branch --unset-upstream master &&
+ cat >expected <<EOF &&
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
EOF
- test_cmp expected actual
+ test_cmp expected actual
'
-test_expect_success '--set-upstream with one arg only shows the deprecation message if the branch existed' \
- 'git branch --set-upstream my13 2>actual &&
- test_when_finished git branch --unset-upstream my13 &&
- cat >expected <<EOF &&
+test_expect_success '--set-upstream with one arg only shows the deprecation message if the branch existed' '
+ git branch --set-upstream my13 2>actual &&
+ test_when_finished git branch --unset-upstream my13 &&
+ cat >expected <<EOF &&
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
EOF
- test_cmp expected actual
+ test_cmp expected actual
'
# Keep this test last, as it changes the current branch
cat >expect <<EOF
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
EOF
-test_expect_success \
- 'git checkout -b g/h/i -l should create a branch and a log' \
- 'GIT_COMMITTER_DATE="2005-05-26 23:30" \
- git checkout -b g/h/i -l master &&
- test_path_is_file .git/refs/heads/g/h/i &&
- test_path_is_file .git/logs/refs/heads/g/h/i &&
- test_cmp expect .git/logs/refs/heads/g/h/i'
+test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '
+ GIT_COMMITTER_DATE="2005-05-26 23:30" \
+ git checkout -b g/h/i -l master &&
+ test_path_is_file .git/refs/heads/g/h/i &&
+ test_path_is_file .git/logs/refs/heads/g/h/i &&
+ test_cmp expect .git/logs/refs/heads/g/h/i
+'
test_expect_success 'checkout -b makes reflog by default' '
git checkout master &&
@@ -739,7 +774,7 @@ test_expect_success 'detect misconfigured autosetuprebase (bad value)' '
test_expect_success 'detect misconfigured autosetuprebase (no value)' '
git config --unset branch.autosetuprebase &&
- echo "[branch] autosetuprebase" >> .git/config &&
+ echo "[branch] autosetuprebase" >>.git/config &&
test_must_fail git branch &&
git config --unset branch.autosetuprebase
'
diff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh
new file mode 100755
index 0000000000..d4d7792eae
--- /dev/null
+++ b/t/t3211-peel-ref.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+test_description='tests for the peel_ref optimization of packed-refs'
+. ./test-lib.sh
+
+test_expect_success 'create annotated tag in refs/tags' '
+ test_commit base &&
+ git tag -m annotated foo
+'
+
+test_expect_success 'create annotated tag outside of refs/tags' '
+ git update-ref refs/outside/foo refs/tags/foo
+'
+
+# This matches show-ref's output
+print_ref() {
+ echo "$(git rev-parse "$1") $1"
+}
+
+test_expect_success 'set up expected show-ref output' '
+ {
+ print_ref "refs/heads/master" &&
+ print_ref "refs/outside/foo" &&
+ print_ref "refs/outside/foo^{}" &&
+ print_ref "refs/tags/base" &&
+ print_ref "refs/tags/foo" &&
+ print_ref "refs/tags/foo^{}"
+ } >expect
+'
+
+test_expect_success 'refs are peeled outside of refs/tags (loose)' '
+ git show-ref -d >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'refs are peeled outside of refs/tags (packed)' '
+ git pack-refs --all &&
+ git show-ref -d >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'create old-style pack-refs without fully-peeled' '
+ # Git no longer writes without fully-peeled, so we just write our own
+ # from scratch; we could also munge the existing file to remove the
+ # fully-peeled bits, but that seems even more prone to failure,
+ # especially if the format ever changes again. At least this way we
+ # know we are emulating exactly what an older git would have written.
+ {
+ echo "# pack-refs with: peeled " &&
+ print_ref "refs/heads/master" &&
+ print_ref "refs/outside/foo" &&
+ print_ref "refs/tags/base" &&
+ print_ref "refs/tags/foo" &&
+ echo "^$(git rev-parse "refs/tags/foo^{}")"
+ } >tmp &&
+ mv tmp .git/packed-refs
+'
+
+test_expect_success 'refs are peeled outside of refs/tags (old packed)' '
+ git show-ref -d >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 1de0ebda25..f6cc102657 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -138,8 +138,7 @@ test_expect_success 'rebase a single mode change' '
'
test_expect_success 'rebase is not broken by diff.renames' '
- git config diff.renames copies &&
- test_when_finished "git config --unset diff.renames" &&
+ test_config diff.renames copies &&
git checkout filemove &&
GIT_TRACE=1 git rebase force-3way
'
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 15dcbd42d3..a58406d12f 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -937,8 +937,7 @@ test_expect_success 'rebase --edit-todo can be used to modify todo' '
test_expect_success 'rebase -i respects core.commentchar' '
git reset --hard &&
git checkout E^0 &&
- git config core.commentchar "\\" &&
- test_when_finished "git config --unset core.commentchar" &&
+ test_config core.commentchar "\\" &&
write_script remove-all-but-first.sh <<-\EOF &&
sed -e "2,\$s/^/\\\\/" "$1" >"$1.tmp" &&
mv "$1.tmp" "$1"
diff --git a/t/t3511-cherry-pick-x.sh b/t/t3511-cherry-pick-x.sh
new file mode 100755
index 0000000000..f97727975b
--- /dev/null
+++ b/t/t3511-cherry-pick-x.sh
@@ -0,0 +1,219 @@
+#!/bin/sh
+
+test_description='Test cherry-pick -x and -s'
+
+. ./test-lib.sh
+
+pristine_detach () {
+ git cherry-pick --quit &&
+ git checkout -f "$1^0" &&
+ git read-tree -u --reset HEAD &&
+ git clean -d -f -f -q -x
+}
+
+mesg_one_line='base: commit message'
+
+mesg_no_footer="$mesg_one_line
+
+OneWordBodyThatsNotA-S-o-B"
+
+mesg_with_footer="$mesg_no_footer
+
+Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+Signed-off-by: A.U. Thor <author@example.com>
+Signed-off-by: B.U. Thor <buthor@example.com>"
+
+mesg_broken_footer="$mesg_no_footer
+
+The signed-off-by string should begin with the words Signed-off-by followed
+by a colon and space, and then the signers name and email address. e.g.
+Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
+
+mesg_with_footer_sob="$mesg_with_footer
+Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
+
+mesg_with_cherry_footer="$mesg_with_footer_sob
+(cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709)
+Tested-by: C.U. Thor <cuthor@example.com>"
+
+
+test_expect_success setup '
+ git config advice.detachedhead false &&
+ echo unrelated >unrelated &&
+ git add unrelated &&
+ test_commit initial foo a &&
+ test_commit "$mesg_one_line" foo b mesg-one-line &&
+ git reset --hard initial &&
+ test_commit "$mesg_no_footer" foo b mesg-no-footer &&
+ git reset --hard initial &&
+ test_commit "$mesg_broken_footer" foo b mesg-broken-footer &&
+ git reset --hard initial &&
+ test_commit "$mesg_with_footer" foo b mesg-with-footer &&
+ git reset --hard initial &&
+ test_commit "$mesg_with_footer_sob" foo b mesg-with-footer-sob &&
+ git reset --hard initial &&
+ test_commit "$mesg_with_cherry_footer" foo b mesg-with-cherry-footer &&
+ pristine_detach initial &&
+ test_commit conflicting unrelated
+'
+
+test_expect_success 'cherry-pick -x inserts blank line after one line subject' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-one-line^0` &&
+ git cherry-pick -x mesg-one-line &&
+ cat <<-EOF >expect &&
+ $mesg_one_line
+
+ (cherry picked from commit $sha1)
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -s inserts blank line after one line subject' '
+ pristine_detach initial &&
+ git cherry-pick -s mesg-one-line &&
+ cat <<-EOF >expect &&
+ $mesg_one_line
+
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -s inserts blank line after non-conforming footer' '
+ pristine_detach initial &&
+ git cherry-pick -s mesg-broken-footer &&
+ cat <<-EOF >expect &&
+ $mesg_broken_footer
+
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -x inserts blank line when conforming footer not found' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-no-footer^0` &&
+ git cherry-pick -x mesg-no-footer &&
+ cat <<-EOF >expect &&
+ $mesg_no_footer
+
+ (cherry picked from commit $sha1)
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -s inserts blank line when conforming footer not found' '
+ pristine_detach initial &&
+ git cherry-pick -s mesg-no-footer &&
+ cat <<-EOF >expect &&
+ $mesg_no_footer
+
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -x -s inserts blank line when conforming footer not found' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-no-footer^0` &&
+ git cherry-pick -x -s mesg-no-footer &&
+ cat <<-EOF >expect &&
+ $mesg_no_footer
+
+ (cherry picked from commit $sha1)
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -s adds sob when last sob doesnt match committer' '
+ pristine_detach initial &&
+ git cherry-pick -s mesg-with-footer &&
+ cat <<-EOF >expect &&
+ $mesg_with_footer
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -x -s adds sob when last sob doesnt match committer' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-with-footer^0` &&
+ git cherry-pick -x -s mesg-with-footer &&
+ cat <<-EOF >expect &&
+ $mesg_with_footer
+ (cherry picked from commit $sha1)
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -s refrains from adding duplicate trailing sob' '
+ pristine_detach initial &&
+ git cherry-pick -s mesg-with-footer-sob &&
+ cat <<-EOF >expect &&
+ $mesg_with_footer_sob
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -x -s adds sob even when trailing sob exists for committer' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-with-footer-sob^0` &&
+ git cherry-pick -x -s mesg-with-footer-sob &&
+ cat <<-EOF >expect &&
+ $mesg_with_footer_sob
+ (cherry picked from commit $sha1)
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -x treats "(cherry picked from..." line as part of footer' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-with-cherry-footer^0` &&
+ git cherry-pick -x mesg-with-cherry-footer &&
+ cat <<-EOF >expect &&
+ $mesg_with_cherry_footer
+ (cherry picked from commit $sha1)
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -s treats "(cherry picked from..." line as part of footer' '
+ pristine_detach initial &&
+ git cherry-pick -s mesg-with-cherry-footer &&
+ cat <<-EOF >expect &&
+ $mesg_with_cherry_footer
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'cherry-pick -x -s treats "(cherry picked from..." line as part of footer' '
+ pristine_detach initial &&
+ sha1=`git rev-parse mesg-with-cherry-footer^0` &&
+ git cherry-pick -x -s mesg-with-cherry-footer &&
+ cat <<-EOF >expect &&
+ $mesg_with_cherry_footer
+ (cherry picked from commit $sha1)
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index 844277cfa6..2f327b7495 100755
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
@@ -102,4 +102,58 @@ test_expect_success 'setup for many rename source candidates' '
grep warning actual.err
'
+test_expect_success 'rename pretty print with nothing in common' '
+ mkdir -p a/b/ &&
+ : >a/b/c &&
+ git add a/b/c &&
+ git commit -m "create a/b/c" &&
+ mkdir -p c/b/ &&
+ git mv a/b/c c/b/a &&
+ git commit -m "a/b/c -> c/b/a" &&
+ git diff -M --summary HEAD^ HEAD >output &&
+ test_i18ngrep " a/b/c => c/b/a " output &&
+ git diff -M --stat HEAD^ HEAD >output &&
+ test_i18ngrep " a/b/c => c/b/a " output
+'
+
+test_expect_success 'rename pretty print with common prefix' '
+ mkdir -p c/d &&
+ git mv c/b/a c/d/e &&
+ git commit -m "c/b/a -> c/d/e" &&
+ git diff -M --summary HEAD^ HEAD >output &&
+ test_i18ngrep " c/{b/a => d/e} " output &&
+ git diff -M --stat HEAD^ HEAD >output &&
+ test_i18ngrep " c/{b/a => d/e} " output
+'
+
+test_expect_success 'rename pretty print with common suffix' '
+ mkdir d &&
+ git mv c/d/e d/e &&
+ git commit -m "c/d/e -> d/e" &&
+ git diff -M --summary HEAD^ HEAD >output &&
+ test_i18ngrep " {c/d => d}/e " output &&
+ git diff -M --stat HEAD^ HEAD >output &&
+ test_i18ngrep " {c/d => d}/e " output
+'
+
+test_expect_success 'rename pretty print with common prefix and suffix' '
+ mkdir d/f &&
+ git mv d/e d/f/e &&
+ git commit -m "d/e -> d/f/e" &&
+ git diff -M --summary HEAD^ HEAD >output &&
+ test_i18ngrep " d/{ => f}/e " output &&
+ git diff -M --stat HEAD^ HEAD >output &&
+ test_i18ngrep " d/{ => f}/e " output
+'
+
+test_expect_success 'rename pretty print common prefix and suffix overlap' '
+ mkdir d/f/f &&
+ git mv d/f/e d/f/f/e &&
+ git commit -m "d/f/e d/f/f/e" &&
+ git diff -M --summary HEAD^ HEAD >output &&
+ test_i18ngrep " d/f/{ => f}/e " output &&
+ git diff -M --stat HEAD^ HEAD >output &&
+ test_i18ngrep " d/f/{ => f}/e " output
+'
+
test_done
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 7fa3647514..b993dae645 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -837,25 +837,26 @@ Subject: [PATCH] =?UTF-8?q?f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
=?UTF-8?q?=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar?=
=?UTF-8?q?=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20?=
=?UTF-8?q?bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6?=
- =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3?=
- =?UTF-8?q?=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
- =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3?=
- =?UTF-8?q?=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
+ =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
+ =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
=?UTF-8?q?=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar?=
=?UTF-8?q?=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20?=
=?UTF-8?q?bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6?=
- =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3?=
- =?UTF-8?q?=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
- =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3?=
- =?UTF-8?q?=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
+ =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
+ =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
=?UTF-8?q?=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar?=
=?UTF-8?q?=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20?=
=?UTF-8?q?bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6?=
- =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3?=
- =?UTF-8?q?=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
- =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3?=
- =?UTF-8?q?=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
- =?UTF-8?q?=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar?=
+ =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
+ =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
+ =?UTF-8?q?=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar?=
+ =?UTF-8?q?=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20?=
+ =?UTF-8?q?bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6?=
+ =?UTF-8?q?=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6?=
+ =?UTF-8?q?=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f?=
+ =?UTF-8?q?=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar?=
+ =?UTF-8?q?=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20bar=20f=C3=B6=C3=B6=20?=
+ =?UTF-8?q?bar?=
EOF
test_expect_success 'format-patch wraps extremely long subject (rfc2047)' '
rm -rf patches/ &&
@@ -971,6 +972,268 @@ test_expect_success 'empty subject prefix does not have extra space' '
test_cmp expect actual
'
+append_signoff()
+{
+ C=$(git commit-tree HEAD^^{tree} -p HEAD) &&
+ git format-patch --stdout --signoff $C^..$C >append_signoff.patch &&
+ sed -n -e "1,/^---$/p" append_signoff.patch |
+ egrep -n "^Subject|Sign|^$"
+}
+
+test_expect_success 'signoff: commit with no body' '
+ append_signoff </dev/null >actual &&
+ cat <<\EOF | sed "s/EOL$//" >expected &&
+4:Subject: [PATCH] EOL
+8:
+9:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: commit with only subject' '
+ echo subject | append_signoff >actual &&
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+9:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: commit with only subject that does not end with NL' '
+ printf subject | append_signoff >actual &&
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+9:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: no existing signoffs' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+11:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: no existing signoffs and no trailing NL' '
+ printf "subject\n\nbody" | append_signoff >actual &&
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+11:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: some random signoff' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+
+Signed-off-by: my@house
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+11:Signed-off-by: my@house
+12:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: misc conforming footer elements' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+
+Signed-off-by: my@house
+(cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709)
+Tested-by: Some One <someone@example.com>
+Bug: 1234
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+11:Signed-off-by: my@house
+15:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: some random signoff-alike' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+Fooled-by-me: my@house
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+11:
+12:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: not really a signoff' '
+ append_signoff <<\EOF >actual &&
+subject
+
+I want to mention about Signed-off-by: here.
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+9:I want to mention about Signed-off-by: here.
+10:
+11:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: not really a signoff (2)' '
+ append_signoff <<\EOF >actual &&
+subject
+
+My unfortunate
+Signed-off-by: example happens to be wrapped here.
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:Signed-off-by: example happens to be wrapped here.
+11:
+12:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: valid S-o-b paragraph in the middle' '
+ append_signoff <<\EOF >actual &&
+subject
+
+Signed-off-by: my@house
+Signed-off-by: your@house
+
+A lot of houses.
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+9:Signed-off-by: my@house
+10:Signed-off-by: your@house
+11:
+13:
+14:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: the same signoff at the end' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+
+Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+11:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: the same signoff at the end, no trailing NL' '
+ printf "subject\n\nSigned-off-by: C O Mitter <committer@example.com>" |
+ append_signoff >actual &&
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+9:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: the same signoff NOT at the end' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+
+Signed-off-by: C O Mitter <committer@example.com>
+Signed-off-by: my@house
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+11:Signed-off-by: C O Mitter <committer@example.com>
+12:Signed-off-by: my@house
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: detect garbage in non-conforming footer' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+
+Tested-by: my@house
+Some Trash
+Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+13:Signed-off-by: C O Mitter <committer@example.com>
+14:
+15:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'signoff: footer begins with non-signoff without @ sign' '
+ append_signoff <<\EOF >actual &&
+subject
+
+body
+
+Reviewed-id: Noone
+Tested-by: my@house
+Change-id: Ideadbeef
+Signed-off-by: C O Mitter <committer@example.com>
+Bug: 1234
+EOF
+ cat >expected <<\EOF &&
+4:Subject: [PATCH] subject
+8:
+10:
+14:Signed-off-by: C O Mitter <committer@example.com>
+EOF
+ test_cmp expected actual
+'
+
test_expect_success 'format patch ignores color.ui' '
test_unconfig color.ui &&
git format-patch --stdout -1 >expect &&
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 082d3e83bd..38a092a0da 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -93,11 +93,6 @@ sed -e '
s/song;/song();/
' <Beer.perl >Beer-correct.perl
-test_config () {
- git config "$1" "$2" &&
- test_when_finished "git config --unset $1"
-}
-
test_expect_funcname () {
lang=${2-java}
test_expect_code 1 git diff --no-index -U1 \
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh
index 40ab333a8a..f2f55fc51c 100755
--- a/t/t4034-diff-words.sh
+++ b/t/t4034-diff-words.sh
@@ -230,7 +230,7 @@ test_expect_success '.gitattributes override config' '
'
test_expect_success 'setup: remove diff driver regex' '
- test_might_fail git config --unset diff.testdriver.wordRegex
+ test_unconfig diff.testdriver.wordRegex
'
test_expect_success 'use configured regex' '
@@ -335,8 +335,7 @@ test_expect_success 'word-diff with diff.sbe' '
c
EOF
- test_when_finished "git config --unset diff.suppress-blank-empty" &&
- git config diff.suppress-blank-empty true &&
+ test_config diff.suppress-blank-empty true &&
word_diff --word-diff=plain
'
@@ -368,7 +367,7 @@ test_expect_success 'setup history with two files' '
test_expect_success 'wordRegex for the first file does not apply to the second' '
echo "*.tex diff=tex" >.gitattributes &&
- git config diff.tex.wordRegex "[a-z]+|." &&
+ test_config diff.tex.wordRegex "[a-z]+|." &&
cat >expect <<-\EOF &&
diff --git a/a.tex b/a.tex
--- a/a.tex
diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 614425adac..b7e16a7840 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -3,6 +3,7 @@
test_description='combined diff'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/diff-lib.sh
setup_helper () {
one=$1 branch=$2 side=$3 &&
@@ -113,4 +114,114 @@ test_expect_success 'check --cc --raw with forty trees' '
grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
'
+test_expect_success 'setup combined ignore spaces' '
+ git checkout master &&
+ >test &&
+ git add test &&
+ git commit -m initial &&
+
+ tr -d Q <<-\EOF >test &&
+ always coalesce
+ eol space coalesce Q
+ space change coalesce
+ all spa ces coalesce
+ eol spaces Q
+ space change
+ all spa ces
+ EOF
+ git commit -m "test space change" -a &&
+
+ git checkout -b side HEAD^ &&
+ tr -d Q <<-\EOF >test &&
+ always coalesce
+ eol space coalesce
+ space change coalesce
+ all spaces coalesce
+ eol spaces
+ space change
+ all spaces
+ EOF
+ git commit -m "test other space changes" -a &&
+
+ test_must_fail git merge master &&
+ tr -d Q <<-\EOF >test &&
+ eol spaces Q
+ space change
+ all spa ces
+ EOF
+ git commit -m merged -a
+'
+
+test_expect_success 'check combined output (no ignore space)' '
+ git show >actual.tmp &&
+ sed -e "1,/^@@@/d" < actual.tmp >actual &&
+ tr -d Q <<-\EOF >expected &&
+ --always coalesce
+ - eol space coalesce
+ - space change coalesce
+ - all spaces coalesce
+ - eol spaces
+ - space change
+ - all spaces
+ -eol space coalesce Q
+ -space change coalesce
+ -all spa ces coalesce
+ + eol spaces Q
+ + space change
+ + all spa ces
+ EOF
+ compare_diff_patch expected actual
+'
+
+test_expect_success 'check combined output (ignore space at eol)' '
+ git show --ignore-space-at-eol >actual.tmp &&
+ sed -e "1,/^@@@/d" < actual.tmp >actual &&
+ tr -d Q <<-\EOF >expected &&
+ --always coalesce
+ --eol space coalesce
+ - space change coalesce
+ - all spaces coalesce
+ -space change coalesce
+ -all spa ces coalesce
+ eol spaces Q
+ - space change
+ - all spaces
+ + space change
+ + all spa ces
+ EOF
+ compare_diff_patch expected actual
+'
+
+test_expect_success 'check combined output (ignore space change)' '
+ git show -b >actual.tmp &&
+ sed -e "1,/^@@@/d" < actual.tmp >actual &&
+ tr -d Q <<-\EOF >expected &&
+ --always coalesce
+ --eol space coalesce
+ --space change coalesce
+ - all spaces coalesce
+ -all spa ces coalesce
+ eol spaces Q
+ space change
+ - all spaces
+ + all spa ces
+ EOF
+ compare_diff_patch expected actual
+'
+
+test_expect_success 'check combined output (ignore all spaces)' '
+ git show -w >actual.tmp &&
+ sed -e "1,/^@@@/d" < actual.tmp >actual &&
+ tr -d Q <<-\EOF >expected &&
+ --always coalesce
+ --eol space coalesce
+ --space change coalesce
+ --all spaces coalesce
+ eol spaces Q
+ space change
+ all spa ces
+ EOF
+ compare_diff_patch expected actual
+'
+
test_done
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index fa686b887d..9243a97993 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -419,8 +419,6 @@ test_expect_success 'log --graph with merge' '
'
test_expect_success 'log.decorate configuration' '
- test_might_fail git config --unset-all log.decorate &&
-
git log --oneline >expect.none &&
git log --oneline --decorate >expect.short &&
git log --oneline --decorate=full >expect.full &&
@@ -429,8 +427,7 @@ test_expect_success 'log.decorate configuration' '
git log --oneline >actual &&
test_cmp expect.short actual &&
- git config --unset-all log.decorate &&
- git config log.decorate true &&
+ test_config log.decorate true &&
git log --oneline >actual &&
test_cmp expect.short actual &&
git log --oneline --decorate=full >actual &&
@@ -438,8 +435,7 @@ test_expect_success 'log.decorate configuration' '
git log --oneline --decorate=no >actual &&
test_cmp expect.none actual &&
- git config --unset-all log.decorate &&
- git config log.decorate no &&
+ test_config log.decorate no &&
git log --oneline >actual &&
test_cmp expect.none actual &&
git log --oneline --decorate >actual &&
@@ -447,8 +443,7 @@ test_expect_success 'log.decorate configuration' '
git log --oneline --decorate=full >actual &&
test_cmp expect.full actual &&
- git config --unset-all log.decorate &&
- git config log.decorate 1 &&
+ test_config log.decorate 1 &&
git log --oneline >actual &&
test_cmp expect.short actual &&
git log --oneline --decorate=full >actual &&
@@ -456,8 +451,7 @@ test_expect_success 'log.decorate configuration' '
git log --oneline --decorate=no >actual &&
test_cmp expect.none actual &&
- git config --unset-all log.decorate &&
- git config log.decorate short &&
+ test_config log.decorate short &&
git log --oneline >actual &&
test_cmp expect.short actual &&
git log --oneline --no-decorate >actual &&
@@ -465,8 +459,7 @@ test_expect_success 'log.decorate configuration' '
git log --oneline --decorate=full >actual &&
test_cmp expect.full actual &&
- git config --unset-all log.decorate &&
- git config log.decorate full &&
+ test_config log.decorate full &&
git log --oneline >actual &&
test_cmp expect.full actual &&
git log --oneline --no-decorate >actual &&
@@ -474,16 +467,15 @@ test_expect_success 'log.decorate configuration' '
git log --oneline --decorate >actual &&
test_cmp expect.short actual
- git config --unset-all log.decorate &&
+ test_unconfig log.decorate &&
git log --pretty=raw >expect.raw &&
- git config log.decorate full &&
+ test_config log.decorate full &&
git log --pretty=raw >actual &&
test_cmp expect.raw actual
'
test_expect_success 'reflog is expected format' '
- test_might_fail git config --remove-section log &&
git log -g --abbrev-commit --pretty=oneline >expect &&
git reflog >actual &&
test_cmp expect actual
@@ -496,10 +488,6 @@ test_expect_success 'whatchanged is expected format' '
'
test_expect_success 'log.abbrevCommit configuration' '
- test_when_finished "git config --unset log.abbrevCommit" &&
-
- test_might_fail git config --unset log.abbrevCommit &&
-
git log --abbrev-commit >expect.log.abbrev &&
git log --no-abbrev-commit >expect.log.full &&
git log --pretty=raw >expect.log.raw &&
@@ -508,7 +496,7 @@ test_expect_success 'log.abbrevCommit configuration' '
git whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
git whatchanged --no-abbrev-commit >expect.whatchanged.full &&
- git config log.abbrevCommit true &&
+ test_config log.abbrevCommit true &&
git log >actual &&
test_cmp expect.log.abbrev actual &&
diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh
index 7cfe9ca3da..4e7b05dd23 100755
--- a/t/t5003-archive-zip.sh
+++ b/t/t5003-archive-zip.sh
@@ -3,15 +3,9 @@
test_description='git archive --format=zip test'
. ./test-lib.sh
-GIT_UNZIP=${GIT_UNZIP:-unzip}
SUBSTFORMAT=%H%n
-test_lazy_prereq UNZIP '
- "$GIT_UNZIP" -v
- test $? -ne 127
-'
-
test_lazy_prereq UNZIP_SYMLINKS '
(
mkdir unzip-symlinks &&
@@ -76,6 +70,12 @@ test_expect_success \
git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
git commit-tree $treeid </dev/null)'
+test_expect_success 'setup export-subst' '
+ echo "substfile?" export-subst >>.git/info/attributes &&
+ git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \
+ >a/substfile1
+'
+
test_expect_success \
'create bare clone' \
'git clone --bare . bare.git &&
diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh
new file mode 100755
index 0000000000..cdb7d7a7f9
--- /dev/null
+++ b/t/t5004-archive-corner-cases.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+test_description='test corner cases of git-archive'
+. ./test-lib.sh
+
+test_expect_success 'create commit with empty tree' '
+ git commit --allow-empty -m foo
+'
+
+# Make a dir and clean it up afterwards
+make_dir() {
+ mkdir "$1" &&
+ test_when_finished "rm -rf '$1'"
+}
+
+# Check that the dir given in "$1" contains exactly the
+# set of paths given as arguments.
+check_dir() {
+ dir=$1; shift
+ {
+ echo "$dir" &&
+ for i in "$@"; do
+ echo "$dir/$i"
+ done
+ } | sort >expect &&
+ find "$dir" -print | sort >actual &&
+ test_cmp expect actual
+}
+
+test_expect_success 'tar archive of empty tree is empty' '
+ git archive --format=tar HEAD >empty.tar &&
+ make_dir extract &&
+ "$TAR" xf empty.tar -C extract &&
+ check_dir extract
+'
+
+test_expect_success 'tar archive of empty tree with prefix' '
+ git archive --format=tar --prefix=foo/ HEAD >prefix.tar &&
+ make_dir extract &&
+ "$TAR" xf prefix.tar -C extract &&
+ check_dir extract foo
+'
+
+test_expect_success UNZIP 'zip archive of empty tree is empty' '
+ # Detect the exit code produced when our particular flavor of unzip
+ # sees an empty archive. Infozip will generate a warning and exit with
+ # code 1. But in the name of sanity, we do not expect other unzip
+ # implementations to do the same thing (it would be perfectly
+ # reasonable to exit 0, for example).
+ #
+ # This makes our test less rigorous on some platforms (unzip may not
+ # handle the empty repo at all, making our later check of its exit code
+ # a no-op). But we cannot do anything reasonable except skip the test
+ # on such platforms anyway, and this is the moral equivalent.
+ "$GIT_UNZIP" "$TEST_DIRECTORY"/t5004/empty.zip
+ expect_code=$?
+
+ git archive --format=zip HEAD >empty.zip &&
+ make_dir extract &&
+ (
+ cd extract &&
+ test_expect_code $expect_code "$GIT_UNZIP" ../empty.zip
+ ) &&
+ check_dir extract
+'
+
+test_expect_success UNZIP 'zip archive of empty tree with prefix' '
+ # We do not have to play exit-code tricks here, because our
+ # result should not be empty; it has a directory in it.
+ git archive --format=zip --prefix=foo/ HEAD >prefix.zip &&
+ make_dir extract &&
+ (
+ cd extract &&
+ "$GIT_UNZIP" ../prefix.zip
+ ) &&
+ check_dir extract foo
+'
+
+test_expect_success 'archive complains about pathspec on empty tree' '
+ test_must_fail git archive --format=tar HEAD -- foo >/dev/null
+'
+
+test_expect_success 'create a commit with an empty subtree' '
+ empty_tree=$(git hash-object -t tree /dev/null) &&
+ root_tree=$(printf "040000 tree $empty_tree\tsub\n" | git mktree)
+'
+
+test_expect_success 'archive empty subtree with no pathspec' '
+ git archive --format=tar $root_tree >subtree-all.tar &&
+ make_dir extract &&
+ "$TAR" xf subtree-all.tar -C extract &&
+ check_dir extract sub
+'
+
+test_expect_success 'archive empty subtree by direct pathspec' '
+ git archive --format=tar $root_tree -- sub >subtree-path.tar &&
+ make_dir extract &&
+ "$TAR" xf subtree-path.tar -C extract &&
+ check_dir extract sub
+'
+
+test_done
diff --git a/t/t5004/empty.zip b/t/t5004/empty.zip
new file mode 100644
index 0000000000..1a76bb6005
--- /dev/null
+++ b/t/t5004/empty.zip
Binary files differ
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index d645328609..e4bb3a1457 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -195,4 +195,30 @@ test_expect_success 'gc: prune old objects after local clone' '
)
'
+test_expect_success 'garbage report in count-objects -v' '
+ : >.git/objects/pack/foo &&
+ : >.git/objects/pack/foo.bar &&
+ : >.git/objects/pack/foo.keep &&
+ : >.git/objects/pack/foo.pack &&
+ : >.git/objects/pack/fake.bar &&
+ : >.git/objects/pack/fake.keep &&
+ : >.git/objects/pack/fake.pack &&
+ : >.git/objects/pack/fake.idx &&
+ : >.git/objects/pack/fake2.keep &&
+ : >.git/objects/pack/fake3.idx &&
+ git count-objects -v 2>stderr &&
+ grep "index file .git/objects/pack/fake.idx is too small" stderr &&
+ grep "^warning:" stderr | sort >actual &&
+ cat >expected <<\EOF &&
+warning: garbage found: .git/objects/pack/fake.bar
+warning: garbage found: .git/objects/pack/foo
+warning: garbage found: .git/objects/pack/foo.bar
+warning: no corresponding .idx nor .pack: .git/objects/pack/fake2.keep
+warning: no corresponding .idx: .git/objects/pack/foo.keep
+warning: no corresponding .idx: .git/objects/pack/foo.pack
+warning: no corresponding .pack: .git/objects/pack/fake3.idx
+EOF
+ test_cmp expected actual
+'
+
test_done
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 354d32c584..d574085696 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -364,6 +364,15 @@ EOF
test_cmp count7.expected count7.actual
'
+test_expect_success 'clone shallow with packed refs' '
+ git pack-refs --all &&
+ git clone --depth 1 --branch A "file://$(pwd)/." shallow8 &&
+ echo "in-pack: 4" > count8.expected &&
+ GIT_DIR=shallow8/.git git count-objects -v |
+ grep "^in-pack" > count8.actual &&
+ test_cmp count8.expected count8.actual
+'
+
test_expect_success 'setup tests for the --stdin parameter' '
for head in C D E F
do
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index c31e5c1c52..d3dc5df7b1 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -1043,4 +1043,111 @@ do
'
done
+test_expect_success 'fetch exact SHA1' '
+ mk_test heads/master hidden/one &&
+ git push testrepo master:refs/hidden/one &&
+ (
+ cd testrepo &&
+ git config transfer.hiderefs refs/hidden
+ ) &&
+ check_push_result $the_commit hidden/one &&
+
+ mk_child child &&
+ (
+ cd child &&
+
+ # make sure $the_commit does not exist here
+ git repack -a -d &&
+ git prune &&
+ test_must_fail git cat-file -t $the_commit &&
+
+ # fetching the hidden object should fail by default
+ test_must_fail git fetch -v ../testrepo $the_commit:refs/heads/copy &&
+ test_must_fail git rev-parse --verify refs/heads/copy &&
+
+ # the server side can allow it to succeed
+ (
+ cd ../testrepo &&
+ git config uploadpack.allowtipsha1inwant true
+ ) &&
+
+ git fetch -v ../testrepo $the_commit:refs/heads/copy &&
+ result=$(git rev-parse --verify refs/heads/copy) &&
+ test "$the_commit" = "$result"
+ )
+'
+
+test_expect_success 'fetch follows tags by default' '
+ mk_test heads/master &&
+ rm -fr src dst &&
+ git init src &&
+ (
+ cd src &&
+ git pull ../testrepo master &&
+ git tag -m "annotated" tag &&
+ git for-each-ref >tmp1 &&
+ (
+ cat tmp1
+ sed -n "s|refs/heads/master$|refs/remotes/origin/master|p" tmp1
+ ) |
+ sort -k 3 >../expect
+ ) &&
+ git init dst &&
+ (
+ cd dst &&
+ git remote add origin ../src &&
+ git config branch.master.remote origin &&
+ git config branch.master.merge refs/heads/master &&
+ git pull &&
+ git for-each-ref >../actual
+ ) &&
+ test_cmp expect actual
+'
+
+test_expect_success 'push does not follow tags by default' '
+ mk_test heads/master &&
+ rm -fr src dst &&
+ git init src &&
+ git init --bare dst &&
+ (
+ cd src &&
+ git pull ../testrepo master &&
+ git tag -m "annotated" tag &&
+ git checkout -b another &&
+ git commit --allow-empty -m "future commit" &&
+ git tag -m "future" future &&
+ git checkout master &&
+ git for-each-ref refs/heads/master >../expect &&
+ git push ../dst master
+ ) &&
+ (
+ cd dst &&
+ git for-each-ref >../actual
+ ) &&
+ test_cmp expect actual
+'
+
+test_expect_success 'push --follow-tag only pushes relevant tags' '
+ mk_test heads/master &&
+ rm -fr src dst &&
+ git init src &&
+ git init --bare dst &&
+ (
+ cd src &&
+ git pull ../testrepo master &&
+ git tag -m "annotated" tag &&
+ git checkout -b another &&
+ git commit --allow-empty -m "future commit" &&
+ git tag -m "future" future &&
+ git checkout master &&
+ git for-each-ref refs/heads/master refs/tags/tag >../expect
+ git push --follow-tag ../dst master
+ ) &&
+ (
+ cd dst &&
+ git for-each-ref >../actual
+ ) &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 35304b41e9..6af6c63350 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -96,8 +96,7 @@ test_expect_success '--rebase' '
'
test_expect_success 'pull.rebase' '
git reset --hard before-rebase &&
- git config --bool pull.rebase true &&
- test_when_finished "git config --unset pull.rebase" &&
+ test_config pull.rebase true &&
git pull . copy &&
test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
test new = $(git show HEAD:file2)
@@ -105,8 +104,7 @@ test_expect_success 'pull.rebase' '
test_expect_success 'branch.to-rebase.rebase' '
git reset --hard before-rebase &&
- git config --bool branch.to-rebase.rebase true &&
- test_when_finished "git config --unset branch.to-rebase.rebase" &&
+ test_config branch.to-rebase.rebase true &&
git pull . copy &&
test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
test new = $(git show HEAD:file2)
@@ -114,10 +112,8 @@ test_expect_success 'branch.to-rebase.rebase' '
test_expect_success 'branch.to-rebase.rebase should override pull.rebase' '
git reset --hard before-rebase &&
- git config --bool pull.rebase true &&
- test_when_finished "git config --unset pull.rebase" &&
- git config --bool branch.to-rebase.rebase false &&
- test_when_finished "git config --unset branch.to-rebase.rebase" &&
+ test_config pull.rebase true &&
+ test_config branch.to-rebase.rebase false &&
git pull . copy &&
test $(git rev-parse HEAD^) != $(git rev-parse copy) &&
test new = $(git show HEAD:file2)
@@ -171,9 +167,9 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '
git update-ref refs/remotes/me/copy copy^ &&
COPY=$(git rev-parse --verify me/copy) &&
git rebase --onto $COPY copy &&
- git config branch.to-rebase.remote me &&
- git config branch.to-rebase.merge refs/heads/copy &&
- git config branch.to-rebase.rebase true &&
+ test_config branch.to-rebase.remote me &&
+ test_config branch.to-rebase.merge refs/heads/copy &&
+ test_config branch.to-rebase.rebase true &&
echo dirty >> file &&
git add file &&
test_must_fail git pull &&
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 1b06691bb4..aa31abe32b 100755
--- a/t/t5521-pull-options.sh
+++ b/t/t5521-pull-options.sh
@@ -19,6 +19,17 @@ test_expect_success 'git pull -q' '
test ! -s out)
'
+test_expect_success 'git pull -q --rebase' '
+ mkdir clonedqrb &&
+ (cd clonedqrb && git init &&
+ git pull -q --rebase "../parent" >out 2>err &&
+ test ! -s err &&
+ test ! -s out &&
+ git pull -q --rebase "../parent" >out 2>err &&
+ test ! -s err &&
+ test ! -s out)
+'
+
test_expect_success 'git pull' '
mkdir cloned &&
(cd cloned && git init &&
@@ -27,6 +38,14 @@ test_expect_success 'git pull' '
test ! -s out)
'
+test_expect_success 'git pull --rebase' '
+ mkdir clonedrb &&
+ (cd clonedrb && git init &&
+ git pull --rebase "../parent" >out 2>err &&
+ test -s err &&
+ test ! -s out)
+'
+
test_expect_success 'git pull -v' '
mkdir clonedv &&
(cd clonedv && git init &&
@@ -35,6 +54,14 @@ test_expect_success 'git pull -v' '
test ! -s out)
'
+test_expect_success 'git pull -v --rebase' '
+ mkdir clonedvrb &&
+ (cd clonedvrb && git init &&
+ git pull -v --rebase "../parent" >out 2>err &&
+ test -s err &&
+ test ! -s out)
+'
+
test_expect_success 'git pull -v -q' '
mkdir clonedvq &&
(cd clonedvq && git init &&
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 4b4b4a604f..4086f02bc1 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -181,8 +181,7 @@ test_expect_success 'push (chunked)' '
git checkout master &&
test_commit commit path3 &&
HEAD=$(git rev-parse --verify HEAD) &&
- git config http.postbuffer 4 &&
- test_when_finished "git config --unset http.postbuffer" &&
+ test_config http.postbuffer 4 &&
git push -v -v origin $BRANCH 2>err &&
grep "POST git-receive-pack (chunked)" err &&
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh
index 30507407ff..66cda17ef3 100755
--- a/t/t6009-rev-list-parent.sh
+++ b/t/t6009-rev-list-parent.sh
@@ -133,4 +133,17 @@ test_expect_success 'dodecapus' '
check_revlist "--min-parents=13" &&
check_revlist "--min-parents=4 --max-parents=11" tetrapus
'
+
+test_expect_success 'ancestors with the same commit time' '
+
+ test_tick_keep=$test_tick &&
+ for i in 1 2 3 4 5 6 7 8; do
+ test_tick=$test_tick_keep
+ test_commit t$i
+ done &&
+ git rev-list t1^! --not t$i >result &&
+ >expect &&
+ test_cmp expect result
+'
+
test_done
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
index 839ad97b79..8e2ff13423 100755
--- a/t/t6012-rev-list-simplify.sh
+++ b/t/t6012-rev-list-simplify.sh
@@ -56,7 +56,23 @@ test_expect_success setup '
echo "Final change" >file &&
test_tick && git commit -a -m "Final change" &&
- note I
+ note I &&
+
+ git symbolic-ref HEAD refs/heads/unrelated &&
+ git rm -f "*" &&
+ echo "Unrelated branch" >side &&
+ git add side &&
+ test_tick && git commit -m "Side root" &&
+ note J &&
+
+ git checkout master &&
+ test_tick && git merge -m "Coolest" unrelated &&
+ note K &&
+
+ echo "Immaterial" >elif &&
+ git add elif &&
+ test_tick && git commit -m "Last" &&
+ note L
'
FMT='tformat:%P %H | %s'
@@ -79,10 +95,10 @@ check_result () {
'
}
-check_result 'I H G F E D C B A' --full-history
-check_result 'I H E C B A' --full-history -- file
-check_result 'I H E C B A' --full-history --topo-order -- file
-check_result 'I H E C B A' --full-history --date-order -- file
+check_result 'L K J I H G F E D C B A' --full-history
+check_result 'K I H E C B A' --full-history -- file
+check_result 'K I H E C B A' --full-history --topo-order -- file
+check_result 'K I H E C B A' --full-history --date-order -- file
check_result 'I E C B A' --simplify-merges -- file
check_result 'I B A' -- file
check_result 'I B A' --topo-order -- file
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index f5a79b13ae..c8d6e9f88c 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -104,6 +104,18 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '
tag_exists myhead
'
+test_expect_success '--force can create a tag with the name of one existing' '
+ tag_exists mytag &&
+ git tag --force mytag &&
+ tag_exists mytag'
+
+test_expect_success '--force is moot with a non-existing tag name' '
+ git tag newtag >expect &&
+ git tag --force forcetag >actual &&
+ test_cmp expect actual
+'
+git tag -d newtag forcetag
+
# deleting tags:
test_expect_success 'trying to delete an unknown tag should fail' '
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
index f4f38a5e73..52ef06b000 100755
--- a/t/t7060-wtstatus.sh
+++ b/t/t7060-wtstatus.sh
@@ -5,6 +5,7 @@ test_description='basic work tree status reporting'
. ./test-lib.sh
test_expect_success setup '
+ git config --global advice.statusuoption false &&
test_commit A &&
test_commit B oneside added &&
git checkout A^0 &&
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 2683cba7e3..5030f1f1bc 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -757,4 +757,104 @@ test_expect_success 'submodule add with an existing name fails unless forced' '
)
'
+test_expect_success 'set up a second submodule' '
+ git submodule add ./init2 example2 &&
+ git commit -m "submodule example2 added"
+'
+
+test_expect_success 'submodule deinit should remove the whole submodule section from .git/config' '
+ git config submodule.example.foo bar &&
+ git config submodule.example2.frotz nitfol &&
+ git submodule deinit init &&
+ test -z "$(git config --get-regexp "submodule\.example\.")" &&
+ test -n "$(git config --get-regexp "submodule\.example2\.")" &&
+ test -f example2/.git &&
+ rmdir init
+'
+
+test_expect_success 'submodule deinit . deinits all initialized submodules' '
+ git submodule update --init &&
+ git config submodule.example.foo bar &&
+ git config submodule.example2.frotz nitfol &&
+ test_must_fail git submodule deinit &&
+ git submodule deinit . &&
+ test -z "$(git config --get-regexp "submodule\.example\.")" &&
+ test -z "$(git config --get-regexp "submodule\.example2\.")" &&
+ rmdir init example2
+'
+
+test_expect_success 'submodule deinit deinits a submodule when its work tree is missing or empty' '
+ git submodule update --init &&
+ rm -rf init example2/* example2/.git &&
+ git submodule deinit init example2 &&
+ test -z "$(git config --get-regexp "submodule\.example\.")" &&
+ test -z "$(git config --get-regexp "submodule\.example2\.")" &&
+ rmdir init
+'
+
+test_expect_success 'submodule deinit fails when the submodule contains modifications unless forced' '
+ git submodule update --init &&
+ echo X >>init/s &&
+ test_must_fail git submodule deinit init &&
+ test -n "$(git config --get-regexp "submodule\.example\.")" &&
+ test -f example2/.git &&
+ git submodule deinit -f init &&
+ test -z "$(git config --get-regexp "submodule\.example\.")" &&
+ rmdir init
+'
+
+test_expect_success 'submodule deinit fails when the submodule contains untracked files unless forced' '
+ git submodule update --init &&
+ echo X >>init/untracked &&
+ test_must_fail git submodule deinit init &&
+ test -n "$(git config --get-regexp "submodule\.example\.")" &&
+ test -f example2/.git &&
+ git submodule deinit -f init &&
+ test -z "$(git config --get-regexp "submodule\.example\.")" &&
+ rmdir init
+'
+
+test_expect_success 'submodule deinit fails when the submodule HEAD does not match unless forced' '
+ git submodule update --init &&
+ (
+ cd init &&
+ git checkout HEAD^
+ ) &&
+ test_must_fail git submodule deinit init &&
+ test -n "$(git config --get-regexp "submodule\.example\.")" &&
+ test -f example2/.git &&
+ git submodule deinit -f init &&
+ test -z "$(git config --get-regexp "submodule\.example\.")" &&
+ rmdir init
+'
+
+test_expect_success 'submodule deinit is silent when used on an uninitialized submodule' '
+ git submodule update --init &&
+ git submodule deinit init >actual &&
+ test_i18ngrep "Submodule .example. (.*) unregistered for path .init" actual &&
+ git submodule deinit init >actual &&
+ test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
+ git submodule deinit . >actual &&
+ test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
+ test_i18ngrep "Submodule .example2. (.*) unregistered for path .example2" actual &&
+ git submodule deinit . >actual &&
+ test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
+ test_i18ngrep ! "Submodule .example2. (.*) unregistered for path .example2" actual &&
+ rmdir init example2
+'
+
+test_expect_success 'submodule deinit fails when submodule has a .git directory even when forced' '
+ git submodule update --init &&
+ (
+ cd init &&
+ rm .git &&
+ cp -R ../.git/modules/example .git &&
+ GIT_WORK_TREE=. git config --unset core.worktree
+ ) &&
+ test_must_fail git submodule deinit init &&
+ test_must_fail git submodule deinit -f init &&
+ test -d init/.git &&
+ test -n "$(git config --get-regexp "submodule\.example\.")"
+'
+
test_done
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 4975ec07ce..1a3d20bdc3 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -643,7 +643,8 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
rm -rf super_update_r2 &&
git clone super_update_r super_update_r2 &&
(cd super_update_r2 &&
- git submodule update --init --recursive &&
+ git submodule update --init --recursive >actual &&
+ test_i18ngrep "Submodule path .submodule/subsubmodule.: checked out" actual &&
(cd submodule/subsubmodule &&
git log > ../../expected
) &&
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 1c908f4d39..436b7b606e 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -36,8 +36,7 @@ test_expect_success 'nonexistent template file should return error' '
'
test_expect_success 'nonexistent template file in config should return error' '
- git config commit.template "$PWD"/notexist &&
- test_when_finished "git config --unset commit.template" &&
+ test_config commit.template "$PWD"/notexist &&
(
GIT_EDITOR="echo hello >\"\$1\"" &&
export GIT_EDITOR &&
@@ -93,14 +92,13 @@ test_expect_success '-t option should be short for --template' '
test_expect_success 'config-specified template should commit' '
echo "new template" > "$TEMPLATE" &&
- git config commit.template "$TEMPLATE" &&
+ test_config commit.template "$TEMPLATE" &&
echo "more content" >> foo &&
git add foo &&
(
test_set_editor "$TEST_DIRECTORY"/t7500/add-content &&
git commit
) &&
- git config --unset commit.template &&
commit_msg_is "new templatecommit message"
'
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index cbd7a45927..a4938b1e45 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -171,18 +171,25 @@ test_expect_success 'verbose' '
test_expect_success 'verbose respects diff config' '
- git config color.diff always &&
+ test_config color.diff always &&
git status -v >actual &&
- grep "\[1mdiff --git" actual &&
- git config --unset color.diff
+ grep "\[1mdiff --git" actual
+'
+
+mesg_with_comment_and_newlines='
+# text
+
+'
+
+test_expect_success 'prepare file with comment line and trailing newlines' '
+ printf "%s" "$mesg_with_comment_and_newlines" >expect
'
test_expect_success 'cleanup commit messages (verbatim option,-t)' '
echo >>negative &&
- { echo;echo "# text";echo; } >expect &&
- git commit --cleanup=verbatim -t expect -a &&
- git cat-file -p HEAD |sed -e "1,/^\$/d" |head -n 3 >actual &&
+ git commit --cleanup=verbatim --no-status -t expect -a &&
+ git cat-file -p HEAD |sed -e "1,/^\$/d" >actual &&
test_cmp expect actual
'
@@ -199,7 +206,7 @@ test_expect_success 'cleanup commit messages (verbatim option,-F)' '
test_expect_success 'cleanup commit messages (verbatim option,-m)' '
echo >>negative &&
- git commit --cleanup=verbatim -m "$(cat expect)" -a &&
+ git commit --cleanup=verbatim -m "$mesg_with_comment_and_newlines" -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
test_cmp expect actual
@@ -255,32 +262,40 @@ test_expect_success 'cleanup commit message (fail on invalid cleanup mode config
test_expect_success 'cleanup commit message (no config and no option uses default)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git commit --no-status &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git commit --no-status
+ ) &&
commit_msg_is "commit message"
'
test_expect_success 'cleanup commit message (option overrides default)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git commit --cleanup=whitespace --no-status &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git commit --cleanup=whitespace --no-status
+ ) &&
commit_msg_is "commit message # comment"
'
test_expect_success 'cleanup commit message (config overrides default)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git -c commit.cleanup=whitespace commit --no-status &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git -c commit.cleanup=whitespace commit --no-status
+ ) &&
commit_msg_is "commit message # comment"
'
test_expect_success 'cleanup commit message (option overrides config)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git -c commit.cleanup=whitespace commit --cleanup=default &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git -c commit.cleanup=whitespace commit --cleanup=default
+ ) &&
commit_msg_is "commit message"
'
@@ -409,6 +424,18 @@ test_expect_success 'A single-liner subject with a token plus colon is not a foo
'
+test_expect_success 'commit -s places sob on third line after two empty lines' '
+ git commit -s --allow-empty --allow-empty-message &&
+ cat <<-EOF >expect &&
+
+
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+
+ EOF
+ sed -e "/^#/d" -e "s/^:.*//" .git/COMMIT_EDITMSG >actual &&
+ test_cmp expect actual
+'
+
write_script .git/FAKE_EDITOR <<\EOF
mv "$1" "$1.orig"
(
@@ -419,16 +446,6 @@ EOF
echo '## Custom template' >template
-clear_config () {
- (
- git config --unset-all "$1"
- case $? in
- 0|5) exit 0 ;;
- *) exit 1 ;;
- esac
- )
-}
-
try_commit () {
git reset --hard &&
echo >>negative &&
@@ -444,67 +461,57 @@ try_commit () {
try_commit_status_combo () {
test_expect_success 'commit' '
- clear_config commit.status &&
try_commit "" &&
test_i18ngrep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit' '
- clear_config commit.status &&
try_commit "" &&
test_i18ngrep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit --status' '
- clear_config commit.status &&
try_commit --status &&
test_i18ngrep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit --no-status' '
- clear_config commit.status &&
try_commit --no-status &&
test_i18ngrep ! "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit with commit.status = yes' '
- clear_config commit.status &&
- git config commit.status yes &&
+ test_config commit.status yes &&
try_commit "" &&
test_i18ngrep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit with commit.status = no' '
- clear_config commit.status &&
- git config commit.status no &&
+ test_config commit.status no &&
try_commit "" &&
test_i18ngrep ! "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit --status with commit.status = yes' '
- clear_config commit.status &&
- git config commit.status yes &&
+ test_config commit.status yes &&
try_commit --status &&
test_i18ngrep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit --no-status with commit.status = yes' '
- clear_config commit.status &&
- git config commit.status yes &&
+ test_config commit.status yes &&
try_commit --no-status &&
test_i18ngrep ! "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit --status with commit.status = no' '
- clear_config commit.status &&
- git config commit.status no &&
+ test_config commit.status no &&
try_commit --status &&
test_i18ngrep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
test_expect_success 'commit --no-status with commit.status = no' '
- clear_config commit.status &&
- git config commit.status no &&
+ test_config commit.status no &&
try_commit --no-status &&
test_i18ngrep ! "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
@@ -518,8 +525,7 @@ use_template="-t template"
try_commit_status_combo
test_expect_success 'commit --status with custom comment character' '
- test_when_finished "git config --unset core.commentchar" &&
- git config core.commentchar ";" &&
+ test_config core.commentchar ";" &&
try_commit --status &&
test_i18ngrep "^; Changes to be committed:" .git/COMMIT_EDITMSG
'
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index a79c032ffd..e2ffdacc26 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -8,6 +8,7 @@ test_description='git status'
. ./test-lib.sh
test_expect_success 'status -h in broken repository' '
+ git config --global advice.statusuoption false &&
mkdir broken &&
test_when_finished "rm -fr broken" &&
(
@@ -130,8 +131,7 @@ cat >expect <<\EOF
EOF
test_expect_success 'status (advice.statusHints false)' '
- test_when_finished "git config --unset advice.statusHints" &&
- git config advice.statusHints false &&
+ test_config advice.statusHints false &&
git status >output &&
test_i18ncmp expect output
@@ -331,8 +331,7 @@ test_expect_success 'status -uno' '
'
test_expect_success 'status (status.showUntrackedFiles no)' '
- git config status.showuntrackedfiles no
- test_when_finished "git config --unset status.showuntrackedfiles" &&
+ test_config status.showuntrackedfiles no &&
git status >output &&
test_i18ncmp expect output
'
@@ -347,12 +346,11 @@ cat >expect <<EOF
#
# Untracked files not listed
EOF
-git config advice.statusHints false
test_expect_success 'status -uno (advice.statusHints false)' '
+ test_config advice.statusHints false &&
git status -uno >output &&
test_i18ncmp expect output
'
-git config --unset advice.statusHints
cat >expect << EOF
M dir1/modified
@@ -399,8 +397,7 @@ test_expect_success 'status -unormal' '
'
test_expect_success 'status (status.showUntrackedFiles normal)' '
- git config status.showuntrackedfiles normal
- test_when_finished "git config --unset status.showuntrackedfiles" &&
+ test_config status.showuntrackedfiles normal
git status >output &&
test_i18ncmp expect output
'
@@ -458,8 +455,7 @@ test_expect_success 'status -uall' '
'
test_expect_success 'status (status.showUntrackedFiles all)' '
- git config status.showuntrackedfiles all
- test_when_finished "git config --unset status.showuntrackedfiles" &&
+ test_config status.showuntrackedfiles all
git status >output &&
test_i18ncmp expect output
'
@@ -484,10 +480,9 @@ test_expect_success 'status -s -uall' '
test_cmp expect output
'
test_expect_success 'status -s (status.showUntrackedFiles all)' '
- git config status.showuntrackedfiles all
+ test_config status.showuntrackedfiles all &&
git status -s >output &&
rm -rf dir3 &&
- git config --unset status.showuntrackedfiles &&
test_cmp expect output
'
@@ -587,15 +582,13 @@ cat >expect <<\EOF
EOF
test_expect_success 'status with color.ui' '
- git config color.ui always &&
- test_when_finished "git config --unset color.ui" &&
+ test_config color.ui always &&
git status | test_decode_color >output &&
test_i18ncmp expect output
'
test_expect_success 'status with color.status' '
- git config color.status always &&
- test_when_finished "git config --unset color.status" &&
+ test_config color.status always &&
git status | test_decode_color >output &&
test_i18ncmp expect output
'
@@ -719,8 +712,7 @@ EOF
test_expect_success 'status without relative paths' '
- git config status.relativePaths false &&
- test_when_finished "git config --unset status.relativePaths" &&
+ test_config status.relativePaths false &&
(cd dir1 && git status) >output &&
test_i18ncmp expect output
@@ -739,8 +731,7 @@ EOF
test_expect_success 'status -s without relative paths' '
- git config status.relativePaths false &&
- test_when_finished "git config --unset status.relativePaths" &&
+ test_config status.relativePaths false &&
(cd dir1 && git status -s) >output &&
test_cmp expect output
@@ -1037,15 +1028,14 @@ test_expect_success '--ignore-submodules=untracked suppresses submodules with un
'
test_expect_success '.gitmodules ignore=untracked suppresses submodules with untracked content' '
- git config diff.ignoreSubmodules dirty &&
+ test_config diff.ignoreSubmodules dirty &&
git status >output &&
test_i18ncmp expect output &&
git config --add -f .gitmodules submodule.subname.ignore untracked &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status >output &&
test_i18ncmp expect output &&
- git config -f .gitmodules --remove-section submodule.subname &&
- git config --unset diff.ignoreSubmodules
+ git config -f .gitmodules --remove-section submodule.subname
'
test_expect_success '.git/config ignore=untracked suppresses submodules with untracked content' '
@@ -1065,15 +1055,14 @@ test_expect_success '--ignore-submodules=dirty suppresses submodules with untrac
'
test_expect_success '.gitmodules ignore=dirty suppresses submodules with untracked content' '
- git config diff.ignoreSubmodules dirty &&
+ test_config diff.ignoreSubmodules dirty &&
git status >output &&
! test -s actual &&
git config --add -f .gitmodules submodule.subname.ignore dirty &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status >output &&
test_i18ncmp expect output &&
- git config -f .gitmodules --remove-section submodule.subname &&
- git config --unset diff.ignoreSubmodules
+ git config -f .gitmodules --remove-section submodule.subname
'
test_expect_success '.git/config ignore=dirty suppresses submodules with untracked content' '
@@ -1290,15 +1279,13 @@ cat > expect << EOF
EOF
test_expect_success "status (core.commentchar with submodule summary)" '
- test_when_finished "git config --unset core.commentchar" &&
- git config core.commentchar ";" &&
+ test_config core.commentchar ";" &&
git status >output &&
test_i18ncmp expect output
'
test_expect_success "status (core.commentchar with two chars with submodule summary)" '
- test_when_finished "git config --unset core.commentchar" &&
- git config core.commentchar ";;" &&
+ test_config core.commentchar ";;" &&
git status >output &&
test_i18ncmp expect output
'
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
index 51ab89411f..9d4610629d 100755
--- a/t/t7512-status-help.sh
+++ b/t/t7512-status-help.sh
@@ -5,7 +5,7 @@
# Grenoble INP Ensimag
#
-test_description='git status advices'
+test_description='git status advice'
. ./test-lib.sh
@@ -14,6 +14,7 @@ test_description='git status advices'
set_fake_editor
test_expect_success 'prepare for conflicts' '
+ git config --global advice.statusuoption false &&
test_commit init main.txt init &&
git branch conflicts &&
test_commit on_master main.txt on_master &&
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 5e19598fe7..2f70433568 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -56,7 +56,8 @@ create_merge_msgs () {
echo &&
git log --no-merges ^HEAD c2 c3
} >squash.1-5-9 &&
- echo >msg.nolog &&
+ : >msg.nologff &&
+ echo >msg.nolognoff &&
{
echo "* tag 'c3':" &&
echo " commit 3" &&
@@ -244,8 +245,7 @@ test_expect_success 'merges with --ff-only' '
test_expect_success 'merges with merge.ff=only' '
git reset --hard c1 &&
test_tick &&
- test_when_finished "git config --unset merge.ff" &&
- git config merge.ff only &&
+ test_config merge.ff "only" &&
test_must_fail git merge c2 &&
test_must_fail git merge c3 &&
test_must_fail git merge c2 c3 &&
@@ -336,7 +336,7 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c2 (no-commit in config)' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "--no-commit" &&
+ test_config branch.master.mergeoptions "--no-commit" &&
git merge c2 &&
verify_merge file result.1-5 &&
verify_head $c1 &&
@@ -346,12 +346,11 @@ test_expect_success 'merge c1 with c2 (no-commit in config)' '
test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c2 (log in config)' '
- git config branch.master.mergeoptions "" &&
git reset --hard c1 &&
git merge --log c2 &&
git show -s --pretty=tformat:%s%n%b >expect &&
- git config branch.master.mergeoptions --log &&
+ test_config branch.master.mergeoptions "--log" &&
git reset --hard c1 &&
git merge c2 &&
git show -s --pretty=tformat:%s%n%b >actual &&
@@ -360,17 +359,12 @@ test_expect_success 'merge c1 with c2 (log in config)' '
'
test_expect_success 'merge c1 with c2 (log in config gets overridden)' '
- test_when_finished "git config --remove-section branch.master" &&
- test_when_finished "git config --remove-section merge" &&
- test_might_fail git config --remove-section branch.master &&
- test_might_fail git config --remove-section merge &&
-
git reset --hard c1 &&
git merge c2 &&
git show -s --pretty=tformat:%s%n%b >expect &&
- git config branch.master.mergeoptions "--no-log" &&
- git config merge.log true &&
+ test_config branch.master.mergeoptions "--no-log" &&
+ test_config merge.log "true" &&
git reset --hard c1 &&
git merge c2 &&
git show -s --pretty=tformat:%s%n%b >actual &&
@@ -380,7 +374,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '
test_expect_success 'merge c1 with c2 (squash in config)' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "--squash" &&
+ test_config branch.master.mergeoptions "--squash" &&
git merge c2 &&
verify_merge file result.1-5 &&
verify_head $c1 &&
@@ -392,7 +386,7 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'override config option -n with --summary' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "-n" &&
+ test_config branch.master.mergeoptions "-n" &&
test_tick &&
git merge --summary c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
@@ -406,7 +400,7 @@ test_expect_success 'override config option -n with --summary' '
test_expect_success 'override config option -n with --stat' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "-n" &&
+ test_config branch.master.mergeoptions "-n" &&
test_tick &&
git merge --stat c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
@@ -422,7 +416,7 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'override config option --stat' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "--stat" &&
+ test_config branch.master.mergeoptions "--stat" &&
test_tick &&
git merge -n c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
@@ -438,7 +432,7 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c2 (override --no-commit)' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "--no-commit" &&
+ test_config branch.master.mergeoptions "--no-commit" &&
test_tick &&
git merge --commit c2 &&
verify_merge file result.1-5 msg.1-5 &&
@@ -449,7 +443,7 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c2 (override --squash)' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "--squash" &&
+ test_config branch.master.mergeoptions "--squash" &&
test_tick &&
git merge --no-squash c2 &&
verify_merge file result.1-5 msg.1-5 &&
@@ -460,7 +454,6 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c0 with c1 (no-ff)' '
git reset --hard c0 &&
- git config branch.master.mergeoptions "" &&
test_tick &&
git merge --no-ff c1 &&
verify_merge file result.1 &&
@@ -471,10 +464,9 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c0 with c1 (merge.ff=false)' '
git reset --hard c0 &&
- git config merge.ff false &&
+ test_config merge.ff "false" &&
test_tick &&
git merge c1 &&
- git config --remove-section merge &&
verify_merge file result.1 &&
verify_parents $c0 $c1
'
@@ -482,22 +474,19 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'combine branch.master.mergeoptions with merge.ff' '
git reset --hard c0 &&
- git config branch.master.mergeoptions --ff &&
- git config merge.ff false &&
+ test_config branch.master.mergeoptions "--ff" &&
+ test_config merge.ff "false" &&
test_tick &&
git merge c1 &&
- git config --remove-section "branch.master" &&
- git config --remove-section "merge" &&
verify_merge file result.1 &&
verify_parents "$c0"
'
test_expect_success 'tolerate unknown values for merge.ff' '
git reset --hard c0 &&
- git config merge.ff something-new &&
+ test_config merge.ff "something-new" &&
test_tick &&
git merge c1 2>message &&
- git config --remove-section "merge" &&
verify_head "$c1" &&
test_cmp empty message
'
@@ -515,7 +504,7 @@ test_expect_success 'combining --ff-only and --no-ff is refused' '
test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '
git reset --hard c0 &&
- git config branch.master.mergeoptions "--no-ff" &&
+ test_config branch.master.mergeoptions "--no-ff" &&
git merge --ff c1 &&
verify_merge file result.1 &&
verify_head $c1
@@ -525,14 +514,20 @@ test_expect_success 'merge log message' '
git reset --hard c0 &&
git merge --no-log c2 &&
git show -s --pretty=format:%b HEAD >msg.act &&
- test_cmp msg.nolog msg.act &&
+ test_cmp msg.nologff msg.act &&
+
+ git reset --hard c0 &&
+ test_config branch.master.mergeoptions "--no-ff" &&
+ git merge --no-log c2 &&
+ git show -s --pretty=format:%b HEAD >msg.act &&
+ test_cmp msg.nolognoff msg.act &&
git merge --log c3 &&
git show -s --pretty=format:%b HEAD >msg.act &&
test_cmp msg.log msg.act &&
git reset --hard HEAD^ &&
- git config merge.log yes &&
+ test_config merge.log "yes" &&
git merge c3 &&
git show -s --pretty=format:%b HEAD >msg.act &&
test_cmp msg.log msg.act
@@ -542,7 +537,6 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c0, c2, c0, and c1' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "" &&
test_tick &&
git merge c0 c2 c0 c1 &&
verify_merge file result.1-5 &&
@@ -553,7 +547,6 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c0, c2, c0, and c1' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "" &&
test_tick &&
git merge c0 c2 c0 c1 &&
verify_merge file result.1-5 &&
@@ -564,7 +557,6 @@ test_debug 'git log --graph --decorate --oneline --all'
test_expect_success 'merge c1 with c1 and c2' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "" &&
test_tick &&
git merge c1 c2 &&
verify_merge file result.1-5 &&
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index eb1d3f85b5..c6d6b1c99f 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2009, 2010 David Aguilar
+# Copyright (c) 2009, 2010, 2012, 2013 David Aguilar
#
test_description='git-difftool
@@ -10,43 +10,25 @@ Testing basic diff tool invocation
. ./test-lib.sh
-remove_config_vars()
+difftool_test_setup ()
{
- # Unset all config variables used by git-difftool
- git config --unset diff.tool
- git config --unset diff.guitool
- git config --unset difftool.test-tool.cmd
- git config --unset difftool.prompt
- git config --unset merge.tool
- git config --unset mergetool.test-tool.cmd
- git config --unset mergetool.prompt
- return 0
+ test_config diff.tool test-tool &&
+ test_config difftool.test-tool.cmd 'cat "$LOCAL"' &&
+ test_config difftool.bogus-tool.cmd false
}
-restore_test_defaults()
-{
- # Restores the test defaults used by several tests
- remove_config_vars
- unset GIT_DIFF_TOOL
- unset GIT_DIFFTOOL_PROMPT
- unset GIT_DIFFTOOL_NO_PROMPT
- git config diff.tool test-tool &&
- git config difftool.test-tool.cmd 'cat $LOCAL'
- git config difftool.bogus-tool.cmd false
-}
-
-prompt_given()
+prompt_given ()
{
prompt="$1"
test "$prompt" = "Launch 'test-tool' [Y/n]: branch"
}
-stdin_contains()
+stdin_contains ()
{
grep >/dev/null "$1"
}
-stdin_doesnot_contain()
+stdin_doesnot_contain ()
{
! stdin_contains "$1"
}
@@ -65,249 +47,237 @@ test_expect_success PERL 'setup' '
# Configure a custom difftool.<tool>.cmd and use it
test_expect_success PERL 'custom commands' '
- restore_test_defaults &&
- git config difftool.test-tool.cmd "cat \$REMOTE" &&
+ difftool_test_setup &&
+ test_config difftool.test-tool.cmd "cat \"\$REMOTE\"" &&
+ echo master >expect &&
+ git difftool --no-prompt branch >actual &&
+ test_cmp expect actual &&
- diff=$(git difftool --no-prompt branch) &&
- test "$diff" = "master" &&
-
- restore_test_defaults &&
- diff=$(git difftool --no-prompt branch) &&
- test "$diff" = "branch"
+ test_config difftool.test-tool.cmd "cat \"\$LOCAL\"" &&
+ echo branch >expect &&
+ git difftool --no-prompt branch >actual &&
+ test_cmp expect actual
'
-# Ensures that a custom difftool.<tool>.cmd overrides built-ins
-test_expect_success PERL 'custom commands override built-ins' '
- restore_test_defaults &&
- git config difftool.defaults.cmd "cat \$REMOTE" &&
-
- diff=$(git difftool --tool defaults --no-prompt branch) &&
- test "$diff" = "master" &&
-
- git config --unset difftool.defaults.cmd
+test_expect_success PERL 'custom tool commands override built-ins' '
+ test_config difftool.vimdiff.cmd "cat \"\$REMOTE\"" &&
+ echo master >expect &&
+ git difftool --tool vimdiff --no-prompt branch >actual &&
+ test_cmp expect actual
'
-# Ensures that git-difftool ignores bogus --tool values
test_expect_success PERL 'difftool ignores bad --tool values' '
- diff=$(git difftool --no-prompt --tool=bad-tool branch)
- test "$?" = 1 &&
- test "$diff" = ""
+ : >expect &&
+ test_expect_code 1 \
+ git difftool --no-prompt --tool=bad-tool branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool forwards arguments to diff' '
+ difftool_test_setup &&
>for-diff &&
git add for-diff &&
echo changes>for-diff &&
git add for-diff &&
- diff=$(git difftool --cached --no-prompt -- for-diff) &&
- test "$diff" = "" &&
+ : >expect &&
+ git difftool --cached --no-prompt -- for-diff >actual &&
+ test_cmp expect actual &&
git reset -- for-diff &&
rm for-diff
'
test_expect_success PERL 'difftool honors --gui' '
- git config merge.tool bogus-tool &&
- git config diff.tool bogus-tool &&
- git config diff.guitool test-tool &&
-
- diff=$(git difftool --no-prompt --gui branch) &&
- test "$diff" = "branch" &&
+ difftool_test_setup &&
+ test_config merge.tool bogus-tool &&
+ test_config diff.tool bogus-tool &&
+ test_config diff.guitool test-tool &&
- restore_test_defaults
+ echo branch >expect &&
+ git difftool --no-prompt --gui branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool --gui last setting wins' '
- git config diff.guitool bogus-tool &&
- git difftool --no-prompt --gui --no-gui &&
+ difftool_test_setup &&
+ : >expect &&
+ git difftool --no-prompt --gui --no-gui >actual &&
+ test_cmp expect actual &&
- git config merge.tool bogus-tool &&
- git config diff.tool bogus-tool &&
- git config diff.guitool test-tool &&
- diff=$(git difftool --no-prompt --no-gui --gui branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ test_config merge.tool bogus-tool &&
+ test_config diff.tool bogus-tool &&
+ test_config diff.guitool test-tool &&
+ echo branch >expect &&
+ git difftool --no-prompt --no-gui --gui branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool --gui works without configured diff.guitool' '
- git config diff.tool test-tool &&
-
- diff=$(git difftool --no-prompt --gui branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ echo branch >expect &&
+ git difftool --no-prompt --gui branch >actual &&
+ test_cmp expect actual
'
# Specify the diff tool using $GIT_DIFF_TOOL
test_expect_success PERL 'GIT_DIFF_TOOL variable' '
- test_might_fail git config --unset diff.tool &&
- GIT_DIFF_TOOL=test-tool &&
- export GIT_DIFF_TOOL &&
-
- diff=$(git difftool --no-prompt branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ git config --unset diff.tool &&
+ echo branch >expect &&
+ GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual &&
+ test_cmp expect actual
'
# Test the $GIT_*_TOOL variables and ensure
# that $GIT_DIFF_TOOL always wins unless --tool is specified
test_expect_success PERL 'GIT_DIFF_TOOL overrides' '
- git config diff.tool bogus-tool &&
- git config merge.tool bogus-tool &&
-
- GIT_DIFF_TOOL=test-tool &&
- export GIT_DIFF_TOOL &&
-
- diff=$(git difftool --no-prompt branch) &&
- test "$diff" = "branch" &&
+ difftool_test_setup &&
+ test_config diff.tool bogus-tool &&
+ test_config merge.tool bogus-tool &&
- GIT_DIFF_TOOL=bogus-tool &&
- export GIT_DIFF_TOOL &&
+ echo branch >expect &&
+ GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual &&
+ test_cmp expect actual &&
- diff=$(git difftool --no-prompt --tool=test-tool branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ test_config diff.tool bogus-tool &&
+ test_config merge.tool bogus-tool &&
+ GIT_DIFF_TOOL=bogus-tool \
+ git difftool --no-prompt --tool=test-tool branch >actual &&
+ test_cmp expect actual
'
# Test that we don't have to pass --no-prompt to difftool
# when $GIT_DIFFTOOL_NO_PROMPT is true
test_expect_success PERL 'GIT_DIFFTOOL_NO_PROMPT variable' '
- GIT_DIFFTOOL_NO_PROMPT=true &&
- export GIT_DIFFTOOL_NO_PROMPT &&
-
- diff=$(git difftool branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ echo branch >expect &&
+ GIT_DIFFTOOL_NO_PROMPT=true git difftool branch >actual &&
+ test_cmp expect actual
'
# git-difftool supports the difftool.prompt variable.
# Test that GIT_DIFFTOOL_PROMPT can override difftool.prompt = false
test_expect_success PERL 'GIT_DIFFTOOL_PROMPT variable' '
- git config difftool.prompt false &&
- GIT_DIFFTOOL_PROMPT=true &&
- export GIT_DIFFTOOL_PROMPT &&
-
- prompt=$(echo | git difftool branch | tail -1) &&
- prompt_given "$prompt" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ test_config difftool.prompt false &&
+ echo >input &&
+ GIT_DIFFTOOL_PROMPT=true git difftool branch <input >output &&
+ prompt=$(tail -1 <output) &&
+ prompt_given "$prompt"
'
# Test that we don't have to pass --no-prompt when difftool.prompt is false
test_expect_success PERL 'difftool.prompt config variable is false' '
- git config difftool.prompt false &&
-
- diff=$(git difftool branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ test_config difftool.prompt false &&
+ echo branch >expect &&
+ git difftool branch >actual &&
+ test_cmp expect actual
'
# Test that we don't have to pass --no-prompt when mergetool.prompt is false
test_expect_success PERL 'difftool merge.prompt = false' '
+ difftool_test_setup &&
test_might_fail git config --unset difftool.prompt &&
- git config mergetool.prompt false &&
-
- diff=$(git difftool branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ test_config mergetool.prompt false &&
+ echo branch >expect &&
+ git difftool branch >actual &&
+ test_cmp expect actual
'
# Test that the -y flag can override difftool.prompt = true
test_expect_success PERL 'difftool.prompt can overridden with -y' '
- git config difftool.prompt true &&
-
- diff=$(git difftool -y branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ test_config difftool.prompt true &&
+ echo branch >expect &&
+ git difftool -y branch >actual &&
+ test_cmp expect actual
'
# Test that the --prompt flag can override difftool.prompt = false
test_expect_success PERL 'difftool.prompt can overridden with --prompt' '
- git config difftool.prompt false &&
-
- prompt=$(echo | git difftool --prompt branch | tail -1) &&
- prompt_given "$prompt" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ test_config difftool.prompt false &&
+ echo >input &&
+ git difftool --prompt branch <input >output &&
+ prompt=$(tail -1 <output) &&
+ prompt_given "$prompt"
'
# Test that the last flag passed on the command-line wins
test_expect_success PERL 'difftool last flag wins' '
- diff=$(git difftool --prompt --no-prompt branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults &&
-
- prompt=$(echo | git difftool --no-prompt --prompt branch | tail -1) &&
- prompt_given "$prompt" &&
-
- restore_test_defaults
+ difftool_test_setup &&
+ echo branch >expect &&
+ git difftool --prompt --no-prompt branch >actual &&
+ test_cmp expect actual &&
+ echo >input &&
+ git difftool --no-prompt --prompt branch <input >output &&
+ prompt=$(tail -1 <output) &&
+ prompt_given "$prompt"
'
# git-difftool falls back to git-mergetool config variables
# so test that behavior here
test_expect_success PERL 'difftool + mergetool config variables' '
- remove_config_vars &&
- git config merge.tool test-tool &&
- git config mergetool.test-tool.cmd "cat \$LOCAL" &&
-
- diff=$(git difftool --no-prompt branch) &&
- test "$diff" = "branch" &&
+ test_config merge.tool test-tool &&
+ test_config mergetool.test-tool.cmd "cat \$LOCAL" &&
+ echo branch >expect &&
+ git difftool --no-prompt branch >actual &&
+ test_cmp expect actual &&
# set merge.tool to something bogus, diff.tool to test-tool
- git config merge.tool bogus-tool &&
- git config diff.tool test-tool &&
-
- diff=$(git difftool --no-prompt branch) &&
- test "$diff" = "branch" &&
-
- restore_test_defaults
+ test_config merge.tool bogus-tool &&
+ test_config diff.tool test-tool &&
+ git difftool --no-prompt branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool.<tool>.path' '
- git config difftool.tkdiff.path echo &&
- diff=$(git difftool --tool=tkdiff --no-prompt branch) &&
- git config --unset difftool.tkdiff.path &&
- lines=$(echo "$diff" | grep file | wc -l) &&
- test "$lines" -eq 1 &&
-
- restore_test_defaults
+ test_config difftool.tkdiff.path echo &&
+ git difftool --tool=tkdiff --no-prompt branch >output &&
+ lines=$(grep file output | wc -l) &&
+ test "$lines" -eq 1
'
test_expect_success PERL 'difftool --extcmd=cat' '
- diff=$(git difftool --no-prompt --extcmd=cat branch) &&
- test "$diff" = branch"$LF"master
+ echo branch >expect &&
+ echo master >>expect &&
+ git difftool --no-prompt --extcmd=cat branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool --extcmd cat' '
- diff=$(git difftool --no-prompt --extcmd cat branch) &&
- test "$diff" = branch"$LF"master
+ echo branch >expect &&
+ echo master >>expect &&
+ git difftool --no-prompt --extcmd=cat branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool -x cat' '
- diff=$(git difftool --no-prompt -x cat branch) &&
- test "$diff" = branch"$LF"master
+ echo branch >expect &&
+ echo master >>expect &&
+ git difftool --no-prompt -x cat branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool --extcmd echo arg1' '
- diff=$(git difftool --no-prompt --extcmd sh\ -c\ \"echo\ \$1\" branch) &&
- test "$diff" = file
+ echo file >expect &&
+ git difftool --no-prompt \
+ --extcmd sh\ -c\ \"echo\ \$1\" branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool --extcmd cat arg1' '
- diff=$(git difftool --no-prompt --extcmd sh\ -c\ \"cat\ \$1\" branch) &&
- test "$diff" = master
+ echo master >expect &&
+ git difftool --no-prompt \
+ --extcmd sh\ -c\ \"cat\ \$1\" branch >actual &&
+ test_cmp expect actual
'
test_expect_success PERL 'difftool --extcmd cat arg2' '
- diff=$(git difftool --no-prompt --extcmd sh\ -c\ \"cat\ \$2\" branch) &&
- test "$diff" = branch
+ echo branch >expect &&
+ git difftool --no-prompt \
+ --extcmd sh\ -c\ \"cat\ \$2\" branch >actual &&
+ test_cmp expect actual
'
# Create a second file on master and a different version on branch
@@ -324,26 +294,26 @@ test_expect_success PERL 'setup with 2 files different' '
'
test_expect_success PERL 'say no to the first file' '
- diff=$( (echo n; echo) | git difftool -x cat branch ) &&
-
- echo "$diff" | stdin_contains m2 &&
- echo "$diff" | stdin_contains br2 &&
- echo "$diff" | stdin_doesnot_contain master &&
- echo "$diff" | stdin_doesnot_contain branch
+ (echo n && echo) >input &&
+ git difftool -x cat branch <input >output &&
+ stdin_contains m2 <output &&
+ stdin_contains br2 <output &&
+ stdin_doesnot_contain master <output &&
+ stdin_doesnot_contain branch <output
'
test_expect_success PERL 'say no to the second file' '
- diff=$( (echo; echo n) | git difftool -x cat branch ) &&
-
- echo "$diff" | stdin_contains master &&
- echo "$diff" | stdin_contains branch &&
- echo "$diff" | stdin_doesnot_contain m2 &&
- echo "$diff" | stdin_doesnot_contain br2
+ (echo && echo n) >input &&
+ git difftool -x cat branch <input >output &&
+ stdin_contains master <output &&
+ stdin_contains branch <output &&
+ stdin_doesnot_contain m2 <output &&
+ stdin_doesnot_contain br2 <output
'
test_expect_success PERL 'difftool --tool-help' '
- tool_help=$(git difftool --tool-help) &&
- echo "$tool_help" | stdin_contains tool
+ git difftool --tool-help >output &&
+ stdin_contains tool <output
'
test_expect_success PERL 'setup change in subdirectory' '
@@ -359,29 +329,51 @@ test_expect_success PERL 'setup change in subdirectory' '
'
test_expect_success PERL 'difftool -d' '
- diff=$(git difftool -d --extcmd ls branch) &&
- echo "$diff" | stdin_contains sub &&
- echo "$diff" | stdin_contains file
+ git difftool -d --extcmd ls branch >output &&
+ stdin_contains sub <output &&
+ stdin_contains file <output
'
test_expect_success PERL 'difftool --dir-diff' '
- diff=$(git difftool --dir-diff --extcmd ls branch) &&
- echo "$diff" | stdin_contains sub &&
- echo "$diff" | stdin_contains file
+ git difftool --dir-diff --extcmd ls branch >output &&
+ stdin_contains sub <output &&
+ stdin_contains file <output
+'
+
+write_script .git/CHECK_SYMLINKS <<\EOF
+for f in file file2 sub/sub
+do
+ echo "$f"
+ readlink "$2/$f"
+done >actual
+EOF
+
+test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' '
+ cat >expect <<-EOF &&
+ file
+ $(pwd)/file
+ file2
+ $(pwd)/file2
+ sub/sub
+ $(pwd)/sub/sub
+ EOF
+ git difftool --dir-diff --symlink \
+ --extcmd "./.git/CHECK_SYMLINKS" branch HEAD &&
+ test_cmp actual expect
'
test_expect_success PERL 'difftool --dir-diff ignores --prompt' '
- diff=$(git difftool --dir-diff --prompt --extcmd ls branch) &&
- echo "$diff" | stdin_contains sub &&
- echo "$diff" | stdin_contains file
+ git difftool --dir-diff --prompt --extcmd ls branch >output &&
+ stdin_contains sub <output &&
+ stdin_contains file <output
'
test_expect_success PERL 'difftool --dir-diff from subdirectory' '
(
cd sub &&
- diff=$(git difftool --dir-diff --extcmd ls branch) &&
- echo "$diff" | stdin_contains sub &&
- echo "$diff" | stdin_contains file
+ git difftool --dir-diff --extcmd ls branch >output &&
+ stdin_contains sub <output &&
+ stdin_contains file <output
)
'
diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
index a8957782cf..e1951a5cbb 100755
--- a/t/t7811-grep-open.sh
+++ b/t/t7811-grep-open.sh
@@ -125,11 +125,6 @@ test_expect_success 'modified file' '
test_cmp empty out
'
-test_config() {
- git config "$1" "$2" &&
- test_when_finished "git config --unset $1"
-}
-
test_expect_success 'copes with color settings' '
rm -f actual &&
echo grep.h >expect &&
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 90bb6050c1..6783c14c1a 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -539,8 +539,7 @@ test_expect_success \
test_when_finished "GIT_COMMITTER_NAME=\"C O Mitter\"" &&
echo "ISO-8859-1" >> file &&
git add file &&
- git config i18n.commitencoding ISO-8859-1 &&
- test_when_finished "git config --unset i18n.commitencoding" &&
+ test_config i18n.commitencoding ISO-8859-1 &&
git commit -F "$TEST_DIRECTORY"/t3900/ISO8859-1.txt &&
gitweb_run "p=.git;a=commit"'
diff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh
index dc92e60cd6..11d2b5102c 100755
--- a/t/t9808-git-p4-chdir.sh
+++ b/t/t9808-git-p4-chdir.sh
@@ -42,6 +42,47 @@ test_expect_success 'P4CONFIG and relative dir clone' '
)
'
+# Common setup using .p4config to set P4CLIENT and P4PORT breaks
+# if clone destination is relative. Make sure that chdir() expands
+# the relative path in --dest to absolute.
+test_expect_success 'p4 client root would be relative due to clone --dest' '
+ test_when_finished cleanup_git &&
+ (
+ echo P4PORT=$P4PORT >git/.p4config &&
+ P4CONFIG=.p4config &&
+ export P4CONFIG &&
+ unset P4PORT &&
+ git p4 clone --dest="git" //depot
+ )
+'
+
+# When the p4 client Root is a symlink, make sure chdir() does not use
+# getcwd() to convert it to a physical path.
+test_expect_success SYMLINKS 'p4 client root symlink should stay symbolic' '
+ physical="$TRASH_DIRECTORY/physical" &&
+ symbolic="$TRASH_DIRECTORY/symbolic" &&
+ test_when_finished "rm -rf \"$physical\"" &&
+ test_when_finished "rm \"$symbolic\"" &&
+ mkdir -p "$physical" &&
+ ln -s "$physical" "$symbolic" &&
+ test_when_finished cleanup_git &&
+ (
+ P4CLIENT=client-sym &&
+ p4 client -i <<-EOF &&
+ Client: $P4CLIENT
+ Description: $P4CLIENT
+ Root: $symbolic
+ LineEnd: unix
+ View: //depot/... //$P4CLIENT/...
+ EOF
+ git p4 clone --dest="$git" //depot &&
+ cd "$git" &&
+ test_commit file2 &&
+ git config git-p4.skipSubmitEdit true &&
+ git p4 submit
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index fa62d010f6..61d0804435 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -135,12 +135,12 @@ test_pause () {
fi
}
-# Call test_commit with the arguments "<message> [<file> [<contents>]]"
+# Call test_commit with the arguments "<message> [<file> [<contents> [<tag>]]]"
#
# This will commit a file with the given contents and the given commit
-# message. It will also add a tag with <message> as name.
+# message, and tag the resulting commit with the given tag name.
#
-# Both <file> and <contents> default to <message>.
+# <file>, <contents>, and <tag> all default to <message>.
test_commit () {
notick= &&
@@ -168,7 +168,7 @@ test_commit () {
test_tick
fi &&
git commit $signoff -m "$1" &&
- git tag "$1"
+ git tag "${4:-$1}"
}
# Call test_merge with the arguments "<message> <commit>", where <commit>
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 9e7f6b424d..1f510252ad 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -760,3 +760,9 @@ test_lazy_prereq AUTOIDENT '
# When the tests are run as root, permission tests will report that
# things are writable when they shouldn't be.
test -w / || test_set_prereq SANITY
+
+GIT_UNZIP=${GIT_UNZIP:-unzip}
+test_lazy_prereq UNZIP '
+ "$GIT_UNZIP" -v
+ test $? -ne 127
+'
diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample
index 71ab04edc0..d84758373d 100755
--- a/templates/hooks--update.sample
+++ b/templates/hooks--update.sample
@@ -38,7 +38,7 @@ if [ -z "$GIT_DIR" ]; then
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
- echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
+ echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
diff --git a/test-chmtime.c b/test-chmtime.c
index 92713d16da..02b42badd5 100644
--- a/test-chmtime.c
+++ b/test-chmtime.c
@@ -114,6 +114,6 @@ int main(int argc, const char *argv[])
return 0;
usage:
- fprintf(stderr, "Usage: %s %s\n", argv[0], usage_str);
+ fprintf(stderr, "usage: %s %s\n", argv[0], usage_str);
return -1;
}
diff --git a/test-delta.c b/test-delta.c
index af40a3c49e..4595cd6433 100644
--- a/test-delta.c
+++ b/test-delta.c
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
unsigned long from_size, data_size, out_size;
if (argc != 5 || (strcmp(argv[1], "-d") && strcmp(argv[1], "-p"))) {
- fprintf(stderr, "Usage: %s\n", usage_str);
+ fprintf(stderr, "usage: %s\n", usage_str);
return 1;
}
diff --git a/test-genrandom.c b/test-genrandom.c
index b3c28d9a1c..54824d0754 100644
--- a/test-genrandom.c
+++ b/test-genrandom.c
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
unsigned char *c;
if (argc < 2 || argc > 3) {
- fprintf(stderr, "Usage: %s <seed_string> [<size>]\n", argv[0]);
+ fprintf(stderr, "usage: %s <seed_string> [<size>]\n", argv[0]);
return 1;
}
diff --git a/test-svn-fe.c b/test-svn-fe.c
index 0f2d9a4a3d..120ec96b0d 100644
--- a/test-svn-fe.c
+++ b/test-svn-fe.c
@@ -24,7 +24,7 @@ static int apply_delta(int argc, char *argv[])
die_errno("cannot open preimage");
if (buffer_init(&delta, argv[3]))
die_errno("cannot open delta");
- if (svndiff0_apply(&delta, (off_t) strtoull(argv[4], NULL, 0),
+ if (svndiff0_apply(&delta, (off_t) strtoumax(argv[4], NULL, 0),
&preimage_view, stdout))
return 1;
if (buffer_deinit(&preimage))
diff --git a/transport.c b/transport.c
index 62df466c1a..ba5d8afb1b 100644
--- a/transport.c
+++ b/transport.c
@@ -106,7 +106,8 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
return;
for (;;) {
- int cmp = cmp, len;
+ int cmp = 0; /* assigned before used */
+ int len;
if (!fgets(buffer, sizeof(buffer), f)) {
fclose(f);
@@ -518,11 +519,9 @@ static int fetch_refs_via_pack(struct transport *transport,
int nr_heads, struct ref **to_fetch)
{
struct git_transport_data *data = transport->data;
- struct string_list sought = STRING_LIST_INIT_DUP;
const struct ref *refs;
char *dest = xstrdup(transport->url);
struct fetch_pack_args args;
- int i;
struct ref *refs_tmp = NULL;
memset(&args, 0, sizeof(args));
@@ -536,9 +535,6 @@ static int fetch_refs_via_pack(struct transport *transport,
args.no_progress = !transport->progress;
args.depth = data->options.depth;
- for (i = 0; i < nr_heads; i++)
- string_list_append(&sought, to_fetch[i]->name);
-
if (!data->got_remote_heads) {
connect_setup(transport, 0, 0);
get_remote_heads(data->fd[0], NULL, 0, &refs_tmp, 0, NULL);
@@ -547,7 +543,8 @@ static int fetch_refs_via_pack(struct transport *transport,
refs = fetch_pack(&args, data->fd, data->conn,
refs_tmp ? refs_tmp : transport->remote_refs,
- dest, &sought, &transport->pack_lockfile);
+ dest, to_fetch, nr_heads,
+ &transport->pack_lockfile);
close(data->fd[0]);
close(data->fd[1]);
if (finish_connect(data->conn))
@@ -557,7 +554,6 @@ static int fetch_refs_via_pack(struct transport *transport,
free_refs(refs_tmp);
- string_list_clear(&sought, 0);
free(dest);
return (refs ? 0 : -1);
}
@@ -1132,6 +1128,8 @@ int transport_push(struct transport *transport,
match_flags |= MATCH_REFS_MIRROR;
if (flags & TRANSPORT_PUSH_PRUNE)
match_flags |= MATCH_REFS_PRUNE;
+ if (flags & TRANSPORT_PUSH_FOLLOW_TAGS)
+ match_flags |= MATCH_REFS_FOLLOW_TAGS;
if (match_push_refs(local_refs, &remote_refs,
refspec_nr, refspec, match_flags)) {
diff --git a/transport.h b/transport.h
index a3450e97c0..9354462708 100644
--- a/transport.h
+++ b/transport.h
@@ -105,6 +105,7 @@ struct transport {
#define TRANSPORT_PUSH_PRUNE 128
#define TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND 256
#define TRANSPORT_PUSH_NO_HOOK 512
+#define TRANSPORT_PUSH_FOLLOW_TAGS 1024
#define TRANSPORT_SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
#define TRANSPORT_SUMMARY(x) (int)(TRANSPORT_SUMMARY_WIDTH + strlen(x) - gettext_width(x)), (x)
diff --git a/upload-pack.c b/upload-pack.c
index 98ddb69581..bfa6279cc4 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -26,6 +26,7 @@ static const char upload_pack_usage[] = "git upload-pack [--strict] [--timeout=<
#define SHALLOW (1u << 16)
#define NOT_SHALLOW (1u << 17)
#define CLIENT_SHALLOW (1u << 18)
+#define HIDDEN_REF (1u << 19)
static unsigned long oldest_have;
@@ -33,6 +34,7 @@ static int multi_ack;
static int no_done;
static int use_thin_pack, use_ofs_delta, use_include_tag;
static int no_progress, daemon_mode;
+static int allow_tip_sha1_in_want;
static int shallow_nr;
static struct object_array have_obj;
static struct object_array want_obj;
@@ -318,9 +320,7 @@ static int got_sha1(char *hex, unsigned char *sha1)
if (!has_sha1_file(sha1))
return -1;
- o = lookup_object(sha1);
- if (!(o && o->parsed))
- o = parse_object(sha1);
+ o = parse_object(sha1);
if (!o)
die("oops (%s)", sha1_to_hex(sha1));
if (o->type == OBJ_COMMIT) {
@@ -478,6 +478,12 @@ static int get_common_commits(void)
}
}
+static int is_our_ref(struct object *o)
+{
+ return o->flags &
+ ((allow_tip_sha1_in_want ? HIDDEN_REF : 0) | OUR_REF);
+}
+
static void check_non_tip(void)
{
static const char *argv[] = {
@@ -514,7 +520,7 @@ static void check_non_tip(void)
o = get_indexed_object(--i);
if (!o)
continue;
- if (!(o->flags & OUR_REF))
+ if (!is_our_ref(o))
continue;
memcpy(namebuf + 1, sha1_to_hex(o->sha1), 40);
if (write_in_full(cmd.in, namebuf, 42) < 0)
@@ -523,7 +529,7 @@ static void check_non_tip(void)
namebuf[40] = '\n';
for (i = 0; i < want_obj.nr; i++) {
o = want_obj.objects[i].item;
- if (o->flags & OUR_REF)
+ if (is_our_ref(o))
continue;
memcpy(namebuf, sha1_to_hex(o->sha1), 40);
if (write_in_full(cmd.in, namebuf, 41) < 0)
@@ -557,7 +563,7 @@ error:
/* Pick one of them (we know there at least is one) */
for (i = 0; i < want_obj.nr; i++) {
o = want_obj.objects[i].item;
- if (!(o->flags & OUR_REF))
+ if (!is_our_ref(o))
die("git upload-pack: not our ref %s",
sha1_to_hex(o->sha1));
}
@@ -628,13 +634,13 @@ static void receive_needs(void)
if (parse_feature_request(features, "include-tag"))
use_include_tag = 1;
- o = lookup_object(sha1_buf);
+ o = parse_object(sha1_buf);
if (!o)
die("git upload-pack: not our ref %s",
sha1_to_hex(sha1_buf));
if (!(o->flags & WANTED)) {
o->flags |= WANTED;
- if (!(o->flags & OUR_REF))
+ if (!is_our_ref(o))
has_non_tip = 1;
add_object_array(o, NULL, &want_obj);
}
@@ -718,8 +724,10 @@ static int mark_our_ref(const char *refname, const unsigned char *sha1, int flag
{
struct object *o = lookup_unknown_object(sha1);
- if (ref_is_hidden(refname))
+ if (ref_is_hidden(refname)) {
+ o->flags |= HIDDEN_REF;
return 1;
+ }
if (!o)
die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
o->flags |= OUR_REF;
@@ -738,9 +746,10 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
return 0;
if (capabilities)
- packet_write(1, "%s %s%c%s%s agent=%s\n",
+ packet_write(1, "%s %s%c%s%s%s agent=%s\n",
sha1_to_hex(sha1), refname_nons,
0, capabilities,
+ allow_tip_sha1_in_want ? " allow-tip-sha1-in-want" : "",
stateless_rpc ? " no-done" : "",
git_user_agent_sanitized());
else
@@ -774,6 +783,8 @@ static void upload_pack(void)
static int upload_pack_config(const char *var, const char *value, void *unused)
{
+ if (!strcmp("uploadpack.allowtipsha1inwant", var))
+ allow_tip_sha1_in_want = git_config_bool(var, value);
return parse_hide_refs_config(var, value, "uploadpack");
}
diff --git a/utf8.c b/utf8.c
index 1087870c51..7f648574a5 100644
--- a/utf8.c
+++ b/utf8.c
@@ -507,11 +507,66 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e
if (!in_encoding)
return NULL;
+
conv = iconv_open(out_encoding, in_encoding);
- if (conv == (iconv_t) -1)
- return NULL;
+ if (conv == (iconv_t) -1) {
+ /*
+ * Some platforms do not have the variously spelled variants of
+ * UTF-8, so let's fall back to trying the most official
+ * spelling. We do so only as a fallback in case the platform
+ * does understand the user's spelling, but not our official
+ * one.
+ */
+ if (is_encoding_utf8(in_encoding))
+ in_encoding = "UTF-8";
+ if (is_encoding_utf8(out_encoding))
+ out_encoding = "UTF-8";
+ conv = iconv_open(out_encoding, in_encoding);
+ if (conv == (iconv_t) -1)
+ return NULL;
+ }
+
out = reencode_string_iconv(in, strlen(in), conv);
iconv_close(conv);
return out;
}
#endif
+
+/*
+ * Returns first character length in bytes for multi-byte `text` according to
+ * `encoding`.
+ *
+ * - The `text` pointer is updated to point at the next character.
+ * - When `remainder_p` is not NULL, on entry `*remainder_p` is how much bytes
+ * we can consume from text, and on exit `*remainder_p` is reduced by returned
+ * character length. Otherwise `text` is treated as limited by NUL.
+ */
+int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding)
+{
+ int chrlen;
+ const char *p = *text;
+ size_t r = (remainder_p ? *remainder_p : SIZE_MAX);
+
+ if (r < 1)
+ return 0;
+
+ if (is_encoding_utf8(encoding)) {
+ pick_one_utf8_char(&p, &r);
+
+ chrlen = p ? (p - *text)
+ : 1 /* not valid UTF-8 -> raw byte sequence */;
+ }
+ else {
+ /*
+ * TODO use iconv to decode one char and obtain its chrlen
+ * for now, let's treat encodings != UTF-8 as one-byte
+ */
+ chrlen = 1;
+ }
+
+ *text += chrlen;
+ if (remainder_p)
+ *remainder_p -= chrlen;
+
+ return chrlen;
+}
diff --git a/utf8.h b/utf8.h
index 501b2bd9c4..1f8ecad1e8 100644
--- a/utf8.h
+++ b/utf8.h
@@ -22,4 +22,6 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e
#define reencode_string(a,b,c) NULL
#endif
+int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding);
+
#endif
diff --git a/wt-status.c b/wt-status.c
index ef405d03d9..54f4391f9c 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -264,7 +264,7 @@ static void wt_status_print_change_data(struct wt_status *s,
{
struct wt_status_change_data *d = it->util;
const char *c = color(change_type, s);
- int status = status;
+ int status;
char *one_name;
char *two_name;
const char *one, *two;
@@ -292,6 +292,9 @@ static void wt_status_print_change_data(struct wt_status *s,
}
status = d->worktree_status;
break;
+ default:
+ die("BUG: unhandled change_type %d in wt_status_print_change_data",
+ change_type);
}
one = quote_path(one_name, -1, &onebuf, s->prefix);
@@ -496,9 +499,14 @@ static void wt_status_collect_untracked(struct wt_status *s)
{
int i;
struct dir_struct dir;
+ struct timeval t_begin;
if (!s->show_untracked_files)
return;
+
+ if (advice_status_u_option)
+ gettimeofday(&t_begin, NULL);
+
memset(&dir, 0, sizeof(dir));
if (s->show_untracked_files != SHOW_ALL_UNTRACKED_FILES)
dir.flags |=
@@ -530,6 +538,14 @@ static void wt_status_collect_untracked(struct wt_status *s)
}
free(dir.entries);
+
+ if (advice_status_u_option) {
+ struct timeval t_end;
+ gettimeofday(&t_end, NULL);
+ s->untracked_in_ms =
+ (uint64_t)t_end.tv_sec * 1000 + t_end.tv_usec / 1000 -
+ ((uint64_t)t_begin.tv_sec * 1000 + t_begin.tv_usec / 1000);
+ }
}
void wt_status_collect(struct wt_status *s)
@@ -1097,6 +1113,18 @@ void wt_status_print(struct wt_status *s)
wt_status_print_other(s, &s->untracked, _("Untracked files"), "add");
if (s->show_ignored_files)
wt_status_print_other(s, &s->ignored, _("Ignored files"), "add -f");
+ if (advice_status_u_option && 2000 < s->untracked_in_ms) {
+ status_printf_ln(s, GIT_COLOR_NORMAL, "");
+ status_printf_ln(s, GIT_COLOR_NORMAL,
+ _("It took %.2f seconds to enumerate untracked files."
+ " 'status -uno'"),
+ s->untracked_in_ms / 1000.0);
+ status_printf_ln(s, GIT_COLOR_NORMAL,
+ _("may speed it up, but you have to be careful not"
+ " to forget to add"));
+ status_printf_ln(s, GIT_COLOR_NORMAL,
+ _("new files yourself (see 'git help status')."));
+ }
} else if (s->commitable)
status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
advice_status_hints
diff --git a/wt-status.h b/wt-status.h
index 81e1dcf84d..74208c06fd 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -69,6 +69,7 @@ struct wt_status {
struct string_list change;
struct string_list untracked;
struct string_list ignored;
+ uint32_t untracked_in_ms;
};
struct wt_status_state {
diff --git a/zlib.c b/zlib.c
index 2b2c0c780e..bbaa0815ed 100644
--- a/zlib.c
+++ b/zlib.c
@@ -168,13 +168,8 @@ void git_deflate_init(git_zstream *strm, int level)
strm->z.msg ? strm->z.msg : "no message");
}
-void git_deflate_init_gzip(git_zstream *strm, int level)
+static void do_git_deflate_init(git_zstream *strm, int level, int windowBits)
{
- /*
- * Use default 15 bits, +16 is to generate gzip header/trailer
- * instead of the zlib wrapper.
- */
- const int windowBits = 15 + 16;
int status;
zlib_pre_call(strm);
@@ -188,6 +183,24 @@ void git_deflate_init_gzip(git_zstream *strm, int level)
strm->z.msg ? strm->z.msg : "no message");
}
+void git_deflate_init_gzip(git_zstream *strm, int level)
+{
+ /*
+ * Use default 15 bits, +16 is to generate gzip header/trailer
+ * instead of the zlib wrapper.
+ */
+ return do_git_deflate_init(strm, level, 15 + 16);
+}
+
+void git_deflate_init_raw(git_zstream *strm, int level)
+{
+ /*
+ * Use default 15 bits, negate the value to get raw compressed
+ * data without zlib header and trailer.
+ */
+ return do_git_deflate_init(strm, level, -15);
+}
+
int git_deflate_abort(git_zstream *strm)
{
int status;