git: add copr (check out PR) alias

This commit is contained in:
Daniel Lundin 2024-03-30 13:55:08 +01:00
parent 4d6f9e2887
commit ee598e5fe8

View file

@ -42,6 +42,12 @@ sync = branchless sync
sw = branchless switch
s = branchless switch -i
new = !git fetch -u origin main:main && git branchless switch -d origin/main
copr = "!f() { \
pr=$1 \
&& test -n \"$pr\" || pr=`tea pr list -o simple | fzf --bind 'enter:become(echo {+1})'` \
&& git fetch origin refs/pull/$pr/head \
&& git checkout --detach FETCH_HEAD \
;};f"
gerrit-clone = "!f() { \
git clone ssh://gerrit-ssh.shelman.io:2222/$1 \