git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH v2 0/9] Advanced --oneline layout
Date: Sun, 23 Sep 2012 16:10:24 +0700	[thread overview]
Message-ID: <1348391433-11300-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1348287739-12128-1-git-send-email-pclouds@gmail.com>

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

-- 
1.7.12.1.406.g6ab07c4

  parent reply	other threads:[~2012-09-23  9:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22  4:22 [PATCH 0/6] Advanced --oneline layout Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 1/6] pretty: share code between format_decoration and show_decorations Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 2/6] pretty: split parsing %C into a separate function Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 3/6] pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s) Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 4/6] utf8.c: move display_mode_esc_sequence_len() for use by other functions Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 5/6] utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 6/6] pretty: support padding placeholders, %< %> and %<> Nguyễn Thái Ngọc Duy
2012-09-22  4:26 ` [PATCH 7/6] pretty: trim trailing spaces due to padding Nguyễn Thái Ngọc Duy
2012-09-23  9:10 ` Nguyễn Thái Ngọc Duy [this message]
2012-09-23  9:10   ` [PATCH 1/9] pretty: share code between format_decoration and show_decorations Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 2/9] pretty: split parsing %C into a separate function Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 3/9] pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s) Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 4/9] utf8.c: move display_mode_esc_sequence_len() for use by other functions Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 5/9] utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 6/9] pretty: two phase conversion for non utf-8 commits Nguyễn Thái Ngọc Duy
2012-09-23 13:54     ` Robin Rosenberg
2012-09-24  1:21       ` Nguyen Thai Ngoc Duy
2012-09-23  9:10   ` [PATCH 7/9] pretty: support padding placeholders, %< %> and %>< Nguyễn Thái Ngọc Duy
2012-10-24  8:25     ` Jeff King
2012-09-23  9:10   ` [PATCH 8/9] pretty: support truncating in %>, %< " Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 9/9] pretty: support %>> that steal trailing spaces Nguyễn Thái Ngọc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348391433-11300-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).