From 2ed5ad49fbe17163a3411cba9a4627ba1368f10c Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 4 Nov 2021 12:23:32 +0100 Subject: [PATCH] config/git: improve some args --- .config/git/config | 2 +- .local/bin/scripts/git-ready | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/git/config b/.config/git/config index a7091cd..f16cb95 100644 --- a/.config/git/config +++ b/.config/git/config @@ -79,7 +79,7 @@ [alias] fzf = !fzf --preview='git diff HEAD --color=always -- {}' --tiebreak=end,index --multi - fzs = !cut -z -c2- | git fzf --read0 -d' ' --nth=2.. --bind='alt-enter:execute(nvim {2..})' --preview='test {1} != \\? && git diff --color HEAD -- {2..} | $(git config interactive.diffFilter) || find {2..} -type f | xargs -I% diff --recursive --color=always -u /dev/null %' | cut -c3- + fzs = !cut -z -c2- | git fzf --read0 -d' ' --nth=2.. --bind='alt-enter:execute(nvim {2..})' --preview='test {1} != \\? && git diff --color HEAD -U5 -- {2..} | $(git config interactive.diffFilter) || find {2..} -type f | xargs -I% diff --recursive --color=always -u /dev/null %' | cut -c3- # GET INFO s = !git stl && git stb diff --git a/.local/bin/scripts/git-ready b/.local/bin/scripts/git-ready index a8e9367..433249c 100755 --- a/.local/bin/scripts/git-ready +++ b/.local/bin/scripts/git-ready @@ -3,6 +3,6 @@ # or the first named ref from the history if there is no upstream yet. if test $# -gt 0 then remote="$1"; shift - else remote=$(git rev-parse --verify --quiet @{push} || git rev-parse $(git describe --all HEAD~ | rev | cut -d '-' -f3- | rev)) + else remote=$(git rev-parse --verify --quiet @{push} || git rev-parse $(git describe --all HEAD~ | sed 's/-[^-]*-[^-]*$//')) fi git rebase -i "$remote" "$@"