Skip to content

Commit e37557b

Browse files
committed
Fixing bugs
1 parent 88332b6 commit e37557b

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

git-create-pr

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

3-
set -e
3+
set -ex
44

55
function usage() {
66
bold=$(tput bold)
@@ -28,16 +28,19 @@ while [[ $1 = -?* ]]; do
2828
shift
2929
done
3030

31+
#echo "branch..."
3132
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"
3942
git push -u origin $branch
40-
fi
43+
#fi
4144

4245
hub pull-request
4346

git-push-branch

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ while [[ $1 = -?* ]]; do
2929
done
3030

3131
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)
3333

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"
3939
git push -u origin $branch
40-
fi
40+
#fi
4141

4242

0 commit comments

Comments
 (0)