* Re: [ANNOUNCE] Git wiki
From: Petr Baudis @ 2006-05-03 19:30 UTC (permalink / raw)
To: David Lang; +Cc: Jakub Narebski, git
In-Reply-To: <Pine.LNX.4.62.0605031218570.12716@qynat.qvtvafvgr.pbz>
Dear diary, on Wed, May 03, 2006 at 09:21:54PM CEST, I got a letter
where David Lang <dlang@digitalinsight.com> said that...
> On Wed, 3 May 2006, Jakub Narebski wrote:
>
> >As to content, we could I think use material found at Wikipedia Git page,
> >and on External Links in Wikipedia Git_(software) article, not repeating of
> >course what is in official Git Documentation/
>
> please go ahead and put a lot of the info that is in the GIT
> Documentation/ on the wiki. it's far easier to go to one site and browse
> around to find things then to run into issues where you have to go
> somewhere else (with different tools) to find the info.
>
> even if you just put all the documentation files there, as-is (as text
> files even, no hyperlinks in them) they should still be there.
Then who will keep it in sync (BOTH ways)? That would be quite a lot of
work, I think.
That said, having the documentation in a wiki is not a bad idea per se,
but you need to keep things consistent and converging. And I believe
(and hope) that killing Documentation/ directory is no option - I hate
it when documentation of software I installed just tells me "look at
this URI" (which documents a different version anyway, and it's all very
useful when I'm sitting in a train with my notebook).
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time. I think
I have forgotten this before.
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: David Lang @ 2006-05-03 19:46 UTC (permalink / raw)
To: Petr Baudis; +Cc: Jakub Narebski, git
In-Reply-To: <20060503193013.GN27689@pasky.or.cz>
On Wed, 3 May 2006, Petr Baudis wrote:
> Dear diary, on Wed, May 03, 2006 at 09:21:54PM CEST, I got a letter
> where David Lang <dlang@digitalinsight.com> said that...
>> On Wed, 3 May 2006, Jakub Narebski wrote:
>>
>>> As to content, we could I think use material found at Wikipedia Git page,
>>> and on External Links in Wikipedia Git_(software) article, not repeating of
>>> course what is in official Git Documentation/
>>
>> please go ahead and put a lot of the info that is in the GIT
>> Documentation/ on the wiki. it's far easier to go to one site and browse
>> around to find things then to run into issues where you have to go
>> somewhere else (with different tools) to find the info.
>>
>> even if you just put all the documentation files there, as-is (as text
>> files even, no hyperlinks in them) they should still be there.
>
> Then who will keep it in sync (BOTH ways)? That would be quite a lot of
> work, I think.
>
> That said, having the documentation in a wiki is not a bad idea per se,
> but you need to keep things consistent and converging. And I believe
> (and hope) that killing Documentation/ directory is no option - I hate
> it when documentation of software I installed just tells me "look at
> this URI" (which documents a different version anyway, and it's all very
> useful when I'm sitting in a train with my notebook).
I agree with this completely.
as for keeping it in sync, the ideal situation would be for a
documentation manager to take that job ;-) but lacking that just put the
documentation in a non-editable page somewhere and link to it from the
wiki (this could even be pages at kernel.org or wherever you have the raw
source available outside of git itself)
David Lang
--
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
-- C.A.R. Hoare
^ permalink raw reply
* Re: Problem using GIT CVS-server
From: Junio C Hamano @ 2006-05-03 19:49 UTC (permalink / raw)
To: Martin Langhoff; +Cc: git, Panagiotis Issaris
In-Reply-To: <46a038f90605030411o29af1d1bra3276353347516f6@mail.gmail.com>
"Martin Langhoff" <martin.langhoff@gmail.com> writes:
> On 5/3/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:
>> Hmmm. 100% reproduceable -- looking at it now.
>
> Grumble. Some recent change has broken cvsserver -- if I rewind to the
> commit I made of cvsserver, the checkout works correctly. I suspect
> changes to git-diff-tree. However, I'll play dumb and try bisect to
> see where it leads...
Ah, the "master" git-log is C-rewrite version and does not show
the parents on the "commit (.*)" line itself with --parents.
Could you see if the attached patch helps?
When Linus and I did the rewrite, we tried to be somewhat
careful not to break people's expectations, but at the same
time, we considered that the log/show/whatchanged frontends to
rev-list are primarily for human consumption, so we "improved"
the details a bit [*1*], which obviously broke cvsserver's use
of git-log.
*1* Another difference I know about is that whatchanged used to
start an entry with "diff-tree" but now says "commit" like
others in "log" family of frontends.
-- >8 --
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 11d153c..71e384c 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2076,14 +2076,15 @@ sub update
# TODO: log processing is memory bound
# if we can parse into a 2nd file that is in reverse order
# we can probably do something really efficient
- my @git_log_params = ('--parents', '--topo-order');
+ my @git_rl_params = ('--parents', '--topo-order', '--pretty');
if (defined $lastcommit) {
- push @git_log_params, "$lastcommit..$self->{module}";
+ push @git_rl_params, "$lastcommit..$self->{module}";
} else {
- push @git_log_params, $self->{module};
+ push @git_rl_params, $self->{module};
}
- open(GITLOG, '-|', 'git-log', @git_log_params) or die "Cannot call git-log: $!";
+ open(GITLOG, '-|', 'git-rev-list',
+ @git_rl_params) or die "Cannot call git-rev-list: $!";
my @commits;
^ permalink raw reply related
* Re: [ANNOUNCE] Git wiki
From: Petr Baudis @ 2006-05-03 20:07 UTC (permalink / raw)
To: David Lang; +Cc: Jakub Narebski, git
In-Reply-To: <Pine.LNX.4.62.0605031243230.12716@qynat.qvtvafvgr.pbz>
Dear diary, on Wed, May 03, 2006 at 09:46:33PM CEST, I got a letter
where David Lang <dlang@digitalinsight.com> said that...
> as for keeping it in sync, the ideal situation would be for a
> documentation manager to take that job ;-) but lacking that just put the
> documentation in a non-editable page somewhere and link to it from the
> wiki (this could even be pages at kernel.org or wherever you have the raw
> source available outside of git itself)
Well, that one is pretty easy.
http://www.kernel.org/pub/software/scm/git/docs/
http://www.kernel.org/pub/software/scm/cogito/docs/
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time. I think
I have forgotten this before.
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: Junio C Hamano @ 2006-05-03 20:58 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0605030817580.4086@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Which brings me to the final point, which is that I think the hg team was
> very active and supporting, perhaps Matt himself. That's _important_ - the
> OpenSolaris people probably felt very comfortable with strong support from
> the developers. It can often be _the_ best (and biggest) reason to choose
> any product - regardless of anything else.
I agree with this 100%. I happened to be talking with Eric
about the clone breakage he was having on #git channel, and I
asked him to help me diagnose the problem, which resulted in the
solution we saw on the list. It turned out to be the same
"1.2.2 works but 1.2.4 not" problem OpenSolaris evaluator was
having. I was never contacted from somebody in the OpenSolaris
circle during the whole exercise.
But reading their Mercurial report apparently suggests that
their hg evaluator was with direct contact with the right
community from early on. I still do not even know (I've seen it
once in _their_ report) who the git evaluator on their end was.
I am not surprised that the difference in depth of involvements
and contact between the development community and the respective
evaluator contributed to the result in a major way.
> Even if I think the git mailing list itself is very responsive, I think
> the hg people were just more directly and actively involved. For git, they
> had to come to us.
That is _very_ unfair to me. It is not like git and hg both
submitted proposals to be chosen by them and then we dropped the
ball by not supporting them properly. They have to come to us.
The time I personally became aware about their DSCM selection
contest was when its initial phase was almost over; even if I
were willing to help them, it was too late. And no, I do not
have enough time to go fishing for such opportunities everywhere
to help many random projects, either.
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: Junio C Hamano @ 2006-05-03 21:01 UTC (permalink / raw)
To: git
In-Reply-To: <7vy7xibzbj.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> I agree with this 100%. I happened to be talking with Eric
> about the clone breakage he was having on #git channel, and I
Sorry, my memory is failing. It was Oejet I was talking with.
^ permalink raw reply
* Re: Problem using GIT CVS-server
From: Martin Langhoff @ 2006-05-03 21:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Panagiotis Issaris
In-Reply-To: <7v1wvaevno.fsf@assigned-by-dhcp.cox.net>
On 5/4/06, Junio C Hamano <junkio@cox.net> wrote:
> Ah, the "master" git-log is C-rewrite version and does not show
> the parents on the "commit (.*)" line itself with --parents.
Exactly.
> Could you see if the attached patch helps?
Will try it in a moment. Having thought about it, git-log is always
going to be tweaked for human consumption, so I should use something
geared for porcelains instead. git-rev-list does honour --parent, so
perhaps I should switch to using that instead?
cheers,
martin
^ permalink raw reply
* Re: Problem using GIT CVS-server
From: Junio C Hamano @ 2006-05-03 21:21 UTC (permalink / raw)
To: Martin Langhoff; +Cc: git
In-Reply-To: <46a038f90605031412s363b4a79p548c75956b00adbf@mail.gmail.com>
"Martin Langhoff" <martin.langhoff@gmail.com> writes:
>> Could you see if the attached patch helps?
>
> Will try it in a moment. Having thought about it, git-log is always
> going to be tweaked for human consumption, so I should use something
> geared for porcelains instead. git-rev-list does honour --parent, so
> perhaps I should switch to using that instead?
I think that reasoning is prudent, but at the same time I think
the patch by Linus is also right, so I think we should do both
for this particular case.
Sorry about the breakage.
^ permalink raw reply
* [PATCH] blame: Fix path pruning
From: Fredrik Kuivinen @ 2006-05-03 21:28 UTC (permalink / raw)
To: git; +Cc: junkio
This makes git-blame useable again, it has been totally broken for
some time on larger repositories.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
blame.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/blame.c b/blame.c
index 07d2d27..99ceea8 100644
--- a/blame.c
+++ b/blame.c
@@ -515,9 +515,9 @@ static int compare_tree_path(struct rev_
paths[1] = NULL;
diff_tree_setup_paths(get_pathspec(revs->prefix, paths),
- &revs->diffopt);
+ &revs->pruning);
ret = rev_compare_tree(revs, c1->tree, c2->tree);
- diff_tree_release_paths(&revs->diffopt);
+ diff_tree_release_paths(&revs->pruning);
return ret;
}
@@ -531,9 +531,9 @@ static int same_tree_as_empty_path(struc
paths[1] = NULL;
diff_tree_setup_paths(get_pathspec(revs->prefix, paths),
- &revs->diffopt);
+ &revs->pruning);
ret = rev_same_tree_as_empty(revs, t1);
- diff_tree_release_paths(&revs->diffopt);
+ diff_tree_release_paths(&revs->pruning);
return ret;
}
@@ -834,7 +834,7 @@ int main(int argc, const char **argv)
args[0] = filename;
args[1] = NULL;
- diff_tree_setup_paths(args, &rev.diffopt);
+ diff_tree_setup_paths(args, &rev.pruning);
prepare_revision_walk(&rev);
process_commits(&rev, filename, &initial);
^ permalink raw reply related
* Re: [RFC] Terms to add to glossary
From: Jon Loeliger @ 2006-05-03 21:41 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Git List
In-Reply-To: <e332g6$hpl$1@sea.gmane.org>
On Sun, 2006-04-30 at 14:18, Jakub Narebski wrote:
> I'd like the following terms to be added to and described in git glossary:
> Any takers?
If someone hasn't beaten me to it, I have (most)
of them read to be sent in... Lemme go home
and dig around some...
jdl
^ permalink raw reply
* [WARNING] please stop using git.git "next" for now
From: Junio C Hamano @ 2006-05-03 21:53 UTC (permalink / raw)
To: git; +Cc: linux-kernel
I just noticed there is a breakage in write-tree optimization
that uses the new cache-tree data structure in the "next"
branch. Switching branches with "git checkout anotherbranch"
when your index exactly matches the current HEAD commit and then
immediately doing write-tree produces a nonsense tree, and
commits on top of that results in tree objects that have
duplicated entries.
I will be working on a fix now, but in the meantime please do
not use the "next" branch for real work. Sorry for the
breakage.
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: Linus Torvalds @ 2006-05-03 22:13 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vy7xibzbj.fsf@assigned-by-dhcp.cox.net>
On Wed, 3 May 2006, Junio C Hamano wrote:
>
> > Even if I think the git mailing list itself is very responsive, I think
> > the hg people were just more directly and actively involved. For git, they
> > had to come to us.
>
> That is _very_ unfair to me. It is not like git and hg both
> submitted proposals to be chosen by them and then we dropped the
> ball by not supporting them properly. They have to come to us.
Oh, sorry, I didn't mean it in that way. Of _course_ they should have come
to us with their issues.
So I don't think git was doing anything wrong there, I was just stating it
as a neutral fact, rather than any criticism - the hg people were involved
(and I think they were pushing it), and the git people weren't, because
they never came to us.
Not a big deal. I actually think we'll be better off with some competition
to keep us on our toes.
Linus
^ permalink raw reply
* Re: git-log --parents broken post v1.3.0
From: Martin Langhoff @ 2006-05-03 22:14 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git, Junio C Hamano
In-Reply-To: <Pine.LNX.4.64.0605030745550.4086@g5.osdl.org>
On 5/4/06, Linus Torvalds <torvalds@osdl.org> wrote:
> That said, I suspect a git-cvsserver kind of usage is better off using
> "git-rev-list --parents HEAD" instead, which didn't break in the first
> place.
After a good sleep, I woke up thinking exactly the same. Patch coming soon.
m
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: Sam Ravnborg @ 2006-05-03 22:39 UTC (permalink / raw)
To: Linus Torvalds
Cc: Theodore Tso, Andreas Ericsson, Shawn Pearce, Nicolas Pitre,
Paolo Ciarrocchi, Petr Baudis, Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.64.0605030958370.4086@g5.osdl.org>
On Wed, May 03, 2006 at 10:06:25AM -0700, Linus Torvalds wrote:
> Even the "everyday git in 20 commands" actually starts out scaring people
> with listing commands that they don't need to know about immediately.
20 commands is much more than I use in my daily use of git.
Lets see:
git clone
git diff
git reset --hard
git ls-files
git grep
git add
git rm
cg-commit
cg-restore
git push
git am
I may have missed one or two - but this is it. Lees then 20.
And I never use pack or fsck.
It is not that difficult. A few cogito commands creeped in also. I just
find them easier to use.
In other words - the tutorials are covering too much as stated by
others.
Sam
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: Petr Baudis @ 2006-05-03 22:46 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linus Torvalds, Theodore Tso, Andreas Ericsson, Shawn Pearce,
Nicolas Pitre, Paolo Ciarrocchi, Junio C Hamano, git
In-Reply-To: <20060503223932.GA28081@mars.ravnborg.org>
Dear diary, on Thu, May 04, 2006 at 12:39:32AM CEST, I got a letter
where Sam Ravnborg <sam@ravnborg.org> said that...
> 20 commands is much more than I use in my daily use of git.
>
> Lets see:
> git clone
> git diff
> git reset --hard
> git ls-files
> git grep
> git add
> git rm
> cg-commit
> cg-restore
> git push
> git am
I think git ls-files isn't used directly very frequently. OTOH, you
don't use cg-log or git log and cg-status/git status? :) Also, most
people will pull.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time. I think
I have forgotten this before.
^ permalink raw reply
* [PATCH] cvsserver: use git-rev-list instead of git-log
From: Martin Langhoff @ 2006-05-03 22:53 UTC (permalink / raw)
To: git, junkio; +Cc: Martin Langhoff
In-Reply-To: <Pine.LNX.4.64.0605030745550.4086@g5.osdl.org>
On 5/4/06, Linus Torvalds <torvalds@osdl.org> wrote:
> No it wasn't. "git log --parents" was definitely supposed to still work.
>
> That said, I suspect a git-cvsserver kind of usage is better off using
> "git-rev-list --parents HEAD" instead, which didn't break in the first
> place.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
---
git-cvsserver.perl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
a248c9614fdd130229fb5f9565abbd77bd1d0cc9
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 11d153c..ffd9c66 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2076,14 +2076,15 @@ sub update
# TODO: log processing is memory bound
# if we can parse into a 2nd file that is in reverse order
# we can probably do something really efficient
- my @git_log_params = ('--parents', '--topo-order');
+ my @git_log_params = ('--pretty', '--parents', '--topo-order');
if (defined $lastcommit) {
push @git_log_params, "$lastcommit..$self->{module}";
} else {
push @git_log_params, $self->{module};
}
- open(GITLOG, '-|', 'git-log', @git_log_params) or die "Cannot call git-log: $!";
+ # git-rev-list is the backend / plumbing version of git-log
+ open(GITLOG, '-|', 'git-rev-list', @git_log_params) or die "Cannot call git-rev-list: $!";
my @commits;
--
1.3.1.g24e1-dirty
^ permalink raw reply related
* Re: [ANNOUNCE] Git wiki
From: Joel Becker @ 2006-05-03 22:50 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
In-Reply-To: <20060503224645.GR27689@pasky.or.cz>
On Thu, May 04, 2006 at 12:46:45AM +0200, Petr Baudis wrote:
> I think git ls-files isn't used directly very frequently. OTOH, you
> don't use cg-log or git log and cg-status/git status? :) Also, most
> people will pull.
I use git ls-files, becuase it's the only way I know how to
blow away dirty state that added files. I ran into this just yesterday,
actually. git checkout -f won't remove files that are unknown.
$ git ls-files -o | xargs rm -rf
Joel
--
Life's Little Instruction Book #452
"Never compromise your integrity."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply
* Re: [ANNOUNCE] Git wiki
From: Petr Baudis @ 2006-05-03 23:05 UTC (permalink / raw)
To: Joel Becker; +Cc: git
In-Reply-To: <20060503225056.GT4226@ca-server1.us.oracle.com>
Dear diary, on Thu, May 04, 2006 at 12:50:56AM CEST, I got a letter
where Joel Becker <Joel.Becker@oracle.com> said that...
> On Thu, May 04, 2006 at 12:46:45AM +0200, Petr Baudis wrote:
> > I think git ls-files isn't used directly very frequently. OTOH, you
> > don't use cg-log or git log and cg-status/git status? :) Also, most
> > people will pull.
>
> I use git ls-files, becuase it's the only way I know how to
> blow away dirty state that added files. I ran into this just yesterday,
> actually. git checkout -f won't remove files that are unknown.
>
> $ git ls-files -o | xargs rm -rf
You can use cg-clean, and I think Git has got git-clean added recently.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time. I think
I have forgotten this before.
^ permalink raw reply
* Re: gitk highlight feature
From: Paul Mackerras @ 2006-05-03 23:08 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0605030946260.4086@g5.osdl.org>
Linus Torvalds writes:
> So far, what I've wanted to highlight by is:
>
> - "does it touch this file/directory/pathspec"
>
> This is _close_ to "git-rev-list", and you can (and do) actually
> implement it as that, but it's stupid to do it that way. You just spend
> extra time. It's literally much better to do
>
> cat commit-list | git-diff-tree -s --stdin -- <pathspec>
>
> which is a hell of a lot more efficient, since you already have the
On my G5:
$ git-rev-list HEAD >all-revs
$ time git-rev-list HEAD -- arch/powerpc >ppc-revs
real 0m2.463s
user 0m2.265s
sys 0m0.191s
$ time git-diff-tree -s --stdin -- arch/powerpc <all-revs >ppc-revs2
real 0m5.269s
user 0m4.794s
sys 0m0.462s
$ wc ppc-revs*
892 892 36572 ppc-revs
5875 5875 240875 ppc-revs2
Why does git-diff-tree -s --stdin produce so many more revisions than
git-rev-list? The git-diff-tree output includes commits such as
6ba815de, which only affects arch/i386/kernel/timers/timer_tsc.c.
Confused.
> commit-list you're interested in (and, in fact, this allows you to do
> things efficiently only for the current _visible_ commits, if you want
> to, which might be an important optimization for large views).
I'd have to try it. The overhead of fork/exec/process startup might
be too much to do every time the user scrolls the window, though.
Maybe what we need is some way to have git-diff-tree run as a helper
process where I can write some commits to it, then write something
that says "that's all for now" and have it finish what it's doing,
write some "end of output" indicator and flush its output buffers -
and still have the process and the pipes to/from it available for
another round later.
> - "Does the author/committer match xyz*"
>
> I ended up using the "search" button for this, and it worked, but the
> highlight feature would just have done it much better. Especially if
> there was a way to do "go to next highlight", instead of just "go to
> next commit"
The "/" and "?" keys go to the next and previous find hit. It sounds
like the search function is actually what you want for this, since it
does highlight the commits that match, but maybe the problem is that
the yellow highlighting tends to go away too easily.
How about a way to do a search and use the results to create a
bold highlight, which will persist even if you do another search?
Either a separate "find & highlight" button, or a way to transfer the
current find hits to the highlight?
As for "go to next/previous highlight", that sounds useful. Rusty
wants "go to next/previous commit that is a child/parent of this one"
and "go to next/previous commit that is a descendent/ancestor of this
one and has a ref (tag, head, etc.)".
How about shift-up and shift-down for "go to previous/next highlight"?
Paul.
^ permalink raw reply
* Re: [WARNING] please stop using git.git "next" for now
From: Junio C Hamano @ 2006-05-03 23:13 UTC (permalink / raw)
To: git; +Cc: linux-kernel
In-Reply-To: <7virombwro.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> I just noticed there is a breakage in write-tree optimization
> that uses the new cache-tree data structure in the "next"
> branch. Switching branches with "git checkout anotherbranch"
> when your index exactly matches the current HEAD commit and then
> immediately doing write-tree produces a nonsense tree, and
> commits on top of that results in tree objects that have
> duplicated entries.
>
> I will be working on a fix now, but in the meantime please do
> not use the "next" branch for real work. Sorry for the
> breakage.
Two-way merge by read-tree forgot to invalidate the directories
a new element was added underneath. The fix is simple and will
be in the "next" I'll push out tonight.
Sorry for the noise.
^ permalink raw reply
* Re: gitk highlight feature
From: Linus Torvalds @ 2006-05-03 23:25 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
In-Reply-To: <17497.14311.121872.249120@cargo.ozlabs.ibm.com>
On Thu, 4 May 2006, Paul Mackerras wrote:
>
> On my G5:
>
> $ git-rev-list HEAD >all-revs
> $ time git-rev-list HEAD -- arch/powerpc >ppc-revs
> real 0m2.463s
> user 0m2.265s
> sys 0m0.191s
> $ time git-diff-tree -s --stdin -- arch/powerpc <all-revs >ppc-revs2
> real 0m5.269s
> user 0m4.794s
> sys 0m0.462s
Right. One of them prunes the history (git-rev-list). The other one does
not.
That said, you need an "-r", I guess, to "git-diff-tree".
> Why does git-diff-tree -s --stdin produce so many more revisions than
> git-rev-list?
I guess it's officially a FAQ by now: see the "bug in git log" thread the
other day, and
http://www.gelato.unsw.edu.au/archives/git/0604/19180.html
so in general you can get _more_ of the "real commits" with "git-rev-list
| git-diff-tree --stdin", because it won't prune out history on
uninteresting branches. At the same time, that effect is counter-acted by
git-diff-tree normally ignoring merges by default, which is a bigger
issue.
Your big problem is just the lack of "-r", though:
> The git-diff-tree output includes commits such as
> 6ba815de, which only affects arch/i386/kernel/timers/timer_tsc.c.
> Confused.
Without the -r, git-diff-tree won't actually recurse, so it hits the
"arch/" part (which does differ, and matches te revspec), and decides it's
done.
With the "-r" thing, you still have a noticeable difference, but now it's
due to the difference between "log" and "diff":
git-rev-list HEAD -- arch/powerpc | wc -l
-> 892
git-rev-list HEAD | git-diff-tree -r -s --stdin -- arch/powerpc/ | wc -l
-> 838
ie "diff" doesn't show merges nomally (with -m, you _will_ get merges, but
you'll sometimes get them twice - once against each parent ;)
Linus
^ permalink raw reply
* sha1_to_hex() usage cleanup
From: Linus Torvalds @ 2006-05-04 0:21 UTC (permalink / raw)
To: Junio C Hamano, Git Mailing List
Somebody on the #git channel complained that the sha1_to_hex() thing uses
a static buffer which caused an error message to show the same hex output
twice instead of showing two different ones.
That's pretty easily rectified by making it uses a simple LRU of a few
buffers, which also allows some other users (that were aware of the buffer
re-use) to be written in a more straightforward manner.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
This is another throw-away patch of mine. Not a big deal, but since I
tried it, I might as well try to submit it and see if Junio agrees..
diff --git a/diff.c b/diff.c
index 6762fce..c845c87 100644
--- a/diff.c
+++ b/diff.c
@@ -1018,14 +1018,12 @@ static void run_diff(struct diff_filepai
}
if (memcmp(one->sha1, two->sha1, 20)) {
- char one_sha1[41];
int abbrev = o->full_index ? 40 : DEFAULT_ABBREV;
- memcpy(one_sha1, sha1_to_hex(one->sha1), 41);
len += snprintf(msg + len, sizeof(msg) - len,
"index %.*s..%.*s",
- abbrev, one_sha1, abbrev,
- sha1_to_hex(two->sha1));
+ abbrev, sha1_to_hex(one->sha1),
+ abbrev, sha1_to_hex(two->sha1));
if (one->mode == two->mode)
len += snprintf(msg + len, sizeof(msg) - len,
" %06o", one->mode);
diff --git a/merge-tree.c b/merge-tree.c
index 50528d5..cc7b5bd 100644
--- a/merge-tree.c
+++ b/merge-tree.c
@@ -24,16 +24,14 @@ static const char *sha1_to_hex_zero(cons
static void resolve(const char *base, struct name_entry *branch1, struct name_entry *result)
{
- char branch1_sha1[50];
-
/* If it's already branch1, don't bother showing it */
if (!branch1)
return;
- memcpy(branch1_sha1, sha1_to_hex_zero(branch1->sha1), 41);
printf("0 %06o->%06o %s->%s %s%s\n",
branch1->mode, result->mode,
- branch1_sha1, sha1_to_hex_zero(result->sha1),
+ sha1_to_hex_zero(branch1->sha1),
+ sha1_to_hex_zero(result->sha1),
base, result->path);
}
diff --git a/sha1_file.c b/sha1_file.c
index f2d33af..5464828 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -108,9 +108,10 @@ int safe_create_leading_directories(char
char * sha1_to_hex(const unsigned char *sha1)
{
- static char buffer[50];
+ static int bufno;
+ static char hexbuffer[4][50];
static const char hex[] = "0123456789abcdef";
- char *buf = buffer;
+ char *buffer = hexbuffer[3 & ++bufno], *buf = buffer;
int i;
for (i = 0; i < 20; i++) {
^ permalink raw reply related
* Re: git-unpack-objects
From: Josh Boyer @ 2006-05-04 0:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.64.0605031054300.4086@g5.osdl.org>
On 5/3/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Wed, 3 May 2006, Josh Boyer wrote:
> > >
> > > That's what you just do "git repack -a -d" for.
> >
> > But that doesn't roll exsisting packs into a new pack, does it?
>
> It does. That's what the "-a" (for "all") does.
Odd. On one of my repos, I was seeing the correct behavior. On
another, there were multiple packs left after doing the 'git repack -a
-d'. Were there ever some packing bugs in older versions of git that
would have maybe produced some packs that wouldn't get deleted or
something?
At any rate, the above command does seem to do exactly what I want.
Thanks for the help.
josh
^ permalink raw reply
* [ANNOUNCE] Revamped Git homepage
From: Petr Baudis @ 2006-05-04 0:35 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andreas Ericsson, Shawn Pearce, Nicolas Pitre, Paolo Ciarrocchi,
Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.64.0605030817580.4086@g5.osdl.org>
Dear diary, on Wed, May 03, 2006 at 05:30:26PM CEST, I got a letter
where Linus Torvalds <torvalds@osdl.org> said that...
> However, I think the _real_ issue is that Mercurial has a much nicer
> introductory phase. The standard mercurial web-page is so much more
> professional and nice to look at than any git page I have ever seen, and
> let's face it: first looks _do_ count.
Yes, I've already learned earlier that this made quite a bad impression
on many people and had the homepage revamp on top of my TODO list for
the last few weeks.
Well, here we go, I've just uploaded a new version of the Git homepage;
I wonder how you feel about it now.
Obviously, it still feels rather empty and I'm certainly not much of
a webmaster myself, but I take patches and pull requests; see
http://git.or.cz/community.html for the Git homepage git repository
information.
I've borrowed Jonas Fonseca's ELinks homepage design first, but the
contents ended up almost entirely rewritten as well (except the Related
Tools section, which stayed mostly as it was). Git now poses as a real
version control system and the plumbing stuff is mentioned only in the
bottom paragraphs. ;-)
BTW, if anyone is into CSS and stuff, after half an hour of beating it
I couldn't manage to make the top bar look right - everything is shifted
slightly to the top. :/
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time. I think
I have forgotten this before.
^ permalink raw reply
* Re: sha1_to_hex() usage cleanup
From: Junio C Hamano @ 2006-05-04 0:36 UTC (permalink / raw)
To: git
In-Reply-To: <Pine.LNX.4.64.0605031717190.4086@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Somebody on the #git channel complained that the sha1_to_hex() thing uses
> a static buffer which caused an error message to show the same hex output
> twice instead of showing two different ones.
>
> That's pretty easily rectified by making it uses a simple LRU of a few
> buffers, which also allows some other users (that were aware of the buffer
> re-use) to be written in a more straightforward manner.
>
> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
> ---
>
> This is another throw-away patch of mine. Not a big deal, but since I
> tried it, I might as well try to submit it and see if Junio agrees..
Makes sort of sense in that the callers still need to be aware
of the magic 4 limit but as long as they are they do not have to
worry about allocation/deallocation/copying. But is that kind
of cheat maintainable? I dunno.
^ 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