]> rtime.felk.cvut.cz Git - git.git/commitdiff
Merge branch 'jk/lock-ref-sha1-basic-return-errors'
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Dec 2014 20:26:27 +0000 (12:26 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Dec 2014 20:26:27 +0000 (12:26 -0800)
Correct an API anomaly.

* jk/lock-ref-sha1-basic-return-errors:
  lock_ref_sha1_basic: do not die on locking errors

85 files changed:
Documentation/RelNotes/1.8.5.6.txt [new file with mode: 0644]
Documentation/RelNotes/1.9.5.txt [new file with mode: 0644]
Documentation/RelNotes/2.0.5.txt [new file with mode: 0644]
Documentation/RelNotes/2.1.4.txt [new file with mode: 0644]
Documentation/RelNotes/2.2.0.txt
Documentation/RelNotes/2.2.1.txt [new file with mode: 0644]
Documentation/RelNotes/2.3.0.txt [new file with mode: 0644]
Documentation/SubmittingPatches
Documentation/config.txt
Documentation/git-fast-export.txt
Documentation/git-fast-import.txt
Documentation/git-notes.txt
Documentation/git-push.txt
Documentation/git-remote-ext.txt
Documentation/git-remote-fd.txt
Documentation/git.txt
Documentation/gitremote-helpers.txt
Documentation/gittutorial-2.txt
Documentation/gittutorial.txt
GIT-VERSION-GEN
Makefile
RelNotes
builtin/apply.c
builtin/checkout.c
builtin/commit.c
builtin/config.c
builtin/init-db.c
builtin/merge.c
builtin/notes.c
builtin/push.c
builtin/receive-pack.c
builtin/repack.c
cache.h
commit.c
commit.h
compat/mingw.c
config.c
config.mak.uname
connect.c
csum-file.h
environment.c
fsck.c
git-difftool--helper.sh
git-mergetool--lib.sh
git-mergetool.sh
git.c
gitweb/gitweb.perl
mergetools/diffmerge
mergetools/emerge
mergetools/kdiff3
notes.c
pack-bitmap-write.c
pack-bitmap.c
pack-bitmap.h
path.c
po/bg.po
po/ca.po
po/de.po
po/fr.po
po/git.pot
po/sv.po
po/vi.po
po/zh_CN.po
read-cache.c
sequencer.c
sequencer.h
t/t0001-init.sh
t/t0090-cache-tree.sh
t/t1014-read-tree-confusing.sh [new file with mode: 0755]
t/t1450-fsck.sh
t/t2022-checkout-paths.sh
t/t3301-notes.sh
t/t3507-cherry-pick-conflict.sh
t/t4026-color.sh
t/t5528-push-default.sh
t/t5705-clone-2gb.sh
t/t7513-interpret-trailers.sh
t/t9603-cvsimport-patchsets.sh
t/t9604-cvsimport-timestamps.sh
t/test-lib.sh
trailer.c
unpack-trees.c
utf8.c
utf8.h
wt-status.c

diff --git a/Documentation/RelNotes/1.8.5.6.txt b/Documentation/RelNotes/1.8.5.6.txt
new file mode 100644 (file)
index 0000000..92ff92b
--- /dev/null
@@ -0,0 +1,34 @@
+Git v1.8.5.6 Release Notes
+==========================
+
+Fixes since v1.8.5.5
+--------------------
+
+ * We used to allow committing a path ".Git/config" with Git that is
+   running on a case sensitive filesystem, but an attempt to check out
+   such a path with Git that runs on a case insensitive filesystem
+   would have clobbered ".git/config", which is definitely not what
+   the user would have expected.  Git now prevents you from tracking
+   a path with ".Git" (in any case combination) as a path component.
+
+ * On Windows, certain path components that are different from ".git"
+   are mapped to ".git", e.g. "git~1/config" is treated as if it were
+   ".git/config".  HFS+ has a similar issue, where certain unicode
+   codepoints are ignored, e.g. ".g\u200cit/config" is treated as if
+   it were ".git/config".  Pathnames with these potential issues are
+   rejected on the affected systems.  Git on systems that are not
+   affected by this issue (e.g. Linux) can also be configured to
+   reject them to ensure cross platform interoperability of the hosted
+   projects.
+
+ * "git fsck" notices a tree object that records such a path that can
+   be confused with ".git", and with receive.fsckObjects configuration
+   set to true, an attempt to "git push" such a tree object will be
+   rejected.  Such a path may not be a problem on a well behaving
+   filesystem but in order to protect those on HFS+ and on case
+   insensitive filesystems, this check is enabled on all platforms.
+
+A big "thanks!" for bringing this issue to us goes to our friends in
+the Mercurial land, namely, Matt Mackall and Augie Fackler.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/1.9.5.txt b/Documentation/RelNotes/1.9.5.txt
new file mode 100644 (file)
index 0000000..8d6ac0c
--- /dev/null
@@ -0,0 +1,34 @@
+Git v1.9.5 Release Notes
+========================
+
+Fixes since v1.9.4
+------------------
+
+ * We used to allow committing a path ".Git/config" with Git that is
+   running on a case sensitive filesystem, but an attempt to check out
+   such a path with Git that runs on a case insensitive filesystem
+   would have clobbered ".git/config", which is definitely not what
+   the user would have expected.  Git now prevents you from tracking
+   a path with ".Git" (in any case combination) as a path component.
+
+ * On Windows, certain path components that are different from ".git"
+   are mapped to ".git", e.g. "git~1/config" is treated as if it were
+   ".git/config".  HFS+ has a similar issue, where certain unicode
+   codepoints are ignored, e.g. ".g\u200cit/config" is treated as if
+   it were ".git/config".  Pathnames with these potential issues are
+   rejected on the affected systems.  Git on systems that are not
+   affected by this issue (e.g. Linux) can also be configured to
+   reject them to ensure cross platform interoperability of the hosted
+   projects.
+
+ * "git fsck" notices a tree object that records such a path that can
+   be confused with ".git", and with receive.fsckObjects configuration
+   set to true, an attempt to "git push" such a tree object will be
+   rejected.  Such a path may not be a problem on a well behaving
+   filesystem but in order to protect those on HFS+ and on case
+   insensitive filesystems, this check is enabled on all platforms.
+
+A big "thanks!" for bringing this issue to us goes to our friends in
+the Mercurial land, namely, Matt Mackall and Augie Fackler.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.0.5.txt b/Documentation/RelNotes/2.0.5.txt
new file mode 100644 (file)
index 0000000..3a16f69
--- /dev/null
@@ -0,0 +1,34 @@
+Git v2.0.5 Release Notes
+========================
+
+Fixes since v2.0.4
+------------------
+
+ * We used to allow committing a path ".Git/config" with Git that is
+   running on a case sensitive filesystem, but an attempt to check out
+   such a path with Git that runs on a case insensitive filesystem
+   would have clobbered ".git/config", which is definitely not what
+   the user would have expected.  Git now prevents you from tracking
+   a path with ".Git" (in any case combination) as a path component.
+
+ * On Windows, certain path components that are different from ".git"
+   are mapped to ".git", e.g. "git~1/config" is treated as if it were
+   ".git/config".  HFS+ has a similar issue, where certain unicode
+   codepoints are ignored, e.g. ".g\u200cit/config" is treated as if
+   it were ".git/config".  Pathnames with these potential issues are
+   rejected on the affected systems.  Git on systems that are not
+   affected by this issue (e.g. Linux) can also be configured to
+   reject them to ensure cross platform interoperability of the hosted
+   projects.
+
+ * "git fsck" notices a tree object that records such a path that can
+   be confused with ".git", and with receive.fsckObjects configuration
+   set to true, an attempt to "git push" such a tree object will be
+   rejected.  Such a path may not be a problem on a well behaving
+   filesystem but in order to protect those on HFS+ and on case
+   insensitive filesystems, this check is enabled on all platforms.
+
+A big "thanks!" for bringing this issue to us goes to our friends in
+the Mercurial land, namely, Matt Mackall and Augie Fackler.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.1.4.txt b/Documentation/RelNotes/2.1.4.txt
new file mode 100644 (file)
index 0000000..d16e5f0
--- /dev/null
@@ -0,0 +1,34 @@
+Git v2.1.4 Release Notes
+========================
+
+Fixes since v2.1.3
+------------------
+
+ * We used to allow committing a path ".Git/config" with Git that is
+   running on a case sensitive filesystem, but an attempt to check out
+   such a path with Git that runs on a case insensitive filesystem
+   would have clobbered ".git/config", which is definitely not what
+   the user would have expected.  Git now prevents you from tracking
+   a path with ".Git" (in any case combination) as a path component.
+
+ * On Windows, certain path components that are different from ".git"
+   are mapped to ".git", e.g. "git~1/config" is treated as if it were
+   ".git/config".  HFS+ has a similar issue, where certain unicode
+   codepoints are ignored, e.g. ".g\u200cit/config" is treated as if
+   it were ".git/config".  Pathnames with these potential issues are
+   rejected on the affected systems.  Git on systems that are not
+   affected by this issue (e.g. Linux) can also be configured to
+   reject them to ensure cross platform interoperability of the hosted
+   projects.
+
+ * "git fsck" notices a tree object that records such a path that can
+   be confused with ".git", and with receive.fsckObjects configuration
+   set to true, an attempt to "git push" such a tree object will be
+   rejected.  Such a path may not be a problem on a well behaving
+   filesystem but in order to protect those on HFS+ and on case
+   insensitive filesystems, this check is enabled on all platforms.
+
+A big "thanks!" for bringing this issue to us goes to our friends in
+the Mercurial land, namely, Matt Mackall and Augie Fackler.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
index d4001c5ae5e82e6955b0de8b4d762c56d3bc3cdc..e98ecbcff60a79688d7852d070065645aa6769b4 100644 (file)
@@ -9,71 +9,72 @@ Ports
  * Building on older MacOS X systems automatically sets
    the necessary NO_APPLE_COMMON_CRYPTO build-time option.
 
- * The support to build with NO_PTHREADS has been resurrected.
+ * Building with NO_PTHREADS has been resurrected.
 
- * Compilation options has been updated a bit to support z/OS port
-   better.
+ * Compilation options have been updated a bit to better support the
+   z/OS port.
 
 
 UI, Workflows & Features
 
- * "git archive" learned to filter what gets archived with pathspec.
+ * "git archive" learned to filter what gets archived with pathspec.
 
  * "git config --edit --global" starts from a skeletal per-user
    configuration file contents, instead of a total blank, when the
-   user does not already have any.  This immediately reduces the
-   need for a later "Have you forgotten setting core.user?" and we
-   can add more to the template as we gain more experience.
+   user does not already have any global config.  This immediately
+   reduces the need to later ask "Have you forgotten to set
+   core.user?", and we can add more to the template as we gain
+   more experience.
 
  * "git stash list -p" used to be almost always a no-op because each
    stash entry is represented as a merge commit.  It learned to show
    the difference between the base commit version and the working tree
-   version, which is in line with what "git show" gives.
+   version, which is in line with what "git stash show" gives.
 
  * Sometimes users want to report a bug they experience on their
    repository, but they are not at liberty to share the contents of
    the repository.  "fast-export" was taught an "--anonymize" option
-   to replace blob contents, names of people and paths and log
+   to replace blob contents, names of people, paths and log
    messages with bland and simple strings to help them.
 
  * "git difftool" learned an option to stop feeding paths to the
    diff backend when it exits with a non-zero status.
 
- * "git grep" allows to paint (or not paint) partial matches on
+ * "git grep" learned to paint (or not paint) partial matches on
    context lines when showing "grep -C<num>" output in color.
 
- * "log --date=iso" uses a slight variant of ISO 8601 format that is
-   made more human readable.  A new "--date=iso-strict" option gives
-   datetime output that is more strictly conformant.
+ * "log --date=iso" uses a slight variant of the ISO 8601 format that is
+   more human readable.  A new "--date=iso-strict" option gives
+   datetime output that conforms more strictly.
 
  * The logic "git prune" uses is more resilient against various corner
    cases.
 
  * A broken reimplementation of Git could write an invalid index that
-   records both stage #0 and higher stage entries for the same path.
+   records both stage #0 and higher-stage entries for the same path.
    We now notice and reject such an index, as there is no sensible
    fallback (we do not know if the broken tool wanted to resolve and
-   forgot to remove higher stage entries, or if it wanted to unresolve
-   and forgot to remove the stage#0 entry).
+   forgot to remove the higher-stage entries, or if it wanted to unresolve
+   and forgot to remove the stage #0 entry).
 
- * The temporary files "git mergetool" uses are named to avoid too
+ * The temporary files "git mergetool" uses are renamed to avoid too
    many dots in them (e.g. a temporary file for "hello.c" used to be
    named e.g. "hello.BASE.4321.c" but now uses underscore instead,
-   e.g. "hello_BASE_4321.c").
+   e.g. "hello_BASE_4321.c", to allow us to have multiple variants).
 
- * The temporary files "git mergetools" uses can be placed in a newly
+ * The temporary files "git mergetool" uses can be placed in a newly
    created temporary directory, instead of the current directory, by
    setting the mergetool.writeToTemp configuration variable.
 
  * "git mergetool" understands "--tool bc" now, as version 4 of
    BeyondCompare can be driven the same way as its version 3 and it
-   feels awkward to say "--tool bc3".
+   feels awkward to say "--tool bc3" to run version 4.
 
  * The "pre-receive" and "post-receive" hooks are no longer required
    to consume their input fully (not following this requirement used
    to result in intermittent errors in "git push").
 
- * The pretty-format specifier "%d", which expanded to " (tagname)"
+ * The pretty-format specifier "%d", which expands to " (tagname)"
    for a tagged commit, gained a cousin "%D" that just gives the
    "tagname" without frills.
 
@@ -86,17 +87,17 @@ UI, Workflows & Features
    without having to "trust" the server.
 
  * "git interpret-trailers" is a new filter to programmatically edit
-    the tail end of the commit log messages.
+   the tail end of the commit log messages, e.g. "Signed-off-by:".
 
  * "git help everyday" shows the "Everyday Git in 20 commands or so"
-   document, whose contents have been updated to more modern Git
-   practice.
+   document, whose contents have been updated to match more modern
+   Git practice.
 
- * On the "git svn" front, work to reduce memory consumption and
-   to improve handling of mergeinfo progresses.
+ * On the "git svn" front, work progresses to reduce memory consumption and
+   to improve handling of mergeinfo.
 
 
-Performance, Internal Implementation, etc.
+Performance, Internal Implementation, Development Support etc.
 
  * The API to manipulate the "refs" has been restructured to make it
    more transactional, with the eventual goal to allow all-or-none
@@ -106,34 +107,34 @@ Performance, Internal Implementation, etc.
  * The lockfile API and its users have been cleaned up.
 
  * We no longer attempt to keep track of individual dependencies to
-   the header files in the build procedure, relying on automated
+   the header files in the build procedure, relying instead on automated
    dependency generation support from modern compilers.
 
  * In tests, we have been using NOT_{MINGW,CYGWIN} test prerequisites
    long before negated prerequisites e.g. !MINGW were invented.
    The former has been converted to the latter to avoid confusion.
 
- * Looking up remotes configuration in a repository with very many
-   remotes defined has been optimized.
+ * Optimized looking up a remote's configuration in a repository with very many
+   remotes defined.
 
  * There are cases where you lock and open to write a file, close it
-   to show the updated contents to external processes, and then have
-   to update the file again while still holding the lock, but the
-   lockfile API lacked support for such an access pattern.
+   to show the updated contents to an external processes, and then have
+   to update the file again while still holding the lock; now the
+   lockfile API has support for such an access pattern.
 
  * The API to allocate the structure to keep track of commit
    decoration has been updated to make it less cumbersome to use.
 
  * An in-core caching layer to let us avoid reading the same
-   configuration files number of times has been added.  A few commands
+   configuration files several times has been added.  A few commands
    have been converted to use this subsystem.
 
  * Various code paths have been cleaned up and simplified by using
-   "strbuf", "starts_with()", and "skip_prefix()" APIs more.
+   the "strbuf", "starts_with()", and "skip_prefix()" APIs more.
 
  * A few codepaths that died when large blobs that would not fit in
    core are involved in their operation have been taught to punt
-   instead, by e.g. marking too large a blob as not to be diffed.
+   instead, by e.g. marking a too-large blob as not to be diffed.
 
  * A few more code paths in "commit" and "checkout" have been taught
    to repopulate the cache-tree in the index, to help speed up later
@@ -141,7 +142,7 @@ Performance, Internal Implementation, etc.
    "status").
 
  * A common programming mistake to assign the same short option name
-   to two separate options is detected by parse_options() API to help
+   to two separate options is detected by the parse_options() API to help
    developers.
 
  * The code path to write out the packed-refs file has been optimized,
@@ -153,7 +154,7 @@ Performance, Internal Implementation, etc.
    especially matters in a repository with a large number of existing
    refs.
 
- * "git fsck" was taught to check contents of tag objects a bit more.
+ * "git fsck" was taught to check the contents of tag objects a bit more.
 
  * "git hash-object" was taught a "--literally" option to help
    debugging.
@@ -162,16 +163,17 @@ Performance, Internal Implementation, etc.
    original before feeding the filter.  Instead, stream the file
    contents directly to the filter and process its output.
 
- * The scripts in the test suite can be run with "-x" option to show
-   a shell-trace of each command run in them.
+ * The scripts in the test suite can be run with the "-x" option to show
+   a shell-trace of each command they run.
 
  * The "run-command" API learned to manage the argv and environment
-   array for child process, alleviating the need for the callers to
+   arrays for child process, alleviating the need for the callers to
    allocate and deallocate them.
 
  * Some people use AsciiDoctor, instead of AsciiDoc, to format our
-   documentation set; the documentation has been adjusted, as
-   AsciiDoctor is pickier than AsciiDoc in its input mark-up.
+   documentation set; the documentation has been adjusted to be usable
+   by both, as AsciiDoctor is pickier than AsciiDoc about its input
+   mark-up.
 
 
 Also contains various documentation updates and code clean-ups.
@@ -189,21 +191,21 @@ notes for details).
    format", which was counterintuitive.
 
  * "git -c section.var command" and "git -c section.var= command"
-   should pass the configuration differently (the former should be a
+   should pass the configuration value differently (the former should be a
    boolean true, the latter should be an empty string).
 
  * Applying a patch not generated by Git in a subdirectory used to
-   check the whitespace breakage using the attributes for incorrect
+   check for whitespace breakage using the attributes of incorrect
    paths. Also whitespace checks were performed even for paths
-   excluded via "git apply --exclude=<path>" mechanism.
+   excluded via the "git apply --exclude=<path>" mechanism.
 
- * "git bundle create" with date-range specification were meant to
+ * "git bundle create" with a date-range specification was meant to
    exclude tags outside the range, but it didn't.
 
- * "git add x" where x that used to be a directory has become a
+ * "git add x" where x used to be a directory and is now a
    symbolic link to a directory misbehaved.
 
- * The prompt script checked $GIT_DIR/ref/stash file to see if there
+ * The prompt script checked the $GIT_DIR/ref/stash file to see if there
    is a stash, which was a no-no.
 
  * Pack-protocol documentation had a minor typo.
@@ -217,7 +219,7 @@ notes for details).
    (merge 107efbe rs/daemon-fixes later to maint).
 
  * With sufficiently long refnames, "git fast-import" could have
-   overflown an on-stack buffer.
+   overflowed an on-stack buffer.
 
  * After "pack-refs --prune" packed refs at the top-level, it failed
    to prune them.
@@ -232,8 +234,8 @@ notes for details).
    to first check out <branch>.
    (merge 95c6826 so/rebase-doc later to maint).
 
- * "git push" over HTTP transport had an artificial limit on number of
-   refs that can be pushed imposed by the command line length.
+ * "git push" over HTTP transport had an artificial limit on the number of
+   refs that can be pushed, imposed by the command line length.
    (merge 26be19b jk/send-pack-many-refspecs later to maint).
 
  * When receiving an invalid pack stream that records the same object
@@ -248,19 +250,19 @@ notes for details).
    detached HEAD as a starting point to traverse objects still in use.
    (merge c40fdd0 mk/reachable-protect-detached-head later to maint).
 
- * "git config --add section.var val" used to lose existing
-   section.var whose value was an empty string.
+ * "git config --add section.var val" when section.var already has an
+   empty-string value used to lose the empty-string value.
    (merge c1063be ta/config-add-to-empty-or-true-fix later to maint).
 
  * "git fsck" failed to report that it found corrupt objects via its
    exit status in some cases.
    (merge 30d1038 jk/fsck-exit-code-fix later to maint).
 
- * Use of "--verbose" option used to break "git branch --merged".
+ * Use of the "--verbose" option used to break "git branch --merged".
    (merge 12994dd jk/maint-branch-verbose-merged later to maint).
 
- * Some MUAs mangled a line in a message that begins with "From " to
-   ">From " when writing to a mailbox file and feeding such an input
+ * Some MUAs mangle a line in a message that begins with "From " to
+   ">From " when writing to a mailbox file, and feeding such an input
    to "git am" used to lose such a line.
    (merge 85de86a jk/mbox-from-line later to maint).
 
@@ -273,8 +275,8 @@ notes for details).
    coding guidelines.
    (merge 1c4b660 da/include-compat-util-first-in-c later to maint).
 
- * t7004 test, which tried to run Git with small stack space, has been
-   updated to give a bit larger stack to avoid false breakage on some
+ * The t7004 test, which tried to run Git with small stack space, has been
+   updated to use a bit larger stack to avoid false breakage on some
    platforms.
    (merge b9a1907 sk/tag-contains-wo-recursion later to maint).
 
@@ -287,11 +289,11 @@ notes for details).
    CGI.pm as of 4.04; use CGI::start_from instead.
    (merge 4750f4b rm/gitweb-start-form later to maint).
 
- * Newer versions of 'meld' breaks the auto-detection we use to see if
+ * Newer versions of 'meld' break the auto-detection we use to see if
    they are new enough to support the `--output` option.
    (merge b12d045 da/mergetool-meld later to maint).
 
- * "git pack-objects" forgot to disable the codepath to generate
+ * "git pack-objects" forgot to disable the codepath to generate the
    object reachability bitmap when it needs to split the resulting
    pack.
    (merge 2113471 jk/pack-objects-no-bitmap-when-splitting later to maint).
@@ -301,7 +303,7 @@ notes for details).
    index file.
    (merge 729dbbd jk/cache-tree-protect-from-broken-libgit2 later to maint).
 
- * "git fetch" into a repository where branch B was deleted earlier
+ * "git fetch" into a repository where branch B was deleted earlier,
    back when it had reflog enabled, and then branch B/C is fetched
    into it without reflog enabled, which is arguably an unlikely
    corner case, unnecessarily failed.
diff --git a/Documentation/RelNotes/2.2.1.txt b/Documentation/RelNotes/2.2.1.txt
new file mode 100644 (file)
index 0000000..d5a3cd9
--- /dev/null
@@ -0,0 +1,34 @@
+Git v2.2.1 Release Notes
+========================
+
+Fixes since v2.2
+----------------
+
+ * We used to allow committing a path ".Git/config" with Git that is
+   running on a case sensitive filesystem, but an attempt to check out
+   such a path with Git that runs on a case insensitive filesystem
+   would have clobbered ".git/config", which is definitely not what
+   the user would have expected.  Git now prevents you from tracking
+   a path with ".Git" (in any case combination) as a path component.
+
+ * On Windows, certain path components that are different from ".git"
+   are mapped to ".git", e.g. "git~1/config" is treated as if it were
+   ".git/config".  HFS+ has a similar issue, where certain unicode
+   codepoints are ignored, e.g. ".g\u200cit/config" is treated as if
+   it were ".git/config".  Pathnames with these potential issues are
+   rejected on the affected systems.  Git on systems that are not
+   affected by this issue (e.g. Linux) can also be configured to
+   reject them to ensure cross platform interoperability of the hosted
+   projects.
+
+ * "git fsck" notices a tree object that records such a path that can
+   be confused with ".git", and with receive.fsckObjects configuration
+   set to true, an attempt to "git push" such a tree object will be
+   rejected.  Such a path may not be a problem on a well behaving
+   filesystem but in order to protect those on HFS+ and on case
+   insensitive filesystems, this check is enabled on all platforms.
+
+A big "thanks!" for bringing this issue to us goes to our friends in
+the Mercurial land, namely, Matt Mackall and Augie Fackler.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.3.0.txt b/Documentation/RelNotes/2.3.0.txt
new file mode 100644 (file)
index 0000000..880c062
--- /dev/null
@@ -0,0 +1,74 @@
+Git v2.3 Release Notes
+======================
+
+Updates since v2.2
+------------------
+
+Ports
+
+ *
+
+UI, Workflows & Features
+
+ * It was cumbersome to use "GIT_SSH" mechanism when the user wanted
+   to pass an extra set of arguments to the underlying ssh.  A new
+   environment variable GIT_SSH_COMMAND can be used for this.
+
+ * A request to store an empty note via "git notes" meant to remove
+   note from the object but with --allow-empty we will store a
+   (surprise!)  note that is empty.
+
+
+Performance, Internal Implementation, Development Support etc.
+
+ *
+
+
+Also contains various documentation updates and code clean-ups.
+
+
+Fixes since v2.2
+----------------
+
+Unless otherwise noted, all the fixes since v2.2 in the maintenance
+track are contained in this release (see the maintenance releases'
+notes for details).
+
+ * "git checkout $treeish $path", when $path in the index and the
+   working tree already matched what is in $treeish at the $path,
+   still overwrote the $path unnecessarily.
+   (merge c5326bd jk/checkout-from-tree later to maint).
+
+ * "git config --get-color" did not parse its command line arguments
+   carefully.
+   (merge cb35722 jk/colors-fix later to maint).
+
+ * open() emulated on Windows platforms did not give EISDIR upon
+   an attempt to open a directory for writing.
+   (merge ba6fad0 js/windows-open-eisdir-error later to maint).
+
+ * A few code paths used abs() when they should have used labs() on
+   long integers.
+   (merge 83915ba rs/maint-config-use-labs later to maint).
+   (merge 31a8aa1 rs/receive-pack-use-labs later to maint).
+
+ * "gitweb" used to depend on a behaviour recent CGI.pm deprecated.
+   (merge 13dbf46 jk/gitweb-with-newer-cgi-multi-param later to maint).
+
+ * "git init" (hence "git clone") initialized the per-repository
+   configuration file .git/config with x-bit by mistake.
+   (merge 1f32ecf mh/config-flip-xbit-back-after-checking later to maint).
+
+ * Git 2.0 was supposed to make the "simple" mode for the default of
+   "git push", but it didn't.
+   (merge 00a6fa0 jk/push-simple later to maint).
+
+ * "Everyday" document had a broken link.
+   (merge 366c8d4 po/everyday-doc later to maint).
+
+ * A few test fixes.
+   (merge 880ef58 jk/no-perl-tests later to maint).
+
+ * The build procedure did not bother fixing perl and python scripts
+   when NO_PERL and NO_PYTHON build-time configuration changed.
+   (merge ca2051d jk/rebuild-perl-scripts-with-no-perl-seting-change later to maint).
index e6d46edbe7376a9f15d4f337a341a344b5197ca4..fa71b5f0b62f43483d02c24d809e6282fa49576a 100644 (file)
@@ -337,7 +337,7 @@ suggests to the contributors:
      spend their time to improve your patch.  Go back to step (2).
 
  (4) The list forms consensus that the last round of your patch is
-     good.  Send it to the list and cc the maintainer.
+     good.  Send it to the maintainer and cc the list.
 
  (5) A topic branch is created with the patch and is merged to 'next',
      and cooked further and eventually graduates to 'master'.
index 922072596fdd80eaaa47746fba5e5591223c5108..9335ff2ae29c532f82bbb18220a3a2ea3531b8b4 100644 (file)
@@ -246,6 +246,17 @@ core.precomposeunicode::
        When false, file names are handled fully transparent by Git,
        which is backward compatible with older versions of Git.
 
+core.protectHFS::
+       If set to true, do not allow checkout of paths that would
+       be considered equivalent to `.git` on an HFS+ filesystem.
+       Defaults to `true` on Mac OS, and `false` elsewhere.
+
+core.protectNTFS::
+       If set to true, do not allow checkout of paths that would
+       cause problems with the NTFS filesystem, e.g. conflict with
+       8.3 "short" names.
+       Defaults to `true` on Windows, and `false` elsewhere.
+
 core.trustctime::
        If false, the ctime differences between the index and the
        working tree are ignored; useful when the inode change time
@@ -839,6 +850,10 @@ accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`,
 `blink` and `reverse`.  The first color given is the foreground; the
 second is the background.  The position of the attribute, if any,
 doesn't matter.
++
+Colors (foreground and background) may also be given as numbers between
+0 and 255; these use ANSI 256-color mode (but note that not all
+terminals may support this).
 
 color.diff::
        Whether to use ANSI escape sequences to add color to patches.
index dbe9a46833f2b18bb06c0b60db76930befb88d43..929e496af8d6b93904cb91d2148272516dd92033 100644 (file)
@@ -209,6 +209,10 @@ Since 'git fast-import' cannot tag trees, you will not be
 able to export the linux.git repository completely, as it contains
 a tag referencing a tree instead of a commit.
 
+SEE ALSO
+--------
+linkgit:git-fast-import[1]
+
 GIT
 ---
 Part of the linkgit:git[1] suite
index 377eeaa36db2407f76a9cd21777bb2eda4ff74bc..f71fb0134be37f224addb1963ed6d06c5bb8778a 100644 (file)
@@ -1441,6 +1441,10 @@ operator can use this facility to peek at the objects and refs from an
 import in progress, at the cost of some added running time and worse
 compression.
 
+SEE ALSO
+--------
+linkgit:git-fast-export[1]
+
 GIT
 ---
 Part of the linkgit:git[1] suite
index 310f0a5e8c1819f1f49e00b78aacface36ac21ad..851518d531b53966dc6dca1321c71e8381f50e7b 100644 (file)
@@ -9,10 +9,10 @@ SYNOPSIS
 --------
 [verse]
 'git notes' [list [<object>]]
-'git notes' add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
+'git notes' add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
 'git notes' copy [-f] ( --stdin | <from-object> <to-object> )
-'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
-'git notes' edit [<object>]
+'git notes' append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
+'git notes' edit [--allow-empty] [<object>]
 'git notes' show [<object>]
 'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
 'git notes' merge --commit [-v | -q]
@@ -155,6 +155,10 @@ OPTIONS
        Like '-C', but with '-c' the editor is invoked, so that
        the user can further edit the note message.
 
+--allow-empty::
+       Allow an empty note object to be stored. The default behavior is
+       to automatically remove empty notes.
+
 --ref <ref>::
        Manipulate the notes tree in <ref>.  This overrides
        'GIT_NOTES_REF' and the "core.notesRef" configuration.  The ref
@@ -287,7 +291,7 @@ arbitrary files using 'git hash-object':
 ------------
 $ cc *.c
 $ blob=$(git hash-object -w a.out)
-$ git notes --ref=built add -C "$blob" HEAD
+$ git notes --ref=built add --allow-empty -C "$blob" HEAD
 ------------
 
 (You cannot simply use `git notes --ref=built add -F a.out HEAD`
index 21b3f29c3bc603df74e07226d27ad63faa6fae24..b17283ab7a1cc73c5ec741e0da1128bea2a57a65 100644 (file)
@@ -34,7 +34,7 @@ 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`).
+what to push (See linkgit:git-config[1] for the meaning of `push.default`).
 
 
 OPTIONS[[OPTIONS]]
index cd0bb77e4a07453c54378b8f2db813ba354a68ef..b25d0b5996b560837648c13c742bfc5ad09f0310 100644 (file)
@@ -116,6 +116,10 @@ begins with `ext::`.  Examples:
        determined by the helper using environment variables (see
        above).
 
+SEE ALSO
+--------
+linkgit:gitremote-helpers[1]
+
 GIT
 ---
 Part of the linkgit:git[1] suite
index bcd37668e3508462881c12bdda5f6eed48072bf8..e700bafa473007e42d8f0af8d35d15841e6e3988 100644 (file)
@@ -50,6 +50,10 @@ EXAMPLES
 `git push fd::7,8/bar master`::
        Same as above.
 
+SEE ALSO
+--------
+linkgit:gitremote-helpers[1]
+
 GIT
 ---
 Part of the linkgit:git[1] suite
index 9202010d80311fb3177fef4d8d5409cef78d7b14..73dc0ad0a03607db45a4f6056d9cdac58dbeca5e 100644 (file)
@@ -43,35 +43,45 @@ unreleased) version of Git, that is available from the 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v2.1.3/git.html[documentation for release 2.1.3]
+* link:v2.2.1/git.html[documentation for release 2.2.1]
 
 * release notes for
+  link:RelNotes/2.2.1.txt[2.2.1],
+  link:RelNotes/2.2.0.txt[2.2].
+
+* link:v2.1.4/git.html[documentation for release 2.1.4]
+
+* release notes for
+  link:RelNotes/2.1.4.txt[2.1.4],
   link:RelNotes/2.1.3.txt[2.1.3],
   link:RelNotes/2.1.2.txt[2.1.2],
   link:RelNotes/2.1.1.txt[2.1.1],
   link:RelNotes/2.1.0.txt[2.1].
 
-* link:v2.0.4/git.html[documentation for release 2.0.4]
+* link:v2.0.5/git.html[documentation for release 2.0.5]
 
 * release notes for
+  link:RelNotes/2.0.5.txt[2.0.5],
   link:RelNotes/2.0.4.txt[2.0.4],
   link:RelNotes/2.0.3.txt[2.0.3],
   link:RelNotes/2.0.2.txt[2.0.2],
   link:RelNotes/2.0.1.txt[2.0.1],
   link:RelNotes/2.0.0.txt[2.0.0].
 
-* link:v1.9.4/git.html[documentation for release 1.9.4]
+* link:v1.9.5/git.html[documentation for release 1.9.5]
 
 * release notes for
+  link:RelNotes/1.9.5.txt[1.9.5],
   link:RelNotes/1.9.4.txt[1.9.4],
   link:RelNotes/1.9.3.txt[1.9.3],
   link:RelNotes/1.9.2.txt[1.9.2],
   link:RelNotes/1.9.1.txt[1.9.1],
   link:RelNotes/1.9.0.txt[1.9.0].
 
-* link:v1.8.5.5/git.html[documentation for release 1.8.5.5]
+* link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
 
 * release notes for
+  link:RelNotes/1.8.5.6.txt[1.8.5.6],
   link:RelNotes/1.8.5.5.txt[1.8.5.5],
   link:RelNotes/1.8.5.4.txt[1.8.5.4],
   link:RelNotes/1.8.5.3.txt[1.8.5.3],
@@ -876,19 +886,21 @@ other
        and the `core.editor` option in linkgit:git-config[1].
 
 'GIT_SSH'::
-       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 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.
+'GIT_SSH_COMMAND'::
+       If either of these environment variables is set then 'git fetch'
+       and 'git push' will use the specified command instead of 'ssh'
+       when they need to connect to a remote system.
+       The 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,
-then set GIT_SSH to refer to the shell script.
+`$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
+by the shell, which allows additional arguments to be included.
+`$GIT_SSH` on the other hand must be just the path to a program
+(which can be a wrapper shell script, if additional arguments are
+needed).
 +
 Usually it is easier to configure any desired options through your
 personal `.ssh/config` file.  Please consult your ssh documentation
index 64f7ad26b40085ced91e73fd806c11e90ad2eb9a..8edf72cf5398f3a13002e8e08774f75b4cc7180d 100644 (file)
@@ -452,8 +452,14 @@ SEE ALSO
 --------
 linkgit:git-remote[1]
 
+linkgit:git-remote-ext[1]
+
+linkgit:git-remote-fd[1]
+
 linkgit:git-remote-testgit[1]
 
+linkgit:git-fast-import[1]
+
 GIT
 ---
 Part of the linkgit:git[1] suite
index f6fbf814fba14d230f623aa9b2e44a7bde88adbd..30d2119565b9df5a3693e4134b8202c3936e8158 100644 (file)
@@ -368,17 +368,18 @@ situation:
 
 ------------------------------------------------
 $ git status
-# On branch master
-# Changes to be committed:
-#   (use "git reset HEAD <file>..." to unstage)
-#
-#       new file: closing.txt
-#
-# Changes not staged for commit:
-#   (use "git add <file>..." to update what will be committed)
-#
-#       modified: file.txt
-#
+On branch master
+Changes to be committed:
+  (use "git reset HEAD <file>..." to unstage)
+
+       new file:   closing.txt
+
+Changes not staged for commit:
+  (use "git add <file>..." to update what will be committed)
+  (use "git checkout -- <file>..." to discard changes in working directory)
+
+       modified:   file.txt
+
 ------------------------------------------------
 
 Since the current state of closing.txt is cached in the index file,
index 710e6364ea907b1632dca3af68f19c3a33ae45f3..b00c67df46dad4efe93dddc7ead0a7422aa47c32 100644 (file)
@@ -107,14 +107,15 @@ summary of the situation with 'git status':
 
 ------------------------------------------------
 $ git status
-# On branch master
-# Changes to be committed:
-#   (use "git reset HEAD <file>..." to unstage)
-#
-#      modified:   file1
-#      modified:   file2
-#      modified:   file3
-#
+On branch master
+Changes to be committed:
+Your branch is up-to-date with 'origin/master'.
+  (use "git reset HEAD <file>..." to unstage)
+
+       modified:   file1
+       modified:   file2
+       modified:   file3
+
 ------------------------------------------------
 
 If you need to make any further adjustments, do so now, and then add any
index 27285f0ab958026d8ac91d96113343846262e57c..53dd6b328563c143181a932c119754c62b4dc9b3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v2.2.0-rc2
+DEF_VER=v2.2.0.GIT
 
 LF='
 '
index 827006ba611c7e8be0ae4d92eaeaa321d7b9feb2..7482a4dbab458b1b82a7cb683ce7dc6f41fd4145 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1662,7 +1662,7 @@ GIT-SCRIPT-DEFINES: FORCE
             fi
 
 
-$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh GIT-SCRIPT-DEFINES
+$(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES
        $(QUIET_GEN)$(cmd_munge_script) && \
        chmod +x $@+ && \
        mv $@+ $@
@@ -1676,8 +1676,11 @@ git.res: git.rc GIT-VERSION-FILE
          $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
          -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
 
+# This makes sure we depend on the NO_PERL setting itself.
+$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
+
 ifndef NO_PERL
-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
+$(SCRIPT_PERL_GEN): perl/perl.mak
 
 perl/perl.mak: perl/PM.stamp
 
@@ -1690,7 +1693,7 @@ perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
 
 PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
+$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
        $(QUIET_GEN)$(RM) $@ $@+ && \
        INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
        INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
@@ -1724,7 +1727,7 @@ git-instaweb: git-instaweb.sh gitweb GIT-SCRIPT-DEFINES
        chmod +x $@+ && \
        mv $@+ $@
 else # NO_PERL
-$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
+$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
        $(QUIET_GEN)$(RM) $@ $@+ && \
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
            -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
@@ -1733,6 +1736,9 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
        mv $@+ $@
 endif # NO_PERL
 
+# This makes sure we depend on the NO_PYTHON setting itself.
+$(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
+
 ifndef NO_PYTHON
 $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
 $(SCRIPT_PYTHON_GEN): % : %.py
index c473b35ad95f0fc1ff05c19493ded96ca6a48f55..9257c74b5cff52da962e55a4f96d0b9d974cf362 120000 (symlink)
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.2.0.txt
\ No newline at end of file
+Documentation/RelNotes/2.3.0.txt
\ No newline at end of file
index 6696ea4c3ffd4f7af04f3f56609a78a74a0a0b55..28d24f8e34c041c5afff4c659efbfeed4d5dc8c2 100644 (file)
@@ -3728,7 +3728,7 @@ static void build_fake_ancestor(struct patch *list, const char *filename)
                        if (!preimage_sha1_in_gitlink_patch(patch, sha1))
                                ; /* ok, the textual part looks sane */
                        else
-                               die("sha1 information is lacking or useless for submoule %s",
+                               die("sha1 information is lacking or useless for submodule %s",
                                    name);
                } else if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {
                        ; /* ok */
index 5410dacea0699f70cd942837394c06eac99873d1..5a787580368bd3e6410128ff300853a10e4a50ee 100644 (file)
@@ -67,6 +67,7 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen,
 {
        int len;
        struct cache_entry *ce;
+       int pos;
 
        if (S_ISDIR(mode))
                return READ_TREE_RECURSIVE;
@@ -79,6 +80,23 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen,
        ce->ce_flags = create_ce_flags(0) | CE_UPDATE;
        ce->ce_namelen = len;
        ce->ce_mode = create_ce_mode(mode);
+
+       /*
+        * If the entry is the same as the current index, we can leave the old
+        * entry in place. Whether it is UPTODATE or not, checkout_entry will
+        * do the right thing.
+        */
+       pos = cache_name_pos(ce->name, ce->ce_namelen);
+       if (pos >= 0) {
+               struct cache_entry *old = active_cache[pos];
+               if (ce->ce_mode == old->ce_mode &&
+                   !hashcmp(ce->sha1, old->sha1)) {
+                       old->ce_flags |= CE_UPDATE;
+                       free(ce);
+                       return 0;
+               }
+       }
+
        add_cache_entry(ce, ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
        return 0;
 }
index e108c5301564a86d396d72169f40cd24a9916a1f..cda74e9a68f75fe3809a6dfa3901448be88eb7e5 100644 (file)
@@ -800,32 +800,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
        if (clean_message_contents)
                stripspace(&sb, 0);
 
-       if (signoff) {
-               /*
-                * See if we have a Conflicts: block at the end. If yes, count
-                * its size, so we can ignore it.
-                */
-               int ignore_footer = 0;
-               int i, eol, previous = 0;
-               const char *nl;
-
-               for (i = 0; i < sb.len; i++) {
-                       nl = memchr(sb.buf + i, '\n', sb.len - i);
-                       if (nl)
-                               eol = nl - sb.buf;
-                       else
-                               eol = sb.len;
-                       if (starts_with(sb.buf + previous, "\nConflicts:\n")) {
-                               ignore_footer = sb.len - previous;
-                               break;
-                       }
-                       while (i < eol)
-                               i++;
-                       previous = eol;
-               }
-
-               append_signoff(&sb, ignore_footer, 0);
-       }
+       if (signoff)
+               append_signoff(&sb, ignore_non_trailer(&sb), 0);
 
        if (fwrite(sb.buf, 1, sb.len, s->fp) < sb.len)
                die_errno(_("could not write commit template"));
index 8cc2604069cd008297081988ac807412ba9901a7..15a7bea936d667042cef27f83c86a863df2caa8f 100644 (file)
@@ -69,8 +69,8 @@ static struct option builtin_config_options[] = {
        OPT_BIT(0, "remove-section", &actions, N_("remove a section: name"), ACTION_REMOVE_SECTION),
        OPT_BIT('l', "list", &actions, N_("list all"), ACTION_LIST),
        OPT_BIT('e', "edit", &actions, N_("open an editor"), ACTION_EDIT),
-       OPT_STRING(0, "get-color", &get_color_slot, N_("slot"), N_("find the color configured: [default]")),
-       OPT_STRING(0, "get-colorbool", &get_colorbool_slot, N_("slot"), N_("find the color setting: [stdout-is-tty]")),
+       OPT_BIT(0, "get-color", &actions, N_("find the color configured: slot [default]"), ACTION_GET_COLOR),
+       OPT_BIT(0, "get-colorbool", &actions, N_("find the color setting: slot [stdout-is-tty]"), ACTION_GET_COLORBOOL),
        OPT_GROUP(N_("Type")),
        OPT_BIT(0, "bool", &types, N_("value is \"true\" or \"false\""), TYPE_BOOL),
        OPT_BIT(0, "int", &types, N_("value is decimal number"), TYPE_INT),
@@ -303,8 +303,9 @@ static int git_get_color_config(const char *var, const char *value, void *cb)
        return 0;
 }
 
-static void get_color(const char *def_color)
+static void get_color(const char *var, const char *def_color)
 {
+       get_color_slot = var;
        get_color_found = 0;
        parsed_color[0] = '\0';
        git_config_with_options(git_get_color_config, NULL,
@@ -333,8 +334,9 @@ static int git_get_colorbool_config(const char *var, const char *value,
        return 0;
 }
 
-static int get_colorbool(int print)
+static int get_colorbool(const char *var, int print)
 {
+       get_colorbool_slot = var;
        get_colorbool_found = -1;
        get_diff_color_found = -1;
        get_color_ui_found = -1;
@@ -532,12 +534,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                usage_with_options(builtin_config_usage, builtin_config_options);
        }
 
-       if (get_color_slot)
-           actions |= ACTION_GET_COLOR;
-       if (get_colorbool_slot)
-           actions |= ACTION_GET_COLORBOOL;
-
-       if ((get_color_slot || get_colorbool_slot) && types) {
+       if ((actions & (ACTION_GET_COLOR|ACTION_GET_COLORBOOL)) && types) {
                error("--get-color and variable type are incoherent");
                usage_with_options(builtin_config_usage, builtin_config_options);
        }
@@ -568,8 +565,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                }
        }
        else if (actions == ACTION_EDIT) {
-               const char *config_file = given_config_source.file ?
-                       given_config_source.file : git_path("config");
+               char *config_file;
+
                check_argc(argc, 0, 0);
                if (!given_config_source.file && nongit)
                        die("not in a git directory");
@@ -578,6 +575,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                if (given_config_source.blob)
                        die("editing blobs is not supported");
                git_config(git_default_config, NULL);
+               config_file = xstrdup(given_config_source.file ?
+                                     given_config_source.file : git_path("config"));
                if (use_global_config) {
                        int fd = open(config_file, O_CREAT | O_EXCL | O_WRONLY, 0666);
                        if (fd) {
@@ -590,6 +589,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                                die_errno(_("cannot create configuration file %s"), config_file);
                }
                launch_editor(config_file, NULL, NULL);
+               free(config_file);
        }
        else if (actions == ACTION_SET) {
                int ret;
@@ -683,12 +683,14 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                        die("No such section!");
        }
        else if (actions == ACTION_GET_COLOR) {
-               get_color(argv[0]);
+               check_argc(argc, 1, 2);
+               get_color(argv[0], argv[1]);
        }
        else if (actions == ACTION_GET_COLORBOOL) {
-               if (argc == 1)
-                       color_stdout_is_tty = git_config_bool("command line", argv[0]);
-               return get_colorbool(argc != 0);
+               check_argc(argc, 1, 2);
+               if (argc == 2)
+                       color_stdout_is_tty = git_config_bool("command line", argv[1]);
+               return get_colorbool(argv[0], argc == 2);
        }
 
        return 0;
index 587a5055ed677c3541c85101d944ffb0a19b1962..aab44d2e451b1b6a2c764a5d62464ae690ab5566 100644 (file)
@@ -254,7 +254,8 @@ static int create_default_files(const char *template_path)
                struct stat st2;
                filemode = (!chmod(path, st1.st_mode ^ S_IXUSR) &&
                                !lstat(path, &st2) &&
-                               st1.st_mode != st2.st_mode);
+                               st1.st_mode != st2.st_mode &&
+                               !chmod(path, st1.st_mode));
        }
        git_config_set("core.filemode", filemode ? "true" : "false");
 
index bebbe5b3081ebe2602abaf0dc9508a1342f01086..215d4856e507f671139f41c73b57e661d8d1bf87 100644 (file)
@@ -29,6 +29,7 @@
 #include "remote.h"
 #include "fmt-merge-msg.h"
 #include "gpg-interface.h"
+#include "sequencer.h"
 
 #define DEFAULT_TWOHEAD (1<<0)
 #define DEFAULT_OCTOPUS (1<<1)
@@ -880,28 +881,19 @@ static int finish_automerge(struct commit *head,
        return 0;
 }
 
-static int suggest_conflicts(int renormalizing)
+static int suggest_conflicts(void)
 {
        const char *filename;
        FILE *fp;
-       int pos;
+       struct strbuf msgbuf = STRBUF_INIT;
 
        filename = git_path("MERGE_MSG");
        fp = fopen(filename, "a");
        if (!fp)
                die_errno(_("Could not open '%s' for writing"), filename);
-       fprintf(fp, "\nConflicts:\n");
-       for (pos = 0; pos < active_nr; pos++) {
-               const struct cache_entry *ce = active_cache[pos];
-
-               if (ce_stage(ce)) {
-                       fprintf(fp, "\t%s\n", ce->name);
-                       while (pos + 1 < active_nr &&
-                                       !strcmp(ce->name,
-                                               active_cache[pos + 1]->name))
-                               pos++;
-               }
-       }
+
+       append_conflicts_hint(&msgbuf);
+       fputs(msgbuf.buf, fp);
        fclose(fp);
        rerere(allow_rerere_auto);
        printf(_("Automatic merge failed; "
@@ -1550,7 +1542,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                fprintf(stderr, _("Automatic merge went well; "
                        "stopped before committing as requested\n"));
        else
-               ret = suggest_conflicts(option_renormalize);
+               ret = suggest_conflicts();
 
 done:
        free(branch_to_free);
index 68b6cd8cc1ded390df592e1c6536d70bf1ffc8a0..a9f37d045641236ee910f3eb22be6ac8d04e386a 100644 (file)
 
 static const char * const git_notes_usage[] = {
        N_("git notes [--ref <notes_ref>] [list [<object>]]"),
-       N_("git notes [--ref <notes_ref>] add [-f] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+       N_("git notes [--ref <notes_ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
        N_("git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>"),
-       N_("git notes [--ref <notes_ref>] append [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
-       N_("git notes [--ref <notes_ref>] edit [<object>]"),
+       N_("git notes [--ref <notes_ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+       N_("git notes [--ref <notes_ref>] edit [--allow-empty] [<object>]"),
        N_("git notes [--ref <notes_ref>] show [<object>]"),
        N_("git notes [--ref <notes_ref>] merge [-v | -q] [-s <strategy> ] <notes_ref>"),
        N_("git notes merge --commit [-v | -q]"),
@@ -92,12 +92,22 @@ static const char * const git_notes_get_ref_usage[] = {
 static const char note_template[] =
        "\nWrite/edit the notes for the following object:\n";
 
-struct msg_arg {
+struct note_data {
        int given;
        int use_editor;
+       char *edit_path;
        struct strbuf buf;
 };
 
+static void free_note_data(struct note_data *d)
+{
+       if (d->edit_path) {
+               unlink_or_warn(d->edit_path);
+               free(d->edit_path);
+       }
+       strbuf_release(&d->buf);
+}
+
 static int list_each_note(const unsigned char *object_sha1,
                const unsigned char *note_sha1, char *note_path,
                void *cb_data)
@@ -106,7 +116,7 @@ static int list_each_note(const unsigned char *object_sha1,
        return 0;
 }
 
-static void write_note_data(int fd, const unsigned char *sha1)
+static void copy_obj_to_fd(int fd, const unsigned char *sha1)
 {
        unsigned long size;
        enum object_type type;
@@ -149,26 +159,23 @@ static void write_commented_object(int fd, const unsigned char *object)
                    sha1_to_hex(object));
 }
 
-static void create_note(const unsigned char *object, struct msg_arg *msg,
-                       int append_only, const unsigned char *prev,
-                       unsigned char *result)
+static void prepare_note_data(const unsigned char *object, struct note_data *d,
+               const unsigned char *old_note)
 {
-       char *path = NULL;
-
-       if (msg->use_editor || !msg->given) {
+       if (d->use_editor || !d->given) {
                int fd;
                struct strbuf buf = STRBUF_INIT;
 
                /* write the template message before editing: */
-               path = git_pathdup("NOTES_EDITMSG");
-               fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
+               d->edit_path = git_pathdup("NOTES_EDITMSG");
+               fd = open(d->edit_path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
                if (fd < 0)
-                       die_errno(_("could not create file '%s'"), path);
+                       die_errno(_("could not create file '%s'"), d->edit_path);
 
-               if (msg->given)
-                       write_or_die(fd, msg->buf.buf, msg->buf.len);
-               else if (prev && !append_only)
-                       write_note_data(fd, prev);
+               if (d->given)
+                       write_or_die(fd, d->buf.buf, d->buf.len);
+               else if (old_note)
+                       copy_obj_to_fd(fd, old_note);
 
                strbuf_addch(&buf, '\n');
                strbuf_add_commented_lines(&buf, note_template, strlen(note_template));
@@ -179,94 +186,71 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
 
                close(fd);
                strbuf_release(&buf);
-               strbuf_reset(&(msg->buf));
-
-               if (launch_editor(path, &(msg->buf), NULL)) {
-                       die(_("Please supply the note contents using either -m" \
-                           " or -F option"));
-               }
-               stripspace(&(msg->buf), 1);
-       }
-
-       if (prev && append_only) {
-               /* Append buf to previous note contents */
-               unsigned long size;
-               enum object_type type;
-               char *prev_buf = read_sha1_file(prev, &type, &size);
+               strbuf_reset(&d->buf);
 
-               strbuf_grow(&(msg->buf), size + 1);
-               if (msg->buf.len && prev_buf && size)
-                       strbuf_insert(&(msg->buf), 0, "\n", 1);
-               if (prev_buf && size)
-                       strbuf_insert(&(msg->buf), 0, prev_buf, size);
-               free(prev_buf);
-       }
-
-       if (!msg->buf.len) {
-               fprintf(stderr, _("Removing note for object %s\n"),
-                       sha1_to_hex(object));
-               hashclr(result);
-       } else {
-               if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
-                       error(_("unable to write note object"));
-                       if (path)
-                               error(_("The note contents have been left in %s"),
-                                     path);
-                       exit(128);
+               if (launch_editor(d->edit_path, &d->buf, NULL)) {
+                       die(_("Please supply the note contents using either -m or -F option"));
                }
+               stripspace(&d->buf, 1);
        }
+}
 
-       if (path) {
-               unlink_or_warn(path);
-               free(path);
+static void write_note_data(struct note_data *d, unsigned char *sha1)
+{
+       if (write_sha1_file(d->buf.buf, d->buf.len, blob_type, sha1)) {
+               error(_("unable to write note object"));
+               if (d->edit_path)
+                       error(_("The note contents have been left in %s"),
+                               d->edit_path);
+               exit(128);
        }
 }
 
 static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
 {
-       struct msg_arg *msg = opt->value;
+       struct note_data *d = opt->value;
 
-       strbuf_grow(&(msg->buf), strlen(arg) + 2);
-       if (msg->buf.len)
-               strbuf_addch(&(msg->buf), '\n');
-       strbuf_addstr(&(msg->buf), arg);
-       stripspace(&(msg->buf), 0);
+       strbuf_grow(&d->buf, strlen(arg) + 2);
+       if (d->buf.len)
+               strbuf_addch(&d->buf, '\n');
+       strbuf_addstr(&d->buf, arg);
+       stripspace(&d->buf, 0);
 
-       msg->given = 1;
+       d->given = 1;
        return 0;
 }
 
 static int parse_file_arg(const struct option *opt, const char *arg, int unset)
 {
-       struct msg_arg *msg = opt->value;
+       struct note_data *d = opt->value;
 
-       if (msg->buf.len)
-               strbuf_addch(&(msg->buf), '\n');
+       if (d->buf.len)
+               strbuf_addch(&d->buf, '\n');
        if (!strcmp(arg, "-")) {
-               if (strbuf_read(&(msg->buf), 0, 1024) < 0)
+               if (strbuf_read(&d->buf, 0, 1024) < 0)
                        die_errno(_("cannot read '%s'"), arg);
-       } else if (strbuf_read_file(&(msg->buf), arg, 1024) < 0)
+       } else if (strbuf_read_file(&d->buf, arg, 1024) < 0)
                die_errno(_("could not open or read '%s'"), arg);
-       stripspace(&(msg->buf), 0);
+       stripspace(&d->buf, 0);
 
-       msg->given = 1;
+       d->given = 1;
        return 0;
 }
 
 static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
 {
-       struct msg_arg *msg = opt->value;
+       struct note_data *d = opt->value;
        char *buf;
        unsigned char object[20];
        enum object_type type;
        unsigned long len;
 
-       if (msg->buf.len)
-               strbuf_addch(&(msg->buf), '\n');
+       if (d->buf.len)
+               strbuf_addch(&d->buf, '\n');
 
        if (get_sha1(arg, object))
                die(_("Failed to resolve '%s' as a valid ref."), arg);
-       if (!(buf = read_sha1_file(object, &type, &len)) || !len) {
+       if (!(buf = read_sha1_file(object, &type, &len))) {
                free(buf);
                die(_("Failed to read object '%s'."), arg);
        }
@@ -274,17 +258,17 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
                free(buf);
                die(_("Cannot read note data from non-blob object '%s'."), arg);
        }
-       strbuf_add(&(msg->buf), buf, len);
+       strbuf_add(&d->buf, buf, len);
        free(buf);
 
-       msg->given = 1;
+       d->given = 1;
        return 0;
 }
 
 static int parse_reedit_arg(const struct option *opt, const char *arg, int unset)
 {
-       struct msg_arg *msg = opt->value;
-       msg->use_editor = 1;
+       struct note_data *d = opt->value;
+       d->use_editor = 1;
        return parse_reuse_arg(opt, arg, unset);
 }
 
@@ -397,26 +381,27 @@ static int append_edit(int argc, const char **argv, const char *prefix);
 
 static int add(int argc, const char **argv, const char *prefix)
 {
-       int retval = 0, force = 0;
+       int force = 0, allow_empty = 0;
        const char *object_ref;
        struct notes_tree *t;
        unsigned char object[20], new_note[20];
-       char logmsg[100];
        const unsigned char *note;
-       struct msg_arg msg = { 0, 0, STRBUF_INIT };
+       struct note_data d = { 0, 0, NULL, STRBUF_INIT };
        struct option options[] = {
-               { OPTION_CALLBACK, 'm', "message", &msg, N_("message"),
+               { OPTION_CALLBACK, 'm', "message", &d, N_("message"),
                        N_("note contents as a string"), PARSE_OPT_NONEG,
                        parse_msg_arg},
-               { OPTION_CALLBACK, 'F', "file", &msg, N_("file"),
+               { OPTION_CALLBACK, 'F', "file", &d, N_("file"),
                        N_("note contents in a file"), PARSE_OPT_NONEG,
                        parse_file_arg},
-               { OPTION_CALLBACK, 'c', "reedit-message", &msg, N_("object"),
+               { OPTION_CALLBACK, 'c', "reedit-message", &d, N_("object"),
                        N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
                        parse_reedit_arg},
-               { OPTION_CALLBACK, 'C', "reuse-message", &msg, N_("object"),
+               { OPTION_CALLBACK, 'C', "reuse-message", &d, N_("object"),
                        N_("reuse specified note object"), PARSE_OPT_NONEG,
                        parse_reuse_arg},
+               OPT_BOOL(0, "allow-empty", &allow_empty,
+                       N_("allow storing empty note")),
                OPT__FORCE(&force, N_("replace existing notes")),
                OPT_END()
        };
@@ -439,41 +424,44 @@ static int add(int argc, const char **argv, const char *prefix)
 
        if (note) {
                if (!force) {
-                       if (!msg.given) {
-                               /*
-                                * Redirect to "edit" subcommand.
-                                *
-                                * We only end up here if none of -m/-F/-c/-C
-                                * or -f are given. The original args are
-                                * therefore still in argv[0-1].
-                                */
-                               argv[0] = "edit";
-                               free_notes(t);
-                               return append_edit(argc, argv, prefix);
+                       free_notes(t);
+                       if (d.given) {
+                               free_note_data(&d);
+                               return error(_("Cannot add notes. "
+                                       "Found existing notes for object %s. "
+                                       "Use '-f' to overwrite existing notes"),
+                                       sha1_to_hex(object));
                        }
-                       retval = error(_("Cannot add notes. Found existing notes "
-                                      "for object %s. Use '-f' to overwrite "
-                                      "existing notes"), sha1_to_hex(object));
-                       goto out;
+                       /*
+                        * Redirect to "edit" subcommand.
+                        *
+                        * We only end up here if none of -m/-F/-c/-C or -f are
+                        * given. The original args are therefore still in
+                        * argv[0-1].
+                        */
+                       argv[0] = "edit";
+                       return append_edit(argc, argv, prefix);
                }
                fprintf(stderr, _("Overwriting existing notes for object %s\n"),
                        sha1_to_hex(object));
        }
 
-       create_note(object, &msg, 0, note, new_note);
-
-       if (is_null_sha1(new_note))
+       prepare_note_data(object, &d, note);
+       if (d.buf.len || allow_empty) {
+               write_note_data(&d, new_note);
+               if (add_note(t, object, new_note, combine_notes_overwrite))
+                       die("BUG: combine_notes_overwrite failed");
+               commit_notes(t, "Notes added by 'git notes add'");
+       } else {
+               fprintf(stderr, _("Removing note for object %s\n"),
+                       sha1_to_hex(object));
                remove_note(t, object);
-       else if (add_note(t, object, new_note, combine_notes_overwrite))
-               die("BUG: combine_notes_overwrite failed");
+               commit_notes(t, "Notes removed by 'git notes add'");
+       }
 
-       snprintf(logmsg, sizeof(logmsg), "Notes %s by 'git notes %s'",
-                is_null_sha1(new_note) ? "removed" : "added", "add");
-       commit_notes(t, logmsg);
-out:
+       free_note_data(&d);
        free_notes(t);
-       strbuf_release(&(msg.buf));
-       return retval;
+       return 0;
 }
 
 static int copy(int argc, const char **argv, const char *prefix)
@@ -554,26 +542,29 @@ out:
 
 static int append_edit(int argc, const char **argv, const char *prefix)
 {
+       int allow_empty = 0;
        const char *object_ref;
        struct notes_tree *t;
        unsigned char object[20], new_note[20];
        const unsigned char *note;
        char logmsg[100];
        const char * const *usage;
-       struct msg_arg msg = { 0, 0, STRBUF_INIT };
+       struct note_data d = { 0, 0, NULL, STRBUF_INIT };
        struct option options[] = {
-               { OPTION_CALLBACK, 'm', "message", &msg, N_("message"),
+               { OPTION_CALLBACK, 'm', "message", &d, N_("message"),
                        N_("note contents as a string"), PARSE_OPT_NONEG,
                        parse_msg_arg},
-               { OPTION_CALLBACK, 'F', "file", &msg, N_("file"),
+               { OPTION_CALLBACK, 'F', "file", &d, N_("file"),
                        N_("note contents in a file"), PARSE_OPT_NONEG,
                        parse_file_arg},
-               { OPTION_CALLBACK, 'c', "reedit-message", &msg, N_("object"),
+               { OPTION_CALLBACK, 'c', "reedit-message", &d, N_("object"),
                        N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
                        parse_reedit_arg},
-               { OPTION_CALLBACK, 'C', "reuse-message", &msg, N_("object"),
+               { OPTION_CALLBACK, 'C', "reuse-message", &d, N_("object"),
                        N_("reuse specified note object"), PARSE_OPT_NONEG,
                        parse_reuse_arg},
+               OPT_BOOL(0, "allow-empty", &allow_empty,
+                       N_("allow storing empty note")),
                OPT_END()
        };
        int edit = !strcmp(argv[0], "edit");
@@ -587,7 +578,7 @@ static int append_edit(int argc, const char **argv, const char *prefix)
                usage_with_options(usage, options);
        }
 
-       if (msg.given && edit)
+       if (d.given && edit)
                fprintf(stderr, _("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"));
@@ -600,18 +591,39 @@ static int append_edit(int argc, const char **argv, const char *prefix)
        t = init_notes_check(argv[0]);
        note = get_note(t, object);
 
-       create_note(object, &msg, !edit, note, new_note);
+       prepare_note_data(object, &d, edit ? note : NULL);
 
-       if (is_null_sha1(new_note))
-               remove_note(t, object);
-       else if (add_note(t, object, new_note, combine_notes_overwrite))
-               die("BUG: combine_notes_overwrite failed");
+       if (note && !edit) {
+               /* Append buf to previous note contents */
+               unsigned long size;
+               enum object_type type;
+               char *prev_buf = read_sha1_file(note, &type, &size);
+
+               strbuf_grow(&d.buf, size + 1);
+               if (d.buf.len && prev_buf && size)
+                       strbuf_insert(&d.buf, 0, "\n", 1);
+               if (prev_buf && size)
+                       strbuf_insert(&d.buf, 0, prev_buf, size);
+               free(prev_buf);
+       }
 
-       snprintf(logmsg, sizeof(logmsg), "Notes %s by 'git notes %s'",
-                is_null_sha1(new_note) ? "removed" : "added", argv[0]);
+       if (d.buf.len || allow_empty) {
+               write_note_data(&d, new_note);
+               if (add_note(t, object, new_note, combine_notes_overwrite))
+                       die("BUG: combine_notes_overwrite failed");
+               snprintf(logmsg, sizeof(logmsg), "Notes added by 'git notes %s'",
+                       argv[0]);
+       } else {
+               fprintf(stderr, _("Removing note for object %s\n"),
+                       sha1_to_hex(object));
+               remove_note(t, object);
+               snprintf(logmsg, sizeof(logmsg), "Notes removed by 'git notes %s'",
+                       argv[0]);
+       }
        commit_notes(t, logmsg);
+
+       free_note_data(&d);
        free_notes(t);
-       strbuf_release(&(msg.buf));
        return 0;
 }
 
index a076b1964d6ac0ca96496eda4e88fd23409299a9..12f5e69393bc2981dd5ff1433e34bc4932c0ee22 100644 (file)
@@ -161,7 +161,7 @@ static const char message_detached_head_die[] =
           "    git push %s HEAD:<name-of-remote-branch>\n");
 
 static void setup_push_upstream(struct remote *remote, struct branch *branch,
-                               int triangular)
+                               int triangular, int simple)
 {
        struct strbuf refspec = STRBUF_INIT;
 
@@ -184,7 +184,7 @@ static void setup_push_upstream(struct remote *remote, struct branch *branch,
                      "to update which remote branch."),
                    remote->name, branch->name);
 
-       if (push_default == PUSH_DEFAULT_SIMPLE) {
+       if (simple) {
                /* Additional safety */
                if (strcmp(branch->refname, branch->merge[0]->src))
                        die_push_simple(branch, remote);
@@ -257,11 +257,11 @@ static void setup_default_push_refspecs(struct remote *remote)
                if (triangular)
                        setup_push_current(remote, branch);
                else
-                       setup_push_upstream(remote, branch, triangular);
+                       setup_push_upstream(remote, branch, triangular, 1);
                break;
 
        case PUSH_DEFAULT_UPSTREAM:
-               setup_push_upstream(remote, branch, triangular);
+               setup_push_upstream(remote, branch, triangular, 0);
                break;
 
        case PUSH_DEFAULT_CURRENT:
@@ -503,7 +503,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
                  0, CAS_OPT_NAME, &cas, N_("refname>:<expect"),
                  N_("require old value of ref to be at this value"),
                  PARSE_OPT_OPTARG, parseopt_push_cas_option },
-               { OPTION_CALLBACK, 0, "recurse-submodules", &flags, N_("check"),
+               { OPTION_CALLBACK, 0, "recurse-submodules", &flags, "check|on-demand",
                        N_("control recursive pushing of submodules"),
                        PARSE_OPT_OPTARG, option_parse_recurse_submodules },
                OPT_BOOL( 0 , "thin", &thin, N_("use thin pack")),
index 32fc540ef3ddfc4d1bb33ae75a0e07b555bdc441..e908d079bae83884cc218cf6a39d3ed705cf439b 100644 (file)
@@ -431,7 +431,7 @@ static const char *check_nonce(const char *buf, size_t len)
        nonce_stamp_slop = (long)ostamp - (long)stamp;
 
        if (nonce_stamp_slop_limit &&
-           abs(nonce_stamp_slop) <= nonce_stamp_slop_limit) {
+           labs(nonce_stamp_slop) <= nonce_stamp_slop_limit) {
                /*
                 * Pretend as if the received nonce (which passes the
                 * HMAC check, so it is not a forged by third-party)
index 28456206c5d135adba191c865e49aa75dc201691..83e91c7382fc913ca7c51e6286cd73cdd91fbeae 100644 (file)
@@ -135,7 +135,6 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
        };
        struct child_process cmd = CHILD_PROCESS_INIT;
        struct string_list_item *item;
-       struct argv_array cmd_args = ARGV_ARRAY_INIT;
        struct string_list names = STRING_LIST_INIT_DUP;
        struct string_list rollback = STRING_LIST_INIT_NODUP;
        struct string_list existing_packs = STRING_LIST_INIT_DUP;
@@ -202,56 +201,55 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
 
        sigchain_push_common(remove_pack_on_signal);
 
-       argv_array_push(&cmd_args, "pack-objects");
-       argv_array_push(&cmd_args, "--keep-true-parents");
+       argv_array_push(&cmd.args, "pack-objects");
+       argv_array_push(&cmd.args, "--keep-true-parents");
        if (!pack_kept_objects)
-               argv_array_push(&cmd_args, "--honor-pack-keep");
-       argv_array_push(&cmd_args, "--non-empty");
-       argv_array_push(&cmd_args, "--all");
-       argv_array_push(&cmd_args, "--reflog");
-       argv_array_push(&cmd_args, "--indexed-objects");
+               argv_array_push(&cmd.args, "--honor-pack-keep");
+       argv_array_push(&cmd.args, "--non-empty");
+       argv_array_push(&cmd.args, "--all");
+       argv_array_push(&cmd.args, "--reflog");
+       argv_array_push(&cmd.args, "--indexed-objects");
        if (window)
-               argv_array_pushf(&cmd_args, "--window=%s", window);
+               argv_array_pushf(&cmd.args, "--window=%s", window);
        if (window_memory)
-               argv_array_pushf(&cmd_args, "--window-memory=%s", window_memory);
+               argv_array_pushf(&cmd.args, "--window-memory=%s", window_memory);
        if (depth)
-               argv_array_pushf(&cmd_args, "--depth=%s", depth);
+               argv_array_pushf(&cmd.args, "--depth=%s", depth);
        if (max_pack_size)
-               argv_array_pushf(&cmd_args, "--max-pack-size=%s", max_pack_size);
+               argv_array_pushf(&cmd.args, "--max-pack-size=%s", max_pack_size);
        if (no_reuse_delta)
-               argv_array_pushf(&cmd_args, "--no-reuse-delta");
+               argv_array_pushf(&cmd.args, "--no-reuse-delta");
        if (no_reuse_object)
-               argv_array_pushf(&cmd_args, "--no-reuse-object");
+               argv_array_pushf(&cmd.args, "--no-reuse-object");
        if (write_bitmaps)
-               argv_array_push(&cmd_args, "--write-bitmap-index");
+               argv_array_push(&cmd.args, "--write-bitmap-index");
 
        if (pack_everything & ALL_INTO_ONE) {
                get_non_kept_pack_filenames(&existing_packs);
 
                if (existing_packs.nr && delete_redundant) {
                        if (unpack_unreachable)
-                               argv_array_pushf(&cmd_args,
+                               argv_array_pushf(&cmd.args,
                                                "--unpack-unreachable=%s",
                                                unpack_unreachable);
                        else if (pack_everything & LOOSEN_UNREACHABLE)
-                               argv_array_push(&cmd_args,
+                               argv_array_push(&cmd.args,
                                                "--unpack-unreachable");
                }
        } else {
-               argv_array_push(&cmd_args, "--unpacked");
-               argv_array_push(&cmd_args, "--incremental");
+               argv_array_push(&cmd.args, "--unpacked");
+               argv_array_push(&cmd.args, "--incremental");
        }
 
        if (local)
-               argv_array_push(&cmd_args,  "--local");
+               argv_array_push(&cmd.args,  "--local");
        if (quiet)
-               argv_array_push(&cmd_args,  "--quiet");
+               argv_array_push(&cmd.args,  "--quiet");
        if (delta_base_offset)
-               argv_array_push(&cmd_args,  "--delta-base-offset");
+               argv_array_push(&cmd.args,  "--delta-base-offset");
 
-       argv_array_push(&cmd_args, packtmp);
+       argv_array_push(&cmd.args, packtmp);
 
-       cmd.argv = cmd_args.argv;
        cmd.git_cmd = 1;
        cmd.out = -1;
        cmd.no_stdin = 1;
@@ -270,7 +268,6 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
        ret = finish_command(&cmd);
        if (ret)
                return ret;
-       argv_array_clear(&cmd_args);
 
        if (!names.nr && !quiet)
                printf("Nothing new to pack.\n");
diff --git a/cache.h b/cache.h
index 99ed096aed03b865dd6e263474e6e6a265681b91..22b7b8129072f3905c68f02fe19f463bdb738b9e 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -617,6 +617,8 @@ extern int fsync_object_files;
 extern int core_preload_index;
 extern int core_apply_sparse_checkout;
 extern int precomposed_unicode;
+extern int protect_hfs;
+extern int protect_ntfs;
 
 /*
  * The character that begins a commented line in user-editable file
@@ -831,6 +833,7 @@ int normalize_path_copy(char *dst, const char *src);
 int longest_ancestor_length(const char *path, struct string_list *prefixes);
 char *strip_path_suffix(const char *path, const char *suffix);
 int daemon_avoid_alias(const char *path);
+extern int is_ntfs_dotgit(const char *name);
 
 /* object replacement */
 #define LOOKUP_REPLACE_OBJECT 1
index 19cf8f9c67bd0f4d71172f33424f7d2371a3af68..a54cb9a454fdce3ccf9dff58338e43d73945d728 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1640,3 +1640,49 @@ const char *find_commit_header(const char *msg, const char *key, size_t *out_len
        }
        return NULL;
 }
+
+/*
+ * Inspect sb and determine the true "end" of the log message, in
+ * order to find where to put a new Signed-off-by: line.  Ignored are
+ * trailing comment lines and blank lines, and also the traditional
+ * "Conflicts:" block that is not commented out, so that we can use
+ * "git commit -s --amend" on an existing commit that forgot to remove
+ * it.
+ *
+ * Returns the number of bytes from the tail to ignore, to be fed as
+ * the second parameter to append_signoff().
+ */
+int ignore_non_trailer(struct strbuf *sb)
+{
+       int boc = 0;
+       int bol = 0;
+       int in_old_conflicts_block = 0;
+
+       while (bol < sb->len) {
+               char *next_line;
+
+               if (!(next_line = memchr(sb->buf + bol, '\n', sb->len - bol)))
+                       next_line = sb->buf + sb->len;
+               else
+                       next_line++;
+
+               if (sb->buf[bol] == comment_line_char || sb->buf[bol] == '\n') {
+                       /* is this the first of the run of comments? */
+                       if (!boc)
+                               boc = bol;
+                       /* otherwise, it is just continuing */
+               } else if (starts_with(sb->buf + bol, "Conflicts:\n")) {
+                       in_old_conflicts_block = 1;
+                       if (!boc)
+                               boc = bol;
+               } else if (in_old_conflicts_block && sb->buf[bol] == '\t') {
+                       ; /* a pathname in the conflicts block */
+               } else if (boc) {
+                       /* the previous was not trailing comment */
+                       boc = 0;
+                       in_old_conflicts_block = 0;
+               }
+               bol = next_line - sb->buf;
+       }
+       return boc ? sb->len - boc : 0;
+}
index bc68ccbe691a28ed9b22fa935c78d2e9640347ea..cd35ac150acd076047eed2e3200d1be12e4e7d5e 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -337,6 +337,9 @@ extern void free_commit_extra_headers(struct commit_extra_header *extra);
 extern const char *find_commit_header(const char *msg, const char *key,
                                      size_t *out_len);
 
+/* Find the end of the log message, the right place for a new trailer. */
+extern int ignore_non_trailer(struct strbuf *sb);
+
 typedef void (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
                                 void *cb_data);
 
index c5c37e53ce0fc534b1739a75c4abde0c67027d14..70f3191a4f19f10a156d1f2c054943d5147ab049 100644 (file)
@@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)
                return -1;
        fd = _wopen(wfilename, oflags, mode);
 
-       if (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {
+       if (fd < 0 && (oflags & O_ACCMODE) != O_RDONLY && errno == EACCES) {
                DWORD attrs = GetFileAttributesW(wfilename);
                if (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))
                        errno = EISDIR;
index 15a298357796ffa80f7fb2258e55cf95be0b8895..752e2e227f56edfb7b2ad168798c110c14a2c5e8 100644 (file)
--- a/config.c
+++ b/config.c
@@ -506,9 +506,9 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
                        errno = EINVAL;
                        return 0;
                }
-               uval = abs(val);
+               uval = labs(val);
                uval *= factor;
-               if (uval > max || abs(val) > uval) {
+               if (uval > max || labs(val) > uval) {
                        errno = ERANGE;
                        return 0;
                }
@@ -896,6 +896,16 @@ static int git_default_core_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "core.protecthfs")) {
+               protect_hfs = git_config_bool(var, value);
+               return 0;
+       }
+
+       if (!strcmp(var, "core.protectntfs")) {
+               protect_ntfs = git_config_bool(var, value);
+               return 0;
+       }
+
        /* Add other config variables here and to Documentation/config.txt. */
        return 0;
 }
index a2f380fd8dbb852ceeb4933b1b942e0e4803f44a..f3c93f27c945193754090e97c2070c9e66759f02 100644 (file)
@@ -105,6 +105,7 @@ ifeq ($(uname_S),Darwin)
        HAVE_DEV_TTY = YesPlease
        COMPAT_OBJS += compat/precompose_utf8.o
        BASIC_CFLAGS += -DPRECOMPOSE_UNICODE
+       BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1
 endif
 ifeq ($(uname_S),SunOS)
        NEEDS_SOCKET = YesPlease
@@ -373,6 +374,7 @@ ifeq ($(uname_S),Windows)
        EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj
        PTHREAD_LIBS =
        lib =
+       BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
 ifndef DEBUG
        BASIC_CFLAGS += -GL -Os -MD
        BASIC_LDFLAGS += -LTCG
@@ -514,6 +516,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
        COMPAT_OBJS += compat/mingw.o compat/winansi.o \
                compat/win32/pthread.o compat/win32/syslog.o \
                compat/win32/dirent.o
+       BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
        BASIC_LDFLAGS += -Wl,--large-address-aware
        EXTLIBS += -lws2_32
        GITLIBS += git.res
index d47d0ec6040fdb8b07a689e299dac121bb468717..cb23bbcf22c8804c9e589dcaf1a42c3340c27782 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -700,14 +700,23 @@ struct child_process *git_connect(int fd[2], const char *url,
 
                conn->in = conn->out = -1;
                if (protocol == PROTO_SSH) {
-                       const char *ssh = getenv("GIT_SSH");
-                       int putty = ssh && strcasestr(ssh, "plink");
+                       const char *ssh;
+                       int putty;
                        char *ssh_host = hostandport;
                        const char *port = NULL;
                        get_host_and_port(&ssh_host, &port);
                        port = get_port_numeric(port);
 
-                       if (!ssh) ssh = "ssh";
+                       ssh = getenv("GIT_SSH_COMMAND");
+                       if (ssh) {
+                               conn->use_shell = 1;
+                               putty = 0;
+                       } else {
+                               ssh = getenv("GIT_SSH");
+                               if (!ssh)
+                                       ssh = "ssh";
+                               putty = !!strcasestr(ssh, "plink");
+                       }
 
                        argv_array_push(&conn->args, ssh);
                        if (putty && !strcasestr(ssh, "tortoiseplink"))
index bb543d52f108cf1e976ee644e337f5ccec983790..7530927d774562f82636aa773481ae93600c1756 100644 (file)
@@ -39,4 +39,15 @@ extern void sha1flush(struct sha1file *f);
 extern void crc32_begin(struct sha1file *);
 extern uint32_t crc32_end(struct sha1file *);
 
+static inline void sha1write_u8(struct sha1file *f, uint8_t data)
+{
+       sha1write(f, &data, sizeof(data));
+}
+
+static inline void sha1write_be32(struct sha1file *f, uint32_t data)
+{
+       data = htonl(data);
+       sha1write(f, &data, sizeof(data));
+}
+
 #endif
index 565f65293bb25ebdcb6ada262bcca9164c3ea113..1ade5c9684a9f901db7d0b3fff04d0cad443caf7 100644 (file)
@@ -64,6 +64,16 @@ int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
 struct startup_info *startup_info;
 unsigned long pack_size_limit_cfg;
 
+#ifndef PROTECT_HFS_DEFAULT
+#define PROTECT_HFS_DEFAULT 0
+#endif
+int protect_hfs = PROTECT_HFS_DEFAULT;
+
+#ifndef PROTECT_NTFS_DEFAULT
+#define PROTECT_NTFS_DEFAULT 0
+#endif
+int protect_ntfs = PROTECT_NTFS_DEFAULT;
+
 /*
  * The character that begins a commented line in user-editable file
  * that is subject to stripspace.
diff --git a/fsck.c b/fsck.c
index 2fffa434a5763abb6d7895ee8c7582307766ee62..032419463126234fa855b934bae85fb27d6b26a4 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -7,6 +7,7 @@
 #include "tag.h"
 #include "fsck.h"
 #include "refs.h"
+#include "utf8.h"
 
 static int fsck_walk_tree(struct tree *tree, fsck_walk_func walk, void *data)
 {
@@ -171,7 +172,9 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func)
                has_empty_name |= !*name;
                has_dot |= !strcmp(name, ".");
                has_dotdot |= !strcmp(name, "..");
-               has_dotgit |= !strcmp(name, ".git");
+               has_dotgit |= (!strcmp(name, ".git") ||
+                              is_hfs_dotgit(name) ||
+                              is_ntfs_dotgit(name));
                has_zero_pad |= *(char *)desc.buffer == '0';
                update_tree_entry(&desc);
 
index d4fb6dfe138fffd4d000c7d5aeb7787bea9970f4..2b11b1d6fe33cf3f61dd35b8f48d6953f7a25bff 100755 (executable)
@@ -94,3 +94,5 @@ else
                shift 7
        done
 fi
+
+exit 0
index 2b6635130a6c6e80cd8d188ae611bf220d25bc0a..fe61e89f31c44ca90dbfba468cf8b23d3993ba9f 100644 (file)
@@ -92,7 +92,7 @@ translate_merge_tool_path () {
 check_unchanged () {
        if test "$MERGED" -nt "$BACKUP"
        then
-               status=0
+               return 0
        else
                while true
                do
@@ -100,8 +100,8 @@ check_unchanged () {
                        printf "Was the merge successful? [y/n] "
                        read answer || return 1
                        case "$answer" in
-                       y*|Y*) status=0; break ;;
-                       n*|N*) status=1; break ;;
+                       y*|Y*) return 0 ;;
+                       n*|N*) return 1 ;;
                        esac
                done
        fi
@@ -119,8 +119,6 @@ setup_user_tool () {
 
        diff_cmd () {
                ( eval $merge_tool_cmd )
-               status=$?
-               return $status
        }
 
        merge_cmd () {
@@ -130,13 +128,10 @@ setup_user_tool () {
                then
                        touch "$BACKUP"
                        ( eval $merge_tool_cmd )
-                       status=$?
                        check_unchanged
                else
                        ( eval $merge_tool_cmd )
-                       status=$?
                fi
-               return $status
        }
 }
 
@@ -153,13 +148,11 @@ setup_tool () {
        }
 
        diff_cmd () {
-               status=1
-               return $status
+               return 1
        }
 
        merge_cmd () {
-               status=1
-               return $status
+               return 1
        }
 
        translate_merge_tool_path () {
@@ -210,7 +203,6 @@ run_merge_tool () {
 
        merge_tool_path=$(get_merge_tool_path "$1") || exit
        base_present="$2"
-       status=0
 
        # Bring tool-specific functions into scope
        setup_tool "$1" || return 1
@@ -221,8 +213,6 @@ run_merge_tool () {
        else
                run_diff_cmd "$1"
        fi
-       status=$?
-       return $status
 }
 
 # Run a either a configured or built-in diff tool
index ff050e58ff3b752113105ba3ea5e20c6b633aae9..d20581c15c5086b02411cab618cde0a9ff14e7ed 100755 (executable)
@@ -426,8 +426,6 @@ fi
 merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
 merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
 
-last_status=0
-rollup_status=0
 files=
 
 if test $# -eq 0
@@ -455,19 +453,15 @@ printf "%s\n" "$files"
 
 IFS='
 '
+rc=0
 for i in $files
 do
-       if test $last_status -ne 0
-       then
-               prompt_after_failed_merge || exit 1
-       fi
        printf "\n"
-       merge_file "$i"
-       last_status=$?
-       if test $last_status -ne 0
+       if ! merge_file "$i"
        then
-               rollup_status=1
+               rc=1
+               prompt_after_failed_merge || exit 1
        fi
 done
 
-exit $rollup_status
+exit $rc
diff --git a/git.c b/git.c
index 18fbf79430687a473e9306f2bb65abbaec161bb4..82d7a1cfee806001c2d8b81a9dc822a513c75451 100644 (file)
--- a/git.c
+++ b/git.c
@@ -487,15 +487,20 @@ static struct cmd_struct commands[] = {
        { "write-tree", cmd_write_tree, RUN_SETUP },
 };
 
-int is_builtin(const char *s)
+static struct cmd_struct *get_builtin(const char *s)
 {
        int i;
        for (i = 0; i < ARRAY_SIZE(commands); i++) {
-               struct cmd_struct *p = commands+i;
+               struct cmd_struct *p = commands + i;
                if (!strcmp(s, p->cmd))
-                       return 1;
+                       return p;
        }
-       return 0;
+       return NULL;
+}
+
+int is_builtin(const char *s)
+{
+       return !!get_builtin(s);
 }
 
 static void handle_builtin(int argc, const char **argv)
@@ -503,6 +508,7 @@ static void handle_builtin(int argc, const char **argv)
        const char *cmd = argv[0];
        int i;
        static const char ext[] = STRIP_EXTENSION;
+       struct cmd_struct *builtin;
 
        if (sizeof(ext) > 1) {
                i = strlen(argv[0]) - strlen(ext);
@@ -519,15 +525,12 @@ static void handle_builtin(int argc, const char **argv)
                argv[0] = cmd = "help";
        }
 
-       for (i = 0; i < ARRAY_SIZE(commands); i++) {
-               struct cmd_struct *p = commands+i;
-               if (strcmp(p->cmd, cmd))
-                       continue;
-               if (saved_environment && (p->option & NO_SETUP)) {
+       builtin = get_builtin(cmd);
+       if (builtin) {
+               if (saved_environment && (builtin->option & NO_SETUP))
                        restore_env();
-                       break;
-               }
-               exit(run_builtin(p, argc, argv));
+               else
+                       exit(run_builtin(builtin, argc, argv));
        }
 }
 
index ccf75169dd6fb50e2f8ce584af8fa7841fa55fd6..7a5b23acf2155fb4e39dcb2f20944362cfbe0ac7 100755 (executable)
@@ -20,6 +20,10 @@ use File::Basename qw(basename);
 use Time::HiRes qw(gettimeofday tv_interval);
 binmode STDOUT, ':utf8';
 
+if (!defined($CGI::VERSION) || $CGI::VERSION < 4.08) {
+       eval 'sub CGI::multi_param { CGI::param(@_) }'
+}
+
 our $t0 = [ gettimeofday() ];
 our $number_of_git_cmds = 0;
 
@@ -871,7 +875,7 @@ sub evaluate_query_params {
 
        while (my ($name, $symbol) = each %cgi_param_mapping) {
                if ($symbol eq 'opt') {
-                       $input_params{$name} = [ map { decode_utf8($_) } $cgi->param($symbol) ];
+                       $input_params{$name} = [ map { decode_utf8($_) } $cgi->multi_param($symbol) ];
                } else {
                        $input_params{$name} = decode_utf8($cgi->param($symbol));
                }
index 85ac7201571ed34c35a3613b97bd1b82982e0d61..f138cb4e731018b40426337eb8062f40512df088 100644 (file)
@@ -11,5 +11,4 @@ merge_cmd () {
                "$merge_tool_path" --merge \
                        --result="$MERGED" "$LOCAL" "$REMOTE"
        fi
-       status=$?
 }
index f96d9e550a138d395ccb23c9496111630d2de594..7b895fdb1f9955eb470a2614e0634bfcd26d90c9 100644 (file)
@@ -15,7 +15,6 @@ merge_cmd () {
                        "$LOCAL" "$REMOTE" \
                        "$(basename "$MERGED")"
        fi
-       status=$?
 }
 
 translate_merge_tool_path() {
index a30034f116fda6f90448aeb4ddd42063ea60aad1..793d1293b16c9b28a9ec5c70ec7fa0875ab0da54 100644 (file)
@@ -20,5 +20,4 @@ merge_cmd () {
                        -o "$MERGED" "$LOCAL" "$REMOTE" \
                >/dev/null 2>&1
        fi
-       status=$?
 }
diff --git a/notes.c b/notes.c
index 5fe691dbcdfb9e3f9fa3c768f243234d5bb2e816..62bc6e1818f02dea10022e3df30b4129ee1d8fcd 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -1218,8 +1218,7 @@ static void format_note(struct notes_tree *t, const unsigned char *object_sha1,
        if (!sha1)
                return;
 
-       if (!(msg = read_sha1_file(sha1, &type, &msglen)) || !msglen ||
-                       type != OBJ_BLOB) {
+       if (!(msg = read_sha1_file(sha1, &type, &msglen)) || type != OBJ_BLOB) {
                free(msg);
                return;
        }
index 8029ae35619fbff7e9e595b20ea25c379c698016..c05d1386af7210e75a1012f3772745315ecc3592 100644 (file)
@@ -472,7 +472,6 @@ static void write_selected_commits_v1(struct sha1file *f,
 
        for (i = 0; i < writer.selected_nr; ++i) {
                struct bitmapped_commit *stored = &writer.selected[i];
-               struct bitmap_disk_entry on_disk;
 
                int commit_pos =
                        sha1_pos(stored->commit->object.sha1, index, index_nr, sha1_access);
@@ -480,11 +479,10 @@ static void write_selected_commits_v1(struct sha1file *f,
                if (commit_pos < 0)
                        die("BUG: trying to write commit not in index");
 
-               on_disk.object_pos = htonl(commit_pos);
-               on_disk.xor_offset = stored->xor_offset;
-               on_disk.flags = stored->flags;
+               sha1write_be32(f, commit_pos);
+               sha1write_u8(f, stored->xor_offset);
+               sha1write_u8(f, stored->flags);
 
-               sha1write(f, &on_disk, sizeof(on_disk));
                dump_bitmap(f, stored->write_as);
        }
 }
index a1f3c0d34f8958c08310aa9fc77e764885b76008..6a818419ca46f8d66adbeb0027da49e6bab1bfa3 100644 (file)
@@ -197,13 +197,24 @@ static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
        return stored;
 }
 
+static inline uint32_t read_be32(const unsigned char *buffer, size_t *pos)
+{
+       uint32_t result = get_be32(buffer + *pos);
+       (*pos) += sizeof(result);
+       return result;
+}
+
+static inline uint8_t read_u8(const unsigned char *buffer, size_t *pos)
+{
+       return buffer[(*pos)++];
+}
+
 static int load_bitmap_entries_v1(struct bitmap_index *index)
 {
        static const size_t MAX_XOR_OFFSET = 160;
 
        uint32_t i;
        struct stored_bitmap **recent_bitmaps;
-       struct bitmap_disk_entry *entry;
 
        recent_bitmaps = xcalloc(MAX_XOR_OFFSET, sizeof(struct stored_bitmap));
 
@@ -214,15 +225,12 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
                uint32_t commit_idx_pos;
                const unsigned char *sha1;
 
-               entry = (struct bitmap_disk_entry *)(index->map + index->map_pos);
-               index->map_pos += sizeof(struct bitmap_disk_entry);
+               commit_idx_pos = read_be32(index->map, &index->map_pos);
+               xor_offset = read_u8(index->map, &index->map_pos);
+               flags = read_u8(index->map, &index->map_pos);
 
-               commit_idx_pos = ntohl(entry->object_pos);
                sha1 = nth_packed_object_sha1(index->pack, commit_idx_pos);
 
-               xor_offset = (int)entry->xor_offset;
-               flags = (int)entry->flags;
-
                bitmap = read_bitmap_1(index);
                if (!bitmap)
                        return -1;
index 8b7f4e9f0df2d50ffab1c0535d678c69fd7d6e94..487600b18c79be22c4c611fc4c3d29d817f1f304 100644 (file)
@@ -5,12 +5,6 @@
 #include "khash.h"
 #include "pack-objects.h"
 
-struct bitmap_disk_entry {
-       uint32_t object_pos;
-       uint8_t xor_offset;
-       uint8_t flags;
-} __attribute__((packed));
-
 struct bitmap_disk_header {
        char magic[4];
        uint16_t version;
diff --git a/path.c b/path.c
index f68df0cf888124592db6c771d78d94894ffbacd9..e6089938018b74fb8a6ea547ffc64d428a13daa0 100644 (file)
--- a/path.c
+++ b/path.c
@@ -823,3 +823,36 @@ int daemon_avoid_alias(const char *p)
                }
        }
 }
+
+static int only_spaces_and_periods(const char *path, size_t len, size_t skip)
+{
+       if (len < skip)
+               return 0;
+       len -= skip;
+       path += skip;
+       while (len-- > 0) {
+               char c = *(path++);
+               if (c != ' ' && c != '.')
+                       return 0;
+       }
+       return 1;
+}
+
+int is_ntfs_dotgit(const char *name)
+{
+       int len;
+
+       for (len = 0; ; len++)
+               if (!name[len] || name[len] == '\\' || is_dir_sep(name[len])) {
+                       if (only_spaces_and_periods(name, len, 4) &&
+                                       !strncasecmp(name, ".git", 4))
+                               return 1;
+                       if (only_spaces_and_periods(name, len, 5) &&
+                                       !strncasecmp(name, "git~1", 5))
+                               return 1;
+                       if (name[len] != '\\')
+                               return 0;
+                       name += len + 1;
+                       len = -1;
+               }
+}
index f802d289de98ab30040ab63d3476671184b19ed7..ccdd11eea98b36e0d0737d572e70607f54f224c0 100644 (file)
--- a/po/bg.po
+++ b/po/bg.po
@@ -130,8 +130,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: git master\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-11-02 18:01+0200\n"
-"PO-Revision-Date: 2014-11-02 18:52+0200\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 16:09+0800\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@fsa-bg.org>\n"
 "Language: bg\n"
@@ -410,42 +410,42 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "Пратката изисква следния указател:"
 msgstr[1] "Пратката изисква следните %d указатели:"
 
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "Командата „git pack-objects“ не може да бъде стартирана"
+
+# FIXME better message
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "Командата „git pack-objects“ не завърши успешно"
+
 # FIXME better message
-#: bundle.c:292
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "Командата „git rev-list“ не завърши успешно"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "непознат аргумент: %s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr ""
 "указателят „%s“ не е бил включен поради опциите зададени на „git rev-list“"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "непознат аргумент: %s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "Създаването на празна пратка е невъзможно."
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "Командата „git pack-objects“ не може да бъде стартирана"
-
-# FIXME better message
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "Командата „git pack-objects“ не завърши успешно"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "Файлът „%s“ не може да бъде създаден"
 
 # FIXME better message
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "Командата „git index-pack“ не завърши успешно"
 
@@ -1619,28 +1619,28 @@ msgstr "Връзката в Git „%s“ не може да бъде създа
 msgid "Could not set core.worktree in %s"
 msgstr "Настройката „core.worktree“ не може да се зададе в „%s“"
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "неправилна стойност „%s“ за настройката „%s“"
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "стойността „%s“ се повтаря в настройките"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "празна завършваща лексема в епилога „%s“"
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "празна завършваща лексема в епилога „%.*s“"
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "входният файл „%s“ не може да бъде прочетен"
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "от стандартния вход не може да се чете"
 
@@ -2142,6 +2142,11 @@ msgstr "изтрит"
 msgid "behind "
 msgstr "назад с "
 
+#: compat/precompose_utf8.c:55 builtin/clone.c:357
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "неуспешно изтриване на „%s“"
+
 #: builtin/add.c:22
 msgid "git add [options] [--] <pathspec>..."
 msgstr "git add [ОПЦИЯ…] [--] ПЪТ…"
@@ -4184,11 +4189,6 @@ msgstr "„%s“ съществува и не е директория"
 msgid "failed to stat %s\n"
 msgstr "не може да бъде получена информация чрез „stat“ за „%s“\n"
 
-#: builtin/clone.c:357
-#, c-format
-msgid "failed to unlink '%s'"
-msgstr "неуспешно изтриване на „%s“"
-
 #: builtin/clone.c:362
 #, c-format
 msgid "failed to create link '%s'"
@@ -8676,10 +8676,6 @@ msgstr "УКАЗАТЕЛ>:<ОЧАКВАНА_СТОЙНОСТ"
 msgid "require old value of ref to be at this value"
 msgstr "УКАЗАТЕЛят трябва първоначално да е с тази ОЧАКВАНА_СТОЙНОСТ"
 
-#: builtin/push.c:506
-msgid "check"
-msgstr "проверка"
-
 #: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "управление на рекурсивното изтласкване на подмодулите"
@@ -10511,27 +10507,6 @@ msgstr ""
 "за\n"
 "някое определено ПОНЯТИЕ използвайте „git help ПОНЯТИЕ“."
 
-#: parse-options.h:143
-msgid "expiry-date"
-msgstr "период на валидност/запазване"
-
-#: parse-options.h:158
-msgid "no-op (backward compatibility)"
-msgstr "нулева операция (за съвместимост с предишни версии)"
-
-#: parse-options.h:232
-msgid "be more verbose"
-msgstr "повече подробности"
-
-#: parse-options.h:234
-msgid "be more quiet"
-msgstr "по-малко подробности"
-
-# FIXME SHA-1 -> SHA1
-#: parse-options.h:240
-msgid "use <n> digits to display SHA-1s"
-msgstr "да се показват такъв БРОЙ цифри от сумите по SHA1"
-
 #: common-cmds.h:8
 msgid "Add file contents to the index"
 msgstr "Добавяне на съдържанието на файла към индекса"
@@ -10618,6 +10593,27 @@ msgstr "Извеждане на състоянието на работното 
 msgid "Create, list, delete or verify a tag object signed with GPG"
 msgstr "Извеждане, създаване, изтриване, проверка на етикети подписани с GPG"
 
+#: parse-options.h:143
+msgid "expiry-date"
+msgstr "период на валидност/запазване"
+
+#: parse-options.h:158
+msgid "no-op (backward compatibility)"
+msgstr "нулева операция (за съвместимост с предишни версии)"
+
+#: parse-options.h:232
+msgid "be more verbose"
+msgstr "повече подробности"
+
+#: parse-options.h:234
+msgid "be more quiet"
+msgstr "по-малко подробности"
+
+# FIXME SHA-1 -> SHA1
+#: parse-options.h:240
+msgid "use <n> digits to display SHA-1s"
+msgstr "да се показват такъв БРОЙ цифри от сумите по SHA1"
+
 #: rerere.h:27
 msgid "update the index with reused conflict resolution if possible"
 msgstr ""
index 5f0651baaa1570385f86403b4f10b85c1444a04c..1fea0478212f4519ea79d1b9e8fa6c09cb3aad75 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-11-01 07:46+0800\n"
-"PO-Revision-Date: 2014-11-17 13:16-0700\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 16:10+0800\n"
 "Last-Translator: Alex Henrie <alexhenrie24@gmail.com>\n"
 "Language-Team: Catalan\n"
 "Language: ca\n"
@@ -290,38 +290,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "L'embolic requereix aquesta referència:"
 msgstr[1] "L'embolic requereix aquestes %d referències:"
 
-#: bundle.c:292
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "No s'ha pogut executar el pack-objects"
+
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "El pack-objects s'ha mort"
+
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "El rev-list s'ha mort"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "paràmetre no reconegut: %s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr "les opcions de la llista de revisions exclouen la referència '%s'"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "paràmetre no reconegut: %s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "Refusant crear un embolic buit."
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "No s'ha pogut executar el pack-objects"
-
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "El pack-objects s'ha mort"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "no es pot crear '%s'"
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "L'index-pack s'ha mort"
 
@@ -1475,28 +1475,28 @@ msgstr "No s'ha pogut crear l'enllaç de git %s"
 msgid "Could not set core.worktree in %s"
 msgstr "No s'ha pogut establir core.worktree en %s"
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "valor desconegut '%s' per a la clau '%s'"
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "més d'un %s"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "fitxa de remolc buida en el remolc '%s'"
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "fitxa de remolc buida en el remolc '%.*s'"
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "no s'ha pogut llegir el fitxer d'entrada '%s'"
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "No s'ha pogut llegir des d'stdin"
 
@@ -8320,10 +8320,6 @@ msgstr "nom-de-referència>:<esperat"
 msgid "require old value of ref to be at this value"
 msgstr "requereix que el valor antic de la referència sigui d'aquest valor"
 
-#: builtin/push.c:506
-msgid "check"
-msgstr "comprova"
-
 #: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "controla la pujada recursiva dels submòduls"
index 0597cb2bd73ab5a961cf8769a32e7de4833c0a18..5a93ea829f0daff6e28a43225a5dac7f8a4a2d29 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-10-22 16:02+0800\n"
-"PO-Revision-Date: 2013-07-28 18:42+0200\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 10:19+0800\n"
 "Last-Translator: Ralf Thielow <ralf.thielow@gmail.com>\n"
 "Language-Team: German <>\n"
 "Language: de\n"
@@ -291,38 +291,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "Das Paket benötigt diese Referenz:"
 msgstr[1] "Das Paket benötigt diese %d Referenzen:"
 
-#: bundle.c:292
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "Konnte Paketobjekte nicht erstellen"
+
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "Erstellung der Paketobjekte abgebrochen"
+
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "\"rev-list\" abgebrochen"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "nicht erkanntes Argument: %s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr "Referenz '%s' wird durch \"rev-list\" Optionen ausgeschlossen"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "nicht erkanntes Argument: %s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "Erstellung eines leeren Pakets zurückgewiesen."
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "Konnte Paketobjekte nicht erstellen"
-
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "Erstellung der Paketobjekte abgebrochen"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "kann '%s' nicht erstellen"
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "Erstellung der Paketindexdatei abgebrochen"
 
@@ -377,16 +377,19 @@ msgstr "Ungültiger Modus für Objekterstellung: %s"
 
 #: config.c:1201
 msgid "unable to parse command-line config"
-msgstr "Konnte die über die Kommandozeile angegebene Konfiguration nicht parsen."
+msgstr ""
+"Konnte die über die Kommandozeile angegebene Konfiguration nicht parsen."
 
 #: config.c:1262
 msgid "unknown error occured while reading the configuration files"
-msgstr "Es trat ein unbekannter Fehler beim Lesen der Konfigurationsdateien auf."
+msgstr ""
+"Es trat ein unbekannter Fehler beim Lesen der Konfigurationsdateien auf."
 
 #: config.c:1586
 #, c-format
 msgid "unable to parse '%s' from command-line config"
-msgstr "Konnte Wert '%s' aus der über die Kommandozeile angegebenen\n"
+msgstr ""
+"Konnte Wert '%s' aus der über die Kommandozeile angegebenen\n"
 "Konfiguration nicht parsen."
 
 #: config.c:1588
@@ -560,17 +563,17 @@ msgstr "konnte temporäre Datei '%s' nicht erstellen: %s"
 msgid "failed writing detached signature to '%s': %s"
 msgstr "Fehler beim Schreiben der Signatur nach '%s': %s"
 
-#: grep.c:1703
+#: grep.c:1718
 #, c-format
 msgid "'%s': unable to read %s"
 msgstr "'%s': konnte nicht lesen %s"
 
-#: grep.c:1720
+#: grep.c:1735
 #, c-format
 msgid "'%s': %s"
 msgstr "'%s': %s"
 
-#: grep.c:1731
+#: grep.c:1746
 #, c-format
 msgid "'%s': short read %s"
 msgstr "'%s': read() zu kurz %s"
@@ -641,18 +644,18 @@ msgstr "%s: %s - %s"
 
 #: lockfile.c:275
 msgid "BUG: reopen a lockfile that is still open"
-msgstr "FEHLER: Wiedereröffnen einer bereits geöffneten Lock-Datei"
+msgstr "FEHLER: Wiederöffnen einer bereits geöffneten Lock-Datei"
 
 #: lockfile.c:277
 msgid "BUG: reopen a lockfile that has been committed"
-msgstr "FEHLER: Wiedereröffnen einer bereits committeten Lock-Datei"
+msgstr "FEHLER: Wiederöffnen einer bereits committeten Lock-Datei"
 
 #: merge.c:41
 msgid "failed to read the cache"
 msgstr "Lesen des Zwischenspeichers fehlgeschlagen"
 
 #: merge.c:94 builtin/checkout.c:356 builtin/checkout.c:562
-#: builtin/clone.c:662
+#: builtin/clone.c:659
 msgid "unable to write new index file"
 msgstr "Konnte neue Staging-Area-Datei nicht schreiben."
 
@@ -1138,11 +1141,11 @@ msgstr ""
 "  (benutzen Sie \"git pull\", um Ihren Branch mit dem Remote-Branch "
 "zusammenzuführen)\n"
 
-#: run-command.c:86
+#: run-command.c:87
 msgid "open /dev/null failed"
 msgstr "Öffnen von /dev/null fehlgeschlagen"
 
-#: run-command.c:88
+#: run-command.c:89
 #, c-format
 msgid "dup2(%d,%d) failed"
 msgstr "dup2(%d,%d) fehlgeschlagen"
@@ -1153,7 +1156,8 @@ msgstr "Fehler beim Signieren des \"push\"-Zertifikates"
 
 #: send-pack.c:322
 msgid "the receiving end does not support --signed push"
-msgstr "die Gegenseite unterstützt keinen signierten Versand (\"--signed push\")"
+msgstr ""
+"die Gegenseite unterstützt keinen signierten Versand (\"--signed push\")"
 
 #: sequencer.c:172 builtin/merge.c:781 builtin/merge.c:892
 #: builtin/merge.c:1002 builtin/merge.c:1012
@@ -1483,28 +1487,28 @@ msgstr "Konnte git-Verweis %s nicht erstellen"
 msgid "Could not set core.worktree in %s"
 msgstr "Konnte core.worktree in '%s' nicht setzen."
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "unbekannter Wert '%s' für Schlüssel %s"
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "mehr als ein %s"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "leerer Anhang-Token in Anhang '%s'"
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "leerer Anhang-Token in Anhang '%.*s'"
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "Konnte Eingabe-Datei '%s' nicht lesen"
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "konnte nicht von der Standard-Eingabe lesen"
 
@@ -1719,15 +1723,15 @@ msgstr "unbeobachteter Inhalt, "
 msgid "bug: unhandled diff status %c"
 msgstr "Fehler: unbehandelter Differenz-Status %c"
 
-#: wt-status.c:763
+#: wt-status.c:761
 msgid "Submodules changed but not updated:"
 msgstr "Submodule geändert, aber nicht aktualisiert:"
 
-#: wt-status.c:765
+#: wt-status.c:763
 msgid "Submodule changes to be committed:"
 msgstr "Änderungen in Submodul zum Committen:"
 
-#: wt-status.c:844
+#: wt-status.c:842
 msgid ""
 "Do not touch the line above.\n"
 "Everything below will be removed."
@@ -1735,75 +1739,75 @@ msgstr ""
 "Ändern Sie nicht die obige Zeile.\n"
 "Alles unterhalb von ihr wird entfernt."
 
-#: wt-status.c:935
+#: wt-status.c:933
 msgid "You have unmerged paths."
 msgstr "Sie haben nicht zusammengeführte Pfade."
 
-#: wt-status.c:938
+#: wt-status.c:936
 msgid "  (fix conflicts and run \"git commit\")"
 msgstr " (beheben Sie die Konflikte und führen Sie \"git commit\" aus)"
 
-#: wt-status.c:941
+#: wt-status.c:939
 msgid "All conflicts fixed but you are still merging."
 msgstr "Alle Konflikte sind behoben, aber Sie sind immer noch beim Merge."
 
-#: wt-status.c:944
+#: wt-status.c:942
 msgid "  (use \"git commit\" to conclude merge)"
 msgstr "  (benutzen Sie \"git commit\", um den Merge abzuschließen)"
 
-#: wt-status.c:954
+#: wt-status.c:952
 msgid "You are in the middle of an am session."
 msgstr "Eine \"am\"-Sitzung ist im Gange."
 
-#: wt-status.c:957
+#: wt-status.c:955
 msgid "The current patch is empty."
 msgstr "Der aktuelle Patch ist leer."
 
-#: wt-status.c:961
+#: wt-status.c:959
 msgid "  (fix conflicts and then run \"git am --continue\")"
 msgstr ""
 "  (beheben Sie die Konflikte und führen Sie dann \"git am --continue\" aus)"
 
-#: wt-status.c:963
+#: wt-status.c:961
 msgid "  (use \"git am --skip\" to skip this patch)"
 msgstr "  (benutzen Sie \"git am --skip\", um diesen Patch auszulassen)"
 
-#: wt-status.c:965
+#: wt-status.c:963
 msgid "  (use \"git am --abort\" to restore the original branch)"
 msgstr ""
 "  (benutzen Sie \"git am --abort\", um den ursprünglichen Branch "
 "wiederherzustellen)"
 
-#: wt-status.c:1025 wt-status.c:1042
+#: wt-status.c:1023 wt-status.c:1040
 #, c-format
 msgid "You are currently rebasing branch '%s' on '%s'."
 msgstr "Sie sind gerade beim Rebase von Branch '%s' auf '%s'."
 
-#: wt-status.c:1030 wt-status.c:1047
+#: wt-status.c:1028 wt-status.c:1045
 msgid "You are currently rebasing."
 msgstr "Sie sind gerade beim Rebase."
 
-#: wt-status.c:1033
+#: wt-status.c:1031
 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:1035
+#: wt-status.c:1033
 msgid "  (use \"git rebase --skip\" to skip this patch)"
 msgstr "  (benutzen Sie \"git rebase --skip\", um diesen Patch auszulassen)"
 
-#: wt-status.c:1037
+#: wt-status.c:1035
 msgid "  (use \"git rebase --abort\" to check out the original branch)"
 msgstr ""
 "  (benutzen Sie \"git rebase --abort\", um den ursprünglichen Branch "
 "auszuchecken)"
 
-#: wt-status.c:1050
+#: wt-status.c:1048
 msgid "  (all conflicts fixed: run \"git rebase --continue\")"
 msgstr "  (alle Konflikte behoben: führen Sie \"git rebase --continue\" aus)"
 
-#: wt-status.c:1054
+#: wt-status.c:1052
 #, c-format
 msgid ""
 "You are currently splitting a commit while rebasing branch '%s' on '%s'."
@@ -1811,130 +1815,130 @@ msgstr ""
 "Sie teilen gerade einen Commit auf, während ein Rebase von Branch '%s' auf "
 "'%s' im Gange ist."
 
-#: wt-status.c:1059
+#: wt-status.c:1057
 msgid "You are currently splitting a commit during a rebase."
 msgstr "Sie teilen gerade einen Commit während eines Rebase auf."
 
-#: wt-status.c:1062
+#: wt-status.c:1060
 msgid "  (Once your working directory is clean, run \"git rebase --continue\")"
 msgstr ""
 "  (Sobald Ihr Arbeitsverzeichnis unverändert ist, führen Sie \"git rebase --"
 "continue\" aus)"
 
-#: wt-status.c:1066
+#: wt-status.c:1064
 #, c-format
 msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
 msgstr ""
 "Sie editieren gerade einen Commit während eines Rebase von Branch '%s' auf "
 "'%s'."
 
-#: wt-status.c:1071
+#: wt-status.c:1069
 msgid "You are currently editing a commit during a rebase."
 msgstr "Sie editieren gerade einen Commit während eines Rebase."
 
-#: wt-status.c:1074
+#: wt-status.c:1072
 msgid "  (use \"git commit --amend\" to amend the current commit)"
 msgstr ""
 "  (benutzen Sie \"git commit --amend\", um den aktuellen Commit "
 "nachzubessern)"
 
-#: wt-status.c:1076
+#: wt-status.c:1074
 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:1086
+#: wt-status.c:1084
 #, c-format
 msgid "You are currently cherry-picking commit %s."
 msgstr "Sie führen gerade \"cherry-pick\" von Commit %s aus."
 
-#: wt-status.c:1091
+#: wt-status.c:1089
 msgid "  (fix conflicts and run \"git cherry-pick --continue\")"
 msgstr ""
 "  (beheben Sie die Konflikte und führen Sie dann \"git cherry-pick --continue"
 "\" aus)"
 
-#: wt-status.c:1094
+#: wt-status.c:1092
 msgid "  (all conflicts fixed: run \"git cherry-pick --continue\")"
 msgstr ""
 "  (alle Konflikte behoben: führen Sie \"git cherry-pick --continue\" aus)"
 
-#: wt-status.c:1096
+#: wt-status.c:1094
 msgid "  (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"
 msgstr ""
 "  (benutzen Sie \"git cherry-pick --abort\", um die Cherry-Pick-Operation "
 "abzubrechen)"
 
-#: wt-status.c:1105
+#: wt-status.c:1103
 #, c-format
 msgid "You are currently reverting commit %s."
 msgstr "Sie sind gerade an einem Revert von Commit '%s'."
 
-#: wt-status.c:1110
+#: wt-status.c:1108
 msgid "  (fix conflicts and run \"git revert --continue\")"
 msgstr ""
 "  (beheben Sie die Konflikte und führen Sie dann \"git revert --continue\" "
 "aus)"
 
-#: wt-status.c:1113
+#: wt-status.c:1111
 msgid "  (all conflicts fixed: run \"git revert --continue\")"
 msgstr "  (alle Konflikte behoben: führen Sie \"git revert --continue\" aus)"
 
-#: wt-status.c:1115
+#: wt-status.c:1113
 msgid "  (use \"git revert --abort\" to cancel the revert operation)"
 msgstr ""
 "  (benutzen Sie \"git revert --abort\", um die Revert-Operation abzubrechen)"
 
-#: wt-status.c:1126
+#: wt-status.c:1124
 #, c-format
 msgid "You are currently bisecting, started from branch '%s'."
 msgstr "Sie sind gerade bei einer binären Suche, gestartet von Branch '%s'."
 
-#: wt-status.c:1130
+#: wt-status.c:1128
 msgid "You are currently bisecting."
 msgstr "Sie sind gerade bei einer binären Suche."
 
-#: wt-status.c:1133
+#: wt-status.c:1131
 msgid "  (use \"git bisect reset\" to get back to the original branch)"
 msgstr ""
 "  (benutzen Sie \"git bisect reset\", um zum ursprünglichen Branch "
 "zurückzukehren)"
 
-#: wt-status.c:1308
+#: wt-status.c:1306
 msgid "On branch "
 msgstr "Auf Branch "
 
-#: wt-status.c:1315
+#: wt-status.c:1313
 msgid "rebase in progress; onto "
 msgstr "Rebase im Gange; auf "
 
-#: wt-status.c:1322
+#: wt-status.c:1320
 msgid "HEAD detached at "
 msgstr "HEAD losgelöst bei "
 
-#: wt-status.c:1324
+#: wt-status.c:1322
 msgid "HEAD detached from "
 msgstr "HEAD losgelöst von "
 
-#: wt-status.c:1327
+#: wt-status.c:1325
 msgid "Not currently on any branch."
 msgstr "Im Moment auf keinem Branch."
 
-#: wt-status.c:1344
+#: wt-status.c:1342
 msgid "Initial commit"
 msgstr "Initialer Commit"
 
-#: wt-status.c:1358
+#: wt-status.c:1356
 msgid "Untracked files"
 msgstr "Unbeobachtete Dateien"
 
-#: wt-status.c:1360
+#: wt-status.c:1358
 msgid "Ignored files"
 msgstr "Ignorierte Dateien"
 
-#: wt-status.c:1364
+#: wt-status.c:1362
 #, c-format
 msgid ""
 "It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
@@ -1945,32 +1949,32 @@ msgstr ""
 "'status -uno' könnte das beschleunigen, aber Sie müssen darauf achten,\n"
 "neue Dateien selbstständig hinzuzufügen (siehe 'git help status')."
 
-#: wt-status.c:1370
+#: wt-status.c:1368
 #, c-format
 msgid "Untracked files not listed%s"
 msgstr "Unbeobachtete Dateien nicht aufgelistet%s"
 
-#: wt-status.c:1372
+#: wt-status.c:1370
 msgid " (use -u option to show untracked files)"
-msgstr " (benutzen Sie die Option -u, um unbeobachteten Dateien anzuzeigen)"
+msgstr " (benutzen Sie die Option -u, um unbeobachtete Dateien anzuzeigen)"
 
-#: wt-status.c:1378
+#: wt-status.c:1376
 msgid "No changes"
 msgstr "Keine Änderungen"
 
-#: wt-status.c:1383
+#: wt-status.c:1381
 #, c-format
 msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
 msgstr ""
 "keine Änderungen zum Commit vorgemerkt (benutzen Sie \"git add\" und/oder "
 "\"git commit -a\")\n"
 
-#: wt-status.c:1386
+#: wt-status.c:1384
 #, c-format
 msgid "no changes added to commit\n"
 msgstr "keine Änderungen zum Commit vorgemerkt\n"
 
-#: wt-status.c:1389
+#: wt-status.c:1387
 #, c-format
 msgid ""
 "nothing added to commit but untracked files present (use \"git add\" to "
@@ -1979,48 +1983,48 @@ msgstr ""
 "nichts zum Commit vorgemerkt, aber es gibt unbeobachtete Dateien (benutzen "
 "Sie \"git add\" zum Beobachten)\n"
 
-#: wt-status.c:1392
+#: wt-status.c:1390
 #, c-format
 msgid "nothing added to commit but untracked files present\n"
 msgstr "nichts zum Commit vorgemerkt, aber es gibt unbeobachtete Dateien\n"
 
-#: wt-status.c:1395
+#: wt-status.c:1393
 #, c-format
 msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
 msgstr ""
 "nichts zu committen (Erstellen/Kopieren Sie Dateien und benutzen Sie \"git "
 "add\" zum Beobachten)\n"
 
-#: wt-status.c:1398 wt-status.c:1403
+#: wt-status.c:1396 wt-status.c:1401
 #, c-format
 msgid "nothing to commit\n"
 msgstr "nichts zu committen\n"
 
-#: wt-status.c:1401
+#: wt-status.c:1399
 #, c-format
 msgid "nothing to commit (use -u to show untracked files)\n"
 msgstr ""
 "nichts zu committen (benutzen Sie die Option -u, um unbeobachtete Dateien "
 "anzuzeigen)\n"
 
-#: wt-status.c:1405
+#: wt-status.c:1403
 #, c-format
 msgid "nothing to commit, working directory clean\n"
 msgstr "nichts zu committen, Arbeitsverzeichnis unverändert\n"
 
-#: wt-status.c:1514
+#: wt-status.c:1512
 msgid "HEAD (no branch)"
 msgstr "HEAD (kein Branch)"
 
-#: wt-status.c:1520
+#: wt-status.c:1518
 msgid "Initial commit on "
 msgstr "Initialer Commit auf "
 
-#: wt-status.c:1552
+#: wt-status.c:1550
 msgid "gone"
 msgstr "entfernt"
 
-#: wt-status.c:1554 wt-status.c:1562
+#: wt-status.c:1552 wt-status.c:1560
 msgid "behind "
 msgstr "hinterher "
 
@@ -2086,13 +2090,13 @@ msgstr ""
 "ignoriert:\n"
 
 #: builtin/add.c:248 builtin/clean.c:875 builtin/fetch.c:108 builtin/mv.c:110
-#: builtin/prune-packed.c:78 builtin/push.c:488 builtin/remote.c:1375
+#: builtin/prune-packed.c:55 builtin/push.c:499 builtin/remote.c:1375
 #: builtin/rm.c:269
 msgid "dry run"
 msgstr "Probelauf"
 
 #: builtin/add.c:249 builtin/apply.c:4415 builtin/check-ignore.c:19
-#: builtin/commit.c:1362 builtin/count-objects.c:95 builtin/fsck.c:608
+#: builtin/commit.c:1362 builtin/count-objects.c:63 builtin/fsck.c:608
 #: builtin/log.c:1617 builtin/mv.c:109 builtin/read-tree.c:114
 msgid "be verbose"
 msgstr "erweiterte Ausgaben"
@@ -2537,8 +2541,8 @@ msgstr "Anzahl"
 #: builtin/apply.c:4369
 msgid "remove <num> leading slashes from traditional diff paths"
 msgstr ""
-"<Anzahl> vorangestellte Schrägstriche von herkömmlichen "
-"Differenzpfaden entfernen"
+"<Anzahl> vorangestellte Schrägstriche von herkömmlichen Differenzpfaden "
+"entfernen"
 
 #: builtin/apply.c:4372
 msgid "ignore additions made by the patch"
@@ -2574,8 +2578,7 @@ msgstr ""
 
 #: builtin/apply.c:4386
 msgid "apply a patch without touching the working tree"
-msgstr ""
-"Patch anwenden, ohne Änderungen im Arbeitsverzeichnis vorzunehmen"
+msgstr "Patch anwenden, ohne Änderungen im Arbeitsverzeichnis vorzunehmen"
 
 #: builtin/apply.c:4388
 msgid "also apply the patch (use with --stat/--summary/--check)"
@@ -2588,8 +2591,8 @@ msgstr "versuche 3-Wege-Merge, wenn der Patch nicht angewendet werden konnte"
 #: builtin/apply.c:4392
 msgid "build a temporary index based on embedded index information"
 msgstr ""
-"eine temporäre Staging-Area, basierend auf den integrierten Staging-"
-"Area-Informationen, erstellen"
+"eine temporäre Staging-Area, basierend auf den integrierten Staging-Area-"
+"Informationen, erstellen"
 
 #: builtin/apply.c:4394 builtin/checkout-index.c:198 builtin/ls-files.c:455
 msgid "paths are separated with NUL character"
@@ -2597,7 +2600,8 @@ msgstr "Pfade sind getrennt durch NUL Zeichen"
 
 #: builtin/apply.c:4397
 msgid "ensure at least <n> lines of context match"
-msgstr "sicher stellen, dass mindestens <n> Zeilen des Kontextes übereinstimmen"
+msgstr ""
+"sicher stellen, dass mindestens <n> Zeilen des Kontextes übereinstimmen"
 
 #: builtin/apply.c:4398
 msgid "action"
@@ -2772,7 +2776,8 @@ msgstr ""
 
 #: builtin/blame.c:2510
 msgid "Use the same output mode as git-annotate (Default: off)"
-msgstr "Den gleichen Ausgabemodus benutzen wie \"git-annotate\" (Standard: aus)"
+msgstr ""
+"Den gleichen Ausgabemodus benutzen wie \"git-annotate\" (Standard: aus)"
 
 #: builtin/blame.c:2511
 msgid "Show raw timestamp (Default: off)"
@@ -2788,7 +2793,8 @@ msgstr "Den Namen des Autors und den Zeitstempel unterdrücken (Standard: aus)"
 
 #: builtin/blame.c:2514
 msgid "Show author email instead of name (Default: off)"
-msgstr "Anstatt des Namens die E-Mail-Adresse des Autors anzeigen (Standard: aus)"
+msgstr ""
+"Anstatt des Namens die E-Mail-Adresse des Autors anzeigen (Standard: aus)"
 
 #: builtin/blame.c:2515
 msgid "Ignore whitespace differences"
@@ -2804,7 +2810,7 @@ msgstr "Commits von <Datei> benutzen, anstatt \"git-rev-list\" aufzurufen"
 
 #: builtin/blame.c:2518
 msgid "Use <file>'s contents as the final image"
-msgstr "Inhalte der <Datei>en als entgültiges Abbild benutzen"
+msgstr "Inhalte der <Datei>en als endgültiges Abbild benutzen"
 
 #: builtin/blame.c:2519 builtin/blame.c:2520
 msgid "score"
@@ -3072,7 +3078,7 @@ msgstr "Informationen zum Upstream-Branch ändern"
 
 #: builtin/branch.c:823
 msgid "use colored output"
-msgstr "farbliche Ausgaben verwenden"
+msgstr "farbige Ausgaben verwenden"
 
 #: builtin/branch.c:824
 msgid "act on remote-tracking branches"
@@ -3146,7 +3152,7 @@ msgstr "Branches in Spalten auflisten"
 msgid "Failed to resolve HEAD as a valid ref."
 msgstr "Konnte HEAD nicht als gültige Referenz auflösen."
 
-#: builtin/branch.c:881 builtin/clone.c:637
+#: builtin/branch.c:881 builtin/clone.c:634
 msgid "HEAD not found below refs/heads!"
 msgstr "HEAD wurde nicht unter \"refs/heads\" gefunden!"
 
@@ -3925,7 +3931,7 @@ msgid "git clone [options] [--] <repo> [<dir>]"
 msgstr "git clone [Optionen] [--] <Repository> [<Verzeichnis>]"
 
 #: builtin/clone.c:65 builtin/fetch.c:112 builtin/merge.c:223
-#: builtin/push.c:503
+#: builtin/push.c:514
 msgid "force progress reporting"
 msgstr "Fortschrittsanzeige erzwingen"
 
@@ -4062,12 +4068,12 @@ msgstr "Konnte Verweis '%s' nicht erstellen"
 msgid "failed to copy file to '%s'"
 msgstr "Konnte Datei nicht nach '%s' kopieren"
 
-#: builtin/clone.c:389 builtin/clone.c:566
+#: builtin/clone.c:389 builtin/clone.c:563
 #, c-format
 msgid "done.\n"
 msgstr "Fertig.\n"
 
-#: builtin/clone.c:402
+#: builtin/clone.c:401
 msgid ""
 "Clone succeeded, but checkout failed.\n"
 "You can inspect what was checked out with 'git status'\n"
@@ -4077,114 +4083,114 @@ msgstr ""
 "Sie können mit 'git status' prüfen, was ausgecheckt worden ist\n"
 "und das Auschecken mit 'git checkout -f HEAD' erneut versuchen.\n"
 
-#: builtin/clone.c:481
+#: builtin/clone.c:478
 #, c-format
 msgid "Could not find remote branch %s to clone."
 msgstr "Konnte zu klonenden Remote-Branch %s nicht finden."
 
-#: builtin/clone.c:561
+#: builtin/clone.c:558
 #, c-format
 msgid "Checking connectivity... "
 msgstr "Prüfe Konnektivität... "
 
-#: builtin/clone.c:564
+#: builtin/clone.c:561
 msgid "remote did not send all necessary objects"
 msgstr "Remote-Repository hat nicht alle erforderlichen Objekte gesendet."
 
-#: builtin/clone.c:628
+#: builtin/clone.c:625
 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
 msgstr ""
 "Externer HEAD bezieht sich auf eine nicht existierende Referenz und kann "
 "nicht ausgecheckt werden.\n"
 
-#: builtin/clone.c:659
+#: builtin/clone.c:656
 msgid "unable to checkout working tree"
 msgstr "Arbeitsverzeichnis konnte nicht ausgecheckt werden"
 
-#: builtin/clone.c:770
+#: builtin/clone.c:765
 msgid "Too many arguments."
 msgstr "Zu viele Argumente."
 
-#: builtin/clone.c:774
+#: builtin/clone.c:769
 msgid "You must specify a repository to clone."
 msgstr "Sie müssen ein Repository zum Klonen angeben."
 
-#: builtin/clone.c:785
+#: builtin/clone.c:780
 #, c-format
 msgid "--bare and --origin %s options are incompatible."
 msgstr "Die Optionen --bare und --origin %s sind inkompatibel."
 
-#: builtin/clone.c:788
+#: builtin/clone.c:783
 msgid "--bare and --separate-git-dir are incompatible."
 msgstr "Die Optionen --bare und --separate-git-dir sind inkompatibel."
 
-#: builtin/clone.c:801
+#: builtin/clone.c:796
 #, c-format
 msgid "repository '%s' does not exist"
 msgstr "Repository '%s' existiert nicht."
 
-#: builtin/clone.c:807 builtin/fetch.c:1155
+#: builtin/clone.c:802 builtin/fetch.c:1155
 #, c-format
 msgid "depth %s is not a positive number"
 msgstr "Tiefe %s ist keine positive Zahl"
 
-#: builtin/clone.c:817
+#: builtin/clone.c:812
 #, c-format
 msgid "destination path '%s' already exists and is not an empty directory."
 msgstr "Zielpfad '%s' existiert bereits und ist kein leeres Verzeichnis."
 
-#: builtin/clone.c:827
+#: builtin/clone.c:822
 #, c-format
 msgid "working tree '%s' already exists."
 msgstr "Arbeitsverzeichnis '%s' existiert bereits."
 
-#: builtin/clone.c:840 builtin/clone.c:852
+#: builtin/clone.c:835 builtin/clone.c:847
 #, c-format
 msgid "could not create leading directories of '%s'"
 msgstr "Konnte führende Verzeichnisse von '%s' nicht erstellen."
 
-#: builtin/clone.c:843
+#: builtin/clone.c:838
 #, c-format
 msgid "could not create work tree dir '%s'."
 msgstr "Konnte Arbeitsverzeichnis '%s' nicht erstellen."
 
-#: builtin/clone.c:862
+#: builtin/clone.c:857
 #, c-format
 msgid "Cloning into bare repository '%s'...\n"
 msgstr "Klone in Bare-Repository '%s'...\n"
 
-#: builtin/clone.c:864
+#: builtin/clone.c:859
 #, c-format
 msgid "Cloning into '%s'...\n"
 msgstr "Klone nach '%s'...\n"
 
-#: builtin/clone.c:900
+#: builtin/clone.c:895
 msgid "--depth is ignored in local clones; use file:// instead."
 msgstr ""
 "Die Option --depth wird in lokalen Klonen ignoriert; benutzen Sie "
 "stattdessen file://"
 
-#: builtin/clone.c:903
+#: builtin/clone.c:898
 msgid "source repository is shallow, ignoring --local"
 msgstr ""
 "Quelle ist ein Repository mit unvollständiger Historie (shallow),ignoriere --"
 "local"
 
-#: builtin/clone.c:908
+#: builtin/clone.c:903
 msgid "--local is ignored"
 msgstr "--local wird ignoriert"
 
-#: builtin/clone.c:912
+#: builtin/clone.c:907
 #, c-format
 msgid "Don't know how to clone %s"
 msgstr "Weiß nicht wie %s zu klonen ist."
 
-#: builtin/clone.c:963 builtin/clone.c:971
+#: builtin/clone.c:958 builtin/clone.c:966
 #, c-format
 msgid "Remote branch %s not found in upstream %s"
 msgstr "Remote-Branch %s nicht im Upstream-Repository %s gefunden"
 
-#: builtin/clone.c:974
+#: builtin/clone.c:969
 msgid "You appear to have cloned an empty repository."
 msgstr "Sie scheinen ein leeres Repository geklont zu haben."
 
@@ -4246,7 +4252,8 @@ msgstr ""
 "Ihres Benutzer- und Rechnernamens konfiguriert. Bitte prüfen Sie, dass\n"
 "diese zutreffend sind. Sie können diese Meldung unterdrücken, indem Sie\n"
 "diese explizit setzen. Führen Sie dazu das folgende Kommando aus und folgen\n"
-"Sie den Anweisungen in Ihrem Editor, um die Konfigurationsdatei zu bearbeiten:\n"
+"Sie den Anweisungen in Ihrem Editor, um die Konfigurationsdatei zu "
+"bearbeiten:\n"
 "\n"
 "    git config --global --edit\n"
 "\n"
@@ -4609,7 +4616,7 @@ msgstr "Status im Kurzformat anzeigen"
 msgid "show branch information"
 msgstr "Branchinformationen anzeigen"
 
-#: builtin/commit.c:1368 builtin/commit.c:1648 builtin/push.c:489
+#: builtin/commit.c:1368 builtin/commit.c:1648 builtin/push.c:500
 msgid "machine-readable output"
 msgstr "maschinenlesbare Ausgabe"
 
@@ -4629,8 +4636,8 @@ msgstr "Modus"
 #: builtin/commit.c:1377 builtin/commit.c:1656
 msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
 msgstr ""
-"nicht beobachtete Dateien anzeigen, optionale Modi: all, normal, no. (Standard: "
-"all)"
+"nicht beobachtete Dateien anzeigen, optionale Modi: all, normal, no. "
+"(Standard: all)"
 
 #: builtin/commit.c:1380
 msgid "show ignored files"
@@ -5015,11 +5022,11 @@ msgstr ""
 msgid "cannot create configuration file %s"
 msgstr "Konnte Konfigurationsdatei '%s' nicht erstellen."
 
-#: builtin/count-objects.c:82
+#: builtin/count-objects.c:55
 msgid "git count-objects [-v] [-H | --human-readable]"
 msgstr "git count-objects [-v] [-H | --human-readable]"
 
-#: builtin/count-objects.c:97
+#: builtin/count-objects.c:65
 msgid "print sizes in human readable format"
 msgstr "gibt Größenangaben in menschenlesbaren Format aus"
 
@@ -5578,7 +5585,7 @@ msgstr "Platzhalter als Python-String formatieren"
 
 #: builtin/for-each-ref.c:1078
 msgid "quote placeholders suitably for tcl"
-msgstr "Platzhalter als TCL-String formatieren"
+msgstr "Platzhalter als Tcl-String formatieren"
 
 #: builtin/for-each-ref.c:1081
 msgid "show only <n> matched refs"
@@ -5600,7 +5607,7 @@ msgstr "Schüssel"
 msgid "field name to sort on"
 msgstr "sortiere nach diesem Feld"
 
-#: builtin/fsck.c:147 builtin/prune.c:172
+#: builtin/fsck.c:147 builtin/prune.c:136
 msgid "Checking connectivity"
 msgstr "Prüfe Konnektivität"
 
@@ -5638,7 +5645,7 @@ msgstr "die Reflogs prüfen (Standard)"
 
 #: builtin/fsck.c:615
 msgid "also consider packs and alternate objects"
-msgstr ""
+msgstr "ebenso Pakete und alternative Objekte betrachten"
 
 #: builtin/fsck.c:616
 msgid "enable more strict checking"
@@ -5648,7 +5655,7 @@ msgstr "genauere Prüfung aktivieren"
 msgid "write dangling objects in .git/lost-found"
 msgstr "unreferenzierte Objekte nach .git/lost-found schreiben"
 
-#: builtin/fsck.c:619 builtin/prune.c:144
+#: builtin/fsck.c:619 builtin/prune.c:108
 msgid "show progress"
 msgstr "Fortschrittsanzeige anzeigen"
 
@@ -5859,8 +5866,8 @@ msgstr ""
 #: builtin/grep.c:696
 msgid "show filename only once above matches from same file"
 msgstr ""
-"den Dateinamen nur einmal oberhalb der Übereinstimmungen aus dieser "
-"Datei anzeigen"
+"den Dateinamen nur einmal oberhalb der Übereinstimmungen aus dieser Datei "
+"anzeigen"
 
 #: builtin/grep.c:699
 msgid "show <n> context lines before and after matches"
@@ -5904,7 +5911,8 @@ msgstr "Übereinstimmungen nur durch Beendigungsstatus anzeigen"
 
 #: builtin/grep.c:731
 msgid "show only matches from files that match all patterns"
-msgstr "nur Übereinstimmungen von Dateien anzeigen, die allen Mustern entsprechen"
+msgstr ""
+"nur Übereinstimmungen von Dateien anzeigen, die allen Mustern entsprechen"
 
 #: builtin/grep.c:733
 msgid "show parse tree for grep expression"
@@ -6130,287 +6138,287 @@ msgstr "für `git %s' wurde der Alias `%s' angelegt"
 msgid "unable to open %s"
 msgstr "kann %s nicht öffnen"
 
-#: builtin/index-pack.c:197
+#: builtin/index-pack.c:200
 #, c-format
 msgid "object type mismatch at %s"
 msgstr "Objekt-Typen passen bei %s nicht zusammen"
 
-#: builtin/index-pack.c:217
+#: builtin/index-pack.c:220
 #, c-format
 msgid "did not receive expected object %s"
 msgstr "konnte erwartetes Objekt %s nicht empfangen"
 
-#: builtin/index-pack.c:220
+#: builtin/index-pack.c:223
 #, c-format
 msgid "object %s: expected type %s, found %s"
 msgstr "Objekt %s: erwarteter Typ %s, %s gefunden"
 
-#: builtin/index-pack.c:262
+#: builtin/index-pack.c:265
 #, c-format
 msgid "cannot fill %d byte"
 msgid_plural "cannot fill %d bytes"
 msgstr[0] "kann %d Byte nicht lesen"
 msgstr[1] "kann %d Bytes nicht lesen"
 
-#: builtin/index-pack.c:272
+#: builtin/index-pack.c:275
 msgid "early EOF"
 msgstr "zu frühes Dateiende"
 
-#: builtin/index-pack.c:273
+#: builtin/index-pack.c:276
 msgid "read error on input"
 msgstr "Fehler beim Lesen der Eingabe"
 
-#: builtin/index-pack.c:285
+#: builtin/index-pack.c:288
 msgid "used more bytes than were available"
 msgstr "verwendete mehr Bytes als verfügbar waren"
 
-#: builtin/index-pack.c:292
+#: builtin/index-pack.c:295
 msgid "pack too large for current definition of off_t"
 msgstr "Paket ist zu groß für die aktuelle Definition von off_t"
 
-#: builtin/index-pack.c:308
+#: builtin/index-pack.c:311
 #, c-format
 msgid "unable to create '%s'"
 msgstr "konnte '%s' nicht erstellen"
 
-#: builtin/index-pack.c:313
+#: builtin/index-pack.c:316
 #, c-format
 msgid "cannot open packfile '%s'"
 msgstr "Kann Paketdatei '%s' nicht öffnen"
 
-#: builtin/index-pack.c:327
+#: builtin/index-pack.c:330
 msgid "pack signature mismatch"
 msgstr "Paketsignatur stimmt nicht überein"
 
-#: builtin/index-pack.c:329
+#: builtin/index-pack.c:332
 #, c-format
 msgid "pack version %<PRIu32> unsupported"
 msgstr "Paketversion %<PRIu32> nicht unterstützt"
 
-#: builtin/index-pack.c:347
+#: builtin/index-pack.c:350
 #, c-format
 msgid "pack has bad object at offset %lu: %s"
 msgstr "Paket hat ein ungültiges Objekt bei Versatz %lu: %s"
 
-#: builtin/index-pack.c:468
+#: builtin/index-pack.c:471
 #, c-format
 msgid "inflate returned %d"
 msgstr "Dekomprimierung gab %d zurück"
 
-#: builtin/index-pack.c:517
+#: builtin/index-pack.c:520
 msgid "offset value overflow for delta base object"
 msgstr "Wert für Versatz bei Differenzobjekt übergelaufen"
 
-#: builtin/index-pack.c:525
+#: builtin/index-pack.c:528
 msgid "delta base offset is out of bound"
 msgstr ""
 "Wert für Versatz bei Differenzobjekt liegt außerhalb des gültigen Bereichs"
 
-#: builtin/index-pack.c:533
+#: builtin/index-pack.c:536
 #, c-format
 msgid "unknown object type %d"
 msgstr "Unbekannter Objekt-Typ %d"
 
-#: builtin/index-pack.c:564
+#: builtin/index-pack.c:567
 msgid "cannot pread pack file"
 msgstr "Kann Paketdatei %s nicht lesen"
 
-#: builtin/index-pack.c:566
+#: builtin/index-pack.c:569
 #, c-format
 msgid "premature end of pack file, %lu byte missing"
 msgid_plural "premature end of pack file, %lu bytes missing"
 msgstr[0] "frühzeitiges Ende der Paketdatei, vermisse %lu Byte"
 msgstr[1] "frühzeitiges Ende der Paketdatei, vermisse %lu Bytes"
 
-#: builtin/index-pack.c:592
+#: builtin/index-pack.c:595
 msgid "serious inflate inconsistency"
 msgstr "ernsthafte Inkonsistenz nach Dekomprimierung"
 
-#: builtin/index-pack.c:683 builtin/index-pack.c:689 builtin/index-pack.c:712
-#: builtin/index-pack.c:746 builtin/index-pack.c:755
+#: builtin/index-pack.c:686 builtin/index-pack.c:692 builtin/index-pack.c:715
+#: builtin/index-pack.c:749 builtin/index-pack.c:758
 #, c-format
 msgid "SHA1 COLLISION FOUND WITH %s !"
 msgstr "SHA1 KOLLISION MIT %s GEFUNDEN !"
 
-#: builtin/index-pack.c:686 builtin/pack-objects.c:161
-#: builtin/pack-objects.c:253
+#: builtin/index-pack.c:689 builtin/pack-objects.c:164
+#: builtin/pack-objects.c:256
 #, c-format
 msgid "unable to read %s"
 msgstr "kann %s nicht lesen"
 
-#: builtin/index-pack.c:752
+#: builtin/index-pack.c:755
 #, c-format
 msgid "cannot read existing object %s"
 msgstr "Kann existierendes Objekt %s nicht lesen."
 
-#: builtin/index-pack.c:766
+#: builtin/index-pack.c:769
 #, c-format
 msgid "invalid blob object %s"
 msgstr "ungültiges Blob-Objekt %s"
 
-#: builtin/index-pack.c:780
+#: builtin/index-pack.c:783
 #, c-format
 msgid "invalid %s"
 msgstr "Ungültiger Objekt-Typ %s"
 
-#: builtin/index-pack.c:784
+#: builtin/index-pack.c:787
 msgid "Error in object"
 msgstr "Fehler in Objekt"
 
-#: builtin/index-pack.c:786
+#: builtin/index-pack.c:789
 #, c-format
 msgid "Not all child objects of %s are reachable"
 msgstr "Nicht alle Kind-Objekte von %s sind erreichbar"
 
-#: builtin/index-pack.c:858 builtin/index-pack.c:887
+#: builtin/index-pack.c:861 builtin/index-pack.c:890
 msgid "failed to apply delta"
 msgstr "Konnte Dateiunterschied nicht anwenden"
 
-#: builtin/index-pack.c:1052
+#: builtin/index-pack.c:1055
 msgid "Receiving objects"
 msgstr "Empfange Objekte"
 
-#: builtin/index-pack.c:1052
+#: builtin/index-pack.c:1055
 msgid "Indexing objects"
 msgstr "Indiziere Objekte"
 
-#: builtin/index-pack.c:1078
+#: builtin/index-pack.c:1081
 msgid "pack is corrupted (SHA1 mismatch)"
 msgstr "Paket ist beschädigt (SHA1 unterschiedlich)"
 
-#: builtin/index-pack.c:1083
+#: builtin/index-pack.c:1086
 msgid "cannot fstat packfile"
 msgstr "kann Paketdatei nicht lesen"
 
-#: builtin/index-pack.c:1086
+#: builtin/index-pack.c:1089
 msgid "pack has junk at the end"
 msgstr "Paketende enthält nicht verwendbaren Inhalt"
 
-#: builtin/index-pack.c:1097
+#: builtin/index-pack.c:1100
 msgid "confusion beyond insanity in parse_pack_objects()"
 msgstr "Fehler beim Ausführen von \"parse_pack_objects()\""
 
-#: builtin/index-pack.c:1120
+#: builtin/index-pack.c:1123
 msgid "Resolving deltas"
 msgstr "Löse Unterschiede auf"
 
-#: builtin/index-pack.c:1130
+#: builtin/index-pack.c:1133
 #, c-format
 msgid "unable to create thread: %s"
 msgstr "kann Thread nicht erzeugen: %s"
 
-#: builtin/index-pack.c:1172
+#: builtin/index-pack.c:1175
 msgid "confusion beyond insanity"
 msgstr "Fehler beim Auflösen der Unterschiede"
 
-#: builtin/index-pack.c:1178
+#: builtin/index-pack.c:1181
 #, c-format
 msgid "completed with %d local objects"
 msgstr "abgeschlossen mit %d lokalen Objekten"
 
-#: builtin/index-pack.c:1188
+#: builtin/index-pack.c:1191
 #, c-format
 msgid "Unexpected tail checksum for %s (disk corruption?)"
 msgstr "Unerwartete Prüfsumme für %s (Festplattenfehler?)"
 
-#: builtin/index-pack.c:1192
+#: builtin/index-pack.c:1195
 #, c-format
 msgid "pack has %d unresolved delta"
 msgid_plural "pack has %d unresolved deltas"
 msgstr[0] "Paket hat %d unaufgelöste Unterschied"
 msgstr[1] "Paket hat %d unaufgelöste Unterschiede"
 
-#: builtin/index-pack.c:1217
+#: builtin/index-pack.c:1220
 #, c-format
 msgid "unable to deflate appended object (%d)"
 msgstr "Konnte angehängtes Objekt (%d) nicht komprimieren"
 
-#: builtin/index-pack.c:1296
+#: builtin/index-pack.c:1299
 #, c-format
 msgid "local object %s is corrupt"
 msgstr "lokales Objekt %s ist beschädigt"
 
-#: builtin/index-pack.c:1320
+#: builtin/index-pack.c:1323
 msgid "error while closing pack file"
 msgstr "Fehler beim Schließen der Paketdatei"
 
-#: builtin/index-pack.c:1333
+#: builtin/index-pack.c:1336
 #, c-format
 msgid "cannot write keep file '%s'"
 msgstr "Kann Paketbeschreibungsdatei '%s' nicht schreiben"
 
-#: builtin/index-pack.c:1341
+#: builtin/index-pack.c:1344
 #, c-format
 msgid "cannot close written keep file '%s'"
 msgstr "Kann eben erstellte Paketbeschreibungsdatei '%s' nicht schließen"
 
-#: builtin/index-pack.c:1354
+#: builtin/index-pack.c:1357
 msgid "cannot store pack file"
 msgstr "Kann Paketdatei nicht speichern"
 
-#: builtin/index-pack.c:1365
+#: builtin/index-pack.c:1368
 msgid "cannot store index file"
 msgstr "Kann Indexdatei nicht speichern"
 
-#: builtin/index-pack.c:1398
+#: builtin/index-pack.c:1401
 #, c-format
 msgid "bad pack.indexversion=%<PRIu32>"
 msgstr "\"pack.indexversion=%<PRIu32>\" ist ungültig"
 
-#: builtin/index-pack.c:1404
+#: builtin/index-pack.c:1407
 #, c-format
 msgid "invalid number of threads specified (%d)"
 msgstr "ungültige Anzahl von Threads angegeben (%d)"
 
-#: builtin/index-pack.c:1408 builtin/index-pack.c:1587
+#: builtin/index-pack.c:1411 builtin/index-pack.c:1590
 #, c-format
 msgid "no threads support, ignoring %s"
 msgstr "keine Unterstützung von Threads, '%s' wird ignoriert"
 
-#: builtin/index-pack.c:1466
+#: builtin/index-pack.c:1469
 #, c-format
 msgid "Cannot open existing pack file '%s'"
 msgstr "Kann existierende Paketdatei '%s' nicht öffnen"
 
-#: builtin/index-pack.c:1468
+#: builtin/index-pack.c:1471
 #, c-format
 msgid "Cannot open existing pack idx file for '%s'"
 msgstr "Kann existierende Indexdatei für Paket '%s' nicht öffnen"
 
-#: builtin/index-pack.c:1515
+#: builtin/index-pack.c:1518
 #, c-format
 msgid "non delta: %d object"
 msgid_plural "non delta: %d objects"
 msgstr[0] "kein Unterschied: %d Objekt"
 msgstr[1] "kein Unterschied: %d Objekte"
 
-#: builtin/index-pack.c:1522
+#: builtin/index-pack.c:1525
 #, c-format
 msgid "chain length = %d: %lu object"
 msgid_plural "chain length = %d: %lu objects"
 msgstr[0] "Länge der Objekt-Liste = %d: %lu Objekt"
 msgstr[1] "Länge der Objekt-Liste = %d: %lu Objekte"
 
-#: builtin/index-pack.c:1551
+#: builtin/index-pack.c:1554
 msgid "Cannot come back to cwd"
 msgstr "Kann nicht zurück zu Arbeitsverzeichnis wechseln"
 
-#: builtin/index-pack.c:1599 builtin/index-pack.c:1602
-#: builtin/index-pack.c:1614 builtin/index-pack.c:1618
+#: builtin/index-pack.c:1602 builtin/index-pack.c:1605
+#: builtin/index-pack.c:1617 builtin/index-pack.c:1621
 #, c-format
 msgid "bad %s"
 msgstr "%s ist ungültig"
 
-#: builtin/index-pack.c:1632
+#: builtin/index-pack.c:1635
 msgid "--fix-thin cannot be used without --stdin"
 msgstr "Die Option --fix-thin kann nicht ohne --stdin verwendet werden."
 
-#: builtin/index-pack.c:1636 builtin/index-pack.c:1645
+#: builtin/index-pack.c:1639 builtin/index-pack.c:1648
 #, c-format
 msgid "packfile name '%s' does not end with '.pack'"
 msgstr "Name der Paketdatei '%s' endet nicht mit '.pack'"
 
-#: builtin/index-pack.c:1653
+#: builtin/index-pack.c:1656
 msgid "--verify with no packfile name given"
 msgstr "Die Option --verify wurde ohne Namen der Paketdatei angegeben."
 
@@ -6521,11 +6529,11 @@ msgstr " gemeinsames"
 
 #: 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=<Vorlagenverzeichnis>] [--shared"
-"[=<Berechtigungen>]] [Verzeichnis]"
+"git init [-q | --quiet] [--bare] [--template=<Vorlagenverzeichnis>] [--"
+"shared[=<Berechtigungen>]] [Verzeichnis]"
 
 #: builtin/init-db.c:490
 msgid "permissions"
@@ -6535,7 +6543,7 @@ msgstr "Berechtigungen"
 msgid "specify that the git repository is to be shared amongst several users"
 msgstr "angeben, dass das Git-Repository mit mehreren Benutzern geteilt wird"
 
-#: builtin/init-db.c:493 builtin/prune-packed.c:80 builtin/repack.c:172
+#: builtin/init-db.c:493 builtin/prune-packed.c:57 builtin/repack.c:172
 msgid "be quiet"
 msgstr "weniger Ausgaben"
 
@@ -6884,7 +6892,7 @@ msgstr ""
 
 #: builtin/ls-files.c:462
 msgid "show cached files in the output (default)"
-msgstr "zwischengespeicherten Dateien in der Ausgabe anzeigen (Standard)"
+msgstr "zwischengespeicherte Dateien in der Ausgabe anzeigen (Standard)"
 
 #: builtin/ls-files.c:464
 msgid "show deleted files in the output"
@@ -6905,15 +6913,15 @@ msgstr "ignorierte Dateien in der Ausgabe anzeigen"
 #: builtin/ls-files.c:473
 msgid "show staged contents' object name in the output"
 msgstr ""
-"Objektnamen von Inhalten, die zum Commit vorgemerkt sind, in der "
-"Ausgabe anzeigen"
+"Objektnamen von Inhalten, die zum Commit vorgemerkt sind, in der Ausgabe "
+"anzeigen"
 
 #: builtin/ls-files.c:475
 msgid "show files on the filesystem that need to be removed"
 msgstr "Dateien im Dateisystem, die gelöscht werden müssen, anzeigen"
 
 #: builtin/ls-files.c:477
-msgid "show 'other' directories' name only"
+msgid "show 'other' directories' names only"
 msgstr "nur Namen von 'sonstigen' Verzeichnissen anzeigen"
 
 #: builtin/ls-files.c:480
@@ -7052,8 +7060,8 @@ msgstr "(Synonym für --stat)"
 #: builtin/merge.c:198
 msgid "add (at most <n>) entries from shortlog to merge commit message"
 msgstr ""
-"(höchstens <n>) Einträge von \"shortlog\" zur Beschreibung des Merge-"
-"Commits hinzufügen"
+"(höchstens <n>) Einträge von \"shortlog\" zur Beschreibung des Merge-Commits "
+"hinzufügen"
 
 #: builtin/merge.c:201
 msgid "create a single commit instead of doing a merge"
@@ -7552,7 +7560,7 @@ msgstr "%s, Quelle=%s, Ziel=%s"
 msgid "Renaming %s to %s\n"
 msgstr "Benenne %s nach %s um\n"
 
-#: builtin/mv.c:256 builtin/remote.c:726 builtin/repack.c:357
+#: builtin/mv.c:256 builtin/remote.c:726 builtin/repack.c:358
 #, c-format
 msgid "renaming '%s' failed"
 msgstr "Umbenennung von '%s' fehlgeschlagen"
@@ -7842,8 +7850,8 @@ msgstr "Objekte von der Standard-Eingabe lesen"
 #: builtin/notes.c:491
 msgid "load rewriting config for <command> (implies --stdin)"
 msgstr ""
-"Konfiguration für <Kommando> beim Umschreiben von Versionen laden (impliziert "
-"--stdin)"
+"Konfiguration für <Kommando> beim Umschreiben von Versionen laden "
+"(impliziert --stdin)"
 
 #: builtin/notes.c:509
 msgid "too few parameters"
@@ -7932,190 +7940,197 @@ msgstr "Notizen von <Notiz-Referenz> verwenden"
 msgid "Unknown subcommand: %s"
 msgstr "Unbekanntes Unterkommando: %s"
 
-#: builtin/pack-objects.c:25
+#: builtin/pack-objects.c:28
 msgid "git pack-objects --stdout [options...] [< ref-list | < object-list]"
 msgstr ""
 "git pack-objects --stdout [Optionen...] [< Referenzliste | < Objektliste]"
 
-#: builtin/pack-objects.c:26
+#: builtin/pack-objects.c:29
 msgid "git pack-objects [options...] base-name [< ref-list | < object-list]"
 msgstr ""
 "git pack-objects [Optionen...] Basis-Name [< Referenzliste | < Objektliste]"
 
-#: builtin/pack-objects.c:174 builtin/pack-objects.c:177
+#: builtin/pack-objects.c:177 builtin/pack-objects.c:180
 #, c-format
 msgid "deflate error (%d)"
 msgstr "Fehler beim Komprimieren (%d)"
 
-#: builtin/pack-objects.c:770
+#: builtin/pack-objects.c:773
 msgid "Writing objects"
 msgstr "Schreibe Objekte"
 
-#: builtin/pack-objects.c:1011
+#: builtin/pack-objects.c:1015
 msgid "disabling bitmap writing, as some objects are not being packed"
 msgstr ""
 "Deaktiviere Schreiben des Bitmap-Index, da einige Objekte nicht in\n"
 "eine Pack-Datei geschrieben wurden"
 
-#: builtin/pack-objects.c:2173
+#: builtin/pack-objects.c:2175
 msgid "Compressing objects"
 msgstr "Komprimiere Objekte"
 
-#: builtin/pack-objects.c:2526
+#: builtin/pack-objects.c:2572
 #, c-format
 msgid "unsupported index version %s"
 msgstr "Nicht unterstützte Staging-Area-Version %s"
 
-#: builtin/pack-objects.c:2530
+#: builtin/pack-objects.c:2576
 #, c-format
 msgid "bad index version '%s'"
 msgstr "Ungültige Staging-Area-Version '%s'"
 
-#: builtin/pack-objects.c:2553
+#: builtin/pack-objects.c:2599
 #, c-format
 msgid "option %s does not accept negative form"
 msgstr "Option %s akzeptiert keine negative Form"
 
-#: builtin/pack-objects.c:2557
+#: builtin/pack-objects.c:2603
 #, c-format
 msgid "unable to parse value '%s' for option %s"
 msgstr "konnte Wert '%s' für Option %s nicht parsen"
 
-#: builtin/pack-objects.c:2576
+#: builtin/pack-objects.c:2622
 msgid "do not show progress meter"
 msgstr "keine Fortschrittsanzeige anzeigen"
 
-#: builtin/pack-objects.c:2578
+#: builtin/pack-objects.c:2624
 msgid "show progress meter"
 msgstr "Fortschrittsanzeige anzeigen"
 
-#: builtin/pack-objects.c:2580
+#: builtin/pack-objects.c:2626
 msgid "show progress meter during object writing phase"
-msgstr "Forschrittsanzeige während der Phase des Schreibens der Objekte anzeigen"
+msgstr ""
+"Forschrittsanzeige während der Phase des Schreibens der Objekte anzeigen"
 
-#: builtin/pack-objects.c:2583
+#: builtin/pack-objects.c:2629
 msgid "similar to --all-progress when progress meter is shown"
 msgstr "ähnlich zu --all-progress wenn Fortschrittsanzeige darstellt wird"
 
-#: builtin/pack-objects.c:2584
+#: builtin/pack-objects.c:2630
 msgid "version[,offset]"
 msgstr "version[,offset]"
 
-#: builtin/pack-objects.c:2585
+#: builtin/pack-objects.c:2631
 msgid "write the pack index file in the specified idx format version"
 msgstr ""
 "die Index-Datei des Paketes in der angegebenen Indexformat-Version schreiben"
 
-#: builtin/pack-objects.c:2588
+#: builtin/pack-objects.c:2634
 msgid "maximum size of each output pack file"
 msgstr "maximale Größe für jede ausgegebene Paketdatei"
 
-#: builtin/pack-objects.c:2590
+#: builtin/pack-objects.c:2636
 msgid "ignore borrowed objects from alternate object store"
 msgstr "geliehene Objekte von alternativem Objektspeicher ignorieren"
 
-#: builtin/pack-objects.c:2592
+#: builtin/pack-objects.c:2638
 msgid "ignore packed objects"
 msgstr "gepackte Objekte ignorieren"
 
-#: builtin/pack-objects.c:2594
+#: builtin/pack-objects.c:2640
 msgid "limit pack window by objects"
 msgstr "Paketfenster durch Objekte begrenzen"
 
-#: builtin/pack-objects.c:2596
+#: builtin/pack-objects.c:2642
 msgid "limit pack window by memory in addition to object limit"
-msgstr "Paketfenster, zusätzlich zur Objektbegrenzung, durch Speicher begrenzen"
+msgstr ""
+"Paketfenster, zusätzlich zur Objektbegrenzung, durch Speicher begrenzen"
 
-#: builtin/pack-objects.c:2598
+#: builtin/pack-objects.c:2644
 msgid "maximum length of delta chain allowed in the resulting pack"
 msgstr ""
 "maximale Länge der erlaubten Differenzverkettung im resultierenden Paket"
 
-#: builtin/pack-objects.c:2600
+#: builtin/pack-objects.c:2646
 msgid "reuse existing deltas"
 msgstr "existierende Unterschiede wiederverwenden"
 
-#: builtin/pack-objects.c:2602
+#: builtin/pack-objects.c:2648
 msgid "reuse existing objects"
 msgstr "existierende Objekte wiederverwenden"
 
-#: builtin/pack-objects.c:2604
+#: builtin/pack-objects.c:2650
 msgid "use OFS_DELTA objects"
 msgstr "OFS_DELTA Objekte verwenden"
 
-#: builtin/pack-objects.c:2606
+#: builtin/pack-objects.c:2652
 msgid "use threads when searching for best delta matches"
 msgstr ""
-"Threads bei der Suche nach den besten Übereinstimmungen bei "
-"Unterschieden verwenden"
+"Threads bei der Suche nach den besten Übereinstimmungen bei Unterschieden "
+"verwenden"
 
-#: builtin/pack-objects.c:2608
+#: builtin/pack-objects.c:2654
 msgid "do not create an empty pack output"
 msgstr "keine leeren Pakete erzeugen"
 
-#: builtin/pack-objects.c:2610
+#: builtin/pack-objects.c:2656
 msgid "read revision arguments from standard input"
 msgstr "Argumente bezüglich Commits von der Standard-Eingabe lesen"
 
-#: builtin/pack-objects.c:2612
+#: builtin/pack-objects.c:2658
 msgid "limit the objects to those that are not yet packed"
 msgstr "die Objekte zu solchen, die noch nicht gepackt wurden, begrenzen"
 
-#: builtin/pack-objects.c:2615
+#: builtin/pack-objects.c:2661
 msgid "include objects reachable from any reference"
 msgstr "Objekte einschließen, die von jeder Referenz erreichbar sind"
 
-#: builtin/pack-objects.c:2618
+#: builtin/pack-objects.c:2664
 msgid "include objects referred by reflog entries"
 msgstr ""
 "Objekte einschließen, die von Einträgen des Reflogs referenziert werden"
 
-#: builtin/pack-objects.c:2621
+#: builtin/pack-objects.c:2667
+msgid "include objects referred to by the index"
+msgstr ""
+"Objekte einschließen, die von der Staging-Area referenziert werden"
+
+#: builtin/pack-objects.c:2670
 msgid "output pack to stdout"
 msgstr "Paket in die Standard-Ausgabe schreiben"
 
-#: builtin/pack-objects.c:2623
+#: builtin/pack-objects.c:2672
 msgid "include tag objects that refer to objects to be packed"
 msgstr "Tag-Objekte einschließen, die auf gepackte Objekte referenzieren"
 
-#: builtin/pack-objects.c:2625
+#: builtin/pack-objects.c:2674
 msgid "keep unreachable objects"
 msgstr "nicht erreichbare Objekte behalten"
 
-#: builtin/pack-objects.c:2626 parse-options.h:140
+#: builtin/pack-objects.c:2675 parse-options.h:140
 msgid "time"
 msgstr "Zeit"
 
-#: builtin/pack-objects.c:2627
+#: builtin/pack-objects.c:2676
 msgid "unpack unreachable objects newer than <time>"
 msgstr "nicht erreichbare Objekte entpacken, die neuer als <Zeit> sind"
 
-#: builtin/pack-objects.c:2630
+#: builtin/pack-objects.c:2679
 msgid "create thin packs"
 msgstr "dünnere Pakete erzeugen"
 
-#: builtin/pack-objects.c:2632
+#: builtin/pack-objects.c:2681
 msgid "ignore packs that have companion .keep file"
 msgstr "Pakete ignorieren, die .keep Dateien haben"
 
-#: builtin/pack-objects.c:2634
+#: builtin/pack-objects.c:2683
 msgid "pack compression level"
 msgstr "Komprimierungsgrad für Paketierung"
 
-#: builtin/pack-objects.c:2636
+#: builtin/pack-objects.c:2685
 msgid "do not hide commits by grafts"
-msgstr "keine künstlichen Vorgänger-Commit (\"grafts\") verbergen"
+msgstr "keine künstlichen Vorgänger-Commits (\"grafts\") verbergen"
 
-#: builtin/pack-objects.c:2638
+#: builtin/pack-objects.c:2687
 msgid "use a bitmap index if available to speed up counting objects"
 msgstr ""
 "Bitmap-Index (falls verfügbar) zur Optimierung der Objektzählung benutzen"
 
-#: builtin/pack-objects.c:2640
+#: builtin/pack-objects.c:2689
 msgid "write a bitmap index together with the pack index"
 msgstr "Bitmap-Index zusammen mit Pack-Index schreiben"
 
-#: builtin/pack-objects.c:2719
+#: builtin/pack-objects.c:2778
 msgid "Counting objects"
 msgstr "Zähle Objekte"
 
@@ -8135,7 +8150,7 @@ msgstr "lose Referenzen entfernen (Standard)"
 msgid "git prune-packed [-n|--dry-run] [-q|--quiet]"
 msgstr "git prune-packed [-n|--dry-run] [-q|--quiet]"
 
-#: builtin/prune-packed.c:49
+#: builtin/prune-packed.c:40
 msgid "Removing duplicate objects"
 msgstr "Lösche doppelte Objekte"
 
@@ -8143,15 +8158,15 @@ msgstr "Lösche doppelte Objekte"
 msgid "git prune [-n] [-v] [--expire <time>] [--] [<head>...]"
 msgstr "git prune [-n] [-v] [--expire <Zeit>] [--] [<head>...]"
 
-#: builtin/prune.c:142
+#: builtin/prune.c:106
 msgid "do not remove, show only"
 msgstr "nicht löschen, nur anzeigen"
 
-#: builtin/prune.c:143
+#: builtin/prune.c:107
 msgid "report pruned objects"
 msgstr "gelöschte Objekte melden"
 
-#: builtin/prune.c:146
+#: builtin/prune.c:110
 msgid "expire objects older than <time>"
 msgstr "Objekte älter als <Zeit> verfallen lassen"
 
@@ -8426,79 +8441,79 @@ msgstr "Die Option --mirror kann nicht mit Refspecs kombiniert werden."
 msgid "--all and --mirror are incompatible"
 msgstr "Die Optionen --all und --mirror sind inkompatibel."
 
-#: builtin/push.c:482
+#: builtin/push.c:493
 msgid "repository"
 msgstr "Repository"
 
-#: builtin/push.c:483
+#: builtin/push.c:494
 msgid "push all refs"
 msgstr "alle Referenzen versenden"
 
-#: builtin/push.c:484
+#: builtin/push.c:495
 msgid "mirror all refs"
 msgstr "alle Referenzen spiegeln"
 
-#: builtin/push.c:486
+#: builtin/push.c:497
 msgid "delete refs"
 msgstr "Referenzen löschen"
 
-#: builtin/push.c:487
+#: builtin/push.c:498
 msgid "push tags (can't be used with --all or --mirror)"
 msgstr "Tags versenden (kann nicht mit --all oder --mirror verwendet werden)"
 
-#: builtin/push.c:490
+#: builtin/push.c:501
 msgid "force updates"
 msgstr "Aktualisierung erzwingen"
 
-#: builtin/push.c:492
+#: builtin/push.c:503
 msgid "refname>:<expect"
 msgstr "Referenzname>:<Erwartungswert"
 
-#: builtin/push.c:493
+#: builtin/push.c:504
 msgid "require old value of ref to be at this value"
 msgstr "Referenz muss sich auf dem angegebenen Wert befinden"
 
-#: builtin/push.c:495
+#: builtin/push.c:506
 msgid "check"
-msgstr ""
+msgstr "check|on-demand"
 
-#: builtin/push.c:496
+#: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "rekursiven \"push\" von Submodulen steuern"
 
-#: builtin/push.c:498
+#: builtin/push.c:509
 msgid "use thin pack"
 msgstr "kleinere Pakete verwenden"
 
-#: builtin/push.c:499 builtin/push.c:500
+#: builtin/push.c:510 builtin/push.c:511
 msgid "receive pack program"
 msgstr "'receive pack' Programm"
 
-#: builtin/push.c:501
+#: builtin/push.c:512
 msgid "set upstream for git pull/status"
 msgstr "Upstream für \"git pull/status\" setzen"
 
-#: builtin/push.c:504
+#: builtin/push.c:515
 msgid "prune locally removed refs"
 msgstr "lokal gelöschte Referenzen entfernen"
 
-#: builtin/push.c:506
+#: builtin/push.c:517
 msgid "bypass pre-push hook"
 msgstr "\"pre-push hook\" umgehen"
 
-#: builtin/push.c:507
+#: builtin/push.c:518
 msgid "push missing but relevant tags"
 msgstr "fehlende, aber relevante Tags versenden"
 
-#: builtin/push.c:509
+#: builtin/push.c:520
 msgid "GPG sign the push"
 msgstr "signiert \"push\" mit GPG"
 
-#: builtin/push.c:518
+#: builtin/push.c:529
 msgid "--delete is incompatible with --all, --mirror and --tags"
 msgstr "Die Option --delete ist inkompatibel mit --all, --mirror und --tags."
 
-#: builtin/push.c:520
+#: builtin/push.c:531
 msgid "--delete doesn't make sense without any refs"
 msgstr "Die Option --delete kann nur mit Referenzen verwendet werden."
 
@@ -9164,7 +9179,7 @@ msgid "repack objects in packs marked with .keep"
 msgstr ""
 "Objekte umpacken, die sich in mit .keep markierten Pack-Dateien befinden"
 
-#: builtin/repack.c:373
+#: builtin/repack.c:374
 #, c-format
 msgid "removing '%s' failed"
 msgstr "Löschen von '%s' fehlgeschlagen"
@@ -9680,7 +9695,7 @@ msgstr "Remote-Tracking-Branches anzeigen"
 
 #: builtin/show-branch.c:653
 msgid "color '*!+-' corresponding to the branch"
-msgstr "'*!+-' entsprechend des Branches einfärgen"
+msgstr "'*!+-' entsprechend des Branches einfärben"
 
 #: builtin/show-branch.c:655
 msgid "show <n> more commits after the common ancestor"
@@ -9708,7 +9723,8 @@ msgstr "mögliche Merge-Basen anzeigen"
 
 #: builtin/show-branch.c:666
 msgid "show refs unreachable from any other ref"
-msgstr "Referenzen, die unerreichbar von allen anderen Referenzen sind, anzeigen"
+msgstr ""
+"Referenzen, die unerreichbar von allen anderen Referenzen sind, anzeigen"
 
 #: builtin/show-branch.c:668
 msgid "show commits in topological order"
@@ -9736,11 +9752,11 @@ msgstr "die <n> jüngsten Einträge im Reflog, beginnend an der Basis, anzeigen"
 
 #: 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"
@@ -9760,7 +9776,8 @@ msgstr "strengere Referenzprüfung, erfordert exakten Referenzpfad"
 
 #: builtin/show-ref.c:173 builtin/show-ref.c:175
 msgid "show the HEAD reference, even if it would be filtered out"
-msgstr "die HEAD-Referenz anzeigen, selbst wenn diese ausgefiltert werden würde"
+msgstr ""
+"die HEAD-Referenz anzeigen, selbst wenn diese ausgefiltert werden würde"
 
 #: builtin/show-ref.c:177
 msgid "dereference tags into object IDs"
@@ -10310,14 +10327,14 @@ msgstr "zwei oder mehr Entwicklungszweige zusammenführen"
 #: common-cmds.h:20
 msgid "Move or rename a file, a directory, or a symlink"
 msgstr ""
-"eine Datei, ein Verzeichnis, oder einen symbolischen "
-"Verweis verschieben oder umbenennen"
+"eine Datei, ein Verzeichnis, oder einen symbolischen Verweis verschieben "
+"oder umbenennen"
 
 #: common-cmds.h:21
 msgid "Fetch from and integrate with another repository or a local branch"
 msgstr ""
-"Objekte von einem externen Repository anfordern und sie mit einem "
-"anderen Repository oder einem lokalen Branch zusammenführen"
+"Objekte von einem externen Repository anfordern und sie mit einem anderen "
+"Repository oder einem lokalen Branch zusammenführen"
 
 #: common-cmds.h:22
 msgid "Update remote refs along with associated objects"
@@ -10371,7 +10388,9 @@ msgstr "benutze <n> Ziffern zur Anzeige von SHA-1s"
 
 #: rerere.h:27
 msgid "update the index with reused conflict resolution if possible"
-msgstr "Staging-Area, wenn möglich, mit wiederverwendeter Konfliktauflösung aktualisieren"
+msgstr ""
+"Staging-Area, wenn möglich, mit wiederverwendeter Konfliktauflösung "
+"aktualisieren"
 
 #: git-am.sh:52
 msgid "You need to set your committer info first"
index 6652be8a3c50b95902f90941215060fff178da65..fc318312e8e14eef1558ea414ebc3d823e9323c2 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -73,8 +73,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: git\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-11-01 07:46+0800\n"
-"PO-Revision-Date: 2014-11-01 16:51+0100\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 16:10+0800\n"
 "Last-Translator: Jean-Noël Avila <jn.avila@free.fr>\n"
 "Language-Team: Jean-Noël Avila <jn.avila@free.fr>\n"
 "Language: fr\n"
@@ -359,38 +359,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "Le colis exige cette référence :"
 msgstr[1] "Le colis exige ces %d références :"
 
-#: bundle.c:292
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "Impossible de créer des objets groupés"
+
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "les objets groupés ont disparu"
+
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "rev-list a disparu"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "argument non reconnu : %s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr "la référence '%s' est exclue par les options de rev-list"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "argument non reconnu : %s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "Refus de créer un colis vide."
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "Impossible de créer des objets groupés"
-
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "les objets groupés ont disparu"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "impossible de créer '%s'"
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "l'index de groupe a disparu"
 
@@ -421,7 +421,8 @@ msgstr "ligne %d de fichier de config incorrecte dans %s"
 #: config.c:587
 #, c-format
 msgid "bad numeric config value '%s' for '%s' in %s: %s"
-msgstr "valeur numérique de configuration incorrecte '%s' pour '%s' dans %s : %s"
+msgstr ""
+"valeur numérique de configuration incorrecte '%s' pour '%s' dans %s : %s"
 
 #: config.c:589
 #, c-format
@@ -454,12 +455,14 @@ msgstr "erreur inconnue pendant la lecture des fichiers de configuration"
 #: config.c:1586
 #, c-format
 msgid "unable to parse '%s' from command-line config"
-msgstr "impossible d'analyser '%s' depuis le configuration en ligne de commande"
+msgstr ""
+"impossible d'analyser '%s' depuis le configuration en ligne de commande"
 
 #: config.c:1588
 #, c-format
 msgid "bad config variable '%s' in file '%s' at line %d"
-msgstr "variable de configuration '%s' incorrecte dans le fichier '%s' à la ligne %d"
+msgstr ""
+"variable de configuration '%s' incorrecte dans le fichier '%s' à la ligne %d"
 
 #: config.c:1647
 #, c-format
@@ -1550,28 +1553,28 @@ msgstr "Impossible de créer le lien git %s"
 msgid "Could not set core.worktree in %s"
 msgstr "Impossible de paramétrer core.worktree dans %s"
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "valeur inconnue '%s' pour la clé '%s'"
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "plus d'un %s"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "symbole vide dans la ligne de fin '%s'"
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "symbole vide dans la ligne de fin '%.*s'"
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "impossible de lire le fichier d'entrée '%s'"
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "Impossible de lire depuis l'entrée standard"
 
@@ -4281,7 +4284,8 @@ msgstr ""
 "\n"
 "    git config --global --edit\n"
 "\n"
-"Après ceci, vous pouvez corriger l'identité utilisée pour cette validation avec :\n"
+"Après ceci, vous pouvez corriger l'identité utilisée pour cette validation "
+"avec :\n"
 "\n"
 "    git commit --amend --reset-author\n"
 
@@ -6000,7 +6004,9 @@ msgstr "stocker le fichier tel quel sans filtrage"
 #: builtin/hash-object.c:100
 msgid ""
 "just hash any random garbage to create corrupt objects for debugging Git"
-msgstr "juste hasher n'importe quel contenu pour créer des objets corrompus pour debugger Git"
+msgstr ""
+"juste hasher n'importe quel contenu pour créer des objets corrompus pour "
+"debugger Git"
 
 #: builtin/hash-object.c:101
 msgid "process file as it were from this path"
@@ -6574,7 +6580,9 @@ msgstr "Impossible d'accéder à l'arbre de travail '%s'"
 msgid ""
 "git interpret-trailers [--trim-empty] [(--trailer <token>[(=|:)<value>])...] "
 "[<file>...]"
-msgstr "git interpret-trailers [--trim-empty] [(--trailer <symbole>[(=|:)<valeur>])...] [<fichier>...]"
+msgstr ""
+"git interpret-trailers [--trim-empty] [(--trailer "
+"<symbole>[(=|:)<valeur>])...] [<fichier>...]"
 
 #: builtin/interpret-trailers.c:25
 msgid "trim empty trailers"
@@ -6619,7 +6627,9 @@ msgstr "décorer les options"
 
 #: builtin/log.c:133
 msgid "Process line range n,m in file, counting from 1"
-msgstr "Traiter seulement l'intervalle de lignes n,m du fichier en commençant le compte à 1"
+msgstr ""
+"Traiter seulement l'intervalle de lignes n,m du fichier en commençant le "
+"compte à 1"
 
 #: builtin/log.c:229
 #, c-format
@@ -7471,7 +7481,9 @@ msgstr "Le répertoire %s est dans l'index et pourtant aucun sous-module ?"
 
 #: builtin/mv.c:71
 msgid "Please stage your changes to .gitmodules or stash them to proceed"
-msgstr "Veuillez indexer vos modifications de .gitmodules ou les remiser pour continuer"
+msgstr ""
+"Veuillez indexer vos modifications de .gitmodules ou les remiser pour "
+"continuer"
 
 #: builtin/mv.c:89
 #, c-format
@@ -8460,10 +8472,6 @@ msgstr "nom de référence>:<attendu"
 msgid "require old value of ref to be at this value"
 msgstr "exiger que l'ancienne valeur de la référence soit à cette valeur"
 
-#: builtin/push.c:506
-msgid "check"
-msgstr "check"
-
 #: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "contrôler la poussée récursive des sous-modules"
@@ -10366,7 +10374,8 @@ msgstr "utiliser <n> chiffres pour afficher les SHA-1s"
 
 #: rerere.h:27
 msgid "update the index with reused conflict resolution if possible"
-msgstr "met à jour l'index avec les résolutions de conflit réutilisées si possible"
+msgstr ""
+"met à jour l'index avec les résolutions de conflit réutilisées si possible"
 
 #: git-am.sh:52
 msgid "You need to set your committer info first"
@@ -10714,7 +10723,8 @@ msgid ""
 "as appropriate to mark resolution and make a commit."
 msgstr ""
 "Le tirage n'est pas possible car vous avez des fichiers non fusionnés.\n"
-"Veuillez les corriger dans votre copie de travail, utiliser alors 'git add/rm <fichier>'\n"
+"Veuillez les corriger dans votre copie de travail, utiliser alors 'git add/"
+"rm <fichier>'\n"
 "si nécessaire pour marquer comme résolu et valider."
 
 #: git-pull.sh:25
index 2d4608f6e084bf3400a3660f970363b79ecf991e..ee91402e63d0ef84abd61f5255cc938d2cea4047 100644 (file)
@@ -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: 2014-11-01 07:46+0800\n"
+"POT-Creation-Date: 2014-11-20 09:42+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"
@@ -270,38 +270,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] ""
 msgstr[1] ""
 
-#: bundle.c:292
-msgid "rev-list died"
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
 msgstr ""
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
+#: bundle.c:269
+msgid "pack-objects died"
 msgstr ""
 
-#: bundle.c:333
-#, c-format
-msgid "ref '%s' is excluded by the rev-list options"
+#: bundle.c:309
+msgid "rev-list died"
 msgstr ""
 
-#: bundle.c:378
-msgid "Refusing to create empty bundle."
+#: bundle.c:358
+#, c-format
+msgid "ref '%s' is excluded by the rev-list options"
 msgstr ""
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
 msgstr ""
 
-#: bundle.c:411
-msgid "pack-objects died"
+#: bundle.c:444
+msgid "Refusing to create empty bundle."
 msgstr ""
 
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr ""
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr ""
 
@@ -1393,28 +1393,28 @@ msgstr ""
 msgid "Could not set core.worktree in %s"
 msgstr ""
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr ""
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr ""
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
+msgid "empty trailer token in trailer '%.*s'"
 msgstr ""
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr ""
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr ""
 
index 443f00b0842d3f8d11f9243f4f08ac940413c6fa..d601027810fe9ece99e861fa7db54d1b84cbe728 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: git 2.0.0\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-11-01 07:46+0800\n"
-"PO-Revision-Date: 2014-11-01 20:10+0100\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 16:10+0800\n"
 "Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
 "Language: sv\n"
@@ -285,38 +285,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "Paketet (bundlen) kräver denna referens:"
 msgstr[1] "Paketet (bundlen) kräver dessa %d referenser:"
 
-#: bundle.c:292
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "Kunde inte starta pack-objects"
+
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "pack-objects misslyckades"
+
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "rev-list dog"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "okänt argument: %s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr "referensen \"%s\" exkluderas av argumenten till rev-list"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "okänt argument: %s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "Vägrar skapa ett tomt paket (bundle)."
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "Kunde inte starta pack-objects"
-
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "pack-objects misslyckades"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "kan inte skapa \"%s\""
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "index-pack dog"
 
@@ -1459,28 +1459,28 @@ msgstr "Kunde inte skapa gitlänk %s"
 msgid "Could not set core.worktree in %s"
 msgstr "Kunde inte sätta core.worktree i %s"
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "okänt värde \"%s\" för nyckeln \"%s\""
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "mer än en %s"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "tom släpradssymbol i släpraden \"%s\""
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "tom släpradssymbol i släpraden \"%.*s\""
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "kunde inte läsa indatafilen \"%s\""
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "Kunde inte läsa från standard in"
 
@@ -6358,11 +6358,11 @@ msgstr " delat"
 
 #: 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=<mallkatalog>] [--shared"
-"[=<behörigheter>]] [katalog]"
+"git init [-q | --quiet] [--bare] [--template=<mallkatalog>] [--"
+"shared[=<behörigheter>]] [katalog]"
 
 #: builtin/init-db.c:490
 msgid "permissions"
@@ -6405,8 +6405,8 @@ msgid ""
 "git interpret-trailers [--trim-empty] [(--trailer <token>[(=|:)<value>])...] "
 "[<file>...]"
 msgstr ""
-"git interpret-trailers [--trim-empty] [(--trailer <symbol>[(=|:)"
-"<värde>])...] [<fil>...]"
+"git interpret-trailers [--trim-empty] [(--trailer "
+"<symbol>[(=|:)<värde>])...] [<fil>...]"
 
 #: builtin/interpret-trailers.c:25
 msgid "trim empty trailers"
@@ -8245,10 +8245,6 @@ msgstr "refnamn>:<förvänta"
 msgid "require old value of ref to be at this value"
 msgstr "kräv att ref:s tidigare värde är detta"
 
-#: builtin/push.c:506
-msgid "check"
-msgstr "kontrollera"
-
 #: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "styr rekursiv insändning av undermoduler"
@@ -9497,11 +9493,11 @@ msgstr "visa <n> nyaste refloggposter med början på bas"
 
 #: 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] [--] [mönster*] "
+"git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--"
+"hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [mönster*] "
 
 #: builtin/show-ref.c:11
 msgid "git show-ref --exclude-existing[=pattern] < ref-list"
index f4a7468b707b3f5eac67e60d31e275de108277f7..14306667caf91c998d6125f31acbc43fbd89d5fe 100644 (file)
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: git v2.2.0\n"
 "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-11-01 07:46+0800\n"
-"PO-Revision-Date: 2014-11-01 09:05+0700\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 16:10+0800\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"
@@ -292,38 +292,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "Lệnh bundle yêu cầu tham chiếu này:"
 msgstr[1] "Lệnh bundle yêu cầu %d tham chiếu này:"
 
-#: bundle.c:292
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "Không thể sản sinh đối tượng gói"
+
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "đối tượng gói đã chết"
+
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "rev-list đã chết"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "đối số không được thừa nhận: %s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr "th.chiếu “%s” bị loại trừ bởi các tùy chọn rev-list"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "đối số không được thừa nhận: %s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "Từ chối tạo một bundle trống rỗng."
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "Không thể sản sinh đối tượng gói"
-
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "đối tượng gói đã chết"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "không thể tạo “%s”"
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "mục lục gói đã chết"
 
@@ -1482,28 +1482,28 @@ msgstr "Không thể tạo liên kết git “%s”"
 msgid "Could not set core.worktree in %s"
 msgstr "Không thể đặt “core.worktree” trong “%s”."
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "không hiểu giá trị “%s” cho khóa “%s”"
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "nhiều hơn một %s"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "thẻ thừa trống rỗng trong phần thừa “%s”"
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "thẻ thừa trống rỗng trong phần thừa “%.*s”"
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "không đọc được tập tin đầu vào “%s”"
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "không thể đọc từ đầu vào tiêu chuẩn"
 
@@ -8368,10 +8368,6 @@ msgstr "tên-tham-chiếu>:<cần"
 msgid "require old value of ref to be at this value"
 msgstr "yêu cầu giá-trị cũ của tham chiếu thì là giá-trị này"
 
-#: builtin/push.c:506
-msgid "check"
-msgstr "kiểm tra"
-
 #: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "điều khiển việc đẩy lên (push) đệ qui của mô-đun-con"
index abe5f9f2818f4f17f3f944ae06c5494c45537e87..4b0e9eeaa687b2eca2d739c7e3e34c4e55b44749 100644 (file)
@@ -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: 2014-11-01 07:46+0800\n"
-"PO-Revision-Date: 2014-11-02 10:58+0800\n"
+"POT-Creation-Date: 2014-11-20 09:42+0800\n"
+"PO-Revision-Date: 2014-11-20 16:10+0800\n"
 "Last-Translator: Jiang Xin <worldhello.net@gmail.com>\n"
 "Language-Team: GitHub <https://github.com/gotgit/git/>\n"
 "Language: zh_CN\n"
@@ -285,38 +285,38 @@ msgid_plural "The bundle requires these %d refs:"
 msgstr[0] "这个包需要这个引用:"
 msgstr[1] "这个包需要 %d 个引用:"
 
-#: bundle.c:292
+#: bundle.c:251
+msgid "Could not spawn pack-objects"
+msgstr "不能生成 pack-objects 进程"
+
+#: bundle.c:269
+msgid "pack-objects died"
+msgstr "pack-objects 终止"
+
+#: bundle.c:309
 msgid "rev-list died"
 msgstr "rev-list 终止"
 
-#: bundle.c:298 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "未能识别的参数:%s"
-
-#: bundle.c:333
+#: bundle.c:358
 #, c-format
 msgid "ref '%s' is excluded by the rev-list options"
 msgstr "引用 '%s' 被 rev-list 选项排除"
 
-#: bundle.c:378
+#: bundle.c:438 builtin/log.c:153 builtin/log.c:1342 builtin/shortlog.c:261
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "未能识别的参数:%s"
+
+#: bundle.c:444
 msgid "Refusing to create empty bundle."
 msgstr "不能创建空包。"
 
-#: bundle.c:393
-msgid "Could not spawn pack-objects"
-msgstr "不能生成 pack-objects 进程"
-
-#: bundle.c:411
-msgid "pack-objects died"
-msgstr "pack-objects 终止"
-
-#: bundle.c:414
+#: bundle.c:454
 #, c-format
 msgid "cannot create '%s'"
 msgstr "不能创建 '%s'"
 
-#: bundle.c:435
+#: bundle.c:475
 msgid "index-pack died"
 msgstr "index-pack 终止"
 
@@ -1455,28 +1455,28 @@ msgstr "不能创建 git link %s"
 msgid "Could not set core.worktree in %s"
 msgstr "不能在 %s 中设置 core.worktree"
 
-#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
-#: trailer.c:570
+#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
+#: trailer.c:569
 #, c-format
 msgid "unknown value '%s' for key '%s'"
 msgstr "键 '%2$s' 的未知取值 '%1$s'"
 
-#: trailer.c:552 trailer.c:557 builtin/remote.c:288
+#: trailer.c:551 trailer.c:556 builtin/remote.c:288
 #, c-format
 msgid "more than one %s"
 msgstr "多于一个 %s"
 
-#: trailer.c:587
+#: trailer.c:589
 #, c-format
-msgid "empty trailer token in trailer '%s'"
-msgstr "签名 '%s' 的键为空"
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "签名 '%.*s' 的键为空"
 
-#: trailer.c:706
+#: trailer.c:709
 #, c-format
 msgid "could not read input file '%s'"
 msgstr "不能读取输入文件 '%s'"
 
-#: trailer.c:709
+#: trailer.c:712
 msgid "could not read from stdin"
 msgstr "不能自标准输入读取"
 
@@ -8191,10 +8191,6 @@ msgstr "引用名>:<期望值"
 msgid "require old value of ref to be at this value"
 msgstr "要求引用旧的取值为设定值"
 
-#: builtin/push.c:506
-msgid "check"
-msgstr "检查"
-
 #: builtin/push.c:507
 msgid "control recursive pushing of submodules"
 msgstr "控制子模组的递归推送"
index 8f3e9eb31498d708acf63bf3fc6de3d34562d42e..9cff715d6b669ecf05f861bc553b61d20d04191d 100644 (file)
@@ -17,6 +17,7 @@
 #include "varint.h"
 #include "split-index.h"
 #include "sigchain.h"
+#include "utf8.h"
 
 static struct cache_entry *refresh_cache_entry(struct cache_entry *ce,
                                               unsigned int options);
@@ -776,9 +777,10 @@ static int verify_dotfile(const char *rest)
         * shares the path end test with the ".." case.
         */
        case 'g':
-               if (rest[1] != 'i')
+       case 'G':
+               if (rest[1] != 'i' && rest[1] != 'I')
                        break;
-               if (rest[2] != 't')
+               if (rest[2] != 't' && rest[2] != 'T')
                        break;
                rest += 2;
        /* fallthrough */
@@ -802,6 +804,10 @@ int verify_path(const char *path)
                        return 1;
                if (is_dir_sep(c)) {
 inside:
+                       if (protect_hfs && is_hfs_dotgit(path))
+                               return 0;
+                       if (protect_ntfs && is_ntfs_dotgit(path))
+                               return 0;
                        c = *path++;
                        if ((c == '.' && !verify_dotfile(path)) ||
                            is_dir_sep(c) || c == '\0')
index a03d4fa2521fbc119a8d6b471b9e3c1046610b84..77a1266760718b8e5b029636409634e241981888 100644 (file)
@@ -267,6 +267,23 @@ static int fast_forward_to(const unsigned char *to, const unsigned char *from,
        return 0;
 }
 
+void append_conflicts_hint(struct strbuf *msgbuf)
+{
+       int i;
+
+       strbuf_addch(msgbuf, '\n');
+       strbuf_commented_addf(msgbuf, "Conflicts:\n");
+       for (i = 0; i < active_nr;) {
+               const struct cache_entry *ce = active_cache[i++];
+               if (ce_stage(ce)) {
+                       strbuf_commented_addf(msgbuf, "\t%s\n", ce->name);
+                       while (i < active_nr && !strcmp(ce->name,
+                                                       active_cache[i]->name))
+                               i++;
+               }
+       }
+}
+
 static int do_recursive_merge(struct commit *base, struct commit *next,
                              const char *base_label, const char *next_label,
                              unsigned char *head, struct strbuf *msgbuf,
@@ -307,21 +324,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
        if (opts->signoff)
                append_signoff(msgbuf, 0, 0);
 
-       if (!clean) {
-               int i;
-               strbuf_addstr(msgbuf, "\nConflicts:\n");
-               for (i = 0; i < active_nr;) {
-                       const struct cache_entry *ce = active_cache[i++];
-                       if (ce_stage(ce)) {
-                               strbuf_addch(msgbuf, '\t');
-                               strbuf_addstr(msgbuf, ce->name);
-                               strbuf_addch(msgbuf, '\n');
-                               while (i < active_nr && !strcmp(ce->name,
-                                               active_cache[i]->name))
-                                       i++;
-                       }
-               }
-       }
+       if (!clean)
+               append_conflicts_hint(msgbuf);
 
        return !clean;
 }
index db43e9cf86dcc0914a674adca63303c44e2ccc24..5ed5cb1d97ced70a9ebffd1dad524a12e7f7810a 100644 (file)
@@ -53,5 +53,6 @@ int sequencer_pick_revisions(struct replay_opts *opts);
 extern const char sign_off_header[];
 
 void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
+void append_conflicts_hint(struct strbuf *msgbuf);
 
 #endif
index e62c0ffbc22cffffd9c29254a96222bfb5b85633..7de8d85ee85e2387463e8d98175c9d8f66ca8959 100755 (executable)
@@ -12,6 +12,13 @@ check_config () {
                echo "expected a directory $1, a file $1/config and $1/refs"
                return 1
        fi
+
+       if test_have_prereq POSIXPERM && test -x "$1/config"
+       then
+               echo "$1/config is executable?"
+               return 1
+       fi
+
        bare=$(cd "$1" && git config --bool core.bare)
        worktree=$(cd "$1" && git config core.worktree) ||
        worktree=unset
index 158cf4f03b63cf4eb61901dd1e178b3d1d08467a..067f4c6e52abe86e952367d8cf576a80aa5139bd 100755 (executable)
@@ -131,7 +131,7 @@ test_expect_success 'second commit has cache-tree' '
        test_cache_tree
 '
 
-test_expect_success 'commit --interactive gives cache-tree on partial commit' '
+test_expect_success PERL 'commit --interactive gives cache-tree on partial commit' '
        cat <<-\EOT >foo.c &&
        int foo()
        {
diff --git a/t/t1014-read-tree-confusing.sh b/t/t1014-read-tree-confusing.sh
new file mode 100755 (executable)
index 0000000..2f5a25d
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+test_description='check that read-tree rejects confusing paths'
+. ./test-lib.sh
+
+test_expect_success 'create base tree' '
+       echo content >file &&
+       git add file &&
+       git commit -m base &&
+       blob=$(git rev-parse HEAD:file) &&
+       tree=$(git rev-parse HEAD^{tree})
+'
+
+test_expect_success 'enable core.protectHFS for rejection tests' '
+       git config core.protectHFS true
+'
+
+test_expect_success 'enable core.protectNTFS for rejection tests' '
+       git config core.protectNTFS true
+'
+
+while read path pretty; do
+       : ${pretty:=$path}
+       case "$path" in
+       *SPACE)
+               path="${path%SPACE} "
+               ;;
+       esac
+       test_expect_success "reject $pretty at end of path" '
+               printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
+               bogus=$(git mktree <tree) &&
+               test_must_fail git read-tree $bogus
+       '
+
+       test_expect_success "reject $pretty as subtree" '
+               printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
+               bogus=$(git mktree <tree) &&
+               test_must_fail git read-tree $bogus
+       '
+done <<-EOF
+.
+..
+.git
+.GIT
+${u200c}.Git {u200c}.Git
+.gI${u200c}T .gI{u200c}T
+.GiT${u200c} .GiT{u200c}
+git~1
+.git.SPACE .git.{space}
+.\\\\.GIT\\\\foobar backslashes
+.git\\\\foobar backslashes2
+EOF
+
+test_expect_success 'utf-8 paths allowed with core.protectHFS off' '
+       test_when_finished "git read-tree HEAD" &&
+       test_config core.protectHFS false &&
+       printf "100644 blob %s\t%s" "$blob" ".gi${u200c}t" >tree &&
+       ok=$(git mktree <tree) &&
+       git read-tree $ok
+'
+
+test_done
index 019fddd4e81ed7b2103f916a634f3e85e7291017..d00b70f99deffc6a4009fcea2ef387aade68d3e6 100755 (executable)
@@ -309,36 +309,41 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
        )
 '
 
-test_expect_success 'fsck notices "." and ".." in trees' '
-       (
-               git init dots &&
-               cd dots &&
-               blob=$(echo foo | git hash-object -w --stdin) &&
-               tab=$(printf "\\t") &&
-               git mktree <<-EOF &&
-               100644 blob $blob$tab.
-               100644 blob $blob$tab..
-               EOF
-               git fsck 2>out &&
-               cat out &&
-               grep "warning.*\\." out
-       )
-'
-
-test_expect_success 'fsck notices ".git" in trees' '
-       (
-               git init dotgit &&
-               cd dotgit &&
-               blob=$(echo foo | git hash-object -w --stdin) &&
-               tab=$(printf "\\t") &&
-               git mktree <<-EOF &&
-               100644 blob $blob$tab.git
-               EOF
-               git fsck 2>out &&
-               cat out &&
-               grep "warning.*\\.git" out
-       )
-'
+while read name path pretty; do
+       while read mode type; do
+               : ${pretty:=$path}
+               test_expect_success "fsck notices $pretty as $type" '
+               (
+                       git init $name-$type &&
+                       cd $name-$type &&
+                       echo content >file &&
+                       git add file &&
+                       git commit -m base &&
+                       blob=$(git rev-parse :file) &&
+                       tree=$(git rev-parse HEAD^{tree}) &&
+                       value=$(eval "echo \$$type") &&
+                       printf "$mode $type %s\t%s" "$value" "$path" >bad &&
+                       bad_tree=$(git mktree <bad) &&
+                       git fsck 2>out &&
+                       cat out &&
+                       grep "warning.*tree $bad_tree" out
+               )'
+       done <<-\EOF
+       100644 blob
+       040000 tree
+       EOF
+done <<-EOF
+dot .
+dotdot ..
+dotgit .git
+dotgit-case .GIT
+dotgit-unicode .gI${u200c}T .gI{u200c}T
+dotgit-case2 .Git
+git-tilde1 git~1
+dotgitdot .git.
+dot-backslash-case .\\\\.GIT\\\\foobar
+dotgit-case-backslash .git\\\\foobar
+EOF
 
 # create a static test repo which is broken by omitting
 # one particular object ($1, which is looked up via rev-parse
index 8e3545d8680c5f5179977082849388b1b31c17d8..f46d0499bc6ea95236f7ca05060b8f8fbbdbbc50 100755 (executable)
@@ -61,4 +61,21 @@ test_expect_success 'do not touch unmerged entries matching $path but not in $tr
        test_cmp expect.next0 actual.next0
 '
 
+test_expect_success 'do not touch files that are already up-to-date' '
+       git reset --hard &&
+       echo one >file1 &&
+       echo two >file2 &&
+       git add file1 file2 &&
+       git commit -m base &&
+       echo modified >file1 &&
+       test-chmtime =1000000000 file2 &&
+       git update-index -q --refresh &&
+       git checkout HEAD -- file1 file2 &&
+       echo one >expect &&
+       test_cmp expect file1 &&
+       echo "1000000000        file2" >expect &&
+       test-chmtime -v +0 file2 >actual &&
+       test_cmp expect actual
+'
+
 test_done
index cfd67ff3dfc64b160bbc53318df3eb661970f2e1..245406ab979d63d3588c4e2000b02cc5f24e493b 100755 (executable)
@@ -7,28 +7,22 @@ test_description='Test commit notes'
 
 . ./test-lib.sh
 
-cat > fake_editor.sh << \EOF
-#!/bin/sh
-echo "$MSG" > "$1"
-echo "$MSG" >& 2
+write_script fake_editor <<\EOF
+echo "$MSG" >"$1"
+echo "$MSG" >&2
 EOF
-chmod a+x fake_editor.sh
-GIT_EDITOR=./fake_editor.sh
+GIT_EDITOR=./fake_editor
 export GIT_EDITOR
 
+indent="    "
+
 test_expect_success 'cannot annotate non-existing HEAD' '
        test_must_fail env MSG=3 git notes add
 '
 
-test_expect_success setup '
-       : > a1 &&
-       git add a1 &&
-       test_tick &&
-       git commit -m 1st &&
-       : > a2 &&
-       git add a2 &&
-       test_tick &&
-       git commit -m 2nd
+test_expect_success 'setup' '
+       test_commit 1st &&
+       test_commit 2nd
 '
 
 test_expect_success 'need valid notes ref' '
@@ -50,206 +44,186 @@ test_expect_success 'handle empty notes gracefully' '
 '
 
 test_expect_success 'show non-existent notes entry with %N' '
-       for l in A B
-       do
-               echo "$l"
-       done >expect &&
-       git show -s --format='A%n%NB' >output &&
-       test_cmp expect output
+       test_write_lines A B >expect &&
+       git show -s --format="A%n%NB" >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'create notes' '
-       git config core.notesRef refs/notes/commits &&
        MSG=b4 git notes add &&
-       test ! -f .git/NOTES_EDITMSG &&
-       test 1 = $(git ls-tree refs/notes/commits | wc -l) &&
-       test b4 = $(git notes show) &&
+       test_path_is_missing .git/NOTES_EDITMSG &&
+       git ls-tree -r refs/notes/commits >actual &&
+       test_line_count = 1 actual &&
+       test "b4" = "$(git notes show)" &&
        git show HEAD^ &&
        test_must_fail git notes show HEAD^
 '
 
 test_expect_success 'show notes entry with %N' '
-       for l in A b4 B
-       do
-               echo "$l"
-       done >expect &&
-       git show -s --format='A%n%NB' >output &&
-       test_cmp expect output
+       test_write_lines A b4 B >expect &&
+       git show -s --format="A%n%NB" >actual &&
+       test_cmp expect actual
 '
 
-cat >expect <<EOF
-d423f8c refs/notes/commits@{0}: notes: Notes added by 'git notes add'
-EOF
-
 test_expect_success 'create reflog entry' '
-       git reflog show refs/notes/commits >output &&
-       test_cmp expect output
+       cat <<-EOF >expect &&
+               a1d8fa6 refs/notes/commits@{0}: notes: Notes added by '\''git notes add'\''
+       EOF
+       git reflog show refs/notes/commits >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'edit existing notes' '
        MSG=b3 git notes edit &&
-       test ! -f .git/NOTES_EDITMSG &&
-       test 1 = $(git ls-tree refs/notes/commits | wc -l) &&
-       test b3 = $(git notes show) &&
+       test_path_is_missing .git/NOTES_EDITMSG &&
+       git ls-tree -r refs/notes/commits >actual &&
+       test_line_count = 1 actual &&
+       test "b3" = "$(git notes show)" &&
        git show HEAD^ &&
        test_must_fail git notes show HEAD^
 '
 
 test_expect_success 'cannot "git notes add -m" where notes already exists' '
        test_must_fail git notes add -m "b2" &&
-       test ! -f .git/NOTES_EDITMSG &&
-       test 1 = $(git ls-tree refs/notes/commits | wc -l) &&
-       test b3 = $(git notes show) &&
+       test_path_is_missing .git/NOTES_EDITMSG &&
+       git ls-tree -r refs/notes/commits >actual &&
+       test_line_count = 1 actual &&
+       test "b3" = "$(git notes show)" &&
        git show HEAD^ &&
        test_must_fail git notes show HEAD^
 '
 
 test_expect_success 'can overwrite existing note with "git notes add -f -m"' '
        git notes add -f -m "b1" &&
-       test ! -f .git/NOTES_EDITMSG &&
-       test 1 = $(git ls-tree refs/notes/commits | wc -l) &&
-       test b1 = $(git notes show) &&
+       test_path_is_missing .git/NOTES_EDITMSG &&
+       git ls-tree -r refs/notes/commits >actual &&
+       test_line_count = 1 actual &&
+       test "b1" = "$(git notes show)" &&
        git show HEAD^ &&
        test_must_fail git notes show HEAD^
 '
 
 test_expect_success 'add w/no options on existing note morphs into edit' '
        MSG=b2 git notes add &&
-       test ! -f .git/NOTES_EDITMSG &&
-       test 1 = $(git ls-tree refs/notes/commits | wc -l) &&
-       test b2 = $(git notes show) &&
+       test_path_is_missing .git/NOTES_EDITMSG &&
+       git ls-tree -r refs/notes/commits >actual &&
+       test_line_count = 1 actual &&
+       test "b2" = "$(git notes show)" &&
        git show HEAD^ &&
        test_must_fail git notes show HEAD^
 '
 
 test_expect_success 'can overwrite existing note with "git notes add -f"' '
        MSG=b1 git notes add -f &&
-       test ! -f .git/NOTES_EDITMSG &&
-       test 1 = $(git ls-tree refs/notes/commits | wc -l) &&
-       test b1 = $(git notes show) &&
+       test_path_is_missing .git/NOTES_EDITMSG &&
+       git ls-tree -r refs/notes/commits >actual &&
+       test_line_count = 1 actual &&
+       test "b1" = "$(git notes show)" &&
        git show HEAD^ &&
        test_must_fail git notes show HEAD^
 '
 
-cat > expect << EOF
-commit 268048bfb8a1fb38e703baceb8ab235421bf80c5
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:14:13 2005 -0700
-
-    2nd
+test_expect_success 'show notes' '
+       cat >expect <<-EOF &&
+               commit 7a4ca6ee52a974a66cbaa78e33214535dff1d691
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:14:13 2005 -0700
 
-Notes:
-    b1
-EOF
+               ${indent}2nd
 
-test_expect_success 'show notes' '
+               Notes:
+               ${indent}b1
+       EOF
        ! (git cat-file commit HEAD | grep b1) &&
-       git log -1 > output &&
-       test_cmp expect output
-'
-
-test_expect_success 'create multi-line notes (setup)' '
-       : > a3 &&
-       git add a3 &&
-       test_tick &&
-       git commit -m 3rd &&
-       MSG="b3
-c3c3c3c3
-d3d3d3" git notes add
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect-multiline << EOF
-commit 1584215f1d29c65e99c6c6848626553fdd07fd75
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:15:13 2005 -0700
-
-    3rd
+test_expect_success 'show multi-line notes' '
+       test_commit 3rd &&
+       MSG="b3${LF}c3c3c3c3${LF}d3d3d3" git notes add &&
+       cat >expect-multiline <<-EOF &&
+               commit d07d62e5208f22eb5695e7eb47667dc8b9860290
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:15:13 2005 -0700
 
-Notes:
-    b3
-    c3c3c3c3
-    d3d3d3
-EOF
+               ${indent}3rd
 
-printf "\n" >> expect-multiline
-cat expect >> expect-multiline
+               Notes:
+               ${indent}b3
+               ${indent}c3c3c3c3
+               ${indent}d3d3d3
 
-test_expect_success 'show multi-line notes' '
-       git log -2 > output &&
-       test_cmp expect-multiline output
-'
-test_expect_success 'create -F notes (setup)' '
-       : > a4 &&
-       git add a4 &&
-       test_tick &&
-       git commit -m 4th &&
-       echo "xyzzy" > note5 &&
-       git notes add -F note5
+       EOF
+       cat expect >>expect-multiline &&
+       git log -2 >actual &&
+       test_cmp expect-multiline actual
 '
 
-cat > expect-F << EOF
-commit 15023535574ded8b1a89052b32673f84cf9582b8
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:16:13 2005 -0700
+test_expect_success 'show -F notes' '
+       test_commit 4th &&
+       echo "xyzzy" >note5 &&
+       git notes add -F note5 &&
+       cat >expect-F <<-EOF &&
+               commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:16:13 2005 -0700
 
-    4th
+               ${indent}4th
 
-Notes:
-    xyzzy
-EOF
+               Notes:
+               ${indent}xyzzy
 
-printf "\n" >> expect-F
-cat expect-multiline >> expect-F
-
-test_expect_success 'show -F notes' '
-       git log -3 > output &&
-       test_cmp expect-F output
+       EOF
+       cat expect-multiline >>expect-F &&
+       git log -3 >actual &&
+       test_cmp expect-F actual
 '
 
 test_expect_success 'Re-adding -F notes without -f fails' '
-       echo "zyxxy" > note5 &&
+       echo "zyxxy" >note5 &&
        test_must_fail git notes add -F note5 &&
-       git log -3 > output &&
-       test_cmp expect-F output
+       git log -3 >actual &&
+       test_cmp expect-F actual
 '
 
-cat >expect << EOF
-commit 15023535574ded8b1a89052b32673f84cf9582b8
-tree e070e3af51011e47b183c33adf9736736a525709
-parent 1584215f1d29c65e99c6c6848626553fdd07fd75
-author A U Thor <author@example.com> 1112912173 -0700
-committer C O Mitter <committer@example.com> 1112912173 -0700
-
-    4th
-EOF
 test_expect_success 'git log --pretty=raw does not show notes' '
-       git log -1 --pretty=raw >output &&
-       test_cmp expect output
+       cat >expect <<-EOF &&
+               commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
+               tree 05ac65288c4c4b3b709a020ae94b2ece2f2201ae
+               parent d07d62e5208f22eb5695e7eb47667dc8b9860290
+               author A U Thor <author@example.com> 1112912173 -0700
+               committer C O Mitter <committer@example.com> 1112912173 -0700
+
+               ${indent}4th
+       EOF
+       git log -1 --pretty=raw >actual &&
+       test_cmp expect actual
 '
 
-cat >>expect <<EOF
-
-Notes:
-    xyzzy
-EOF
 test_expect_success 'git log --show-notes' '
-       git log -1 --pretty=raw --show-notes >output &&
-       test_cmp expect output
+       cat >>expect <<-EOF &&
+
+       Notes:
+       ${indent}xyzzy
+       EOF
+       git log -1 --pretty=raw --show-notes >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'git log --no-notes' '
-       git log -1 --no-notes >output &&
-       ! grep xyzzy output
+       git log -1 --no-notes >actual &&
+       ! grep xyzzy actual
 '
 
 test_expect_success 'git format-patch does not show notes' '
-       git format-patch -1 --stdout >output &&
-       ! grep xyzzy output
+       git format-patch -1 --stdout >actual &&
+       ! grep xyzzy actual
 '
 
 test_expect_success 'git format-patch --show-notes does show notes' '
-       git format-patch --show-notes -1 --stdout >output &&
-       grep xyzzy output
+       git format-patch --show-notes -1 --stdout >actual &&
+       grep xyzzy actual
 '
 
 for pretty in \
@@ -261,8 +235,8 @@ do
        ?*) p="$pretty" not=" not" negate="!" ;;
        esac
        test_expect_success "git show $pretty does$not show notes" '
-               git show $p >output &&
-               eval "$negate grep xyzzy output"
+               git show $p >actual &&
+               eval "$negate grep xyzzy actual"
        '
 done
 
@@ -271,161 +245,131 @@ test_expect_success 'setup alternate notes ref' '
 '
 
 test_expect_success 'git log --notes shows default notes' '
-       git log -1 --notes >output &&
-       grep xyzzy output &&
-       ! grep alternate output
+       git log -1 --notes >actual &&
+       grep xyzzy actual &&
+       ! grep alternate actual
 '
 
 test_expect_success 'git log --notes=X shows only X' '
-       git log -1 --notes=alternate >output &&
-       ! grep xyzzy output &&
-       grep alternate output
+       git log -1 --notes=alternate >actual &&
+       ! grep xyzzy actual &&
+       grep alternate actual
 '
 
 test_expect_success 'git log --notes --notes=X shows both' '
-       git log -1 --notes --notes=alternate >output &&
-       grep xyzzy output &&
-       grep alternate output
+       git log -1 --notes --notes=alternate >actual &&
+       grep xyzzy actual &&
+       grep alternate actual
 '
 
 test_expect_success 'git log --no-notes resets default state' '
        git log -1 --notes --notes=alternate \
                --no-notes --notes=alternate \
-               >output &&
-       ! grep xyzzy output &&
-       grep alternate output
+               >actual &&
+       ! grep xyzzy actual &&
+       grep alternate actual
 '
 
 test_expect_success 'git log --no-notes resets ref list' '
        git log -1 --notes --notes=alternate \
                --no-notes --notes \
-               >output &&
-       grep xyzzy output &&
-       ! grep alternate output
-'
-
-test_expect_success 'create -m notes (setup)' '
-       : > a5 &&
-       git add a5 &&
-       test_tick &&
-       git commit -m 5th &&
-       git notes add -m spam -m "foo
-bar
-baz"
-'
-
-whitespace="    "
-cat > expect-m << EOF
-commit bd1753200303d0a0344be813e504253b3d98e74d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:17:13 2005 -0700
-
-    5th
-
-Notes:
-    spam
-$whitespace
-    foo
-    bar
-    baz
-EOF
-
-printf "\n" >> expect-m
-cat expect-F >> expect-m
-
-test_expect_success 'show -m notes' '
-       git log -4 > output &&
-       test_cmp expect-m output
+               >actual &&
+       grep xyzzy actual &&
+       ! grep alternate actual
 '
 
-test_expect_success 'remove note with add -f -F /dev/null (setup)' '
-       git notes add -f -F /dev/null
-'
-
-cat > expect-rm-F << EOF
-commit bd1753200303d0a0344be813e504253b3d98e74d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:17:13 2005 -0700
-
-    5th
-EOF
-
-printf "\n" >> expect-rm-F
-cat expect-F >> expect-rm-F
-
-test_expect_success 'verify note removal with -F /dev/null' '
-       git log -4 > output &&
-       test_cmp expect-rm-F output &&
+test_expect_success 'show -m notes' '
+       test_commit 5th &&
+       git notes add -m spam -m "foo${LF}bar${LF}baz" &&
+       cat >expect-m <<-EOF &&
+               commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:17:13 2005 -0700
+
+               ${indent}5th
+
+               Notes:
+               ${indent}spam
+               ${indent}
+               ${indent}foo
+               ${indent}bar
+               ${indent}baz
+
+       EOF
+       cat expect-F >>expect-m &&
+       git log -4 >actual &&
+       test_cmp expect-m actual
+'
+
+test_expect_success 'remove note with add -f -F /dev/null' '
+       git notes add -f -F /dev/null &&
+       cat >expect-rm-F <<-EOF &&
+               commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:17:13 2005 -0700
+
+               ${indent}5th
+
+       EOF
+       cat expect-F >>expect-rm-F &&
+       git log -4 >actual &&
+       test_cmp expect-rm-F actual &&
        test_must_fail git notes show
 '
 
-test_expect_success 'do not create empty note with -m "" (setup)' '
-       git notes add -m ""
-'
-
-test_expect_success 'verify non-creation of note with -m ""' '
-       git log -4 > output &&
-       test_cmp expect-rm-F output &&
+test_expect_success 'do not create empty note with -m ""' '
+       git notes add -m "" &&
+       git log -4 >actual &&
+       test_cmp expect-rm-F actual &&
        test_must_fail git notes show
 '
 
-cat > expect-combine_m_and_F << EOF
-foo
-
-xyzzy
+test_expect_success 'create note with combination of -m and -F' '
+       cat >expect-combine_m_and_F <<-EOF &&
+               foo
 
-bar
+               xyzzy
 
-zyxxy
+               bar
 
-baz
-EOF
+               zyxxy
 
-test_expect_success 'create note with combination of -m and -F' '
-       echo "xyzzy" > note_a &&
-       echo "zyxxy" > note_b &&
+               baz
+       EOF
+       echo "xyzzy" >note_a &&
+       echo "zyxxy" >note_b &&
        git notes add -m "foo" -F note_a -m "bar" -F note_b -m "baz" &&
-       git notes show > output &&
-       test_cmp expect-combine_m_and_F output
+       git notes show >actual &&
+       test_cmp expect-combine_m_and_F actual
 '
 
-test_expect_success 'remove note with "git notes remove" (setup)' '
+test_expect_success 'remove note with "git notes remove"' '
        git notes remove HEAD^ &&
-       git notes remove
-'
-
-cat > expect-rm-remove << EOF
-commit bd1753200303d0a0344be813e504253b3d98e74d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:17:13 2005 -0700
+       git notes remove &&
+       cat >expect-rm-remove <<-EOF &&
+               commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:17:13 2005 -0700
 
-    5th
+               ${indent}5th
 
-commit 15023535574ded8b1a89052b32673f84cf9582b8
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:16:13 2005 -0700
+               commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:16:13 2005 -0700
 
-    4th
-EOF
-
-printf "\n" >> expect-rm-remove
-cat expect-multiline >> expect-rm-remove
+               ${indent}4th
 
-test_expect_success 'verify note removal with "git notes remove"' '
-       git log -4 > output &&
-       test_cmp expect-rm-remove output &&
+       EOF
+       cat expect-multiline >>expect-rm-remove &&
+       git log -4 >actual &&
+       test_cmp expect-rm-remove actual &&
        test_must_fail git notes show HEAD^
 '
 
-cat > expect << EOF
-c18dc024e14f08d18d14eea0d747ff692d66d6a3 1584215f1d29c65e99c6c6848626553fdd07fd75
-c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 268048bfb8a1fb38e703baceb8ab235421bf80c5
-EOF
-
 test_expect_success 'removing non-existing note should not create new commit' '
-       git rev-parse --verify refs/notes/commits > before_commit &&
+       git rev-parse --verify refs/notes/commits >before_commit &&
        test_must_fail git notes remove HEAD^ &&
-       git rev-parse --verify refs/notes/commits > after_commit &&
+       git rev-parse --verify refs/notes/commits >after_commit &&
        test_cmp before_commit after_commit
 '
 
@@ -505,70 +449,68 @@ test_expect_success 'removing with --stdin --ignore-missing' '
 '
 
 test_expect_success 'list notes with "git notes list"' '
-       git notes list > output &&
-       test_cmp expect output
+       cat >expect <<-EOF &&
+               c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 7a4ca6ee52a974a66cbaa78e33214535dff1d691
+               c18dc024e14f08d18d14eea0d747ff692d66d6a3 d07d62e5208f22eb5695e7eb47667dc8b9860290
+       EOF
+       git notes list >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'list notes with "git notes"' '
-       git notes > output &&
-       test_cmp expect output
+       git notes >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-c18dc024e14f08d18d14eea0d747ff692d66d6a3
-EOF
-
 test_expect_success 'list specific note with "git notes list <object>"' '
-       git notes list HEAD^^ > output &&
-       test_cmp expect output
+       cat >expect <<-EOF &&
+               c18dc024e14f08d18d14eea0d747ff692d66d6a3
+       EOF
+       git notes list HEAD^^ >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-EOF
-
 test_expect_success 'listing non-existing notes fails' '
-       test_must_fail git notes list HEAD > output &&
-       test_cmp expect output
+       cat >expect <<-EOF &&
+       EOF
+       test_must_fail git notes list HEAD >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-Initial set of notes
-
-More notes appended with git notes append
-EOF
-
 test_expect_success 'append to existing note with "git notes append"' '
+       cat >expect <<-EOF &&
+               Initial set of notes
+
+               More notes appended with git notes append
+       EOF
        git notes add -m "Initial set of notes" &&
        git notes append -m "More notes appended with git notes append" &&
-       git notes show > output &&
-       test_cmp expect output
+       git notes show >actual &&
+       test_cmp expect actual
 '
 
-cat > expect_list << EOF
-c18dc024e14f08d18d14eea0d747ff692d66d6a3 1584215f1d29c65e99c6c6848626553fdd07fd75
-c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 268048bfb8a1fb38e703baceb8ab235421bf80c5
-4b6ad22357cc8a1296720574b8d2fbc22fab0671 bd1753200303d0a0344be813e504253b3d98e74d
-EOF
-
 test_expect_success '"git notes list" does not expand to "git notes list HEAD"' '
-       git notes list > output &&
-       test_cmp expect_list output
+       cat >expect_list <<-EOF &&
+               c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 7a4ca6ee52a974a66cbaa78e33214535dff1d691
+               4b6ad22357cc8a1296720574b8d2fbc22fab0671 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+               c18dc024e14f08d18d14eea0d747ff692d66d6a3 d07d62e5208f22eb5695e7eb47667dc8b9860290
+       EOF
+       git notes list >actual &&
+       test_cmp expect_list actual
 '
 
 test_expect_success 'appending empty string does not change existing note' '
        git notes append -m "" &&
-       git notes show > output &&
-       test_cmp expect output
+       git notes show >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'git notes append == add when there is no existing note' '
        git notes remove HEAD &&
        test_must_fail git notes list HEAD &&
-       git notes append -m "Initial set of notes
-
-More notes appended with git notes append" &&
-       git notes show > output &&
-       test_cmp expect output
+       git notes append -m "Initial set of notes${LF}${LF}More notes appended with git notes append" &&
+       git notes show >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'appending empty string to non-existing note does not create note' '
@@ -579,229 +521,208 @@ test_expect_success 'appending empty string to non-existing note does not create
 '
 
 test_expect_success 'create other note on a different notes ref (setup)' '
-       : > a6 &&
-       git add a6 &&
-       test_tick &&
-       git commit -m 6th &&
-       GIT_NOTES_REF="refs/notes/other" git notes add -m "other note"
-'
+       test_commit 6th &&
+       GIT_NOTES_REF="refs/notes/other" git notes add -m "other note" &&
+       cat >expect-not-other <<-EOF &&
+               commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:18:13 2005 -0700
 
-cat > expect-other << EOF
-commit 387a89921c73d7ed72cd94d179c1c7048ca47756
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:18:13 2005 -0700
-
-    6th
-
-Notes (other):
-    other note
-EOF
+               ${indent}6th
+       EOF
+       cp expect-not-other expect-other &&
+       cat >>expect-other <<-EOF
 
-cat > expect-not-other << EOF
-commit 387a89921c73d7ed72cd94d179c1c7048ca47756
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:18:13 2005 -0700
-
-    6th
-EOF
+               Notes (other):
+               ${indent}other note
+       EOF
+'
 
 test_expect_success 'Do not show note on other ref by default' '
-       git log -1 > output &&
-       test_cmp expect-not-other output
+       git log -1 >actual &&
+       test_cmp expect-not-other actual
 '
 
 test_expect_success 'Do show note when ref is given in GIT_NOTES_REF' '
-       GIT_NOTES_REF="refs/notes/other" git log -1 > output &&
-       test_cmp expect-other output
+       GIT_NOTES_REF="refs/notes/other" git log -1 >actual &&
+       test_cmp expect-other actual
 '
 
 test_expect_success 'Do show note when ref is given in core.notesRef config' '
-       git config core.notesRef "refs/notes/other" &&
-       git log -1 > output &&
-       test_cmp expect-other output
+       test_config core.notesRef "refs/notes/other" &&
+       git log -1 >actual &&
+       test_cmp expect-other actual
 '
 
 test_expect_success 'Do not show note when core.notesRef is overridden' '
-       GIT_NOTES_REF="refs/notes/wrong" git log -1 > output &&
-       test_cmp expect-not-other output
+       test_config core.notesRef "refs/notes/other" &&
+       GIT_NOTES_REF="refs/notes/wrong" git log -1 >actual &&
+       test_cmp expect-not-other actual
 '
 
-cat > expect-both << EOF
-commit 387a89921c73d7ed72cd94d179c1c7048ca47756
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:18:13 2005 -0700
-
-    6th
+test_expect_success 'Show all notes when notes.displayRef=refs/notes/*' '
+       cat >expect-both <<-EOF &&
+               commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:18:13 2005 -0700
 
-Notes:
-    order test
+               ${indent}6th
 
-Notes (other):
-    other note
+               Notes:
+               ${indent}order test
 
-commit bd1753200303d0a0344be813e504253b3d98e74d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:17:13 2005 -0700
+               Notes (other):
+               ${indent}other note
 
-    5th
+               commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:17:13 2005 -0700
 
-Notes:
-    replacement for deleted note
-EOF
+               ${indent}5th
 
-test_expect_success 'Show all notes when notes.displayRef=refs/notes/*' '
+               Notes:
+               ${indent}replacement for deleted note
+       EOF
        GIT_NOTES_REF=refs/notes/commits git notes add \
                -m"replacement for deleted note" HEAD^ &&
        GIT_NOTES_REF=refs/notes/commits git notes add -m"order test" &&
-       git config --unset core.notesRef &&
-       git config notes.displayRef "refs/notes/*" &&
-       git log -2 > output &&
-       test_cmp expect-both output
+       test_unconfig core.notesRef &&
+       test_config notes.displayRef "refs/notes/*" &&
+       git log -2 >actual &&
+       test_cmp expect-both actual
 '
 
 test_expect_success 'core.notesRef is implicitly in notes.displayRef' '
-       git config core.notesRef refs/notes/commits &&
-       git config notes.displayRef refs/notes/other &&
-       git log -2 > output &&
-       test_cmp expect-both output
+       test_config core.notesRef refs/notes/commits &&
+       test_config notes.displayRef refs/notes/other &&
+       git log -2 >actual &&
+       test_cmp expect-both actual
 '
 
 test_expect_success 'notes.displayRef can be given more than once' '
-       git config --unset core.notesRef &&
-       git config notes.displayRef refs/notes/commits &&
+       test_unconfig core.notesRef &&
+       test_config notes.displayRef refs/notes/commits &&
        git config --add notes.displayRef refs/notes/other &&
-       git log -2 > output &&
-       test_cmp expect-both output
+       git log -2 >actual &&
+       test_cmp expect-both actual
 '
 
-cat > expect-both-reversed << EOF
-commit 387a89921c73d7ed72cd94d179c1c7048ca47756
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:18:13 2005 -0700
-
-    6th
+test_expect_success 'notes.displayRef respects order' '
+       cat >expect-both-reversed <<-EOF &&
+               commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:18:13 2005 -0700
 
-Notes (other):
-    other note
+               ${indent}6th
 
-Notes:
-    order test
-EOF
+               Notes (other):
+               ${indent}other note
 
-test_expect_success 'notes.displayRef respects order' '
-       git config core.notesRef refs/notes/other &&
-       git config --unset-all notes.displayRef &&
-       git config notes.displayRef refs/notes/commits &&
-       git log -1 > output &&
-       test_cmp expect-both-reversed output
+               Notes:
+               ${indent}order test
+       EOF
+       test_config core.notesRef refs/notes/other &&
+       test_config notes.displayRef refs/notes/commits &&
+       git log -1 >actual &&
+       test_cmp expect-both-reversed actual
 '
 
 test_expect_success 'GIT_NOTES_DISPLAY_REF works' '
-       git config --unset-all core.notesRef &&
-       git config --unset-all notes.displayRef &&
        GIT_NOTES_DISPLAY_REF=refs/notes/commits:refs/notes/other \
-               git log -2 > output &&
-       test_cmp expect-both output
+               git log -2 >actual &&
+       test_cmp expect-both actual
 '
 
-cat > expect-none << EOF
-commit 387a89921c73d7ed72cd94d179c1c7048ca47756
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:18:13 2005 -0700
-
-    6th
+test_expect_success 'GIT_NOTES_DISPLAY_REF overrides config' '
+       cat >expect-none <<-EOF &&
+               commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:18:13 2005 -0700
 
-commit bd1753200303d0a0344be813e504253b3d98e74d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:17:13 2005 -0700
+               ${indent}6th
 
-    5th
-EOF
+               commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:17:13 2005 -0700
 
-test_expect_success 'GIT_NOTES_DISPLAY_REF overrides config' '
-       git config notes.displayRef "refs/notes/*" &&
-       GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log -2 > output &&
-       test_cmp expect-none output
+               ${indent}5th
+       EOF
+       test_config notes.displayRef "refs/notes/*" &&
+       GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log -2 >actual &&
+       test_cmp expect-none actual
 '
 
 test_expect_success '--show-notes=* adds to GIT_NOTES_DISPLAY_REF' '
-       GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log --show-notes=* -2 > output &&
-       test_cmp expect-both output
+       GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log --show-notes=* -2 >actual &&
+       test_cmp expect-both actual
 '
 
-cat > expect-commits << EOF
-commit 387a89921c73d7ed72cd94d179c1c7048ca47756
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:18:13 2005 -0700
-
-    6th
+test_expect_success '--no-standard-notes' '
+       cat >expect-commits <<EOF
+               commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:18:13 2005 -0700
 
-Notes:
-    order test
-EOF
+               ${indent}6th
 
-test_expect_success '--no-standard-notes' '
-       git log --no-standard-notes --show-notes=commits -1 > output &&
-       test_cmp expect-commits output
+               Notes:
+               ${indent}order test
+       EOF
+       git log --no-standard-notes --show-notes=commits -1 >actual &&
+       test_cmp expect-commits actual
 '
 
 test_expect_success '--standard-notes' '
+       test_config notes.displayRef "refs/notes/*" &&
        git log --no-standard-notes --show-notes=commits \
-               --standard-notes -2 > output &&
-       test_cmp expect-both output
+               --standard-notes -2 >actual &&
+       test_cmp expect-both actual
 '
 
 test_expect_success '--show-notes=ref accumulates' '
        git log --show-notes=other --show-notes=commits \
-                --no-standard-notes -1 > output &&
-       test_cmp expect-both-reversed output
+                --no-standard-notes -1 >actual &&
+       test_cmp expect-both-reversed actual
 '
 
 test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
-       git config core.notesRef refs/notes/other &&
-       echo "Note on a tree" > expect &&
+       test_config core.notesRef refs/notes/other &&
+       echo "Note on a tree" >expect &&
        git notes add -m "Note on a tree" HEAD: &&
-       git notes show HEAD: > actual &&
+       git notes show HEAD: >actual &&
        test_cmp expect actual &&
-       echo "Note on a blob" > expect &&
+       echo "Note on a blob" >expect &&
        filename=$(git ls-tree --name-only HEAD | head -n1) &&
        git notes add -m "Note on a blob" HEAD:$filename &&
-       git notes show HEAD:$filename > actual &&
+       git notes show HEAD:$filename >actual &&
        test_cmp expect actual &&
-       echo "Note on a tag" > expect &&
+       echo "Note on a tag" >expect &&
        git tag -a -m "This is an annotated tag" foobar HEAD^ &&
        git notes add -m "Note on a tag" foobar &&
-       git notes show foobar > actual &&
+       git notes show foobar >actual &&
        test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 2ede89468182a62d0bde2583c736089bcf7d7e92
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:19:13 2005 -0700
-
-    7th
+test_expect_success 'create note from other note with "git notes add -C"' '
+       cat >expect <<-EOF &&
+               commit fb01e0ca8c33b6cc0c6451dde747f97df567cb5c
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:19:13 2005 -0700
 
-Notes (other):
-    other note
-EOF
+               ${indent}7th
 
-test_expect_success 'create note from other note with "git notes add -C"' '
-       : > a7 &&
-       git add a7 &&
-       test_tick &&
-       git commit -m 7th &&
+               Notes:
+               ${indent}order test
+       EOF
+       test_commit 7th &&
        git notes add -C $(git notes list HEAD^) &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual &&
        test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
 '
 
 test_expect_success 'create note from non-existing note with "git notes add -C" fails' '
-       : > a8 &&
-       git add a8 &&
-       test_tick &&
-       git commit -m 8th &&
+       test_commit 8th &&
        test_must_fail git notes add -C deadbeef &&
        test_must_fail git notes list HEAD
 '
@@ -814,405 +735,386 @@ test_expect_success 'create note from non-blob with "git notes add -C" fails' '
        test_must_fail git notes list HEAD
 '
 
-cat > expect << EOF
-commit 80d796defacd5db327b7a4e50099663902fbdc5c
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:20:13 2005 -0700
-
-    8th
+test_expect_success 'create note from blob with "git notes add -C" reuses blob id' '
+       cat >expect <<-EOF &&
+               commit 9a4c31c7f722b5d517e92c64e932dd751e1413bf
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:20:13 2005 -0700
 
-Notes (other):
-    This is a blob object
-EOF
+               ${indent}8th
 
-test_expect_success 'create note from blob with "git notes add -C" reuses blob id' '
+               Notes:
+               ${indent}This is a blob object
+       EOF
        blob=$(echo "This is a blob object" | git hash-object -w --stdin) &&
        git notes add -C $blob &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual &&
        test "$(git notes list HEAD)" = "$blob"
 '
 
-cat > expect << EOF
-commit 016e982bad97eacdbda0fcbd7ce5b0ba87c81f1b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:21:13 2005 -0700
-
-    9th
+test_expect_success 'create note from other note with "git notes add -c"' '
+       cat >expect <<-EOF &&
+               commit 2e0db4bc649e174d667a1cde19e725cf897a5bd2
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:21:13 2005 -0700
 
-Notes (other):
-    yet another note
-EOF
+               ${indent}9th
 
-test_expect_success 'create note from other note with "git notes add -c"' '
-       : > a9 &&
-       git add a9 &&
-       test_tick &&
-       git commit -m 9th &&
+               Notes:
+               ${indent}yet another note
+       EOF
+       test_commit 9th &&
        MSG="yet another note" git notes add -c $(git notes list HEAD^^) &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual
 '
 
 test_expect_success 'create note from non-existing note with "git notes add -c" fails' '
-       : > a10 &&
-       git add a10 &&
-       test_tick &&
-       git commit -m 10th &&
+       test_commit 10th &&
        test_must_fail env MSG="yet another note" git notes add -c deadbeef &&
        test_must_fail git notes list HEAD
 '
 
-cat > expect << EOF
-commit 016e982bad97eacdbda0fcbd7ce5b0ba87c81f1b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:21:13 2005 -0700
-
-    9th
-
-Notes (other):
-    yet another note
-$whitespace
-    yet another note
-EOF
-
 test_expect_success 'append to note from other note with "git notes append -C"' '
+       cat >expect <<-EOF &&
+               commit 2e0db4bc649e174d667a1cde19e725cf897a5bd2
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:21:13 2005 -0700
+
+               ${indent}9th
+
+               Notes:
+               ${indent}yet another note
+               ${indent}
+               ${indent}yet another note
+       EOF
        git notes append -C $(git notes list HEAD^) HEAD^ &&
-       git log -1 HEAD^ > actual &&
+       git log -1 HEAD^ >actual &&
        test_cmp expect actual
 '
 
-cat > expect << EOF
-commit ffed603236bfa3891c49644257a83598afe8ae5a
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:22:13 2005 -0700
+test_expect_success 'create note from other note with "git notes append -c"' '
+       cat >expect <<-EOF &&
+               commit 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:22:13 2005 -0700
 
-    10th
+               ${indent}10th
 
-Notes (other):
-    other note
-EOF
-
-test_expect_success 'create note from other note with "git notes append -c"' '
+               Notes:
+               ${indent}other note
+       EOF
        MSG="other note" git notes append -c $(git notes list HEAD^) &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual
 '
 
-cat > expect << EOF
-commit ffed603236bfa3891c49644257a83598afe8ae5a
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:22:13 2005 -0700
-
-    10th
-
-Notes (other):
-    other note
-$whitespace
-    yet another note
-EOF
-
 test_expect_success 'append to note from other note with "git notes append -c"' '
+       cat >expect <<-EOF &&
+               commit 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:22:13 2005 -0700
+
+               ${indent}10th
+
+               Notes:
+               ${indent}other note
+               ${indent}
+               ${indent}yet another note
+       EOF
        MSG="yet another note" git notes append -c $(git notes list HEAD) &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 6352c5e33dbcab725fe0579be16aa2ba8eb369be
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:23:13 2005 -0700
-
-    11th
-
-Notes (other):
-    other note
-$whitespace
-    yet another note
-EOF
-
 test_expect_success 'copy note with "git notes copy"' '
-       : > a11 &&
-       git add a11 &&
-       test_tick &&
-       git commit -m 11th &&
+       cat >expect <<-EOF &&
+               commit a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:23:13 2005 -0700
+
+               ${indent}11th
+
+               Notes:
+               ${indent}other note
+               ${indent}
+               ${indent}yet another note
+       EOF
+       test_commit 11th &&
        git notes copy HEAD^ HEAD &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual &&
        test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
 '
 
 test_expect_success 'prevent overwrite with "git notes copy"' '
        test_must_fail git notes copy HEAD~2 HEAD &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual &&
        test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
 '
 
-cat > expect << EOF
-commit 6352c5e33dbcab725fe0579be16aa2ba8eb369be
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:23:13 2005 -0700
-
-    11th
-
-Notes (other):
-    yet another note
-$whitespace
-    yet another note
-EOF
-
 test_expect_success 'allow overwrite with "git notes copy -f"' '
+       cat >expect <<-EOF &&
+               commit a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:23:13 2005 -0700
+
+               ${indent}11th
+
+               Notes:
+               ${indent}yet another note
+               ${indent}
+               ${indent}yet another note
+       EOF
        git notes copy -f HEAD~2 HEAD &&
-       git log -1 > actual &&
+       git log -1 >actual &&
        test_cmp expect actual &&
        test "$(git notes list HEAD)" = "$(git notes list HEAD~2)"
 '
 
 test_expect_success 'cannot copy note from object without notes' '
-       : > a12 &&
-       git add a12 &&
-       test_tick &&
-       git commit -m 12th &&
-       : > a13 &&
-       git add a13 &&
-       test_tick &&
-       git commit -m 13th &&
+       test_commit 12th &&
+       test_commit 13th &&
        test_must_fail git notes copy HEAD^ HEAD
 '
 
-cat > expect << EOF
-commit e5d4fb5698d564ab8c73551538ecaf2b0c666185
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:25:13 2005 -0700
-
-    13th
+test_expect_success 'git notes copy --stdin' '
+       cat >expect <<-EOF &&
+               commit e871aa61182b1d95d0a6fb75445d891722863b6b
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:25:13 2005 -0700
 
-Notes (other):
-    yet another note
-$whitespace
-    yet another note
+               ${indent}13th
 
-commit 7038787dfe22a14c3867ce816dbba39845359719
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:24:13 2005 -0700
+               Notes:
+               ${indent}yet another note
+               ${indent}
+               ${indent}yet another note
 
-    12th
+               commit 65e263ded02ae4e8839bc151095113737579dc12
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:24:13 2005 -0700
 
-Notes (other):
-    other note
-$whitespace
-    yet another note
-EOF
+               ${indent}12th
 
-test_expect_success 'git notes copy --stdin' '
+               Notes:
+               ${indent}other note
+               ${indent}
+               ${indent}yet another note
+       EOF
        (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
        echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
        git notes copy --stdin &&
-       git log -2 > output &&
-       test_cmp expect output &&
+       git log -2 >actual &&
+       test_cmp expect actual &&
        test "$(git notes list HEAD)" = "$(git notes list HEAD~2)" &&
        test "$(git notes list HEAD^)" = "$(git notes list HEAD~3)"
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
-
-    15th
+test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
 
-commit be28d8b4d9951ad940d229ee3b0b9ee3b1ec273d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:26:13 2005 -0700
+               ${indent}15th
 
-    14th
-EOF
+               commit 07c85d77059393ed0154b8c96906547a59dfcddd
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:26:13 2005 -0700
 
-test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
+               ${indent}14th
+       EOF
        test_commit 14th &&
        test_commit 15th &&
        (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
        echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
        git notes copy --for-rewrite=foo &&
-       git log -2 > output &&
-       test_cmp expect output
+       git log -2 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
-
-    15th
-
-Notes (other):
-    yet another note
-$whitespace
-    yet another note
-
-commit be28d8b4d9951ad940d229ee3b0b9ee3b1ec273d
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:26:13 2005 -0700
-
-    14th
-
-Notes (other):
-    other note
-$whitespace
-    yet another note
-EOF
-
 test_expect_success 'git notes copy --for-rewrite (enabled)' '
-       git config notes.rewriteMode overwrite &&
-       git config notes.rewriteRef "refs/notes/*" &&
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
+
+               ${indent}15th
+
+               Notes:
+               ${indent}yet another note
+               ${indent}
+               ${indent}yet another note
+
+               commit 07c85d77059393ed0154b8c96906547a59dfcddd
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:26:13 2005 -0700
+
+               ${indent}14th
+
+               Notes:
+               ${indent}other note
+               ${indent}
+               ${indent}yet another note
+       EOF
+       test_config notes.rewriteMode overwrite &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
        echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
        git notes copy --for-rewrite=foo &&
-       git log -2 > output &&
-       test_cmp expect output
+       git log -2 >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'git notes copy --for-rewrite (disabled)' '
-       git config notes.rewrite.bar false &&
+       test_config notes.rewrite.bar false &&
        echo $(git rev-parse HEAD~3) $(git rev-parse HEAD) |
        git notes copy --for-rewrite=bar &&
-       git log -2 > output &&
-       test_cmp expect output
+       git log -2 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
-
-    15th
+test_expect_success 'git notes copy --for-rewrite (overwrite)' '
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
 
-Notes (other):
-    a fresh note
-EOF
+               ${indent}15th
 
-test_expect_success 'git notes copy --for-rewrite (overwrite)' '
+               Notes:
+               ${indent}a fresh note
+       EOF
        git notes add -f -m"a fresh note" HEAD^ &&
+       test_config notes.rewriteMode overwrite &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'git notes copy --for-rewrite (ignore)' '
-       git config notes.rewriteMode ignore &&
+       test_config notes.rewriteMode ignore &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
-
-    15th
-
-Notes (other):
-    a fresh note
-$whitespace
-    another fresh note
-EOF
-
 test_expect_success 'git notes copy --for-rewrite (append)' '
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
+
+               ${indent}15th
+
+               Notes:
+               ${indent}a fresh note
+               ${indent}
+               ${indent}another fresh note
+       EOF
        git notes add -f -m"another fresh note" HEAD^ &&
-       git config notes.rewriteMode concatenate &&
+       test_config notes.rewriteMode concatenate &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
-
-    15th
-
-Notes (other):
-    a fresh note
-$whitespace
-    another fresh note
-$whitespace
-    append 1
-$whitespace
-    append 2
-EOF
-
 test_expect_success 'git notes copy --for-rewrite (append two to one)' '
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
+
+               ${indent}15th
+
+               Notes:
+               ${indent}a fresh note
+               ${indent}
+               ${indent}another fresh note
+               ${indent}
+               ${indent}append 1
+               ${indent}
+               ${indent}append 2
+       EOF
        git notes add -f -m"append 1" HEAD^ &&
        git notes add -f -m"append 2" HEAD^^ &&
+       test_config notes.rewriteMode concatenate &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        (echo $(git rev-parse HEAD^) $(git rev-parse HEAD);
        echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
        git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'git notes copy --for-rewrite (append empty)' '
        git notes remove HEAD^ &&
+       test_config notes.rewriteMode concatenate &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
-
-    15th
-
-Notes (other):
-    replacement note 1
-EOF
-
 test_expect_success 'GIT_NOTES_REWRITE_MODE works' '
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
+
+               ${indent}15th
+
+               Notes:
+               ${indent}replacement note 1
+       EOF
+       test_config notes.rewriteMode concatenate &&
+       test_config notes.rewriteRef "refs/notes/*" &&
        git notes add -f -m"replacement note 1" HEAD^ &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        GIT_NOTES_REWRITE_MODE=overwrite git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
-cat > expect << EOF
-commit 37a0d4cba38afef96ba54a3ea567e6dac575700b
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:27:13 2005 -0700
+test_expect_success 'GIT_NOTES_REWRITE_REF works' '
+       cat >expect <<-EOF &&
+               commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+               Author: A U Thor <author@example.com>
+               Date:   Thu Apr 7 15:27:13 2005 -0700
 
-    15th
+               ${indent}15th
 
-Notes (other):
-    replacement note 2
-EOF
-
-test_expect_success 'GIT_NOTES_REWRITE_REF works' '
-       git config notes.rewriteMode overwrite &&
+               Notes:
+               ${indent}replacement note 2
+       EOF
        git notes add -f -m"replacement note 2" HEAD^ &&
-       git config --unset-all notes.rewriteRef &&
+       test_config notes.rewriteMode overwrite &&
+       test_unconfig notes.rewriteRef &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        GIT_NOTES_REWRITE_REF=refs/notes/commits:refs/notes/other \
                git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '
-       git config notes.rewriteRef refs/notes/other &&
        git notes add -f -m"replacement note 3" HEAD^ &&
+       test_config notes.rewriteMode overwrite &&
+       test_config notes.rewriteRef refs/notes/other &&
        echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
        GIT_NOTES_REWRITE_REF= git notes copy --for-rewrite=foo &&
-       git log -1 > output &&
-       test_cmp expect output
+       git log -1 >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'git notes copy diagnoses too many or too few parameters' '
@@ -1221,13 +1123,13 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
 '
 
 test_expect_success 'git notes get-ref (no overrides)' '
-       git config --unset core.notesRef &&
+       test_unconfig core.notesRef &&
        sane_unset GIT_NOTES_REF &&
        test "$(git notes get-ref)" = "refs/notes/commits"
 '
 
 test_expect_success 'git notes get-ref (core.notesRef)' '
-       git config core.notesRef refs/notes/foo &&
+       test_config core.notesRef refs/notes/foo &&
        test "$(git notes get-ref)" = "refs/notes/foo"
 '
 
@@ -1239,4 +1141,51 @@ test_expect_success 'git notes get-ref (--ref)' '
        test "$(GIT_NOTES_REF=refs/notes/bar git notes --ref=baz get-ref)" = "refs/notes/baz"
 '
 
+test_expect_success 'setup testing of empty notes' '
+       test_unconfig core.notesRef &&
+       test_commit 16th &&
+       empty_blob=$(git hash-object -w /dev/null) &&
+       echo "$empty_blob" >expect_empty
+'
+
+while read cmd
+do
+       test_expect_success "'git notes $cmd' removes empty note" "
+               test_might_fail git notes remove HEAD &&
+               MSG= git notes $cmd &&
+               test_must_fail git notes list HEAD
+       "
+
+       test_expect_success "'git notes $cmd --allow-empty' stores empty note" "
+               test_might_fail git notes remove HEAD &&
+               MSG= git notes $cmd --allow-empty &&
+               git notes list HEAD >actual &&
+               test_cmp expect_empty actual
+       "
+done <<\EOF
+add
+add -F /dev/null
+add -m ""
+add -c "$empty_blob"
+add -C "$empty_blob"
+append
+append -F /dev/null
+append -m ""
+append -c "$empty_blob"
+append -C "$empty_blob"
+edit
+EOF
+
+test_expect_success 'empty notes are displayed by git log' '
+       test_commit 17th &&
+       git log -1 >expect &&
+       cat >>expect <<-EOF &&
+
+               Notes:
+       EOF
+       git notes add -C "$empty_blob" --allow-empty &&
+       git log -1 >actual &&
+       test_cmp expect actual
+'
+
 test_done
index 223b98433c502b03c4ba70550cb32d42a5f6295b..7c5ad086264e3d1c140da7fd996f27c1352a26a9 100755 (executable)
@@ -351,19 +351,45 @@ test_expect_success 'commit after failed cherry-pick does not add duplicated -s'
 test_expect_success 'commit after failed cherry-pick adds -s at the right place' '
        pristine_detach initial &&
        test_must_fail git cherry-pick picked &&
+
        git commit -a -s &&
-       pwd &&
-       cat <<EOF > expected &&
-picked
 
-Signed-off-by: C O Mitter <committer@example.com>
+       # Do S-o-b and Conflicts appear in the right order?
+       cat <<-\EOF >expect &&
+       Signed-off-by: C O Mitter <committer@example.com>
+       # Conflicts:
+       EOF
+       grep -e "^# Conflicts:" -e '^Signed-off-by' <.git/COMMIT_EDITMSG >actual &&
+       test_cmp expect actual &&
+
+       cat <<-\EOF >expected &&
+       picked
 
-Conflicts:
-       foo
-EOF
+       Signed-off-by: C O Mitter <committer@example.com>
+       EOF
 
-       git show -s --pretty=format:%B > actual &&
+       git show -s --pretty=format:%B >actual &&
        test_cmp expected actual
 '
 
+test_expect_success 'commit --amend -s places the sign-off at the right place' '
+       pristine_detach initial &&
+       test_must_fail git cherry-pick picked &&
+
+       # emulate old-style conflicts block
+       mv .git/MERGE_MSG .git/MERGE_MSG+ &&
+       sed -e "/^# Conflicts:/,\$s/^# *//" <.git/MERGE_MSG+ >.git/MERGE_MSG &&
+
+       git commit -a &&
+       git commit --amend -s &&
+
+       # Do S-o-b and Conflicts appear in the right order?
+       cat <<-\EOF >expect &&
+       Signed-off-by: C O Mitter <committer@example.com>
+       Conflicts:
+       EOF
+       grep -e "^Conflicts:" -e '^Signed-off-by' <.git/COMMIT_EDITMSG >actual &&
+       test_cmp expect actual
+'
+
 test_done
index 3726a0e2012e534623ddbdd71da04f177c32d4d0..63e423838f1025d74b830bf84629427defdb756a 100755 (executable)
@@ -53,6 +53,14 @@ test_expect_success '256 colors' '
        color "254 bold 255" "[1;38;5;254;48;5;255m"
 '
 
+test_expect_success '"normal" yields no color at all"' '
+       color "normal black" "[40m"
+'
+
+test_expect_success '-1 is a synonym for "normal"' '
+       color "-1 black" "[40m"
+'
+
 test_expect_success 'color too small' '
        invalid_color "-2"
 '
index 6a5ac3add47399918737168e60f75d2d7cec1557..cc7451908baa815467606dae49a36d0df26492dc 100755 (executable)
@@ -26,7 +26,7 @@ check_pushed_commit () {
 # $2 = expected target branch for the push
 # $3 = [optional] repo to check for actual output (repo1 by default)
 test_push_success () {
-       git -c push.default="$1" push &&
+       git ${1:+-c push.default="$1"} push &&
        check_pushed_commit HEAD "$2" "$3"
 }
 
@@ -34,7 +34,7 @@ test_push_success () {
 # check that push fails and does not modify any remote branch
 test_push_failure () {
        git --git-dir=repo1 log --no-walk --format='%h %s' --all >expect &&
-       test_must_fail git -c push.default="$1" push &&
+       test_must_fail git ${1:+-c push.default="$1"} push &&
        git --git-dir=repo1 log --no-walk --format='%h %s' --all >actual &&
        test_cmp expect actual
 }
@@ -172,4 +172,32 @@ test_pushdefault_workflow success simple master triangular
 # master is updated (parent2 does not have foo)
 test_pushdefault_workflow success matching master triangular
 
+# default tests, when no push-default is specified. This
+# should behave the same as "simple" in non-triangular
+# settings, and as "current" otherwise.
+
+test_expect_success 'default behavior allows "simple" push' '
+       test_config branch.master.remote parent1 &&
+       test_config branch.master.merge refs/heads/master &&
+       test_config remote.pushdefault parent1 &&
+       test_commit default-master-master &&
+       test_push_success "" master
+'
+
+test_expect_success 'default behavior rejects non-simple push' '
+       test_config branch.master.remote parent1 &&
+       test_config branch.master.merge refs/heads/foo &&
+       test_config remote.pushdefault parent1 &&
+       test_commit default-master-foo &&
+       test_push_failure ""
+'
+
+test_expect_success 'default triangular behavior acts like "current"' '
+       test_config branch.master.remote parent1 &&
+       test_config branch.master.merge refs/heads/foo &&
+       test_config remote.pushdefault parent2 &&
+       test_commit default-triangular &&
+       test_push_success "" master repo2
+'
+
 test_done
index e9783c341a97afdd58aa2adddc8c6db4adb54bee..191d6d3a780325b6f3e294b6b42540569ef129d1 100755 (executable)
@@ -46,7 +46,7 @@ test_expect_success CLONE_2GB 'clone - bare' '
 
 test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '
 
-       git clone file://. clone-wt
+       git clone "file://$(pwd)" clone-wt
 
 '
 
index 1efb88051af0d783dff554337d565547f946d06e..bd0ab4675089b54c336ccc9590c4b65bbd37138d 100755 (executable)
@@ -213,7 +213,7 @@ test_expect_success 'with 2 files arguments' '
 '
 
 test_expect_success 'with message that has comments' '
-       cat basic_message >>message_with_comments &&
+       cat basic_message >message_with_comments &&
        sed -e "s/ Z\$/ /" >>message_with_comments <<-\EOF &&
                # comment
 
@@ -232,12 +232,44 @@ test_expect_success 'with message that has comments' '
 
                Reviewed-by: Johan
                Cc: Peff
+               # last comment
+
        EOF
        cat basic_patch >>expected &&
        git interpret-trailers --trim-empty --trailer "Cc: Peff" message_with_comments >actual &&
        test_cmp expected actual
 '
 
+test_expect_success 'with message that has an old style conflict block' '
+       cat basic_message >message_with_comments &&
+       sed -e "s/ Z\$/ /" >>message_with_comments <<-\EOF &&
+               # comment
+
+               # other comment
+               Cc: Z
+               # yet another comment
+               Reviewed-by: Johan
+               Reviewed-by: Z
+               # last comment
+
+               Conflicts:
+
+       EOF
+       cat basic_message >expected &&
+       cat >>expected <<-\EOF &&
+               # comment
+
+               Reviewed-by: Johan
+               Cc: Peff
+               # last comment
+
+               Conflicts:
+
+       EOF
+       git interpret-trailers --trim-empty --trailer "Cc: Peff" message_with_comments >actual &&
+       test_cmp expected actual
+'
+
 test_expect_success 'with commit complex message and trailer args' '
        cat complex_message_body >expected &&
        sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
index 52034c8f77abd2eb0079866331c49a2f5f34e20d..c4c3c4954612ff317a72bc342741bee8f3c628b0 100755 (executable)
@@ -16,7 +16,7 @@ test_description='git cvsimport testing for correct patchset estimation'
 
 setup_cvs_test_repository t9603
 
-test_expect_failure 'import with criss cross times on revisions' '
+test_expect_failure PERL 'import with criss cross times on revisions' '
 
     git cvsimport -p"-x" -C module-git module &&
     (cd module-git &&
index 1fd51423ee3d473a969180c29bfe05a6ac9b5b21..a4b3db24bd9afee29de1679b47a5371a10c9863c 100755 (executable)
@@ -5,7 +5,7 @@ test_description='git cvsimport timestamps'
 
 setup_cvs_test_repository t9604
 
-test_expect_success 'check timestamps are UTC (TZ=CST6CDT)' '
+test_expect_success PERL 'check timestamps are UTC (TZ=CST6CDT)' '
 
        TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
        git cvsimport -p"-x" -C module-1 module &&
@@ -34,7 +34,7 @@ test_expect_success 'check timestamps are UTC (TZ=CST6CDT)' '
        test_cmp actual-1 expect-1
 '
 
-test_expect_success 'check timestamps with author-specific timezones' '
+test_expect_success PERL 'check timestamps with author-specific timezones' '
 
        cat >cvs-authors <<-EOF &&
        user1=User One <user1@domain.org>
index cf19339ccebd0ee5f55822ebe11386101f358f41..79e8a33d043e7208c2c1a08ab38fad207049ef4c 100644 (file)
@@ -169,7 +169,11 @@ _z40=0000000000000000000000000000000000000000
 LF='
 '
 
-export _x05 _x40 _z40 LF
+# UTF-8 ZERO WIDTH NON-JOINER, which HFS+ ignores
+# when case-folding filenames
+u200c=$(printf '\342\200\214')
+
+export _x05 _x40 _z40 LF u200c
 
 # Each test should start with something like this, after copyright notices:
 #
index 6ae786505ae782809cbc0fa3599c88c7783782d5..623adeb02d0e06a83d7b17a9b605ff8c6475a0bd 100644 (file)
--- a/trailer.c
+++ b/trailer.c
@@ -2,6 +2,7 @@
 #include "string-list.h"
 #include "run-command.h"
 #include "string-list.h"
+#include "commit.h"
 #include "trailer.h"
 /*
  * Copyright (c) 2013, 2014 Christian Couder <chriscool@tuxfamily.org>
@@ -582,8 +583,12 @@ static int parse_trailer(struct strbuf *tok, struct strbuf *val, const char *tra
        strbuf_addch(&seps, '=');
        len = strcspn(trailer, seps.buf);
        strbuf_release(&seps);
-       if (len == 0)
-               return error(_("empty trailer token in trailer '%s'"), trailer);
+       if (len == 0) {
+               int l = strlen(trailer);
+               while (l > 0 && isspace(trailer[l - 1]))
+                       l--;
+               return error(_("empty trailer token in trailer '%.*s'"), l, trailer);
+       }
        if (len < strlen(trailer)) {
                strbuf_add(tok, trailer, len);
                strbuf_trim(tok);
@@ -764,6 +769,22 @@ static int find_trailer_start(struct strbuf **lines, int count)
        return only_spaces ? count : 0;
 }
 
+/* Get the index of the end of the trailers */
+static int find_trailer_end(struct strbuf **lines, int patch_start)
+{
+       struct strbuf sb = STRBUF_INIT;
+       int i, ignore_bytes;
+
+       for (i = 0; i < patch_start; i++)
+               strbuf_addbuf(&sb, lines[i]);
+       ignore_bytes = ignore_non_trailer(&sb);
+       strbuf_release(&sb);
+       for (i = patch_start - 1; i >= 0 && ignore_bytes > 0; i--)
+               ignore_bytes -= lines[i]->len;
+
+       return i + 1;
+}
+
 static int has_blank_line_before(struct strbuf **lines, int start)
 {
        for (;start >= 0; start--) {
@@ -786,14 +807,15 @@ static int process_input_file(struct strbuf **lines,
                              struct trailer_item **in_tok_last)
 {
        int count = 0;
-       int patch_start, trailer_start, i;
+       int patch_start, trailer_start, trailer_end, i;
 
        /* Get the line count */
        while (lines[count])
                count++;
 
        patch_start = find_patch_start(lines, count);
-       trailer_start = find_trailer_start(lines, patch_start);
+       trailer_end = find_trailer_end(lines, patch_start);
+       trailer_start = find_trailer_start(lines, trailer_end);
 
        /* Print lines before the trailers as is */
        print_lines(lines, 0, trailer_start);
@@ -802,12 +824,14 @@ static int process_input_file(struct strbuf **lines,
                printf("\n");
 
        /* Parse trailer lines */
-       for (i = trailer_start; i < patch_start; i++) {
-               struct trailer_item *new = create_trailer_item(lines[i]->buf);
-               add_trailer_item(in_tok_first, in_tok_last, new);
+       for (i = trailer_start; i < trailer_end; i++) {
+               if (lines[i]->buf[0] != comment_line_char) {
+                       struct trailer_item *new = create_trailer_item(lines[i]->buf);
+                       add_trailer_item(in_tok_first, in_tok_last, new);
+               }
        }
 
-       return patch_start;
+       return trailer_end;
 }
 
 static void free_all(struct trailer_item **first)
@@ -824,7 +848,7 @@ void process_trailers(const char *file, int trim_empty, struct string_list *trai
        struct trailer_item *in_tok_last = NULL;
        struct trailer_item *arg_tok_first;
        struct strbuf **lines;
-       int patch_start;
+       int trailer_end;
 
        /* Default config must be setup first */
        git_config(git_trailer_default_config, NULL);
@@ -833,7 +857,7 @@ void process_trailers(const char *file, int trim_empty, struct string_list *trai
        lines = read_input_file(file);
 
        /* Print the lines before the trailers */
-       patch_start = process_input_file(lines, &in_tok_first, &in_tok_last);
+       trailer_end = process_input_file(lines, &in_tok_first, &in_tok_last);
 
        arg_tok_first = process_command_line_args(trailers);
 
@@ -844,7 +868,7 @@ void process_trailers(const char *file, int trim_empty, struct string_list *trai
        free_all(&in_tok_first);
 
        /* Print the lines after the trailers as is */
-       print_lines(lines, patch_start, INT_MAX);
+       print_lines(lines, trailer_end, INT_MAX);
 
        strbuf_list_free(lines);
 }
index 629c658c46a1b4f4bcd8bbe9770d7fd767ae2216..be84ba2607ad2dbdb17397869c459418abad78e4 100644 (file)
@@ -98,7 +98,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
                opts->unpack_rejects[i].strdup_strings = 1;
 }
 
-static void do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
+static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
                         unsigned int set, unsigned int clear)
 {
        clear |= CE_HASHED;
@@ -107,8 +107,8 @@ static void do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
                set |= CE_WT_REMOVE;
 
        ce->ce_flags = (ce->ce_flags & ~clear) | set;
-       add_index_entry(&o->result, ce,
-                       ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
+       return add_index_entry(&o->result, ce,
+                              ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
 }
 
 static struct cache_entry *dup_entry(const struct cache_entry *ce)
@@ -609,7 +609,9 @@ static int unpack_nondirectories(int n, unsigned long mask,
 
        for (i = 0; i < n; i++)
                if (src[i] && src[i] != o->df_conflict_entry)
-                       do_add_entry(o, src[i], 0, 0);
+                       if (do_add_entry(o, src[i], 0, 0))
+                               return -1;
+
        return 0;
 }
 
@@ -1155,6 +1157,8 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
        if (o->dst_index) {
                discard_index(o->dst_index);
                *o->dst_index = o->result;
+       } else {
+               discard_index(&o->result);
        }
 
 done:
diff --git a/utf8.c b/utf8.c
index 454177794929933a6ccc4d91e7d5c784f0f07bff..9a3f4ad23293bf6a3fc06a1942fd324fa1b74ded 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -561,3 +561,67 @@ int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding)
 
        return chrlen;
 }
+
+/*
+ * Pick the next char from the stream, folding as an HFS+ filename comparison
+ * would. Note that this is _not_ complete by any means. It's just enough
+ * to make is_hfs_dotgit() work, and should not be used otherwise.
+ */
+static ucs_char_t next_hfs_char(const char **in)
+{
+       while (1) {
+               ucs_char_t out = pick_one_utf8_char(in, NULL);
+               /*
+                * check for malformed utf8. Technically this
+                * gets converted to a percent-sequence, but
+                * returning 0 is good enough for is_hfs_dotgit
+                * to realize it cannot be .git
+                */
+               if (!*in)
+                       return 0;
+
+               /* these code points are ignored completely */
+               switch (out) {
+               case 0x200c: /* ZERO WIDTH NON-JOINER */
+               case 0x200d: /* ZERO WIDTH JOINER */
+               case 0x200e: /* LEFT-TO-RIGHT MARK */
+               case 0x200f: /* RIGHT-TO-LEFT MARK */
+               case 0x202a: /* LEFT-TO-RIGHT EMBEDDING */
+               case 0x202b: /* RIGHT-TO-LEFT EMBEDDING */
+               case 0x202c: /* POP DIRECTIONAL FORMATTING */
+               case 0x202d: /* LEFT-TO-RIGHT OVERRIDE */
+               case 0x202e: /* RIGHT-TO-LEFT OVERRIDE */
+               case 0x206a: /* INHIBIT SYMMETRIC SWAPPING */
+               case 0x206b: /* ACTIVATE SYMMETRIC SWAPPING */
+               case 0x206c: /* INHIBIT ARABIC FORM SHAPING */
+               case 0x206d: /* ACTIVATE ARABIC FORM SHAPING */
+               case 0x206e: /* NATIONAL DIGIT SHAPES */
+               case 0x206f: /* NOMINAL DIGIT SHAPES */
+               case 0xfeff: /* ZERO WIDTH NO-BREAK SPACE */
+                       continue;
+               }
+
+               /*
+                * there's a great deal of other case-folding that occurs,
+                * but this is enough to catch anything that will convert
+                * to ".git"
+                */
+               return tolower(out);
+       }
+}
+
+int is_hfs_dotgit(const char *path)
+{
+       ucs_char_t c;
+
+       if (next_hfs_char(&path) != '.' ||
+           next_hfs_char(&path) != 'g' ||
+           next_hfs_char(&path) != 'i' ||
+           next_hfs_char(&path) != 't')
+               return 0;
+       c = next_hfs_char(&path);
+       if (c && !is_dir_sep(c))
+               return 0;
+
+       return 1;
+}
diff --git a/utf8.h b/utf8.h
index 65d0e42b96b5a55ecf7362c58d486b9693bcfc46..e4d9183c5fec81f8dbc75d1f2aea136f9b397a72 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -42,4 +42,12 @@ static inline char *reencode_string(const char *in,
 
 int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding);
 
+/*
+ * Returns true if the the path would match ".git" after HFS case-folding.
+ * The path should be NUL-terminated, but we will match variants of both ".git\0"
+ * and ".git/..." (but _not_ ".../.git"). This makes it suitable for both fsck
+ * and verify_path().
+ */
+int is_hfs_dotgit(const char *path);
+
 #endif
index cdbc8d798aaff6fff833224ff94b83af49289a5a..b54eac5af6233de183144230259bd317cf24513a 100644 (file)
@@ -726,7 +726,6 @@ static void wt_status_print_changed(struct wt_status *s)
 static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitted)
 {
        struct child_process sm_summary = CHILD_PROCESS_INIT;
-       struct argv_array argv = ARGV_ARRAY_INIT;
        struct strbuf cmd_stdout = STRBUF_INIT;
        struct strbuf summary = STRBUF_INIT;
        char *summary_content;
@@ -735,23 +734,21 @@ static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitt
        argv_array_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s",
                         s->index_file);
 
-       argv_array_push(&argv, "submodule");
-       argv_array_push(&argv, "summary");
-       argv_array_push(&argv, uncommitted ? "--files" : "--cached");
-       argv_array_push(&argv, "--for-status");
-       argv_array_push(&argv, "--summary-limit");
-       argv_array_pushf(&argv, "%d", s->submodule_summary);
+       argv_array_push(&sm_summary.args, "submodule");
+       argv_array_push(&sm_summary.args, "summary");
+       argv_array_push(&sm_summary.args, uncommitted ? "--files" : "--cached");
+       argv_array_push(&sm_summary.args, "--for-status");
+       argv_array_push(&sm_summary.args, "--summary-limit");
+       argv_array_pushf(&sm_summary.args, "%d", s->submodule_summary);
        if (!uncommitted)
-               argv_array_push(&argv, s->amend ? "HEAD^" : "HEAD");
+               argv_array_push(&sm_summary.args, s->amend ? "HEAD^" : "HEAD");
 
-       sm_summary.argv = argv.argv;
        sm_summary.git_cmd = 1;
        sm_summary.no_stdin = 1;
        fflush(s->fp);
        sm_summary.out = -1;
 
        run_command(&sm_summary);
-       argv_array_clear(&argv);
 
        len = strbuf_read(&cmd_stdout, sm_summary.out, 1024);