From: Junio C Hamano Date: Thu, 19 May 2005 23:41:43 GMT Subject: Re: [PATCH] Remove gitenv macro hack Message-ID: <7vd5rmyea0.fsf@assigned-by-dhcp.cox.net> In-Reply-To: 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);