From 64afb74b0a072663b5f64f43fe64d78aa9497611 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 25 Nov 2021 13:13:01 +0100 Subject: [PATCH] bin/git-l: filter stderr --- .local/bin/scripts/git-l | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.local/bin/scripts/git-l b/.local/bin/scripts/git-l index 3e54d47..df54615 100755 --- a/.local/bin/scripts/git-l +++ b/.local/bin/scripts/git-l @@ -1,5 +1,7 @@ #!/bin/sh git rev-parse @{upstream} >/dev/null 2>&1 || - git branch --set-upstream-to=@{push} -git pull --rebase --autostash "$@" 2>/dev/null || - { printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 && git rebase --abort; } + git branch --set-upstream-to=@{push} +git pull --rebase --autostash "$@" 2> >(head -3 >&2) || + { test -e $(git rev-parse --git-path rebase-merge) && + printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 && + git rebase --abort; }