{"thread":{"id":"29552","subject":"[PATCH] Explicitly set X to avoid potential build breakage","startedAt":"2012-02-05T10:41:11Z","lastAt":"2012-02-05T22:14:27Z","messageCount":2,"participants":["Michael","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"183894","messageId":"9854382.GTBzd7D6AT@telegraph","threadId":"29552","inReplyTo":null,"subject":"[PATCH] Explicitly set X to avoid potential build breakage","fromName":"Michael","fromEmail":"kensington@astralcloak.net","sentAt":"2012-02-05T10:41:11Z","receivedAt":"2012-02-05T10:41:11Z","isPatch":true,"sender":{"key":"kensington@astralcloak.net","avatar":null},"body":"$X is appended to binary names for Windows builds (ie. git.exe).\nPollution from the environment can inadvertently trigger this behaviour,\nresulting in 'git' turning into 'gitwhatever' without warning.\n\nSigned-off-by: Michael <kensington@astralcloak.net>\n---\n Makefile |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex c457c34..380d96f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -388,6 +388,9 @@ SCRIPT_SH =\n SCRIPT_LIB =\n TEST_PROGRAMS_NEED_X =\n \n+# Binary suffix used for Windows builds\n+X =\n+\n # Having this variable in your environment would break pipelines because\n # you cause \"cd\" to echo its destination to stdout.  It can also take\n # scripts to unexpected places.  If you like CDPATH, define it for your\n-- \n1.7.8.4\n"},{"id":"183931","messageId":"7v39apexmk.fsf@alter.siamese.dyndns.org","threadId":"29552","inReplyTo":"9854382.GTBzd7D6AT@telegraph","subject":"Re: [PATCH] Explicitly set X to avoid potential build breakage","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-05T22:14:27Z","receivedAt":"2012-02-05T22:14:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael <kensington@astralcloak.net> writes:\n\n> $X is appended to binary names for Windows builds (ie. git.exe).\n> Pollution from the environment can inadvertently trigger this behaviour,\n> resulting in 'git' turning into 'gitwhatever' without warning.\n>\n> Signed-off-by: Michael <kensington@astralcloak.net>\n\nUnless there is a compelling reason not to, could we have your name here,\nnot just half a name, please?  \n\nIt is not particularly a good reason to say \"I go by 'Michael' among my\nfriends\". The output from \"git shortlog -s --author=Michael\" shows more\nthan 20 Michaels already, and it would be nice for us if we can easily\ndifferenciate you among this group of people you are now joining with this\npatch.\n\n> ---\n>  Makefile |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n>\n> diff --git a/Makefile b/Makefile\n> index c457c34..380d96f 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -388,6 +388,9 @@ SCRIPT_SH =\n>  SCRIPT_LIB =\n>  TEST_PROGRAMS_NEED_X =\n>  \n> +# Binary suffix used for Windows builds\n> +X =\n> +\n\nThe patch looks good to me, although it might make sense to move it down\nbefore this line\n\n\tPROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))\n\nwhere it matters most as the documentation of what $X is being used for.\n"}]}