Commit 7d6c99b8 authored by Kenneth Moreland's avatar Kenneth Moreland

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

The changes silence git rev-parse and support
Windows lease detection.
parent 1e48012f
......@@ -95,7 +95,7 @@ if test -z "$no_topic"; then
if $lease; then
have_ref=false
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
else
die "It seems that a local ref for the branch is
......@@ -105,7 +105,11 @@ push without '-f' or '--force'."
fi
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
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment