git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] Add "ls", which is basically ls-files with  user-friendly settings
Date: Fri, 8 Jan 2010 01:09:32 +0700	[thread overview]
Message-ID: <fcaeb9bf1001071009m11a7adfehdad485a4baeeb958@mail.gmail.com> (raw)
In-Reply-To: <7vfx6h4ww3.fsf@alter.siamese.dyndns.org>

On 1/8/10, Junio C Hamano <gitster@pobox.com> wrote:
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>  > +
>  > +     if (show_colums) {
>  > +             const char *argv[] = { "column", NULL };
>  > +
>  > +             memset(&cp, 0, sizeof(cp));
>  > +             cp.in = -1;
>  > +             cp.out = dup(1);
>  > +             cp.argv = argv;
>  > +             start_command(&cp);
>  > +             close(1);
>  > +             dup2(cp.in, 1);
>  > +             close(cp.in);
>  > +     }
>
>
> I think the code for columnar output used in producing "git help -a"
>  output should be reusable (if not, should be made reusable and reused
>  here).

I saw that and even exported term_columns() but was too lazy to make
pretty_print_string_list() something reusable. Will think of it again
when I see this command is worth pushing forward.
-- 
Duy

  reply	other threads:[~2010-01-07 18:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 17:07 [PATCH 0/3] Bringing git-ls-files to porcelain level Nguyễn Thái Ngọc Duy
2010-01-07 17:07 ` [PATCH 1/3] ls-files: support --max-depth Nguyễn Thái Ngọc Duy
2010-01-07 17:07 ` [PATCH 2/3] ls-files: support -o --max-depth (more of a hack as fill_directory should support this) Nguyễn Thái Ngọc Duy
2010-01-07 18:01   ` Junio C Hamano
2010-01-07 17:07 ` [PATCH 3/3] Add "ls", which is basically ls-files with user-friendly settings Nguyễn Thái Ngọc Duy
2010-01-07 18:01   ` Junio C Hamano
2010-01-07 18:09     ` Nguyen Thai Ngoc Duy [this message]
2010-01-08 14:16       ` Nguyen Thai Ngoc Duy
2010-01-07 18:12   ` Matthieu Moy
2010-01-07 17:40 ` [PATCH 0/3] Bringing git-ls-files to porcelain level Matthieu Moy
2010-01-07 17:47   ` Nguyen Thai Ngoc Duy
2010-11-01 10:30 ` Kan-Ru Chen
2010-11-01 11:20   ` Nguyen Thai Ngoc 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

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

  git send-email \
    --in-reply-to=fcaeb9bf1001071009m11a7adfehdad485a4baeeb958@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).