Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:21

Jakub Narebski [off-list ref] writes:
[*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).
quoted
+our $option = $cgi->param('option');
+if (defined $option) {
+	if (not grep(/^$option$/, keys %options)) {
+		die_error(undef, "Invalid option parameter");
+	}
"!exists $options{$option}" ?
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' ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help