From: "Matthew Bystrin" <dev.mbstr@gmail.com>
To: "Martin Ågren" <martin.agren@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org,
"Lessley Dennington" <lessleydennington@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Elijah Newren" <newren@gmail.com>,
"Phillip Wood" <phillip.wood123@gmail.com>,
"idriss fekir" <mcsm224@gmail.com>,
"Joey Salazar" <jgsal@protonmail.com>
Subject: Re: [PATCH] git: fix paginate handling for commands with DELAY_PAGER_CONFIG
Date: Thu, 28 Nov 2024 22:27:16 +0000 [thread overview]
Message-ID: <D5Y5Z3NCOYPB.1VT7HMAHZTOVE@gmail.com> (raw)
In-Reply-To: <CAN0heSqb+dzGAVnN6=_AkKa-qh4GYo7ku90No=uXBg2+wobL1Q@mail.gmail.com>
Martin Ågren wrote:
> If `git add -p` is a long-running process that wants to repeatedly
> launch a pager, what could the opposite look like? A long-running
> process that wants to repeatedly launch an editor? While paging?
>
> Maybe `git rebase -i` could be one such example. TBH, running its output
> through a pager might not look super-pretty today due to it producing
> temporary output that it then erases, but at least it works. The editor
> might be graphical (or a script?) that won't actually suffer from the
> pager running. Killing the pager might be unwanted. So I don't know.
Agree, killing might be unwanted. Another approach proposed below.
> What is the original problem here? Is some kind of tooling issuing a
> `git -p tag -a` where it's not possible to teach it to drop the `-p`?
I faced such 'wrong' behaviour by typing commands manually.
It feels like one flag should not break execution of interactive commands like
`git -p add -p`, `git -p rebase -i`, `git -p config -e` etc. I took into account
Junio's comments, so please let me describe situation in more correct way. The
following is related with workflow in terminal.
Currently when some interactive command is called with `--paginate` I see
interfered output and cannot proceed to desirable actions. A good analogy is to
call `vim | less`.
What I want to see is if we are calling interactive command with
`--paginate` (1) it would rather fail explicitly with an error message, or (2)
it would close+reopen/bypass pager when some interaction is needed. Bypassing
pager is a complicated thing, I'm not sure it can be done (because of how they
claim stdin)
Of course we can just simply do not use `-p` flag with interactive commands and
provide some info in documentation.
Thanks!
next prev parent reply other threads:[~2024-11-28 22:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 10:17 [PATCH] git: fix paginate handling for commands with DELAY_PAGER_CONFIG Matthew Bystrin
2024-11-21 21:50 ` Martin Ågren
2024-11-22 17:21 ` Junio C Hamano
2024-11-22 18:13 ` Matthew Bystrin
2024-11-25 2:21 ` Junio C Hamano
2024-11-25 10:55 ` Martin Ågren
2024-11-28 22:27 ` Matthew Bystrin [this message]
2024-11-22 18:50 ` Kristoffer Haugsbakk
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=D5Y5Z3NCOYPB.1VT7HMAHZTOVE@gmail.com \
--to=dev.mbstr@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jgsal@protonmail.com \
--cc=lessleydennington@gmail.com \
--cc=martin.agren@gmail.com \
--cc=mcsm224@gmail.com \
--cc=newren@gmail.com \
--cc=phillip.wood123@gmail.com \
/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).