summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 820b931)
raw | patch | inline | side by side (parent: 820b931)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 7 Feb 2007 07:46:35 +0000 (02:46 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 7 Feb 2007 07:46:35 +0000 (02:46 -0500) |
Apparently fast-import used to die a horrible death if we
were unable to open the marks file for output. This is
slightly less than ideal, especially now that we dump
the marks as part of the `checkpoint` command.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
were unable to open the marks file for output. This is
slightly less than ideal, especially now that we dump
the marks as part of the `checkpoint` command.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index d9ed3e2f18ccba41da216c9a94031b2ae44025c8..face9bba3c425daf43f6665b2f46a7b7ead890d2 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
if (mark_file)
{
FILE *f = fopen(mark_file, "w");
- dump_marks_helper(f, 0, marks);
- fclose(f);
+ if (f) {
+ dump_marks_helper(f, 0, marks);
+ fclose(f);
+ } else
+ failure |= error("Unable to write marks file %s: %s",
+ mark_file, strerror(errno));
}
}