config/git: modernizations

This commit is contained in:
xeruf 2022-09-03 13:36:52 +02:00
parent 58d5f34019
commit d742a5c754
2 changed files with 10 additions and 3 deletions

View File

@ -32,6 +32,9 @@
tool = nvim tool = nvim
submodule = log submodule = log
context = 2 context = 2
renames = copy
colorMoved = dimmed-zebra
colorMovedWS = allow-indentation-change
[merge] [merge]
tool = nvim tool = nvim
[mergetool "nvim"] [mergetool "nvim"]
@ -179,8 +182,8 @@
cap = !git commit --amend --no-edit && git push --force-with-lease cap = !git commit --amend --no-edit && git push --force-with-lease
# CLEANUP # CLEANUP
rg = rmgonebranches
gcr = !git gc && git repack -a -d gcr = !git gc && git repack -a -d
# see git-prunerefs
[include] [include]
path= "diffr" path= "diffr"

View File

@ -1,6 +1,10 @@
#!/bin/sh -e #!/bin/sh -e
aurdir="$DATA/1-projects/aur" aurdir="$DATA/1-projects/aur"
test $# -eq 0 && cd "$aurdir" && exec $SHELL commands="<origin|clone|create|commit|push|clean>"
if test $# -eq 0
then echo "Usage: $0 $commands"
case "$PWD" in ($aurdir*) exit 0;; (*) cd "$aurdir"; exec $SHELL;; esac
fi
command=$1 command=$1
shift shift
url="ssh://aur@aur.archlinux.org/${1:-$(basename $PWD)}.git" url="ssh://aur@aur.archlinux.org/${1:-$(basename $PWD)}.git"
@ -31,5 +35,5 @@ case "$command" in
(clean) (clean)
find "$aurdir" -mindepth 2 -maxdepth 2 \( -iname "*.pkg.tar.*" -o -iname "*.zip" -o -type d -not -name ".*" \) \ find "$aurdir" -mindepth 2 -maxdepth 2 \( -iname "*.pkg.tar.*" -o -iname "*.zip" -o -type d -not -name ".*" \) \
-print -exec sudo rm -rI {} +;; -print -exec sudo rm -rI {} +;;
(*) echo "Unknown command!"; exit 3;; (*) echo "Unknown command! Available: $commands"; exit 3;;
esac esac