bin(git-fetch-branch): Handle running within working directory
This commit is contained in:
parent
6dc3ad307b
commit
b96424cf79
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,8 @@ export USAGE='<branch>
|
||||||
or: <remote> <branch>
|
or: <remote> <branch>
|
||||||
'
|
'
|
||||||
|
|
||||||
|
cd "$(git rev-parse --show-toplevel)"
|
||||||
|
|
||||||
# This is the recommended pattern from `man git-sh-setup`.
|
# This is the recommended pattern from `man git-sh-setup`.
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
|
|
@ -23,7 +25,6 @@ case "$#" in
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# I often change the fetch refmap to only watch my development branches and
|
# I often change the fetch refmap to only watch my development branches and
|
||||||
# permanent shared ones. Explicitly use a default-ish refmap to undo that and
|
# permanent shared ones. Explicitly use a default-ish refmap to undo that and
|
||||||
# make this create a named local branch.
|
# make this create a named local branch.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue