Skip to content

Override isatty with GIT_FORCE_TTY

Avishay Matayev git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Change isatty's parameter to a *_FILENO definebuiltin/am.c builtin/bisect--helper.c builtin/blame.c +29 more+39 -392 replies
2/3Allow isatty to be overriden with GIT_FORCE_TTYbuiltin/am.c builtin/bisect--helper.c builtin/blame.c +37 more+63 -556 replies
3/3Add tests for GIT_FORCE_TTYt/t9904-git-force-tty.sh+38 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Override isatty with GIT_FORCE_TTY

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
Signature · 1 line
2.25.1