]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
script/ceph-backport.sh: Fix verification of git repository
authorTiago Melo <tmelo@suse.com>
Mon, 16 Sep 2019 10:19:35 +0000 (10:19 +0000)
committerTiago Melo <tmelo@suse.com>
Mon, 16 Sep 2019 10:27:45 +0000 (10:27 +0000)
In git 2.16 running "git show-ref HEAD" returns an error and
prevents the script to procced.

Signed-off-by: Tiago Melo <tmelo@suse.com>
src/script/ceph-backport.sh

index 35d2015a4791e7ea463bd57339ae6b502b7b5605..40e4fb915199dfcd6c3af8dd8acffc3be3f970dd 100755 (executable)
@@ -465,7 +465,7 @@ function warning {
 # are we in a local git clone?
 #
 
-if git show-ref HEAD >/dev/null 2>&1 ; then
+if git status >/dev/null 2>&1 ; then
     debug "In a local git clone. Good."
 else
     error "This script must be run from inside a local git clone"