{"thread":{"id":"52417","subject":"[PATCH 2/2] gitk: rename \"commit summary\" to \"commit reference\"","startedAt":"2019-12-09T18:35:04Z","lastAt":"2019-12-10T01:46:14Z","messageCount":4,"participants":["Beat Bolli","Denton Liu","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"387813","messageId":"20191209182534.309884-2-dev+git@drbeat.li","threadId":"52417","inReplyTo":"20191209182534.309884-1-dev+git@drbeat.li","subject":"[PATCH 2/2] gitk: rename \"commit summary\" to \"commit reference\"","fromName":"Beat Bolli","fromEmail":"dev+git@drbeat.li","sentAt":"2019-12-09T18:25:34Z","receivedAt":"2019-12-09T18:35:04Z","isPatch":true,"sender":{"key":"dev+git@drbeat.li","avatar":"https://avatars.githubusercontent.com/u/21444?v=4"},"body":"Now that the commit reference format has a canonical name, let's use this\nname in gitk's UI and implementation.\n\nSigned-off-by: Beat Bolli <dev+git@drbeat.li>\n---\nThis commit is optional IMO, but I think it makes sense to use the same\nwords for the same things.\n\n gitk-git/gitk | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex cc89fb25d2..72c7feec9a 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2640,7 +2640,7 @@ proc makewindow {} {\n \t{mc \"Diff selected -> this\" command {diffvssel 1}}\n \t{mc \"Make patch\" command mkpatch}\n \t{mc \"Create tag\" command mktag}\n-\t{mc \"Copy commit summary\" command copysummary}\n+\t{mc \"Copy commit reference\" command copyreference}\n \t{mc \"Write commit to file\" command writecommit}\n \t{mc \"Create new branch\" command mkbranch}\n \t{mc \"Cherry-pick this commit\" command cherrypick}\n@@ -9389,17 +9389,17 @@ proc mktaggo {} {\n     mktagcan\n }\n \n-proc copysummary {} {\n+proc copyreference {} {\n     global rowmenuid autosellen\n \n     set cmd [list git show -s --pretty=reference]\n     if {$autosellen < 40} {\n         lappend cmd --abbrev=$autosellen\n     }\n-    set summary [eval exec $cmd $rowmenuid]\n+    set reference [eval exec $cmd $rowmenuid]\n \n     clipboard clear\n-    clipboard append $summary\n+    clipboard append $reference\n }\n \n proc writecommit {} {\n-- \n2.23.0.13.gecf2037ff6\n\n"},{"id":"387814","messageId":"20191209182534.309884-1-dev+git@drbeat.li","threadId":"52417","inReplyTo":null,"subject":"[PATCH 1/2] gitk: use --pretty=reference to generate the commit summary","fromName":"Beat Bolli","fromEmail":"dev+git@drbeat.li","sentAt":"2019-12-09T18:25:33Z","receivedAt":"2019-12-09T18:35:43Z","isPatch":true,"sender":{"key":"dev+git@drbeat.li","avatar":"https://avatars.githubusercontent.com/u/21444?v=4"},"body":"Git learned the \"reference\" pretty format in 1f0fc1db85 (pretty:\nimplement 'reference' format, 2019-11-19). Use it also in gitk instead\nof duplicating the format string. This way, gitk always follows the\nformatting convention defined by git.\n\nSigned-off-by: Beat Bolli <dev+git@drbeat.li>\n---\nJunio, this goes on top of dl/pretty-reference, currently in pu.\n\nThanks!\n\n gitk-git/gitk | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex a14d7a16b2..cc89fb25d2 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -9392,8 +9392,7 @@ proc mktaggo {} {\n proc copysummary {} {\n     global rowmenuid autosellen\n \n-    set format \"%h (\\\"%s\\\", %ad)\"\n-    set cmd [list git show -s --pretty=format:$format --date=short]\n+    set cmd [list git show -s --pretty=reference]\n     if {$autosellen < 40} {\n         lappend cmd --abbrev=$autosellen\n     }\n-- \n2.23.0.13.gecf2037ff6\n\n"},{"id":"387823","messageId":"20191209193348.GA29379@generichostname","threadId":"52417","inReplyTo":"20191209182534.309884-1-dev+git@drbeat.li","subject":"Re: [PATCH 1/2] gitk: use --pretty=reference to generate the commit summary","fromName":"Denton Liu","fromEmail":"liu.denton@gmail.com","sentAt":"2019-12-09T19:33:48Z","receivedAt":"2019-12-09T19:33:25Z","isPatch":true,"sender":{"key":"liu.denton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9620836?v=4"},"body":"Hi Beat,\n\nOn Mon, Dec 09, 2019 at 07:25:33PM +0100, Beat Bolli wrote:\n> Git learned the \"reference\" pretty format in 1f0fc1db85 (pretty:\n> implement 'reference' format, 2019-11-19). Use it also in gitk instead\n> of duplicating the format string. This way, gitk always follows the\n> formatting convention defined by git.\n> \n> Signed-off-by: Beat Bolli <dev+git@drbeat.li>\n\nHeh, I had the exact same patch queued up and ready to be sent[1].\nHowever, I was waiting until the feature actually got merged into master\nbefore pulling the trigger on sending it out because according to\nhowto/maintain-git.txt:\n\n\t* Being in the 'next' branch is not a guarantee for a topic to\n\t  be included in the next feature release.  Being in the\n\t  'master' branch typically is.\n\nFeel free to steal parts (or all of) my commit message since I think it\ngoes into a bit more detail if you think it works better. Or if you\ndon't want to deal with the burden of fixing this patch, I'll send out\nmine at a later time (whenever 'dl/pretty-reference' gets merged to\n'master').\n\n> ---\n> Junio, this goes on top of dl/pretty-reference, currently in pu.\n\nSince this is a patch for gitk, it should be sent to Paul Mackerras, who\nis the maintanier of gitk.\n\n> \n> Thanks!\n> \n>  gitk-git/gitk | 3 +--\n\nAlso, It should be based on his subtree, i.e. the file change should say\ngitk, not gitk-git/gitk. You can find the tip of his tree by fetching\ngit://ozlabs.org/~paulus/gitk.\n\nThanks,\n\nDenton\n\n[1]: https://github.com/Denton-L/git/commit/da9321b1bd56aafd16c8dcb99d5d628b79e2244e\n\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n> \n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index a14d7a16b2..cc89fb25d2 100755\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -9392,8 +9392,7 @@ proc mktaggo {} {\n>  proc copysummary {} {\n>      global rowmenuid autosellen\n>  \n> -    set format \"%h (\\\"%s\\\", %ad)\"\n> -    set cmd [list git show -s --pretty=format:$format --date=short]\n> +    set cmd [list git show -s --pretty=reference]\n>      if {$autosellen < 40} {\n>          lappend cmd --abbrev=$autosellen\n>      }\n> -- \n> 2.23.0.13.gecf2037ff6\n> \n"},{"id":"387861","messageId":"xmqqsgltrm01.fsf@gitster-ct.c.googlers.com","threadId":"52417","inReplyTo":"20191209182534.309884-1-dev+git@drbeat.li","subject":"Re: [PATCH 1/2] gitk: use --pretty=reference to generate the commit summary","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-12-10T01:46:06Z","receivedAt":"2019-12-10T01:46:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Beat Bolli <dev+git@drbeat.li> writes:\n\n> Git learned the \"reference\" pretty format in 1f0fc1db85 (pretty:\n> implement 'reference' format, 2019-11-19). Use it also in gitk instead\n> of duplicating the format string. This way, gitk always follows the\n> formatting convention defined by git.\n>\n> Signed-off-by: Beat Bolli <dev+git@drbeat.li>\n> ---\n> Junio, this goes on top of dl/pretty-reference, currently in pu.\n\nSorry, but it will not X-< for at least two reasons.\n\n1. gitk is maintained as a separate project, so any patch to it will\n   have to come via Paul's gitk tree where it has this script the\n   patch touches at the root level of the working tree.  It will not\n   build on top of any of the topic branches I keep track of.\n\n2. In order to use \"--pretty=ref\" in gitk, of course, it must be\n   used with version of Git that has dl/pretty-reference included,\n   but gitk program is meant to be compatible with any reasonably\n   recent version of Git (to put it differently, it is not a\n   requirement to have git version X in order to use gitk version Y\n   where Y <= X), so it means that this patch has to wait for a few\n   releases after the version of Git that has the pretty-reference\n   stuff ships.\n\nI personally suspect that it no longer makes much sense to still\nrequire gitk to be usable with older version of Git these days, even\nthough I do understand that the discipline to depend only on more\nstable features that appeared in older releases probably was a good\none in earlier days.  But gitk is not my project, so until Paul\ndeclares that gitk versions will go hand-in-hand with git, 2. above\nholds.\n\nThanks.\n"}]}