Update git-gitlab-push to recent changes in GitSetup repo

The changes silence git rev-parse and support
Windows lease detection.
This commit is contained in:
Kenneth Moreland 2017-09-21 09:19:12 -06:00
parent 1e48012fab
commit 7d6c99b8ce

@ -95,7 +95,7 @@ if test -z "$no_topic"; then
if $lease; then if $lease; then
have_ref=false have_ref=false
remoteref="refs/remotes/$remote/$topic" remoteref="refs/remotes/$remote/$topic"
if git rev-parse --verify -q "$remoteref"; then if git rev-parse --verify -q "$remoteref" > /dev/null; then
have_ref=true have_ref=true
else else
die "It seems that a local ref for the branch is die "It seems that a local ref for the branch is
@ -105,7 +105,11 @@ push without '-f' or '--force'."
fi fi
have_lease_flag=false have_lease_flag=false
if git push -h | egrep_q -e '--force-with-lease'; then # Note: on Windows 'git push --help' will open a browser, and
# the check will fail, so use the flag by default.
if git --version | egrep_q -e 'windows'; then
have_lease_flag=true
elif git push --help | egrep_q -e '--force-with-lease'; then
have_lease_flag=true have_lease_flag=true
fi fi