fast-export: Set revs.topo_order before calling setup_revisions
setup_revisions sets a variety of flags based on the setting of other flags, such as setting the limited flag when topo_order is set. To avoid circumventing any invariants created by setup_revisions, we set revs.topo_order before calling it rather than after. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Jun 25, 2009 at 22:48 UTC
668f3aa776bcd293de08413bf1b25b91c15f1b01
1 file changed
+1
-1
builtin-fast-export.c
+1
-1
@@ -514,6 +514,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
514
git_config(git_default_config, NULL);
515
516
init_revisions(&revs, prefix);
517
+ revs.topo_order = 1;
518
argc = setup_revisions(argc, argv, &revs, NULL);
519
argc = parse_options(argc, argv, prefix, options, fast_export_usage, 0);
520
if (argc > 1)
@@ -524,7 +525,6 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
525
526
get_tags_and_duplicates(&revs.pending, &extra_refs);
527
527
- revs.topo_order = 1;
528
if (prepare_revision_walk(&revs))
529
die("revision walk setup failed");
530
revs.diffopt.format_callback = show_filemodify;