Skip to content

Advanced --oneline layout

Nguyễn Thái Ngọc Duy git 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 3 repliesIn review
  2. v12 patches 10 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9pretty: share code between format_decoration and show_decorationslog-tree.c log-tree.h pretty.c +1 more+45 -450 replies
2/9pretty: split parsing %C into a separate functionpretty.c+35 -250 replies
3/9pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s)Documentation/pretty-formats.txt pretty.c+28 -10 replies
4/9utf8.c: move display_mode_esc_sequence_len() for use by other functionsutf8.c+14 -140 replies
5/9utf8.c: add utf8_strnwidth() with the ability to skip ansi sequencesutf8.c utf8.h+15 -60 replies
6/9pretty: two phase conversion for non utf-8 commitspretty.c t/t6006-rev-list-format.sh t/t6006/commit-msg.iso8859-1+29 -212 replies
7/9pretty: support padding placeholders, %< %> and %><Documentation/pretty-formats.txt pretty.c+116 -11 reply
8/9pretty: support truncating in %>, %< and %><Documentation/pretty-formats.txt pretty.c utf8.c +1 more+97 -40 replies
9/9pretty: support %>> that steal trailing spacesDocumentation/pretty-formats.txt pretty.c utf8.c +1 more+40 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/9] Advanced --oneline layout

The series is now feature complete from my usage pov. The syntax may change though. No tests yet until we agree on the syntax and semantics. Summary:

- %C(auto) turns on coloring for the next placeholder
- %C(auto,N) the same on the next N placeholders
- %<(W) makes sure the next placeholder takes W columns, left aligned
- %>(W) like %< but right aligned
- %><(W) like %< but centered
- %>|(W), %<|(W), %><|(W) are similar, except that W is calculated to reach the Nth column on screen. (We might want %>|< instead of %><|)
- %>>(W) like %>(W) but it will try to steal trailing spaces if the placeholder uses more than "W" columns. Very useful in "%<%>" combination where the last placeholder may leave a lot of spaces unused
- All the above may take trunc, ltrunc, mtrunc optios in the bracket to truncate the result string if exceeds the given width. It truncates on the right, left and middle respectively.
- No support for $COLUMNS. If you want to fit your screen, bash's $(()) syntax is your friend to calculate columns.
- We might want to support %<direction>(W,N), e.g. %<(40,3), where the next N placeholders are grouped and aligned together as a single placeholder.

Show off time:

6ab07c4 pretty: support %>> that steal trailing spaces (HEAD, lanh/prettier) Nguyễn..gọc Duy

ee1c10e pretty: support truncating in %>, %< and %><                             Nguyễn..gọc Duy
77aefae pretty: support padding placeholders, %< %> and %><                      Nguyễn..gọc Duy
8f81f6b pretty: two phase conversion for non utf-8 commits                       Nguyễn..gọc Duy
c3f1243 utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences     Nguyễn..gọc Duy
1a4e9bb utf8.c: move display_mode_esc_sequence_len() for use by other functions  Nguyễn..gọc Duy
99aa0c2 pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s)  Nguyễn..gọc Duy
1feaab6 pretty: split parsing %C into a separate function                        Nguyễn..gọc Duy
b2676ac pretty: share code between format_decoration and show_decorations        Nguyễn..gọc Duy
6bdccbe graph: avoid infinite loop in graph_show_commit()                        Nguyễn..gọc Duy

16eed7c Merge branch 'mh/fetch-filter-refs' (origin/master) Junio C Hamano

Produced with "%C(auto,99)%h %<|(80,trunc)%s%>>|(80)%d%>(15,mtrunc)% an"

Nguyễn Thái Ngọc Duy (9):
pretty: share code between format_decoration and show_decorations
pretty: split parsing %C into a separate function
pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s) utf8.c: move display_mode_esc_sequence_len() for use by other functions utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences
pretty: two phase conversion for non utf-8 commits
pretty: support padding placeholders, %< %> and %><
pretty: support truncating in %>, %< and %><
pretty: support %>> that steal trailing spaces

 Documentation/pretty-formats.txt |   7 +
 log-tree.c                       |  60 ++++---
 log-tree.h                       |   3 +
 pretty.c                         | 327 ++++++++++++++++++++++++++++++++-------
 t/t4207-log-decoration-colors.sh |   8 +-
 t/t6006-rev-list-format.sh       |  16 +-
 t/t6006/commit-msg.iso8859-1     |   5 +
 utf8.c                           |  94 ++++++++---
 utf8.h                           |   4 +
 9 files changed, 412 insertions(+), 112 deletions(-)
 create mode 100644 t/t6006/commit-msg.iso8859-1
Signature · 1 line
1.7.12.1.406.g6ab07c4