Re: preparing for 2.34.1
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2021, 22:42 UTC
- Message-ID
- <xmqqmtlvbynr.fsf@gitster.g>
- In-Reply-To
- <nycvar.QRO.7.76.6.2111222319100.63@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> The quickest workaround for this is probably to special-case the editor > `echo`:
"GIT_EDITOR=: git cmd" would also be a common trick people would use to bypass editor and take whatever is given as an initial template.
Show 6 quoted lines
> However, I could imagine that other scenarios call for an editor that > _also_ does not run in the terminal, and where also no real terminal is > available for saving and restoring. > > I was tempted to suggest an `isatty(2)`, but that probably comes with its > own problems, too.
I think isatty(2) is pretty much our synonym to "are we talking to an end-user sitting in front of the terminal". Mostly we use it as a way to control the progress bars, and use of editor on terminal would be in line with these existing uses.