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

View File

@ -1,6 +1,10 @@
#!/bin/sh -e
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
shift
url="ssh://aur@aur.archlinux.org/${1:-$(basename $PWD)}.git"
@ -31,5 +35,5 @@ case "$command" in
(clean)
find "$aurdir" -mindepth 2 -maxdepth 2 \( -iname "*.pkg.tar.*" -o -iname "*.zip" -o -type d -not -name ".*" \) \
-print -exec sudo rm -rI {} +;;
(*) echo "Unknown command!"; exit 3;;
(*) echo "Unknown command! Available: $commands"; exit 3;;
esac