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 <pdebie@ai.rug.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pieter de Bie committed
May 25, 2008 at 01:21 UTC
5070b49e529e2df30ec2e33073267d281450dde6
1 file changed
+1
-5
builtin-fast-export.c
+1
-5
@@ -205,14 +205,10 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
205
continue;
206
if (i == 0)
207
printf("from :%d\n", mark);
208
- else if (i == 1)
209
- printf("merge :%d", mark);
208
else
211
- printf(" :%d", mark);
209
+ printf("merge :%d\n", mark);
210
i++;
211
}
214
- if (i > 1)
215
- printf("\n");
212
213
log_tree_diff_flush(rev);
214
rev->diffopt.output_format = saved_output_format;