From 419b0da3f1d438b96ae82d1f3f752dc3c6fce925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 18 Oct 2023 21:55:36 +0200 Subject: [PATCH] Properly squash commits created by git commit --fixup=amend:$rev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git commit --fixup=amend:$rev allows to overwrite the commit message of a previous commit. This results in a commit with prefix "amend!". Expand the pattern that triggers using git rebase -i --autosquash to also match on such commits. Signed-off-by: Uwe Kleine-König --- umpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umpf b/umpf index 3b9f2cc..65cec0b 100755 --- a/umpf +++ b/umpf @@ -992,7 +992,7 @@ rebase_branch() { echo "# umpf-hashinfo: ${topicrev}" >&${series_out} ${GIT} rev-parse HEAD > "${STATE}/prev_head" - if ${GIT} log --oneline "${base}..${topicrev}" | grep -q '\(fixup\|squash\)!'; then + if ${GIT} log --oneline "${base}..${topicrev}" | grep -q '\(amend\|fixup\|squash\)!'; then args="-i --autosquash" fi if ! ${GIT} rebase -q ${args} --onto HEAD "${base}" "${topicrev}" >&2; then