From: Junio C Hamano Date: Wed, 05 Mar 2008 05:36:42 GMT Subject: Re: Commit f5bbc322 to git broke pre-commit hooks which read stdin Message-ID: <7vtzjl3f6d.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080305051212.GZ8410@spearce.org> "Shawn O. Pearce" 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). 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).