git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Adam Dinwoodie <adam@dinwoodie.org>
Date
May 13, 2016, 11:11 UTC
Message-ID
<20160513111122.GD2345@dinwoodie.org>
>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
Message 1 of 1 in “git-gui: Remove ancient Cygwin compatibility code”
  1. git-gui: Remove ancient Cygwin compatibility codeAdam Dinwoodie, May 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.