Hi,
if I understood correctly, git programs will be installed somewhere in $PATH for at least next two months.
But I would like to update to what will be the future, i.e. prepending what 'git --exec-path' says to any git command.
I don't call git programs directly but I use a function QGit::run(cmd) that does this plus other things.
The problem is that I call QGit::run() also for other commands not related to git (ls, cat, etc..).
How can I make the transition?
Now I have two ways, the brute force way and the easy (peraphs tricky) way.
The brute force is to create a new function QGit::runGitCmd() that deals only with git commands _and_ replace all the occurences of run() with the latter.
The easy way is to prepend the exec-path *inside* run(), and to use to disambiguate bewteen git and shell commands the testing of first three chars of the command to launch, something like:
if (cmd.left(3) == "git")
cmd = cmd.prepend(exec-path);I would like to go with the second one, I'm a bit lazy ;-) , but I would like to ask if this is a good policy, i.e. if also inside git programs/scripts (like in git.c I guess) is used or is foreseen to keep using something like this.
Thanks Marco
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com