config/git: improve some args

This commit is contained in:
xeruf 2021-11-04 12:23:32 +01:00
parent f432671290
commit 2ed5ad49fb
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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" "$@"