{"thread":{"id":"47078","subject":"Meaning of two commit-ish hash in git diff","startedAt":"2017-10-31T03:23:34Z","lastAt":"2017-11-01T02:48:09Z","messageCount":5,"participants":["Yubin Ruan","Junio C Hamano","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"331446","messageId":"ab9b5c63-ca38-6157-6732-78aa5d5f291f@gmail.com","threadId":"47078","inReplyTo":null,"subject":"Meaning of two commit-ish hash in git diff","fromName":"Yubin Ruan","fromEmail":"ablacktshirt@gmail.com","sentAt":"2017-10-31T03:24:22Z","receivedAt":"2017-10-31T03:23:34Z","isPatch":false,"sender":{"key":"ablacktshirt@gmail.com","avatar":null},"body":"Hi,\n\nCan anyone tell me what does the \"f8886b4..a1c96df\" mean in a git diff output,\nas below?\n\ndiff --git a/path/somefile b/path/somefile\nindex f8886b4..a1c96df 100644\n--- a/path/somefile\n+++ b/path/somefile\n<snip>\n\nThis is output by a `git diff` between two adjacent commits but they are\nnot any commit hash. I grep through the whole $(git log) but still cannot\nfind those hash.\n\nAnd BTW, are there any special meanings for that .. ?\n\nThanks,\nYubin\n"},{"id":"331447","messageId":"xmqqd1542b5r.fsf@gitster.mtv.corp.google.com","threadId":"47078","inReplyTo":"ab9b5c63-ca38-6157-6732-78aa5d5f291f@gmail.com","subject":"Re: Meaning of two commit-ish hash in git diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-31T04:28:48Z","receivedAt":"2017-10-31T04:28:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yubin Ruan <ablacktshirt@gmail.com> writes:\n\n> diff --git a/path/somefile b/path/somefile\n> index f8886b4..a1c96df 100644\n> --- a/path/somefile\n> +++ b/path/somefile\n> <snip>\n>\n> This is output by a `git diff` between two adjacent commits but they are\n> not any commit hash. I grep through the whole $(git log) but still cannot\n> find those hash.\n\nThe f8886b4 you see on the left is the name of the blob object on\nthe left hand side of the comparison that produced this output;\nsimilarly a1c96df is the name of the blob object on the right hand\nside of the comparison.\n\nIOW, if you have the contents of the blob whose object name is\nf8886b4, by applying this patch, you will get a blob whose object\nname is a1c96df.\n\nThe information is used by \"git am -3\" when the patch does not apply\ncleanly to fall back to the 3-way merge.\n"},{"id":"331526","messageId":"2A1B66E868594FC984FED8F0EDEAF900@PhilipOakley","threadId":"47078","inReplyTo":"xmqqd1542b5r.fsf@gitster.mtv.corp.google.com","subject":"Re: Meaning of two commit-ish hash in git diff","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2017-11-01T00:27:12Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Yubin ,\n\nFrom: \"Junio C Hamano\" <gitster@pobox.com>\n> Yubin Ruan <ablacktshirt@gmail.com> writes:\n>\n>> diff --git a/path/somefile b/path/somefile\n>> index f8886b4..a1c96df 100644\n>> --- a/path/somefile\n>> +++ b/path/somefile\n>> <snip>\n>>\n>> This is output by a `git diff` between two adjacent commits but they are\n>> not any commit hash. I grep through the whole $(git log) but still cannot\n>> find those hash.\n>\n> The f8886b4 you see on the left is the name of the blob object on\n> the left hand side of the comparison that produced this output;\n> similarly a1c96df is the name of the blob object on the right hand\n> side of the comparison.\n>\n> IOW, if you have the contents of the blob whose object name is\n> f8886b4, by applying this patch, you will get a blob whose object\n> name is a1c96df.\n>\n> The information is used by \"git am -3\" when the patch does not apply\n> cleanly to fall back to the 3-way merge.\n\nThe ability to 'git describe` those blob object IDs is currently the subject \nof a patch series\nhttps://public-inbox.org/git/20171031211852.13001-1-sbeller@google.com/\n\nMaybe see if would have helped ;-)\n\nPhilip \n\n"},{"id":"331527","messageId":"127f7748-4b5d-f6be-2c64-fa4ee079b871@gmail.com","threadId":"47078","inReplyTo":"2A1B66E868594FC984FED8F0EDEAF900@PhilipOakley","subject":"Re: Meaning of two commit-ish hash in git diff","fromName":"Yubin Ruan","fromEmail":"ablacktshirt@gmail.com","sentAt":"2017-11-01T01:07:20Z","receivedAt":"2017-11-01T01:06:37Z","isPatch":false,"sender":{"key":"ablacktshirt@gmail.com","avatar":null},"body":"Thanks Philip,\n\nOn 11/01/2017 08:27 AM, Philip Oakley wrote:\n> Yubin ,\n> \n> From: \"Junio C Hamano\" <gitster@pobox.com>\n>> Yubin Ruan <ablacktshirt@gmail.com> writes:\n>>\n>>> diff --git a/path/somefile b/path/somefile\n>>> index f8886b4..a1c96df 100644\n>>> --- a/path/somefile\n>>> +++ b/path/somefile\n>>> <snip>\n>>>\n>>> This is output by a `git diff` between two adjacent commits but they are\n>>> not any commit hash. I grep through the whole $(git log) but still cannot\n>>> find those hash.\n>>\n>> The f8886b4 you see on the left is the name of the blob object on\n>> the left hand side of the comparison that produced this output;\n>> similarly a1c96df is the name of the blob object on the right hand\n>> side of the comparison.\n>>\n>> IOW, if you have the contents of the blob whose object name is\n>> f8886b4, by applying this patch, you will get a blob whose object\n>> name is a1c96df.\n>>\n>> The information is used by \"git am -3\" when the patch does not apply\n>> cleanly to fall back to the 3-way merge.\n> \n> The ability to 'git describe` those blob object IDs is currently the subject of a patch series\n> https://public-inbox.org/git/20171031211852.13001-1-sbeller@google.com/\n> \n> Maybe see if would have helped ;-)\n\nWhat would be other use case of the blob object / blob name ?\n\nYubin\n\n"},{"id":"331534","messageId":"xmqqfu9yww7x.fsf@gitster.mtv.corp.google.com","threadId":"47078","inReplyTo":"127f7748-4b5d-f6be-2c64-fa4ee079b871@gmail.com","subject":"Re: Meaning of two commit-ish hash in git diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-11-01T02:48:02Z","receivedAt":"2017-11-01T02:48:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yubin Ruan <ablacktshirt@gmail.com> writes:\n\n>>> IOW, if you have the contents of the blob whose object name is\n>>> f8886b4, by applying this patch, you will get a blob whose object\n>>> name is a1c96df.\n>>>\n>>> The information is used by \"git am -3\" when the patch does not apply\n>>> cleanly to fall back to the 3-way merge.\n>> \n>> The ability to 'git describe` those blob object IDs is currently the subject of a patch series\n>> https://public-inbox.org/git/20171031211852.13001-1-sbeller@google.com/\n>> \n>> Maybe see if would have helped ;-)\n>\n> What would be other use case of the blob object / blob name ?\n\nPerhaps start from \"git cat-file blob $name\".  And follow the path\nyour imagination leads you to ;-)\n\n\n"}]}