git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] GitWeb + TopGit
Date: Tue, 3 Nov 2009 21:39:30 +0100	[thread overview]
Message-ID: <20091103203930.GB17748@machine.or.cz> (raw)
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:
> 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@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

      reply	other threads:[~2009-11-03 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 11:09 [PATCH] GitWeb + TopGit Bert Wesarg
2009-11-03 20:39 ` Petr Baudis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091103203930.GB17748@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).