Skip to content

Commit

Permalink
fast-export: Set revs.topo_order before calling setup_revisions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Elijah Newren authored and Junio C Hamano committed Jun 27, 2009
1 parent 916e137 commit 668f3aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-fast-export.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
git_config(git_default_config, NULL);

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

get_tags_and_duplicates(&revs.pending, &extra_refs);

revs.topo_order = 1;
if (prepare_revision_walk(&revs))
die("revision walk setup failed");
revs.diffopt.format_callback = show_filemodify;
Expand Down

0 comments on commit 668f3aa

Please sign in to comment.