All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git-gui: Remove ancient Cygwin compatibility code
@ 2016-05-13 11:11 Adam Dinwoodie
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Dinwoodie @ 2016-05-13 11:11 UTC (permalink / raw)
  To: git; +Cc: Pat Thoyts, Junio C Hamano

>From 50c9cbb6ce31529316ba004194f63a24ae59b4b0 Mon Sep 17 00:00:00 2001
From: Adam Dinwoodie <adam@dinwoodie.org>
Date: Fri, 13 May 2016 11:52:32 +0100
Subject: [PATCH] git-gui: Remove unused Cygwin compatibility code

Cygwin-distributed builds of git-gui have patched out the
Cygwin-specific compatibility code in the Makefile before compiling
since at least the start of 2012 (specifically since at least Git
v1.7.9).  The compatibility code is clearly not necessary, so remove it
from the official git-gui code as well.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
---

I originally submitted this patch back in December, but it didn't
generate any more discussion than Junio saying "this looks like a good
thing to have."  I'm resubmitting to try to generate further discussion
/ agreement to include the patch.

An equivalent patch has been included in the downstream Cygwin releases
since v1.7.9, and therefore is clearly stable and not causing any
notable problems.

I've based this patch off the git-gui tree rather than the main Git tree
per the SubmittingPatches doc.  Pipe it through `sed
's!Makekfile!git-gui/\0!g'` for a version that applies cleanly to the
main Git source tree.

 Makefile | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/Makefile b/Makefile
index fe30be3..a0adf3d 100644
--- a/Makefile
+++ b/Makefile
@@ -136,25 +136,11 @@
 GITGUI_RELATIVE :=
 GITGUI_MACOSXAPP :=
 
-ifeq ($(uname_O),Cygwin)
-	GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
-
-	# Is this a Cygwin Tcl/Tk binary?  If so it knows how to do
-	# POSIX path translation just like cygpath does and we must
-	# keep libdir in POSIX format so Cygwin packages of git-gui
-	# work no matter where the user installs them.
-	#
-	ifeq ($(shell echo 'puts [file normalize /]' | '$(TCL_PATH_SQ)'),$(shell cygpath --mixed --absolute /))
-		gg_libdir_sed_in := $(gg_libdir)
-	else
-		gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
-	endif
-else
-	ifeq ($(exedir),$(gg_libdir))
-		GITGUI_RELATIVE := 1
-	endif
-	gg_libdir_sed_in := $(gg_libdir)
-endif
+ifeq ($(exedir),$(gg_libdir))
+	GITGUI_RELATIVE := 1
+endif
+gg_libdir_sed_in := $(gg_libdir)
+
 ifeq ($(uname_S),Darwin)
 	ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
 		GITGUI_MACOSXAPP := YesPlease
-- 
2.8.2.692.g8d9a515

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

* Re: [PATCH] git-gui: Remove ancient Cygwin compatibility code
  2015-12-01 19:17 Adam Dinwoodie
@ 2015-12-11 19:54 ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2015-12-11 19:54 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: Shawn O. Pearce, Adam Dinwoodie, git

Adam Dinwoodie <adam@dinwoodie.org> writes:

> Remove special path handling for Cygwin in the git-gui Makefile.  This
> used to be necessary, but has been being patched out of the official
> Cygwin distribution builds since Git v1.7.9, and should really be
> patched out of the upstream code rather than being patched every time in
> the Cygwin build process.
>
> Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
> ---
> I'm the current Cygwin maintainer for Git; this code has been patched
> out of the Cygwin Git builds since v1.7.9,* well before I took over.
> It's clearly stable and causing no problems, so having it in the
> upstream code rather than patching every time seems The Right Thing To
> Do.
>
> (* The actual patch used in the Cygwin builds just replaces `ifeq
> ($(uname_O,Cygwin))` with `ifeq ($(uname_O,noThanks))`, but that's
> clearly the appropriate solution for a quick manual patch, not for the
> actual upstream code.)
>
> Sending with apologies to Shawn Pearce for the noise; I'd misread the
> SubmittingPatches doc and sent to him alone first.
>
> I've based this patch off the git-gui tree rather than the main Git tree
> per the SubmittingPatches doc.  Pipe it through `sed
> 's!Makekfile!git-gui/\0!g'` for a version that applies cleanly to the
> main Git source tree.

Pat, this looks like a good thing to have.

More generally, should I expect a pull request from you sometime in
a week or two for updates in the git-gui part?

Thanks.

>  Makefile | 21 +++------------------
>  1 file changed, 3 insertions(+), 18 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 4f00bdd..e369046 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -136,25 +136,10 @@
>  GITGUI_RELATIVE :=
>  GITGUI_MACOSXAPP :=
>  
> -ifeq ($(uname_O),Cygwin)
> -	GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
> -
> -	# Is this a Cygwin Tcl/Tk binary?  If so it knows how to do
> -	# POSIX path translation just like cygpath does and we must
> -	# keep libdir in POSIX format so Cygwin packages of git-gui
> -	# work no matter where the user installs them.
> -	#
> -	ifeq ($(shell echo 'puts [file normalize /]' | '$(TCL_PATH_SQ)'),$(shell cygpath --mixed --absolute /))
> -		gg_libdir_sed_in := $(gg_libdir)
> -	else
> -		gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
> -	endif
> -else
> -	ifeq ($(exedir),$(gg_libdir))
> -		GITGUI_RELATIVE := 1
> -	endif
> -	gg_libdir_sed_in := $(gg_libdir)
> -endif
> +ifeq ($(exedir),$(gg_libdir))
> +	GITGUI_RELATIVE := 1
> +endif
> +gg_libdir_sed_in := $(gg_libdir)
>  ifeq ($(uname_S),Darwin)
>  	ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
>  		GITGUI_MACOSXAPP := YesPlease

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

* [PATCH] git-gui: Remove ancient Cygwin compatibility code
@ 2015-12-01 19:17 Adam Dinwoodie
  2015-12-11 19:54 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Dinwoodie @ 2015-12-01 19:17 UTC (permalink / raw)
  To: git; +Cc: Shawn O. Pearce, Pat Thoyts

Remove special path handling for Cygwin in the git-gui Makefile.  This
used to be necessary, but has been being patched out of the official
Cygwin distribution builds since Git v1.7.9, and should really be
patched out of the upstream code rather than being patched every time in
the Cygwin build process.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
---
I'm the current Cygwin maintainer for Git; this code has been patched
out of the Cygwin Git builds since v1.7.9,* well before I took over.
It's clearly stable and causing no problems, so having it in the
upstream code rather than patching every time seems The Right Thing To
Do.

(* The actual patch used in the Cygwin builds just replaces `ifeq
($(uname_O,Cygwin))` with `ifeq ($(uname_O,noThanks))`, but that's
clearly the appropriate solution for a quick manual patch, not for the
actual upstream code.)

Sending with apologies to Shawn Pearce for the noise; I'd misread the
SubmittingPatches doc and sent to him alone first.

I've based this patch off the git-gui tree rather than the main Git tree
per the SubmittingPatches doc.  Pipe it through `sed
's!Makekfile!git-gui/\0!g'` for a version that applies cleanly to the
main Git source tree.

 Makefile | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/Makefile b/Makefile
index 4f00bdd..e369046 100644
--- a/Makefile
+++ b/Makefile
@@ -136,25 +136,10 @@
 GITGUI_RELATIVE :=
 GITGUI_MACOSXAPP :=
 
-ifeq ($(uname_O),Cygwin)
-	GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
-
-	# Is this a Cygwin Tcl/Tk binary?  If so it knows how to do
-	# POSIX path translation just like cygpath does and we must
-	# keep libdir in POSIX format so Cygwin packages of git-gui
-	# work no matter where the user installs them.
-	#
-	ifeq ($(shell echo 'puts [file normalize /]' | '$(TCL_PATH_SQ)'),$(shell cygpath --mixed --absolute /))
-		gg_libdir_sed_in := $(gg_libdir)
-	else
-		gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
-	endif
-else
-	ifeq ($(exedir),$(gg_libdir))
-		GITGUI_RELATIVE := 1
-	endif
-	gg_libdir_sed_in := $(gg_libdir)
-endif
+ifeq ($(exedir),$(gg_libdir))
+	GITGUI_RELATIVE := 1
+endif
+gg_libdir_sed_in := $(gg_libdir)
 ifeq ($(uname_S),Darwin)
 	ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
 		GITGUI_MACOSXAPP := YesPlease
-- 
2.5.3

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

end of thread, other threads:[~2016-05-13 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-13 11:11 [PATCH] git-gui: Remove ancient Cygwin compatibility code Adam Dinwoodie
  -- strict thread matches above, loose matches on Subject: below --
2015-12-01 19:17 Adam Dinwoodie
2015-12-11 19:54 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.