]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs-apply: fix stgit detection
authorAndrey Albershteyn <aalbersh@redhat.com>
Thu, 20 Feb 2025 17:56:01 +0000 (18:56 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 26 Feb 2025 13:26:51 +0000 (14:26 +0100)
stgit top doesn't seem to return 0 if stack is created for a branch
but no patches applied. The code is 2 as when no 'stgit init' was
run.

Replace top with log which always has at least "initialize" action.

Stacked Git 2.4.12

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
tools/libxfs-apply

index 097a695f942bb832c2fb1456a0fd8c28c025d1a6..480b862d06a7d740d7c8ed620e110396e7b89525 100755 (executable)
@@ -100,7 +100,7 @@ if [ $? -eq 0 ]; then
 fi
 
 # Are we using stgit? This works even if no patch is applied.
-stg top &> /dev/null
+stg log &> /dev/null
 if [ $? -eq 0 ]; then
        STGIT=1
 fi