Skip to content

Commit

Permalink
builtin-fast-export: Only output a single parent per line
Browse files Browse the repository at this point in the history
According to the git-fast-import man-page, you can only put a single
committish per merge: line, like this:

  merge :10
  merge :11

However, git-fast-export puts all parents on a single line, like this:

  merge :10 :11

This changes fast-export to output a single parent per line.  Otherwise
neither git-fast-import nor bzr-fast-import can read its output.

[jc: fix-up to remove excess LF in the output that makes fast-import barf]

Signed-off-by: Pieter de Bie <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
pieter authored and gitster committed May 26, 2008
1 parent e00f379 commit 5070b49
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions builtin-fast-export.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,10 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
continue;
if (i == 0)
printf("from :%d\n", mark);
else if (i == 1)
printf("merge :%d", mark);
else
printf(" :%d", mark);
printf("merge :%d\n", mark);
i++;
}
if (i > 1)
printf("\n");

log_tree_diff_flush(rev);
rev->diffopt.output_format = saved_output_format;
Expand Down

0 comments on commit 5070b49

Please sign in to comment.