Re: [PATCH] gitweb: Show '...' links in "summary" view only if there are more items

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

 



> Junio usually puts such comments in brackets (I don't know if it is
> always used, i.e. if it is some 'convention'), e.g.:
> 
>   Also perform the same "..." link logic to the forks list.
> 
>   [rf: Modified patch from Jakub to to apply cleanly to master]
> 
> or something like that. Just a nitpick.

No problem, I tried to find the approreati convention.

> > -	my @taglist  = git_get_tags_list(15);
> > -	my @headlist = git_get_heads_list(15);
> > +	# we need to request one more than 16 (0..15) to check if those 16 are all
> > +	my @taglist  = git_get_tags_list(16);
> > +	my @headlist = git_get_heads_list(16);
> 
> It needs to be 17, not 16, otherwise we never would get "...". By default
> we show _16_ items, from 0 to 15 inclusive, so we must get _17_ items
> to check if there are more than 16.

That was a copy error on my part.  Though looking at the code
git_get_tags_list and git_get_heads_list already adds one to the limit
value, so if you pass in 17 they will return 18 items.

Robert

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