* Re: packs and trees
From: Linus Torvalds @ 2006-06-21 3:54 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Nicolas Pitre, Jon Smirl, git
In-Reply-To: <46a038f90606201241x3dec242dicde245a24c3ab9ab@mail.gmail.com>
On Wed, 21 Jun 2006, Martin Langhoff wrote:
>
> If you are asking about the ext3 performance problems, I think Linus
> discussed that a while ago, why unpacked repos are slow (in addition
> to huge), and there were some suggestions of using hashed directory
> indexes.
Yes. I think most distros still default to nonhashed directories, but for
any large-directory case you really want to turn on hashing.
I forget the exact details, it's somethng like
tune2fs -O dir_index
or something to turn it on (if I remember correctly, that will only affect
any directories then created after that, but you can effect that by just
doing a "git repack -a -d" which will remove all old object directories,
and now subsequent directories will be done with indexing on).
Personally, I just ended up using packs extensively, so I think I'm still
running without indexing on all my machines ;)
Linus
^ permalink raw reply
* Re: Odd behavior with git and cairo-devel repo
From: Andre Noll @ 2006-06-21 2:46 UTC (permalink / raw)
To: Art Haas; +Cc: git
In-Reply-To: <20060621010030.GP2820@artsapartment.org>
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]
On 20:00, Art Haas wrote:
> $ git clone git://git.cairographics.org/git/cairo cairo
> [ ... git clones the repo without problem ... ]
> $ cd cairo
> $ git fsck-objects
> Floating point exception
This is due to refs_hash_size being zero in mark_reachable().
Both "git fsck-objects --full" and "git repack -a -d" seem to work
fine with the patch below (tested by cloning your repo).
---
Currently, we don't check refs_hash_size size and happily call
lookup_object_refs() even if refs_hash_size is zero which leads to
a division by zero in hash_obj().
Signed-off-by: Andre Noll <maan@systemlinux.org>
---
diff --git a/object-refs.c b/object-refs.c
index 8afa227..a7d49c6 100644
--- a/object-refs.c
+++ b/object-refs.c
@@ -127,6 +127,9 @@ void mark_reachable(struct object *obj,
if (!track_object_refs)
die("cannot do reachability with object refs turned off");
+ /* nothing to lookup */
+ if (!refs_hash_size)
+ return;
/* If we've been here already, don't bother */
if (obj->flags & mask)
return;
--
The only person who always got his work done by Friday was Robinson Crusoe
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related
* Odd behavior with git and cairo-devel repo
From: Art Haas @ 2006-06-21 1:00 UTC (permalink / raw)
To: git
Hi.
I've been seeing some odd errors with git when it is dealing with
the Cairo graphics library repo. The errors include git failing
a 'fsck-objects' with a 'Floating point exception' error message
and 'git prune' mangling the repo.
A fresh cloning of the repo is needed to see the FPE error. The
repo is about 13M in size, btw.
$ git clone git://git.cairographics.org/git/cairo cairo
[ ... git clones the repo without problem ... ]
$ cd cairo
$ git fsck-objects
Floating point exception
$
The strace of this shows that things bomb after the '.git/index' file is
read. Here's the tail end of the strace output ...
close(3) = 0
open(".git/index", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=51472, ...}) = 0
mmap2(NULL, 51472, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0xb7f4b000
close(3) = 0
--- SIGFPE (Floating point exception) @ 0 (0) ---
+++ killed by SIGFPE +++
Now, if the repo is added to and you 'git pull' to update your copy,
the 'git fsck-objects' command completes without error.
As for the problem where 'git prune' mangles the local copy, it would
happen after a 'git fsck-objects' run succeeds without incident.
Then 'git prune' would run, seemingly without problems, and I would
try and repack my repo with 'git repack -a -d'. Here, things go
boom with SHA1 errors, and subsequent 'git fsck-objects' runs
produce errors.
My local 'git' build is current with the 'master' branch. I've observed
these problems with the Cairo repo on a machine running Debian unstable,
Fedora Core 4, and Fedora Rawhide. The Debian machine uses git built
by the current gcc-4.1 package, FC4 uses its current gcc-4.0 package,
and rawhide uses its current gcc-4.1 package. All these machines are
kept up-to-date with the respective current packages versions for
that distro.
Can anyone out in git-land seeing problems with the Cairo
git repo, or able to duplicate these problems?
Thanks in advance,
Art Haas
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Thomas Glanzmann @ 2006-06-20 21:53 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, Michael Gernoth
In-Reply-To: <e79921$u0e$1@sea.gmane.org>
Hello,
> Any further ideas for other useful features?
a friend of mine was yesterday complained to me about not be able to see
which file was last touched in a given directory like it is possible
with viewcvs[1]. I told him that he should just call 'git whatchanged
-p'. And he answered back 'downloading 128Mbytes' for a few bytes
of history? I told him to address this list with his feature request, but
he didn't do so far. So I use this opportunity. Maybe something else
would be much more handier: Use gitweb to request the log and shortlog
of a directory tree, like git-whatchanged arch/i386 does for example.
Maybe it is already possible and I missed it?
Thomas
[1] viewcvs prints the last touch of a a file in a directory and you can
tell it to sort after the date criteria:
http://faumachine.informatik.uni-erlangen.de/cgi-bin/viewcvs.cgi/mutt/?sortby=date#dirlist
^ permalink raw reply
* [PATCH] gitweb.cgi: whitespace cleanup
From: Jakub Narebski @ 2006-06-20 21:52 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jakub Narebski
Signed-off-by: Jakub Narebski
---
gitweb/gitweb.cgi | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
370a5cd4c8151c10809f03f0e32c7ef3767d4bb1
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 42f3296..11cc71f 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -17,33 +17,33 @@ use Fcntl ':mode';
binmode STDOUT, ':utf8';
my $cgi = new CGI;
-my $version = "267";
-my $my_url = $cgi->url();
-my $my_uri = $cgi->url(-absolute => 1);
-my $rss_link = "";
+my $version = "267";
+my $my_url = $cgi->url();
+my $my_uri = $cgi->url(-absolute => 1);
+my $rss_link = "";
# absolute fs-path which will be prepended to the project path
-#my $projectroot = "/pub/scm";
-my $projectroot = "/home/kay/public_html/pub/scm";
+#my $projectroot = "/pub/scm";
+my $projectroot = "/home/kay/public_html/pub/scm";
# location of the git-core binaries
-my $gitbin = "/usr/bin";
+my $gitbin = "/usr/bin";
# location for temporary files needed for diffs
-my $git_temp = "/tmp/gitweb";
+my $git_temp = "/tmp/gitweb";
# target of the home link on top of all pages
-my $home_link = $my_uri;
+my $home_link = $my_uri;
# html text to include at home page
-my $home_text = "indextext.html";
+my $home_text = "indextext.html";
# URI of default stylesheet
-my $stylesheet = "gitweb.css";
+my $stylesheet = "gitweb.css";
# source of projects list
-#my $projects_list = $projectroot;
-my $projects_list = "index/index.aux";
+#my $projects_list = $projectroot;
+my $projects_list = "index/index.aux";
# default blob_plain mimetype and default charset for text/plain blob
my $default_blob_plain_mimetype = 'text/plain';
@@ -51,7 +51,7 @@ my $default_text_plain_charset = undef;
# file to use for guessing MIME types before trying /etc/mime.types
# (relative to the current git repository)
-my $mimetypes_file = undef;
+my $mimetypes_file = undef;
# input validation and dispatch
--
1.3.0
^ permalink raw reply related
* [PATCH 1/2 (resend)] gitweb: Add filename to page title if it is set
From: Jakub Narebski @ 2006-06-20 21:40 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jakub Narebski
Signed-off-by: Jakub Narebski
---
gitweb/gitweb.cgi | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
a54751bb328072baed5446bdc4076f1e00002737
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 12d5271..1e1a044 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -260,7 +260,10 @@ sub git_header_html {
if (defined $project) {
$title .= " - $project";
if (defined $action) {
+ if (defined $file_name) {
+ $title .= " - $file_name";
+ }
}
}
print $cgi->header(-type=>'text/html', -charset => 'utf-8', -status=> $status, -expires => $expires);
--
1.3.0
^ permalink raw reply related
* [PATCH 2/2 (resend)] gitweb: add '/' to the end of filename in page title for trees
From: Jakub Narebski @ 2006-06-20 21:39 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jakub Narebski
In-Reply-To: <11508395812645-git-send-email-jnareb@gmail.com>
Signed-off-by: Jakub Narebski
---
gitweb/gitweb.cgi | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
d17c119d32ae4c5dd50976ea6a255d2bcbe480ed
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 1e1a044..42f3296 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -263,6 +263,9 @@ sub git_header_html {
$title .= "/$action";
if (defined $file_name) {
$title .= " - $file_name";
+ if ($action eq "tree" && $file_name !~ m|/$|) {
+ $title .= "/";
+ }
}
}
}
--
1.3.0
^ permalink raw reply related
* Re: [PATCH] Log peer address when git-daemon called from inetd
From: Junio C Hamano @ 2006-06-20 21:31 UTC (permalink / raw)
To: David Woodhouse; +Cc: git
In-Reply-To: <1150814294.17609.68.camel@hades.cambridge.redhat.com>
Thanks.
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Petr Baudis @ 2006-06-20 21:25 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79921$u0e$1@sea.gmane.org>
> Any further ideas for other useful features?
By the way, it would definitely make me feel better about gitweb
security-wise if it would run with taints checks on - they are very good
idea.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Martin Langhoff @ 2006-06-20 21:17 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79jtd$51j$1@sea.gmane.org>
On 6/21/06, Jakub Narebski <jnareb@gmail.com> wrote:
> > I intend to post a patch that adds snapshot support in Perl, in the
> > main code. Just need to make it optional ;-)
>
> Check http://marc.theaimsgroup.com/?l=git&m=111909432415478&w=2 for
> in the main code snapshot implementation.
>
> http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary
> http://www.liacs.nl/~sverdool/gitweb.git
>
> Would separate snapshot CGI script make it work faster?
I was thinking about that same one, we found (and fixed) a bug or two
on top of that so my plan is to rebase it on top of the gitweb on next
;-)
> >> Any further ideas for other useful features?
> >
> > Now what I think would rock too is something similar to gitk's "nearby
> > tags" feature. When reading a commit, it lists the heads and tags that
> > this commit is part of. It's very useful. Now I'll have to read up on
> > how gitk does it.
>
> If I remember correctly, it was done in the background, and it was done
> at least partially _in_ gitk (Tcl/Tk).
I suspect it is doing a whole lot of git-merge-base invocations, which
are rather costly. I don't know of any cheaper way to ask that
question.
> > And, as you mention in your other post, mod_perl support. And a bit of
> > speed. Gitweb right now is really really slow.
>
> Perhaps mod_cache would help. Especially if cache can be configured to
> look only at the hash part, plus formatting (normal, plain/raw, blame,
> search match highlighting).
Right, some URLs are guaranteed to be static (those blob views), so it
can just cache on the full URL, for ever and ever. The other ones...
well, we just make sure we don't do anything too expensive there ;-)
martin
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Jakub Narebski @ 2006-06-20 20:59 UTC (permalink / raw)
To: git
In-Reply-To: <20060620201035.GT2609@pasky.or.cz>
Petr Baudis wrote:
> Dear diary, on Tue, Jun 20, 2006 at 06:51:18PM CEST, I got a letter
> where Jakub Narebski <jnareb@gmail.com> said that...
>> * Refactor dispatch from if...elsif...else construction
>> to using 'name' => \&sub hash.
>
> In other words, you say the result of the IRC discussion we had about
> symbol lookups and evals turned out really scary? ;-)
First, we need arrays (ordering!) of sets of possible actions for navbar,
so we will have list of all possible actions.
Besides, simple test
[...]
sub dispatch {
dispatch_ifelse(@_);
#dispatch_hash(@_);
#dispatch_callname(@_);
#dispatch_anonsub(@_);
}
sub test_dispatch_all {
dispatch(undef);
dispatch("summary");
[...]
dispatch("tag");
dispatch("unknown");
dispatch("tag();injected();");
}
test_dispatch_all() foreach (1..10000);
run with '$ time ./test.pl > /dev/null' has shown that (suprise, suprise!)
that hash is fastest, then if...elsif...else variant, then
my $sub = \&{"git_$action"}; eval { &$sub() };
and last, much much worse is eval "..." version.
Of course test leaves something to be desired...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: packs and trees
From: Nicolas Pitre @ 2006-06-20 20:51 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Jon Smirl, git
In-Reply-To: <46a038f90606201241x3dec242dicde245a24c3ab9ab@mail.gmail.com>
On Wed, 21 Jun 2006, Martin Langhoff wrote:
> On 6/21/06, Nicolas Pitre <nico@cam.org> wrote:
> > On Tue, 20 Jun 2006, Martin Langhoff wrote:
> >
> > > On 6/20/06, Jon Smirl <jonsmirl@gmail.com> wrote:
> > > > The plan is to modify rcs2git from parsecvs to create all of the git
> > > > objects for the tree.
> > >
> > > Sounds like a good plan. Have you seen recent discussions about it
> > > being impossible to repack usefully when you don't have trees (and
> > > resulting performance problems on ext3).
> >
> > What do you mean?
>
> I was thinking of the "repacking disconnected objects" thread, but now
> I see it did have a solution in listing all the objects and paths. I
> take that back.
OK.
Nicolas
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Petr Baudis @ 2006-06-20 20:10 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79921$u0e$1@sea.gmane.org>
Dear diary, on Tue, Jun 20, 2006 at 06:51:18PM CEST, I got a letter
where Jakub Narebski <jnareb@gmail.com> said that...
> * Add git fetch URL to the project page from gitweb-xmms2. Needs site-wide
> base_url, which need not to be set as there is sane default: use base
> of gitweb URL.
>
> Is it useful to allow repository configuration to override it?
Certainly. E.g. http://pasky.or.cz/gitweb.cgi hosts some random projects
but generally they are to be fetched from totally different locations.
> * Refactor dispatch from if...elsif...else construction
> to using 'name' => \&sub hash.
In other words, you say the result of the IRC discussion we had about
symbol lookups and evals turned out really scary? ;-)
> * gitweb-xmms2 has something called committags support: it means that
> 'BUG(n)', 'FEATURE(n)' and 'RELEASE: xx' in commit message are turned into
> bugtracker (Mantis for xmms2) or wiki links. It is extension of turning
> sha1-ids into references. Probably needs some extra configuration file,
> and some per repository configuration. Of course we want to support not
> only Mantis, but also e.g. Bugzilla (e.g. Linux kernel) and conventions
> for marking bugs therein.
For Bugzilla, just /\bbug (\d+)/i is frequently used so many people are
probably used to it while it feels natural and doesn't make you tumble
over it when reading the message.
For these things it's simplest to give the user ability to specify some
regexp substitutions to be applied on commit messages.
About sha1 turned to references, I don't think that's practical until
you will have some way of finding out whether a given sha1 is a valid
object reference without Theta(n) forks.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Jakub Narebski @ 2006-06-20 19:56 UTC (permalink / raw)
To: git
In-Reply-To: <46a038f90606201233p6283febbn9a46e36c3a666903@mail.gmail.com>
Martin Langhoff wrote:
> On 6/21/06, Jakub Narebski <jnareb@gmail.com> wrote:
>>
>> * Add (of course optional, like blame support) snapshot support. There are
>> at least two different implementations. I'd prefer to do without second
>> CGI script, but perhaps this is better from the performance point of view.
>> gitweb-xmms2 has snapshot.cgi in Python: should it be rewritten in Perl?
>
> I intend to post a patch that adds snapshot support in Perl, in the
> main code. Just need to make it optional ;-)
Check http://marc.theaimsgroup.com/?l=git&m=111909432415478&w=2 for
in the main code snapshot implementation.
http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary
http://www.liacs.nl/~sverdool/gitweb.git
Would separate snapshot CGI script make it work faster?
>> Any further ideas for other useful features?
>
> Now what I think would rock too is something similar to gitk's "nearby
> tags" feature. When reading a commit, it lists the heads and tags that
> this commit is part of. It's very useful. Now I'll have to read up on
> how gitk does it.
If I remember correctly, it was done in the background, and it was done
at least partially _in_ gitk (Tcl/Tk).
> And, as you mention in your other post, mod_perl support. And a bit of
> speed. Gitweb right now is really really slow.
Perhaps mod_cache would help. Especially if cache can be configured to
look only at the hash part, plus formatting (normal, plain/raw, blame,
search match highlighting).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Junio C Hamano @ 2006-06-20 19:46 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79921$u0e$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
> I am planning on copying features from xmms2's gitweb version
> to git's gitweb, and introducing new ones.
>
> Which of those should be implemented first?
Clean-ups and obvious fixes without introducing new features
first please.
> * Add (of course optional, like blame support) snapshot support. There are
> at least two different implementations. I'd prefer to do without second
> CGI script, but perhaps this is better from the performance point of view.
> gitweb-xmms2 has snapshot.cgi in Python: should it be rewritten in Perl?
Isn't it just the matter of spawning git-tar-tree?
> * gitweb-xmms2 has something called committags support: it means that
> 'BUG(n)', 'FEATURE(n)' and 'RELEASE: xx' in commit message are turned into
> bugtracker (Mantis for xmms2) or wiki links. It is extension of turning
> sha1-ids into references. Probably needs some extra configuration file,
> and some per repository configuration. Of course we want to support not
> only Mantis, but also e.g. Bugzilla (e.g. Linux kernel) and conventions
> for marking bugs therein.
Yes, I found this quite nice.
BTW, are you in touch with xmms2 folks?
^ permalink raw reply
* Re: packs and trees
From: Martin Langhoff @ 2006-06-20 19:41 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Jon Smirl, git
In-Reply-To: <Pine.LNX.4.64.0606201102410.3377@localhost.localdomain>
On 6/21/06, Nicolas Pitre <nico@cam.org> wrote:
> On Tue, 20 Jun 2006, Martin Langhoff wrote:
>
> > On 6/20/06, Jon Smirl <jonsmirl@gmail.com> wrote:
> > > The plan is to modify rcs2git from parsecvs to create all of the git
> > > objects for the tree.
> >
> > Sounds like a good plan. Have you seen recent discussions about it
> > being impossible to repack usefully when you don't have trees (and
> > resulting performance problems on ext3).
>
> What do you mean?
I was thinking of the "repacking disconnected objects" thread, but now
I see it did have a solution in listing all the objects and paths. I
take that back.
If you are asking about the ext3 performance problems, I think Linus
discussed that a while ago, why unpacked repos are slow (in addition
to huge), and there were some suggestions of using hashed directory
indexes.
cheers,
martin
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Martin Langhoff @ 2006-06-20 19:33 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79921$u0e$1@sea.gmane.org>
On 6/21/06, Jakub Narebski <jnareb@gmail.com> wrote:
> I am planning on copying features from xmms2's gitweb version
> to git's gitweb, and introducing new ones.
Cool!
> * Storing site-wide gitweb configuration in separate gitweb.conf file.
> Needs GIT_CONFIG patch. Not implemented yet.
>
> Bootstrapping: gitweb would need location of configuration file.
> Has to be changed in gitweb.cgi itself. Additionally gitexecdir or
> git in PATH is needed to be able to run git-repo-config to read config;
> the solution might be home-grown "parser" to find gitexecdir only.
>
> Both could be set from Makefile at install stage.
There's been some discussion about reading GIT_CONFIG from %ENV (but
defaulting to the repo config). If GIT_CONFIG is set, I think we can
trick git-repo-config to parse it for us.
Now, I suspect we'll want to read _both_ the per-repo config and
GIT_CONFIG, which is likely to be /etc/gitweb.conf or similar.
> * Add git fetch URL to the project page from gitweb-xmms2. Needs site-wide
> base_url, which need not to be set as there is sane default: use base
> of gitweb URL.
>
> Is it useful to allow repository configuration to override it?
I think so, as mentioned above.
> * Add (of course optional, like blame support) snapshot support. There are
> at least two different implementations. I'd prefer to do without second
> CGI script, but perhaps this is better from the performance point of view.
> gitweb-xmms2 has snapshot.cgi in Python: should it be rewritten in Perl?
I intend to post a patch that adds snapshot support in Perl, in the
main code. Just need to make it optional ;-)
> * Code highlighting for plain view for blobs. gitweb-xmms2 did that using
> GNU highlight program and some embedded configuration (filename regexp to
> syntax used). More generic: run some post-processing. Configurable
> globally (perhaps separate "syntax type" filename or file magic mapping),
> and enabled per repository (default off).
Yep, probably a generic filter facility is better...
> * gitweb-xmms2 has something called committags support: it means that
> 'BUG(n)', 'FEATURE(n)' and 'RELEASE: xx' in commit message are turned into
> bugtracker (Mantis for xmms2) or wiki links. It is extension of turning
> sha1-ids into references. Probably needs some extra configuration file,
> and some per repository configuration. Of course we want to support not
> only Mantis, but also e.g. Bugzilla (e.g. Linux kernel) and conventions
> for marking bugs therein.
That would be great.
...
> Which of those should be implemented first?
I like the order the list has... but it's up to you.
> Any further ideas for other useful features?
Now what I think would rock too is something similar to gitk's "nearby
tags" feature. When reading a commit, it lists the heads and tags that
this commit is part of. It's very useful. Now I'll have to read up on
how gitk does it.
And, as you mention in your other post, mod_perl support. And a bit of
speed. Gitweb rght now is really really slow.
cheers,
martin
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Petr Baudis @ 2006-06-20 18:40 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79f3p$jcc$1@sea.gmane.org>
Dear diary, on Tue, Jun 20, 2006 at 08:34:38PM CEST, I got a letter
where Jakub Narebski <jnareb@gmail.com> said that...
> Petr Baudis wrote:
>
> > Nope, you get the stuff in $PATH_INFO. And having at least just the
> > project name in the path part would be quite nice, it's my common gripe
> > with cvsweb as I frequently get to mangle with the query part manually
> > (can be much faster than clicking around) and I have to carefully evade
> > the project name part, which is something I would really expect to be in
> > the "static" part of the URL.
>
> But without web server support I think you would need one copy/symbolic link
> per repository served.
Nope. As I said, the webserver stops in the path at the point it hits
the CGI and the rest is in $PATH_INFO.
> > When we are talking about URLs, it would be quite nice if the query
> > parameter names would be actually meaningful instead of some cryptic
> > 'h', 'pg' and whatnot.
>
> I guess that is because hash values are somewhat long (40 characters wide),
> so one letter parameter names were chosen to shorten URL.
I might argue that since the hash values are so long, few extra bytes
for having the names make some sense aren't going to hurt.
Thanks for the dictionary, though. :)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Jakub Narebski @ 2006-06-20 18:34 UTC (permalink / raw)
To: git
In-Reply-To: <20060620175505.GR2609@pasky.or.cz>
Petr Baudis wrote:
> Dear diary, on Tue, Jun 20, 2006 at 07:46:11PM CEST, I got a letter
> where Jakub Narebski <jnareb@gmail.com> said that...
>> Add to that the fact that above needs some support from web server
>> (e.g. Apache's mod_rewrite) and web server configuration, while gitweb tries
>> to be server agnostic...
>
> Nope, you get the stuff in $PATH_INFO. And having at least just the
> project name in the path part would be quite nice, it's my common gripe
> with cvsweb as I frequently get to mangle with the query part manually
> (can be much faster than clicking around) and I have to carefully evade
> the project name part, which is something I would really expect to be in
> the "static" part of the URL.
But without web server support I think you would need one copy/symbolic link
per repository served.
> When we are talking about URLs, it would be quite nice if the query
> parameter names would be actually meaningful instead of some cryptic
> 'h', 'pg' and whatnot.
I guess that is because hash values are somewhat long (40 characters wide),
so one letter parameter names were chosen to shorten URL.
Dictionary:
'a' - action (e.g. summary, log, commitdiff, blob, tree)
'o' - order by (for sorting tables)
'p' - project (might include category/directory: cogito/cogito.git,
git/git.git, git/gitk.git)
'f' - filename (I plan to move it before hash-valued parameters,
perhaps except hb which usually is symbolic)
'pg' - page
's' - searchtext (shouldn't it be 'q', from querystring?)
'h' - hash
'hp' - hash parent (not used yet I think)
'hb' - hash base (i.e. head or tag; underused I think)
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Petr Baudis @ 2006-06-20 17:55 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79c8t$8sd$1@sea.gmane.org>
Dear diary, on Tue, Jun 20, 2006 at 07:46:11PM CEST, I got a letter
where Jakub Narebski <jnareb@gmail.com> said that...
> Add to that the fact that above needs some support from web server
> (e.g. Apache's mod_rewrite) and web server configuration, while gitweb tries
> to be server agnostic...
Nope, you get the stuff in $PATH_INFO. And having at least just the
project name in the path part would be quite nice, it's my common gripe
with cvsweb as I frequently get to mangle with the query part manually
(can be much faster than clicking around) and I have to carefully evade
the project name part, which is something I would really expect to be in
the "static" part of the URL.
When we are talking about URLs, it would be quite nice if the query
parameter names would be actually meaningful instead of some cryptic
'h', 'pg' and whatnot.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Jakub Narebski @ 2006-06-20 17:46 UTC (permalink / raw)
To: git
In-Reply-To: <87r71jspeo.wl%cworth@cworth.org>
Carl Worth wrote:
> On Tue, 20 Jun 2006 18:51:18 +0200, Jakub Narebski wrote:
>>
>> Any further ideas for other useful features?
>>
>
> Since you asked...
>
> From the first time I saw gitweb the feature I wanted was to put
> more useful information in the path of the URL rather than in the
> query string.
>
> One possible organization might be:
>
> /<project>/<commitish>/<path>[/<more_path> ...]
>
> I'd really like to be able to publish nice clean URLs (without any
> query component) for getting at particular branches within projects,
> for example.
>
> The above might not be entirely feasible in the face of hierachical
> project names containing '/' characters as they might then conflict
> with branch names.
And in the face of topic branches with names like 'js/lsfix' or
'gitweb/config'.
Add to that the fact that above needs some support from web server
(e.g. Apache's mod_rewrite) and web server configuration, while gitweb tries
to be server agnostic...
One of the part of HTML cleanup would be changing order of URL query string,
so that the human readable part is first.
P.S. I have forgot about:
* Check how gitweb.cgi behaves with mod_perl, and correct/add modifications
to support this mode better (and perhaps also FastCGI if it adds
anything).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Carl Worth @ 2006-06-20 17:33 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e79921$u0e$1@sea.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]
On Tue, 20 Jun 2006 18:51:18 +0200, Jakub Narebski wrote:
>
> Any further ideas for other useful features?
>
Since you asked...
From the first time I saw gitweb the feature I wanted was to put
more useful information in the path of the URL rather than in the
query string.
One possible organization might be:
/<project>/<commitish>/<path>[/<more_path> ...]
I'd really like to be able to publish nice clean URLs (without any
query component) for getting at particular branches within projects,
for example.
The above might not be entirely feasible in the face of hierachical
project names containing '/' characters as they might then conflict
with branch names.
Another general feature I'd like is for URLs to be as interchangeable
as possible between gitweb and command-line git tools. My goal is to
be able to push out a new branch and then send an email announcing the
branch with a single URL something like:
http://git.somewhere.org/project/branch
where this would obviously work if fed to a web browser, but ideally
would also be possible to feed to git-fetch or even git-clone perhaps
without requiring any user knowledge on how to mangle it first.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [RFC] gitweb wishlist and TODO list
From: Jakub Narebski @ 2006-06-20 16:51 UTC (permalink / raw)
To: git
I am planning on copying features from xmms2's gitweb version
to git's gitweb, and introducing new ones.
My gitweb can be seen at http://front.fuw.edu.pl/cgi-bin/jnareb/gitweb.cgi
Fetch from http://front.fuw.edu.pl/jnareb/scm/git.git/ (not checked!)
* HTML cleanup - ongoing process of replacing embedded style information
with CSS styling, adding classes and ids to elements. This is independent
on other changes. On top of 'next', as it needs style in separate CSS
file gitweb.css.
* Storing site-wide gitweb configuration in separate gitweb.conf file.
Needs GIT_CONFIG patch. Not implemented yet.
Bootstrapping: gitweb would need location of configuration file.
Has to be changed in gitweb.cgi itself. Additionally gitexecdir or
git in PATH is needed to be able to run git-repo-config to read config;
the solution might be home-grown "parser" to find gitexecdir only.
Both could be set from Makefile at install stage.
* Add git fetch URL to the project page from gitweb-xmms2. Needs site-wide
base_url, which need not to be set as there is sane default: use base
of gitweb URL.
Is it useful to allow repository configuration to override it?
* Support for categories from gitweb-xmms2. We can alternatively use
directory structure of git projects displayed by gitweb as categories.
Needs I think some site-wide configuration.
Question: where store categories? .git/category, like .git/description?
Use gitweb.category key? If yes, do convert description to repository key,
or perhaps use gitweb.descriptionfile? What should be priority of those
options if both are set: use repo-config for short (in project listing
and in page footer), and from file for long description on project page?
What if they don't match?
* Refactor dispatch from if...elsif...else construction
to using 'name' => \&sub hash.
* Refactor generation of navigation bar. There are at least two
implementations of that. With hash dispatch it would be easy to
list all possibilities.
* Add (of course optional, like blame support) snapshot support. There are
at least two different implementations. I'd prefer to do without second
CGI script, but perhaps this is better from the performance point of view.
gitweb-xmms2 has snapshot.cgi in Python: should it be rewritten in Perl?
* Code highlighting for plain view for blobs. gitweb-xmms2 did that using
GNU highlight program and some embedded configuration (filename regexp to
syntax used). More generic: run some post-processing. Configurable
globally (perhaps separate "syntax type" filename or file magic mapping),
and enabled per repository (default off).
* gitweb-xmms2 has something called committags support: it means that
'BUG(n)', 'FEATURE(n)' and 'RELEASE: xx' in commit message are turned into
bugtracker (Mantis for xmms2) or wiki links. It is extension of turning
sha1-ids into references. Probably needs some extra configuration file,
and some per repository configuration. Of course we want to support not
only Mantis, but also e.g. Bugzilla (e.g. Linux kernel) and conventions
for marking bugs therein.
* gitweb-xmms2 has also etags based anchors to mark function definitions
in blob view. I'm not sure it would be that usefull. LXR equivalent,
perhaps...
Which of those should be implemented first?
Any further ideas for other useful features?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: packs and trees
From: Jon Smirl @ 2006-06-20 16:33 UTC (permalink / raw)
To: Keith Packard; +Cc: Martin Langhoff, git
In-Reply-To: <1150816728.5382.27.camel@neko.keithp.com>
On 6/20/06, Keith Packard <keithp@keithp.com> wrote:
> > Even after spending eight hours building the changeset info iit is
> > still going to take it a couple of days to retrieve the versions one
> > at a time and write them to git. Reparsing 50MB delta files n^2/2
> > times is a major bottleneck for all three programs.
>
> The eight hours in question *were* writing out the deltas and packing
> the resulting trees. All that remained was to construct actual commit
> objects and write them out.
>
> The problem was that parsecvs's internals are structured so that this
> processes would take a large amount of memory, so I'm reworking the code
> to free stuff as it goes along.
How about writing out all of the revisions from the cvs file using the
yacc code the first time the file is encountered and parsed. Then you
only have to track git IDs and not all of those cumbersome CVS rev
numbers. When I was profiling parsecvs the hottest parts of the code
were extracting the revisions and comparing cvs rev numbers. Since the
git IDs are fixed size they work well in arrays and with pointer
compares for sorting. With the right data structure you should be able
to eliminate the CVS rev numbers that are so slow to deal with.
There are about 1M revisions in moz cvs. At eight byes for an ID and
eight bytes for a timestamp that is 16MB if ordering is achieved via
arrays. All of the symbols fit into 400K including pointers to their
revision. If the revs are written out as they are encountered there is
no need to save file names, but you do need one rev structure per
file. Throw in some more memory for relationship pointers. All of this
should fit into less than 100MB RAM.
>
> With a rewritten parsecvs, I'm hoping to be able to steal the algorithms
> from cvs2svn and stick those in place. Then work on truncating the
> history so it can deal with incremental updates to the repository, which
> I think will be straightforward if we stick a few breadcrumbs in the git
> repository to recover state from.
>
> --
> keith.packard@intel.com
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQBEmBHYQp8BWwlsTdMRAvKAAJ9im3xBdUowt9af+/MtoYDXsCHGtACaAtG4
> GygX7WgiFOamLrnTMzWkIPE=
> =28dp
> -----END PGP SIGNATURE-----
>
>
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply
* Re: [Q] what to do when waitpid() returns ECHILD under signal(SIGCHLD, SIG_IGN)?
From: Edgar Toernig @ 2006-06-20 16:09 UTC (permalink / raw)
To: git
In-Reply-To: <7vwtbc7ll6.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
>
> Somebody I met last week in Japan reported that the socks client
> he uses to cross the firewall to connect to git:// port from his
> company environment seems to do signal(SIGCHLD, SIG_IGN) before
> spawning git.
Similar problems occasionally happen with SIGPIPE. There are apps[1]
that spawn processes with SIGPIPE set to SIG_IGN giving unexpected
results, i.e. child processes that still try to produce output
(getting EPIPE on every printf, but who checks printf errors?) even
if the pipe-reader (e.g. their parent) is long gone.
Ciao, ET.
[1] i.e. KDE had this bug - don't know if it's still there.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox