{"thread":{"id":"21692","subject":"[PATCH v3] gitk: add --no-replace-objects option","startedAt":"2009-11-20T19:40:45Z","lastAt":"2009-11-20T21:15:11Z","messageCount":5,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"128041","messageId":"20091120194046.4469.53971.chriscool@tuxfamily.org","threadId":"21692","inReplyTo":null,"subject":"[PATCH v3] gitk: add --no-replace-objects option","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-11-20T19:40:45Z","receivedAt":"2009-11-20T19:40:45Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"This option simply sets the GIT_NO_REPLACE_OBJECTS environment\nvariable, and that is enough to make gitk ignore replace refs.\n\nThe GIT_NO_REPLACE_OBJECTS is set to \"1\" instead of \"\" as it is\nsafer on some platforms, thanks to Johannes Sixt and Michael J\nGruber.\n\nReplace refs are useful to change some git objects after they\nhave started to be shared between different repositories. One\nmight want to ignore them to see the original state.\n\nTested-by: Michael J Gruber <git@drmicha.warpmail.net>\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n gitk-git/gitk |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex a0214b7..c586b93 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -128,7 +128,7 @@ proc unmerged_files {files} {\n }\n \n proc parseviewargs {n arglist} {\n-    global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs\n+    global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs env\n \n     set vdatemode($n) 0\n     set vmergeonly($n) 0\n@@ -208,6 +208,9 @@ proc parseviewargs {n arglist} {\n \t\t# git rev-parse doesn't understand --merge\n \t\tlappend revargs --gitk-symmetric-diff-marker MERGE_HEAD...HEAD\n \t    }\n+\t    \"--no-replace-objects\" {\n+\t\tset env(GIT_NO_REPLACE_OBJECTS) \"1\"\n+\t    }\n \t    \"-*\" {\n \t\t# Other flag arguments including -<n>\n \t\tif {[string is digit -strict [string range $arg 1 end]]} {\n-- \n1.6.5.1.gaf97d\n"},{"id":"128042","messageId":"7vocmxvu7c.fsf@alter.siamese.dyndns.org","threadId":"21692","inReplyTo":"20091120194046.4469.53971.chriscool@tuxfamily.org","subject":"Re: [PATCH v3] gitk: add --no-replace-objects option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-20T20:04:39Z","receivedAt":"2009-11-20T20:04:39Z","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> This option simply sets the GIT_NO_REPLACE_OBJECTS environment\n> variable, and that is enough to make gitk ignore replace refs.\n\nThis is a much less interesting implementation detail than everything else\nyou should talk about the new feature you are adding; why is it the first\nsentence of the message?\n\n> The GIT_NO_REPLACE_OBJECTS is set to \"1\" instead of \"\" as it is\n> safer on some platforms, thanks to Johannes Sixt and Michael J\n> Gruber.\n\nAnd this is even less interesting.\n\n> Replace refs are useful to change some git objects after they\n> have started to be shared between different repositories. One\n> might want to ignore them to see the original state.\n\nThis is what the reader needs to see to understand why this patch is\nworthy of consideration.  It is a minor offense that the paragraph does\nnot end with \"... original state, and --no-replace-objects option can be\nused from the command line to do so\", but this could be excused if this is\nmade the first paragraph in the message, close to the subject.\n\nI wonder if this switch deserves run-time flippability, though...\n\n> Tested-by: Michael J Gruber <git@drmicha.warpmail.net>\n> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n> ---\n>  gitk-git/gitk |    5 ++++-\n>  1 files changed, 4 insertions(+), 1 deletions(-)\n>\n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index a0214b7..c586b93 100644\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -128,7 +128,7 @@ proc unmerged_files {files} {\n>  }\n>  \n>  proc parseviewargs {n arglist} {\n> -    global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs\n> +    global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs env\n>  \n>      set vdatemode($n) 0\n>      set vmergeonly($n) 0\n> @@ -208,6 +208,9 @@ proc parseviewargs {n arglist} {\n>  \t\t# git rev-parse doesn't understand --merge\n>  \t\tlappend revargs --gitk-symmetric-diff-marker MERGE_HEAD...HEAD\n>  \t    }\n> +\t    \"--no-replace-objects\" {\n> +\t\tset env(GIT_NO_REPLACE_OBJECTS) \"1\"\n> +\t    }\n>  \t    \"-*\" {\n>  \t\t# Other flag arguments including -<n>\n>  \t\tif {[string is digit -strict [string range $arg 1 end]]} {\n> -- \n> 1.6.5.1.gaf97d\n"},{"id":"128045","messageId":"200911202142.39520.chriscool@tuxfamily.org","threadId":"21692","inReplyTo":"7vocmxvu7c.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v3] gitk: add --no-replace-objects option","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-11-20T20:42:39Z","receivedAt":"2009-11-20T20:42:39Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On vendredi 20 novembre 2009, Junio C Hamano wrote:\n> Christian Couder <chriscool@tuxfamily.org> writes:\n> > This option simply sets the GIT_NO_REPLACE_OBJECTS environment\n> > variable, and that is enough to make gitk ignore replace refs.\n>\n> This is a much less interesting implementation detail than everything\n> else you should talk about the new feature you are adding; why is it the\n> first sentence of the message?\n\nThis patch was previously the second patch in a 2 patch series so the \nprevious patch was already explaining some context. Perhaps I should have \nsent the first patch again with this one.\n\n> > The GIT_NO_REPLACE_OBJECTS is set to \"1\" instead of \"\" as it is\n> > safer on some platforms, thanks to Johannes Sixt and Michael J\n> > Gruber.\n>\n> And this is even less interesting.\n>\n> > Replace refs are useful to change some git objects after they\n> > have started to be shared between different repositories. One\n> > might want to ignore them to see the original state.\n>\n> This is what the reader needs to see to understand why this patch is\n> worthy of consideration.  It is a minor offense that the paragraph does\n> not end with \"... original state, and --no-replace-objects option can be\n> used from the command line to do so\", but this could be excused if this\n> is made the first paragraph in the message, close to the subject.\n\nOk, I will send the full series again with these changes.\n\n> I wonder if this switch deserves run-time flippability, though...\n\nThe following patch in master added run-time flippability to many commands:\n\nhttp://git.kernel.org/?p=git/git.git;a=commit;h=b0fa7ab51b29d34579d8f6bb4443dfbcb8278c7a\n\nand Michael J Gruber wrote \"we need a way to specify\n--no-replace-objects for gitk\" in this message:\n\nhttp://article.gmane.org/gmane.comp.version-control.git/132576/\n\nBest regards,\nChristian.\n"},{"id":"128049","messageId":"7v1vjsx6f5.fsf@alter.siamese.dyndns.org","threadId":"21692","inReplyTo":"200911202142.39520.chriscool@tuxfamily.org","subject":"Re: [PATCH v3] gitk: add --no-replace-objects option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-20T20:55:26Z","receivedAt":"2009-11-20T20:55:26Z","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>> I wonder if this switch deserves run-time flippability, though...\n>\n> The following patch in master added run-time flippability to many commands:\n\nWhat I meant was not that.  I was wondering if the user wants to flip from\nthe gitk GUI without restarting gitk.\n"},{"id":"128051","messageId":"200911202215.11974.chriscool@tuxfamily.org","threadId":"21692","inReplyTo":"7v1vjsx6f5.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v3] gitk: add --no-replace-objects option","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-11-20T21:15:11Z","receivedAt":"2009-11-20T21:15:11Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On vendredi 20 novembre 2009, Junio C Hamano wrote:\n> Christian Couder <chriscool@tuxfamily.org> writes:\n> >> I wonder if this switch deserves run-time flippability, though...\n> >\n> > The following patch in master added run-time flippability to many\n> > commands:\n>\n> What I meant was not that.  I was wondering if the user wants to flip\n> from the gitk GUI without restarting gitk.\n\nAh ok, yes this would be nice. But anyway I think the current patch is a \nfirst good step.\n\nThanks,\nChristian.\n"}]}