{"thread":{"id":"37183","subject":"[PATCH] git-gui: Make git-gui lib dir configurable at runtime","startedAt":"2014-07-21T18:20:09Z","lastAt":"2014-08-12T16:38:32Z","messageCount":5,"participants":["David Turner","Junio C Hamano","Pat Thoyts"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"246473","messageId":"1405966809-30882-1-git-send-email-dturner@twitter.com","threadId":"37183","inReplyTo":null,"subject":"[PATCH] git-gui: Make git-gui lib dir configurable at runtime","fromName":"David Turner","fromEmail":"dturner@twopensource.com","sentAt":"2014-07-21T18:20:09Z","receivedAt":"2014-07-21T18:20:09Z","isPatch":true,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"Introduce the GIT_GUI_LIB_DIR environment variable, to tell git-gui\nwhere to look for TCL libs.  This allows a git-gui which has been\nbuilt with a prefix of /foo to be run out of directory /bar.  This is\nthe equivalent of GIT_EXEC_PATH or GITPERLLIB but for git-gui's TCL\nlibraries.\n\nSigned-off-by: David Turner <dturner@twitter.com>\n---\n git-gui/Makefile   | 3 ++-\n git-gui/git-gui.sh | 6 +++++-\n 2 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex cde8b2e..56bf9e2 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -177,7 +177,8 @@ git-gui: GIT-VERSION-FILE GIT-GUI-VARS\n \techo then >>$@+ && \\\n \techo '\t'echo \\'git-gui version '$(GITGUI_VERSION)'\\' >>$@+ && \\\n \techo else >>$@+ && \\\n-\techo '\t'exec \\''$(libdir_SQ)/Git Gui.app/Contents/MacOS/$(subst \\,,$(TKEXECUTABLE))'\\' \\\n+\techo '\tlibdir=\"$$(GIT_GUI_LIB_DIR:-$(libdir_SQ))\"' >>$@+ && \\\n+\techo '\t'exec \\\"'$$libdir/Git Gui.app/Contents/MacOS/$(subst \\,,$(TKEXECUTABLE))'\\\" \\\n \t\t'\"$$0\" \"$$@\"' >>$@+ && \\\n \techo fi >>$@+ && \\\n \tchmod +x $@+ && \\\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex b186329..6cbb36e 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -49,7 +49,11 @@ catch {rename send {}} ; # What an evil concept...\n ##\n ## locate our library\n \n-set oguilib {@@GITGUI_LIBDIR@@}\n+if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {\n+\tset oguilib $::env(GIT_GUI_LIB_DIR)\n+} else {\n+\tset oguilib {@@GITGUI_LIBDIR@@}\n+}\n set oguirel {@@GITGUI_RELATIVE@@}\n if {$oguirel eq {1}} {\n \tset oguilib [file dirname [file normalize $argv0]]\n-- \n1.9.1\n"},{"id":"246482","messageId":"xmqqbnsiifq6.fsf@gitster.dls.corp.google.com","threadId":"37183","inReplyTo":"1405966809-30882-1-git-send-email-dturner@twitter.com","subject":"Re: [PATCH] git-gui: Make git-gui lib dir configurable at runtime","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T21:06:41Z","receivedAt":"2014-07-21T21:06:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Turner <dturner@twopensource.com> writes:\n\n> Introduce the GIT_GUI_LIB_DIR environment variable, to tell git-gui\n> where to look for TCL libs.  This allows a git-gui which has been\n> built with a prefix of /foo to be run out of directory /bar.  This is\n> the equivalent of GIT_EXEC_PATH or GITPERLLIB but for git-gui's TCL\n> libraries.\n>\n> Signed-off-by: David Turner <dturner@twitter.com>\n> ---\n>  git-gui/Makefile   | 3 ++-\n>  git-gui/git-gui.sh | 6 +++++-\n>  2 files changed, 7 insertions(+), 2 deletions(-)\n\nWould a similar change to gitk necessary/beneficial to platforms\nthat would benefit from this change?\n\ngit-gui directory in my tree comes from its upstream repository\ngit://repo.or.cz/git-gui.git/, and it is maintained by Pat Thoyts\n(Cc'ed).\n\ngitk is from git://ozlabs.org/~paulus/gitk.git maintained by Paul\nMackerras <paulus@samba.org> (not Cc'ed).\n\nNote that these two upstream projects do not have leading\ndirectories git-gui and gitk-git themselves (they are merged to my\ntree while their paths being renamed).  A patch that is appliable to\nthem would touch paths without them (e.g. Makefile and git-gui.sh\nfor an equivalent of the patch I am responding to).\n\nThanks.\n\n> diff --git a/git-gui/Makefile b/git-gui/Makefile\n> index cde8b2e..56bf9e2 100644\n> --- a/git-gui/Makefile\n> +++ b/git-gui/Makefile\n> @@ -177,7 +177,8 @@ git-gui: GIT-VERSION-FILE GIT-GUI-VARS\n>  \techo then >>$@+ && \\\n>  \techo '\t'echo \\'git-gui version '$(GITGUI_VERSION)'\\' >>$@+ && \\\n>  \techo else >>$@+ && \\\n> -\techo '\t'exec \\''$(libdir_SQ)/Git Gui.app/Contents/MacOS/$(subst \\,,$(TKEXECUTABLE))'\\' \\\n> +\techo '\tlibdir=\"$$(GIT_GUI_LIB_DIR:-$(libdir_SQ))\"' >>$@+ && \\\n> +\techo '\t'exec \\\"'$$libdir/Git Gui.app/Contents/MacOS/$(subst \\,,$(TKEXECUTABLE))'\\\" \\\n>  \t\t'\"$$0\" \"$$@\"' >>$@+ && \\\n>  \techo fi >>$@+ && \\\n>  \tchmod +x $@+ && \\\n> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\n> index b186329..6cbb36e 100755\n> --- a/git-gui/git-gui.sh\n> +++ b/git-gui/git-gui.sh\n> @@ -49,7 +49,11 @@ catch {rename send {}} ; # What an evil concept...\n>  ##\n>  ## locate our library\n>  \n> -set oguilib {@@GITGUI_LIBDIR@@}\n> +if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {\n> +\tset oguilib $::env(GIT_GUI_LIB_DIR)\n> +} else {\n> +\tset oguilib {@@GITGUI_LIBDIR@@}\n> +}\n>  set oguirel {@@GITGUI_RELATIVE@@}\n>  if {$oguirel eq {1}} {\n>  \tset oguilib [file dirname [file normalize $argv0]]\n"},{"id":"246483","messageId":"1405979864.15933.4.camel@leckie","threadId":"37183","inReplyTo":"xmqqbnsiifq6.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] git-gui: Make git-gui lib dir configurable at runtime","fromName":"David Turner","fromEmail":"dturner@twopensource.com","sentAt":"2014-07-21T21:57:44Z","receivedAt":"2014-07-21T21:57:44Z","isPatch":true,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"On Mon, 2014-07-21 at 14:06 -0700, Junio C Hamano wrote:\n> David Turner <dturner@twopensource.com> writes:\n> \n> > Introduce the GIT_GUI_LIB_DIR environment variable, to tell git-gui\n> > where to look for TCL libs.  This allows a git-gui which has been\n> > built with a prefix of /foo to be run out of directory /bar.  This is\n> > the equivalent of GIT_EXEC_PATH or GITPERLLIB but for git-gui's TCL\n> > libraries.\n> >\n> > Signed-off-by: David Turner <dturner@twitter.com>\n> > ---\n> >  git-gui/Makefile   | 3 ++-\n> >  git-gui/git-gui.sh | 6 +++++-\n> >  2 files changed, 7 insertions(+), 2 deletions(-)\n> \n> Would a similar change to gitk necessary/beneficial to platforms\n> that would benefit from this change?\n\nApparently not; it seems to work fine for me from an alternate location.\nConvenient!\n\n> git-gui directory in my tree comes from its upstream repository\n> git://repo.or.cz/git-gui.git/, and it is maintained by Pat Thoyts\n> (Cc'ed).\n\n> Note that these two upstream projects do not have leading\n> directories git-gui and gitk-git themselves (they are merged to my\n> tree while their paths being renamed).  A patch that is appliable to\n> them would touch paths without them (e.g. Makefile and git-gui.sh\n> for an equivalent of the patch I am responding to).\n\nPat, do you want patches via the git mailing list, personal mail, or\nsome other way?  \n"},{"id":"247548","messageId":"87tx5k8scn.fsf@red.patthoyts.tk","threadId":"37183","inReplyTo":"1405979864.15933.4.camel@leckie","subject":"Re: [PATCH] git-gui: Make git-gui lib dir configurable at runtime","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2014-08-10T12:03:04Z","receivedAt":"2014-08-10T12:03:04Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"David Turner <dturner@twopensource.com> writes:\n\n>On Mon, 2014-07-21 at 14:06 -0700, Junio C Hamano wrote:\n>> David Turner <dturner@twopensource.com> writes:\n>> \n>> > Introduce the GIT_GUI_LIB_DIR environment variable, to tell git-gui\n>> > where to look for TCL libs.  This allows a git-gui which has been\n>> > built with a prefix of /foo to be run out of directory /bar.  This is\n>> > the equivalent of GIT_EXEC_PATH or GITPERLLIB but for git-gui's TCL\n>> > libraries.\n>> >\n>> > Signed-off-by: David Turner <dturner@twitter.com>\n>> > ---\n>> >  git-gui/Makefile   | 3 ++-\n>> >  git-gui/git-gui.sh | 6 +++++-\n>> >  2 files changed, 7 insertions(+), 2 deletions(-)\n>> \n>> Would a similar change to gitk necessary/beneficial to platforms\n>> that would benefit from this change?\n>\n>Apparently not; it seems to work fine for me from an alternate location.\n>Convenient!\n>\n>> git-gui directory in my tree comes from its upstream repository\n>> git://repo.or.cz/git-gui.git/, and it is maintained by Pat Thoyts\n>> (Cc'ed).\n>\n>> Note that these two upstream projects do not have leading\n>> directories git-gui and gitk-git themselves (they are merged to my\n>> tree while their paths being renamed).  A patch that is appliable to\n>> them would touch paths without them (e.g. Makefile and git-gui.sh\n>> for an equivalent of the patch I am responding to).\n>\n>Pat, do you want patches via the git mailing list, personal mail, or\n>some other way?  \n>\n\nThe standard method is both: personal to ensure I see it and mailing list to\nallow everyone to comment.\n\nI've applied this patch to git-gui master.\n\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"},{"id":"247612","messageId":"xmqqtx5h64tz.fsf@gitster.dls.corp.google.com","threadId":"37183","inReplyTo":"87tx5k8scn.fsf@red.patthoyts.tk","subject":"Re: [PATCH] git-gui: Make git-gui lib dir configurable at runtime","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-08-12T16:38:32Z","receivedAt":"2014-08-12T16:38:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n>>Pat, do you want patches via the git mailing list, personal mail, or\n>>some other way?  \n>>\n>\n> The standard method is both: personal to ensure I see it and mailing list to\n> allow everyone to comment.\n>\n> I've applied this patch to git-gui master.\n\nThanks, both.  Is it a good time to pull the changes from you to be\nin the final 2.1 release?\n"}]}