Re: [PATCH 3/3] Add "ls", which is basically ls-files with user-friendly settings
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jan 7, 2010, 18:09 UTC
- Message-ID
- <fcaeb9bf1001071009m11a7adfehdad485a4baeeb958@mail.gmail.com>
- In-Reply-To
- <7vfx6h4ww3.fsf@alter.siamese.dyndns.org>
On 1/8/10, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> 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