Re: Commit f5bbc322 to git broke pre-commit hooks which read stdin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> "Shawn O. Pearce" <spearce@xxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux