git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] Include the fast-import marks table in crash reports

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 14, 2008, 06:34 UTC
Message-ID
<20080214063440.GC30678@spearce.org>

If fast-import was not run with --export-marks but we are crashing the frontend application developer may still benefit from having that information available to them. We now include the marks table as part of the crash report if --export-marks was not supplied on the command line.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 fast-import.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 8ef607f..117f38c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -372,6 +372,8 @@ static void write_branch_report(FILE *rpt, struct branch *b)
 	fputc('\n', rpt);
 }
 
+static void dump_marks_helper(FILE *, uintmax_t, struct mark_set *);
+
 static void write_crash_report(const char *err)
 {
 	char *loc = git_path("fast_import_crash_%d", getpid());
@@ -444,6 +446,14 @@ static void write_crash_report(const char *err)
 	}
 
 	fputc('\n', rpt);
+	fputs("Marks\n", rpt);
+	fputs("-----\n", rpt);
+	if (mark_file)
+		fprintf(rpt, "  exported to %s\n", mark_file);
+	else
+		dump_marks_helper(rpt, 0, marks);
+
+	fputc('\n', rpt);
 	fputs("-------------------\n", rpt);
 	fputs("END OF CRASH REPORT\n", rpt);
 	fclose(rpt);
-- 
1.5.4.1.1309.g833c2
Message 1 of 1 in “Include the fast-import marks table in crash reports”
  1. 3/5 Include the fast-import marks table in crash reportsShawn O. Pearce, Feb 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.