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

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

 



Jiang Xin <worldhello.net@xxxxxxxxx> 于2022年9月8日周四 10:01写道:
>
> On Sat, Jul 23, 2022 at 2:54 PM ZheNing Hu via GitGitGadget
> <gitgitgadget@xxxxxxxxx> wrote:
>
> > diff --git a/builtin/ls-files.c b/builtin/ls-files.c
> > index e791b65e7e9..779dc18e59d 100644
> > --- a/builtin/ls-files.c
> > +++ b/builtin/ls-files.c
> > @@ -222,6 +234,73 @@ static void show_submodule(struct repository *superproject,
> >         repo_clear(&subrepo);
> >  }
> >
> > +struct show_index_data {
> > +       const char *pathname;
> > +       struct index_state *istate;
> > +       const struct cache_entry *ce;
> > +};
> > +
> > +static size_t expand_show_index(struct strbuf *sb, const char *start,
> > +                               void *context)
> > +{
> > +       struct show_index_data *data = context;
> > +       const char *end;
> > +       const char *p;
> > +       size_t len = strbuf_expand_literal_cb(sb, start, NULL);
> > +       struct stat st;
> > +
> > +       if (len)
> > +               return len;
> > +       if (*start != '(')
> > +               die(_("bad ls-files format: element '%s' "
>
> Good, the last space acts as a separator between two lines.
>
> > +                     "does not start with '('"), start);
> > +
> > +       end = strchr(start + 1, ')');
> > +       if (!end)
> > +               die(_("bad ls-files format: element '%s'"
>
> Missing the last space to seperate two lines, and this leads to wrong
> l10n message. See:
>

Thank you for pointing out the error, I will fix it quickly.

>     https://github.com/git-l10n/pot-changes/blob/pot/main/2022-08-03.diff#L70
>
> --
> Jiang Xin

Thanks,
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