Compare commits

..

43 Commits

Author SHA1 Message Date
49c3e92634 Git 2.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-29 10:48:45 -07:00
ebc2e5a593 Merge branch 'jk/pack-objects-no-bitmap-when-splitting' into maint
* jk/pack-objects-no-bitmap-when-splitting:
  pack-objects: turn off bitmaps when we split packs
2014-10-29 10:35:17 -07:00
9db1838705 Merge branch 'da/mergetool-meld' into maint
* da/mergetool-meld:
  mergetools/meld: make usage of `--output` configurable and more robust
2014-10-29 10:35:16 -07:00
af1b4e350f Merge branch 'rm/gitweb-start-form' into maint
* rm/gitweb-start-form:
  gitweb: use start_form, not startform that was removed in CGI.pm 4.04
2014-10-29 10:35:16 -07:00
27c31d2088 Merge branch 'bc/asciidoc-pretty-formats-fix' into maint
* bc/asciidoc-pretty-formats-fix:
  Documentation: fix misrender of pretty-formats in Asciidoctor
2014-10-29 10:35:10 -07:00
a8f01f87d0 Merge branch 'rs/daemon-fixes' into maint
* rs/daemon-fixes:
  daemon: remove write-only variable maxfd
  daemon: fix error message after bind()
  daemon: handle gethostbyname() error
2014-10-29 10:35:09 -07:00
2113471478 pack-objects: turn off bitmaps when we split packs
If a pack.packSizeLimit is set, we may split the pack data
across multiple packfiles. This means we cannot generate
.bitmap files, as they require that all of the reachable
objects are in the same pack. We check that condition when
we are generating the list of objects to pack (and disable
bitmaps if we are not packing everything), but we forgot to
update it when we notice that we needed to split (which
doesn't happen until the actual write phase).

The resulting bitmaps are quite bogus (they mention entries
that do not exist in the pack!) and can cause a fetch or
push to send insufficient objects.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-19 15:08:38 -07:00
4750f4b962 gitweb: use start_form, not startform that was removed in CGI.pm 4.04
CGI.pm 4.04 removed the startform method, which had previously been
deprecated in favour of start_form.  Changes file for CGI.pm says:

    4.04 2014-09-04
     [ REMOVED / DEPRECATIONS ]
	- startform and endform methods removed (previously deprecated,
	  you should be using the start_form and end_form methods)

Signed-off-by: Roland Mas <lolando@debian.org>
Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-16 13:12:34 -07:00
b12d04503b mergetools/meld: make usage of --output configurable and more robust
Older versions of meld listed --output in `meld --help`.
Newer versions only mention `meld [OPTIONS...]`.
Improve the checks to catch these newer versions.

Add a `mergetool.meld.hasOutput` configuration to allow
overriding the heuristic.

Reported-by: Andrey Novoseltsev <novoselt@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-16 11:58:11 -07:00
c30c43c07d Documentation: fix misrender of pretty-formats in Asciidoctor
Neither the AsciiDoc nor the Asciidoctor documentation specify whether
the same number of delimiter characters must be used to end a block as
to begin it, although both sets of documentation show exactly matching
pairs.  AsciiDoc allows mismatches, but AsciiDoctor apparently does not.
Adjust the pretty formats documentation to use matching pairs to prevent
a misrendering where the remainder of the document was rendered as a
listing block.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-08 13:51:46 -07:00
3c2dc76f01 Merge branch 'maint-2.0' into maint
* maint-2.0:
  git-tag.txt: Add a missing hyphen to `-s`
2014-10-07 13:40:51 -07:00
76f8611a5f Merge branch 'maint-1.9' into maint-2.0
* maint-1.9:
  git-tag.txt: Add a missing hyphen to `-s`
2014-10-07 13:40:39 -07:00
9181365b85 Merge branch 'maint-1.8.5' into maint-1.9
* maint-1.8.5:
  git-tag.txt: Add a missing hyphen to `-s`
2014-10-07 13:40:19 -07:00
b6e8269e9b Merge branch 'jk/mbox-from-line' into 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 to
"git am" used to lose such a line.

* jk/mbox-from-line:
  mailinfo: work around -Wstring-plus-int warning
  mailinfo: make ">From" in-body header check more robust
2014-10-07 13:39:27 -07:00
eeff891ac7 git-tag.txt: Add a missing hyphen to -s
Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-07 11:08:06 -07:00
107efbeb24 daemon: remove write-only variable maxfd
It became unused when 6573faff (NO_IPV6 support for git daemon) replaced
select() with poll().

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-01 13:34:56 -07:00
9d1b9aa9e1 daemon: fix error message after bind()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-01 13:34:54 -07:00
eb6c403500 daemon: handle gethostbyname() error
If the user-supplied hostname can't be found then we should not use it.
We already avoid doing that in the non-NO_IPV6 case by checking if the
return value of getaddrinfo() is zero (success).  Do the same in the
NO_IPV6 case and make sure the return value of gethostbyname() isn't
NULL before dereferencing this pointer.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-01 13:34:53 -07:00
80b616d04b Git 2.1.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-29 22:15:00 -07:00
46c8f859b7 Merge branch 'jk/fsck-exit-code-fix' into maint
"git fsck" failed to report that it found corrupt objects via its
exit status in some cases.

* jk/fsck-exit-code-fix:
  fsck: return non-zero status on missing ref tips
  fsck: exit with non-zero status upon error from fsck_obj()
2014-09-29 22:10:55 -07:00
102edda4df Merge branch 'ta/config-add-to-empty-or-true-fix' into maint
"git config --add section.var val" used to lose existing
section.var whose value was an empty string.

* ta/config-add-to-empty-or-true-fix:
  config: avoid a funny sentinel value "a^"
  make config --add behave correctly for empty and NULL values
2014-09-29 22:10:25 -07:00
421ec4f8d1 Merge branch 'mk/reachable-protect-detached-head' into maint
Reachability check (used in "git prune" and friends) did not add a
detached HEAD as a starting point to traverse objects still in use.

* mk/reachable-protect-detached-head:
  reachable.c: add HEAD to reachability starting commits
2014-09-29 22:10:04 -07:00
5b830a8588 Merge branch 'mb/fast-import-delete-root' into maint
An attempt to remove the entire tree in the "git fast-import" input
stream caused it to misbehave.

* mb/fast-import-delete-root:
  fast-import: fix segfault in store_tree()
  t9300: test filedelete command
2014-09-29 22:09:48 -07:00
46092ebf22 Merge branch 'jk/index-pack-threading-races' into maint
When receiving an invalid pack stream that records the same object
twice, multiple threads got confused due to a race.

* jk/index-pack-threading-races:
  index-pack: fix race condition with duplicate bases
2014-09-29 22:09:24 -07:00
060517093e Merge branch 'jk/send-pack-many-refspecs' into maint
"git push" over HTTP transport had an artificial limit on number of
refs that can be pushed imposed by the command line length.

* jk/send-pack-many-refspecs:
  send-pack: take refspecs over stdin
2014-09-29 22:08:17 -07:00
e7867e80f0 Merge branch 'so/rebase-doc' into maint
* so/rebase-doc:
  Documentation/git-rebase.txt: <upstream> must be given to specify <branch>
  Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-op
2014-09-29 22:08:12 -07:00
62b553cdd6 Merge branch 'maint' of git://github.com/git-l10n/git-po into maint
* 'maint' of git://github.com/git-l10n/git-po:
  l10n: de.po: use comma before "um"
  l10n: de.po: change Email to E-Mail
  po/TEAMS: add new member to German translation team
2014-09-28 00:02:57 -07:00
061540fcf7 l10n: de.po: use comma before "um"
This patch adds a comma before the "um". See:
http://www.duden.de/sprachwissen/rechtschreibregeln/komma#K117

Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-09-25 20:26:27 +02:00
f51ccda810 l10n: de.po: change Email to E-Mail
Change all Email to E-Mail, as this is the correct form in German.

Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-09-25 20:25:55 +02:00
89a0ead829 po/TEAMS: add new member to German translation team
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-09-25 20:25:30 +02:00
85de86a16b mailinfo: work around -Wstring-plus-int warning
The just-released Apple Xcode 6.0.1 has -Wstring-plus-int enabled by
default which complains about pointer arithmetic applied to a string
literal:

    builtin/mailinfo.c:303:24: warning:
        adding 'long' to a string does not append to the string
            return !memcmp(SAMPLE + (cp - line), cp, strlen(SAMPLE) ...
                           ~~~~~~~^~~~~~~~~~~~~

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-22 13:46:43 -07:00
95c68267ff Documentation/git-rebase.txt: <upstream> must be given to specify <branch>
Current syntax description makes one wonder if there is any
syntactic way to distinguish between <branch> and <upstream> so that
one can specify <branch> but not <upstream>, but that is not the
case.

Make it explicit that these arguments are positional, i.e. the
earlier ones cannot be omitted if you want to give later ones.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-16 11:27:12 -07:00
2da1f36671 mailinfo: make ">From" in-body header check more robust
Since commit 81c5cf7 (mailinfo: skip bogus UNIX From line inside
body, 2006-05-21), we have treated lines like ">From" in the body as
headers. This makes "git am" work for people who erroneously paste
the whole output from format-patch:

  From 12345abcd...fedcba543210 Mon Sep 17 00:00:00 2001
  From: them
  Subject: [PATCH] whatever

into their email body (assuming that an mbox writer then quotes
"From" as ">From", as otherwise we would actually mailsplit on the
in-body line).

However, this has false positives if somebody actually has a commit
body that starts with "From "; in this case we erroneously remove
the line entirely from the commit message. We can make this check
more robust by making sure the line actually looks like a real mbox
"From" line.

Inspect the line that begins with ">From " a more carefully to only
skip lines that match the expected pattern (note that the datestamp
part of the format-patch output is designed to be kept constant to
help those who write magic(5) entries).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-16 11:05:46 -07:00
30d1038d1b fsck: return non-zero status on missing ref tips
Fsck tries hard to detect missing objects, and will complain
(and exit non-zero) about any inter-object links that are
missing. However, it will not exit non-zero for any missing
ref tips, meaning that a severely broken repository may
still pass "git fsck && echo ok".

The problem is that we use for_each_ref to iterate over the
ref tips, which hides broken tips. It does at least print an
error from the refs.c code, but fsck does not ever see the
ref and cannot note the problem in its exit code. We can solve
this by using for_each_rawref and noting the error ourselves.

In addition to adding tests for this case, we add tests for
all types of missing-object links (all of which worked, but
which we were not testing).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-12 10:45:49 -07:00
c1063be2a3 config: avoid a funny sentinel value "a^"
Introduce CONFIG_REGEX_NONE as a more explicit sentinel value to say
"we do not want to replace any existing entry" and use it in the
implementation of "git config --add".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-11 16:33:54 -07:00
2e770fe47e fsck: exit with non-zero status upon error from fsck_obj()
Upon finding a corrupt loose object, we forgot to note the error to
signal it with the exit status of the entire process.

[jc: adjusted t1450 and added another test]

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-10 09:40:53 -07:00
c40fdd01dd reachable.c: add HEAD to reachability starting commits
HEAD is not explicitly used as a starting commit for
calculating reachability, so if it's detached and reflogs
are disabled it may be pruned.

Add tests which demonstrate it. Test 'prune: prune former HEAD after checking
out branch' also reverts changes to repository.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-03 10:47:44 -07:00
ab791dd138 index-pack: fix race condition with duplicate bases
When we are resolving deltas in an indexed pack, we do it by
first selecting a potential base (either one stored in full
in the pack, or one created by resolving another delta), and
then resolving any deltas that use that base.  When we
resolve a particular delta, we flip its "real_type" field
from OBJ_{REF,OFS}_DELTA to whatever the real type is.

We assume that traversing the objects this way will visit
each delta only once. This is correct for most packs; we
visit the delta only when we process its base, and each
object (and thus each base) appears only once. However, if a
base object appears multiple times in the pack, we will try
to resolve any deltas based on it once for each instance.

We can detect this case by noting that a delta we are about
to resolve has already had its real_type field flipped, and
we already do so with an assert().  However, if multiple
threads are in use, we may race with another thread on
comparing and flipping the field. We need to synchronize the
access.

The right mechanism for doing this is a compare-and-swap (we
atomically "claim" the delta for our own and find out
whether our claim was successful). We can implement this
in C by using a pthread mutex to protect the operation. This
is not the fastest way of doing a compare-and-swap; many
processors provide instructions for this, and gcc and other
compilers provide builtins to access them. However, some
experiments showed that lock contention does not cause a
significant slowdown here. Adding c-a-s support for many
compilers would increase the maintenance burden (and we
would still end up including the pthread version as a
fallback).

Note that we only need to touch the OBJ_REF_DELTA codepath
here. An OBJ_OFS_DELTA object points to its base using an
offset, and therefore has only one base, even if another
copy of that base object appears in the pack (we do still
touch it briefly because the setting of real_type is
factored out of resolve_data).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29 14:50:43 -07:00
2668d692eb fast-import: fix segfault in store_tree()
Branch tree is NULLified by filedelete command if we are trying
to delete root tree. Add sanity check and use load_tree() in that case.

Signed-off-by: Maxim Bublis <satori@yandex-team.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29 10:31:14 -07:00
8d30d8a89a t9300: test filedelete command
Add new fast-import test series for filedelete command.

Signed-off-by: Maxim Bublis <satori@yandex-team.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29 10:30:14 -07:00
26be19ba8d send-pack: take refspecs over stdin
Pushing a large number of refs works over most transports,
because we implement send-pack as an internal function.
However, it can sometimes fail when pushing over http,
because we have to spawn "git send-pack --stateless-rpc" to
do the heavy lifting, and we pass each refspec on the
command line. This can cause us to overflow the OS limits on
the size of the command line for a large push.

We can solve this by giving send-pack a --stdin option and
using it from remote-curl.  We already dealt with this on
the fetch-pack side in 078b895 (fetch-pack: new --stdin
option to read refs from stdin, 2012-04-02). The stdin
option (and in particular, its use of packet-lines for
stateless-rpc input) is modeled after that solution.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 12:58:02 -07:00
c8466645ed make config --add behave correctly for empty and NULL values
Currently if we have a config file like,
[foo]
        baz
        bar =

and we try something like, "git config --add foo.baz roll", Git will
segfault. Moreover, for "git config --add foo.bar roll", it will
overwrite the original value instead of appending after the existing
empty value.

The problem lies with the regexp used for simulating --add in
`git_config_set_multivar_in_file()`, "^$", which in ideal case should
not match with any string but is true for empty strings. Instead use a
regexp like "a^" which can not be true for any string, empty or not.

For removing the segfault add a check for NULL values in `matches()` in
config.c.

Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-18 10:45:59 -07:00
2d26d533a0 Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-op
"Current branch is a descendant of the commit you are rebasing onto"
does not necessarily mean "rebase" requires "--force".  For a plain
vanilla "history flattening" rebase, the rebase can be done without
forcing if there is a merge between the tip of the branch being
rebased and the commit you are rebasing onto, even if the tip is
descendant of the other.

[jc: reworded both the text and the log description]

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-12 13:37:45 -07:00
39 changed files with 661 additions and 104 deletions

View File

@ -0,0 +1,20 @@
Git v2.1.2 Release Notes
========================
* "git push" over HTTP transport had an artificial limit on number of
refs that can be pushed imposed by the command line length.
* When receiving an invalid pack stream that records the same object
twice, multiple threads got confused due to a race.
* An attempt to remove the entire tree in the "git fast-import" input
stream caused it to misbehave.
* Reachability check (used in "git prune" and friends) did not add a
detached HEAD as a starting point to traverse objects still in use.
* "git config --add section.var val" used to lose existing
section.var whose value was an empty string.
* "git fsck" failed to report that it found corrupt objects via its
exit status in some cases.

View File

@ -0,0 +1,26 @@
Git v2.1.3 Release Notes
========================
* 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 to
"git am" used to lose such a line.
* "git daemon" (with NO_IPV6 build configuration) used to incorrectly
use the hostname even when gethostbyname() reported that the given
hostname is not found.
* Newer versions of 'meld' breaks the auto-detection we use to see if
they are new enough to support the `--output` option.
* "git pack-objects" forgot to disable the codepath to generate
object recheability bitmap when it needs to split the resulting
pack.
* "gitweb" used deprecated CGI::startfrom, which was removed from
CGI.pm as of 4.04; use CGI::start_from instead.
* "git log" documentation had an example section marked up not
quite correctly, which passed AsciiDoc but failed with
AsciiDoctor.
Also contains some documentation updates.

View File

@ -1754,6 +1754,15 @@ mergetool.<tool>.trustExitCode::
if the file has been updated, otherwise the user is prompted to
indicate the success of the merge.
mergetool.meld.hasOutput::
Older versions of `meld` do not support the `--output` option.
Git will attempt to detect whether `meld` supports `--output`
by inspecting the output of `meld --help`. Configuring
`mergetool.meld.hasOutput` will make Git skip these checks and
use the configured value instead. Setting `mergetool.meld.hasOutput`
to `true` tells Git to unconditionally use the `--output` option,
and `false` avoids using `--output`.
mergetool.keepBackup::
After performing a merge, the original file with conflict markers
can be saved as a file with a `.orig` extension. If this variable

View File

@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
[<upstream>] [<branch>]
[<upstream> [<branch>]]
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
--root [<branch>]
'git rebase' --continue | --skip | --abort | --edit-todo
@ -316,11 +316,8 @@ which makes little sense.
-f::
--force-rebase::
Force the rebase even if the current branch is a descendant
of the commit you are rebasing onto. Normally non-interactive rebase will
exit with the message "Current branch is up to date" in such a
situation.
Incompatible with the --interactive option.
Force a rebase even if the current branch is up-to-date and
the command without `--force` would return without doing anything.
+
You may find this (or --no-ff with an interactive rebase) helpful after
reverting a topic branch merge, as this option recreates the topic branch with

View File

@ -35,6 +35,16 @@ OPTIONS
Instead of explicitly specifying which refs to update,
update all heads that locally exist.
--stdin::
Take the list of refs from stdin, one per line. If there
are refs specified on the command line in addition to this
option, then the refs from stdin are processed after those
on the command line.
+
If '--stateless-rpc' is specified together with this option then
the list of refs must be in packet format (pkt-line). Each ref must
be in a separate packet, and the list must end with a flush packet.
--dry-run::
Do everything except actually send the updates.
@ -77,7 +87,8 @@ this flag.
Without '--all' and without any '<ref>', the heads that exist
both on the local side and on the remote side are updated.
When one or more '<ref>' are specified explicitly, it can be either a
When one or more '<ref>' are specified explicitly (whether on the
command line or via `--stdin`), it can be either a
single pattern, or a pair of such pattern separated by a colon
":" (this means that a ref name cannot have a colon in it). A
single pattern '<name>' is just a shorthand for '<name>:<name>'.

View File

@ -42,7 +42,7 @@ committer identity for the current user is used to find the
GnuPG key for signing. The configuration variable `gpg.program`
is used to specify custom GnuPG binary.
Tag objects (created with `-a`, `s`, or `-u`) are called "annotated"
Tag objects (created with `-a`, `-s`, or `-u`) are called "annotated"
tags; they contain a creation date, the tagger name and e-mail, a
tagging message, and an optional GnuPG signature. Whereas a
"lightweight" tag is simply a name for an object (usually a commit

View File

@ -43,9 +43,11 @@ 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.1/git.html[documentation for release 2.1.1]
* link:v2.1.3/git.html[documentation for release 2.1.3]
* release notes for
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].

View File

@ -95,7 +95,7 @@ would show something like this:
The author of fe6e0ee was Junio C Hamano, 23 hours ago
The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
--------
-------
+
The placeholders are:

View File

@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=v2.1.1
DEF_VER=v2.1.3
LF='
'

View File

@ -1 +1 @@
Documentation/RelNotes/2.1.1.txt
Documentation/RelNotes/2.1.3.txt

View File

@ -586,7 +586,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
check_argc(argc, 2, 2);
value = normalize_value(argv[0], argv[1]);
return git_config_set_multivar_in_file(given_config_source.file,
argv[0], value, "^$", 0);
argv[0], value,
CONFIG_REGEX_NONE, 0);
}
else if (actions == ACTION_REPLACE_ALL) {
check_write();

View File

@ -388,7 +388,8 @@ static void fsck_sha1_list(void)
unsigned char *sha1 = entry->sha1;
sha1_list.entry[i] = NULL;
fsck_sha1(sha1);
if (fsck_sha1(sha1))
errors_found |= ERROR_OBJECT;
free(entry);
}
sha1_list.nr = 0;
@ -488,6 +489,7 @@ static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int f
obj = parse_object(sha1);
if (!obj) {
error("%s: invalid sha1 pointer %s", refname, sha1_to_hex(sha1));
errors_found |= ERROR_REACHABLE;
/* We'll continue with the rest despite the error.. */
return 0;
}
@ -504,7 +506,7 @@ static void get_default_heads(void)
{
if (head_points_at && !is_null_sha1(head_sha1))
fsck_handle_ref("HEAD", head_sha1, 0, NULL);
for_each_ref(fsck_handle_ref, NULL);
for_each_rawref(fsck_handle_ref, NULL);
if (include_reflogs)
for_each_reflog(fsck_handle_reflog, NULL);

View File

@ -112,6 +112,10 @@ static pthread_mutex_t deepest_delta_mutex;
#define deepest_delta_lock() lock_mutex(&deepest_delta_mutex)
#define deepest_delta_unlock() unlock_mutex(&deepest_delta_mutex)
static pthread_mutex_t type_cas_mutex;
#define type_cas_lock() lock_mutex(&type_cas_mutex)
#define type_cas_unlock() unlock_mutex(&type_cas_mutex)
static pthread_key_t key;
static inline void lock_mutex(pthread_mutex_t *mutex)
@ -135,6 +139,7 @@ static void init_thread(void)
init_recursive_mutex(&read_mutex);
pthread_mutex_init(&counter_mutex, NULL);
pthread_mutex_init(&work_mutex, NULL);
pthread_mutex_init(&type_cas_mutex, NULL);
if (show_stat)
pthread_mutex_init(&deepest_delta_mutex, NULL);
pthread_key_create(&key, NULL);
@ -157,6 +162,7 @@ static void cleanup_thread(void)
pthread_mutex_destroy(&read_mutex);
pthread_mutex_destroy(&counter_mutex);
pthread_mutex_destroy(&work_mutex);
pthread_mutex_destroy(&type_cas_mutex);
if (show_stat)
pthread_mutex_destroy(&deepest_delta_mutex);
for (i = 0; i < nr_threads; i++)
@ -862,7 +868,6 @@ static void resolve_delta(struct object_entry *delta_obj,
{
void *base_data, *delta_data;
delta_obj->real_type = base->obj->real_type;
if (show_stat) {
delta_obj->delta_depth = base->obj->delta_depth + 1;
deepest_delta_lock();
@ -888,6 +893,26 @@ static void resolve_delta(struct object_entry *delta_obj,
counter_unlock();
}
/*
* Standard boolean compare-and-swap: atomically check whether "*type" is
* "want"; if so, swap in "set" and return true. Otherwise, leave it untouched
* and return false.
*/
static int compare_and_swap_type(enum object_type *type,
enum object_type want,
enum object_type set)
{
enum object_type old;
type_cas_lock();
old = *type;
if (old == want)
*type = set;
type_cas_unlock();
return old == want;
}
static struct base_data *find_unresolved_deltas_1(struct base_data *base,
struct base_data *prev_base)
{
@ -915,7 +940,10 @@ static struct base_data *find_unresolved_deltas_1(struct base_data *base,
struct object_entry *child = objects + deltas[base->ref_first].obj_no;
struct base_data *result = alloc_base_data();
assert(child->real_type == OBJ_REF_DELTA);
if (!compare_and_swap_type(&child->real_type, OBJ_REF_DELTA,
base->obj->real_type))
die("BUG: child->real_type != OBJ_REF_DELTA");
resolve_delta(child, base, result);
if (base->ref_first == base->ref_last && base->ofs_last == -1)
free_base_data(base);
@ -929,6 +957,7 @@ static struct base_data *find_unresolved_deltas_1(struct base_data *base,
struct base_data *result = alloc_base_data();
assert(child->real_type == OBJ_OFS_DELTA);
child->real_type = base->obj->real_type;
resolve_delta(child, base, result);
if (base->ofs_first == base->ofs_last)
free_base_data(base);

View File

@ -288,6 +288,22 @@ static inline int cmp_header(const struct strbuf *line, const char *hdr)
line->buf[len] == ':' && isspace(line->buf[len + 1]);
}
static int is_format_patch_separator(const char *line, int len)
{
static const char SAMPLE[] =
"From e6807f3efca28b30decfecb1732a56c7db1137ee Mon Sep 17 00:00:00 2001\n";
const char *cp;
if (len != strlen(SAMPLE))
return 0;
if (!skip_prefix(line, "From ", &cp))
return 0;
if (strspn(cp, "0123456789abcdef") != 40)
return 0;
cp += 40;
return !memcmp(SAMPLE + (cp - line), cp, strlen(SAMPLE) - (cp - line));
}
static int check_header(const struct strbuf *line,
struct strbuf *hdr_data[], int overwrite)
{
@ -329,7 +345,7 @@ static int check_header(const struct strbuf *line,
/* for inbody stuff */
if (starts_with(line->buf, ">From") && isspace(line->buf[5])) {
ret = 1; /* Should this return 0? */
ret = is_format_patch_separator(line->buf + 1, line->len - 1);
goto check_header_out;
}
if (starts_with(line->buf, "[PATCH]") && isspace(line->buf[7])) {

View File

@ -812,6 +812,7 @@ static void write_pack_file(void)
fixup_pack_header_footer(fd, sha1, pack_tmp_name,
nr_written, sha1, offset);
close(fd);
write_bitmap_index = 0;
}
if (!pack_to_stdout) {

View File

@ -110,6 +110,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
int flags;
unsigned int reject_reasons;
int progress = -1;
int from_stdin = 0;
struct push_cas_option cas = {0};
argv++;
@ -169,6 +170,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
args.stateless_rpc = 1;
continue;
}
if (!strcmp(arg, "--stdin")) {
from_stdin = 1;
continue;
}
if (!strcmp(arg, "--helper-status")) {
helper_status = 1;
continue;
@ -201,6 +206,28 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
}
if (!dest)
usage(send_pack_usage);
if (from_stdin) {
struct argv_array all_refspecs = ARGV_ARRAY_INIT;
for (i = 0; i < nr_refspecs; i++)
argv_array_push(&all_refspecs, refspecs[i]);
if (args.stateless_rpc) {
const char *buf;
while ((buf = packet_read_line(0, NULL)))
argv_array_push(&all_refspecs, buf);
} else {
struct strbuf line = STRBUF_INIT;
while (strbuf_getline(&line, stdin, '\n') != EOF)
argv_array_push(&all_refspecs, line.buf);
strbuf_release(&line);
}
refspecs = all_refspecs.argv;
nr_refspecs = all_refspecs.argc;
}
/*
* --all and --mirror are incompatible; neither makes sense
* with any refspecs.

View File

@ -1281,6 +1281,8 @@ extern int update_server_info(int);
#define CONFIG_INVALID_PATTERN 6
#define CONFIG_GENERIC_ERROR 7
#define CONFIG_REGEX_NONE ((void *)1)
struct git_config_source {
unsigned int use_stdin:1;
const char *file;

View File

@ -1236,10 +1236,15 @@ static struct {
static int matches(const char *key, const char *value)
{
return !strcmp(key, store.key) &&
(store.value_regex == NULL ||
(store.do_not_match ^
!regexec(store.value_regex, value, 0, NULL, 0)));
if (strcmp(key, store.key))
return 0; /* not ours */
if (!store.value_regex)
return 1; /* always matches */
if (store.value_regex == CONFIG_REGEX_NONE)
return 0; /* never matches */
return store.do_not_match ^
(value && !regexec(store.value_regex, value, 0, NULL, 0));
}
static int store_aux(const char *key, const char *value, void *cb)
@ -1501,6 +1506,8 @@ out_free_ret_1:
/*
* If value==NULL, unset in (remove from) config,
* if value_regex!=NULL, disregard key/value pairs where value does not match.
* if value_regex==CONFIG_REGEX_NONE, do not match any existing values
* (only add a new one)
* if multi_replace==0, nothing, or only one matching key/value is replaced,
* else all matching key/values (regardless how many) are removed,
* before the new pair is written.
@ -1584,6 +1591,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
if (value_regex == NULL)
store.value_regex = NULL;
else if (value_regex == CONFIG_REGEX_NONE)
store.value_regex = CONFIG_REGEX_NONE;
else {
if (value_regex[0] == '!') {
store.do_not_match = 1;
@ -1615,7 +1624,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
if (git_config_from_file(store_aux, config_filename, NULL)) {
error("invalid config file %s", config_filename);
free(store.key);
if (store.value_regex != NULL) {
if (store.value_regex != NULL &&
store.value_regex != CONFIG_REGEX_NONE) {
regfree(store.value_regex);
free(store.value_regex);
}
@ -1624,7 +1634,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
}
free(store.key);
if (store.value_regex != NULL) {
if (store.value_regex != NULL &&
store.value_regex != CONFIG_REGEX_NONE) {
regfree(store.value_regex);
free(store.value_regex);
}

View File

@ -573,20 +573,21 @@ static void parse_host_arg(char *extra_args, int buflen)
static char addrbuf[HOST_NAME_MAX + 1];
hent = gethostbyname(hostname);
if (hent) {
ap = hent->h_addr_list;
memset(&sa, 0, sizeof sa);
sa.sin_family = hent->h_addrtype;
sa.sin_port = htons(0);
memcpy(&sa.sin_addr, *ap, hent->h_length);
ap = hent->h_addr_list;
memset(&sa, 0, sizeof sa);
sa.sin_family = hent->h_addrtype;
sa.sin_port = htons(0);
memcpy(&sa.sin_addr, *ap, hent->h_length);
inet_ntop(hent->h_addrtype, &sa.sin_addr,
addrbuf, sizeof(addrbuf));
inet_ntop(hent->h_addrtype, &sa.sin_addr,
addrbuf, sizeof(addrbuf));
free(canon_hostname);
canon_hostname = xstrdup(hent->h_name);
free(ip_address);
ip_address = xstrdup(addrbuf);
free(canon_hostname);
canon_hostname = xstrdup(hent->h_name);
free(ip_address);
ip_address = xstrdup(addrbuf);
}
#endif
}
}
@ -834,7 +835,6 @@ static const char *ip2str(int family, struct sockaddr *sin, socklen_t len)
static int setup_named_sock(char *listen_addr, int listen_port, struct socketlist *socklist)
{
int socknum = 0;
int maxfd = -1;
char pbuf[NI_MAXSERV];
struct addrinfo hints, *ai0, *ai;
int gai;
@ -902,9 +902,6 @@ static int setup_named_sock(char *listen_addr, int listen_port, struct socketlis
ALLOC_GROW(socklist->list, socklist->nr + 1, socklist->alloc);
socklist->list[socklist->nr++] = sockfd;
socknum++;
if (maxfd < sockfd)
maxfd = sockfd;
}
freeaddrinfo(ai0);
@ -943,7 +940,7 @@ static int setup_named_sock(char *listen_addr, int listen_port, struct socketlis
}
if ( bind(sockfd, (struct sockaddr *)&sin, sizeof sin) < 0 ) {
logerror("Could not listen to %s: %s",
logerror("Could not bind to %s: %s",
ip2str(AF_INET, (struct sockaddr *)&sin, sizeof(sin)),
strerror(errno));
close(sockfd);

View File

@ -1422,7 +1422,7 @@ static void mktree(struct tree_content *t, int v, struct strbuf *b)
static void store_tree(struct tree_entry *root)
{
struct tree_content *t = root->tree;
struct tree_content *t;
unsigned int i, j, del;
struct last_object lo = { STRBUF_INIT, 0, 0, /* no_swap */ 1 };
struct object_entry *le = NULL;
@ -1430,6 +1430,10 @@ static void store_tree(struct tree_entry *root)
if (!is_null_sha1(root->versions[1].sha1))
return;
if (!root->tree)
load_tree(root);
t = root->tree;
for (i = 0; i < t->entry_count; i++) {
if (t->entries[i]->tree)
store_tree(t->entries[i]);

View File

@ -4100,7 +4100,7 @@ sub print_search_form {
if ($use_pathinfo) {
$action .= "/".esc_url($project);
}
print $cgi->startform(-method => "get", -action => $action) .
print $cgi->start_form(-method => "get", -action => $action) .
"<div class=\"search\">\n" .
(!$use_pathinfo &&
$cgi->input({-name=>"p", -value=>$project, -type=>"hidden"}) . "\n") .
@ -5510,7 +5510,7 @@ sub git_project_search_form {
}
print "<div class=\"projsearch\">\n";
print $cgi->startform(-method => 'get', -action => $my_uri) .
print $cgi->start_form(-method => 'get', -action => $my_uri) .
$cgi->hidden(-name => 'a', -value => 'project_list') . "\n";
print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
if (defined $project_filter);

View File

@ -18,13 +18,18 @@ merge_cmd () {
check_unchanged
}
# Check whether 'meld --output <file>' is supported
# Check whether we should use 'meld --output <file>'
check_meld_for_output_version () {
meld_path="$(git config mergetool.meld.path)"
meld_path="${meld_path:-meld}"
if "$meld_path" --help 2>&1 | grep -e --output >/dev/null
if meld_has_output_option=$(git config --bool mergetool.meld.hasOutput)
then
: use configured value
elif "$meld_path" --help 2>&1 |
grep -e '--output=' -e '\[OPTION\.\.\.\]' >/dev/null
then
: old ones mention --output and new ones just say OPTION...
meld_has_output_option=true
else
meld_has_output_option=false

View File

@ -17,6 +17,7 @@ Members: Thomas Rast <tr@thomasrast.ch>
Christian Stimming <stimming@tuhh.de>
Phillip Szelat <phillip.szelat@gmail.com>
Matthias Rüster <matthias.ruester@gmail.com>
Magnus Görlitz <magnus.goerlitz@googlemail.com>
Language: fr (French)
Repository: https://github.com/jnavila/git

100
po/de.po
View File

@ -29,7 +29,7 @@ msgid ""
"'git commit -a'."
msgstr ""
"Korrigieren Sie dies im Arbeitsverzeichnis, und benutzen Sie\n"
"dann 'git add/rm <Datei>' um die Auflösung entsprechend zu markieren\n"
"dann 'git add/rm <Datei>', um die Auflösung entsprechend zu markieren\n"
"und zu committen, oder benutzen Sie 'git commit -a'."
#: archive.c:10
@ -619,7 +619,7 @@ msgstr "Fehler beim Erstellen des Pfades '%s'%s"
#: merge-recursive.c:703
#, c-format
msgid "Removing %s to make room for subdirectory\n"
msgstr "Entferne %s um Platz für Unterverzeichnis zu schaffen\n"
msgstr "Entferne %s, um Platz für Unterverzeichnis zu schaffen\n"
#: merge-recursive.c:717 merge-recursive.c:738
msgid ": perhaps a D/F conflict?"
@ -1037,7 +1037,7 @@ msgstr[1] "Ihr Branch ist vor '%s' um %d Commits.\n"
#: remote.c:1960
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (benutzen Sie \"git push\" um lokale Commits zu publizieren)\n"
msgstr " (benutzen Sie \"git push\", um lokale Commits zu publizieren)\n"
#: remote.c:1963
#, c-format
@ -1052,7 +1052,7 @@ msgstr[1] ""
#: remote.c:1971
msgid " (use \"git pull\" to update your local branch)\n"
msgstr ""
" (benutzen Sie \"git pull\" um Ihren lokalen Branch zu aktualisieren)\n"
" (benutzen Sie \"git pull\", um Ihren lokalen Branch zu aktualisieren)\n"
#: remote.c:1974
#, c-format
@ -1072,7 +1072,7 @@ msgstr[1] ""
#: remote.c:1984
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
msgstr ""
" (benutzen Sie \"git pull\" um Ihren Branch mit dem Remote-Branch "
" (benutzen Sie \"git pull\", um Ihren Branch mit dem Remote-Branch "
"zusammenzuführen)\n"
#: run-command.c:80
@ -1136,7 +1136,7 @@ msgstr "Ihre lokalen Änderungen würden von \"revert\" überschrieben werden."
#: sequencer.c:233
msgid "Commit your changes or stash them to proceed."
msgstr ""
"Tragen Sie Ihre Änderungen ein oder benutzen Sie \"stash\" um fortzufahren."
"Tragen Sie Ihre Änderungen ein oder benutzen Sie \"stash\", um fortzufahren."
#: sequencer.c:250
msgid "Failed to lock HEAD during fast_forward_to"
@ -1488,18 +1488,18 @@ msgstr ""
#: wt-status.c:183
msgid " (use \"git add <file>...\" to mark resolution)"
msgstr ""
" (benutzen Sie \"git add/rm <Datei>...\" um die Auflösung zu markieren)"
" (benutzen Sie \"git add/rm <Datei>...\", um die Auflösung zu markieren)"
#: wt-status.c:185 wt-status.c:189
msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)"
msgstr ""
" (benutzen Sie \"git add/rm <Datei>...\" um die Auflösung entsprechend zu "
" (benutzen Sie \"git add/rm <Datei>...\", um die Auflösung entsprechend zu "
"markieren)"
#: wt-status.c:187
msgid " (use \"git rm <file>...\" to mark resolution)"
msgstr ""
" (benutzen Sie \"git add/rm <Datei>...\" um die Auflösung zu markieren)"
" (benutzen Sie \"git add/rm <Datei>...\", um die Auflösung zu markieren)"
#: wt-status.c:198
msgid "Changes to be committed:"
@ -1512,20 +1512,20 @@ msgstr "Änderungen, die nicht zum Commit vorgemerkt sind:"
#: wt-status.c:220
msgid " (use \"git add <file>...\" to update what will be committed)"
msgstr ""
" (benutzen Sie \"git add <Datei>...\" um die Änderungen zum Commit "
" (benutzen Sie \"git add <Datei>...\", um die Änderungen zum Commit "
"vorzumerken)"
#: wt-status.c:222
msgid " (use \"git add/rm <file>...\" to update what will be committed)"
msgstr ""
" (benutzen Sie \"git add/rm <Datei>...\" um die Änderungen zum Commit "
" (benutzen Sie \"git add/rm <Datei>...\", um die Änderungen zum Commit "
"vorzumerken)"
#: wt-status.c:223
msgid ""
" (use \"git checkout -- <file>...\" to discard changes in working directory)"
msgstr ""
" (benutzen Sie \"git checkout -- <Datei>...\" um die Änderungen im "
" (benutzen Sie \"git checkout -- <Datei>...\", um die Änderungen im "
"Arbeitsverzeichnis zu verwerfen)"
#: wt-status.c:225
@ -1538,7 +1538,7 @@ msgstr ""
#, c-format
msgid " (use \"git %s <file>...\" to include in what will be committed)"
msgstr ""
" (benutzen Sie \"git %s <Datei>...\" um die Änderungen zum Commit "
" (benutzen Sie \"git %s <Datei>...\", um die Änderungen zum Commit "
"vorzumerken)"
#: wt-status.c:252
@ -1653,7 +1653,7 @@ msgstr "Alle Konflikte sind behoben, aber Sie sind immer noch beim Merge."
#: wt-status.c:945
msgid " (use \"git commit\" to conclude merge)"
msgstr " (benutzen Sie \"git commit\" um den Merge abzuschließen)"
msgstr " (benutzen Sie \"git commit\", um den Merge abzuschließen)"
#: wt-status.c:955
msgid "You are in the middle of an am session."
@ -1670,12 +1670,12 @@ msgstr ""
#: wt-status.c:964
msgid " (use \"git am --skip\" to skip this patch)"
msgstr " (benutzen Sie \"git am --skip\" um diesen Patch auszulassen)"
msgstr " (benutzen Sie \"git am --skip\", um diesen Patch auszulassen)"
#: wt-status.c:966
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr ""
" (benutzen Sie \"git am --abort\" um den ursprünglichen Branch "
" (benutzen Sie \"git am --abort\", um den ursprünglichen Branch "
"wiederherzustellen)"
#: wt-status.c:1026 wt-status.c:1043
@ -1695,12 +1695,12 @@ msgstr ""
#: wt-status.c:1036
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (benutzen Sie \"git rebase --skip\" um diesen Patch auszulassen)"
msgstr " (benutzen Sie \"git rebase --skip\", um diesen Patch auszulassen)"
#: wt-status.c:1038
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr ""
" (benutzen Sie \"git rebase --abort\" um den ursprünglichen Branch "
" (benutzen Sie \"git rebase --abort\", um den ursprünglichen Branch "
"auszuchecken)"
#: wt-status.c:1051
@ -1739,7 +1739,7 @@ msgstr "Sie editieren gerade einen Commit während eines Rebase."
#: wt-status.c:1075
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
" (benutzen Sie \"git commit --amend\" um den aktuellen Commit nachzubessern)"
" (benutzen Sie \"git commit --amend\", um den aktuellen Commit nachzubessern)"
#: wt-status.c:1077
msgid ""
@ -1767,7 +1767,7 @@ msgstr ""
#: wt-status.c:1097
msgid " (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"
msgstr ""
" (benutzen Sie \"git cherry-pick --abort\" um die Cherry-Pick-Operation "
" (benutzen Sie \"git cherry-pick --abort\", um die Cherry-Pick-Operation "
"abzubrechen)"
#: wt-status.c:1106
@ -1788,7 +1788,7 @@ msgstr " (alle Konflikte behoben: führen Sie \"git revert --continue\" aus)"
#: wt-status.c:1116
msgid " (use \"git revert --abort\" to cancel the revert operation)"
msgstr ""
" (benutzen Sie \"git revert --abort\" um die Revert-Operation abzubrechen)"
" (benutzen Sie \"git revert --abort\", um die Revert-Operation abzubrechen)"
#: wt-status.c:1127
#, c-format
@ -1802,7 +1802,7 @@ msgstr "Sie sind gerade bei einer binären Suche."
#: wt-status.c:1134
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr ""
" (benutzen Sie \"git bisect reset\" um zum ursprünglichen Branch "
" (benutzen Sie \"git bisect reset\", um zum ursprünglichen Branch "
"zurückzukehren)"
#: wt-status.c:1309
@ -1855,7 +1855,7 @@ msgstr "Unbeobachtete Dateien nicht aufgelistet%s"
#: wt-status.c:1373
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 unbeobachteten Dateien anzuzeigen)"
#: wt-status.c:1379
msgid "No changes"
@ -2235,7 +2235,7 @@ msgstr[1] ""
#: builtin/apply.c:2818
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr "Kontext reduziert zu (%ld/%ld) um Patch-Bereich bei %d anzuwenden"
msgstr "Kontext reduziert zu (%ld/%ld), um Patch-Bereich bei %d anzuwenden"
#: builtin/apply.c:2824
#, c-format
@ -2691,7 +2691,7 @@ msgstr "Unterdrückt den Namen des Autors und den Zeitstempel (Standard: aus)"
#: builtin/blame.c:2514
msgid "Show author email instead of name (Default: off)"
msgstr "Zeigt anstatt des Namens die Email-Adresse des Autors (Standard: aus)"
msgstr "Zeigt anstatt des Namens die E-Mail-Adresse des Autors (Standard: aus)"
#: builtin/blame.c:2515
msgid "Ignore whitespace differences"
@ -3085,7 +3085,7 @@ msgstr "zu viele Branches für eine Umbenennen-Operation angegeben"
#: builtin/branch.c:952
msgid "too many branches to set new upstream"
msgstr "zu viele Branches angegeben um Upstream-Branch zu setzen"
msgstr "zu viele Branches angegeben, um Upstream-Branch zu setzen"
#: builtin/branch.c:956
#, c-format
@ -3108,7 +3108,7 @@ msgstr "Branch '%s' existiert nicht"
#: builtin/branch.c:975
msgid "too many branches to unset upstream"
msgstr ""
"zu viele Branches angegeben um Konfiguration zu Upstream-Branch zu entfernen"
"zu viele Branches angegeben, um Konfiguration zu Upstream-Branch zu entfernen"
#: builtin/branch.c:979
msgid "could not unset upstream of HEAD when it does not point to any branch."
@ -5071,7 +5071,7 @@ msgstr "gibt für jeden Commit das gesamte Verzeichnis aus"
#: builtin/fast-export.c:718
msgid "Use the done feature to terminate the stream"
msgstr "Benutzt die \"done\"-Funktion um den Strom abzuschließen"
msgstr "Benutzt die \"done\"-Funktion, um den Strom abzuschließen"
#: builtin/fast-export.c:719
msgid "Skip output of blob data"
@ -5268,7 +5268,7 @@ msgid ""
" 'git remote prune %s' to remove any old, conflicting branches"
msgstr ""
"Einige lokale Referenzen konnten nicht aktualisiert werden; versuchen Sie\n"
"'git remote prune %s' um jeden älteren, widersprüchlichen Branch zu löschen."
"'git remote prune %s', um jeden älteren, widersprüchlichen Branch zu löschen."
#: builtin/fetch.c:759
#, c-format
@ -6535,7 +6535,7 @@ msgstr "zeigt Patchformat anstatt des Standards (Patch + Zusammenfassung)"
#: builtin/log.c:1217
msgid "Messaging"
msgstr "Email-Einstellungen"
msgstr "E-Mail-Einstellungen"
#: builtin/log.c:1218
msgid "header"
@ -6543,11 +6543,11 @@ msgstr "Header"
#: builtin/log.c:1219
msgid "add email header"
msgstr "fügt Email-Header hinzu"
msgstr "fügt E-Mail-Header hinzu"
#: builtin/log.c:1220 builtin/log.c:1222
msgid "email"
msgstr "Email"
msgstr "E-Mail"
#: builtin/log.c:1220
msgid "add To: header"
@ -6573,7 +6573,7 @@ msgstr "message-id"
#: builtin/log.c:1228
msgid "make first mail a reply to <message-id>"
msgstr "macht aus erster Email eine Antwort zu <message-id>"
msgstr "macht aus erster E-Mail eine Antwort zu <message-id>"
#: builtin/log.c:1229 builtin/log.c:1232
msgid "boundary"
@ -6978,7 +6978,7 @@ msgstr "konnte nicht von '%s' lesen"
#, c-format
msgid "Not committing merge; use 'git commit' to complete the merge.\n"
msgstr ""
"Merge wurde nicht committet; benutzen Sie 'git commit' um den Merge "
"Merge wurde nicht committet; benutzen Sie 'git commit', um den Merge "
"abzuschließen.\n"
#: builtin/merge.c:809
@ -6990,7 +6990,7 @@ msgid ""
"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n"
msgstr ""
"Bitte geben Sie eine Commit-Beschreibung ein um zu erklären, warum dieser\n"
"Bitte geben Sie eine Commit-Beschreibung ein, um zu erklären, warum dieser\n"
"Merge erforderlich ist, insbesondere wenn es einen aktualisierten\n"
"Upstream-Branch mit einem Thema-Branch zusammenführt.\n"
"\n"
@ -7156,7 +7156,7 @@ msgstr "Merge mit Strategie %s fehlgeschlagen.\n"
#: builtin/merge.c:1539
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr "Benutzen Sie \"%s\" um die Auflösung per Hand vorzubereiten.\n"
msgstr "Benutzen Sie \"%s\", um die Auflösung per Hand vorzubereiten.\n"
#: builtin/merge.c:1551
#, c-format
@ -7299,7 +7299,7 @@ msgid "Please, stage your changes to .gitmodules or stash them to proceed"
msgstr ""
"Bitte merken Sie Ihre Änderungen in .gitmodules zum Commit vor oder "
"benutzen\n"
"Sie \"stash\" um fortzufahren."
"Sie \"stash\", um fortzufahren."
#: builtin/mv.c:156
#, c-format
@ -7368,7 +7368,7 @@ msgstr "zeigt nur Namen an (keine SHA-1)"
#: builtin/name-rev.c:310
msgid "only use tags to name the commits"
msgstr "verwendet nur Tags um die Commits zu benennen"
msgstr "verwendet nur Tags, um die Commits zu benennen"
#: builtin/name-rev.c:312
msgid "only use refs matching <pattern>"
@ -7621,7 +7621,7 @@ msgid ""
"existing notes"
msgstr ""
"Konnte Notizen nicht hinzufügen. Existierende Notizen für Objekt %s "
"gefunden. Verwenden Sie '-f' um die existierenden Notizen zu überschreiben."
"gefunden. Verwenden Sie '-f', um die existierenden Notizen zu überschreiben."
#: builtin/notes.c:460 builtin/notes.c:537
#, c-format
@ -7649,7 +7649,7 @@ msgid ""
"existing notes"
msgstr ""
"Kann Notizen nicht kopieren. Existierende Notizen für Objekt %s gefunden. "
"Verwenden Sie '-f' um die existierenden Notizen zu überschreiben."
"Verwenden Sie '-f', um die existierenden Notizen zu überschreiben."
#: builtin/notes.c:543
#, c-format
@ -9359,7 +9359,7 @@ msgid ""
"(use -f to force removal)"
msgstr ""
"\n"
"(benutzen Sie -f um die Löschung zu erzwingen)"
"(benutzen Sie -f, um die Löschung zu erzwingen)"
#: builtin/rm.c:240
msgid "the following file has changes staged in the index:"
@ -9373,7 +9373,7 @@ msgid ""
"(use --cached to keep the file, or -f to force removal)"
msgstr ""
"\n"
"(benutzen Sie --cached um die Datei zu behalten, oder -f um die Entfernung "
"(benutzen Sie --cached, um die Datei zu behalten, oder -f, um die Entfernung "
"zu erzwingen)"
#: builtin/rm.c:252
@ -9431,7 +9431,7 @@ msgstr "Unterdrückt Commit-Beschreibungen, liefert nur Anzahl der Commits"
#: builtin/shortlog.c:234
msgid "Show the email address of each author"
msgstr "Zeigt die Email-Adresse von jedem Autor"
msgstr "Zeigt die E-Mail-Adresse von jedem Autor"
#: builtin/shortlog.c:235
msgid "w[,i1[,i2]]"
@ -9751,7 +9751,7 @@ msgstr "annotiertes und GPG-signiertes Tag"
#: builtin/tag.c:605
msgid "use another key to sign the tag"
msgstr "verwendet einen anderen Schlüssel um das Tag zu signieren"
msgstr "verwendet einen anderen Schlüssel, um das Tag zu signieren"
#: builtin/tag.c:606
msgid "replace the tag if exists"
@ -10046,7 +10046,7 @@ msgid ""
msgstr ""
"'git help -a' und 'git help -g' listet verfügbare Unterkommandos und\n"
"einige Anleitungen zu Git-Konzepten auf. Benutzen Sie 'git help <Kommando>'\n"
"oder 'git help <Konzept>' um mehr über ein spezifisches Kommando oder\n"
"oder 'git help <Konzept>', um mehr über ein spezifisches Kommando oder\n"
"Konzept zu erfahren."
#: parse-options.h:143
@ -10200,7 +10200,7 @@ msgstr ""
#: git-am.sh:141
msgid "Using index info to reconstruct a base tree..."
msgstr ""
"Verwende Informationen aus der Staging-Area um einen Basisverzeichnis "
"Verwende Informationen aus der Staging-Area, um einen Basisverzeichnis "
"nachzustellen"
#: git-am.sh:156
@ -10257,7 +10257,7 @@ msgid ""
"Use \"git am --abort\" to remove it."
msgstr ""
"Stray $dotest Verzeichnis gefunden.\n"
"Benutzen Sie \"git am --abort\" um es zu entfernen."
"Benutzen Sie \"git am --abort\", um es zu entfernen."
#: git-am.sh:535
msgid "Resolve operation not in progress, we are not resuming."
@ -10284,7 +10284,7 @@ msgstr ""
#: git-am.sh:732
msgid "Patch does not have a valid e-mail address."
msgstr "Patch enthält keine gültige Email-Adresse."
msgstr "Patch enthält keine gültige E-Mail-Adresse."
#: git-am.sh:779
msgid "cannot be interactive without stdin connected to a terminal."
@ -10515,7 +10515,7 @@ msgid ""
msgstr ""
"\"pull\" ist nicht möglich, weil Sie nicht zusammengeführte Dateien haben.\n"
"Bitte korrigieren Sie dies im Arbeitsverzeichnis und benutzen Sie dann \n"
"'git add/rm <Datei>' um die Auflösung entsprechend zu markieren, oder\n"
"'git add/rm <Datei>', um die Auflösung entsprechend zu markieren, oder\n"
"benutzen Sie 'git commit -a'."
#: git-pull.sh:25
@ -11014,7 +11014,7 @@ msgid ""
"discard them"
msgstr ""
"Arbeitsverzeichnis von Submodul in '$displaypath' enthält lokale Änderungen; "
"verwenden Sie '-f' um diese zu verwerfen"
"verwenden Sie '-f', um diese zu verwerfen"
#: git-submodule.sh:701
#, sh-format

View File

@ -229,6 +229,9 @@ void mark_reachable_objects(struct rev_info *revs, int mark_reflog,
/* Add all external refs */
for_each_ref(add_one_ref, revs);
/* detached HEAD is not included in the list above */
head_ref(add_one_ref, revs);
/* Add all reflog info */
if (mark_reflog)
for_each_reflog(add_one_reflog, revs);

View File

@ -863,6 +863,7 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
int i, err;
struct argv_array args;
struct string_list_item *cas_option;
struct strbuf preamble = STRBUF_INIT;
argv_array_init(&args);
argv_array_pushl(&args, "send-pack", "--stateless-rpc", "--helper-status",
@ -880,17 +881,22 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
for_each_string_list_item(cas_option, &cas_options)
argv_array_push(&args, cas_option->string);
argv_array_push(&args, url.buf);
argv_array_push(&args, "--stdin");
for (i = 0; i < nr_spec; i++)
argv_array_push(&args, specs[i]);
packet_buf_write(&preamble, "%s\n", specs[i]);
packet_buf_flush(&preamble);
memset(&rpc, 0, sizeof(rpc));
rpc.service_name = "git-receive-pack",
rpc.argv = args.argv;
rpc.stdin_preamble = &preamble;
err = rpc_service(&rpc, heads);
if (rpc.result.len)
write_or_die(1, rpc.result.buf, rpc.result.len);
strbuf_release(&rpc.result);
strbuf_release(&preamble);
argv_array_clear(&args);
return err;
}

View File

@ -111,4 +111,24 @@ test_expect_success 'unset many entries' '
test_must_fail git config section.key
'
test_expect_success '--add appends new value after existing empty value' '
cat >expect <<-\EOF &&
fool
roll
EOF
cp .git/config .git/config.old &&
test_when_finished "mv .git/config.old .git/config" &&
cat >.git/config <<-\EOF &&
[foo]
baz
baz =
baz = fool
EOF
git config --add foo.baz roll &&
git config --get-all foo.baz >output &&
test_cmp expect output
'
test_done

View File

@ -69,7 +69,7 @@ test_expect_success 'object with bad sha1' '
git update-ref refs/heads/bogus $cmt &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_might_fail git fsck 2>out &&
test_must_fail git fsck 2>out &&
cat out &&
grep "$sha.*corrupt" out
'
@ -101,7 +101,7 @@ test_expect_success 'email with embedded > is not okay' '
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new" out
'
@ -113,7 +113,7 @@ test_expect_success 'missing < email delimiter is reported nicely' '
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new.* - bad name" out
'
@ -125,7 +125,7 @@ test_expect_success 'missing email is reported nicely' '
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new.* - missing email" out
'
@ -137,7 +137,7 @@ test_expect_success '> in name is reported' '
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new" out
'
@ -151,11 +151,31 @@ test_expect_success 'integer overflow in timestamps is reported' '
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new.*integer overflow" out
'
test_expect_success 'malformatted tree object' '
test_when_finished "git update-ref -d refs/tags/wrong" &&
test_when_finished "remove_object \$T" &&
T=$(
GIT_INDEX_FILE=test-index &&
export GIT_INDEX_FILE &&
rm -f test-index &&
>x &&
git add x &&
T=$(git write-tree) &&
(
git cat-file tree $T &&
git cat-file tree $T
) |
git hash-object -w -t tree --stdin
) &&
test_must_fail git fsck 2>out &&
grep "error in tree .*contains duplicate file entries" out
'
test_expect_success 'tag pointing to nonexistent' '
cat >invalid-tag <<-\EOF &&
object ffffffffffffffffffffffffffffffffffffffff
@ -282,4 +302,60 @@ test_expect_success 'fsck notices ".git" in trees' '
)
'
# create a static test repo which is broken by omitting
# one particular object ($1, which is looked up via rev-parse
# in the new repository).
create_repo_missing () {
rm -rf missing &&
git init missing &&
(
cd missing &&
git commit -m one --allow-empty &&
mkdir subdir &&
echo content >subdir/file &&
git add subdir/file &&
git commit -m two &&
unrelated=$(echo unrelated | git hash-object --stdin -w) &&
git tag -m foo tag $unrelated &&
sha1=$(git rev-parse --verify "$1") &&
path=$(echo $sha1 | sed 's|..|&/|') &&
rm .git/objects/$path
)
}
test_expect_success 'fsck notices missing blob' '
create_repo_missing HEAD:subdir/file &&
test_must_fail git -C missing fsck
'
test_expect_success 'fsck notices missing subtree' '
create_repo_missing HEAD:subdir &&
test_must_fail git -C missing fsck
'
test_expect_success 'fsck notices missing root tree' '
create_repo_missing HEAD^{tree} &&
test_must_fail git -C missing fsck
'
test_expect_success 'fsck notices missing parent' '
create_repo_missing HEAD^ &&
test_must_fail git -C missing fsck
'
test_expect_success 'fsck notices missing tagged object' '
create_repo_missing tag^{blob} &&
test_must_fail git -C missing fsck
'
test_expect_success 'fsck notices ref pointing to missing commit' '
create_repo_missing HEAD &&
test_must_fail git -C missing fsck
'
test_expect_success 'fsck notices ref pointing to missing tag' '
create_repo_missing tag &&
test_must_fail git -C missing fsck
'
test_done

View File

@ -14,7 +14,7 @@ test_expect_success 'setup' '
'
test_expect_success 'fsck notices broken commit' '
git fsck 2>actual &&
test_must_fail git fsck 2>actual &&
test_i18ngrep invalid.author actual
'

View File

@ -89,4 +89,22 @@ test_expect_success 'mailinfo on from header without name works' '
'
test_expect_success 'mailinfo finds headers after embedded From line' '
mkdir embed-from &&
git mailsplit -oembed-from "$TEST_DIRECTORY"/t5100/embed-from.in &&
test_cmp "$TEST_DIRECTORY"/t5100/embed-from.in embed-from/0001 &&
git mailinfo embed-from/msg embed-from/patch \
<embed-from/0001 >embed-from/out &&
test_cmp "$TEST_DIRECTORY"/t5100/embed-from.expect embed-from/out
'
test_expect_success 'mailinfo on message with quoted >From' '
mkdir quoted-from &&
git mailsplit -oquoted-from "$TEST_DIRECTORY"/t5100/quoted-from.in &&
test_cmp "$TEST_DIRECTORY"/t5100/quoted-from.in quoted-from/0001 &&
git mailinfo quoted-from/msg quoted-from/patch \
<quoted-from/0001 >quoted-from/out &&
test_cmp "$TEST_DIRECTORY"/t5100/quoted-from.expect quoted-from/msg
'
test_done

View File

@ -0,0 +1,5 @@
Author: Commit Author
Email: commit@example.com
Subject: patch subject
Date: Sat, 13 Sep 2014 21:13:23 -0400

13
t/t5100/embed-from.in Normal file
View File

@ -0,0 +1,13 @@
From 1234567890123456789012345678901234567890 Mon Sep 17 00:00:00 2001
From: Email Author <email@example.com>
Date: Sun, 25 May 2008 00:38:18 -0700
Subject: [PATCH] email subject
>From 1234567890123456789012345678901234567890 Mon Sep 17 00:00:00 2001
From: Commit Author <commit@example.com>
Date: Sat, 13 Sep 2014 21:13:23 -0400
Subject: patch subject
patch body
---
patch

View File

@ -0,0 +1,3 @@
>From the depths of history, we are stuck with the
flaky mbox format.

10
t/t5100/quoted-from.in Normal file
View File

@ -0,0 +1,10 @@
From 1234567890123456789012345678901234567890 Mon Sep 17 00:00:00 2001
From: Author Name <somebody@example.com>
Date: Sun, 25 May 2008 00:38:18 -0700
Subject: [PATCH] testing quoted >From
>From the depths of history, we are stuck with the
flaky mbox format.
---
patch

View File

@ -104,6 +104,28 @@ test_expect_success 'prune: prune unreachable heads' '
'
test_expect_success 'prune: do not prune detached HEAD with no reflog' '
git checkout --detach --quiet &&
git commit --allow-empty -m "detached commit" &&
# verify that there is no reflogs
# (should be removed and disabled by previous test)
test ! -e .git/logs &&
git prune -n >prune_actual &&
: >prune_expected &&
test_cmp prune_actual prune_expected
'
test_expect_success 'prune: prune former HEAD after checking out branch' '
head_sha1=$(git rev-parse HEAD) &&
git checkout --quiet master &&
git prune -v >prune_actual &&
grep "$head_sha1" prune_actual
'
test_expect_success 'prune: do not prune heads listed as an argument' '
: > file2 &&

View File

@ -170,4 +170,13 @@ test_expect_success JGIT 'jgit can read our bitmaps' '
)
'
test_expect_success 'splitting packs does not generate bogus bitmaps' '
test-genrandom foo $((1024 * 1024)) >rand &&
git add rand &&
git commit -m "commit with big file" &&
git -c pack.packSizeLimit=500k repack -adb &&
git init --bare no-bitmaps.git &&
git -C no-bitmaps.git fetch .. HEAD
'
test_done

92
t/t5408-send-pack-stdin.sh Executable file
View File

@ -0,0 +1,92 @@
#!/bin/sh
test_description='send-pack --stdin tests'
. ./test-lib.sh
create_ref () {
tree=$(git write-tree) &&
test_tick &&
commit=$(echo "$1" | git commit-tree $tree) &&
git update-ref "$1" $commit
}
clear_remote () {
rm -rf remote.git &&
git init --bare remote.git
}
verify_push () {
git rev-parse "$1" >expect &&
git --git-dir=remote.git rev-parse "${2:-$1}" >actual &&
test_cmp expect actual
}
test_expect_success 'setup refs' '
cat >refs <<-\EOF &&
refs/heads/A
refs/heads/C
refs/tags/D
refs/heads/B
refs/tags/E
EOF
for i in $(cat refs); do
create_ref $i || return 1
done
'
# sanity check our setup
test_expect_success 'refs on cmdline' '
clear_remote &&
git send-pack remote.git $(cat refs) &&
for i in $(cat refs); do
verify_push $i || return 1
done
'
test_expect_success 'refs over stdin' '
clear_remote &&
git send-pack remote.git --stdin <refs &&
for i in $(cat refs); do
verify_push $i || return 1
done
'
test_expect_success 'stdin lines are full refspecs' '
clear_remote &&
echo "A:other" >input &&
git send-pack remote.git --stdin <input &&
verify_push refs/heads/A refs/heads/other
'
test_expect_success 'stdin mixed with cmdline' '
clear_remote &&
echo A >input &&
git send-pack remote.git --stdin B <input &&
verify_push A &&
verify_push B
'
test_expect_success 'cmdline refs written in order' '
clear_remote &&
test_must_fail git send-pack remote.git A:foo B:foo &&
verify_push A foo
'
test_expect_success '--stdin refs come after cmdline' '
clear_remote &&
echo A:foo >input &&
test_must_fail git send-pack remote.git --stdin B:foo <input &&
verify_push B foo
'
test_expect_success 'refspecs and --mirror do not mix (cmdline)' '
clear_remote &&
test_must_fail git send-pack remote.git --mirror $(cat refs)
'
test_expect_success 'refspecs and --mirror do not mix (stdin)' '
clear_remote &&
test_must_fail git send-pack remote.git --mirror --stdin <refs
'
test_done

View File

@ -323,5 +323,20 @@ test_expect_success 'push into half-auth-complete requires password' '
test_cmp expect actual
'
run_with_limited_cmdline () {
(ulimit -s 128 && "$@")
}
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
sha1=$(git rev-parse HEAD) &&
test_seq 2000 |
sort |
sed "s|.*|$sha1 refs/tags/really-long-tag-name-&|" \
>.git/packed-refs &&
run_with_limited_cmdline git push --mirror
'
stop_httpd
test_done

View File

@ -3017,4 +3017,108 @@ test_expect_success 'T: empty reset doesnt delete branch' '
git rev-parse --verify refs/heads/not-to-delete
'
###
### series U (filedelete)
###
cat >input <<INPUT_END
commit refs/heads/U
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
test setup
COMMIT
M 100644 inline hello.c
data <<BLOB
blob 1
BLOB
M 100644 inline good/night.txt
data <<BLOB
sleep well
BLOB
M 100644 inline good/bye.txt
data <<BLOB
au revoir
BLOB
INPUT_END
test_expect_success 'U: initialize for U tests' '
git fast-import <input
'
cat >input <<INPUT_END
commit refs/heads/U
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
delete good/night.txt
COMMIT
from refs/heads/U^0
D good/night.txt
INPUT_END
test_expect_success 'U: filedelete file succeeds' '
git fast-import <input
'
cat >expect <<EOF
:100644 000000 2907ebb4bf85d91bf0716bb3bd8a68ef48d6da76 0000000000000000000000000000000000000000 D good/night.txt
EOF
git diff-tree -M -r U^1 U >actual
test_expect_success 'U: validate file delete result' '
compare_diff_raw expect actual
'
cat >input <<INPUT_END
commit refs/heads/U
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
delete good dir
COMMIT
from refs/heads/U^0
D good
INPUT_END
test_expect_success 'U: filedelete directory succeeds' '
git fast-import <input
'
cat >expect <<EOF
:100644 000000 69cb75792f55123d8389c156b0b41c2ff00ed507 0000000000000000000000000000000000000000 D good/bye.txt
EOF
git diff-tree -M -r U^1 U >actual
test_expect_success 'U: validate directory delete result' '
compare_diff_raw expect actual
'
cat >input <<INPUT_END
commit refs/heads/U
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
must succeed
COMMIT
from refs/heads/U^0
D ""
INPUT_END
test_expect_success 'U: filedelete root succeeds' '
git fast-import <input
'
cat >expect <<EOF
:100644 000000 c18147dc648481eeb65dc5e66628429a64843327 0000000000000000000000000000000000000000 D hello.c
EOF
git diff-tree -M -r U^1 U >actual
test_expect_success 'U: validate root delete result' '
compare_diff_raw expect actual
'
test_done