projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
glossary: explain "master" and "origin"
[git.git]
/
commit.c
diff --git
a/commit.c
b/commit.c
index
e867b86
..
fb02ba6
100644
(file)
--- a/
commit.c
+++ b/
commit.c
@@
-1,6
+1,6
@@
+#include "cache.h"
#include "tag.h"
#include "commit.h"
#include "tag.h"
#include "commit.h"
-#include "cache.h"
int save_commit_buffer = 1;
int save_commit_buffer = 1;
@@
-560,6
+560,9
@@
void sort_in_topological_order(struct commit_list ** list)
next = next->next;
count++;
}
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 */
/* allocate an array to help sort the list */
nodes = xcalloc(count, sizeof(*nodes));
/* link the list to the array */