Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: "git stash" is not known to git

From: Jeff King <hidden>
Date: 2016-06-15 22:43:25

On Mon, Jul 30, 2007 at 11:44:31AM +0200, Matthieu Moy wrote:
quoted
One has to use git-stash rather than "git stash".  Oversight?
This looks like an incorrect installation, with git-stash in your
$PATH, but not in the place git looks for its commands (I don't
remember the exact mechanism).
On a related note, is it just me, or is the following comment and related code
in git.c (introduced by Linus in 231af832) totally bogus:

  /*
   * We search for git commands in the following order:
   *  - git_exec_path()
   *  - the path of the "git" command if we could find it
   *    in $0
   *  - the regular PATH.
   */

We never actually look in the regular PATH since we call execv_git_cmd
(although we do still munge the PATH, apparently so shell scripts can
use git-foo syntax; see 77cb17e9). This means you can't drop "git-foo"
into your PATH and have it work as "git foo".

What is the desired behavior?

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