summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be56862)
raw | patch | inline | side by side (parent: be56862)
author | Sverre Rabbelier <srabbelier@gmail.com> | |
Sat, 16 Jul 2011 13:03:33 +0000 (15:03 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 19 Jul 2011 18:17:47 +0000 (11:17 -0700) |
If fast-export is being used to generate a fast-import stream that
will be used afterwards it is desirable to indicate the end of the
stream with the new 'done' command.
Add a flag that causes fast-export to end with 'done'.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
will be used afterwards it is desirable to indicate the end of the
stream with the new 'done' command.
Add a flag that causes fast-export to end with 'done'.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-fast-export.txt | patch | blob | history | |
builtin/fast-export.c | patch | blob | history |
index 781bd6edc3cce9d1488bf793231d08119e142948..e3f845371a9f4385cc36590023b18a5aba97a6ad 100644 (file)
allow that. So fake a tagger to be able to fast-import the
output.
+--use-done-feature::
+ Start the stream with a 'feature done' stanza, and terminate
+ it with a 'done' command.
+
--no-data::
Skip output of blob objects and instead refer to blobs via
their original SHA-1 hash. This is useful when rewriting the
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index daf19451ba7df541d1314c880679749232ccce35..becef8578283ea0a8620041ce7e974baf7b6e27d 100644 (file)
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
static enum { ABORT, VERBATIM, WARN, STRIP } signed_tag_mode = ABORT;
static enum { ERROR, DROP, REWRITE } tag_of_filtered_mode = ABORT;
static int fake_missing_tagger;
+static int use_done_feature;
static int no_data;
static int full_tree;
"Fake a tagger when tags lack one"),
OPT_BOOLEAN(0, "full-tree", &full_tree,
"Output full tree for each commit"),
+ OPT_BOOLEAN(0, "use-done-feature", &use_done_feature,
+ "Use the done feature to terminate the stream"),
{ OPTION_NEGBIT, 0, "data", &no_data, NULL,
"Skip output of blob data",
PARSE_OPT_NOARG | PARSE_OPT_NEGHELP, NULL, 1 },
if (argc > 1)
usage_with_options (fast_export_usage, options);
+ if (use_done_feature)
+ printf("feature done\n");
+
if (import_filename)
import_marks(import_filename);
if (export_filename)
export_marks(export_filename);
+ if (use_done_feature)
+ printf("done\n");
+
return 0;
}