aboutsummaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-08-27 20:13:44 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-01-14 02:15:09 -0500
commit08d7e892a714dec8471cd45add2b1da24f66b3e7 (patch)
tree052f6d4352030304e6447beb15a3420c74dfbf8b /fast-import.c
parent5fced8dc6f4844997b6e25a67a00f428775c5233 (diff)
downloadgit-08d7e892a714dec8471cd45add2b1da24f66b3e7.tar.gz
git-08d7e892a714dec8471cd45add2b1da24f66b3e7.tar.xz
Don't crash fast-import if no branch log was requested.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 778b8bfdd..5376b5e15 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");