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

Re: [PATCH 5/9 v2] Allow the built-in exec path to be relative to the command invocation path

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:45:02

Possibly related (same subject, not in this thread)

Zitat von Junio C Hamano [off-list ref]:
However, I have to wonder if it is the right thing to do, like your patch
does, for "git --exec-path" to return "../libexec/git-core/" in a relative
form, without saying what it is relative to.  Shouldn't we be showing the
full path after resolving that relative path to git executable?
Does it? "git --exec-path" calls git_exec_path(), and that now returns
system_path(GIT_EXEC_PATH), and that is an absolute path, although it's
not normalized.

Oh, I see: You tested it on Linux, right? This patch series does not work
correctly on Linux (Unix? bash?), as Dscho has pointed out, since argv[0]
does not have a directory part if "git" is in $PATH. In this case, system_path()
just returns its argument, which is the relative path. :-/

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