Skip to content

Commit

Permalink
Merge pull request #44 from pH5/local-option
Browse files Browse the repository at this point in the history
umpf: add -l|--local option as a shortcut to use local branches
  • Loading branch information
michaelolbrich authored Jul 4, 2024
2 parents c2580a2 + 9f041f9 commit aab68bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions umpf
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ usage() {
-p, --patchdir <path> with format-patch: write patches to <path>/
--relative <path> create patches relative to <path>
-r, --remote <remote> use <remote> to resolve branch names
-l, --local use local branches, alias for --remote refs/heads
--override <topic>[=<commit-ish>]
use commit-ish instead for the topic. May be
specified more than once. If only <topic> is
Expand Down Expand Up @@ -238,8 +239,8 @@ setup() {
GIT_FALLBACK_REMOTE="${tmp}"
fi

o="fhisub:n:p:r:v:"
l="auto-rerere,bb,nix,flags:,force,help,identical,stable,update,base:,name:,patchdir:,relative:,override:,remote:,version:"
o="fhilsub:n:p:r:v:"
l="auto-rerere,bb,nix,flags:,force,help,identical,stable,update,base:,name:,patchdir:,relative:,override:,remote:,local,version:"
if ! args="$(getopt -n umpf -o "${o}" -l "${l}" -- "${@}")"; then
usage
exit 1
Expand Down Expand Up @@ -303,6 +304,9 @@ setup() {
GIT_REMOTE="${1}"
shift
;;
-l|--local)
GIT_REMOTE="refs/heads"
;;
--override)
IFS="=" read -r topic commitish <<< "${1}"
if [ -n "${commitish}" ]; then
Expand Down

0 comments on commit aab68bc

Please sign in to comment.