git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] gitk: use --pretty=reference to generate the commit summary

From
Denton Liu <liu.denton@gmail.com>
Date
Dec 9, 2019, 19:33 UTC
Message-ID
<20191209193348.GA29379@generichostname>
In-Reply-To
<20191209182534.309884-1-dev+git@drbeat.li>
Hi Beat,
On Mon, Dec 09, 2019 at 07:25:33PM +0100, Beat Bolli wrote:
Show 6 quoted lines
> Git learned the "reference" pretty format in 1f0fc1db85 (pretty:
> implement 'reference' format, 2019-11-19). Use it also in gitk instead
> of duplicating the format string. This way, gitk always follows the
> formatting convention defined by git.
> 
> Signed-off-by: Beat Bolli <dev+git@drbeat.li>

Heh, I had the exact same patch queued up and ready to be sent[1]. However, I was waiting until the feature actually got merged into master before pulling the trigger on sending it out because according to howto/maintain-git.txt:

	* Being in the 'next' branch is not a guarantee for a topic to
	  be included in the next feature release.  Being in the
	  'master' branch typically is.

Feel free to steal parts (or all of) my commit message since I think it goes into a bit more detail if you think it works better. Or if you don't want to deal with the burden of fixing this patch, I'll send out mine at a later time (whenever 'dl/pretty-reference' gets merged to 'master').

> ---
> Junio, this goes on top of dl/pretty-reference, currently in pu.

Since this is a patch for gitk, it should be sent to Paul Mackerras, who is the maintanier of gitk.

> 
> Thanks!
> 
>  gitk-git/gitk | 3 +--

Also, It should be based on his subtree, i.e. the file change should say gitk, not gitk-git/gitk. You can find the tip of his tree by fetching git://ozlabs.org/~paulus/gitk.

Thanks,
Denton
[1]: https://github.com/Denton-L/git/commit/da9321b1bd56aafd16c8dcb99d5d628b79e2244e
Show 19 quoted lines
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index a14d7a16b2..cc89fb25d2 100755
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -9392,8 +9392,7 @@ proc mktaggo {} {
>  proc copysummary {} {
>      global rowmenuid autosellen
>  
> -    set format "%h (\"%s\", %ad)"
> -    set cmd [list git show -s --pretty=format:$format --date=short]
> +    set cmd [list git show -s --pretty=reference]
>      if {$autosellen < 40} {
>          lappend cmd --abbrev=$autosellen
>      }
> -- 
> 2.23.0.13.gecf2037ff6
> 
Previous: Beat BolliNext: Junio C Hamano
Message 3 of 4 in “gitk: use --pretty=reference to generate the commit summary”
  1. 1/2 gitk: use --pretty=reference to generate the commit summaryBeat Bolli, Dec 9, 2019
  2. 2/2 gitk: rename "commit summary" to "commit reference"Beat Bolli, Dec 9, 2019
  3. Denton LiuDec 9, 2019
  4. Junio C HamanoDec 10, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.