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

[PATCH v3 0/5] Pretty formats for reflog data

From
Thomas Rast <trast@student.ethz.ch>
Date
Oct 16, 2009, 14:20 UTC
Message-ID
<cover.1255701207.git.trast@student.ethz.ch>
In-Reply-To
<20091016053230.GB10629@coredump.intra.peff.net>
Next round :-)
I only changed 3/5, as per your comments:
Jeff King wrote:
Show 6 quoted lines
> On Fri, Oct 16, 2009 at 12:41:46AM +0200, Thomas Rast wrote:
> > +- '%gD': reflog selector, e.g., `refs/stash@{1}`
> > +- '%gd': shortened reflog selector, e.g., `stash@{1}`
> > +- '%gs': reflog subject
> 
> Should we give a note that these do nothing if "-g" was not given?

I tried for some time, but all attempts at interrupting the lists ended up terminating it again, so that the %g family list would not line up with the rest of the parameters. Having the note there would be nice, but I think keeping the list together optically is more important. However, AFAICS it really is the first character that only works with certain options (%m makes little sense without A...B, but still expands to >).

Looking at it did make me notice that @{1} is invalid asciidoc and needs to be spelled @\{1\} though :-)

> A test for '%gd' would be nice. A squashable one is below. I am tempted
> to test all three forms in t6006, since the intent of that script is to
> test all format specifiers. However, those tests would be somewhat
> redundant with your t1411 tests.

I added yours and moved my tests to t6006 too, as indicated in the other mail.

I also changed the caching, as outlined earlier:
I wrote:
Show 5 quoted lines
> I had a slightly better idea today: We can just put an extra member
> into the complete_reflogs struct, i.e., a short_ref to go along with
> the ref.  It'll take a bit of auditing to verify that all allocations
> are zeroed, but since the struct is local to the file that shouldn't
> be so hard.
There's in fact only a single allocation (with xcalloc).
Thomas Rast (5):
  Refactor pretty_print_commit arguments into a struct
  reflog-walk: refactor the branch@{num} formatting
  Introduce new pretty formats %g[sdD] for reflog information
  stash list: use new %g formats instead of sed
  stash list: drop the default limit of 10 stashes
 Documentation/pretty-formats.txt |    3 +
 builtin-branch.c                 |    3 +-
 builtin-checkout.c               |    3 +-
 builtin-log.c                    |    3 +-
 builtin-merge.c                  |    7 ++-
 builtin-rev-list.c               |    7 ++-
 builtin-shortlog.c               |    9 +++-
 builtin-show-branch.c            |    4 +-
 commit.h                         |   20 ++++++---
 git-stash.sh                     |    8 +---
 log-tree.c                       |   21 +++++-----
 pretty.c                         |   44 ++++++++++++++------
 reflog-walk.c                    |   83 ++++++++++++++++++++++++++++----------
 reflog-walk.h                    |    8 ++++
 t/t6006-rev-list-format.sh       |   18 ++++++++
 15 files changed, 170 insertions(+), 71 deletions(-)
Previous: Thomas RastNext: Thomas Rast
Message 7 of 31 in “Pretty formats for reflog data”
  1. 0/5 Pretty formats for reflog dataThomas Rast, Oct 15, 2009
  2. 1/5 Refactor pretty_print_commit arguments into a structThomas Rast, Oct 15, 2009
  3. 2/5 reflog-walk: refactor the branch@{num} formattingThomas Rast, Oct 15, 2009
  4. 3/5 Introduce new pretty formats %g[sdD] for reflog informationThomas Rast, Oct 15, 2009
  5. Jeff KingOct 16, 2009
  6. Thomas RastOct 16, 2009
  7. 0/5 Pretty formats for reflog dataThomas Rast, Oct 16, 2009
  8. 1/5 Refactor pretty_print_commit arguments into a structThomas Rast, Oct 16, 2009
  9. Junio C HamanoOct 17, 2009
  10. Thomas RastOct 18, 2009
  11. Junio C HamanoOct 18, 2009
  12. 0/5 Pretty formats for reflog dataThomas Rast, Oct 19, 2009
  13. 1/5 Refactor pretty_print_commit arguments into a structThomas Rast, Oct 19, 2009
  14. 2/5 reflog-walk: refactor the branch@{num} formattingThomas Rast, Oct 19, 2009
  15. 3/5 Introduce new pretty formats %g[sdD] for reflog informationThomas Rast, Oct 19, 2009
  16. 4/5 stash list: use new %g formats instead of sedThomas Rast, Oct 19, 2009
  17. 5/5 stash list: drop the default limit of 10 stashesThomas Rast, Oct 19, 2009
  18. 2/5 reflog-walk: refactor the branch@{num} formattingThomas Rast, Oct 16, 2009
  19. 3/5 Introduce new pretty formats %g[sdD] for reflog informationThomas Rast, Oct 16, 2009
  20. 3/5 Introduce new pretty formats %g[sdD] for reflog informationThomas Rast, Oct 17, 2009
  21. Jakub NarebskiOct 17, 2009
  22. Jeff KingOct 18, 2009
  23. Nanako ShiraishiOct 18, 2009
  24. 4/5 stash list: use new %g formats instead of sedThomas Rast, Oct 16, 2009
  25. 5/5 stash list: drop the default limit of 10 stashesThomas Rast, Oct 16, 2009
  26. Junio C HamanoOct 17, 2009
  27. Jeff KingOct 17, 2009
  28. 4/5 stash list: use new %g formats instead of sedThomas Rast, Oct 15, 2009
  29. 5/5 stash list: drop the default limit of 10 stashesThomas Rast, Oct 15, 2009
  30. Jeff KingOct 16, 2009
  31. Jakub NarebskiOct 16, 2009

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.