From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: James Pickens <jepicken@gmail.com>, Git ML <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] git: continue alias lookup on EACCES errors
Date: Wed, 28 Mar 2012 13:48:42 -0400 [thread overview]
Message-ID: <20120328174841.GA27876@sigill.intra.peff.net> (raw)
In-Reply-To: <7vaa30wrjx.fsf@alter.siamese.dyndns.org>
On Wed, Mar 28, 2012 at 10:42:26AM -0700, Junio C Hamano wrote:
> > Yes, though I held back on writing tests, because I don't think we've
> > quite decided what the behavior _should_ be. Should we be
> > differentiating "chmod -x /bin/ls" from "chmod -x /bin"? Should we be
> > continuing alias lookup on EACCES? Should we print edit-distance
> > suggestions on EACCES?
>
> I am leaning to think that it would be the least surprising if we treat as
> if /bin/ls does not even exist if /bin is not searchable. If /bin/ls is
> unreadable or unexecutable but /bin is searchable, then we _know_ it
> exists, and we follow the usual exec*p() rule to ignore it so "git ls"
> would try to find an alias and when all else fails will give the edit
> distance suggestions but should exclude /bin/ls from candidates. If /bin
> itself is unsearchable, we do not even know what it contains, so it is
> needless to say that /bin/ls will not be part of suggestion candidates.
That sounds sensible to me. I think it involves writing our own
execvp, though, right? If we use stock execvp, we can't tell the
difference between the two cases. OTOH, I think we already have an
implementation in compat/mingw.
> That way, the only thing people _could_ complain about is "I have a
> directory $HOME/sillybin in my $PATH but do not have an executable bit on
> it. When I try to run 'git stupid', 'git-stupid' in that diretory is not
> executed, and I do not even get an error message to point out that I am
> missing the executable bit on $HOME/sillybin directory". And you can say
> "Ah, just like the shell. So make sure you have necessary permission bits
> on things". Very easy and straightforward to explain and understand.
Agreed.
-Peff
next prev parent reply other threads:[~2012-03-28 17:48 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 23:48 Bug? Bad permissions in $PATH breaks Git aliases James Pickens
2012-03-27 3:19 ` Jeff King
2012-03-27 7:25 ` James Pickens
2012-03-27 15:11 ` Junio C Hamano
2012-03-27 17:59 ` Jeff King
2012-03-27 18:04 ` [PATCH 1/2] run-command: propagate EACCES errors to parent Jeff King
2012-03-27 18:24 ` Junio C Hamano
2012-03-27 18:33 ` Jeff King
2012-03-27 18:05 ` [PATCH 2/2] git: continue alias lookup on EACCES errors Jeff King
2012-03-27 19:16 ` Junio C Hamano
2012-03-28 4:30 ` Jeff King
2012-03-28 17:42 ` Junio C Hamano
2012-03-28 17:48 ` Jeff King [this message]
2012-03-28 18:04 ` Jonathan Nieder
2012-03-28 18:31 ` Junio C Hamano
2012-03-28 18:40 ` Jonathan Nieder
2012-03-28 19:39 ` Jeff King
2012-03-28 19:45 ` Jonathan Nieder
2012-03-28 20:18 ` Jeff King
2012-03-28 20:37 ` Jeff King
2012-03-28 20:51 ` Jonathan Nieder
2012-03-28 20:52 ` Jeff King
2012-03-28 20:42 ` Jonathan Nieder
2012-03-28 20:51 ` Jeff King
2012-03-28 21:01 ` Jonathan Nieder
2012-03-28 21:25 ` Jeff King
2012-03-28 21:30 ` Frans Klaver
2012-03-28 20:43 ` Junio C Hamano
2012-03-28 21:04 ` Jeff King
2012-03-28 21:44 ` Junio C Hamano
2012-03-28 21:57 ` Jeff King
2012-03-28 22:07 ` Jeff King
2012-03-28 22:18 ` Junio C Hamano
2012-03-29 11:31 ` Frans Klaver
2012-03-29 17:20 ` Jeff King
2012-03-29 17:23 ` Frans Klaver
2012-03-28 19:38 ` Jeff King
2012-03-28 18:29 ` Junio C Hamano
2012-03-28 19:40 ` Jeff King
2012-03-29 11:16 ` Frans Klaver
2012-03-29 17:15 ` Jeff King
2012-03-29 17:21 ` Frans Klaver
2012-03-27 6:14 ` Bug? Bad permissions in $PATH breaks Git aliases Johannes Sixt
2012-03-27 7:37 ` James Pickens
2012-03-27 15:14 ` Junio C Hamano
2012-03-27 17:48 ` James Pickens
2012-03-27 18:03 ` Junio C Hamano
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=20120328174841.GA27876@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jepicken@gmail.com \
/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).