Re: Git GUI vs interactive post-commit hooks

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alexander Gladysh <agladysh@...>
Cc: Shawn O. Pearce <spearce@...>, <git@...>
Date: Monday, May 19, 2008 - 9:19 am

On 2008.05.19 14:48:14 +0400, Alexander Gladysh wrote:

Isn't that what "git push --all" does? And that will only ask for a
password once, not for every branch.


For a graphical tool, you might want to use something like
gtk-led-askpass, which shows a window with a password prompt. SSH will
make use of it if SSH_ASKPASS contains its path _and_ ssh is not started
from a terminal. Unfortunately, the latter is probably not true for git
gui most of the time.

One way hack around this is to do "setsid git push ..." in your
post-commit hook. But that will break if you have no X or no tool for
SSH_ASKPASS.

Another really hackish work-around is to
replace:
 exec 'wish' "$argv0" -- "$@"
with
 exec 'setsid' 'wish' "$argv0" -- "$@"

in git-gui. Git gui will then get its own session, detached from the
terminal and ssh will start using SSH_ASKPASS. That at least won't break
when you're not running X (simply because you won't be running git gui
then ;-)), but doesn't feel smart either.

Maybe someone else can come up with a sane solution that makes git gui
more SSH_ASKPASS-friendly.

Björn
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Git GUI vs interactive post-commit hooks, Alexander Gladysh, (Mon May 19, 6:48 am)
Re: Git GUI vs interactive post-commit hooks, Björn, (Mon May 19, 9:19 am)
Re: Git GUI vs interactive post-commit hooks, Alex Riesen, (Tue May 20, 6:31 pm)
Re: Git GUI vs interactive post-commit hooks, Björn, (Tue May 20, 7:02 pm)
Re: Git GUI vs interactive post-commit hooks, Alex Riesen, (Thu May 22, 8:53 am)
Re: Git GUI vs interactive post-commit hooks, Björn, (Thu May 22, 11:12 am)
Re: Git GUI vs interactive post-commit hooks, Jeff King, (Tue May 20, 7:16 pm)
Re: Git GUI vs interactive post-commit hooks, Alexander Gladysh, (Mon May 19, 9:42 am)
Re: Git GUI vs interactive post-commit hooks, Björn, (Mon May 19, 10:11 am)