mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-01 13:17:53 +02:00
Extend check for fixups
Also check for squash! and amend! (these are all anchored to the beginning of the subject), and WIP and DROPME for good measure (but only if they occur in the first line, otherwise it wouldn't let me merge this very commit :)
This commit is contained in:
parent
891362dfb2
commit
20ccb03a45
@ -13,13 +13,13 @@ fi
|
||||
echo "Base commit: $base_commit"
|
||||
|
||||
# Get commits with "fixup!" in the message from base_commit to HEAD
|
||||
commits=$(git log -i -E --grep "fixup\!" --format="%h %s" "$base_commit..HEAD")
|
||||
commits=$(git log -i -E --grep '^fixup!' --grep '^squash!' --grep '^amend!' --grep '^[^\n]*WIP' --grep '^[^\n]*DROPME' --format="%h %s" "$base_commit..HEAD")
|
||||
|
||||
if [ -z "$commits" ]; then
|
||||
echo "No fixup commits found."
|
||||
exit 0
|
||||
else
|
||||
echo "Fixup commits found:"
|
||||
echo "Fixup or WIP commits found:"
|
||||
echo "$commits"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user