git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] Override isatty with GIT_FORCE_TTY

From
AMAvishay Matayev <me@avishay.dev>
Date
Jul 6, 2021, 21:03 UTC
Message-ID
<20210706210317.706313-1-me@avishay.dev>

This is the resulting patch series from the discussion in the mailing list[1] and the Fugitive github issue[2].

The goal is to allow to override git decisiveness about not doing something when some fd is not a pty, which can hinder Fugitive.

I didn't annotate the location of the commits as I wasn't sure what was the correct one.. As it is not specific to a single mechanisms, but rather it is something global, is it fine as it is or should I use something as `global, `tree:` or `tree-wide:`?

I also didn't document this feature, or at least I wasn't sure where to document it (other than on these commits), I would compare it to the GIT_SMART_HTTP as it is something pretty niche and it isn't (and IMO shouldn't be) documented to the regular user.

Thank you, Avishay

1. https://lore.kernel.org/git/CAJ-0OswsrnAuCwU6U=S2i1qKkg=66U-8RHSGqD2kh9T_30Yw9w@mail.gmail.com/
2. https://github.com/tpope/vim-fugitive/issues/1772
Avishay Matayev (3):
  Change isatty's parameter to a *_FILENO define
  Allow isatty to be overriden with GIT_FORCE_TTY
  Add tests for GIT_FORCE_TTY
 builtin/am.c               |  2 +-
 builtin/bisect--helper.c   |  4 ++--
 builtin/blame.c            |  2 +-
 builtin/bundle.c           |  2 +-
 builtin/checkout.c         |  2 +-
 builtin/commit-graph.c     |  4 ++--
 builtin/commit.c           |  2 +-
 builtin/fsck.c             |  2 +-
 builtin/gc.c               |  2 +-
 builtin/log.c              |  2 +-
 builtin/merge.c            |  4 ++--
 builtin/multi-pack-index.c |  2 +-
 builtin/pack-objects.c     |  2 +-
 builtin/pack-redundant.c   |  2 +-
 builtin/prune-packed.c     |  2 +-
 builtin/prune.c            |  2 +-
 builtin/rebase.c           |  2 +-
 builtin/repack.c           |  2 +-
 builtin/send-pack.c        |  2 +-
 builtin/shortlog.c         |  4 ++--
 builtin/sparse-checkout.c  |  2 +-
 builtin/unpack-objects.c   |  2 +-
 cache.h                    |  3 +++
 color.c                    |  2 +-
 column.c                   |  2 +-
 compat/mingw.c             |  6 +++---
 compat/mingw.h             |  2 +-
 compat/winansi.c           | 16 ++++++++--------
 config.c                   |  5 +++++
 date.c                     |  2 +-
 editor.c                   |  2 +-
 pager.c                    |  4 ++--
 preload-index.c            |  2 +-
 read-cache.c               |  2 +-
 remote-curl.c              |  2 +-
 sequencer.c                |  4 ++--
 sideband.c                 |  2 +-
 t/t9904-git-force-tty.sh   | 38 ++++++++++++++++++++++++++++++++++++++
 transport.c                |  6 +++---
 transport.h                |  2 +-
 wt-status.c                |  2 +-
 41 files changed, 101 insertions(+), 55 deletions(-)
 create mode 100755 t/t9904-git-force-tty.sh
-- 
2.25.1
Next: Avishay Matayev
Message 1 of 13 in “Override isatty with GIT_FORCE_TTY”
  1. 0/3 Override isatty with GIT_FORCE_TTYAvishay Matayev, Jul 6, 2021
  2. 1/3 Change isatty's parameter to a *_FILENO defineAvishay Matayev, Jul 6, 2021
  3. Junio C HamanoJul 6, 2021
  4. Avishay MatayevJul 9, 2021
  5. 2/3 Allow isatty to be overriden with GIT_FORCE_TTYAvishay Matayev, Jul 6, 2021
  6. Junio C HamanoJul 6, 2021
  7. Avishay MatayevJul 9, 2021
  8. Junio C HamanoJul 9, 2021
  9. Avishay MatayevJul 9, 2021
  10. Junio C HamanoJul 9, 2021
  11. Avishay MatayevJul 9, 2021
  12. 3/3 Add tests for GIT_FORCE_TTYAvishay Matayev, Jul 6, 2021
  13. Avishay MatayevJul 30, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.