git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/4] upload-pack.c: allow banning certain object filter(s)

From
Taylor Blau <me@ttaylorr.com>
Date
Jul 23, 2020, 14:13 UTC
Message-ID
<20200723141306.GA86870@syl.lan>
In-Reply-To
<20200723075144.GL11341@szeder.dev>
On Thu, Jul 23, 2020 at 09:51:44AM +0200, SZEDER Gábor wrote:
Show 36 quoted lines
> On Wed, Jul 22, 2020 at 04:16:34PM -0400, Taylor Blau wrote:
> > On Wed, Jul 22, 2020 at 11:21:29AM +0200, SZEDER Gábor wrote:
> > > On Thu, Jul 02, 2020 at 04:06:32PM -0400, Taylor Blau wrote:
> > > > +static void die_if_using_banned_filter(struct upload_pack_data *data)
> > > > +{
> > > > +	struct list_objects_filter_options *banned = banned_filter(data,
> > > > +								   &data->filter_options);
> > > > +	if (!banned)
> > > > +		return;
> > > > +
> > > > +	packet_writer_error(&data->writer, _("filter '%s' not supported\n"),
> > >
> > > Should we really translate the content of the ERR packet?
> >
> > s/ERR packet/dying message after your other piece of advice, but I think
> > so. This is eventually going to make its way to users, so translating it
> > seems to make sense to me.
> >
> > I guess they would get it in the localization of the server, not the
> > client, but that doesn't sway me away from this, either.
>
> Please note that the contents of other ERR packets are not translated,
> either.
>
> $ git grep -A1 -h packet_writer_error origin/seen:upload-pack.c
> 			packet_writer_error(&data->writer,
> 					    "upload-pack: not our ref %s",
> --
> 			packet_writer_error(&data->writer,
> 					    "upload-pack: not our ref %s",
> --
> 			packet_writer_error(writer,
> 					    "upload-pack: not our ref %s",
> --
> 			packet_writer_error(writer, "unknown ref %s", arg);
> 			die("unknown ref %s", arg);

Fair enough... if there are other changes to make I'll drop the translation, otherwise this should be easy enough to apply when queuing.

Junio, if you'd rather I reroll the series again, too, that's fine as well.

Show 11 quoted lines
>
> > > > +			    list_object_filter_config_name(banned->choice));
> > > > +	die(_("git upload-pack: banned object filter requested"));
> > > > +}
> > > > +
> > > >  static void receive_needs(struct upload_pack_data *data,
> > > >  			  struct packet_reader *reader)
> > > >  {
> >
> > Thanks,
> > Taylor

Thanks, Taylor

Previous: SZEDER GáborNext: Taylor Blau
Message 17 of 25 in “upload-pack: custom allowed object filters”
  1. 0/4 upload-pack: custom allowed object filtersTaylor Blau, Jul 2, 2020
  2. 1/4 list_objects_filter_options: introduce 'list_object_filter_config_name'Taylor Blau, Jul 2, 2020
  3. 2/4 upload-pack.c: allow banning certain object filter(s)Taylor Blau, Jul 2, 2020
  4. Jeff KingJul 8, 2020
  5. Taylor BlauJul 20, 2020
  6. SZEDER GáborJul 15, 2020
  7. Jeff KingJul 15, 2020
  8. Taylor BlauJul 20, 2020
  9. Jeff KingJul 20, 2020
  10. SZEDER GáborJul 22, 2020
  11. Taylor BlauJul 22, 2020
  12. Junio C HamanoJul 23, 2020
  13. Taylor BlauJul 23, 2020
  14. SZEDER GáborJul 22, 2020
  15. Taylor BlauJul 22, 2020
  16. SZEDER GáborJul 23, 2020
  17. Taylor BlauJul 23, 2020
  18. 3/4 upload-pack.c: pass 'struct list_objects_filter_options *'Taylor Blau, Jul 2, 2020
  19. 4/4 upload-pack.c: introduce 'uploadpack.filter.tree.maxDepth'Taylor Blau, Jul 2, 2020
  20. SZEDER GáborJul 15, 2020
  21. Jeff KingJul 8, 2020
  22. Taylor BlauJul 20, 2020
  23. Junio C HamanoJul 21, 2020
  24. Taylor BlauJul 21, 2020
  25. Junio C HamanoJul 21, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.