{"thread":{"id":"18622","subject":"[PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","startedAt":"2009-03-29T22:30:03Z","lastAt":"2009-03-31T23:59:24Z","messageCount":10,"participants":["Markus Heidelberg","Johannes Schindelin","Shawn O. Pearce","Giuseppe Bilotta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"109794","messageId":"200903300030.03733.markus.heidelberg@web.de","threadId":"18622","inReplyTo":null,"subject":"[PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-29T22:30:03Z","receivedAt":"2009-03-29T22:30:03Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Starting git-gui via Windows Explorer shell extension caused problems\nwhen not started from the project directory, but from a directory within\nthe project: starting the Explorer from the git-gui menu \"Explore\nWorking Copy\" didn't work then.\n\nStarting git-gui via Explorer shell extension from the .git directory\ndidn't work at all.\n\nTo make these things possible, \"cd ..\" until we see .git/\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n windows/git-gui.sh |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/windows/git-gui.sh b/windows/git-gui.sh\nindex 53c3a94..16c4a2a 100644\n--- a/windows/git-gui.sh\n+++ b/windows/git-gui.sh\n@@ -4,6 +4,9 @@ exec wish \"$0\" -- \"$@\"\n \n if { $argc >=2 && [lindex $argv 0] == \"--working-dir\" } {\n \tcd [lindex $argv 1]\n+\twhile { ![file isdirectory .git] } {\n+\t\tcd ..\n+\t}\n \tset argv [lrange $argv 2 end]\n \tincr argc -2\n }\n-- \n1.6.2.1.409.gad7bf.dirty\n"},{"id":"109801","messageId":"alpine.DEB.1.00.0903300243050.6454@intel-tinevez-2-302","threadId":"18622","inReplyTo":"200903300030.03733.markus.heidelberg@web.de","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-30T00:43:35Z","receivedAt":"2009-03-30T00:43:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 30 Mar 2009, Markus Heidelberg wrote:\n\n> Starting git-gui via Windows Explorer shell extension caused problems \n> when not started from the project directory, but from a directory within \n> the project: starting the Explorer from the git-gui menu \"Explore \n> Working Copy\" didn't work then.\n> \n> Starting git-gui via Explorer shell extension from the .git directory \n> didn't work at all.\n> \n> To make these things possible, \"cd ..\" until we see .git/\n\nHow does this interact with GIT_WORK_TREE?  And with bare repositories?\n\nCiao,\nDscho\n"},{"id":"109840","messageId":"200903300851.43164.markus.heidelberg@web.de","threadId":"18622","inReplyTo":"alpine.DEB.1.00.0903300243050.6454@intel-tinevez-2-302","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-30T06:51:42Z","receivedAt":"2009-03-30T06:51:42Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Johannes Schindelin, 30.03.2009:\n> Hi,\n> \n> On Mon, 30 Mar 2009, Markus Heidelberg wrote:\n> \n> > Starting git-gui via Windows Explorer shell extension caused problems \n> > when not started from the project directory, but from a directory within \n> > the project: starting the Explorer from the git-gui menu \"Explore \n> > Working Copy\" didn't work then.\n> > \n> > Starting git-gui via Explorer shell extension from the .git directory \n> > didn't work at all.\n> > \n> > To make these things possible, \"cd ..\" until we see .git/\n> \n> How does this interact with GIT_WORK_TREE?\n\nNot sure. What's the use case for a globally set GIT_WORK_TREE, how is\nit used?\n\n> And with bare repositories?\n\nGit-gui doesn't seem to work with bare repositories, I get\n\"Cannot use funny .git directory: .\"\nwhen started on the command line.\n\nBut I just noticed, that it will obviously \"cd ..\" forever, if no .git/\nwas found. Somehow the root directory has to be catched.\n\nMarkus\n"},{"id":"109852","messageId":"alpine.DEB.1.00.0903301001090.7534@intel-tinevez-2-302","threadId":"18622","inReplyTo":"200903300851.43164.markus.heidelberg@web.de","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-30T08:03:31Z","receivedAt":"2009-03-30T08:03:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 30 Mar 2009, Markus Heidelberg wrote:\n\n> Johannes Schindelin, 30.03.2009:\n> \n> > On Mon, 30 Mar 2009, Markus Heidelberg wrote:\n> > \n> > > Starting git-gui via Windows Explorer shell extension caused \n> > > problems when not started from the project directory, but from a \n> > > directory within the project: starting the Explorer from the git-gui \n> > > menu \"Explore Working Copy\" didn't work then.\n> > > \n> > > Starting git-gui via Explorer shell extension from the .git \n> > > directory didn't work at all.\n> > > \n> > > To make these things possible, \"cd ..\" until we see .git/\n> > \n> > How does this interact with GIT_WORK_TREE?\n> \n> Not sure. What's the use case for a globally set GIT_WORK_TREE, how is \n> it used?\n\nYou can call git gui with a non-global GIT_WORK_TREE by something like \nthis, even on Windows (which your patch does not special case, anyway):\n\n\t$ GIT_WORK_TREE=/bla/blub git gui\n\n> > And with bare repositories?\n> \n> Git-gui doesn't seem to work with bare repositories, I get\n> \"Cannot use funny .git directory: .\"\n> when started on the command line.\n\nOh?  I thought there was some discussion recently that was explicitely \nabout git gui with bare repositories.  But I have to time-share my brain \nthese days, so my memory might well show some bit flips.\n\nCiao,\nDscho\n"},{"id":"109904","messageId":"20090330141417.GV23521@spearce.org","threadId":"18622","inReplyTo":"alpine.DEB.1.00.0903301001090.7534@intel-tinevez-2-302","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-30T14:14:17Z","receivedAt":"2009-03-30T14:14:17Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Mon, 30 Mar 2009, Markus Heidelberg wrote:\n> > Johannes Schindelin, 30.03.2009:\n> > > And with bare repositories?\n> > \n> > Git-gui doesn't seem to work with bare repositories, I get\n> > \"Cannot use funny .git directory: .\"\n> > when started on the command line.\n> \n> Oh?  I thought there was some discussion recently that was explicitely \n> about git gui with bare repositories.  But I have to time-share my brain \n> these days, so my memory might well show some bit flips.\n\nAt best, you can get blame to run on a bare repository, but that's\nit.  Most of the git-gui UI is designed for viewing the status of\nthe working tree, or manipulating the index and/or files in that\nworking tree.  There are fairly good reasons why it doesn't work\non a bare repository.\n\nOf course, fetch/push would be fine a bare repository, but I consider\nthat use case to be not worth the cost it would be in code to make\nit possible.  We'd have to if out huge blocks of git-gui code,\nmaybe 80%+ of git-gui.sh, and that script is already hairy enough\n(3477 lines).\n\n-- \nShawn.\n"},{"id":"109905","messageId":"20090330141510.GW23521@spearce.org","threadId":"18622","inReplyTo":"200903300851.43164.markus.heidelberg@web.de","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-30T14:15:10Z","receivedAt":"2009-03-30T14:15:10Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> wrote:\n> \n> But I just noticed, that it will obviously \"cd ..\" forever, if no .git/\n> was found. Somehow the root directory has to be catched.\n\nYup.  I'm dropping this patch for now because of this issue, but\nI'll look at it again if its addressed in another version.  :-)\n\n-- \nShawn.\n"},{"id":"109941","messageId":"200903302220.44564.markus.heidelberg@web.de","threadId":"18622","inReplyTo":"alpine.DEB.1.00.0903301001090.7534@intel-tinevez-2-302","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-30T20:20:44Z","receivedAt":"2009-03-30T20:20:44Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nJohannes Schindelin, 30.03.2009:\n> Hi,\n> \n> On Mon, 30 Mar 2009, Markus Heidelberg wrote:\n> \n> > Johannes Schindelin, 30.03.2009:\n> > \n> > > On Mon, 30 Mar 2009, Markus Heidelberg wrote:\n> > > \n> > > > Starting git-gui via Windows Explorer shell extension caused \n> > > > problems when not started from the project directory, but from a \n> > > > directory within the project: starting the Explorer from the git-gui \n> > > > menu \"Explore Working Copy\" didn't work then.\n> > > > \n> > > > Starting git-gui via Explorer shell extension from the .git \n> > > > directory didn't work at all.\n> > > > \n> > > > To make these things possible, \"cd ..\" until we see .git/\n> > > \n> > > How does this interact with GIT_WORK_TREE?\n> > \n> > Not sure. What's the use case for a globally set GIT_WORK_TREE, how is \n> > it used?\n> \n> You can call git gui with a non-global GIT_WORK_TREE by something like \n> this, even on Windows (which your patch does not special case, anyway):\n> \n> \t$ GIT_WORK_TREE=/bla/blub git gui\n\nThe patch only affected git-gui started via Explorer, i.e. invoked with\n--working-dir. But it's right that core.worktree can be set in the\nrepository.\nHowever, git-gui currently doesn't support the gitdir outside of the\nworking directory, but it may not be wise to build up on this!?\n\nHmm, more complicated than I initially thought.\n\nMarkus\n"},{"id":"109951","messageId":"43168.7221433551$1238455980@news.gmane.org","threadId":"18622","inReplyTo":"20090330141510.GW23521@spearce.org","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-03-30T22:49:07Z","receivedAt":"2009-03-30T22:49:07Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"\nOn Monday 30 March 2009 16:15, Shawn O. Pearce wrote:\n\n> Markus Heidelberg <markus.heidelberg@web.de> wrote:\n>> \n>> But I just noticed, that it will obviously \"cd ..\" forever, if no .git/\n>> was found. Somehow the root directory has to be catched.\n> \n> Yup.  I'm dropping this patch for now because of this issue, but\n> I'll look at it again if its addressed in another version.  :-)\n\nI have a couple of pending patches to fix git gui handling of repositories,\nincluding support for nonstandard repository locations and bare repositories.\nYou can find them at\n\nhttp://git.oblomov.eu/git\n\nand specifically\n\nhttp://git.oblomov.eu/git/patches/b2e4c32e13df1b7f18e7b4a9f746650471a3122e..a63526bf3238cf25d9a5521f7ee35ed1bd11cb16\n\nI got distracted by real-life issue and forgot to resend them. I'll try\nto find the time again later on this week. I'm not entirely sure these\nsolve Markus' problem though.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"299099","messageId":"499F039601E4A981@joe.mail.tiscali.sys","threadId":"18622","inReplyTo":"20090330141510.GW23521@spearce.org","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-03-30T22:49:07Z","receivedAt":"2009-03-30T22:49:07Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Monday 30 March 2009 16:15, Shawn O. Pearce wrote:\n\n> Markus Heidelberg <markus.heidelberg@web.de> wrote:\n>> \n>> But I just noticed, that it will obviously \"cd ..\" forever, if no .git/\n>> was found. Somehow the root directory has to be catched.\n> \n> Yup.  I'm dropping this patch for now because of this issue, but\n> I'll look at it again if its addressed in another version.  :-)\n\nI have a couple of pending patches to fix git gui handling of repositories,\nincluding support for nonstandard repository locations and bare repositories.\nYou can find them at\n\nhttp://git.oblomov.eu/git\n\nand specifically\n\nhttp://git.oblomov.eu/git/patches/b2e4c32e13df1b7f18e7b4a9f746650471a3122e..a63526bf3238cf25d9a5521f7ee35ed1bd11cb16\n\nI got distracted by real-life issue and forgot to resend them. I'll try\nto find the time again later on this week. I'm not entirely sure these\nsolve Markus' problem though.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n\n"},{"id":"110084","messageId":"200904010159.24764.markus.heidelberg@web.de","threadId":"18622","inReplyTo":"499F039601E4A981@joe.mail.tiscali.sys","subject":"Re: [PATCH] git-gui: make \"Git GUI Here\" Explorer extension more robust","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-31T23:59:24Z","receivedAt":"2009-03-31T23:59:24Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nGiuseppe Bilotta, 31.03.2009:\n> On Monday 30 March 2009 16:15, Shawn O. Pearce wrote:\n> \n> > Markus Heidelberg <markus.heidelberg@web.de> wrote:\n> >> \n> >> But I just noticed, that it will obviously \"cd ..\" forever, if no .git/\n> >> was found. Somehow the root directory has to be catched.\n> > \n> > Yup.  I'm dropping this patch for now because of this issue, but\n> > I'll look at it again if its addressed in another version.  :-)\n> \n> I have a couple of pending patches to fix git gui handling of repositories,\n> including support for nonstandard repository locations and bare repositories.\n> You can find them at\n> \n> http://git.oblomov.eu/git\n> \n> and specifically\n> \n> http://git.oblomov.eu/git/patches/b2e4c32e13df1b7f18e7b4a9f746650471a3122e..a63526bf3238cf25d9a5521f7ee35ed1bd11cb16\n\nI just tried these two patches on Windows (Uhh, Qemu is too slow for\nthis, I have to setup something else).\n\n> I got distracted by real-life issue and forgot to resend them. I'll try\n> to find the time again later on this week. I'm not entirely sure these\n> solve Markus' problem though.\n\nStarting git-gui via Explorer \"Git GUI Here\" is now possible from the\n.git/ directory with your patches, but it doesn't show the working tree\nstatus. Also \"Explore Working Copy\" wants to open the .git directory\nthen instead of the project directory (I say \"want\" because of the issue\nI just sent a patch out). It seems to be as non-functional as if you run\n\"git status\" inside of .git/\n\nMarkus\n"}]}