From 1ca47000404dd0506097d6ff75a91ba17bb5045c Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 16 Nov 2020 07:25:40 +0100 Subject: [PATCH] Add simple wrapper to fixup last non-fixup Signed-off-by: Knut Ahlers --- bin/git-fixup-last | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 bin/git-fixup-last diff --git a/bin/git-fixup-last b/bin/git-fixup-last new file mode 100755 index 0000000..317cd35 --- /dev/null +++ b/bin/git-fixup-last @@ -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)