config/git: adjust git-aur
This commit is contained in:
parent
092909e705
commit
2230d3fada
|
@ -139,7 +139,7 @@ gitcommits() {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
local stashed="$(git rev-parse --show-toplevel)/.git/stashed-commits"
|
local stashed="$(git rev-parse --git-path stashed-commits)"
|
||||||
if [ $1 ]; then
|
if [ $1 ]; then
|
||||||
if [ $verbosity -eq 0 ]
|
if [ $verbosity -eq 0 ]
|
||||||
then git rev-list --reverse HEAD...$1 >$stashed
|
then git rev-list --reverse HEAD...$1 >$stashed
|
||||||
|
|
|
@ -4,7 +4,7 @@ test $# -eq 0 && cd "$aurdir" && exec $SHELL
|
||||||
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"
|
||||||
case $command in
|
case "$command" in
|
||||||
(origin)
|
(origin)
|
||||||
test "$(git rev-parse --git-dir)" = ".git" && git remote set-url origin "$url"
|
test "$(git rev-parse --git-dir)" = ".git" && git remote set-url origin "$url"
|
||||||
git remote -v;;
|
git remote -v;;
|
||||||
|
@ -19,15 +19,17 @@ case $command in
|
||||||
git add -f .gitignore PKGBUILD
|
git add -f .gitignore PKGBUILD
|
||||||
git commit -m "Create package" "$@"
|
git commit -m "Create package" "$@"
|
||||||
git aur push --amend;;
|
git aur push --amend;;
|
||||||
|
(commit)
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
git add -f .SRCINFO
|
||||||
|
git commit -v "$@"
|
||||||
(push)
|
(push)
|
||||||
updpkgsums
|
updpkgsums
|
||||||
makepkg --printsrcinfo > .SRCINFO
|
git add -f *.install 2>/dev/null || true
|
||||||
git add -f .SRCINFO *.install 2>/dev/null || true
|
git aur commit -a "$@"
|
||||||
git commit -v -a "$@"
|
|
||||||
git push;;
|
git push;;
|
||||||
(clean)
|
(clean)
|
||||||
find "$aurdir" -mindepth 2 -maxdepth 2 \( -name "*.tar.gz" -o -type d -not -name ".*" \) \
|
find "$aurdir" -mindepth 2 -maxdepth 2 \( -iname "*.pkg.tar.*" -o -type d -not -name ".*" \) \
|
||||||
-print -exec sudo rm -rI {} +;;
|
-print -exec sudo rm -rI {} +;;
|
||||||
(*) echo "Unknown command!"; exit 3;;
|
(*) echo "Unknown command!"; exit 3;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,13 @@
|
||||||
# If the first arg is "add", files are staged rather than committed.
|
# If the first arg is "add", files are staged rather than committed.
|
||||||
# All remaining args are passed to git-commit
|
# All remaining args are passed to git-commit
|
||||||
# TODO fix broken prep-commit-msg hook when there is no unifying path
|
# TODO fix broken prep-commit-msg hook when there is no unifying path
|
||||||
|
# fix broken alt-enter not opening editor --bind='alt-enter:change-prompt(hi>)'
|
||||||
|
|
||||||
fzfpipe() {
|
fzfpipe() {
|
||||||
# Take nul-separated input from git-status short/porcelain
|
# Take nul-separated input from git-status short/porcelain
|
||||||
# and return a newline-separated list of selected files
|
# and return a newline-separated list of selected files
|
||||||
cut -z -c2- |
|
cut -z -c2- |
|
||||||
git fzf-diff --read0 -d' ' --nth=2.. --bind='alt-enter:execute(nvim {2..})' \
|
git fzf-diff --read0 -d' ' --nth=2.. --bind="alt-enter:execute($EDITOR '$(git rev-parse --show-toplevel)/{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 %" |
|
--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-
|
cut -c3-
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue