From a484adcb308eea5ec82a3d2cc0a3369728953e7a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 5 Jan 2020 01:24:28 -0600 Subject: [PATCH] Update git helper usage --- buildroot/share/git/mffp | 6 +++--- buildroot/share/git/mfnew | 6 +++--- buildroot/share/git/mfpr | 4 ++-- buildroot/share/git/mfqp | 4 ++-- buildroot/share/git/mfrb | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/buildroot/share/git/mffp b/buildroot/share/git/mffp index db52b08b7..2663a4a13 100755 --- a/buildroot/share/git/mffp +++ b/buildroot/share/git/mffp @@ -1,14 +1,14 @@ #!/usr/bin/env bash # -# mffp [1|2] [commit-id] +# mffp [1|2|3] [commit-id] # # Push the given commit (or HEAD) upstream immediately. # By default: `git push upstream HEAD:bugfix-1.1.x` # -[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; } +[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [commit-id]" 1>&2 ; exit 1; } -if [[ $1 == '1' || $1 == '2' ]]; then +if [[ $1 == '1' || $1 == '2' || $1 == '3' ]]; then MFINFO=$(mfinfo "$1") || exit 1 REF=${2:-HEAD} else diff --git a/buildroot/share/git/mfnew b/buildroot/share/git/mfnew index 6d067a7f0..e491fea19 100755 --- a/buildroot/share/git/mfnew +++ b/buildroot/share/git/mfnew @@ -6,7 +6,7 @@ # usage() { - echo "usage: `basename $0` [1|2] [name]" 1>&2 + echo "usage: `basename $0` [1|2|3] [name]" 1>&2 } [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; } @@ -19,12 +19,12 @@ BRANCH=pr_for_$TARG-$(date +"%G-%m-%d_%H.%M.%S") # BRANCH can be given as the last argument case "$#" in 1 ) case "$1" in - 1|2) ;; + 1|2|3) ;; *) BRANCH=$1 ;; esac ;; 2 ) case "$1" in - 1|2) BRANCH=$2 ;; + 1|2|3) BRANCH=$2 ;; *) usage ; exit 1 ;; esac ;; diff --git a/buildroot/share/git/mfpr b/buildroot/share/git/mfpr index 0220c0aa8..bff9834bc 100755 --- a/buildroot/share/git/mfpr +++ b/buildroot/share/git/mfpr @@ -1,11 +1,11 @@ #!/usr/bin/env bash # -# mfpr [1|2] +# mfpr [1|2|3] # # Make a PR against bugfix-1.1.x or bugfix-2.0.x # -[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [branch]" 1>&2 ; exit 1; } +[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [branch]" 1>&2 ; exit 1; } MFINFO=$(mfinfo "$@") || exit 1 IFS=' ' read -a INFO <<< "$MFINFO" diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp index 7f950da59..59f069977 100755 --- a/buildroot/share/git/mfqp +++ b/buildroot/share/git/mfqp @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# mfqp [-q|--quick] [1|2] +# mfqp [-q|--quick] [1|2|3] # # Add all changed files, commit as "patch", do `mfrb` and `git push -f` # @@ -24,7 +24,7 @@ done [[ ${INFO[4]} =~ [0-9] ]] && USAGE=1 -[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2|3]" 1>&2 ; exit 1 ; } git add . git commit -m "patch" diff --git a/buildroot/share/git/mfrb b/buildroot/share/git/mfrb index e09dd87cd..1edc99bbe 100755 --- a/buildroot/share/git/mfrb +++ b/buildroot/share/git/mfrb @@ -2,7 +2,7 @@ # # mfrb # -# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, or master) +# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, dev-2.1.x, or master) # MFINFO=$(mfinfo "$@") || exit 1 @@ -21,7 +21,7 @@ while [ $IND -lt ${#INFO[@]} ]; do let IND+=1 done -[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3]" 1>&2 ; exit 1 ; } # If the branch isn't currently the PR target if [[ $TARG != $CURR ]]; then