Thread (1 message) 1 message, 1 author, 2016-06-15

Re: git --exec-path conversion

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:12

Marco Costalba [off-list ref] writes:
if I understood correctly, git programs will be installed
somewhere in $PATH for at least next two months.
I suspect things will stay in /usr/bin longer than that, but
futureproofing is good in any case.

Assuming you are writing things in C or C++:

 - run "git --exec-path" at the very beginning of main(),
 - read the output, prepend it to $PATH using setenv(3).

and I think you are done.  After this, your QGit::run("ls") and
QGit::run("git frotz") would not be affected (you still have
/usr/bin in your $PATH), and QGIT::run("git-frotz") would find
git-frotz installed somewhere outside /usr/bin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help