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

Re: [PATCH v3] pretty: add %D format specifier

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 17, 2014, 04:30 UTC
Message-ID
<xmqqy4tizx51.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqegvb2yza.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
>> +test_expect_success 'clean log decoration' '
>> +	git log --no-walk --tags --pretty="%H %D" --decorate=full >actual &&
>> +	cat <<EOF >expected &&
>> +$head1 tag: refs/tags/tag2
>> +$head2 tag: refs/tags/message-one
>> +$old_head1 tag: refs/tags/message-two
>> +EOF
> ...
> Hmph.  I actually think the part that prepares the history makes
> sure that the output order of the commits is predictable by using
> test_commit and test_tick.  I see existing tests at the end (which
> is a sign that they were added more recently than the rest of the
> test script, and can indicate a careless addition) already has
> "sort", but we shouldn't have to sort.

Actually --tags may feed the tips in unspecified order and --no-walk ensures the commits will be shown in that unspecified order, so for a test that runs "log --no-walk --tags", sorting is unavoidable.

Previous: Junio C Hamano
Message 3 of 3 in “pretty: add %D format specifier”
  1. pretty: add %D format specifierHarry Jeffery, Sep 16, 2014
  2. Junio C HamanoSep 16, 2014
  3. Junio C HamanoSep 17, 2014

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.