summaryrefslogtreecommitdiff
path: root/diffcore-pathspec.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-12-26 18:45:30 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2005-12-26 18:45:30 -0800
commit36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70 (patch)
treeff61e0bd4d4454a4b34e920f80dbc1b4e427383d /diffcore-pathspec.c
parentMerge branch 'jc/checkout' (diff)
parentGIT 1.0.5 (diff)
downloadtgif-36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70.tar.xz
Merge fixes up to GIT 1.0.5
Diffstat (limited to 'diffcore-pathspec.c')
-rw-r--r--diffcore-pathspec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/diffcore-pathspec.c b/diffcore-pathspec.c
index 68fe009132..139fe882f9 100644
--- a/diffcore-pathspec.c
+++ b/diffcore-pathspec.c
@@ -48,6 +48,9 @@ void diffcore_pathspec(const char **pathspec)
for (i = 0; pathspec[i]; i++)
;
speccnt = i;
+ if (!speccnt)
+ return;
+
spec = xmalloc(sizeof(*spec) * speccnt);
for (i = 0; pathspec[i]; i++) {
spec[i].spec = pathspec[i];