summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-26 18:45:30 -0800
committerJunio C Hamano <junkio@cox.net>2005-12-26 18:45:30 -0800
commit36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70 (patch)
treeff61e0bd4d4454a4b34e920f80dbc1b4e427383d /commit.c
parent2ed7542fad01558306b6187e3b19c64243234349 (diff)
parente5f5219a4f1faf3b4e1816fad3a6296a1d39b878 (diff)
downloadgit-36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70.tar.gz
Merge fixes up to GIT 1.0.5
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index e867b86e6a..edd4dedcdd 100644
--- a/commit.c
+++ b/commit.c
@@ -560,6 +560,9 @@ void sort_in_topological_order(struct commit_list ** list)
next = next->next;
count++;
}
+
+ if (!count)
+ return;
/* allocate an array to help sort the list */
nodes = xcalloc(count, sizeof(*nodes));
/* link the list to the array */