File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Work out which candidate branch this one was probably forked from
4
+
5
+ best=1000000
6
+ parent=
7
+
8
+ for candidate in ` git branch | grep ' candidate-' | sed ' s/\*//' ` master ; do
9
+ delta=$( git rev-list --count --no-merges $candidate ...HEAD)
10
+ # echo $candidate : $delta
11
+ if [ $delta -lt $best ] ; then
12
+ best=$delta
13
+ parent=$candidate
14
+ fi
15
+ done
16
+ if [ -z $parent ] ; then
17
+ exit 2
18
+ fi
19
+ echo $parent
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ if [ "$#" -ge 1 ] ; then
5
5
into=$1
6
6
shift 1
7
7
else
8
- into=master
8
+ into=$( git parent )
9
9
fi
10
10
remote=" $( git remote | grep rkc) "
11
11
if [ " $remote " = " " ]; then
Original file line number Diff line number Diff line change 9
9
fi
10
10
echo " Fetching data from $remote "
11
11
git fetch $remote
12
- for candidate in ` git branch | grep ' candidate-' | sed ' s/\*//' ` master stable
12
+ for candidate in ` git branch | sed ' s/\*/ / ' | grep -E ' candidate-| master$| stable$ ' | sed ' s/\*//' `
13
13
do
14
14
git merge-ff -q $candidate $remote /$candidate
15
15
done
You can’t perform that action at this time.
0 commit comments