mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
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:
parent
1e48012fab
commit
7d6c99b8ce
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user