aboutsummaryrefslogtreecommitdiffstats
path: root/archive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-25 14:00:48 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-25 14:00:48 -0700
commit63868f636fe44b67bc56753b0e6edca32568e07c (patch)
tree738718ff0c6df1586f174466a99a7ca24f1a31f5 /archive.c
parent573f1a9cf163365637a36a6d95c670883a918352 (diff)
parentbd54cf17a4acfb9555b8a83b7e74fb0274c38bb4 (diff)
downloadgit-63868f636fe44b67bc56753b0e6edca32568e07c.tar.gz
Merge branch 'jk/empty-archive'
"git archive" reports a failure when asked to create an archive out of an empty tree. It would be more intuitive to give an empty archive back in such a case. * jk/empty-archive: archive: handle commits with an empty tree test-lib: factor out $GIT_UNZIP setup
Diffstat (limited to 'archive.c')
-rw-r--r--archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 93e00bb4ae..d254fa5d5c 100644
--- a/archive.c
+++ b/archive.c
@@ -234,7 +234,7 @@ static void parse_pathspec_arg(const char **pathspec,
ar_args->pathspec = pathspec = get_pathspec("", pathspec);
if (pathspec) {
while (*pathspec) {
- if (!path_exists(ar_args->tree, *pathspec))
+ if (**pathspec && !path_exists(ar_args->tree, *pathspec))
die("path not found: %s", *pathspec);
pathspec++;
}