config/git: add git-cherry-get

This commit is contained in:
xeruf 2022-03-18 08:50:53 +01:00
parent 1ba6d49337
commit e040ac0527
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,7 @@ case $command in
git commit -m "Create package" "$@"
git aur push --amend;;
(push)
updpkgsums
makepkg --printsrcinfo > .SRCINFO
git add -f .SRCINFO *.install 2>/dev/null || true
git commit -v -a "$@"

View File

@ -0,0 +1,4 @@
#!/bin/sh -e
# Pick commit $2 (or HEAD) from the given git repository
# https://stackoverflow.com/questions/5120038/is-it-possible-to-cherry-pick-a-commit-from-another-git-repository
git "--git-dir=$1/.git" format-patch -k -1 --stdout $2 | git am -3 -k