projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
85bc64c
)
mod to check if remote branch exists
author
Chris Koeritz
<fred@gruntose.com>
Fri, 10 Nov 2017 21:08:52 +0000
(16:08 -0500)
committer
Chris Koeritz
<fred@gruntose.com>
Fri, 10 Nov 2017 21:08:52 +0000
(16:08 -0500)
scripts/rev_control/version_control.sh
patch
|
blob
|
history
diff --git
a/scripts/rev_control/version_control.sh
b/scripts/rev_control/version_control.sh
index 84607308ff50b3ade5a2fff5b0e513ce310c655c..7145416f66f9450ab0ad5223a9eee20ae7cfcae5 100644
(file)
--- a/
scripts/rev_control/version_control.sh
+++ b/
scripts/rev_control/version_control.sh
@@
-299,8
+299,12
@@
function do_careful_git_update()
for bran in $branch_list; do
# echo "synchronizing remote branch: $bran"
git checkout "$bran"
for bran in $branch_list; do
# echo "synchronizing remote branch: $bran"
git checkout "$bran"
- test_or_die "git checking out remote branch: $bran"
- git pull --no-ff origin "$bran"
+ test_or_die "git switching checkout to remote branch: $bran"
+ remote_branch_info=$(git ls-remote --heads origin $bran 2>/dev/null)
+ if [ ! -z "$remote_branch_info" ]; then
+ # we are pretty sure the remote branch does exist.
+ git pull --no-ff origin "$bran"
+ fi
test_or_die "git pull of remote branch: $bran"
done
# now switch back to our branch.
test_or_die "git pull of remote branch: $bran"
done
# now switch back to our branch.