Re: gitweb: local configuration not found

2018-12-06 Thread Martin Mareš
Hello!

> Yeah, it does look indirect.  Despite what you said, it also would
> support users giving an absolute path via GITWEB_CONFIG.
> 
> With "use File::Spec", perhaps something like this?

Yes, this looks right.

Martin


Re: gitweb: local configuration not found

2018-12-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason  writes:

>> Documentation says "If you are absolutely certain that you want your
>> script to load and execute a file from the current directory, then use
>> a ./ prefix".  We can do that, like so:
>>
>> diff --git i/gitweb/Makefile w/gitweb/Makefile
>> index cd194d057f..3160b6cc5d 100644
>> --- i/gitweb/Makefile
>> +++ w/gitweb/Makefile
>> @@ -18,7 +18,7 @@ RM ?= rm -f
>>  INSTALL ?= install
>>
>>  # default configuration for gitweb
>> -GITWEB_CONFIG = gitweb_config.perl
>> +GITWEB_CONFIG = ./gitweb_config.perl
>>  GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf
>>  GITWEB_CONFIG_COMMON = /etc/gitweb-common.conf
>>  GITWEB_HOME_LINK_STR = projects
>>
>> but that does not help if someone overrides GITWEB_CONFIG, and besides,
>> it would be nicer to avoid the possibility of an @INC search altogether.
>> ...
> Just:
>
> local @INC = '.';
> do 'FILE.pl';
>
> Would do the same thing, but seems like a more indirect way to do it if
> all we want is ./ anyway.

Yeah, it does look indirect.  Despite what you said, it also would
support users giving an absolute path via GITWEB_CONFIG.

With "use File::Spec", perhaps something like this?

 gitweb/gitweb.perl | 4 
 1 file changed, 4 insertions(+)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2594a4badb..239e7cbc25 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -719,6 +719,10 @@ sub filter_and_validate_refs {
 sub read_config_file {
my $filename = shift;
return unless defined $filename;
+
+   $filename = File::Spec->catfile(".", $filename)
+   unless File::Spec->file_name_is_absolute($filename);
+
# die if there are errors parsing config file
if (-e $filename) {
do $filename;


Re: gitweb: local configuration not found

2018-12-05 Thread Ævar Arnfjörð Bjarmason


On Wed, Dec 05 2018, Jonathan Nieder wrote:

> Martin Mares wrote[1]:
>
>> After upgrade to Stretch, gitweb no longer finds the configuration file
>> "gitweb_config.perl" in the current directory. However, "man gitweb" still
>> mentions this as one of the possible locations of the config file (and
>> indeed a useful one when using multiple instances of gitweb).
>>
>> It was probably broken by Perl dropping "." from the default search path
>> for security reasons.
>
> Indeed, perldelta(1) tells me that in 5.24.1 (and 5.26, etc),
>
>   Core modules and tools no longer search "." for optional modules
>
> gitweb.perl contains
>
>  sub read_config_file {
>  my $filename = shift;
>  return unless defined $filename;
>  # die if there are errors parsing config file
>  if (-e $filename) {
>  do $filename;
>
> which implies an @INC search but it is silly --- as the "-e" test
> illustrates, this never intended to search @INC.
>
> Documentation says "If you are absolutely certain that you want your
> script to load and execute a file from the current directory, then use
> a ./ prefix".  We can do that, like so:
>
> diff --git i/gitweb/Makefile w/gitweb/Makefile
> index cd194d057f..3160b6cc5d 100644
> --- i/gitweb/Makefile
> +++ w/gitweb/Makefile
> @@ -18,7 +18,7 @@ RM ?= rm -f
>  INSTALL ?= install
>
>  # default configuration for gitweb
> -GITWEB_CONFIG = gitweb_config.perl
> +GITWEB_CONFIG = ./gitweb_config.perl
>  GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf
>  GITWEB_CONFIG_COMMON = /etc/gitweb-common.conf
>  GITWEB_HOME_LINK_STR = projects
>
> but that does not help if someone overrides GITWEB_CONFIG, and besides,
> it would be nicer to avoid the possibility of an @INC search altogether.
> Another alternative would be to use
>
>   local @INC = ('.');
>
> Would that be better?
>
> Advice from someone more versed than I am in perl would be very welcome
> (hence the cc to Ævar).

It seems most sensible to follow the ./FILE.pl advice per
https://metacpan.org/pod/distribution/perl/pod/perl5260delta.pod#Removal-of-the-current-directory-(%22.%22)-from-@INC

Just:

local @INC = '.';
do 'FILE.pl';

Would do the same thing, but seems like a more indirect way to do it if
all we want is ./ anyway. FWIW to be pedantically bug-compatible with
the old version (we should not do this) it's:

local @INC = (@INC, ".");
do 'FILE.pl';

I.e. before our behavior was implicitly to check whether we had a local
FILE.pl, then loop through all of @INC to see if we found it there, and
finally come back to the file we did the -e check for.


Re: gitweb: HTML output is not always encoded in UTF-8 when using --fastcgi.

2018-09-08 Thread Julien Moutinho
Le sam. 08 sept. 2018 à 19:15:32 +0200, Julien Moutinho a écrit :
> As a quick workaround this hotpatch can even be put in $GITWEB_CONFIG
> by removing the `local` before `*FCGI::Stream::PRINT`.

Turns out to require more care than that,
due to $per_request_config reloading $GITWEB_CONFIG at each request,
overwriting FCGI::Stream::PRINT multiple times, messing the encoding.
This seems to work(around):
| if ($first_request) {
| my $enc = Encode::find_encoding('UTF-8');
| my $org = \&FCGI::Stream::PRINT;
| no warnings 'redefine';
| *FCGI::Stream::PRINT = sub {
| my @OUTPUT = @_;
| for (my $i = 1; $i < @_; $i++) {
| $OUTPUT[$i] = $enc->encode($_[$i], 
Encode::FB_CROAK|Encode::LEAVE_SRC);
| }
| @_ = @OUTPUT;
| goto $org;
| };
| }


Re: gitweb and Levenshtein

2018-07-14 Thread Johannes Schindelin
Hi David,

On Thu, 12 Jul 2018, David Brown wrote:

> Howdy, I want to hack the getweb_make_index.perl script to create a string
> search using: https://github.com/git/git/blob/master/levenshtein.c.
> 
> How do i reference the compiled code?
> 
> I would like to call this routine using Java and maybe Perl.

The code to compute the Levenshtein distance is not exposed in Git's
command-line interface. Therefore, there is currently no way to call it
directly from Java or Perl.

The best you could do for now is to convert the code to Java or Perl.

Ciao,
Johannes


Re: gitweb html validation

2016-11-18 Thread Ralf Thielow
2016-11-15 19:26 GMT+01:00 Ralf Thielow :

Finally I've found the time to actually try this out and there
are some problems with it.

>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 7cf68f07b..33d7c154f 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -5531,8 +5531,8 @@ sub git_project_search_form {
> $limit = " in '$project_filter/'";
> }
>
> -   print "\n";
> print $cgi->start_form(-method => 'get', -action => $my_uri) .
> + "\n" .
>   $cgi->hidden(-name => 'a', -value => 'project_list')  . "\n";
> print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
> if (defined $project_filter);
> @@ -5544,11 +5544,11 @@ sub git_project_search_form {
>  -checked => $search_use_regexp) .
>   "\n" .
>   $cgi->submit(-name => 'btnS', -value => 'Search') .
> - $cgi->end_form() . "\n" .
>   $cgi->a({-href => href(project => undef, searchtext => undef,
>  project_filter => $project_filter)},
>   esc_html("List all projects$limit")) . "\n";
> -   print "\n";
> +   print "\n" .
> + $cgi->end_form() . "\n";
>  }
>

The anchor is now inside the form-tag, which means there is no
visual line-break anymore that comes automatically after 
as the form-tag is a block level element.  Could be solved by adding a
"", which is not very nice, but OK.

>  # entry for given @keys needs filling if at least one of keys in list
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index 321260103..507740b6a 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -539,7 +539,7 @@ div.projsearch {
> margin: 20px 0px;
>  }
>
> -div.projsearch form {
> +form div.projsearch {
> margin-bottom: 2px;
>  }
>

This is wrong as it overwrites the setting above, 20px at the bottom
went to 2px.

The problem is how to apply the 2px now. Before this, we had the
, a block element, which we can give the 2px margin at the
bottom.  Now this element is gone and we have a set of inline
elements where we use "" to emulate the line break.  There
are two css rules which can solve this, but I'm not really happy with
both of them.
1) As we know we need the two pixel below an input element, we
can say
div.projsearch input {
  margin-bottom: 2px;
}
2) Make the a-Tag inside div.projsearch being displayed as a block
element to make a margin-top setting working.  This has the benefit
that we don't care about the element above.
div.projsearch a {
display: inline-block;
margin-top: 2px;
}
If I have to choose I'd prefer the second one.

So I can't think of a way to solve this nicely with this change.


Re: gitweb html validation

2016-11-16 Thread Raphaël Gertz

Le 16.11.2016 01:05, Junio C Hamano a écrit :

Ralf Thielow  writes:


Only block level elements are
allowed to be inside form tags, according to
https://www.w3.org/2010/04/xhtml10-strict.html#elem_form
...
I think it's better to just move the -Tag outside of the
surrounding div?
Something like this perhaps, I didn't test it myself yet.


That sounds like a sensible update to me (no, I do not run gitweb
myself).  Is this the only  we have in the UI, or is it the
only one that is problematic?


There is an other form in the cgi line 4110 :
print $cgi->start_form(-method => "get", -action => $action) .
  "\n" .

But this one has a  inside.

The problem with projsearch I want to change is that the div is around 
the form without a container inside.


I agree with moving the  inside the form if it's 
a better option.


Best regards


Re: gitweb html validation

2016-11-15 Thread Junio C Hamano
Ralf Thielow  writes:

> Only block level elements are
> allowed to be inside form tags, according to
> https://www.w3.org/2010/04/xhtml10-strict.html#elem_form
> ...
> I think it's better to just move the -Tag outside of the
> surrounding div?
> Something like this perhaps, I didn't test it myself yet.

That sounds like a sensible update to me (no, I do not run gitweb
myself).  Is this the only  we have in the UI, or is it the
only one that is problematic?

> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 7cf68f07b..33d7c154f 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -5531,8 +5531,8 @@ sub git_project_search_form {
>   $limit = " in '$project_filter/'";
>   }
>  
> - print "\n";
>   print $cgi->start_form(-method => 'get', -action => $my_uri) .
> +   "\n" .
> $cgi->hidden(-name => 'a', -value => 'project_list')  . "\n";
>   print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
>   if (defined $project_filter);
> @@ -5544,11 +5544,11 @@ sub git_project_search_form {
>-checked => $search_use_regexp) .
> "\n" .
> $cgi->submit(-name => 'btnS', -value => 'Search') .
> -   $cgi->end_form() . "\n" .
> $cgi->a({-href => href(project => undef, searchtext => undef,
>project_filter => $project_filter)},
> esc_html("List all projects$limit")) . "\n";
> - print "\n";
> + print "\n" .
> +   $cgi->end_form() . "\n";
>  }
>  
>  # entry for given @keys needs filling if at least one of keys in list
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index 321260103..507740b6a 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -539,7 +539,7 @@ div.projsearch {
>   margin: 20px 0px;
>  }
>  
> -div.projsearch form {
> +form div.projsearch {
>   margin-bottom: 2px;
>  }
>  


Re: gitweb html validation

2016-11-15 Thread Ralf Thielow
Raphaël Gertz  wrote:
> Hi,
> 
> There a small bug in gitweb html validation, you need the following patch to
> pass w3c check with searchbox enabled.
> 
> The problem lies in the input directly embed inside a form without a wrapper
> which is not valid.
>

I agree this is a small bug. Only block level elements are
allowed to be inside form tags, according to
https://www.w3.org/2010/04/xhtml10-strict.html#elem_form

> Best regards
> 
> The following patch fix the issue for git-2.10.2 :
> --- /usr/share/gitweb/gitweb.cgi.orig   2016-11-15 15:37:21.149805026 +0100
> +++ /usr/share/gitweb/gitweb.cgi2016-11-15 15:37:48.579240429 +0100
> @@ -5518,6 +5518,7 @@ sub git_project_search_form {
> 
> print "\n";
> print $cgi->start_form(-method => 'get', -action => $my_uri) .
> + ''.
>   $cgi->hidden(-name => 'a', -value => 'project_list')  . "\n";
> print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
> if (defined $project_filter);
> @@ -5529,6 +5530,7 @@ sub git_project_search_form {
>  -checked => $search_use_regexp) .
>   "\n" .
>   $cgi->submit(-name => 'btnS', -value => 'Search') .
> + ''.
>   $cgi->end_form() . "\n" .
>   $cgi->a({-href => href(project => undef, searchtext => undef,
>  project_filter => $project_filter)},

I think it's better to just move the -Tag outside of the
surrounding div?
Something like this perhaps, I didn't test it myself yet.

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7cf68f07b..33d7c154f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5531,8 +5531,8 @@ sub git_project_search_form {
$limit = " in '$project_filter/'";
}
 
-   print "\n";
print $cgi->start_form(-method => 'get', -action => $my_uri) .
+ "\n" .
  $cgi->hidden(-name => 'a', -value => 'project_list')  . "\n";
print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
if (defined $project_filter);
@@ -5544,11 +5544,11 @@ sub git_project_search_form {
 -checked => $search_use_regexp) .
  "\n" .
  $cgi->submit(-name => 'btnS', -value => 'Search') .
- $cgi->end_form() . "\n" .
  $cgi->a({-href => href(project => undef, searchtext => undef,
 project_filter => $project_filter)},
  esc_html("List all projects$limit")) . "\n";
-   print "\n";
+   print "\n" .
+ $cgi->end_form() . "\n";
 }
 
 # entry for given @keys needs filling if at least one of keys in list
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index 321260103..507740b6a 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -539,7 +539,7 @@ div.projsearch {
margin: 20px 0px;
 }
 
-div.projsearch form {
+form div.projsearch {
margin-bottom: 2px;
 }
 



Re: Gitweb: Persistant download URLs for snapshots?

2016-05-31 Thread Timo Sigurdsson
Hi again,

Timo Sigurdsson schrieb am 30.05.2016 16:12:

> Hi,
> 
> I hope this is the right place to ask this, but I wanted to know whether it is
> possible to have a persistant URL to obtain a snapshot of the latest master of
> a repository through Gitweb.
> 
> I set up a gitweb instance and it works nicely. I can click on the snapshot
> link to get a tgz archive of a specific commit hash to quickly receive or
> distribute files of a repository exposed by Gitweb. However, I have two
> problems with these links:
> 
> 1) The link seems to depend on a commit hash. I haven't found a shorter or
> persitant link that would e.g. always give me the latest master snapshot.
> 
> 2) Another issue which is actually more problematic: The links only seem to
> work interactively in my desktop browser. If I right click the link 
> "snapshot",
> copy the URL and then try to download that link from another (headless) 
> machine
> using wget, I end up getting a html file instead of a tgz archive.
> 
> Is it possible to generate such links that conssitantly work for the latest
> commit of a repository and that work non-interactively from a command line? Am
> I doing something wrong (well aside fromt he possibility that I'm trying to 
> use
> gitweb for something which it might not have been designed for...)?
> 
> Thank you!
> 
> Kind regards,
> 
> Timo

so, in the meantime I found the answers to my questions and therefore I'm 
stating my findings here as a reference for anyone who might stumble over a 
similar question in the future:

Regarging 1)
It's possible to use other identifiers than commit hashes in URLs. If you open 
a projects summary view and then click on 'tree' in the navigation bar, you 
will get a snapshot link in the navigation bar that points to an URL like this:
https://myserver.url/gitweb/?p=myproject.git;a=snapshot;h=HEAD;sf=tgz
Another example that works:
https://myserver.url/gitweb/?p=myproject.git;a=snapshot;h=refs/heads/master;sf=tgz

Regarding 2)
Well the second issue was just stupid. I forgot to properly quote the URL on 
the command line. If you actually do that, you can download the archive with 
wget just fine (or probably any other tool you may like).


Sorry for the noise,

Timo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb patch, no response

2013-09-03 Thread Junio C Hamano
Christopher Durkin  writes:

> I submitted a small feature addition patch for gitweb (see
> http://article.gmane.org/gmane.comp.version-control.git/232327/match=gitweb)
> a couple of weeks ago.
>
> I didn't get any responses, good or bad. Was there something wrong
> with my submission in terms of formatting? Something else that I
> missed? Any suggestions are greatly appreciated.

It either fell through cracks, as this is a high traffic list, or
nobody was interested in seeing the new feature.

Thanks for a pointer; I'll take a look at it soonish.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb on Godaddy

2013-07-03 Thread Fredrik Gustafsson
On Thu, Jul 04, 2013 at 11:56:40AM +0530, RR wrote:
> HI
> 
> Can someone share procedure to setup gitweb on a Godaddy hosting
> server ? Any pointers to tutorials would be helpful
> 

Hi,
I suggest that you contact godaddy and check with them what options you
have. Gitweb is a cgi program and you need support to run
cgi-applicatios from godaddy. You would also have to host your git
repository on the same server (or at least you should).

If that's not a possibility you might need to use a static html creator
like http://hssl.cs.jhu.edu/~neal/git2html/ .

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iv...@iveqy.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb commitdiff page - binary files with ampersands in filename?

2013-04-15 Thread Jakub Narębski
Oj W wrote:

> Change a binary file whose filename contains an ampersand, then view
> the commitdiff page in gitweb.
> 
> Git outputs a message like "Binary files a/b&w.dll and b/b&w.dll differ"
> 
> Gitweb format_diff_from_to_header() doesn't notice anything in that
> output which needs escaping, and writes it directly to the XHTML 1.0
> Strict output.
> 
> Then gitweb's output is invalid XML, meaning that browsers such as
> Firefox will refuse to display the page.

This was because in case of binary files we don't get usual diff,
just "Binary files a/foo and b/foo differ" just after extended git diff 
headers.

There are two problems with gitweb code.  First is that git_patchset_body()
didn't recognize and handle this situation.  This should be fixed by the
patch below (I have trouble testing it as git-instaweb keeps using old
gitweb version for some reason).

Second is that format_diff_from_to_header() doesn't handle unrecognized
extended git diff headers well - it doesn't HTML escape them.  This is to
be fixed.

-- >8 --
---
 gitweb/gitweb.perl |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1309196..33a0de1 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5345,7 +5345,8 @@ sub git_patchset_body {
while ($patch_line = <$fd>) {
chomp $patch_line;
 
-   last EXTENDED_HEADER if ($patch_line =~ m/^--- |^diff 
/);
+   last EXTENDED_HEADER
+   if ($patch_line =~ m/^--- |^diff |^Binary files 
.* differ$/);
 
print format_extended_diff_header_line($patch_line, 
$diffinfo,
   \%from, \%to);
@@ -5357,7 +5358,12 @@ sub git_patchset_body {
print "\n"; # class="patch"
last PATCH;
}
-   next PATCH if ($patch_line =~ m/^diff /);
+   if ($patch_line =~ m/^Binary files .* differ$/) {
+   print "" .
+ esc_html($patch_line, -nbsp => 1) .
+ "\n";
+   }
+   next PATCH if ($patch_line =~ m/^diff |^Binary files .* 
differ$/);
#assert($patch_line =~ m/^---/) if DEBUG;
 
my $last_patch_line = $patch_line;
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [gitweb] Removed reference to git.kernel.org

2013-03-07 Thread Junio C Hamano
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb

2012-10-29 Thread Jeff King
On Mon, Oct 29, 2012 at 08:12:46AM +0100, Jakub Narębski wrote:

> > Jakub, can you confirm the intent and a fix like the one above makes
> > things better?
> 
> Yes, either of those makes things better.

Thanks.

> >   (unless highlight does this extension 
> > mapping
> > itself, but then why are we doing it here?).
> 
> Highlight does extension mapping itself... but for that it needs file name,
> and not to be feed file contents from pipe.

Ah, that makes sense.

Richard, do you want to roll a patch that fixes it?

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb

2012-10-29 Thread Jakub Narębski
On Mon, Oct 29, 2012 at 6:28 AM, Jeff King  wrote:
> On Sun, Oct 28, 2012 at 04:56:47PM -0700, rh wrote:
>
>> I'm not using gitweb I was thinking about using it and was looking at the
>> cgi and saw this in this file:
>> https://github.com/git/git/blob/master/gitweb/gitweb.perl
>>
>> I think I understand the intention but the outcome is wrong.
>>
>> our %highlight_ext = (
>>   # main extensions, defining name of syntax;
>>   # see files in /usr/share/highlight/langDefs/ directory
>>   map { $_ => $_ }
>>   qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl 
>> sql make),
>>   # alternate extensions, see /etc/highlight/filetypes.conf
>>   'h' => 'c',
[...]
> Yeah, this is wrong. The first map will eat the rest of the list, and
> you will get "h => h", "cxx => cxx", and so forth. I do not know this
> chunk of code, but that does not seem like it is the likely intent.
>
> You could fix it with extra parentheses:
>
>   our %he = (
> (map { $_ => $_ } qw(py c cpp ...)),
> 'h' => 'c',
> (map { $_ => 'sh' } qw(bash zsh ksh)),
> ... etc ...
>   );
>
>> I think the intent is better met with this, (the print is for show)
>>
>> our %he = ();
>> $he{'h'} = 'c';
>> $he{$_} = $_ for (qw(py c cpp rb java css php sh pl js tex bib xml awk 
>> bat ini spec tcl sql make));
>> $he{$_} = 'cpp'  for (qw(cxx c++ cc));
[...]

> That is more readable to me (though it does lose the obviousness that it
> is a variable initialization).
>
> Looks like this was broken since 592ea41 (gitweb: Refactor syntax
> highlighting support, 2010-04-27). I do not use gitweb (nor highlight)
> at all, but I'd guess the user-visible impact is that "*.h" files are
> not correctly highlighted
>
> Jakub, can you confirm the intent and a fix like the one above makes
> things better?

Yes, either of those makes things better.

>   (unless highlight does this extension 
> mapping
> itself, but then why are we doing it here?).

Highlight does extension mapping itself... but for that it needs file name,
and not to be feed file contents from pipe.

-- 
Jakub Narebski
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb

2012-10-28 Thread Jeff King
On Sun, Oct 28, 2012 at 04:56:47PM -0700, rh wrote:

> I'm not using gitweb I was thinking about using it and was looking at the 
> cgi and saw this in this file:
> https://github.com/git/git/blob/master/gitweb/gitweb.perl
> 
> I think I understand the intention but the outcome is wrong.
> 
> our %highlight_ext = (
>   # main extensions, defining name of syntax;
>   # see files in /usr/share/highlight/langDefs/ directory
>   map { $_ => $_ }
>   qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl 
> sql make),
>   # alternate extensions, see /etc/highlight/filetypes.conf
>   'h' => 'c',
>   map { $_ => 'sh' } qw(bash zsh ksh),
>   map { $_ => 'cpp' } qw(cxx c++ cc),
>   map { $_ => 'php' } qw(php3 php4 php5 phps),
>   map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
>   map { $_ => 'make'} qw(mak mk),
>   map { $_ => 'xml' } qw(xhtml html htm),
> );

Yeah, this is wrong. The first map will eat the rest of the list, and
you will get "h => h", "cxx => cxx", and so forth. I do not know this
chunk of code, but that does not seem like it is the likely intent.

You could fix it with extra parentheses:

  our %he = (
(map { $_ => $_ } qw(py c cpp ...)),
'h' => 'c',
(map { $_ => 'sh' } qw(bash zsh ksh)),
... etc ...
  );

> I think the intent is better met with this, (the print is for show)
> 
> our %he = ();
> $he{'h'} = 'c';
> $he{$_} = $_ for (qw(py c cpp rb java css php sh pl js tex bib xml awk 
> bat ini spec tcl sql make));
> $he{$_} = 'cpp'  for (qw(cxx c++ cc));
> $he{$_} = 'php'  for (qw(php3 php4 php5 phps));
> $he{$_} = 'pl'   for (qw(cgi perl pm));
> $he{$_} = 'make' for (qw(mak mk));
> $he{$_} = 'xml'  for (qw(xhtml html htm));
> $he{$_} = 'sh'   for (qw(bash zsh ksh));

That is more readable to me (though it does lose the obviousness that it
is a variable initialization).

Looks like this was broken since 592ea41 (gitweb: Refactor syntax
highlighting support, 2010-04-27). I do not use gitweb (nor highlight)
at all, but I'd guess the user-visible impact is that "*.h" files are
not correctly highlighted (unless highlight does this extension mapping
itself, but then why are we doing it here?).

Jakub, can you confirm the intent and a fix like the one above makes
things better?

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Gitweb characters not encoded/decoded properly

2012-09-18 Thread Drew Northup
On Mon, Sep 10, 2012 at 1:57 PM, Joseph Leong  wrote:
> Hi Everyone,
>
> I've noticed an issue in gitweb where git projects are created with
> characters such as:
> €酮خد㐁ᠡꀈ༑㘚.git
>
> But in the gitweb page content, URL section,  a git project is
> rendered incorrectly?

> Example screenshot:
> http://i.imgur.com/06skV.png

Joseph,
What character set is that supposed to be in? In addition, if it is
UTF-(something), what code segment are you using?

-- 
-Drew Northup
--
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb feature request: tarball for each commit

2005-09-08 Thread Martin Langhoff
> > Yes, this is nice for smaller projects. But I don't think, that we want
> > to do such a thing on the kernel.org servers. 
>
> I think this is a very useful feature for for some, but not all,
> repositories. Default it to off and have a magic file (like git-daemon),
> or a config variable turn it on.

+1! It'd be murder for large and/or popular projects, but it's a
really conventient thing to have as an optional feature. Archzoom has
it, and defaults to off ;)

I've checked out Sven's tree as well -- his implementation is pretty
cool actually, much more sophisticated that I'd planned, and using
POST to avoid stupid bots requesting the tarballs.

In this situation ("look at my repo via gitweb, it has some cool
patches over otherhacker's branch") it is hard to discriminate what
patches differentiate Sven's repo from Kay's. I'm thinking of, when
looking at a branch, having a link that shows the equivalent of 
`cg-log -r thisbranch:origin` and another one for `cg-log -r
origin:thisbranch`.

cheers,



martin
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb feature request: tarball for each commit

2005-09-08 Thread A Large Angry SCM

Kay Sievers wrote:

On Thu, Sep 08, 2005 at 10:45:45AM +0200, Sven Verdoolaege wrote:

On Thu, Sep 08, 2005 at 04:30:22PM +1200, Martin Langhoff wrote:
Actually... should get it done. I'll see if I can sneak it in sometime soon... 

This has been done at least twice already.
See e.g., http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary
Check the archives for the other implementation.


Yes, this is nice for smaller projects. But I don't think, that we want
to do such a thing on the kernel.org servers. We already have the daily
snapshots and individual patches can be downloaded from gitweb. Anybody
else should use git/cogito instead of letting the server packaging a huge
tree for every requested revison, I think.


I think this is a very useful feature for for some, but not all, 
repositories. Default it to off and have a magic file (like git-daemon), 
or a config variable turn it on.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb feature request: tarball for each commit

2005-09-08 Thread Kay Sievers
On Thu, Sep 08, 2005 at 10:45:45AM +0200, Sven Verdoolaege wrote:
> On Thu, Sep 08, 2005 at 04:30:22PM +1200, Martin Langhoff wrote:
> > Actually... should get it done. I'll see if I can sneak it in sometime 
> > soon... 
> 
> This has been done at least twice already.
> See e.g., http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary
> Check the archives for the other implementation.

Yes, this is nice for smaller projects. But I don't think, that we want
to do such a thing on the kernel.org servers. We already have the daily
snapshots and individual patches can be downloaded from gitweb. Anybody
else should use git/cogito instead of letting the server packaging a huge
tree for every requested revison, I think.

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb feature request: tarball for each commit

2005-09-08 Thread Sven Verdoolaege
On Thu, Sep 08, 2005 at 04:30:22PM +1200, Martin Langhoff wrote:
> Actually... should get it done. I'll see if I can sneak it in sometime 
> soon... 

This has been done at least twice already.
See e.g., http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary
Check the archives for the other implementation.

skimo
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb : index.aux

2005-08-29 Thread Kay Sievers
On Mon, Aug 29, 2005 at 02:35:00AM -0700, Komal Shah wrote:
> Kay,
> 
> I am able to setup gitweb tree for my linux-omap tree internally, but
> for this I am using $project_list equals to $projectroot. I want to add
> more projects, but I don't know how write/generate index.aux file?

Yeah, this works only if all the trees are in one directory. The index file
is a simple list with the pathes url encoded. (It is exported by a cron job
running on kernel.org. We need it there cause the trees are in subdirs and
the mirrored trees don't have the original ownership, that is displayed in
gitweb.)

> Me don't know much about cgi-bin/perl :(

So let's do it in perl then. :) Just encode the pathes and put them into
the file (optionaly the owner comes after a space in the same line):
  perl -e 'use CGI; print CGI::escape("/this/is/my/project") . "\n"'
  %2Fthis%2Fis%2Fmy%2Fproject

Good luck,
Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb : index.aux

2005-08-29 Thread Mariano Videla
Here is an example:



On lun, 2005-08-29 at 02:35 -0700, Komal Shah wrote:
> Kay,
> 
> I am able to setup gitweb tree for my linux-omap tree internally, but
> for this I am using $project_list equals to $projectroot. I want to add
> more projects, but I don't know how write/generate index.aux file?
> 
> Me don't know much about cgi-bin/perl :(
> 
> ---Komal Shah
> http://komalshah.blogspot.com/
> 
> 
>   
> 
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
merlin6 Mariano+Videla
cpp Mariano+Videla
fixedClient Mariano+Videla
gipy Mariano+Videla


Re: gitweb "tag" display

2005-08-20 Thread Junio C Hamano
Paul Mackerras <[EMAIL PROTECTED]> writes:

> I did something a little easier - if you click on the tag, it now
> displays the contents of the tag in the details pane.  Is that good
> enough?

Looks very nice, and a lot more sensible than those unsolicited
popups I hate very much.

> I implemented these two.  There is now a "Reread references" button in
> the File menu.  References other than tags and heads get displayed in
> a light blue box.

Wonderful.

> Hmmm... now I suppose we want a way to use gitk to drive the git
> bisection process... :)

Yes!  That was the direction I was implying.



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb "tag" display

2005-08-19 Thread Johannes Schindelin
Hi,

On Sat, 20 Aug 2005, Paul Mackerras wrote:

> Hmmm... now I suppose we want a way to use gitk to drive the git
> bisection process... :)

Ssshh! Let sleeping dogs lie! ;-)

Ciao,
Dscho
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb "tag" display

2005-08-19 Thread Paul Mackerras
Junio C Hamano writes:

> If you can pop-up a temporary window that shows the tag contents
> when I hover over a tag icon for 2 seconds, and remove that
> temporary window when step outside it would be ideal.  It is up

I did something a little easier - if you click on the tag, it now
displays the contents of the tag in the details pane.  Is that good
enough?

> to you to implement the part to show my wife's picture, reading
> "object-content-type: image/jpeg" thing ;-).  That one was not a
> serious request.

Well, Tk can display inline images in text widgets... :)

> I have two more requests to gitk, which are related to each
> other but not related to the "tag contents" one above:
> 
>  - if "gitk --all" slurped not just refs/heads and refs/tags but
>everything under refs/* recursively, that would help
>visualizing the bisect status.  bisect creates bunch of
>commit object names in refs/bisect.
> 
>  - I have not looked at the code closely enough, but I cannot
>find how to re-read references.  I would appreciate it if it
>allowed it.  This relates to the bisect status visualization,
>where the set of references changes _after_ the user started
>gitk.

I implemented these two.  There is now a "Reread references" button in
the File menu.  References other than tags and heads get displayed in
a light blue box.

Hmmm... now I suppose we want a way to use gitk to drive the git
bisection process... :)

Paul.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - option to disable rename detection

2005-08-16 Thread Yasushi SHOJI
At Mon, 15 Aug 2005 15:43:26 -0700 (PDT),
Linus Torvalds wrote:
> 
> On Tue, 16 Aug 2005, Yasushi SHOJI wrote:
> >
> > > Instead of disabling it entirely, how about just having some limit on it?
> > 
> > ah, that's a good idea.  here is a quick and dirty patch.
> 
> This makes it somewhat more expensive.

yes.  but much cheaper than OOM ;P

>- I was thinking about disabling it 
> in git-diff-tree, since the rename logic already knows how many 
> new/deleted files there are.

I'll leave this feature for homework.  I'll work on
prepare_temp_file() first since it seems to fix my problem.

regards,
--
 yashi

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - option to disable rename detection

2005-08-15 Thread Junio C Hamano
Linus Torvalds <[EMAIL PROTECTED]> writes:

> This makes it somewhat more expensive - I was thinking about disabling it 
> in git-diff-tree, since the rename logic already knows how many 
> new/deleted files there are.

That's doable.  I'll rig something up on my next GIT day, along
with the clean-up for diff option handling which we have
postponed for some time.  Clearly this would introduce another
option to diffcore.

OTOH, you could take totally the opposite avenue and take
advantage of the fact that git commit ancestry is immultable.
Once commitdiff is made, you do not have to regenerate it but
cache it and reuse for the next request.  I may be mistaken, but
I vaguely recall kernel.org webservers already does something
like that.

If you have infinite amount of disk space, you could choose to
cache everything, and also prime the cache before any real users
ask for a page.  Once you go that route, you could even give -C
flag for copy detection, with --find-copies-harder which is an
ultra expensive option, and nobody would notice.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - option to disable rename detection

2005-08-15 Thread Linus Torvalds


On Tue, 16 Aug 2005, Yasushi SHOJI wrote:
>
> > Instead of disabling it entirely, how about just having some limit on it?
> 
> ah, that's a good idea.  here is a quick and dirty patch.

This makes it somewhat more expensive - I was thinking about disabling it 
in git-diff-tree, since the rename logic already knows how many 
new/deleted files there are.

Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - option to disable rename detection

2005-08-15 Thread Yasushi SHOJI
At Mon, 15 Aug 2005 11:53:20 -0700 (PDT),
Linus Torvalds wrote:
> 
> On Tue, 16 Aug 2005, Yasushi SHOJI wrote:
> > 
> > It seems to me that git-diff-tree needs huge memory if you try to diff
> > on big change with rename detection enabled.
> > 
> > This isn't problem for sane project but if you create a repo with only
> > major releases imports, git-diff-tree run by git_commit() eats system
> > memory and die ;P
> 
> Instead of disabling it entirely, how about just having some limit on it?

ah, that's a good idea.  here is a quick and dirty patch.
--
  yashi

diff --git a/gitweb.cgi b/gitweb.cgi
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -40,6 +40,9 @@ my $home_text =   "indextext.html";
 #my $projects_list = $projectroot;
 my $projects_list = "index/index.aux";
 
+# max number of changes to use rename detection on git-diff-tree
+my $rename_detection_threshold = 1000;
+
 # input validation and dispatch
 my $action = $cgi->param('a');
 if (defined $action) {
@@ -1587,7 +1590,18 @@ sub git_commit {
$root = " --root";
$parent = "";
}
-   open my $fd, "-|", "$gitbin/git-diff-tree -r -M $root $parent $hash" or 
die_error(undef, "Open failed.");
+   my $nr_files;
+   my $opts = "";
+   my $disabled_notice;
+   open my $fd, "-|", "$gitbin/git-diff-tree -r $root $parent $hash" or 
die_error(undef, "Open failed.");
+   $nr_files++ while <$fd>;
+   close $fd or die_error(undef, "Counting diff-tree failed.");
+   if ($nr_files <  $rename_detection_threshold) {
+   $opts .= " -M";
+   } else {
+   $disabled_notice = "(Rename detection disabled)";
+   }
+   open my $fd, "-|", "$gitbin/git-diff-tree -r $opts $root $parent $hash" 
or die_error(undef, "Open failed.");
@difftree = map { chomp; $_ } <$fd>;
close $fd or die_error(undef, "Reading diff-tree failed.");
git_header_html();
@@ -1671,7 +1685,7 @@ sub git_commit {
print "\n";
print "\n";
if ($#difftree > 10) {
-   print(($#difftree + 1) . " files changed:\n");
+   print(($#difftree + 1) . " files changed" . $disabled_notice  . 
":\n");
}
print "\n";
print "\n";
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - option to disable rename detection

2005-08-15 Thread Linus Torvalds


On Tue, 16 Aug 2005, Yasushi SHOJI wrote:
> 
> It seems to me that git-diff-tree needs huge memory if you try to diff
> on big change with rename detection enabled.
> 
> This isn't problem for sane project but if you create a repo with only
> major releases imports, git-diff-tree run by git_commit() eats system
> memory and die ;P

Instead of disabling it entirely, how about just having some limit on it?

The basic rename detection works very well for "normal" changes as you 
point out, but it very fundamentally is O(n^2) in number of files created 
and deleted, so we could instead just limit it and say "if we have tons of 
new/deleted files, disable it in the interest of CPU/memory usage".

Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-12 Thread Matthias Urlichs
Hi, Mitchell Blank Jr wrote:

> Is it really hard to just make it purely time-based (git-rev-list
> --max-age)? Think of if Linus is merging with a lot of people and then
> pushes the results to the master repository -- suddenly there's, say,
> 400 new commits since the last time my aggregator checked 2 hours ago.

Think of Linus merging a bunch of trees with 1-month old commits, all of
which you'd miss that way.

IMHO, you definitely need a static file for RSS -- do a git-rev-list
between HEAD and HEAD-as-of-the-last-time-you-generated-the-RSS,
concatenate with the old RSS, then trim appropriately.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [EMAIL PROTECTED]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
You judge the acts of others only by their intentions.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-12 Thread Mitchell Blank Jr
Kay Sievers wrote:
> It's 30 now and up to 150 if they are not older than 48 hours.
> We can change the numbers, if you hava a better idea...

Is it really hard to just make it purely time-based (git-rev-list --max-age)?
Think of if Linus is merging with a lot of people and then pushes the results
to the master repository -- suddenly there's, say, 400 new commits since the
last time my aggregator checked 2 hours ago.

> For now it just lists all changed files to the log message, similar to the
> "commit" view. Is that ok, or do we really need the diffstat,

It looks great, thanks!  diffstat would be slightly nicer but not a big
deal.

> It may be
> a bit expensive to generate it for all the commits with every RSS request...

Well if the RSS feed's popularity takes off you'll probably want to *not*
generate it every time and instead serve it from a static file.  This can
be as simple as a Makefile like:

commits.rss: $(GITDIR)/refs/heads/master
/path/to/myperlscript.pl $(GITDIR) > commits.rss.NEW && chmod 
444 commits.rss.NEW && mv commits.rss.NEW commits.rss

and then call "make -C /my/rss/dir -s -f /path/to/mymakefile.mk" from cron
every minute.

Serving the rss from a static file has the big advantage that a well-behaved
aggregator will only request it if the modification date changed which saves
everyone bandwidth.

-Mitch
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-12 Thread Kay Sievers
On Wed, Aug 10, 2005 at 01:31:13AM -0700, Mitchell Blank Jr wrote:
> Ian Campbell wrote:
> > I used to subscribe to the kernel RSS feed (using blam) but I found I
> > was only getting the most recent 20 commits, which wasn't much good when
> > a big batch went in because I would miss some.
> 
> Yes, I have that problem too.  It appears to be just the way that gitweb
> works - look at the "git_rss" function in the source:
>   ftp://ftp.kernel.org/pub/software/scm/gitweb/gitweb.cgi
> 
> Kay -- is there any chance of fixing this?  I love reading the kernel
> commits via RSS but this makes it a lot less usable than it could be.
> Really it should return all commits within, say, the last 36 hours so as
> long as your aggregator polls reasonably often you won't miss anyhing.

It's 30 now and up to 150 if they are not older than 48 hours.
We can change the numbers, if you hava a better idea...

> The other thing on my wishlish is diffstat -- sometimes the commit messages
> can be a little ambiguous and just adding what files were changed would
> help alot.  For commits that touch a large number of files maybe it could
> just show the files that changed the most like:

For now it just lists all changed files to the log message, similar to the
"commit" view. Is that ok, or do we really need the diffstat, It may be
a bit expensive to generate it for all the commits with every RSS request...

Thanks,
Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-12 Thread Kay Sievers
On Wed, Aug 10, 2005 at 06:53:40AM +0100, Ian Campbell wrote:
> On Tue, 2005-08-09 at 21:58 +0200, Kay Sievers wrote:
> 
> > I was hoping people that want stuff like this would use a RSS reader. :)
> 
> I used to subscribe to the kernel RSS feed (using blam) but I found I
> was only getting the most recent 20 commits, which wasn't much good when
> a big batch went in because I would miss some. Has this been fixed or
> was it something I was doing wrong?

It's 30 now and up to 150 if they are not older than 48 hours. We can
tweak the numbers if you like to have it different...

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-10 Thread Mitchell Blank Jr
Ian Campbell wrote:
> I used to subscribe to the kernel RSS feed (using blam) but I found I
> was only getting the most recent 20 commits, which wasn't much good when
> a big batch went in because I would miss some.

Yes, I have that problem too.  It appears to be just the way that gitweb
works - look at the "git_rss" function in the source:
  ftp://ftp.kernel.org/pub/software/scm/gitweb/gitweb.cgi

Kay -- is there any chance of fixing this?  I love reading the kernel
commits via RSS but this makes it a lot less usable than it could be.
Really it should return all commits within, say, the last 36 hours so as
long as your aggregator polls reasonably often you won't miss anyhing.

The other thing on my wishlish is diffstat -- sometimes the commit messages
can be a little ambiguous and just adding what files were changed would
help alot.  For commits that touch a large number of files maybe it could
just show the files that changed the most like:

   net/bar.c  |  412 -
   drivers/char/foo.c |  354 +-
   arch/baz/boot.S|   99 
   [16 other files changed]

Other than that though I really love gitweb and the RSS support is a
great touch.  It really makes tracking kernel commits painless.

-Mitch
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Ian Campbell
On Tue, 2005-08-09 at 21:58 +0200, Kay Sievers wrote:

> I was hoping people that want stuff like this would use a RSS reader. :)

I used to subscribe to the kernel RSS feed (using blam) but I found I
was only getting the most recent 20 commits, which wasn't much good when
a big batch went in because I would miss some. Has this been fixed or
was it something I was doing wrong?

Ian.

-- 
Ian Campbell

hipatitis:
Terminal coolness.


signature.asc
Description: This is a digitally signed message part


Re: gitweb - feature request

2005-08-09 Thread Sam Ravnborg
> Sam,
> try it! :)

Works excellent - and less than 12 hours after I posted my feautre
reqest. That was quick!

Thanks,
Sam
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Kay Sievers
On Tue, Aug 09, 2005 at 11:14:02PM +0200, Kay Sievers wrote:
> On Tue, Aug 09, 2005 at 10:18:36PM +0200, Sam Ravnborg wrote:
> > On Tue, Aug 09, 2005 at 09:58:18PM +0200, Kay Sievers wrote:
> > > On Tue, Aug 09, 2005 at 09:31:04PM +0200, Sam Ravnborg wrote:
> > > > Hi Kay.
> > > > 
> > > > When browsing http://www.kernel.org/git I often find myself looking for
> > > > the most recently changed tree.
> > > > For this it is very good that you have the "last change" in italic and
> > > > bolded if newer than a few hours (I think).
> > > 
> > > Hmm, if last change is "minutes" it's bold, if it's "hours" old it's 
> > > green.
> > > What do you miss?
> > For this part I do not miss anything - the opposite actually. I like
> > this highlighting you do.
> > 
> > > 
> > > > A nice additional feature would be the possibility to sort the output
> > > > according to last change, owner and description.
> > > > Using a click-able table heading would be the most intuitive way.
> > > > 
> > > > I have not looked into the source for gitweb, so I really do not know
> > > > how difficult this would be.
> > > 
> > > I was hoping people that want stuff like this would use a RSS reader. :)
> > Some day I will try to use such a beast...
> 
> Well, I don't use these beasts myself. :) I will try the sorting with the
> next round - sounds like a nice feature.

Sam,
try it! :)

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Linus Torvalds


On Wed, 10 Aug 2005, Kay Sievers wrote:
>
> Firefox may need a plugin to be able to read it, I don't really know...

Firefox definitely needs a separate plugin, at least for me.

Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Kay Sievers
On Tue, Aug 09, 2005 at 02:53:58PM -0700, Linus Torvalds wrote:
> 
> 
> On Tue, 9 Aug 2005, Johannes Schindelin wrote:
> > 
> > You have Firefox, don't you? Next time you surf to gitweb, right click on 
> > the funny yellow symbol in the lower right corner of your Firefox. It 
> > should say something like "Subscribe to...". Do it.
> 
> Left-click. And you need to be inside the project you want to rss (it 
> would be nice if you could be at the "projects" page and it would give you 
> a list of things to subscribe to, but that may not be possible).

Sure, it is that way. It is called OPML and I once tested it with a RSS
reader and it was able to read the list of offered feeds in with a single
request.
Just click on the RSS pict in the footer and it will return the overview
of the index page. Firefox may need a plugin to be able to read it, I don't
really know...

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Linus Torvalds


On Tue, 9 Aug 2005, Johannes Schindelin wrote:
> 
> You have Firefox, don't you? Next time you surf to gitweb, right click on 
> the funny yellow symbol in the lower right corner of your Firefox. It 
> should say something like "Subscribe to...". Do it.

Left-click. And you need to be inside the project you want to rss (it 
would be nice if you could be at the "projects" page and it would give you 
a list of things to subscribe to, but that may not be possible).

Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Kay Sievers
On Tue, Aug 09, 2005 at 10:18:36PM +0200, Sam Ravnborg wrote:
> On Tue, Aug 09, 2005 at 09:58:18PM +0200, Kay Sievers wrote:
> > On Tue, Aug 09, 2005 at 09:31:04PM +0200, Sam Ravnborg wrote:
> > > Hi Kay.
> > > 
> > > When browsing http://www.kernel.org/git I often find myself looking for
> > > the most recently changed tree.
> > > For this it is very good that you have the "last change" in italic and
> > > bolded if newer than a few hours (I think).
> > 
> > Hmm, if last change is "minutes" it's bold, if it's "hours" old it's green.
> > What do you miss?
> For this part I do not miss anything - the opposite actually. I like
> this highlighting you do.
> 
> > 
> > > A nice additional feature would be the possibility to sort the output
> > > according to last change, owner and description.
> > > Using a click-able table heading would be the most intuitive way.
> > > 
> > > I have not looked into the source for gitweb, so I really do not know
> > > how difficult this would be.
> > 
> > I was hoping people that want stuff like this would use a RSS reader. :)
> Some day I will try to use such a beast...

Well, I don't use these beasts myself. :) I will try the sorting with the
next round - sounds like a nice feature.

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Kay Sievers
On Tue, Aug 09, 2005 at 03:51:37PM -0500, John Benes wrote:
> Sam Ravnborg wrote:
> >> You have Firefox, don't you? Next time you surf to gitweb, right click on 
> >> the funny yellow symbol in the lower right corner of your Firefox. It 
> >> should say something like "Subscribe to...". Do it.
> > 
> > Unfortunately not on my firefox. 1.0.6 on gentoo.
> > Puzzled...
> 
> I don't see it either with Firefox/1.0+ ID:2005080905.
> 
> For it to work, this code needs to be added to the HEAD (slightly modified)
> 
>  href="http://www.kernel.org/git/?a=opml"; />

Are you sure that firefox handles opml without a plugin?

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread John Benes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sam Ravnborg wrote:
>> You have Firefox, don't you? Next time you surf to gitweb, right click on 
>> the funny yellow symbol in the lower right corner of your Firefox. It 
>> should say something like "Subscribe to...". Do it.
> 
> Unfortunately not on my firefox. 1.0.6 on gentoo.
> Puzzled...

I don't see it either with Firefox/1.0+ ID:2005080905.

For it to work, this code needs to be added to the HEAD (slightly modified)

http://www.kernel.org/git/?a=opml"; />

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBQvkXWGF0oWcU9kCNAQLNiA//aeblC39Vlc6z6e3GjG84+9V/vPcXjrE9
MdCllzb9D5aITJSWTxK7Ow5Y1nat0g9Cnf1AgrG6wPT6Uvm+7j61EqH5rcjYx/mU
kNe+251cHHBnGohdXyV4n20KCoEnXKZOQX7p7R3dJWifR4eyUzacSQiA51WmNPIl
vkV+JpTD6lPAIcZxJMXOJWUblaDA0reMPoCQ2nz7gqZOsQP7qWvzi0uyIAxjhaPd
AQ5UzEE9l9Wt5J7Oyx/ldz9i5e54EZxFgkaDWlLpDwVpUChmlVBx5V1ltTRh3Ymp
7lCPfy7JFN7eIQpAKp2/rldxvWK2gobSErTJR6nfs3ohSxe6WPLEpVS5Bfxrjo+8
a0LUOi/9E2+Kj1ja1Wf165GkQlI7ZfQgrmFRm8pVWS9WwkjlDvZbHjArv4lg6X6w
02yGuiyT2P0MIhia7SJF7xFM+lUi8mDdT/psnrZQ1++UhckuGPwWTa0EJ8nVWfk2
KkN3G3R1RVdSSgQSlh71ngNzwyFmxvMjHAZHB5ETtiO+/Of6TMkW+o3S8oJrbJSh
9M7WjDlKSUl7R3NcBE2iqx9NUyz7ldwPme+iG/w3aTAsvNaMOgjzsVloEosVeDIh
I/GOOujl+ym2IiJsAX9YRyaKmcBTZGEjfnUNWhf14hMDeM5fB5N8P6f+6JsMOB/N
s8U1L/LUiCc=
=ai+1
-END PGP SIGNATURE-
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Sam Ravnborg
> You have Firefox, don't you? Next time you surf to gitweb, right click on 
> the funny yellow symbol in the lower right corner of your Firefox. It 
> should say something like "Subscribe to...". Do it.

Unfortunately not on my firefox. 1.0.6 on gentoo.
Puzzled...

Sam
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Johannes Schindelin
Hi,

On Tue, 9 Aug 2005, Sam Ravnborg wrote:

> On Tue, Aug 09, 2005 at 09:58:18PM +0200, Kay Sievers wrote:
> > 
> > I was hoping people that want stuff like this would use a RSS reader. :)
> Some day I will try to use such a beast...

You have Firefox, don't you? Next time you surf to gitweb, right click on 
the funny yellow symbol in the lower right corner of your Firefox. It 
should say something like "Subscribe to...". Do it.

Then, in you bookmark menu, you should see the entry, with a small arrow 
to the right. Click on the entry...

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Sam Ravnborg
On Tue, Aug 09, 2005 at 09:58:18PM +0200, Kay Sievers wrote:
> On Tue, Aug 09, 2005 at 09:31:04PM +0200, Sam Ravnborg wrote:
> > Hi Kay.
> > 
> > When browsing http://www.kernel.org/git I often find myself looking for
> > the most recently changed tree.
> > For this it is very good that you have the "last change" in italic and
> > bolded if newer than a few hours (I think).
> 
> Hmm, if last change is "minutes" it's bold, if it's "hours" old it's green.
> What do you miss?
For this part I do not miss anything - the opposite actually. I like
this highlighting you do.

> 
> > A nice additional feature would be the possibility to sort the output
> > according to last change, owner and description.
> > Using a click-able table heading would be the most intuitive way.
> > 
> > I have not looked into the source for gitweb, so I really do not know
> > how difficult this would be.
> 
> I was hoping people that want stuff like this would use a RSS reader. :)
Some day I will try to use such a beast...

Sam
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb - feature request

2005-08-09 Thread Kay Sievers
On Tue, Aug 09, 2005 at 09:31:04PM +0200, Sam Ravnborg wrote:
> Hi Kay.
> 
> When browsing http://www.kernel.org/git I often find myself looking for
> the most recently changed tree.
> For this it is very good that you have the "last change" in italic and
> bolded if newer than a few hours (I think).

Hmm, if last change is "minutes" it's bold, if it's "hours" old it's green.
What do you miss?

> A nice additional feature would be the possibility to sort the output
> according to last change, owner and description.
> Using a click-able table heading would be the most intuitive way.
> 
> I have not looked into the source for gitweb, so I really do not know
> how difficult this would be.

I was hoping people that want stuff like this would use a RSS reader. :)

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb "tag" display

2005-08-06 Thread Kay Sievers
On Sat, Aug 06, 2005 at 11:27:54AM -0700, Junio C Hamano wrote:
> A git tag object can have its own text contents, but I do not
> see how I can get to it from gitweb.  
> 
> For example, I have "junio-gpg-pub" tag in my git.git
> repository.  This is a tag to a "blob" which is my public GPG
> key.  The "tag" object itself says:
> 
> object b92c9c07fe2d0d89c4f692573583c4753b5355d2
> type blob
> tag junio-gpg-pub
> tagger Junio C Hamano <[EMAIL PROTECTED]> 1123226972 -0700
> 
> This is the GPG key I use to sign GIT releases.

Check it out. But it still has no "picture tag" support. :)

Thanks,
Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb "tag" display

2005-08-06 Thread Junio C Hamano
Junio C Hamano <[EMAIL PROTECTED]> writes:

> A git tag object can have its own text contents, but I do not
> see how I can get to it from gitweb.  

I just realized that this is also unavailable in gitk, so please
consider this as a feature request to gitk as well.

If you can pop-up a temporary window that shows the tag contents
when I hover over a tag icon for 2 seconds, and remove that
temporary window when step outside it would be ideal.  It is up
to you to implement the part to show my wife's picture, reading
"object-content-type: image/jpeg" thing ;-).  That one was not a
serious request.

I have two more requests to gitk, which are related to each
other but not related to the "tag contents" one above:

 - if "gitk --all" slurped not just refs/heads and refs/tags but
   everything under refs/* recursively, that would help
   visualizing the bisect status.  bisect creates bunch of
   commit object names in refs/bisect.

 - I have not looked at the code closely enough, but I cannot
   find how to re-read references.  I would appreciate it if it
   allowed it.  This relates to the bisect status visualization,
   where the set of references changes _after_ the user started
   gitk.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb: not all files listed in commit list

2005-08-04 Thread Kay Sievers
On Thu, Aug 04, 2005 at 10:39:16AM +0200, Sven Verdoolaege wrote:
> On Wed, Aug 03, 2005 at 08:49:16PM -0500, Olof Johansson wrote:
> > Hi,
> > 
> > My apologies if this has already been found and reported; I'm not
> > tracking the list closely.
> > 
> > It seems that newly introduced files are not shown in gitweb.
> > For example, see the following commit:
> > 
> > http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fce0d5740322b98b863f9e609f5a9bd4c06703af
> 
> That's probably because either git-core or gitweb needs updating.
> New files used to be indicated by an 'N', whereas an 'A' is used now.

Gitweb already expects the new format. The git binaries need to be updated.

Kay
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gitweb: not all files listed in commit list

2005-08-04 Thread Sven Verdoolaege
On Wed, Aug 03, 2005 at 08:49:16PM -0500, Olof Johansson wrote:
> Hi,
> 
> My apologies if this has already been found and reported; I'm not
> tracking the list closely.
> 
> It seems that newly introduced files are not shown in gitweb.
> For example, see the following commit:
> 
> http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fce0d5740322b98b863f9e609f5a9bd4c06703af

That's probably because either git-core or gitweb needs updating.
New files used to be indicated by an 'N', whereas an 'A' is used now.
 
skimo
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html