Re: [PATCH 00/12] Support columinized output in tag/branch/ls-files/grep
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Mar 8, 2010, 14:32 UTC
- Message-ID
- <fcaeb9bf1003080632o622c8c79x85b816edcf893bc3@mail.gmail.com>
- In-Reply-To
- <4B9504C9.5000703@lsrfire.ath.cx>
On 3/8/10, René Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:
Show 9 quoted lines
> Am 07.03.2010 13:09, schrieb Nguyễn Thái Ngọc Duy: > > > This adds support to show columnized output in the mentioned commands. > > > That's a good idea. > > I'm not so sure about the interface, though. Does the task really > warrant adding a new git command?
Several reasons: - Can be reused outside of git (I was surprised Solaris did not have "column") - Easier to test - Minimum code change in modifed commands - I can play with more complicated column layout, with minimum code change in git (ok, that's the third reason).
> If a --column parameter is added, I think it should expose the full > range of options, i.e. fill columns first (ls -C style), fill rows first > (ls -x style) as well as off (ls -1 style) and auto.
Maybe an env variable would be better, so you can pass abitrary arguments to git-column. "--column=auto" should be supported, of course.
> Shouldn't the columnizer use utf8_width() instead of strlen(), like > strbuf_add_wrapped_text() in utf8.c?
Right. I missed that.
-- Duy