Fix spurious error in triggers/upstream
The initial fetch of a new repo which has 'upstream' read-only mirroring configured will cause a spurious error concerning FETCH_HEAD not yet existing. This silences the error.
This commit is contained in:
parent
51ab768e2a
commit
896ada58c0
|
@ -11,7 +11,7 @@ cd $GL_REPO_BASE/$repo.git || exit 1
|
||||||
|
|
||||||
[ "$1" != "fetch" ] && {
|
[ "$1" != "fetch" ] && {
|
||||||
nice=$(gitolite git-config $repo gitolite-options.upstream.nice)
|
nice=$(gitolite git-config $repo gitolite-options.upstream.nice)
|
||||||
[ -n "$nice" ] && find FETCH_HEAD -mmin -$nice | grep . >/dev/null && exit 0
|
[ -n "$nice" ] && find FETCH_HEAD -mmin -$nice 2>/dev/null | grep . >/dev/null && exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
git fetch -q "$url" '+refs/*:refs/*'
|
git fetch -q "$url" '+refs/*:refs/*'
|
||||||
|
|
Loading…
Reference in a new issue