config/git: improve some args
This commit is contained in:
parent
f432671290
commit
2ed5ad49fb
|
@ -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
|
||||
|
|
|
@ -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" "$@"
|
||||
|
|
Loading…
Reference in New Issue