File tree 2 files changed +20
-17
lines changed
2 files changed +20
-17
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
3
- set -e
3
+ set -ex
4
4
5
5
function usage() {
6
6
bold=$( tput bold)
@@ -28,16 +28,19 @@ while [[ $1 = -?* ]]; do
28
28
shift
29
29
done
30
30
31
+ # echo "branch..."
31
32
branch=$( git rev-parse --abbrev-ref HEAD)
32
- upstream=$( git rev-parse --abbrev-ref @{upstream} 2> /dev/null)
33
-
34
- if [[ $? == 0 ]]; then
35
- echo " branch '$branch ' tracks '$upstream '"
36
- git push
37
- else
38
- echo " branch '$branch ' has no upstream configured"
33
+ # echo "upstream..."
34
+ # upstream=$( git rev-parse --abbrev-ref @{upstream} || "" )
35
+
36
+ # echo "does it track?"
37
+ # if [[ "${upstream}" != "" ]]; then
38
+ # echo "branch '$branch' tracks '$upstream'"
39
+ # git push
40
+ # else
41
+ # echo "branch '$branch' has no upstream configured"
39
42
git push -u origin $branch
40
- fi
43
+ # fi
41
44
42
45
hub pull-request
43
46
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ while [[ $1 = -?* ]]; do
29
29
done
30
30
31
31
branch=$( git rev-parse --abbrev-ref HEAD)
32
- upstream=$( git rev-parse --abbrev-ref @{upstream} 2> /dev/null)
32
+ # upstream=$(git rev-parse --abbrev-ref @{upstream} 2>/dev/null)
33
33
34
- if [[ $? == 0 ]]; then
35
- echo " branch '$branch ' tracks '$upstream '"
36
- git push
37
- else
38
- echo " branch '$branch ' has no upstream configured"
34
+ # if [[ $? == 0 ]]; then
35
+ # echo "branch '$branch' tracks '$upstream'"
36
+ # git push
37
+ # else
38
+ # echo "branch '$branch' has no upstream configured"
39
39
git push -u origin $branch
40
- fi
40
+ # fi
41
41
42
42
You can’t perform that action at this time.
0 commit comments