git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Segato <daniele.bilug@gmail.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: Soham Mehta <soham@box.net>, git@vger.kernel.org
Subject: Re: Finding a commit
Date: Wed, 21 Oct 2009 15:55:22 +0200	[thread overview]
Message-ID: <9accb4400910210655i115686c5h2d38a885c1d56d2e@mail.gmail.com> (raw)
In-Reply-To: <200910211437.39166.trast@student.ethz.ch>

On Wed, Oct 21, 2009 at 2:37 PM, Thomas Rast <trast@student.ethz.ch> wrote:
>> Commit -> Tree ---> Blob1, Blob2, Blob3
>>
>> Commit, Trees and Blobs are all identified by sha1
>> the commit should keep information on the author, the "parent"
>> commit(s) and so on..
>> the tree should just keep the "snapshot" of the data..
>>
>> so I think that if you search for the SHA-1 of the tree you should be fine..
>
> Not if you really want to find out if X was cherry-picked into this
> repository, because the tree is the *final state* at that commit,
> which of course includes all preceding changes.
>
> So suppose you have two patches A.diff and B.diff introducing files of
> the same name; then if you combine them into history as
>
>  A -- B
>
> the tree state at B has both files, and hence is different from the
> tree state of B' in
>
>  B' -- A'
>
> because there it only has the file B.

Yes... obviously...
the tree is the snapshot of a complete data set: so if you apply the
same patch to different data set you get different trees...
thanks for pointing it out.. :)

Regards,
Daniele

  reply	other threads:[~2009-10-21 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 11:29 Finding a commit Soham Mehta
2009-10-21 12:30 ` Daniele Segato
2009-10-21 12:37   ` Thomas Rast
2009-10-21 13:55     ` Daniele Segato [this message]
2009-10-21 13:26 ` Douglas Campos
  -- strict thread matches above, loose matches on Subject: below --
2009-10-22  8:32 Soham Mehta

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=9accb4400910210655i115686c5h2d38a885c1d56d2e@mail.gmail.com \
    --to=daniele.bilug@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=soham@box.net \
    --cc=trast@student.ethz.ch \
    /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).