travis: also search unknown submodule commit in branches
This commit is contained in:
parent
a0a5085917
commit
d18e65dbdf
1 changed files with 4 additions and 3 deletions
|
@ -30,14 +30,15 @@ on () {
|
||||||
|
|
||||||
git_submodule_update () {
|
git_submodule_update () {
|
||||||
git submodule update "$@" && return
|
git submodule update "$@" && return
|
||||||
# failed, search pull requests for matching commits
|
# failed, search branch and pull request heads for matching commit
|
||||||
git submodule foreach \
|
git submodule foreach \
|
||||||
'
|
'
|
||||||
test "$sha1" = "`git rev-parse HEAD`" ||
|
test "$sha1" = "`git rev-parse HEAD`" ||
|
||||||
git ls-remote origin "refs/pull/*/head" |
|
git ls-remote origin "refs/heads/*" "refs/pull/*/head" |
|
||||||
while read hash ref; do
|
while read hash ref; do
|
||||||
if test "$hash" = "$sha1"; then
|
if test "$hash" = "$sha1"; then
|
||||||
git config --add remote.origin.fetch "+$ref:$ref";
|
git config --add remote.origin.fetch "+$ref:$ref"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
'
|
'
|
||||||
|
|
Loading…
Reference in a new issue