git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Need to change old commit (and regenerate tree)

From
APAntriksh Pany <antriksh.pany@gmail.com>
Date
May 21, 2010, 18:18 UTC
Message-ID
<AANLkTin77rXsU28ikOZx8mxpQANHjaEET--RiR6lGd3a@mail.gmail.com>
In-Reply-To
<AANLkTim0M-PJC655bhfcQ6mBYTPt9TK9Ys8qJBJd1UPS@mail.gmail.com>
Hi Jon

I guess the parent of both B~3 as well as C~6 is A2. So if, as you say, the time can be made identical, they should yield the same SHA1 IMHO.

On Fri, May 21, 2010 at 12:05 AM, Jon Seymour <jon.seymour@gmail.com> wrote:
Show 26 quoted lines
> On Fri, May 21, 2010 at 8:09 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Antriksh Pany <antriksh.pany@gmail.com> writes:
>>
>>> Instead of (what I initially expected):
>>>
>>> A--------o--------o--------o--------o(old B)--------o--------o--------o(old C)
>>>
>>> A2--------o--------o--------o--------B--------o--------o--------C
>>>
>>>
>>> So what I am missing here? Aren't the new commits B~1, B~2, B~3
>>> identical to C~4, C~5, C~6 (respectively) in all ways so as to have
>>> gotten them the same SHA1 and hence appear as what I expected them to
>>> appear?
>>
>> No, they have a different commit time, which is also part of the hash.
>>
>
> Of course, even if the commit time was forged to be the same, the
> parent of B~3 is different to the parent of C~6 and since the parent
> is also contributes bits to the respective hashes, B~3 will
> necessarily (unlikely hash collisions excepted!) have a different hash
> to C~6
>
> jon.
>
Previous: Jon SeymourNext: Geert Uytterhoeven
Message 4 of 6 in “Need to change old commit (and regenerate tree)”
  1. Antriksh PanyMay 20, 2010
  2. Andreas SchwabMay 20, 2010
  3. Jon SeymourMay 20, 2010
  4. Antriksh PanyMay 21, 2010
  5. Geert UytterhoevenMay 21, 2010
  6. Antriksh PanyMay 21, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.