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

Re: [PATCH v2] gitk: Add a "Copy commit summary" command

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 17, 2015, 15:30 UTC
Message-ID
<xmqqvbdi3ipb.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150717092251.GB5916@iris.ozlabs.ibm.com>
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?

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.

Artificially limiting it to 12 or 16 does not sound all that sensible, though.

Thanks.
Previous: Paul MackerrasNext: Paul Mackerras
Message 7 of 9 in “gitk: Add a "Copy commit summary" command”
  1. gitk: Add a "Copy commit summary" commandBeat Bolli, Jul 16, 2015
  2. Junio C HamanoJul 16, 2015
  3. Stefan HallerJul 17, 2015
  4. Beat BolliJul 17, 2015
  5. Johannes SixtJul 16, 2015
  6. Paul MackerrasJul 17, 2015
  7. Junio C HamanoJul 17, 2015
  8. Paul MackerrasJul 18, 2015
  9. Beat BolliJul 18, 2015

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.