summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2006-08-27 20:13:44 -0400
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-14 02:15:09 -0500
commit08d7e892a714dec8471cd45add2b1da24f66b3e7 (patch)
tree052f6d4352030304e6447beb15a3420c74dfbf8b
parentAdded 'reset' command to clear a branch's tree. (diff)
downloadtgif-08d7e892a714dec8471cd45add2b1da24f66b3e7.tar.xz
Don't crash fast-import if no branch log was requested.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--fast-import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 778b8bfdd4..5376b5e15c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1715,7 +1715,8 @@ int main(int argc, const char **argv)
dump_branches();
dump_tags();
dump_marks();
- fclose(branch_log);
+ if (branch_log)
+ fclose(branch_log);
fprintf(stderr, "%s statistics:\n", argv[0]);
fprintf(stderr, "---------------------------------------------------\n");