summaryrefslogtreecommitdiff
path: root/builtin-fast-export.c
diff options
context:
space:
mode:
authorPieter de Bie <pdebie@ai.rug.nl>2008-05-24 23:21:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-05-26 05:26:24 (GMT)
commit5070b49e529e2df30ec2e33073267d281450dde6 (patch)
tree459aee5f4dee16ec8d13af26d53214bbbbf4b4cf /builtin-fast-export.c
parente00f3790b88ce61f1bdc863011a122b98b43197e (diff)
downloadgit-5070b49e529e2df30ec2e33073267d281450dde6.zip
git-5070b49e529e2df30ec2e33073267d281450dde6.tar.gz
git-5070b49e529e2df30ec2e33073267d281450dde6.tar.bz2
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>
Diffstat (limited to 'builtin-fast-export.c')
-rwxr-xr-xbuiltin-fast-export.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 724cff3..4bf5b58 100755
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -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;