{"thread":{"id":"22888","subject":"[PATCH] wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR","startedAt":"2010-03-03T01:11:10Z","lastAt":"2010-03-03T01:11:10Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"136051","messageId":"7vaauqmcpd.fsf@alter.siamese.dyndns.org","threadId":"22888","inReplyTo":null,"subject":"[PATCH] wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-03T01:11:10Z","receivedAt":"2010-03-03T01:11:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"With bash on some platforms (e.g. FreeBSD 8.0), exporting an unset\nvariable does not \"unexport\" it.  The called process gets an empty\nstring from getenv(3) instead of NULL.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n wrap-for-bin.sh |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/wrap-for-bin.sh b/wrap-for-bin.sh\nindex aece782..09feb1f 100644\n--- a/wrap-for-bin.sh\n+++ b/wrap-for-bin.sh\n@@ -7,10 +7,15 @@\n # @@BUILD_DIR@@ and @@PROG@@.\n \n GIT_EXEC_PATH='@@BUILD_DIR@@'\n-test -z \"$NO_SET_GIT_TEMPLATE_DIR\" &&\n+if test -n \"$NO_SET_GIT_TEMPLATE_DIR\"\n+then\n+\tunset GIT_TEMPLATE_DIR\n+else\n \tGIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'\n+\texport GIT_TEMPLATE_DIR\n+fi\n GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'\n PATH='@@BUILD_DIR@@/bin-wrappers:'\"$PATH\"\n-export GIT_EXEC_PATH GIT_TEMPLATE_DIR GITPERLLIB PATH\n+export GIT_EXEC_PATH GITPERLLIB PATH\n \n exec \"${GIT_EXEC_PATH}/@@PROG@@\" \"$@\"\n-- \n1.7.0.1.288.gffe3c\n"}]}