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

Re: [PATCH] GitWeb + TopGit

From
Petr Baudis <pasky@suse.cz>
Date
Nov 3, 2009, 20:39 UTC
Message-ID
<20091103203930.GB17748@machine.or.cz>
In-Reply-To
<1244027352-24055-1-git-send-email-bert.wesarg@googlemail.com>
  Hi!
On Wed, Jun 03, 2009 at 01:09:12PM +0200, Bert Wesarg wrote:
Show 9 quoted lines
> 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!
Show 20 quoted lines
> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
> 
> ---
> 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
Previous: Bert Wesarg
Message 2 of 2 in “GitWeb + TopGit”
  1. GitWeb + TopGitBert Wesarg, Jun 3, 2009
  2. Petr BaudisNov 3, 2009

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.