1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-30 13:57:54 +01:00

Don't crash fast-import if the marks cannot be exported.

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>
This commit is contained in:
Shawn O. Pearce 2007-02-07 02:46:35 -05:00
parent 820b931012
commit 22c9f7e4c5

View file

@ -1367,8 +1367,12 @@ static void dump_marks(void)
if (mark_file)
{
FILE *f = fopen(mark_file, "w");
if (f) {
dump_marks_helper(f, 0, marks);
fclose(f);
} else
failure |= error("Unable to write marks file %s: %s",
mark_file, strerror(errno));
}
}