Sfoglia il codice sorgente

Update git helper usage

Scott Lahteine 4 anni fa
parent
commit
a484adcb30

+ 3
- 3
buildroot/share/git/mffp Vedi File

@@ -1,14 +1,14 @@
1 1
 #!/usr/bin/env bash
2 2
 #
3
-# mffp [1|2] [commit-id]
3
+# mffp [1|2|3] [commit-id]
4 4
 #
5 5
 # Push the given commit (or HEAD) upstream immediately.
6 6
 # By default: `git push upstream HEAD:bugfix-1.1.x`
7 7
 #
8 8
 
9
-[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; }
9
+[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [commit-id]" 1>&2 ; exit 1; }
10 10
 
11
-if [[ $1 == '1' || $1 == '2' ]]; then
11
+if [[ $1 == '1' || $1 == '2' || $1 == '3' ]]; then
12 12
   MFINFO=$(mfinfo "$1") || exit 1
13 13
   REF=${2:-HEAD}
14 14
 else

+ 3
- 3
buildroot/share/git/mfnew Vedi File

@@ -6,7 +6,7 @@
6 6
 #
7 7
 
8 8
 usage() {
9
-  echo "usage: `basename $0` [1|2] [name]" 1>&2
9
+  echo "usage: `basename $0` [1|2|3] [name]" 1>&2
10 10
 }
11 11
 
12 12
 [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; }
@@ -19,12 +19,12 @@ BRANCH=pr_for_$TARG-$(date +"%G-%m-%d_%H.%M.%S")
19 19
 # BRANCH can be given as the last argument
20 20
 case "$#" in
21 21
   1 ) case "$1" in
22
-        1|2) ;;
22
+        1|2|3) ;;
23 23
         *) BRANCH=$1 ;;
24 24
       esac
25 25
       ;;
26 26
   2 ) case "$1" in
27
-        1|2) BRANCH=$2 ;;
27
+        1|2|3) BRANCH=$2 ;;
28 28
         *) usage ; exit 1 ;;
29 29
       esac
30 30
       ;;

+ 2
- 2
buildroot/share/git/mfpr Vedi File

@@ -1,11 +1,11 @@
1 1
 #!/usr/bin/env bash
2 2
 #
3
-# mfpr [1|2]
3
+# mfpr [1|2|3]
4 4
 #
5 5
 # Make a PR against bugfix-1.1.x or bugfix-2.0.x
6 6
 #
7 7
 
8
-[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [branch]" 1>&2 ; exit 1; }
8
+[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [branch]" 1>&2 ; exit 1; }
9 9
 
10 10
 MFINFO=$(mfinfo "$@") || exit 1
11 11
 IFS=' ' read -a INFO <<< "$MFINFO"

+ 2
- 2
buildroot/share/git/mfqp Vedi File

@@ -1,6 +1,6 @@
1 1
 #!/usr/bin/env bash
2 2
 #
3
-# mfqp [-q|--quick] [1|2]
3
+# mfqp [-q|--quick] [1|2|3]
4 4
 #
5 5
 # Add all changed files, commit as "patch", do `mfrb` and `git push -f`
6 6
 #
@@ -24,7 +24,7 @@ done
24 24
 
25 25
 [[ ${INFO[4]} =~ [0-9] ]] && USAGE=1
26 26
 
27
-[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; }
27
+[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2|3]" 1>&2 ; exit 1 ; }
28 28
 
29 29
 git add .
30 30
 git commit -m "patch"

+ 2
- 2
buildroot/share/git/mfrb Vedi File

@@ -2,7 +2,7 @@
2 2
 #
3 3
 # mfrb
4 4
 #
5
-# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, or master)
5
+# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, dev-2.1.x, or master)
6 6
 #
7 7
 
8 8
 MFINFO=$(mfinfo "$@") || exit 1
@@ -21,7 +21,7 @@ while [ $IND -lt ${#INFO[@]} ]; do
21 21
   let IND+=1
22 22
 done
23 23
 
24
-[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; }
24
+[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3]" 1>&2 ; exit 1 ; }
25 25
 
26 26
 # If the branch isn't currently the PR target
27 27
 if [[ $TARG != $CURR ]]; then

Loading…
Annulla
Salva