git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rubén Justo" <rjusto@gmail.com>
To: phillip.wood@dunelm.org.uk, Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] add-p P fixups
Date: Wed, 24 Jul 2024 00:08:05 +0200	[thread overview]
Message-ID: <2333cb14-f020-451c-ad14-3f30edd152ec@gmail.com> (raw)
In-Reply-To: <62af789f-ca19-4f11-9339-a97400f7e70c@gmail.com>

On Tue, Jul 23, 2024 at 10:15:03AM +0100, Phillip Wood wrote:
> Hi Rubén
> 
> These changes themselves look sensible.

Glad to hear that.

> As rj/add-p-pager is only in seen I
> assume you'll re-roll with these squashed in once everyone is happy?

Junio has already integrated these changes into the branch he has in his
tree, including a small change to the message to adjust it to his
comments, which I think is good. 

I hope that what we already have in Junio's tree is the final iteration
of this long series and that we can let it settle before making further
changes. 

> 
> Best Wishes
> 
> Phillip
> 
> On 23/07/2024 01:39, Rubén Justo wrote:
> > Rubén Justo (1):
> >    t3701: avoid one-shot export for shell functions
> >    pager: make wait_for_pager a no-op for "cat"
> > 
> >   pager.c                    | 3 +++
> >   t/t3701-add-interactive.sh | 6 +++++-
> >   2 files changed, 8 insertions(+), 1 deletion(-)
> > 
> > Range-diff against v1:
> > 1:  c3b8ebbae7 ! 1:  15fbf82fff t3701: avoid one-shot export for shell functions
> >      @@ Commit message
> >               VAR=VAL command args
> >      -    it's a common way to define one-shot variables within the scope of
> >      +    is a common way to set and export one-shot variables within the scope of
> >           executing a "command".
> >           However, when "command" is a function which in turn executes the
> >      @@ Commit message
> >               $ A=1 f
> >               A=
> >      +    Note that POSIX is not specific about this behavior:
> >      +
> >      +    http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01
> >      +
> >           One of our CI jobs on GitHub Actions uses Ubuntu 20.04 running dash
> >           0.5.10.2-6, so we failed the test t3701:51;  the "git add -p" being
> >           tested did not get our custom GIT_PAGER, which broke the test.
> > 2:  f45455f1ff ! 2:  b87c3d96e4 pager: make wait_for_pager a no-op for "cat"
> >      @@ Commit message
> >           "cat" [*2*], then we return from `setup_pager()` silently without doing
> >           anything, allowing the output to go directly to the normal stdout.
> >      -    Let's make the call to `wait_for_pager()` for these cases, or any other
> >      -    future optimizations that may occur, also exit silently without doing
> >      -    anything.
> >      +    If `setup_pager()` avoids forking a pager, then when the client calls
> >      +    the corresponding `wait_for_pager()`, we might fail trying to terminate
> >      +    a process that wasn't started.
> >      +
> >      +    One solution to avoid this problem could be to make the caller aware
> >      +    that `setup_pager()` did nothing, so it could avoid calling
> >      +    `wait_for_pager()`.
> >      +
> >      +    However, let's avoid shifting that responsibility to the caller and
> >      +    instead treat the call to `wait_for_pager()` as a no-op when we know we
> >      +    haven't forked a pager.
> >              1.- 402461aab1 (pager: do not fork a pager if PAGER is set to empty.,
> >                              2006-04-16)

  parent reply	other threads:[~2024-07-23 22:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  0:39 [PATCH v2 0/2] add-p P fixups Rubén Justo
2024-07-23  0:42 ` [PATCH v2 1/2] t3701: avoid one-shot export for shell functions Rubén Justo
2024-07-23  0:42 ` [PATCH v2 2/2] pager: make wait_for_pager a no-op for "cat" Rubén Justo
2024-07-23  0:54 ` [PATCH v2 0/2] add-p P fixups Junio C Hamano
2024-07-23  9:15 ` Phillip Wood
2024-07-23 16:52   ` Junio C Hamano
2024-07-23 22:08   ` Rubén Justo [this message]
2024-07-24 15:21     ` phillip.wood123
2024-07-24 16:12       ` Rubén Justo
2024-07-25  9:45         ` Phillip Wood
2024-07-25 12:16           ` Rubén Justo
2024-07-25 13:42             ` [PATCH 0/4] squash fixups in rj/add-p-pager Rubén Justo
2024-07-25 13:44               ` [PATCH 1/4] add-patch: test for 'p' command Rubén Justo
2024-07-25 13:44               ` [PATCH 2/4] pager: do not close fd 2 unnecessarily Rubén Justo
2024-07-25 13:44               ` [PATCH 3/4] pager: introduce wait_for_pager Rubén Justo
2024-07-25 13:44               ` [PATCH 4/4] add-patch: render hunks through the pager Rubén Justo
2024-07-25 15:24           ` [PATCH v2 0/2] add-p P fixups Junio C Hamano
2024-07-25 16:41             ` Re* " Rubén Justo
2024-07-25 16:43               ` [PATCH 1/2] pager: introduce wait_for_pager Rubén Justo
2024-07-25 16:43               ` [PATCH 2/2] add-patch: render hunks through the pager Rubén Justo
2024-07-26 18:36                 ` Junio C Hamano
2024-07-27  1:40                   ` Junio C Hamano
2024-07-27 14:33                     ` Rubén Justo
2024-07-26 18:24               ` Re* [PATCH v2 0/2] add-p P fixups Junio C Hamano
2024-07-26 19:22                 ` Rubén Justo
2024-07-26 19:48                   ` Junio C Hamano
2024-07-26 20:16                     ` Rubén Justo
2024-07-28  9:11                       ` Rubén Justo
2024-07-29 18:45                         ` Junio C Hamano

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=2333cb14-f020-451c-ad14-3f30edd152ec@gmail.com \
    --to=rjusto@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).