All of lore.kernel.org
 help / color / mirror / Atom feed
From: ZheNing Hu <adlternative@gmail.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com>,
	"Git mailing list" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Christian Couder" <christian.couder@gmail.com>,
	"Hariom Verma" <hariom18599@gmail.com>,
	"Bagas Sanjaya" <bagasdotme@gmail.com>,
	"Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Philip Oakley" <philipoakley@iee.email>
Subject: Re: [PATCH v3 3/5] [GSOC] ref-filter: --format=%(raw) re-support --perl
Date: Sun, 25 Jul 2021 21:18:08 +0800	[thread overview]
Message-ID: <CAOLTT8TR-nYePc65=gJ8DtbuXtOgLs+p52k80iGqLKH6rkMarQ@mail.gmail.com> (raw)
In-Reply-To: <CA+P7+xqYMt1TvDY-GO--Aw5n9L7_06e-TExszcsS5oWWtFUxsA@mail.gmail.com>

Jacob Keller <jacob.keller@gmail.com> 于2021年7月25日周日 下午4:27写道:
>
> On Sat, Jul 24, 2021 at 7:14 AM ZheNing Hu via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > From: ZheNing Hu <adlternative@gmail.com>
> >
> > Because the perl language can handle binary data correctly,
> > add the function perl_quote_buf_with_len(), which can specify
> > the length of the data and prevent the data from being truncated
> > at '\0' to help `--format="%(raw)"` re-support `--perl`.
> >
> > Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> > Signed-off-by: ZheNing Hu <adlternative@gmail.com>
> > ---
>
> I presume that we used to support raw with perl before in cat-file? It
> did read a bit weird to see "Re-support" in the title, because the
> previous patch which introduced the raw atom when in ref-filter code
> never supported perl. Still, I think it's fairly clear either way and
> that change wouldn't deserve a reroll on its own.
>

No, we haven't support it. It can be said that this commit is only split from
the previous commit. Therefore, "re-support" is indeed wrong. I will modify it.

> Makes sense. Reviewed-by: Jacob Keller <jacob.keller@gmail.com>
>
> > @@ -1010,10 +1013,14 @@ int verify_ref_format(struct ref_format *format)
> >                 at = parse_ref_filter_atom(format, sp + 2, ep, &err);
> >                 if (at < 0)
> >                         die("%s", err.buf);
> > -               if (format->quote_style && used_atom[at].atom_type == ATOM_RAW &&
> > -                   used_atom[at].u.raw_data.option == RAW_BARE)
> > +
> > +               if ((format->quote_style == QUOTE_PYTHON ||
> > +                    format->quote_style == QUOTE_SHELL ||
> > +                    format->quote_style == QUOTE_TCL) &&
> > +                    used_atom[at].atom_type == ATOM_RAW &&
> > +                    used_atom[at].u.raw_data.option == RAW_BARE)
> >                         die(_("--format=%.*s cannot be used with"
> > -                             "--python, --shell, --tcl, --perl"), (int)(ep - sp - 2), sp + 2);
> > +                             "--python, --shell, --tcl"), (int)(ep - sp - 2), sp + 2);
> >                 cp = ep + 1;
> >
>
> Right, so now we have to check all of the format quote styles instead
> of just checking that its set to any of them, since we want to
> continue in the case of perl.
>
> Ok.
>

Thanks.
--
ZheNing Hu

  reply	other threads:[~2021-07-25 13:17 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  7:39 [PATCH 0/5] [GSOC] ref-filter: add %(raw) and %(rest) atoms ZheNing Hu via GitGitGadget
2021-07-22  7:39 ` [PATCH 1/5] [GSOC] ref-filter: add obj-type check in grab contents ZheNing Hu via GitGitGadget
2021-07-22  8:51   ` Christian Couder
2021-07-22  9:15     ` ZheNing Hu
2021-07-22  7:39 ` [PATCH 2/5] [GSOC] ref-filter: add %(raw) atom ZheNing Hu via GitGitGadget
2021-07-22  8:06   ` Ævar Arnfjörð Bjarmason
2021-07-22  8:31     ` ZheNing Hu
2021-07-22  7:39 ` [PATCH 3/5] [GSOC] ref-filter: --format=%(raw) re-support --perl ZheNing Hu via GitGitGadget
2021-07-22  7:39 ` [PATCH 4/5] [GSOC] ref-filter: use non-const ref_format in *_atom_parser() ZheNing Hu via GitGitGadget
2021-07-22  7:39 ` [PATCH 5/5] [GSOC] ref-filter: add %(rest) atom ZheNing Hu via GitGitGadget
2021-07-22  8:11   ` Ævar Arnfjörð Bjarmason
2021-07-22  9:10     ` ZheNing Hu
2021-07-23  9:09   ` Jacob Keller
2021-07-23 14:11     ` ZheNing Hu
2021-07-22  8:08 ` [PATCH 0/5] [GSOC] ref-filter: add %(raw) and %(rest) atoms Christian Couder
2021-07-22  8:22   ` ZheNing Hu
2021-07-23  9:03 ` [PATCH v2 " ZheNing Hu via GitGitGadget
2021-07-23  9:03   ` [PATCH v2 1/5] [GSOC] ref-filter: add obj-type check in grab contents ZheNing Hu via GitGitGadget
2021-07-23  9:04   ` [PATCH v2 2/5] [GSOC] ref-filter: add %(raw) atom ZheNing Hu via GitGitGadget
2021-07-23 16:38     ` Junio C Hamano
2021-07-24  7:57       ` ZheNing Hu
2021-07-24 17:41         ` Junio C Hamano
2021-07-25 12:47           ` ZheNing Hu
2021-07-23  9:04   ` [PATCH v2 3/5] [GSOC] ref-filter: --format=%(raw) re-support --perl ZheNing Hu via GitGitGadget
2021-07-23  9:04   ` [PATCH v2 4/5] [GSOC] ref-filter: use non-const ref_format in *_atom_parser() ZheNing Hu via GitGitGadget
2021-07-23  9:04   ` [PATCH v2 5/5] [GSOC] ref-filter: add %(rest) atom ZheNing Hu via GitGitGadget
2021-07-24 14:14   ` [PATCH v3 0/5] [GSOC] ref-filter: add %(raw) and %(rest) atoms ZheNing Hu via GitGitGadget
2021-07-24 14:14     ` [PATCH v3 1/5] [GSOC] ref-filter: add obj-type check in grab contents ZheNing Hu via GitGitGadget
2021-07-25  8:22       ` Jacob Keller
2021-07-24 14:14     ` [PATCH v3 2/5] [GSOC] ref-filter: add %(raw) atom ZheNing Hu via GitGitGadget
2021-07-24 14:14     ` [PATCH v3 3/5] [GSOC] ref-filter: --format=%(raw) re-support --perl ZheNing Hu via GitGitGadget
2021-07-25  8:27       ` Jacob Keller
2021-07-25 13:18         ` ZheNing Hu [this message]
2021-07-24 14:14     ` [PATCH v3 4/5] [GSOC] ref-filter: use non-const ref_format in *_atom_parser() ZheNing Hu via GitGitGadget
2021-07-24 14:14     ` [PATCH v3 5/5] [GSOC] ref-filter: add %(rest) atom ZheNing Hu via GitGitGadget
2021-07-25  8:29       ` Jacob Keller
2021-07-26 17:34         ` Junio C Hamano
2021-07-26  3:26     ` [PATCH v4 0/5] [GSOC] ref-filter: add %(raw) and %(rest) atoms ZheNing Hu via GitGitGadget
2021-07-26  3:26       ` [PATCH v4 1/5] [GSOC] ref-filter: add obj-type check in grab contents ZheNing Hu via GitGitGadget
2021-07-26 19:15         ` Junio C Hamano
2021-07-27  1:41           ` ZheNing Hu
2021-07-26  3:26       ` [PATCH v4 2/5] [GSOC] ref-filter: add %(raw) atom ZheNing Hu via GitGitGadget
2021-07-26  3:26       ` [PATCH v4 3/5] [GSOC] ref-filter: --format=%(raw) support --perl ZheNing Hu via GitGitGadget
2021-07-26  3:26       ` [PATCH v4 4/5] [GSOC] ref-filter: use non-const ref_format in *_atom_parser() ZheNing Hu via GitGitGadget
2021-07-26  3:26       ` [PATCH v4 5/5] [GSOC] ref-filter: add %(rest) atom ZheNing Hu via GitGitGadget

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='CAOLTT8TR-nYePc65=gJ8DtbuXtOgLs+p52k80iGqLKH6rkMarQ@mail.gmail.com' \
    --to=adlternative@gmail.com \
    --cc=avarab@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=hariom18599@gmail.com \
    --cc=jacob.keller@gmail.com \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.email \
    --cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.