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

[PATCH v1 0/2] Add option to git log to choose which refs receive decoration

From
Rafael Ascensão <rafa.almas@gmail.com>
Date
Nov 4, 2017, 00:41 UTC
Message-ID
<20171104004144.5975-1-rafa.almas@gmail.com>

As suggested by Documentation/SubmittingPatches Hi, this is my first patch.\n

I basically stumbled on the same issue mentioned here: https://public-inbox.org/git/xmqqzim1pp4m.fsf@gitster.mtv.corp.google.com/

This patch implements two new command line options for `git log`: `--decorate-refs=<pattern>` and `--decorate-refs-exlcude=<pattern>`

Both options accept a glob pattern which determines what decorations commits receive.

At first I considered adding '--trim-decoration', that would filter refs based on values passed to '--branches=' '--remotes=' '--tags=' and '--exclude='.

After reading the email, I think it's better to have those two behaviours decoupled.

I also had plans to add: (Not sure if others deserve having their own command) --decorate-branches= --decorate-remotes= --decorate-tags=

But was not sure if a 'niche' function like this is worth 5+ command line options. I personally find that those two are enough.

--- Rafael Ascensão

Rafael Ascensão (2):
  refs: extract function to normalize partial refs
  log: add option to choose which refs to decorate
 Documentation/git-log.txt |  12 ++++++
 builtin/log.c             |  10 ++++-
 log-tree.c                |  37 ++++++++++++++---
 log-tree.h                |   6 ++-
 pretty.c                  |   4 +-
 refs.c                    |  34 +++++++++-------
 refs.h                    |  16 ++++++++
 revision.c                |   2 +-
 t/t4202-log.sh            | 101 ++++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 198 insertions(+), 24 deletions(-)
-- 
2.15.0
Next: Rafael Ascensão
Message 1 of 24 in “Add option to git log to choose which refs receive decoration”
  1. 0/2 Add option to git log to choose which refs receive decorationRafael Ascensão, Nov 4, 2017
  2. 1/2 refs: extract function to normalize partial refsRafael Ascensão, Nov 4, 2017
  3. Junio C HamanoNov 4, 2017
  4. Rafael AscensãoNov 4, 2017
  5. Kevin DaudtNov 4, 2017
  6. Michael HaggertyNov 5, 2017
  7. Michael HaggertyNov 5, 2017
  8. Junio C HamanoNov 6, 2017
  9. Rafael AscensãoNov 6, 2017
  10. Michael HaggertyNov 6, 2017
  11. 2/2 log: add option to choose which refs to decorateRafael Ascensão, Nov 4, 2017
  12. Junio C HamanoNov 4, 2017
  13. Rafael AscensãoNov 4, 2017
  14. Junio C HamanoNov 5, 2017
  15. Junio C HamanoNov 5, 2017
  16. Rafael AscensãoNov 6, 2017
  17. Junio C HamanoNov 6, 2017
  18. Michael HaggertyNov 6, 2017
  19. Jacob KellerNov 6, 2017
  20. Junio C HamanoNov 7, 2017
  21. Rafael AscensãoNov 10, 2017
  22. Junio C HamanoNov 10, 2017
  23. log: add option to choose which refs to decorateRafael Ascensão, Nov 21, 2017
  24. Junio C HamanoNov 22, 2017

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.