lib/libnetwork.lib.in: make sure requested commit to checkout exists or fail
This commit is contained in:
parent
52f6c8266f
commit
7233b80200
@ -980,6 +980,9 @@ function git.create_tarball() {
|
||||
if [ "${git_branch/@*}" != "${git_branch}" ]; then
|
||||
git_commit="${git_branch/*@}"
|
||||
git_branch="${git_branch/@*}"
|
||||
if [ ! "${git_commit}" ]; then
|
||||
notify.error "$FUNCNAME: cannot checkout empty commit"
|
||||
fi
|
||||
fi
|
||||
notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
|
||||
if [ "${git_commit}" ]; then
|
||||
@ -1053,7 +1056,11 @@ not the expected package version"" (${NOTE}${today}git${NORM})..."
|
||||
|
||||
if [ "${git_commit}" ]; then
|
||||
cd ${pck_tarball}
|
||||
git checkout ${git_commit}
|
||||
git checkout ${git_commit} || {
|
||||
popd &>/dev/null
|
||||
rm -fr $tmpgitdir
|
||||
notify.error $"cannot checkout the specified tag";
|
||||
}
|
||||
cd ..
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user