public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrey Albershteyn <aalbersh@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: djwong@kernel.org, aalbersh@kernel.org
Subject: [PATCH] libxfs-apply: fix stgit detection
Date: Thu, 20 Feb 2025 18:56:01 +0100	[thread overview]
Message-ID: <20250220175600.3728574-2-aalbersh@kernel.org> (raw)
In-Reply-To: <20250220164933.GP21808@frogsfrogsfrogs>

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

Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
 tools/libxfs-apply | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxfs-apply b/tools/libxfs-apply
index 097a695f942b..480b862d06a7 100755
--- a/tools/libxfs-apply
+++ b/tools/libxfs-apply
@@ -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
-- 
2.47.2


  reply	other threads:[~2025-02-20 17:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 16:49 [PATCH] libxfs-apply: allow stgit users to force-apply a patch Darrick J. Wong
2025-02-20 17:56 ` Andrey Albershteyn [this message]
2025-02-20 18:36   ` [PATCH] libxfs-apply: fix stgit detection Darrick J. Wong
2025-02-20 17:58 ` [PATCH] libxfs-apply: allow stgit users to force-apply a patch Andrey Albershteyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250220175600.3728574-2-aalbersh@kernel.org \
    --to=aalbersh@redhat.com \
    --cc=aalbersh@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox