git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Paul Mackerras <paulus@ozlabs.org>,
	Beat Bolli <dev+git@drbeat.li>
Subject: Re: [PATCH v2 1/2] gitk: drop quotes in copysummary format
Date: Fri, 13 Dec 2019 09:12:04 -0800	[thread overview]
Message-ID: <xmqqfthom9p7.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <75dc131f0575cbe5d885af8897cbde054f7c07cf.1576197846.git.liu.denton@gmail.com> (Denton Liu's message of "Thu, 12 Dec 2019 16:44:49 -0800")

Denton Liu <liu.denton@gmail.com> writes:

> In an earlier commit[1], git learned the 'reference' pretty format. This
> format was very similar to the format that copysummary used but it omits
> the quotes surrounding the commit's subject. Remove the quotes from the
> format in copysummary in order to match the 'reference' pretty format.
>
> It seems the consensus is that the unquoted form is used more often
> anyway[2] so this change should be acceptable.
>
> [These commits are in git.git.]
> [1]: 1f0fc1db85 (pretty: implement 'reference' format, 2019-11-19)
> [2]: fb2ffa77a6 (SubmittingPatches: remove dq from commit reference, 2019-11-19)

This change to gitk actually can easily be controversial.

The "used more often" census IIUC was done on _this_ project, and
SubmittingPatches is merely a guideline to contribute to _this_
project, but the audience of gitk that wants to use the copysummary
format is a lot wider than that.

This patch alone may not be worth sinking the time on for that
reason.

Having said that, if we teach --pretty=reference to optionally use a
custom format via a configuration variable, it would make quite a
lot of sense to do an update _like_ this patch does to gitk.  It
would probably allow the code to read from the same configuration
variable, instead of replacing a hardcoded format string with
another hardcoded format string, though.

Thanks.

> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
>  gitk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gitk b/gitk
> index abe4805ade..d07e3302de 100755
> --- a/gitk
> +++ b/gitk
> @@ -9429,7 +9429,7 @@ proc mktaggo {} {
>  proc copysummary {} {
>      global rowmenuid autosellen
>  
> -    set format "%h (\"%s\", %ad)"
> +    set format "%h (%s, %ad)"
>      set cmd [list git show -s --pretty=format:$format --date=short]
>      if {$autosellen < 40} {
>          lappend cmd --abbrev=$autosellen

  reply	other threads:[~2019-12-13 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 21:39 [PATCH] gitk: use --pretty=reference for copysummary Denton Liu
2019-12-11 21:58 ` Paul Mackerras
2019-12-11 22:05   ` Junio C Hamano
2019-12-13  0:44 ` [PATCH v2 0/2] gitk: match Git's 'reference' pretty format Denton Liu
2019-12-13  0:44   ` [PATCH v2 1/2] gitk: drop quotes in copysummary format Denton Liu
2019-12-13 17:12     ` Junio C Hamano [this message]
2019-12-15  4:19     ` Paul Mackerras
2019-12-13  0:44   ` [PATCH v2 2/2] gitk: rename "commit summary" to "commit reference" Denton Liu
2019-12-13 17:12     ` Junio C Hamano
2019-12-15  4:36     ` Paul Mackerras
2019-12-13 17:04   ` [PATCH v2 0/2] gitk: match Git's 'reference' pretty format Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfthom9p7.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=dev+git@drbeat.li \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    --cc=paulus@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).