git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Explicitly set X to avoid potential build breakage
@ 2012-02-05 10:41 Michael
  2012-02-05 22:14 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Michael @ 2012-02-05 10:41 UTC (permalink / raw)
  To: git

$X is appended to binary names for Windows builds (ie. git.exe).
Pollution from the environment can inadvertently trigger this behaviour,
resulting in 'git' turning into 'gitwhatever' without warning.

Signed-off-by: Michael <kensington@astralcloak.net>
---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index c457c34..380d96f 100644
--- a/Makefile
+++ b/Makefile
@@ -388,6 +388,9 @@ SCRIPT_SH =
 SCRIPT_LIB =
 TEST_PROGRAMS_NEED_X =
 
+# Binary suffix used for Windows builds
+X =
+
 # Having this variable in your environment would break pipelines because
 # you cause "cd" to echo its destination to stdout.  It can also take
 # scripts to unexpected places.  If you like CDPATH, define it for your
-- 
1.7.8.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Explicitly set X to avoid potential build breakage
  2012-02-05 10:41 [PATCH] Explicitly set X to avoid potential build breakage Michael
@ 2012-02-05 22:14 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-02-05 22:14 UTC (permalink / raw)
  To: Michael; +Cc: git

Michael <kensington@astralcloak.net> writes:

> $X is appended to binary names for Windows builds (ie. git.exe).
> Pollution from the environment can inadvertently trigger this behaviour,
> resulting in 'git' turning into 'gitwhatever' without warning.
>
> Signed-off-by: Michael <kensington@astralcloak.net>

Unless there is a compelling reason not to, could we have your name here,
not just half a name, please?  

It is not particularly a good reason to say "I go by 'Michael' among my
friends". The output from "git shortlog -s --author=Michael" shows more
than 20 Michaels already, and it would be nice for us if we can easily
differenciate you among this group of people you are now joining with this
patch.

> ---
>  Makefile |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c457c34..380d96f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -388,6 +388,9 @@ SCRIPT_SH =
>  SCRIPT_LIB =
>  TEST_PROGRAMS_NEED_X =
>  
> +# Binary suffix used for Windows builds
> +X =
> +

The patch looks good to me, although it might make sense to move it down
before this line

	PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))

where it matters most as the documentation of what $X is being used for.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-05 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-05 10:41 [PATCH] Explicitly set X to avoid potential build breakage Michael
2012-02-05 22:14 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).