public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: linux-xfs@vger.kernel.org, aalbersh@kernel.org
Subject: Re: [PATCH] libxfs-apply: fix stgit detection
Date: Thu, 20 Feb 2025 10:36:37 -0800	[thread overview]
Message-ID: <20250220183637.GR21808@frogsfrogsfrogs> (raw)
In-Reply-To: <20250220175600.3728574-2-aalbersh@kernel.org>

On Thu, Feb 20, 2025 at 06:56:01PM +0100, Andrey Albershteyn wrote:
> 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>

Works for me,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  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 18:36 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 ` [PATCH] libxfs-apply: fix stgit detection Andrey Albershteyn
2025-02-20 18:36   ` Darrick J. Wong [this message]
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=20250220183637.GR21808@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@kernel.org \
    --cc=aalbersh@redhat.com \
    --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