From: Beat Bolli <dev+git@drbeat.li>
To: Paul Mackerras <paulus@samba.org>, Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] gitk: Add a "Copy commit summary" command
Date: Sat, 18 Jul 2015 14:45:34 +0200 [thread overview]
Message-ID: <55AA4A6E.9000301@drbeat.li> (raw)
In-Reply-To: <20150718122325.GA6817@yogo.paulus.ozlabs.org>
On 18.07.15 14:23, Paul Mackerras wrote:
> On Fri, Jul 17, 2015 at 08:30:24AM -0700, Junio C Hamano wrote:
>> Paul Mackerras <paulus@samba.org> writes:
>>
>>> We have an item in the preferences menu to control the SHA1 length
>>> that is automatically selected when going to a new commit. It's
>>> stored in the variable $autosellen. That seems like it would be a
>>> reasonable choice for the SHA1 length to use here.
>>
>> Reusing a configuration that is used to control something similar
>> sounds sensible to me.
>>
>>> The only possible
>>> problem is that it defaults to 40 and so might give an overly long
>>> result for some users. Maybe you could use $autosellen but limit it
>>> to at most 12 or 16 or something like that.
>>
>> How is the thing that is "automatically selected when going to a new
>> commit" used by the end user? What is the reason why people may
>> want to configure it? I understand that this is the string that
>> goes into the selection buffer, so presumably people are using this
>> selection to paste elsewhere? If so, that sounds like very similar
>> to Beat's use case---perhaps if 40 is too long for Beat's use case
>> as a sensible default, then it is also too long for its original use
>> case?
>
> It's used for pasting into commit messages and emails, and it's used
> for pasting onto the command line when typing git commands. For the
> second, the length doesn't matter; the limit was added for the first
> case.
>
>> Or do you expect it to be common to want to use autosellen set to 40
>> and Beat's abbrev len set to much shorter, e.g. 16? If so they may
>> deserve two different settings, with different defaults.
>
> I would think that if $autosellen is 40 it's almost certainly because
> the user hasn't found that control in the preferences window. :)
>
>> Artificially limiting it to 12 or 16 does not sound all that
>> sensible, though.
>
> Adding --abbrev=$autosellen if $autosellen is not 40 sounds like it
> would do what we want.
That's exactly what I did in v4 of the patch:
http://article.gmane.org/gmane.comp.version-control.git/274161
Thanks,
Beat
prev parent reply other threads:[~2015-07-18 12:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 15:29 [PATCH v2] gitk: Add a "Copy commit summary" command Beat Bolli
2015-07-16 17:02 ` Junio C Hamano
2015-07-17 8:50 ` Stefan Haller
2015-07-17 9:16 ` Beat Bolli
2015-07-16 20:48 ` Johannes Sixt
2015-07-17 9:22 ` Paul Mackerras
2015-07-17 15:30 ` Junio C Hamano
2015-07-18 12:23 ` Paul Mackerras
2015-07-18 12:45 ` Beat Bolli [this message]
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=55AA4A6E.9000301@drbeat.li \
--to=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=paulus@samba.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).