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

Re: [PATCH] gitweb: new cgi parameter: option

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2007, 18:45 UTC
Message-ID
<7vy7hltq98.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200707121211.32813.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> [*1*] At least in gitweb. If I understand correctly, you can use
> "git diff --cc tree1 tree2 tree2 ..." to get combined diff of specified
> tree-ish; I'm not sure if git-diff-tree support this. And I know that
> gitweb does not support this... at least for now. Would this be useful,
> I wonder?

I would say that would only be useful to satisfy curiosity. Luckily or unluckily I have not had real life use of that multiple tree comparison feature that is supported by "git diff" (multiple blob comparison is also available, which is mildly useful).

Show 5 quoted lines
>> +our $option = $cgi->param('option');
>> +if (defined $option) {
>> +	if (not grep(/^$option$/, keys %options)) {
>> +		die_error(undef, "Invalid option parameter");
>> +	}
"!exists $options{$option}" ?
Show 7 quoted lines
> I'd rather make it possible to pass multiple additional options, for
> example both '--remove-empty' (to speed up) and '--no-merges' for the
> history view. So I'd use
>
>   +our @options = $cgi->param('option');
>
> instead.
Good point.
> I'm also not sure if invalid option parameter for action should return
> error, or be simply ignored.
I'm mildly against "simply ignoring".
> By the way, gitweb uses shortened names for paramaters. Perhaps 'opt'
> or 'op' instead of 'options' here and in href subroutine (below)?
Or even 'o' ;-).
Previous: Miklos VajnaNext: Jakub Narebski
Message 8 of 9 in “gitweb: New cgi parameter: filter”
  1. gitweb: New cgi parameter: filterMiklos Vajna, Jul 8, 2007
  2. VMiklosJul 9, 2007
  3. Jakub NarebskiJul 11, 2007
  4. gitweb: new cgi parameter: optionMiklos Vajna, Jul 11, 2007
  5. Jakub NarebskiJul 12, 2007
  6. Johannes SchindelinJul 12, 2007
  7. gitweb: new cgi parameter: optMiklos Vajna, Jul 12, 2007
  8. Junio C HamanoJul 12, 2007
  9. Jakub NarebskiJul 13, 2007

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.