diff options
author | Junio C Hamano <junkio@cox.net> | 2005-12-26 18:45:30 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-26 18:45:30 -0800 |
commit | 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70 (patch) | |
tree | ff61e0bd4d4454a4b34e920f80dbc1b4e427383d /diffcore-pathspec.c | |
parent | Merge branch 'jc/checkout' (diff) | |
parent | GIT 1.0.5 (diff) | |
download | tgif-36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70.tar.xz |
Merge fixes up to GIT 1.0.5
Diffstat (limited to 'diffcore-pathspec.c')
-rw-r--r-- | diffcore-pathspec.c | 3 |
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]; |