Skip to content

Commit 668f3aa

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 916e137 commit 668f3aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-fast-export.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
514514
git_config(git_default_config, NULL);
515515

516516
init_revisions(&revs, prefix);
517+
revs.topo_order = 1;
517518
argc = setup_revisions(argc, argv, &revs, NULL);
518519
argc = parse_options(argc, argv, prefix, options, fast_export_usage, 0);
519520
if (argc > 1)
@@ -524,7 +525,6 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
524525

525526
get_tags_and_duplicates(&revs.pending, &extra_refs);
526527

527-
revs.topo_order = 1;
528528
if (prepare_revision_walk(&revs))
529529
die("revision walk setup failed");
530530
revs.diffopt.format_callback = show_filemodify;

0 commit comments

Comments
 (0)