summaryrefslogtreecommitdiff
path: root/tree-diff.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 /tree-diff.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 'tree-diff.c')
-rw-r--r--tree-diff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tree-diff.c b/tree-diff.c
index 0ef06a9e36..382092bce0 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -263,6 +263,10 @@ void diff_tree_setup_paths(const char **p)
paths = p;
nr_paths = count_paths(paths);
+ if (nr_paths == 0) {
+ pathlens = NULL;
+ return;
+ }
pathlens = xmalloc(nr_paths * sizeof(int));
for (i=0; i<nr_paths; i++)
pathlens[i] = strlen(paths[i]);