Re: verifying commit IDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Loeliger <jdl@xxxxxxxxxxxxx> writes:

> When one receives a git-generated patch, it has a bunch of
> SHA1s in it, but those SHA1s all belong to individual files.
> I've wanted to find a commit, perhaps the most recent, perhaps
> the oldest, that still contains all of those blob SHA1s.
> I _think_ any such commit is then going to allow the patch
> to be applied without conflict, and would form "a correct"
> starting point for a branch with the given patch applied.
>
> Thoughts?  In the weeds?

Well, that is essentially "git am -3" does _without_ requiring a
single commit that has those blobs in the same commit.  As long
as the preimage blobs are found in your repository, it will
synthesize a tree that has them and applies the patch -- and
then it does a three-way merge between the result and the state
you originally tried to apply the patch to, using that
synthesized tree as the merge base.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux