Subversion Repositories Tronxy-X3A-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ron 1
#!/usr/bin/env bash
2
#
3
# mfrb
4
#
5
# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, or master)
6
#
7
 
8
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [1|2]" 1>&2 ; exit 1; }
9
 
10
MFINFO=$(mfinfo "$@") || exit 1
11
IFS=' ' read -a INFO <<< "$MFINFO"
12
TARG=${INFO[3]}
13
CURR=${INFO[5]}
14
 
15
# If the branch isn't currently the PR target
16
if [[ $TARG != $CURR ]]; then
17
  git fetch upstream
18
  git rebase upstream/$TARG && git rebase -i upstream/$TARG
19
fi