commit: preserve commit hash on a no-op amend
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | commit: extract commit_index_files_or_die() helperbuiltin/ | +9 | 0 replies | |
| 2/2 | commit: keep the commit on a no-op amendDocumentation/ builtin/ t/ | +181 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] commit: preserve commit hash on a no-op amend
git commit --amend --no-edit rewrote the commit and moved the branch tip even when nothing changed, because the committer date was reset to "now". Reuse the existing committer date so a no-op amend keeps the commit hash and leaves the branch untouched.
A real change (tree, message, author, committer, or signing) still rewrites as before.
Harald Nordgren (2):
commit: extract commit_index_files_or_die() helper
commit: keep the commit on a no-op amend
Documentation/git-commit.adoc | 6 ++ builtin/commit.c | 69 ++++++++++++++- t/t7501-commit-basic-functionality.sh | 119 ++++++++++++++++++++++++++ 3 files changed, 190 insertions(+), 4 deletions(-)
base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2334%2FHaraldNordgren%2Famend-noop-keeps-commit-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2334/HaraldNordgren/amend-noop-keeps-commit-v1
Pull-Request: https://github.com/git/git/pull/2334
Signature · 1 line
gitgitgadget