Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umpf: add -l|--local option as a shortcut to use local branches #44

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading