Re: Meaning of two commit-ish hash in git diff

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

 



Yubin ,

From: "Junio C Hamano" <gitster@xxxxxxxxx>
Yubin Ruan <ablacktshirt@xxxxxxxxx> writes:

diff --git a/path/somefile b/path/somefile
index f8886b4..a1c96df 100644
--- a/path/somefile
+++ b/path/somefile
<snip>

This is output by a `git diff` between two adjacent commits but they are
not any commit hash. I grep through the whole $(git log) but still cannot
find those hash.

The f8886b4 you see on the left is the name of the blob object on
the left hand side of the comparison that produced this output;
similarly a1c96df is the name of the blob object on the right hand
side of the comparison.

IOW, if you have the contents of the blob whose object name is
f8886b4, by applying this patch, you will get a blob whose object
name is a1c96df.

The information is used by "git am -3" when the patch does not apply
cleanly to fall back to the 3-way merge.

The ability to 'git describe` those blob object IDs is currently the subject of a patch series
https://public-inbox.org/git/20171031211852.13001-1-sbeller@xxxxxxxxxx/

Maybe see if would have helped ;-)

Philip



[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