{"thread":{"id":"27296","subject":"git alias fails if non-accessible directory is in PATH","startedAt":"2011-05-08T09:53:24Z","lastAt":"2011-05-08T16:50:13Z","messageCount":3,"participants":["Sebastian Schuberth","Michael Schubert","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"167356","messageId":"iq5p6k$73f$1@dough.gmane.org","threadId":"27296","inReplyTo":null,"subject":"git alias fails if non-accessible directory is in PATH","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-05-08T09:53:24Z","receivedAt":"2011-05-08T09:53:24Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"Hi,\n\nI just came across the issue at [1] in my Gentoo installation. By default, it is\n\ndrwxr-x--- 2 root games 4096 Mar 12 02:22 /usr/games/bin\n\nMoreover, by default users are not in the \"games\" group and /usr/games/bin is in PATH. For some reason, this makes git fail to run any alias like this\n\n# git config alias.br branch\n$ git br\nfatal: cannot exec 'git-br': Permission denied\n\nIs this by design, or a bug? I currently do not see a reason for git stop executing an alias just because it cannot access a directory in PATH. Strangely, I also haven't found any discussion about this on the mailing list yet.\n\nThe problem is also described at [2] for Mac OS. Reading those posts, this seems to be a regression when coming from 1.6.3 to 1.7.0.\n\n[1] http://www.fractionsofapenny.com/from-the-trenches/gentoo-troubles-with-git-alias\n[2] http://stackoverflow.com/questions/4019501/git-alias-problem\n\n-- \nSebastian Schuberth\n"},{"id":"167428","messageId":"4DC6C19D.4060704@elegosoft.com","threadId":"27296","inReplyTo":"iq5p6k$73f$1@dough.gmane.org","subject":"Re: git alias fails if non-accessible directory is in PATH","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2011-05-08T16:15:25Z","receivedAt":"2011-05-08T16:15:25Z","isPatch":false,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"\n> Is this by design, or a bug? I currently do not see a reason for git stop executing an alias just because it cannot access a directory in PATH. Strangely, I also haven't found any discussion about this on the mailing list yet.\n\nIf you look at start_command(), `git br` ends up as execvp call\nreturning EACCESS in the given case whereas only ENOENT was \"expected\".\nThis happens before git tries to resolve the alias.\n\nCould it be a legit assumption that PATH holds only accessible paths?\n(POSIX?) Otherwise it's a bug.\n"},{"id":"167429","messageId":"7v7ha1uofu.fsf@alter.siamese.dyndns.org","threadId":"27296","inReplyTo":"iq5p6k$73f$1@dough.gmane.org","subject":"Re: git alias fails if non-accessible directory is in PATH","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-08T16:50:13Z","receivedAt":"2011-05-08T16:50:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> # git config alias.br branch\n> $ git br\n> fatal: cannot exec 'git-br': Permission denied\n>\n> Is this by design, or a bug?\n\nThe \"tangent\" part of\n\n    http://thread.gmane.org/gmane.comp.version-control.git/171755\n\nand then the discussion that begins at\n\n    http://thread.gmane.org/gmane.comp.version-control.git/171755/focus=171767\n\nmay explain the current list concensus.\n"}]}