Skip to content

Commit 5070b49

Browse files
pietergitster
authored andcommitted
builtin-fast-export: Only output a single parent per line
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]>
1 parent e00f379 commit 5070b49

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

builtin-fast-export.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,10 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
205205
continue;
206206
if (i == 0)
207207
printf("from :%d\n", mark);
208-
else if (i == 1)
209-
printf("merge :%d", mark);
210208
else
211-
printf(" :%d", mark);
209+
printf("merge :%d\n", mark);
212210
i++;
213211
}
214-
if (i > 1)
215-
printf("\n");
216212

217213
log_tree_diff_flush(rev);
218214
rev->diffopt.output_format = saved_output_format;

0 commit comments

Comments
 (0)