From: Yves Orton <yves.orton@booking.com>
To: git@vger.kernel.org
Subject: git-fast-export bug, commits emmitted in incorrect order causing parent data to be lost from commits turning essentially linear repo into "islands"
Date: Thu, 12 Jun 2008 12:21:40 +0200 [thread overview]
Message-ID: <1213266100.6940.207.camel@gemini> (raw)
Hi,
Ive been working with git-fast-export a bit recently and Ive hit a bug
that is causing some trouble.
Essentially it seems that one of our repos git-fast-export fails to emit
the proper 'from' information for several commits in the repo. These
commits are emitted first without parent data even though their parents
ARE emitted later.
The code responsible for skipping the parent info is in
builtin-fast-export.c around line 402:
for (i = 0, p = commit->parents; p; p = p->next) {
int mark = get_object_mark(&p->item->object);
if (!mark)
continue;
if (i == 0)
printf("from :%d\n", mark);
else
printf("merge :%d\n", mark);
i++;
}
If i modify this loop to warn when skipping a parent I get a warning for
each of the "broken" commits. Apparently because they are emitted before
their parents the parents have no "mark" assigned to them (via
decoration) and thus are skipped in this emit process. This would make
sense for emitting a limited number of patches, but makes no sense when
the --all option is used. Ive tried to investigate further but i got
lost in a twisty maze of routines in revision.c, which apparently is
responsible for building a list of items to emit in the correct order.
However i think it is notable that both gitk and git log seem quite able
to deal with things properly, thus i find it a bit strange that
fast-export would get it wrong.
Unfortunately I have no idea how to create a minimal repo that
illustrates this problem.
Im currently on git version 1.5.6.rc2.29.g3ba9 (latest version from last
night), however this problem shows itself on 1.5.4.3 as well, as well as
an earlier version whose exact number i no longer know.
Other evidence that might be useful
git log --pretty=format:"%H:%P"
shows that every commit but one (the root) has parents. And gitk renders
the original repo fine. The repo can be cloned and etc, without trouble.
The problem seems to be strictly related to fast-export.
Im not on list so please cc me on any replies.
Thanks a lot!
Yves
next reply other threads:[~2008-06-12 11:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 10:21 Yves Orton [this message]
2008-06-12 11:53 ` git-fast-export bug, commits emmitted in incorrect order causing parent data to be lost from commits turning essentially linear repo into "islands" Johannes Sixt
2008-06-12 12:04 ` Yves Orton
2008-06-12 12:16 ` Yves Orton
2008-06-12 12:45 ` Johannes Sixt
2008-06-12 12:52 ` Michael J Gruber
2008-06-12 14:02 ` Philippe Bruhat (BooK)
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=1213266100.6940.207.camel@gemini \
--to=yves.orton@booking.com \
--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).