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

Re: [PATCH 2/2] allow '%d' pretty format specifier to show decoration

From
MDMichael Dressel <michaeltilodressel@t-online.de>
Date
Aug 20, 2008, 21:05 UTC
Message-ID
<alpine.LNX.1.10.0808202305230.4170@pollux>
In-Reply-To
<7vzln7phe1.fsf@gitster.siamese.dyndns.org>
On Wed, 20 Aug 2008, Junio C Hamano wrote:
Show 7 quoted lines
> Michael Dressel <MichaelTiloDressel@t-online.de> writes:
>
>> I use it in a script to extract the log title of commits between certain
>> tags.
>
> "git shortlog"?
>

I use my script to see all the changes (by log titles) between the commit (prev) I ran the script the last time and the current commit (curr). Now there may be uninteresting tags and some commits may have more than one tag. Merges made before tag B may introduce commits (say c1) that are made before say tag A but with git log prev..curr I may get a list like this

curr (current commit) . . B (latest tag) A (previous tag) c1 (commit merged some time between A and B. . . prev (commit when script was run the last time)

Actually I use "git rev-list prev..curr" to get a list of commits between the last time I ran the script and the current head of the branch. Then I need the git log --decorate only to get _all_ the tags assigned to a given commit. Git describe does not give all the tags, as discussed earlier. The resulting list of tags assigned to a commit is later searched for the tag names I'm interested in. And then I use git log again (git log A..B ) to extract the log titles between every two successive tags, at this point I may use git shortlog.

Cheers, Michael

Previous: Junio C HamanoNext: Teemu Likonen
Message 12 of 14 in “[BUG?] git log does not decorate when custom format is used”
  1. MichaelTiloDressel@t-online.deAug 20, 2008
  2. Jeff KingAug 20, 2008
  3. 1/2 decorate: allow const objects to be decoratedJeff King, Aug 20, 2008
  4. 2/2 allow '%d' pretty format specifier to show decorationJeff King, Aug 20, 2008
  5. Junio C HamanoAug 20, 2008
  6. Johannes SchindelinAug 20, 2008
  7. Junio C HamanoAug 20, 2008
  8. Johannes SchindelinAug 20, 2008
  9. Jeff KingSep 3, 2008
  10. Michael DresselAug 20, 2008
  11. Junio C HamanoAug 20, 2008
  12. Michael DresselAug 20, 2008
  13. "log --pretty=format:" languageTeemu Likonen, Aug 21, 2008
  14. Jakub NarebskiAug 24, 2008

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.