mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-07 07:19:57 +02:00
This script is failing currently on https://github.com/jesseduffield/lazygit/pull/3631 because that fork's master branch is 300 commits behind our own, but the feature branch is up to date. The thing is, we don't actually need to involve the master branch. All we care about is the feature branch's own commits, so this commit simply fetches those commits and checks them.
15 lines
400 B
Bash
Executable File
15 lines
400 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# We will have only done a shallow clone, so the git log will consist only of
|
|
# commits on the current PR
|
|
commits=$(git log --grep='^fixup!' --grep='^squash!' --grep='^amend!' --grep='^[^\n]*WIP' --grep='^[^\n]*DROPME' --format="%h %s")
|
|
|
|
if [ -z "$commits" ]; then
|
|
echo "No fixup commits found."
|
|
exit 0
|
|
else
|
|
echo "Fixup or WIP commits found:"
|
|
echo "$commits"
|
|
exit 1
|
|
fi
|