Correct fast-export file mode strings to match fast-import standard
authorShawn O. Pearce <spearce@spearce.org>
Mon, 25 Feb 2008 03:57:29 +0000 (22:57 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Feb 2008 04:09:54 +0000 (20:09 -0800)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fast-export.c

index ef27eee71bdef2cac6f751e07b1da71588989b03..724cff35d37a42daa85edd41b97f0ef20d01f684 100755 (executable)
@@ -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);
                }
        }