Skip to content

Commit

Permalink
umpf: skip empty commits for umpf-tags
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Marco Felsch committed Jul 2, 2024
1 parent d905c70 commit 96fe807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion umpf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 96fe807

Please sign in to comment.