I think this is a valuable contribution. That's why I comment...
Please put a useful commit message (less like an email, more like
something you want to read in git-log) at the beginning of the email, then
a line containing _just_ "---", and after that some comments that are not
meant to be stored in the history, like (I know this does not belong
to...)
After that, there should be a diffstat, and then the patch.
The easiest to have this layout is to do a proper commit in git, use "git
format-patch" to produce the patch, and then insert what you want to say
in addition to the commit message between the "---" marker and the
diffstat.
I strongly disagree (as you yourself, probably) with the notion that this
does not belong into git-shell.
This is definitely wrong. Use git_exec_path() instead.
Maybe rename this to cvsserver_args?
Please lose the spaces after the opening and before the closing brackets.
And put spaces around the "=" sign.
It is really distracting to read different styles of code in the same
project, and that's why we're pretty anal about coding styles. Just have
a look (in the same file) how we write things, and imitate it as closely
as possible.
You have redundant "putenv(newpath);" in both clauses. AFAICT putenv() is
deprecated, too, and we use setenv() elsewhere.
In addition, I strongly suggest using strbuf:
struct strbuf newpath = STRBUF_INIT;
strbuf_addstr(&newpath, git_exec_path());
if ((oldpath = getenv("PATH"))) {
strbuf_addch(&newpath, ':');
strbuf_addstr(&newpath, oldpath);
}
setenv("PATH", strbuf_detach(&newpath, NULL), 1);
... and then you call execv_git_cmd(), which already does all the details
of setting up the exec dir correctly AFAIR.
And this is ugly. If you want to support "cvs server", then just check
for that string, and if it matches, return execl_git_cmd("cvsserver");
Otherwise proceed as in the original code.
Ciao,
Dscho
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html