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

Re: Possible bug with `export-subst' attribute

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 27, 2010, 17:35 UTC
Message-ID
<7vzkxc7rpn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100726190448.GA32367@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 12 quoted lines
> Junio C Hamano wrote:
>
>> The ones to archive and checkout I understand, but what effect does the
>> one to commit.c::print_summary() have?
>
> Currently commit.c::print_summary() does this:
> ...
> 	if (!log_tree_commit(&rev, commit)) {
> 		...
>
> In other words, it imbues rev with a format including %h and uses that
> to print a commit summary.
Sorry, but I think I understood that part.

But the thing is, we do not seem to show non-abbreviated string there with or without your patch, because inside log_tree_diff_flush() -> show_log() callchain we use opt->diffopt.abbrev to decide what is done for that %h token:

	ctx.abbrev = opt->diffopt.abbrev;

so just like the confusing assignment in builtin/checkout.c, isn't this one in builtin/commit.c also a confusing no-op?

Perhaps I am missing something obvious?
Previous: Jonathan NiederNext: Jonathan Nieder
Message 7 of 15 in “Possible bug with `export-subst' attribute”
  1. Eli BarzilayJul 25, 2010
  2. Ilari LiusvaaraJul 25, 2010
  3. Jonathan NiederJul 25, 2010
  4. Eli BarzilayJul 25, 2010
  5. Junio C HamanoJul 26, 2010
  6. Jonathan NiederJul 26, 2010
  7. Junio C HamanoJul 27, 2010
  8. 0/3 archive: abbreviate substituted commit ids againJonathan Nieder, Jul 27, 2010
  9. 1/3 archive: abbreviate substituted commit ids againJonathan Nieder, Jul 27, 2010
  10. 2/3 checkout, commit: remove confusing assignments to rev.abbrevJonathan Nieder, Jul 27, 2010
  11. Will PalmerJul 27, 2010
  12. Jonathan NiederJul 27, 2010
  13. Will PalmerJul 28, 2010
  14. Junio C HamanoJul 28, 2010
  15. 3/3 examples/commit: use --abbrev for commit summaryJonathan Nieder, Jul 27, 2010

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.