{"thread":{"id":"11975","subject":"[PATCH] Improve git-help--browse browser support under OS X","startedAt":"2008-02-08T21:23:14Z","lastAt":"2008-02-14T05:09:46Z","messageCount":17,"participants":["jaysoffian+git@gmail.com","Dmitry Potapov","Jay Soffian","Christian Couder","Junio C Hamano","Pieter de Bie"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"68006","messageId":"1202505794-13409-1-git-send-email-jaysoffian+git@gmail.com","threadId":"11975","inReplyTo":null,"subject":"[PATCH] Improve git-help--browse browser support under OS X","fromName":"","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-08T21:23:14Z","receivedAt":"2008-02-08T21:23:14Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"/usr/bin/open <document> is used under OS X to open a document just as if the\nuser had double-clicked on the file's icon. In other words, this will open HTML\nfiles with the user's default browser. Note however that whether the document\nopens in a new window, or in a new tab depends upon the browser configuration.\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\n---\n git-web--browse.sh |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/git-web--browse.sh b/git-web--browse.sh\nindex 8ed489d..938293a 100755\n--- a/git-web--browse.sh\n+++ b/git-web--browse.sh\n@@ -25,7 +25,7 @@ NONGIT_OK=Yes\n \n valid_tool() {\n \tcase \"$1\" in\n-\t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo)\n+\t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo | open)\n \t\t\t;; # happy\n \t\t*)\n \t\t\treturn 1\n@@ -104,6 +104,9 @@ if test -z \"$browser\" ; then\n     else\n \tbrowser_candidates=\"w3m links lynx\"\n     fi\n+    if test -n \"$SECURITYSESSIONID\"; then\n+\tbrowser_candidates=\"open $browser_candidates\"\n+    fi\n \n     for i in $browser_candidates; do\n \tinit_browser_path $i\n@@ -147,7 +150,7 @@ case \"$browser\" in\n \t\t;;\n \tesac\n \t;;\n-    w3m|links|lynx)\n+    w3m|links|lynx|open)\n \teval \"$browser_path\" \"$@\"\n \t;;\n     dillo)\n-- \n1.5.4.1221.g7a7a1\n"},{"id":"68118","messageId":"20080209202020.GD30368@dpotapov.dyndns.org","threadId":"11975","inReplyTo":"1202505794-13409-1-git-send-email-jaysoffian+git@gmail.com","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-09T20:20:20Z","receivedAt":"2008-02-09T20:20:20Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Fri, Feb 08, 2008 at 04:23:14PM -0500, jaysoffian+git@gmail.com wrote:\n> /usr/bin/open <document> is used under OS X to open a document just as if the\n> user had double-clicked on the file's icon. In other words, this will open HTML\n> files with the user's default browser. Note however that whether the document\n> opens in a new window, or in a new tab depends upon the browser configuration.\n\nThis is OS X specific, so the change should be made in such a way that it\nwill not affect anyone else. Because people on other platforms may have\n\"open\" to do different things. For example, on Linux, the \"open\" command\nis used to open a new virtual terminal. At the same time, other systems\nmay have their own ways to start the default browser. For instance, on\nDebian based systems, it is usually x-www-browser for X and www-browser\nfor terminal.\n\nDmitry\n"},{"id":"68149","messageId":"76718490802091815s45c19113t938f5257aad3f46c@mail.gmail.com","threadId":"11975","inReplyTo":"20080209202020.GD30368@dpotapov.dyndns.org","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-10T02:15:30Z","receivedAt":"2008-02-10T02:15:30Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Feb 9, 2008 3:20 PM, Dmitry Potapov <dpotapov@gmail.com> wrote:\n> On Fri, Feb 08, 2008 at 04:23:14PM -0500, jaysoffian+git@gmail.com wrote:\n> > /usr/bin/open <document> is used under OS X to open a document just as if the\n> > user had double-clicked on the file's icon. In other words, this will open HTML\n> > files with the user's default browser. Note however that whether the document\n> > opens in a new window, or in a new tab depends upon the browser configuration.\n>\n> This is OS X specific, so the change should be made in such a way that it\n> will not affect anyone else. Because people on other platforms may have\n> \"open\" to do different things. For example, on Linux, the \"open\" command\n> is used to open a new virtual terminal. At the same time, other systems\n> may have their own ways to start the default browser. For instance, on\n> Debian based systems, it is usually x-www-browser for X and www-browser\n> for terminal.\n\nI guess I'm confused by the criticism as I thought that's what I did.\n\"open\" is only added to the list of browsers to try if the\nSECURITYSESSIONID environment variable is set (indicating an OS X GUI\nlogin environment). I don't see how the change I made could adversely\nimpact the users of other systems.\n\nj.\n"},{"id":"68205","messageId":"20080210124336.GH30368@dpotapov.dyndns.org","threadId":"11975","inReplyTo":"76718490802091815s45c19113t938f5257aad3f46c@mail.gmail.com","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-10T12:43:36Z","receivedAt":"2008-02-10T12:43:36Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sat, Feb 09, 2008 at 09:15:30PM -0500, Jay Soffian wrote:\n> \n> I guess I'm confused by the criticism as I thought that's what I did.\n> \"open\" is only added to the list of browsers to try if the\n> SECURITYSESSIONID environment variable is set (indicating an OS X GUI\n> login environment). I don't see how the change I made could adversely\n> impact the users of other systems.\n\nWould not be better to use uname instead like this\n\n  if test \"$(uname -s)\" == \"Darwin\"; then\n    ...\nor in addition to SECURITYSESSIONID:\n\n  if test -n \"$SECURITYSESSIONID\" -a \"$(uname -s)\" == \"Darwin\"; then\n    ...\n?\n\nI think it would be more reliable and more importantly it makes the\ncode easier to understand, because it is clear now for everyone that\nthis is OS X specific.\n\nBTW, should not it be mentioned in the documentation? Probably, in\nthe list of supported web browsers in git-help.txt.\n\nDmitry\n"},{"id":"68211","messageId":"200802101445.16033.chriscool@tuxfamily.org","threadId":"11975","inReplyTo":"20080210124336.GH30368@dpotapov.dyndns.org","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-10T13:45:15Z","receivedAt":"2008-02-10T13:45:15Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le dimanche 10 février 2008, Dmitry Potapov a écrit :\n> On Sat, Feb 09, 2008 at 09:15:30PM -0500, Jay Soffian wrote:\n> > I guess I'm confused by the criticism as I thought that's what I did.\n> > \"open\" is only added to the list of browsers to try if the\n> > SECURITYSESSIONID environment variable is set (indicating an OS X GUI\n> > login environment). \n\nI wonder if \"open\" works on OS X outside the OS X GUI environment. (And do \npeople use OS X outside the OS X GUI environment ?)\n\n> > I don't see how the change I made could adversely \n> > impact the users of other systems.\n>\n> Would not be better to use uname instead like this\n>\n>   if test \"$(uname -s)\" == \"Darwin\"; then\n>     ...\n> or in addition to SECURITYSESSIONID:\n>\n>   if test -n \"$SECURITYSESSIONID\" -a \"$(uname -s)\" == \"Darwin\"; then\n>     ...\n> ?\n>\n> I think it would be more reliable and more importantly it makes the\n> code easier to understand, because it is clear now for everyone that\n> this is OS X specific.\n>\n> BTW, should not it be mentioned in the documentation? Probably, in\n> the list of supported web browsers in git-help.txt.\n\nIn the git \"next\" branch, \"git-help--browse\" has been \nrenamed \"git-web--browse\". And the original patch is \nagainst \"git-web--browse\" except in the title where it is \nabout \"git-help--browse\".\n\nAnyway now in \"next\", \"git-web--browse\" is used by both \"git help\" and \"git \ninstaweb\", so the documentation of both commands need an update.\n\nThanks,\nChristian. \n"},{"id":"68312","messageId":"76718490802101810u74f86927hefacac162c69f697@mail.gmail.com","threadId":"11975","inReplyTo":"20080210124336.GH30368@dpotapov.dyndns.org","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-11T02:10:31Z","receivedAt":"2008-02-11T02:10:31Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Feb 10, 2008 7:43 AM, Dmitry Potapov <dpotapov@gmail.com> wrote:\n> On Sat, Feb 09, 2008 at 09:15:30PM -0500, Jay Soffian wrote:\n>\n> Would not be better to use uname instead like this\n>\n>   if test \"$(uname -s)\" == \"Darwin\"; then\n>     ...\n> or in addition to SECURITYSESSIONID:\n>\n>   if test -n \"$SECURITYSESSIONID\" -a \"$(uname -s)\" == \"Darwin\"; then\n>     ...\n> ?\n>\n> I think it would be more reliable and more importantly it makes the\n> code easier to understand, because it is clear now for everyone that\n> this is OS X specific.\n\nSure.\n\n> BTW, should not it be mentioned in the documentation? Probably, in\n> the list of supported web browsers in git-help.txt.\n\nYep, will do.\n\nj.\n"},{"id":"68313","messageId":"76718490802101813n5b2121fcp25b4c65eb32ab14e@mail.gmail.com","threadId":"11975","inReplyTo":"200802101445.16033.chriscool@tuxfamily.org","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-11T02:13:47Z","receivedAt":"2008-02-11T02:13:47Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Feb 10, 2008 8:45 AM, Christian Couder <chriscool@tuxfamily.org> wrote:\n\n> I wonder if \"open\" works on OS X outside the OS X GUI environment. (And do\n> people use OS X outside the OS X GUI environment ?)\n\n\"open\" simulates double-clicking on a document icon, so, no it does\nnot make sense to use it unless the GUI is active. What I was\nreferring to though is that you can't ssh into another OS X host and\nuse open, even if there is a user logged into the GUI on that host,\nfor obvious security reasons.\n\n> In the git \"next\" branch, \"git-help--browse\" has been\n> renamed \"git-web--browse\". And the original patch is\n> against \"git-web--browse\" except in the title where it is\n> about \"git-help--browse\".\n\nYeah, my typo in the title.\n\n> Anyway now in \"next\", \"git-web--browse\" is used by both \"git help\" and \"git\n> instaweb\", so the documentation of both commands need an update.\n\nThe git instaweb documentation update should be in a separate patch.\nThough I think maybe the right way to handle this is add a new doc for\ngit-web--browse and then have the instaweb and help docs refer to\nthat, no?\n\nBTW, what is the reason for the two-dashes in git-web--browse's name?\n\nj.\n"},{"id":"68314","messageId":"1202696664-1565-1-git-send-email-jaysoffian+git@gmail.com","threadId":"11975","inReplyTo":"1202505794-13409-1-git-send-email-jaysoffian+git@gmail.com","subject":"[PATCH] git-web--browse: improve browser support under OS X","fromName":"","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-11T02:24:24Z","receivedAt":"2008-02-11T02:24:24Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"From: Jay Soffian <jaysoffian@gmail.com>\n\n/usr/bin/open <document> is used under OS X to open a document as if the\nuser had double-clicked on the file's icon (i.e. HTML files are opened\nw/the user's default browser).\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\n---\n Documentation/git-help.txt |    1 +\n git-web--browse.sh         |    7 +++++--\n 2 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-help.txt b/Documentation/git-help.txt\nindex ad41aab..897868a 100644\n--- a/Documentation/git-help.txt\n+++ b/Documentation/git-help.txt\n@@ -68,6 +68,7 @@ The following browsers are currently supported by 'git-web--browse':\n * links\n * lynx\n * dillo\n+* open (OS X only, where it is the default)\n \n CONFIGURATION VARIABLES\n -----------------------\ndiff --git a/git-web--browse.sh b/git-web--browse.sh\nindex 8ed489d..1927c3b 100755\n--- a/git-web--browse.sh\n+++ b/git-web--browse.sh\n@@ -25,7 +25,7 @@ NONGIT_OK=Yes\n \n valid_tool() {\n \tcase \"$1\" in\n-\t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo)\n+\t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo | open)\n \t\t\t;; # happy\n \t\t*)\n \t\t\treturn 1\n@@ -104,6 +104,9 @@ if test -z \"$browser\" ; then\n     else\n \tbrowser_candidates=\"w3m links lynx\"\n     fi\n+    if test \"$(uname)\" = \"Darwin\" && test -n \"$SECURITYSESSIONID\"; then\n+\tbrowser_candidates=\"open $browser_candidates\"\n+    fi\n \n     for i in $browser_candidates; do\n \tinit_browser_path $i\n@@ -147,7 +150,7 @@ case \"$browser\" in\n \t\t;;\n \tesac\n \t;;\n-    w3m|links|lynx)\n+    w3m|links|lynx|open)\n \teval \"$browser_path\" \"$@\"\n \t;;\n     dillo)\n-- \n1.5.4.1221.gf32f1\n"},{"id":"68319","messageId":"7vve4wb3h7.fsf@gitster.siamese.dyndns.org","threadId":"11975","inReplyTo":"1202696664-1565-1-git-send-email-jaysoffian+git@gmail.com","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-11T03:01:56Z","receivedAt":"2008-02-11T03:01:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Because we preprocess git-web--browse.sh to create the final\ngit-web--browse to be installed, something like \"open\" that is\nnot a user but a platform preference might be better done as a\nbuild-time thing, instead of forcing everybody to spawn \"uname\",\nperhaps like this?\n\nAlso I wonder why the check for SECURITYSESSIONID your original\nhad is not good enough for this Mac specific customization?\n\n\n Makefile           |    2 ++\n git-web--browse.sh |   18 +++++++++++++++++-\n 2 files changed, 19 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex d288378..5c278d2 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -419,6 +419,7 @@ ifeq ($(uname_S),Darwin)\n \tendif\n \tNO_STRLCPY = YesPlease\n \tNO_MEMMEM = YesPlease\n+\tPLATFORM_BROWSER = open\n endif\n ifeq ($(uname_S),SunOS)\n \tNEEDS_SOCKET = YesPlease\n@@ -840,6 +841,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n+\t    -e 's/@@PLATFORM_BROWSER@@/$(PLATFORM_BROWSER)/g' \\\n \t    $@.sh >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/git-web--browse.sh b/git-web--browse.sh\nindex 3ade500..61a3514 100755\n--- a/git-web--browse.sh\n+++ b/git-web--browse.sh\n@@ -27,6 +27,8 @@ valid_tool() {\n \tcase \"$1\" in\n \t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo)\n \t\t\t;; # happy\n+\t\t\"@@PLATFORM_BROWSER@@\" )\n+\t\t\t;;\n \t\t*)\n \t\t\treturn 1\n \t\t\t;;\n@@ -105,6 +107,20 @@ if test -z \"$browser\" ; then\n \tbrowser_candidates=\"w3m links lynx\"\n     fi\n \n+    # Test if the current environment is suitable for the\n+    # platform preference and add it as the default\n+\n+    if\tcase \"@@PLATFORM_BROWSER@@\" in\n+\topen)\n+\t\ttest -n \"$SECURITYSESSIONID\" ;;\n+\t# other platform preference come here...\n+\t*)\n+\t\tfalse ;;\n+\tesac\n+    then\n+\tbrowser_candidates=\"@@PLATFORM_BROWSER@@ $browser_candidates\"\n+    fi\n+\n     for i in $browser_candidates; do\n \tinit_browser_path $i\n \tif type \"$browser_path\" > /dev/null 2>&1; then\n@@ -147,7 +163,7 @@ case \"$browser\" in\n \t\t;;\n \tesac\n \t;;\n-    w3m|links|lynx)\n+    w3m|links|lynx|open)\n \teval \"$browser_path\" \"$@\"\n \t;;\n     dillo)\n"},{"id":"68324","messageId":"200802110603.51515.chriscool@tuxfamily.org","threadId":"11975","inReplyTo":"76718490802101813n5b2121fcp25b4c65eb32ab14e@mail.gmail.com","subject":"Re: [PATCH] Improve git-help--browse browser support under OS X","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-11T05:03:51Z","receivedAt":"2008-02-11T05:03:51Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le lundi 11 février 2008, Jay Soffian a écrit :\n> On Feb 10, 2008 8:45 AM, Christian Couder <chriscool@tuxfamily.org> wrote:\n> > I wonder if \"open\" works on OS X outside the OS X GUI environment. (And\n> > do people use OS X outside the OS X GUI environment ?)\n>\n> \"open\" simulates double-clicking on a document icon, so, no it does\n> not make sense to use it unless the GUI is active. What I was\n> referring to though is that you can't ssh into another OS X host and\n> use open, even if there is a user logged into the GUI on that host,\n> for obvious security reasons.\n\nOk, thanks for this information.\n\n> > In the git \"next\" branch, \"git-help--browse\" has been\n> > renamed \"git-web--browse\". And the original patch is\n> > against \"git-web--browse\" except in the title where it is\n> > about \"git-help--browse\".\n>\n> Yeah, my typo in the title.\n>\n> > Anyway now in \"next\", \"git-web--browse\" is used by both \"git help\" and\n> > \"git instaweb\", so the documentation of both commands need an update.\n>\n> The git instaweb documentation update should be in a separate patch.\n> Though I think maybe the right way to handle this is add a new doc for\n> git-web--browse and then have the instaweb and help docs refer to\n> that, no?\n>\n> BTW, what is the reason for the two-dashes in git-web--browse's name?\n\nThe two-dashes means that it's an helper script, and this means that it may \nnot have it's own documentation. Anyway maybe I will create a documentation \nfor it and move common information from Documentation/git-help.txt and \nDocumentation/git-instaweb.txt into it.\n\nThanks,\nChristian.\n"},{"id":"68393","messageId":"76718490802110615j3017e17awcae2a04087984f0d@mail.gmail.com","threadId":"11975","inReplyTo":"7vve4wb3h7.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-11T14:15:23Z","receivedAt":"2008-02-11T14:15:23Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Feb 10, 2008 10:01 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Because we preprocess git-web--browse.sh to create the final\n> git-web--browse to be installed, something like \"open\" that is\n> not a user but a platform preference might be better done as a\n> build-time thing, instead of forcing everybody to spawn \"uname\",\n> perhaps like this?\n\nSeems like overkill (over the original patch), but honestly, I'm happy\nwith whatever solution deemed appropriate, just as long as I can use\nmy native browser on OS X. :-)\n\n> Also I wonder why the check for SECURITYSESSIONID your original\n> had is not good enough for this Mac specific customization?\n\nWell, I thought it was. I was just responding to feedback. I don't\nhave enough experience with the git project to have much of an opinion\neither way.\n\nAnyway, thanks for the pointers.\n\nj.\n"},{"id":"68530","messageId":"76718490802120840r4a45c016k4cccf321f68893ce@mail.gmail.com","threadId":"11975","inReplyTo":"7vve4wb3h7.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2008-02-12T16:40:14Z","receivedAt":"2008-02-12T16:40:14Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Feb 10, 2008 10:01 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> Also I wonder why the check for SECURITYSESSIONID your original\n> had is not good enough for this Mac specific customization?\n\nChristian,\n\nAny thoughts on Junio's patch vs the original?\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/73149/focus=73354\n\nj.\n"},{"id":"68602","messageId":"200802130755.20884.chriscool@tuxfamily.org","threadId":"11975","inReplyTo":"76718490802120840r4a45c016k4cccf321f68893ce@mail.gmail.com","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-13T06:55:20Z","receivedAt":"2008-02-13T06:55:20Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le mardi 12 février 2008, Jay Soffian a écrit :\n> On Feb 10, 2008 10:01 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > Also I wonder why the check for SECURITYSESSIONID your original\n> > had is not good enough for this Mac specific customization?\n>\n> Christian,\n>\n> Any thoughts on Junio's patch vs the original?\n\nI think the original was good and Junio's patch is a good improvement on top \nof yours.\n\nThanks,\nChristian.\n"},{"id":"68678","messageId":"7vk5l8o65o.fsf@gitster.siamese.dyndns.org","threadId":"11975","inReplyTo":"200802130755.20884.chriscool@tuxfamily.org","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-13T22:14:43Z","receivedAt":"2008-02-13T22:14:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> Le mardi 12 février 2008, Jay Soffian a écrit :\n>> On Feb 10, 2008 10:01 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> > Also I wonder why the check for SECURITYSESSIONID your original\n>> > had is not good enough for this Mac specific customization?\n>>\n>> Christian,\n>>\n>> Any thoughts on Junio's patch vs the original?\n>\n> I think the original was good and Junio's patch is a good improvement on top \n> of yours.\n\nI think the original that only checked SECURITYSESSIONID was\nshort, sweet and inexpensive.\n\nUnless somebody comes up with a good reason that the environment\ncheck for SECURITYSESSIONID would misidentify (my understanding\nis that it is a MacOS specific hack^Wenvironment variable and\nnobody else would have it, but I haven't found authoritative\nsource), I think the original from Jay is good and I can apply\nit to 'master'.\n\nI very much had trouble with the $(uname -s) thing which\nunconditionally penalized everybody else, and that was the\nprimary reason I suggested an alternative to make it cheaper.\n"},{"id":"68681","messageId":"CE42C4F4-1E6B-4300-9FD9-29F7E17B4F27@ai.rug.nl","threadId":"11975","inReplyTo":"7vk5l8o65o.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Pieter de Bie","fromEmail":"pdebie@ai.rug.nl","sentAt":"2008-02-13T22:46:09Z","receivedAt":"2008-02-13T22:46:09Z","isPatch":true,"sender":{"key":"pdebie@ai.rug.nl","avatar":null},"body":"On Feb 13, 2008, at 11:14 PM, Junio C Hamano wrote:\n>\n> Unless somebody comes up with a good reason that the environment\n> check for SECURITYSESSIONID would misidentify (my understanding\n> is that it is a MacOS specific hack^Wenvironment variable and\n> nobody else would have it, but I haven't found authoritative\n> source), I think the original from Jay is good and I can apply\n> it to 'master'.\n\nWhen I SSH to my mac, the SECURITYSESSIONID variable isn't set, but  \nopen will succeed in displaying the page.\n\nNot sure if that is a valid concern though; how often would you do a  \nremote login to your mac to display a webpage?\n\n- Pieter\n"},{"id":"68688","messageId":"76718490802131613h713be217s51ff85a0714df5ff@mail.gmail.com","threadId":"11975","inReplyTo":"CE42C4F4-1E6B-4300-9FD9-29F7E17B4F27@ai.rug.nl","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2008-02-14T00:13:24Z","receivedAt":"2008-02-14T00:13:24Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Feb 13, 2008 5:46 PM, Pieter de Bie <pdebie@ai.rug.nl> wrote:\n> When I SSH to my mac, the SECURITYSESSIONID variable isn't set, but\n> open will succeed in displaying the page.\n>\n> Not sure if that is a valid concern though; how often would you do a\n> remote login to your mac to display a webpage?\n\nThat is quite odd, but I've confirmed it under 10.5.2. In 10.5 I can\nssh to another Mac and /usr/bin/open a document. If I have a GUI login\nalready established on that Mac, I can see (via screen sharing) the\napplication is launched and the document handled. But here's the odd\npart -- if I *don't* have a GUI login on that Mac, the application for\nthe document is *still* launched, but I guess it's running in some\nsort of headless mode. I don't recall 10.4 operating this way.\n\nBut this is neither here nor there. AFAIK, SECURITYSESSIONID is unique\nto OS X and it reliably indicates that the user is sitting in front of\nthe OS X GUI.\n\nj.\n"},{"id":"68703","messageId":"200802140609.47119.chriscool@tuxfamily.org","threadId":"11975","inReplyTo":"76718490802131613h713be217s51ff85a0714df5ff@mail.gmail.com","subject":"Re: [PATCH] git-web--browse: improve browser support under OS X","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-14T05:09:46Z","receivedAt":"2008-02-14T05:09:46Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le jeudi 14 février 2008, Jay Soffian a écrit :\n> AFAIK, SECURITYSESSIONID is unique\n> to OS X and it reliably indicates that the user is sitting in front of\n> the OS X GUI.\n\nOk, then please add a comment saying that to your original patch before: \n\n+    if test -n \"$SECURITYSESSIONID\"; then\n+       browser_candidates=\"open $browser_candidates\"\n+    fi\n\nand then resend it with \"Acked-by: Christian Couder \n<chriscool@tuxfamily.org>\".\n\nThanks,\nChristian.\n"}]}