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

Re: [PATCH 0/2] commit: preserve commit hash on a no-op amend

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Jun 13, 2026, 16:15 UTC
Message-ID
<CAHwyqnXDa96+NiVanYyJb7R+XyOz6ooS+SW+b2OdKx979gUNaw@mail.gmail.com>
In-Reply-To
<xmqq33yqfnsa.fsf@gitster.g>

Interesting discussions! This sounds like showstopper, seems more reasonable to leave this topic for now.

I just want to share that I've been running this for years to re-trigger CI (because up until a few days ago I didn't realize that the hash did indeed change even when nothing had changed), I had the wrong mental model for commit hashes:

    git commit --amend --no-edit --date="now"
Harald
Previous: Junio C Hamano
Message 7 of 7 in “commit: preserve commit hash on a no-op amend”
  1. 0/2 commit: preserve commit hash on a no-op amendHarald Nordgren via GitGitGadget, Jun 13, 2026
  2. 1/2 commit: extract commit_index_files_or_die() helperHarald Nordgren via GitGitGadget, Jun 13, 2026
  3. 2/2 commit: keep the commit on a no-op amendHarald Nordgren via GitGitGadget, Jun 13, 2026
  4. Johannes SixtJun 13, 2026
  5. Ben KnobleJun 13, 2026
  6. Junio C HamanoJun 13, 2026
  7. Harald NordgrenJun 13, 2026

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.