Re: [PATCH v4] ls-files: introduce "--format" option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip Wood <phillip.wood123@xxxxxxxxx> 于2022年6月28日周二 23:19写道:
>
> Hi ZheNing
>
> This looks good, I don't have much to add beyond the comments others
> have left.
>
> On 26/06/2022 16:29, ZheNing Hu via GitGitGadget wrote:
> > From: ZheNing Hu <adlternative@xxxxxxxxx>
> > +FIELD NAMES
> > +-----------
> > +Various values from structured fields can be used to interpolate
> > +into the resulting output. For each outputting line, the following
> > +names can be used:
> > +
> > +objectmode::
> > +     The mode of the file which is recorded in the index.
> > +objectname::
> > +     The name of the file which is recorded in the index.
> > +stage::
> > +     The stage of the file which is recorded in the index.
> > +eolinfo:index::
> > +     The <eolinfo> of the file which is recorded in the index.
> > +eolinfo:worktree::
> > +     The <eolinfo> of the file which is recorded in the working tree.
> > +eolattr::
> > +     The <eolattr> of the file which is recorded in the index.
> > +path::
> > +     The pathname of the file which is recorded in the index.
>
> I think starting with this shorter list of field names is a good idea,
> we can always add more fields later if there is a demand for %(flags) etc.
>

Agree.

> > +test_expect_success 'git ls-files --format with --debug' '
> > +     git ls-files --debug >expect &&
> > +     git ls-files --format="%(path)" --debug >actual &&
> > +     test_cmp expect actual
> > +'
>
> What's the motivation for being able to combine --format with --debug?
>

I guess it may help us get debug informations together with --format output
when we are doing some tests.

> Best Wishes
>
> Phillip

ZheNing Hu




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux