From 96fe8079a58ff3e8f84dccc8dab299121b2780b6 Mon Sep 17 00:00:00 2001 From: Marco Felsch Date: Tue, 2 Jul 2024 12:36:15 +0200 Subject: [PATCH] umpf: skip empty commits for umpf-tags There are cases where topic branches do have empty commits e.g. if the topic branches are managed via b4 [1]. b4 uses empty commits to track metadata. This is useful for topic branch management but shouldn't be part of the final umpf-tag. Therefore add --no-keep-empty to skip empty commits during the rebase. [1] https://github.com/mricon/b4 Signed-off-by: Marco Felsch --- umpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umpf b/umpf index 5d127de..c7b5001 100755 --- a/umpf +++ b/umpf @@ -1083,7 +1083,7 @@ rebase_branch() { 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 + if ! ${GIT} rebase -q ${args} --no-keep-empty --onto HEAD "${base}" "${topicrev}" >&2; then if ! rebase_try_continue; then bailout "rebase failed" fi