All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "David Bremner" <bremner@unb.ca>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Kristian Høgsberg" <krh@redhat.com>,
	git@vger.kernel.org
Subject: Re: Commit f5bbc322 to git broke pre-commit hooks which read stdin
Date: Wed, 5 Mar 2008 00:46:46 -0500	[thread overview]
Message-ID: <20080305054646.GB8410@spearce.org> (raw)
In-Reply-To: <7vtzjl3f6d.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> 
> > What happens to such hooks under git-gui?
> >
> > git-gui invokes the pre-commit hook with stdin coming off the stdin
> > that the wish process inherited when it was spawned.  This may not
> > be the best way to interact with the end-user of that repository.
> 
> Well, if git-gui is designed to interoperate with CLI git (and I think
> that is a sensible thing to aim for), we probably should revisit the list
> of hooks in hooks.txt and make sure we define the environment these hooks
> are invoked in precisely enough (this incidentally will help C rewrite
> effort to avoid regressing).

Yup.  That I think is key, because then hook authors know what they
can assume, and what they cannot.

> Then, hooks that take input from and give
> output to the user could be launched with I/O redirected to talk with wish
> (which I presume has a terminal lookalike widget you can embed in your
> application).

Nope.  In fact the one that I already have right now is not dealing
with the \r in the progress meters from git correctly.  Someone needs
to revisit that code.  Something's not right with it.

Oh, and the one that git-gui does have only handles output.  It does
not permit input.  Nor does it actually honor weird stty modes like
say noecho.  Its most decidely *not* a tty.

-- 
Shawn.

  reply	other threads:[~2008-03-05  5:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04  8:38 Bug#469250: Commit f5bbc322 to git broke pre-commit hooks which read stdin David Bremner
2008-03-04 10:45 ` Johannes Schindelin
2008-03-04 11:12   ` Junio C Hamano
2008-03-04 11:48     ` Johannes Sixt
2008-03-04 12:17       ` Junio C Hamano
2008-03-04 11:48     ` David Bremner
2008-03-04 12:04       ` Johannes Schindelin
2008-03-04 18:16         ` Joey Hess
2008-03-04 22:15         ` David Bremner
2008-03-05  5:12           ` Shawn O. Pearce
2008-03-05  5:36             ` Junio C Hamano
2008-03-05  5:46               ` Shawn O. Pearce [this message]
2008-03-04 11:51   ` Jakub Narebski
2008-03-04 12:03     ` Johannes Schindelin

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=20080305054646.GB8410@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bremner@unb.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=krh@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.