Re: [PATCH] gitweb: use common parameter parsing and generation for "o", too.

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

 



On Thu, Aug 17, 2006 at 21:13, Martin Waitz wrote:
> On Thu, Aug 17, 2006 at 11:35:18AM +0200, Jakub Narebski wrote:
>>> The "o" (list order) parameter was handled special.
>>> Now it is generated with the common href() function and parsed together with
>>> all other parameters.
>>  
>> This was because "o" (sort table by) parameter was used only
>> in one place, and valid values of order parameter depends on
>> the place it is used.
> 
> But I'd really like to have all the parameter parsing and generation
> code in one place.
> 
> Perhaps we can agree that only the validation should be coupled with the
> actual user?  E.g. use normal validate_input() for it and then check
> for actual values inside git_project_list (which is already done now).

The validate_input() function has too generic name and is too widely used:
it should be split into validate_ref() and validate_path(); perhaps "o"
should be validate with $order =~ m/^[a-zA-Z]$/ 

But I was thinking about moving parameter parsing to the "action" functions
which use them, the opposite of what you want to do...

-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]