Re: [PATCH] GitWeb + TopGit

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

 



  Hi!

On Wed, Jun 03, 2009 at 01:09:12PM +0200, Bert Wesarg wrote:
> I have changed gitweb to show topgit topics. log and shortlog shows
> only the history for refs/top-bases/$topic..$topic.
> 
> You can see it in action here:
> 
> http://kgb2.thruhere.net/git/?p=bertw/topgit.git;a=summary
> 
> This patch is based on the debian package gitweb-1.6.3.1-1.  If you'r
> interested I can rebase the patch on git.git.

  I'm very sorry I never got around to replying to this patch; I'd like
to add it to repo.or.cz now, would you still be interested in improving
it a little?

  Specifically, it would be necessary to show the topics section only if
the repository actually is topgit-controlled, that is it has the
refs/top-bases/ tree. If you could add that, I'm wondering if it would
be also suitable for gitweb upstream inclusion? Anyone...?

  Your gitweb above also has an extra 'patches' link in the shortlog
view - this would indeed be much useful to actually get the patch
introduced by the topic branch, however:

  (i) It is not included in this patch?
  (ii) It doesn't seem to work, giving a 400 error.
  (iii) It would be cool if it could also be added to the links in the
topic list.

  Thanks!

> Signed-off-by: Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx>
> 
> ---
> diff --git a/gitweb.cgi b/gitweb.cgi
> index 820f073..fd9e64b 100755
> --- a/gitweb.cgi
> +++ b/gitweb.cgi
> @@ -5054,7 +5148,11 @@ sub git_log {
>  	}
>  	my $refs = git_get_references();
>  
> -	my @commitlist = parse_commits($hash, 101, (100 * $page));
> +	my $commit_hash = $hash;
> +	if (defined $hash_parent) {
> +		$commit_hash = "$hash_parent..$hash";
> +	}
> +	my @commitlist = parse_commits($commit_hash, 101, (100 * $page));
>  
>  	my $paging_nav = format_paging_nav('log', $hash, $head, $page, $#commitlist >= 100);
>  

  And this seems like overally useful gitweb addition.

-- 
				Petr "Pasky" Baudis
A lot of people have my books on their bookshelves.
That's the problem, they need to read them. -- Don Knuth
--
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]