From: Junio C Hamano <gitster@pobox.com>
To: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>
Cc: "'Eric Wong'" <normalperson@yhbt.net>, "'git'" <git@vger.kernel.org>
Subject: Re: git-svn 1.5.3 does not understand grafts?
Date: Sat, 08 Sep 2007 12:53:57 -0700 [thread overview]
Message-ID: <7vfy1pyluy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <045501c7f23f$c359c450$5267a8c0@Jocke> (Joakim Tjernlund's message of "Sat, 8 Sep 2007 19:43:27 +0200")
"Joakim Tjernlund" <joakim.tjernlund@transmode.se> writes:
> hmm, I think git-cat-file is to blame.
> git-cat-file commit da783cce390ce013b19f1d308ea6813269c6a6b5 does
> not list list any parent...
The plumbing cat-file does not deal with grafts and this is
deliberate. Otherwise you would not be able to find the true
set of parents when you'd want to.
So do not blame cat-file, but blame the Porcelain that uses
cat-file to read a commit object, without annotating what it
read with what is in grafts, in this case your command line
experiment ;-).
The log family of commands and rev-list plumbing while
traversing commit ancestry chain do take grafts into account.
One caveat is pretty=raw output format shows true parents
without grafts on "parent " header line, while the "commit "
fake header prepended in the output for each commit shows the
parents that takes into account.
To illustrate, if you forge the history and say the parent of
1ddea77 is 5da1606 (when the true parent is 820eca68) with
grafts mechanism, here is what happens:
$ echo '1ddea77e449ef28d8a7c74521af21121ab01abc0 5da1606d0bf5b970fadfa0ca91618a1e871f6755' >.git/info/grafts
$ git show -s --pretty=raw --parents 1ddea77
commit 1ddea77e449ef28d8a7c74521af21121ab01abc0 5da1606d0bf5b970fadfa0ca91618a1e871f6755
tree e9e61bc801438062978ff47b0963c536ed1e51a9
parent 820eca68c2577d7499d203d7f4f7ae479b577683
author Nick Hengeveld <nickh@reactrix.com> 1127757131 -0700
committer Junio C Hamano <junkio@cox.net> 1127805558 -0700
[PATCH] Return CURL error message when object transfer fails
Return CURL error message when object transfer fails
...
$ git-cat-file commit 1ddea77
tree e9e61bc801438062978ff47b0963c536ed1e51a9
parent 820eca68c2577d7499d203d7f4f7ae479b577683
author Nick Hengeveld <nickh@reactrix.com> 1127757131 -0700
committer Junio C Hamano <junkio@cox.net> 1127805558 -0700
[PATCH] Return CURL error message when object transfer fails
Return CURL error message when object transfer fails
...
next prev parent reply other threads:[~2007-09-08 19:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 16:41 git-svn 1.5.3 does not understand grafts? Joakim Tjernlund
2007-09-07 16:52 ` Joakim Tjernlund
2007-09-07 20:23 ` Joakim Tjernlund
2007-09-08 5:01 ` Eric Wong
2007-09-08 11:04 ` Joakim Tjernlund
2007-09-08 17:43 ` Joakim Tjernlund
2007-09-08 19:53 ` Junio C Hamano [this message]
2007-09-08 23:33 ` [PATCH] git-svn: understand grafts when doing dcommit Eric Wong
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfy1pyluy.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=joakim.tjernlund@transmode.se \
--cc=normalperson@yhbt.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).