git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pieter de Bie <pdebie@ai.rug.nl>
To: git@vger.kernel.org, Johannes.Schindelin@gmx.de
Cc: Pieter de Bie <pdebie@ai.rug.nl>
Subject: [PATCH] builtin-fast-export: Only output a single parent per line
Date: Sun, 25 May 2008 01:21:53 +0200	[thread overview]
Message-ID: <1211671313-99006-1-git-send-email-pdebie@ai.rug.nl> (raw)

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 may be fine with git-fast-import, but other importers based on it, like
bzr-fast-import, can't handle this.

This changes fast-export to also output a single parent per line.

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
---

I'm not sure why this was done, but it messed up my import :)
 builtin-fast-export.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index e1c5630..34acdf9 100755
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -204,10 +204,8 @@ 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)
-- 
1.5.5.1.541.g51dc4.dirty

             reply	other threads:[~2008-05-24 23:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-24 23:21 Pieter de Bie [this message]
2008-05-25  1:38 ` [PATCH] builtin-fast-export: Only output a single parent per line Junio C Hamano
2008-05-26  1:49   ` Shawn O. Pearce
2008-05-26  5:19     ` Junio C Hamano
2008-05-26  5:24       ` Junio C Hamano
2008-05-26  5:30         ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1211671313-99006-1-git-send-email-pdebie@ai.rug.nl \
    --to=pdebie@ai.rug.nl \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).