Add simple wrapper to fixup last non-fixup

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-11-16 07:25:40 +01:00
parent 51b1129ffb
commit 1ca4700040
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

9
bin/git-fixup-last Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -euo pipefail
source ${HOME}/bin/script_framework.sh
commit=$(git log master..HEAD --oneline | grep -v 'fixup!' | head -n1)
step "Doing fixup against commit: ${commit}"
exec git c --fixup $(echo "${commit}" | cut -d ' ' -f 1)