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

Re: [PATCH] Remove gitenv macro hack

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:57

Please do not do this.

I believe we have that in quite a few places.  IIRC, it is one
of the Linus-approved GCC extensions and also used extensively
in the kernel source.

./cache.h:39:#define gitenv(e) (getenv(e) ? : gitenv_bc(e))
./commit-tree.c:149:	commitgecos = gitenv("GIT_COMMITTER_NAME") ? : realgecos;
./commit-tree.c:150:	commitemail = gitenv("GIT_COMMITTER_EMAIL") ? : realemail;
./commit-tree.c:151:	gecos = gitenv("GIT_AUTHOR_NAME") ? : realgecos;
./commit-tree.c:152:	email = gitenv("GIT_AUTHOR_EMAIL") ? : realemail;
./fsck-cache.c:359:	char *git_dir = gitenv(GIT_DIR_ENVIRONMENT) ? : DEFAULT_GIT_DIR_ENVIRONMENT;
./diff.c:35:	diff_opts = gitenv("GIT_DIFF_OPTS") ? : diff_opts;
./diff.c:358:		prepare_temp_file(other ? : name, &temp[1], two);
./diff.c:398:			builtin_diff(name, other ? : name, temp);
./diff.c:717:	diff_rename_minimum_score = minimum_score_ ? : MINIMUM_SCORE;
./sha1_file.c:203:	const char *alt = gitenv(ALTERNATE_DB_ENVIRONMENT) ? : "";
./sha1_file.c:215:			cp = strchr(last, ':') ? : last + strlen(last);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help