gitconfig: Change "fetch-pr" alias to "checkout-pr"

This commit is contained in:
Lexi / Zoe 2022-05-04 11:04:55 +02:00
parent 9f0236db3a
commit 779b9b5a6f
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
1 changed files with 2 additions and 2 deletions

View File

@ -62,5 +62,5 @@
# Submodule helpers
sm-update = submodule update --init --recursive --remote --merge
# Fetch a branch from a pull request (supported by GitHub)
fetch-pr = "!f() { [ $# -eq 2 ] || { echo 'Usage: git fetch-pr PULL_REQUEST_ID BRANCH_NAME'; exit 1; }; git fetch origin pull/$1/head:$2; }; f"
# Checkout a branch from a pull request (supported by GitHub)
checkout-pr = "!f() { [ $# -ge 1 ] || { echo 'Usage: git fetch-pr PULL_REQUEST_ID [BRANCH_NAME]'; exit 1; }; BRANCH=${2-pull-request-$1}; git fetch origin pull/$1/head:$BRANCH && git switch $BRANCH; }; f"