From: Todd Zullinger <tmz@pobox.com>
To: git@vger.kernel.org
Subject: Git fails to detect subcommand when hook is symlinked to a builtin
Date: Fri, 18 Mar 2011 11:14:15 -0400 [thread overview]
Message-ID: <20110318151415.GC26236@inocybe.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
I'm not sure if this is a bug or more of a "don't do that" sort of
thing. At fedorahosted.org, the git repositories are mounted on a
filesystem with noexec. As such, we have all hooks symlinked
elsewhere. For the post-update hook we used to link directly to
git-update-server-info.
This worked until we upgraded the system to git-1.7.4.1 recently. A
trace may help illustrate:
With hooks/post-update as a symlink to
/usr/bin/git-update-server-info:
trace: run_command: 'hooks/post-update' 'refs/heads/master'
trace: run_command: 'gc' '--auto' '--quiet'
remote: trace: exec: 'git-refs/heads/master'
remote: trace: run_command: 'git-refs/heads/master'
remote: git: 'refs/heads/master' is not a git command. See 'git --help'.
With hooks/post-update as a symlink to
/usr/share/git-core/templates/hooks/post-update.sample:
trace: run_command: 'hooks/post-update' 'refs/heads/master'
remote: setup: git_dir: .
remote: setup: worktree: (null)
remote: setup: cwd: /home/fedora/tmz/tmp/iwhd.git
remote: setup: prefix: (null)
remote: trace: built-in: git 'update-server-info'
Is there any reasonable way to handle this case? Perhaps if the
symlink were dereferenced (if no subcommand were found) and then
re-checked for a subcommand? I admit that I did not delve too deeply
into the code, but from the little I did I wasn't sure that any
changes here wouldn't lead to worse troubles.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Everyone needs to believe in something. I believe I'll have another
beer.
[-- Attachment #2: Type: application/pgp-signature, Size: 542 bytes --]
next reply other threads:[~2011-03-18 15:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 15:14 Todd Zullinger [this message]
2011-03-19 0:53 ` Git fails to detect subcommand when hook is symlinked to a builtin Junio C Hamano
2011-03-19 1:14 ` Todd Zullinger
2011-03-19 19:40 ` Junio C Hamano
2011-03-20 8:20 ` Jonathan Nieder
2011-03-20 9:09 ` Jonathan Nieder
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=20110318151415.GC26236@inocybe.localdomain \
--to=tmz@pobox.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).