Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-27 05:44:15 +0300
committerJunio C Hamano <junkio@cox.net>2005-12-27 05:44:15 +0300
commite5f5219a4f1faf3b4e1816fad3a6296a1d39b878 (patch)
treee41c6fb839732b2fe45bd9416a22411ed3035a07 /diffcore-pathspec.c
parent6ab58895cd951f6f5c96fa432afb122cfeb12746 (diff)
parent975b31dc6e12fba8f7b067ddbe32230995e05400 (diff)
GIT 1.0.5v1.0.5
Minor fixes. Starting from this one I won't be touching debian/ directory since the official maintainer seems to be reasonably quick to package up things. The packaging procedure used there seems to be quite different from what I have, so I'd like to avoid potential confusion and reduce work by the official maintainer and myself. Signed-off-by: Junio C Hamano <junkio@cox.net>
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];