{"thread":{"id":"19873","subject":"Please pull gitk master branch","startedAt":"2009-06-20T06:48:14Z","lastAt":"2009-06-22T03:42:04Z","messageCount":9,"participants":["Paul Mackerras","Sitaram Chamarty","Junio C Hamano","Nanako Shiraishi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116662","messageId":"19004.34350.109422.730109@cargo.ozlabs.ibm.com","threadId":"19873","inReplyTo":null,"subject":"Please pull gitk master branch","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2009-06-20T06:48:14Z","receivedAt":"2009-06-20T06:48:14Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Junio,\n\nPlease do a pull from my gitk repository master branch to get the\nfollowing commits:\n\nChristian Stimming (1):\n      gitk: Update German translation.\n\nDirk Suesserott (1):\n      gitk: Add option 'Simple history' to the options menu\n\nElijah Newren (1):\n      gitk: Make more options easily accessible from Edit View dialog\n\nJohannes Sixt (1):\n      gitk: Use --textconv to generate diff text\n\nMarkus Heidelberg (1):\n      gitk: Allow diff view without context lines\n\nMichele Ballabio (1):\n      gitk: Add another string to translation\n\nPat Thoyts (1):\n      gitk: Handle msysGit version during version comparisons\n\nPaul Mackerras (1):\n      gitk: Check git version before using --textconv flag\n\nThanks,\nPaul.\n"},{"id":"116702","messageId":"slrnh3ru9v.vgo.sitaramc@sitaramc.homelinux.net","threadId":"19873","inReplyTo":"19004.34350.109422.730109@cargo.ozlabs.ibm.com","subject":"[PATCH] gitk: disable checkout of remote branch","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2009-06-21T09:11:28Z","receivedAt":"2009-06-21T09:11:28Z","isPatch":true,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"At the command line, this gives you a detailed warning message, but the\nGUI currently allows it without any fuss.\n\nSince the GUI is often used by people much less familiar with git, it\nseems reasonable to make the GUI more restrictive than the command line,\nnot less.\n\nThis prevents a lot of detached HEAD commits by new users.\n\nSigned-off-by: Sitaram Chamarty <sitaramc@gmail.com>\n---\n\nPaul,\n\n[Due to a quirk in how I access this list, the \"cc\" to you\nwill come from my work address, not my public gmail address\nthat the list sees.  Sigh...]\n\nI sent this to the list some time ago, and later someone\nhelpfully suggested I should copy you.  Not wanting to send\nit to the list twice, I sent that only to you, but it\nprobably got lost.\n\nCould you please approve and include this in your repo?\nThis patch helps me a lot.\n\nNaturally, if you think it's bad, I'd appreciate hearing\ncriticism.\n\nThanks and best regards,\n\nSitaram\n\n gitk-git/gitk |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 gitk-git/gitk\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nold mode 100644\nnew mode 100755\nindex 8c66d17..411bc52\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -8770,6 +8770,9 @@ proc headmenu {x y id head} {\n     set headmenuid $id\n     set headmenuhead $head\n     set state normal\n+    if {[string match \"remotes/*\" $head]} {\n+\tset state disabled\n+    }\n     if {$head eq $mainhead} {\n \tset state disabled\n     }\n-- \n1.6.3.2\n"},{"id":"116703","messageId":"7v3a9uszzl.fsf@alter.siamese.dyndns.org","threadId":"19873","inReplyTo":"slrnh3ru9v.vgo.sitaramc@sitaramc.homelinux.net","subject":"Re: [PATCH] gitk: disable checkout of remote branch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-21T09:22:22Z","receivedAt":"2009-06-21T09:22:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sitaram Chamarty <sitaramc@gmail.com> writes:\n\n> At the command line, this gives you a detailed warning message, but the\n> GUI currently allows it without any fuss.\n>\n> Since the GUI is often used by people much less familiar with git, it\n> seems reasonable to make the GUI more restrictive than the command line,\n> not less.\n> ...\n> This patch helps me a lot.\n\nThe patch seems to disable checkout unconditionally, but it at least needs\nan \"expert mode\" switch to bypass the patch's logic, or (better yet) a\n\"training wheel\" switch for you to set in repositories of the people you\nmanage.\n\n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> old mode 100644\n> new mode 100755\n> index 8c66d17..411bc52\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n\nThe above should ideally read:\n\n> diff --git a/gitk b/gitk\n> index 8c66d17..411bc52\n> --- a/gitk\n> +++ b/gitk\n\nif the patch goes to Paulus.\n\n> @@ -8770,6 +8770,9 @@ proc headmenu {x y id head} {\n>      set headmenuid $id\n>      set headmenuhead $head\n>      set state normal\n> +    if {[string match \"remotes/*\" $head]} {\n> +\tset state disabled\n> +    }\n>      if {$head eq $mainhead} {\n>  \tset state disabled\n>      }\n> -- \n> 1.6.3.2\n"},{"id":"116707","messageId":"7vmy81sz4o.fsf@alter.siamese.dyndns.org","threadId":"19873","inReplyTo":"19004.34350.109422.730109@cargo.ozlabs.ibm.com","subject":"Re: Please pull gitk master branch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-21T09:40:55Z","receivedAt":"2009-06-21T09:40:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> Junio,\n>\n> Please do a pull from my gitk repository master branch to get the\n> following commits:\n\nThanks, pulled and pushed out.\n"},{"id":"116714","messageId":"2e24e5b90906210720h135b3386t6e7c0a8235fdae57@mail.gmail.com","threadId":"19873","inReplyTo":"7v3a9uszzl.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] gitk: disable checkout of remote branch","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2009-06-21T14:20:29Z","receivedAt":"2009-06-21T14:20:29Z","isPatch":true,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On Sun, Jun 21, 2009 at 2:52 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Sitaram Chamarty <sitaramc@gmail.com> writes:\n>\n> > At the command line, this gives you a detailed warning message, but the\n> > GUI currently allows it without any fuss.\n> >\n> > Since the GUI is often used by people much less familiar with git, it\n> > seems reasonable to make the GUI more restrictive than the command line,\n> > not less.\n> > ...\n> > This patch helps me a lot.\n>\n> The patch seems to disable checkout unconditionally, but it at least needs\n> an \"expert mode\" switch to bypass the patch's logic, or (better yet) a\n> \"training wheel\" switch for you to set in repositories of the people you\n> manage.\n\nIndeed it does disable checkout of a remote/* branch unconditionally.\n\nI'm not just thinking of people *I* teach when I say that the\n\"training wheel\" mode should be the default.\n\nI believe that when someone does this _from the GUI_, it's 100%\ncertain they intended something else.  My basis for saying so is (1)\neven from CLI, it is quite likely, which is why we have a warning, and\n(2) people who use GUI are often much less expert than people who use\nCLI.\n\nActually, what are the odds that someone is expert enough to use a\ndetached HEAD _properly_ (without shooting themselves in the foot),\nbut is _not_ expert enough to just say \"git checkout origin/master\" at\nthe CLI?  I did not think that combination is worth bothering about.\n\nYou're welcome to tell me I'm wrong and that there _are_ such people\n-- you guys are the gurus here -- but this is what I believe :-)\n\n[Of course, I could just be trying to cover up the fact that those\nwere literally the first 3 lines of Tcl I ever wrote in all my life,\nand the size and scope of gitk is well beyond my comprehension to do\nanything non-trivial :-)  I'll let you decide which it is, heh!]\n\n>\n> The above should ideally read:\n>\n> > diff --git a/gitk b/gitk\n> > index 8c66d17..411bc52\n> > --- a/gitk\n> > +++ b/gitk\n>\n> if the patch goes to Paulus.\n\nThanks -- I had not realised that subtlety.\n\nWill make that change and re-send after hearing from either of you\nabout the above.  Because if the decision is that the patch does need\nto be conditional etc., it'll take me a long while anyway :-(\n\nRegards,\n\nSitaram\n"},{"id":"116722","messageId":"20090622063405.6117@nanako3.lavabit.com","threadId":"19873","inReplyTo":"7v3a9uszzl.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] gitk: disable checkout of remote branch","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-06-21T21:34:05Z","receivedAt":"2009-06-21T21:34:05Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Junio C Hamano <gitster@pobox.com>:\n\n> Sitaram Chamarty <sitaramc@gmail.com> writes:\n>\n>> At the command line, this gives you a detailed warning message, but the\n>> GUI currently allows it without any fuss.\n>>\n>> Since the GUI is often used by people much less familiar with git, it\n>> seems reasonable to make the GUI more restrictive than the command line,\n>> not less.\n>> ...\n>> This patch helps me a lot.\n>\n> The patch seems to disable checkout unconditionally, but it at least needs\n> an \"expert mode\" switch to bypass the patch's logic, or (better yet) a\n> \"training wheel\" switch for you to set in repositories of the people you\n> manage.\n\nIt will be more helpful if it checked out a new local branch that tracks the remote branch, instead of refusing what the user asked to do. It may need a new dialog that asks to confirm (and allows the user to change) the name of the new branch.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"116729","messageId":"7vtz29p3qm.fsf@alter.siamese.dyndns.org","threadId":"19873","inReplyTo":"20090622063405.6117@nanako3.lavabit.com","subject":"Re: [PATCH] gitk: disable checkout of remote branch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-21T23:27:13Z","receivedAt":"2009-06-21T23:27:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Quoting Junio C Hamano <gitster@pobox.com>:\n>\n>> Sitaram Chamarty <sitaramc@gmail.com> writes:\n>>\n>>> At the command line, this gives you a detailed warning message, but the\n>>> GUI currently allows it without any fuss.\n>>>\n>>> Since the GUI is often used by people much less familiar with git, it\n>>> seems reasonable to make the GUI more restrictive than the command line,\n>>> not less.\n>>> ...\n>>> This patch helps me a lot.\n>>\n>> The patch seems to disable checkout unconditionally, but it at least needs\n>> an \"expert mode\" switch to bypass the patch's logic, or (better yet) a\n>> \"training wheel\" switch for you to set in repositories of the people you\n>> manage.\n>\n> It will be more helpful if it checked out a new local branch that tracks\n> the remote branch, instead of refusing what the user asked to do. It may\n> need a new dialog that asks to confirm (and allows the user to change)\n> the name of the new branch.\n\nHeh, stop, step back and think a bit.  I admit that it wasn't just you; we\nwere both blind.\n\nIf we unconditionally disable \"check out this branch\" from the context\nsensitive menu for the tip of a remote tracking branch, I do not think we\nlose anything.  If one wants to start a new local branch from there, one\ncan use the context sensitive menu for an arbitrary commit (rowmenu) and\nsay \"Create new branch\".\n\nIf we wanted users of gitk to use it to detach HEAD, the current UI is not\na good way to do so anyway --- it only allows detaching the tip of remote\ntracking branches and not an arbitrary commit.\n\n\tSide note.  I am not arguing it is a good idea.  I am only saying\n\tthat if it were a good idea, such an action should be in rowmenu\n\tthat applies to any commit, not headmenu that applies only to the\n\ttips of refs. \n\nSo I retract my earlier objection entirely.  I do not think the feature\nSitaram is disabling was meant to allow detaching HEAD at all and it can\nbe safely disabled for remote tracking branches to make the GUI experience\nsafer.\n"},{"id":"116732","messageId":"slrnh3tpb9.rhr.sitaramc@sitaramc.homelinux.net","threadId":"19873","inReplyTo":"7vtz29p3qm.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] gitk: disable checkout of remote branch","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2009-06-22T01:59:06Z","receivedAt":"2009-06-22T01:59:06Z","isPatch":true,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On 2009-06-21 23:27:13, Junio C Hamano <gitster@pobox.com> wrote:\n\n> If we wanted users of gitk to use it to detach HEAD, the current UI is not\n> a good way to do so anyway --- it only allows detaching the tip of remote\n> tracking branches and not an arbitrary commit.\n\nAaah -- excellent; wish I'd thought of it :-)  Thanks\n\n> So I retract my earlier objection entirely.  I do not think the feature\n> Sitaram is disabling was meant to allow detaching HEAD at all and it can\n> be safely disabled for remote tracking branches to make the GUI experience\n> safer.\n\nThanks.  I will resubmit to you and Paul again with the diff\nheader changed to suit his tree.\n\nRegards,\n\nSitaram\n"},{"id":"116734","messageId":"2e24e5b90906212042l3182b634y2a51efb645e4bcf@mail.gmail.com","threadId":"19873","inReplyTo":"7vtz29p3qm.fsf@alter.siamese.dyndns.org","subject":"[PATCH] gitk: disable checkout of remote branch","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2009-06-22T03:42:04Z","receivedAt":"2009-06-22T03:42:04Z","isPatch":true,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"At the command line, this gives you a detailed warning message, but the\nGUI currently allows it without any fuss.\n\nSince the GUI is often used by people much less familiar with git, it\nseems reasonable to make the GUI more restrictive than the command line,\nnot less.\n\nThis prevents a lot of detached HEAD commits by new users.\n\nSigned-off-by: Sitaram Chamarty <sitaramc@gmail.com>\n---\n\nPaul,\n\nI have amended the diff header to fit the gitk repo as opposed to the\ngit repo.  To summarise the email discussions, the feature that is\nbeing disabled gets you a detached HEAD, but if that were really the\nintent we should allow a detached HEAD from any commit, not just a\nhead commit.  Therefore this particular disablement is useful and\nmakes the GUI experience safer.\n\nPlease accept.  Thanks.\n\n gitk |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 4604c83..70b6abc 100755\n--- a/gitk\n+++ b/gitk\n@@ -8833,6 +8833,9 @@ proc headmenu {x y id head} {\n     set headmenuid $id\n     set headmenuhead $head\n     set state normal\n+    if {[string match \"remotes/*\" $head]} {\n+\tset state disabled\n+    }\n     if {$head eq $mainhead} {\n \tset state disabled\n     }\n-- \n1.6.3.2\n"}]}