* [PATCH 01/14] gitweb: get remotes too when getting heads list
[not found] <favitdff@sea.gmane.org>
@ 2007-08-31 8:32 ` Giuseppe Bilotta
2007-08-31 9:10 ` Giuseppe Bilotta
0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Bilotta @ 2007-08-31 8:32 UTC (permalink / raw)
To: git; +Cc: Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
gitweb/gitweb.perl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b2bae1b..65953db 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2063,7 +2063,7 @@ sub git_get_heads_list {
open my $fd, '-|', git_cmd(), 'for-each-ref',
($limit ? '--count='.($limit+1) : ()), '--sort=-committerdate',
'--format=%(objectname) %(refname) %(subject)%00%(committer)',
- 'refs/heads'
+ 'refs/heads', 'refs/remotes'
or return;
while (my $line = <$fd>) {
my %ref_item;
@@ -2073,8 +2073,9 @@ sub git_get_heads_list {
my ($hash, $name, $title) = split(' ', $refinfo, 3);
my ($committer, $epoch, $tz) =
($committerinfo =~ /^(.*) ([0-9]+) (.*)$/);
- $name =~ s!^refs/heads/!!;
+ $name =~ s!^refs/(head|remote)s/!!;
+ $ref_item{'class'} = $1;
$ref_item{'name'} = $name;
$ref_item{'id'} = $hash;
$ref_item{'title'} = $title || '(no commit message)';
--
1.5.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: gitweb and remote branches
@ 2007-08-31 2:15 Giuseppe Bilotta
2007-08-31 10:54 ` [PATCH 01/14] gitweb: get remotes too when getting heads list Giuseppe Bilotta
0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Bilotta @ 2007-08-31 2:15 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Junio C Hamano, git
On 8/31/07, Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
> On 8/31/07, Jakub Narebski <jnareb@gmail.com> wrote:
> > On Fri, 31 August 2007, Giuseppe Bilotta wrote:
> > > If I understand correctly, a detached HEAD is simply a checkout in the
> > > middle of a branch, and thus not named. So what exactly are we looking
> > > for when we talk about supporting a detached HEAD? Would it be enough
> > > to display HEAD in the list of heads?
> >
> > I think we want display HEAD in the list of heads if it is detached,
> > and also use it as a ref marker, while only marking (with undeline or
> > bold style) current head as such if HEAD is not detached, i.e. is
> > symref or symlink.
Ok, implementation at
http://oblomov.dnsalias.org/git?p=git.git;a=summary
comments welcome. You can see it in action here
http://oblomov.dnsalias.org/git?p=gittest.git;a=summary
It may not be the smartest implementation, but it's what I could cook
up with my limited git knowledge. Plus, since it's WAY past my
bedtime, I'll have to dealy publishing my gitweb-allheads at least
until tomorrow.
Have fun,
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 01/14] gitweb: get remotes too when getting heads list
2007-08-31 2:15 gitweb and remote branches Giuseppe Bilotta
@ 2007-08-31 10:54 ` Giuseppe Bilotta
0 siblings, 0 replies; 3+ messages in thread
From: Giuseppe Bilotta @ 2007-08-31 10:54 UTC (permalink / raw)
To: git; +Cc: Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
gitweb/gitweb.perl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b2bae1b..65953db 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2063,7 +2063,7 @@ sub git_get_heads_list {
open my $fd, '-|', git_cmd(), 'for-each-ref',
($limit ? '--count='.($limit+1) : ()), '--sort=-committerdate',
'--format=%(objectname) %(refname) %(subject)%00%(committer)',
- 'refs/heads'
+ 'refs/heads', 'refs/remotes'
or return;
while (my $line = <$fd>) {
my %ref_item;
@@ -2073,8 +2073,9 @@ sub git_get_heads_list {
my ($hash, $name, $title) = split(' ', $refinfo, 3);
my ($committer, $epoch, $tz) =
($committerinfo =~ /^(.*) ([0-9]+) (.*)$/);
- $name =~ s!^refs/heads/!!;
+ $name =~ s!^refs/(head|remote)s/!!;
+ $ref_item{'class'} = $1;
$ref_item{'name'} = $name;
$ref_item{'id'} = $hash;
$ref_item{'title'} = $title || '(no commit message)';
--
1.5.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-31 10:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <favitdff@sea.gmane.org>
2007-08-31 8:32 ` [PATCH 01/14] gitweb: get remotes too when getting heads list Giuseppe Bilotta
2007-08-31 9:10 ` Giuseppe Bilotta
2007-08-31 2:15 gitweb and remote branches Giuseppe Bilotta
2007-08-31 10:54 ` [PATCH 01/14] gitweb: get remotes too when getting heads list Giuseppe Bilotta
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).