threads / patch / 40916

patchgit-gui: Remove ancient Cygwin compatibility code

Subject: [PATCH] git-gui: Remove ancient Cygwin compatibility code

## tl;dr

2 messages between Dec 1, 2015 and Dec 11, 2015. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Adam Dinwoodie· Dec 1, 2015, 19:17 UTC · lore

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(-)
Show changes to Makefile +4 −19
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
Junio C Hamano· Dec 11, 2015, 19:54 UTC · re: Adam Dinwoodie · lore

Re: [PATCH] git-gui: Remove ancient Cygwin compatibility code

Adam Dinwoodie <adam@dinwoodie.org> writes:
Show 26 quoted lines
> 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.
Show 37 quoted lines
>  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

← back to recent threads