* [BUG] "cg-object-id -p" ignore grafts, breaks cg-admin-rewritehist
@ 2006-05-09 22:25 Yann Dirson
0 siblings, 0 replies; only message in thread
From: Yann Dirson @ 2006-05-09 22:25 UTC (permalink / raw)
To: GIT list; +Cc: Petr Baudis
Currently (cogito 0.17.2), using "cg-object-id -p" to lookup a
commit's parents fetches information directly from the commit object
through "git-cat-file commit". This causes all its callers to ignore
any grafts, and probably causes various problems. The one I stumbled
upon is an inconstency in the data seen by cg-admin-rewritehist, when
a graft is used to replace the single parent of a commit with another
single parent - tentative recovery of a tarball import done on a wrong
branch, in the hope that cg-admin-rewritehist would allow to fix the
history as defined by the graft.
In that case, after identifying the commits to rewrite through legal
means, rewritehist attempts to lookup the parents for each of those
original commits and map them to already-rewritten ones, but
cg-object-id returns the pre-graft parent, which was not to be
rewritten, and the tool fails (miserably with an invalid rewritten
branch, as the exception is not caught).
A patch follows (depending on an updated "set -e" patch for
rewritehist) to have rewritehist at least abort in error when it can
identify such an inconsistency.
What should cg-object-id use to lookup parent information in a sane
way that does not ignore grafts ?
--
Yann Dirson <ydirson@altern.org> |
Debian-related: <dirson@debian.org> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-09 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-09 22:25 [BUG] "cg-object-id -p" ignore grafts, breaks cg-admin-rewritehist Yann Dirson
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).