From 537e88320ad83408f8c1c97347c60166b908b80d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 15 Jul 2020 18:09:46 +0200 Subject: [PATCH] [FIX][GIT] Alias to fixup skips other fixups --- git/.config/git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/.config/git/config b/git/.config/git/config index 6e8e5c7..64ebd3d 100644 --- a/git/.config/git/config +++ b/git/.config/git/config @@ -71,7 +71,7 @@ unassume = update-index --no-assume-unchanged assumed = "!git ls-files -v | grep ^h | cut -c 3-" push-new = "!git push -u \"${1:-origin}\" \"$(git branch | grep '^* ' | cut -f2- -d' ')\"" - fixup = "!f() { git add -- \"$1\"; git commit --fixup \"$(git log -n 1 --pretty=format:%H -- \"$1\")\"; }; f" + fixup = "!f() { git add -- \"$1\"; git commit --fixup \"$(git log --pretty=format:%H:%s -- \"$1\" | awk -F ':' '!/fixup!/ {print $1; exit}')\"; }; f" [filter "lfs"] clean = git-lfs clean -- %f