Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: [PATCH] post-update.sample referenced obsolete binary "git-update-server-info"

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:47:04

Peter Simons venit, vidit, dixit 20.07.2009 16:46:
Hi Michael,

 >> -exec git-update-server-info
 >> +exec git update-server-info
 >>
 >
 > t/t5540-http-push.sh should fail if this really needed a fix (libexec
 > is in $PATH for hooks).

you are right, the call to git-update-server-info does succeed, so there
is no need to make that change.

Personally, I find it unfortunate, though, that those scripts rely on
commands that won't exist when a normal user runs them.

Just my 2 cents,
Peter
Anyone can run them, just not from the default $PATH.

In fact, calling the dashed versions from the hooks is both safer and
(marginally) more efficient: Many people have several versions of git
lying around, and we've had more than one "bug" report where people
messed up because of mixing git bits from several versions. Calling the
dashed form above relies on the environment as set up by the caller, not
the user (who may have several "git" in $PATH, but not
"git-update-server-info"). Also, the command is called directly rather
than indirectly with "git" having to look for it.

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help