Pergunta

When installing git-flow I realized it is just putting files in /usr/local/bin mainly git-flow which is the executable, I'm able to invoke the script git-flow by running git flow (without dash in between). I then realized it is the same with git-svn as well where the commands are run with git svn.

Am I overlooking something basic or does git itself actually delegate the commands somehow?

Foi útil?

Solução

The git binary remembers the directory where dashed executables like git-svn are installed. It is set during git installation, or to be more exact during build phase (that is why you need to use the same options compiling and installing).

You can find this directory with git --exec-path

$ git --exec-path
/usr/libexec/git-core

(the above is for system installation on Linux).


The git svn command (not a built in) invokes git wrapper, which finds git-svn binary, and executes it.

Note: some of dashed executables, corresponding to built-in commands, like git-tag, are hardlinked to git executable. Calling those just invokes appropriate (sub)command.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top