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

[PATCH] Correct fast-export file mode strings to match fast-import standard

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 25, 2008, 03:57 UTC
Message-ID
<20080225035728.GA26302@spearce.org>

The fast-import file format does not expect leading '0' in front of a file mode; that is we want '100644' and '0100644'.

Thanks to Ian Clatworthy of the Bazaar project for noticing the difference in output/input.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 builtin-fast-export.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 49b54de..e1c5630 100755
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -123,7 +123,7 @@ static void show_filemodify(struct diff_queue_struct *q,
 			printf("D %s\n", spec->path);
 		else {
 			struct object *object = lookup_object(spec->sha1);
-			printf("M 0%06o :%d %s\n", spec->mode,
+			printf("M %06o :%d %s\n", spec->mode,
 			       get_object_mark(object), spec->path);
 		}
 	}
-- 
1.5.4.3.295.g6b554
Next: Johannes Schindelin
Message 1 of 2 in “Correct fast-export file mode strings to match fast-import standard”
  1. Correct fast-export file mode strings to match fast-import standardShawn O. Pearce, Feb 25, 2008
  2. Johannes SchindelinFeb 26, 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.