* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: Andy Parkins @ 2007-09-07 7:41 UTC (permalink / raw)
To: git; +Cc: David Kastrup, Dmitry Kakurin, Linus Torvalds, Matthieu Moy
In-Reply-To: <85ejhb7yzw.fsf@lola.goethe.zz>
On Friday 2007 September 07, David Kastrup wrote:
(Disclaimer: I'm certainly not joining the "C++ for git" chant; this reply is
merely to the statements made about C++ in David's message).
> The problem with C++ is that every C++ developer has his own style,
> and reuse is an illusion within that style. Take a look at classes
> implementing matrix arithmetic: there are as many around as the day is
> long, and all of them are incompatible with one another.
One could say the same about any API. "Take a look at that C library libXYZ -
it does exactly the same thing as libPQR but all the function calls and
structures are different. Conclusion: C is shit". Obviously nonsense.
> With regard to programming styles, C++ does not support multiple
> inheritance. For a single project grown from a single start, you can
Multiple inheritance is the spawn of the devil, but C++ _does_ support it.
Forgetting about the terrible STL, to me there really is no difference between
C and C++; you can be object oriented in C. Take a look at the Linux kernel,
it should be printed out, rolled up and used to beat the ideas into students
learning C++/Java/C#. Object oriented design is a choice, and if you really
wanted you could do it in assembly.
I would imagine the reason people often turn up wanting to rewrite Linux and
git in C++ is because they are so object oriented in nature already and it's
natural to think "wouldn't this be even better if I wrote it in an object
oriented language"? Maybe, maybe not, but why bother?
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: David Kastrup @ 2007-09-07 7:40 UTC (permalink / raw)
To: Walter Bright; +Cc: git
In-Reply-To: <fbqmdu$udg$1@sea.gmane.org>
Walter Bright <boost@digitalmars.com> writes:
> Linus Torvalds wrote:
>> And if you want a fancier language, C++ is absolutely the worst one
>> to choose. If you want real high-level, pick one that has true
>> high-level features like garbage collection or a good system
>> integration, rather than something that lacks both the sparseness
>> and straightforwardness of C, *and* doesn't even have the high-level
>> bindings to important concepts.
>>
>> IOW, C++ is in that inconvenient spot where it doesn't help make
>> things simple enough to be truly usable for prototyping or simple
>> GUI programming, and yet isn't the lean system programming language
>> that C is that actively encourags you to use simple and direct
>> constructs.
>
> The D programming language is a different take than C++ has on growing
> C. I'm curious what your thoughts on that are (D has garbage
> collection, while still retaining the ability to directly manage
> memory). Can you enumerate what you feel are the important concepts?
A design is perfect not when there is no longer anything you can add
to it, but if there is no longer anything you can take away.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply
* Re: Subject: [PATCH] git-merge-pack
From: Junio C Hamano @ 2007-09-07 7:34 UTC (permalink / raw)
To: Johannes Sixt
Cc: Linus Torvalds, Johannes Schindelin, Nicolas Pitre, Nix,
Steven Grimm, Git Mailing List
In-Reply-To: <46E0F998.1080202@eudaptics.com>
Johannes Sixt <j.sixt@eudaptics.com> writes:
> Junio C Hamano schrieb:
>> This is a beginning of "git-merge-pack" that combines smaller
>> packs into one.
>
> This gives a new meaning to the term "merge". IMHO, "git-combine-pack"
> would be a better name.
Yeah, that makes sense, but I think this can and should be done
as part of pack-objects itself as Nico suggested.
So consider that patch scrapped for now.
^ permalink raw reply
* [PATCH] git-svn: fix "Malformed network data" with svn:// servers
From: Eric Wong @ 2007-09-07 7:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, 430091
In-Reply-To: <20070807134220.23420.qmail@c96e4a6cce1e57.315fe32.mid.smarden.org>
We have a workaround for the reparent function not working
correctly on the SVN native protocol servers. This workaround
opens a new connection (SVN::Ra object) to the new
URL/directory.
Since libsvn appears limited to only supporting one connection
at a time, this workaround invalidates the Git::SVN::Ra object
that is $self inside gs_fetch_loop_common(). So we need to
restart that connection once all the fetching is done for each
loop iteration to be able to run get_log() successfully.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
Gerrit Pape <pape@smarden.org> wrote:
> On Wed, Jul 04, 2007 at 02:07:42PM -0700, Eric Wong wrote:
> > Although this fixes blocking reads, this does *not* fix the
> > "Malformed network data" issue, which has been around for a
> > while...
> >
> > I'll try to find time to fix the "Malformed network data" bug
> > in a few days time, but it's not fatal (just restart git-svn,
> > this error happens at a point where it's not possible to have
> > a corrupted import).
>
> Hi, this still is a problem we face on Debian with 1.5.3-rc3
> http://bugs.debian.org/436142
> http://bugs.debian.org/430091
>
> I'm sorry, I didn't manage to provide a patch.
Sorry for the latency again.
git-svn.perl | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index d3c8cd0..7df4098 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3175,6 +3175,7 @@ sub gs_do_switch {
$reparented = 1;
} else {
$ra = Git::SVN::Ra->new($full_url);
+ $self->{-invalid} = 1;
}
}
$ra ||= $self;
@@ -3310,6 +3311,11 @@ sub gs_fetch_loop_common {
$min = $max + 1;
$max += $inc;
$max = $head if ($max > $head);
+ if ($self->{-invalid}) {
+ my $ra_url = $self->{url};
+ $self = undef;
+ $self = Git::SVN::Ra->new($ra_url);
+ }
}
}
--
Eric Wong
^ permalink raw reply related
* Re: very slow cherry-pick'ing (old-2.6-bkcvs tree)
From: Johannes Sixt @ 2007-09-07 7:27 UTC (permalink / raw)
To: Erez Zadok; +Cc: Git Mailing List
In-Reply-To: <200709062351.l86NpnAK004807@agora.fsl.cs.sunysb.edu>
Erez Zadok schrieb:
> Our group maintains Unionfs on the latest -rc kernel, but we also maintain
> several backports going all the way to 2.6.9. Once we complete the
> development and testing of a feature/fix in -latest, we cherry-pick those
> commits to older backports, and test those. When I cherry-pick from -latest
> to my 2.6.{22,21,20,19,18} repositories, it works reasonably fast. But when
> I cherry-pick to my 2.6.9 tree, it runs about 20 times slower! Why? Is
> there anything I can do to inspect what's going on and perhaps speed up the
> cherry-picking process?
>
> Some info:
>
> My 2.6.{18,19,20,21,22} trees were cloned from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.<N>.y.git
>
> My 2.6.9 tree, however, was cloned from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/old-2.6-bkcvs.git
>
> after which, I truncated the tree (git-reset) to Linus commit which read
> "Linux 2.6.9-final".
I *think* that the reason for this is that those repositories don't have any
commits in common (but I don't have clones to verify my claim). Since
cherry-pick does merge-recursive, it tries to find a suitable merge base,
but since there is no history in common, it walks both histories all the way
down only to find that there is no possible merge base.
You could improve the situation if you graft the histories together:
echo $first_commit_in_2.6.12 $suitable_commit_in_bkcvs > .git/info/grafts
-- Hannes
^ permalink raw reply
* Re: Subject: [PATCH] git-merge-pack
From: Andy Parkins @ 2007-09-07 7:24 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Linus Torvalds, Johannes Schindelin,
Nicolas Pitre, Nix, Steven Grimm
In-Reply-To: <7v1wdb9ymf.fsf_-_@gitster.siamese.dyndns.org>
On Friday 2007 September 07, Junio C Hamano wrote:
> builtin-merge-pack.c | 87
Can I suggest not calling it git-merge-pack? It makes it look like it's a new
merge strategy called "pack"...
git-merge-base
git-merge-file
git-merge-index
git-merge-octopus
git-merge-one-file
git-merge-ours
git-merge-recur
git-merge-recursive
git-merge-resolve
git-merge-stupid
git-merge-subtree
git-merge-tree
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: Walter Bright @ 2007-09-07 5:09 UTC (permalink / raw)
To: git
In-Reply-To: <alpine.LFD.0.999.0709070203200.5626@evo.linux-foundation.org>
Linus Torvalds wrote:
> And if you want a fancier language, C++ is absolutely the worst one to
> choose. If you want real high-level, pick one that has true high-level
> features like garbage collection or a good system integration, rather than
> something that lacks both the sparseness and straightforwardness of C,
> *and* doesn't even have the high-level bindings to important concepts.
>
> IOW, C++ is in that inconvenient spot where it doesn't help make things
> simple enough to be truly usable for prototyping or simple GUI
> programming, and yet isn't the lean system programming language that C is
> that actively encourags you to use simple and direct constructs.
The D programming language is a different take than C++ has on growing
C. I'm curious what your thoughts on that are (D has garbage collection,
while still retaining the ability to directly manage memory). Can you
enumerate what you feel are the important concepts?
^ permalink raw reply
* Re: Subject: [PATCH] git-merge-pack
From: Johannes Sixt @ 2007-09-07 7:11 UTC (permalink / raw)
To: Junio C Hamano
Cc: Linus Torvalds, Johannes Schindelin, Nicolas Pitre, Nix,
Steven Grimm, Git Mailing List
In-Reply-To: <7v1wdb9ymf.fsf_-_@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> This is a beginning of "git-merge-pack" that combines smaller
> packs into one.
This gives a new meaning to the term "merge". IMHO, "git-combine-pack" would
be a better name.
-- Hannes
^ permalink raw reply
* Re: rebase from ambiguous ref discards changes
From: Pierre Habouzit @ 2007-09-07 6:55 UTC (permalink / raw)
To: Keith Packard; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <1189133898.30308.58.camel@koto.keithp.com>
[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]
On Fri, Sep 07, 2007 at 02:58:18AM +0000, Keith Packard wrote:
> On Thu, 2007-09-06 at 16:26 -0700, Junio C Hamano wrote:
>
> > Perhaps you have ".git/master" by mistake?
>
> oops.
>
> $ find .git -name master
> ..git/master
> ..git/refs/heads/master
> ..git/refs/remotes/kyle/master
> ..git/refs/remotes/origin/master
> ..git/refs/remotes/otc/master
> ..git/logs/refs/heads/master
> ..git/logs/refs/remotes/fdo/master
> ..git/logs/refs/remotes/kyle/master
> ..git/logs/refs/remotes/origin/master
> ..git/logs/refs/remotes/otc/master
>
> So, I think that explains where the ambiguous master came from. Seems
> like rebase should be able to bail out before breaking things though.
Actually if I get this right, it didn't broke anything, it just
rebased your ".git/master" :) It just chose the wrong desambiguation for
some reason.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: David Kastrup @ 2007-09-07 6:52 UTC (permalink / raw)
To: Dmitry Kakurin; +Cc: Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <a1bbc6950709062009x59a41cb7re6051739c11e370c@mail.gmail.com>
"Dmitry Kakurin" <dmitry.kakurin@gmail.com> writes:
> ... and explain where I'm coming from:
> My goal is to *use* Git. When something does not work *for me* I want
> to be able to fix it (and contribute the fix) in *shortest time
> possible* and with *minimal efforts*. As for me it's a diversion from
> my main activities.
> The fact that Git is written in C does not really contribute to that goal.
> Suggestion to use C++ is the only alternative with existing C codebase.
> So while C++ may not be the best choice "academically speaking" it's
> pretty much the only practical choice.
Sorry, but for fixing things in C, I can look and work locally. For
fixing things in C++, I first need to understand the class
hierarchies used in the project.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: David Kastrup @ 2007-09-07 6:50 UTC (permalink / raw)
To: Dmitry Kakurin; +Cc: Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <a1bbc6950709061808q85cf75co75f2331dc2bdbcbe@mail.gmail.com>
"Dmitry Kakurin" <dmitry.kakurin@gmail.com> writes:
> I'll give you reasons why to use C++ for Git (not why C++ is better
> for any project in general, as that again would be pointless):
>
> 1. Good String class will make code much more readable (and
> significantly shorter)
> 2. Good Buffer class - same reason
> 3. Smart pointers and smart handles to manage memory and
> file/socket/lock handles.
But all of those are incompatible with another and require major
headaches and/or interface code to get to run with one another. And
then might use different interface styles, anyway.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: David Kastrup @ 2007-09-07 6:47 UTC (permalink / raw)
To: Dmitry Kakurin; +Cc: Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <a1bbc6950709061721r537b153eu1b0bb3c27fb7bd51@mail.gmail.com>
"Dmitry Kakurin" <dmitry.kakurin@gmail.com> writes:
> On 9/6/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>>
>> In other words: the choice of C is the only sane choice. I know
>> Miles Bader jokingly said "to piss you off", but it's actually
>> true. I've come to the conclusion that any programmer that would
>> prefer the project to be in C++ over C is likely a programmer that
>> I really *would* prefer to piss off, so that he doesn't come and
>> screw up any project I'm involved with.
>
> As dinosaurs (who code exclusively in C) are becoming extinct, you
> will soon find yourself alone with attitude like this.
As long as TeX, Emacs and vi are around, I would not worry too much
about dinosaurs in general. But C++ is a cancerous dinosaur. It has
growths that just don't belong on a C body.
> I was coding in Assembly when there was no C. Then in C before C++
> was created. Now days it's C++ and C#, and I have never looked
> back. Bad developers will write bad code in any language. But
> penalizing good developers for this illusive reason of repealing bad
> contributors is nonsense.
The problem with C++ is that every C++ developer has his own style,
and reuse is an illusion within that style. Take a look at classes
implementing matrix arithmetic: there are as many around as the day is
long, and all of them are incompatible with one another.
With regard to programming styles, C++ does not support multiple
inheritance. For a single project grown from a single start, you can
get reasonable solutions. But combining stuff is creating maintenance
messes.
With C, the situation is not dissimilar, but you spent less time
fighting the illusion that you don't need to reimplement, anyway.
> I just wanted to get a sense of how many people share this "Git
> should be in pure C" doctrine.
What nonsense. Large parts of git already are shell scripts, so
obviously there is no such doctrine. Just because C++ is not a sane
proposition does not mean that others might not work.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply
* Re: [ANNOUNCE] git/gitweb.git repository
From: David Symonds @ 2007-09-07 6:39 UTC (permalink / raw)
To: Petr Baudis; +Cc: git, jnareb, ltuikov
In-Reply-To: <ee77f5c20708312246u37f9c1bahe2211117abd05790@mail.gmail.com>
On 01/09/2007, David Symonds <dsymonds@gmail.com> wrote:
> On 31/08/07, David Symonds <dsymonds@gmail.com> wrote:
> > On 31/08/2007, Petr Baudis <pasky@suse.cz> wrote:
> > > Please feel encouraged to make random forks for your development
> > > efforts, or push your random patches (preferrably just bugfixes,
> > > something possibly controversial should be kept in safe containment like
> > > a fork or separate branch) to the mob branch.
> >
> > Sorry, I'm still relatively new to git, and couldn't work out how to
> > push to the mob branch, so it's inline below. It's fairly minor, just
> > adding <span title="foo">..</span> around author names when they get
> > abbreviated.
>
> Okay, I worked out how to push to the mob branch: it's commit 37c8546.
> I can refactor this somewhat if that's an issue.
Has anyone taken a look at this? If it's bad/unwanted, just tell me
and I'll drop it.
Dave.
^ permalink raw reply
* Re: [PATCH] Add a new lstat implementation based on Win32 API, and make stat use that implementation too.
From: David Kastrup @ 2007-09-07 6:36 UTC (permalink / raw)
To: Douglas Stockwell; +Cc: git
In-Reply-To: <46E08DE9.4060701@11011.net>
Douglas Stockwell <doug@11011.net> writes:
> David Kastrup wrote:
>> If anybody is as fortunate as to actually have Vista available, it
>> would be nice if he corroborated that relative links under Vista are
>> indeed (as Microsoft appears to claim) relative with regard to the
>> current work directory rather than the directory containing the link.
>
> I believe the wording "resolves the path relative to the current
> directory" actually refers to the creation of links, not to their use.
>
> C:\stest>ver
>
> Microsoft Windows [Version 6.0.6000]
[Examples]
Good. So we will ultimately be able to support symlinks on some
Windows versions.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: Andreas Ericsson @ 2007-09-07 6:31 UTC (permalink / raw)
To: Dmitry Kakurin; +Cc: Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <a1bbc6950709062009x59a41cb7re6051739c11e370c@mail.gmail.com>
Dmitry Kakurin wrote:
> On 9/6/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>> On Thu, 6 Sep 2007, Dmitry Kakurin wrote:
>>> As it is right now, it's too hard to see the high-level logic thru
>>> this endless-busy-work of micro-managing strings and memory.
>> Total BS. The string/memory management is not at all relevant. Look at the
>> code (I bet you didn't). This isn't the important, or complex part.
>
> Not only have I looked at the code, I've also debugged it quite a bit.
> Granted most of my problems had to do with handling paths on Windows
> (i.e. string manipulations).
>
> Let me snip "C is better than C++" part ...
>> [ snip ]
> ... and explain where I'm coming from:
> My goal is to *use* Git. When something does not work *for me* I want
> to be able to fix it (and contribute the fix) in *shortest time
> possible* and with *minimal efforts*. As for me it's a diversion from
> my main activities.
> The fact that Git is written in C does not really contribute to that goal.
Coupled with what you said in an earlier mail, namely
---%<---%<---
> Obviously C++ developers can contribute C code. But assuming that they
> prefer it that way is wrong.
>
> I was coding in Assembly when there was no C.
> Then in C before C++ was created.
> Now days it's C++ and C#, and I have never looked back.
---%<---%<---
Considering C appeared in 1972, and C++ appeared in 1985, you have been
writing C code for 13 years. And you're telling me that git being written
in C prevents you from contributing?
If you want to do something useful in C++ for git, make it easy for C++
programmers to write apps for it.
>
> Now, I realize that I'm a very infrequent contributor to Git, but I
> want my opinion to be heard.
> People who carry the main weight of developing and maintaining Git
> should make the call.
They already have, but every now and then someone comes along and suggest
a complete rewrite in some other language. So far we've had Java (there's
always one...), Python and now C++.
It happens to all projects, sooner or later. The funny thing is that all those
people that want their favourite software to be rewritten in their favourite
programming language always wants someone else to rewrite it for them.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: Significant performance waste in git-svn and friends
From: Steven Grimm @ 2007-09-07 6:28 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Eric Wong, Mike Hommey, git
In-Reply-To: <20070907045557.GY18160@spearce.org>
Shawn O. Pearce wrote:
> What will happen is you will get a packfile per git-svn fetch, so
> if you fetch 5 times that day you will get 5 packfiles that day.
> But you could also get 5 packfiles from git-fetch if each of those
> fetches brought in 100 or more new objects. So it really is not
> that big of a deal.
>
> At some point the number of packfiles gets out of control, but so
> does the number of loose objects. Repacking is the obvious fix in
> both cases.
This dovetails nicely with the "git gc --auto" work in progress,
particularly the recent patch to pack small packfiles together when
there get to be too many of them; run that at the end of every git-svn
fetch and the problem goes away.
-Steve
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: Andreas Ericsson @ 2007-09-07 6:25 UTC (permalink / raw)
To: Wincent Colaiuta; +Cc: Dmitry Kakurin, Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <D7BEA87D-1DCF-4A48-AD5B-0A3FDC973C8A@wincent.com>
Wincent Colaiuta wrote:
> El 7/9/2007, a las 2:21, Dmitry Kakurin escribió:
>
>> I just wanted to get a sense of how many people share this "Git should
>> be in pure C" doctrine.
>
> Count me as one of them. Git is all about speed, and C is the best
> choice for speed, especially in context of Git's workload.
>
Nono, hand-optimized assembly is the best choice for speed. C is just
a little more portable ;-)
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: Theodore Tso @ 2007-09-07 6:15 UTC (permalink / raw)
To: Dmitry Kakurin; +Cc: Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <a1bbc6950709062009x59a41cb7re6051739c11e370c@mail.gmail.com>
On Thu, Sep 06, 2007 at 08:09:23PM -0700, Dmitry Kakurin wrote:
> > Total BS. The string/memory management is not at all relevant. Look at the
> > code (I bet you didn't). This isn't the important, or complex part.
>
> Not only have I looked at the code, I've also debugged it quite a bit.
> Granted most of my problems had to do with handling paths on Windows
> (i.e. string manipulations).
I consider string manipulation to be one of the places where C++ is a
total disaster. It's way to easy for idiots to do something like this:
a = b + "/share/" + c + serial_num;
where you can have absolutely no idea how many memory allocations are
done, due to type coercions, overloaded operators (good God, you can
overload the comma operator in C++!!!), and then when something like
that ends up in an inner loop, the result is a disaster from a
performance point of view, and it's not even obvious *why*!
> My goal is to *use* Git. When something does not work *for me* I want
> to be able to fix it (and contribute the fix) in *shortest time
> possible* and with *minimal efforts*. As for me it's a diversion from
> my main activities.
Yes, and if you contribute something the shortest time possible, and
it ends up being crap, who gets to rewrite it and fix it? I've seen
too many C++ programs which get this kind of crap added, and it's not
noticed right away (because C++ is really good at hiding such
performance killers so they are not visible), and then later on, it's
even harder to find the performance problems and fix them.
> Now, I realize that I'm a very infrequent contributor to Git, but I
> want my opinion to be heard.
And if git were written in C++, it's precisely the infrequent
contributors (who are in a hurry, who only care about the quick hack
to get them going, and not about the long-term maintainability and
performance of the package) that are be in the position to do the
most damage...
- Ted
^ permalink raw reply
* Re: [PATCH] basic threaded delta search
From: Martin Koegler @ 2007-09-07 6:11 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Junio C Hamano, git
In-Reply-To: <alpine.LFD.0.9999.0709061014280.21186@xanadu.home>
On Thu, Sep 06, 2007 at 10:48:06AM -0400, Nicolas Pitre wrote:
> On Thu, 6 Sep 2007, Junio C Hamano wrote:
> > Also how would this interact with the LRU
> > delta base window we discussed a week or two ago?
>
> This is completely orthogonal.
Maybe we should adjust the split point of the the object list so, that
objects with the same name hash are processed by one thread, as the LRU
could provide the most benefit for these objects.
I think of something like (totally untested):
for (i = 0; i < NR_THREADS; i++) {
unsigned sublist_size = list_size / (NR_THREADS - i);
+ while (sublist_size < list_size && list[0]->hash == list[1]->hash)
+ sublist_size++;
p[i].list = list;
p[i].list_size = sublist_size;
p[i].window = window;
p[i].depth = depth;
p[i].processed = processed;
ret = pthread_create(&p[i].thread, NULL,
threaded_find_deltas, &p[i]);
if (ret)
die("unable to create thread: %s", strerror(ret));
list += sublist_size;
list_size -= sublist_size;
}
mfg Martin Kögler
^ permalink raw reply
* Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
From: David Symonds @ 2007-09-07 5:48 UTC (permalink / raw)
To: Dmitry Kakurin; +Cc: Linus Torvalds, Matthieu Moy, Git
In-Reply-To: <a1bbc6950709062009x59a41cb7re6051739c11e370c@mail.gmail.com>
On 07/09/07, Dmitry Kakurin <dmitry.kakurin@gmail.com> wrote:
> My goal is to *use* Git. When something does not work *for me* I want
> to be able to fix it (and contribute the fix) in *shortest time
> possible* and with *minimal efforts*. As for me it's a diversion from
> my main activities.
> The fact that Git is written in C does not really contribute to that goal.
That's just it -- Git's goal isn't to make it as easy as possible for
Git _users_ to fix it (thought that is a nice thing to have). Git's
goal is to be a very good, very fast SCM. Bugs should be found and
fixed, but that can most effectively be done by the people who are
already knowledgeable about Git's codebase (i.e. its developers), not
its users.
Dave.
^ permalink raw reply
* Re: Significant performance waste in git-svn and friends
From: Mike Hommey @ 2007-09-07 5:41 UTC (permalink / raw)
To: git
In-Reply-To: <20070905184710.GA3632@glandium.org>
On Wed, Sep 05, 2007 at 08:47:10PM +0200, Mike Hommey <mh@glandium.org> wrote:
> Some notes about git-svn:
> - A few lines above the patched zone, the file is already read once to
> do the MD5 sum. It should be possible to do SHA-1, MD5 sums and
> deflate in just one pass.
FWIW, I tried, and it doesn't make it much quicker to do everything in one pass.
99% of the speedup comes from not using git-hash-object.
Mike
^ permalink raw reply
* PATCH to add a button to perform a meld on the current file
From: Pierre Marc Dumuid @ 2007-09-07 4:46 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Here's a dodgy [not that good] patch to perform a GUI comparison on a file.
It is dodgy because it assumes cogito is installed, and you want to use
meld, and it doesn't remove the temporary files.
Not expecting this to go into main branch, but I find it handy for my
own purposes nether-the-less.
Pierre
[-- Attachment #2: gitk_addGUIdiff01.patch --]
[-- Type: text/x-patch, Size: 1166 bytes --]
--- /usr/bin/gitk 2007-08-06 07:55:41.000000000 +0930
+++ /home/pmdumuid/bin/gitkpmd 2007-09-07 14:09:28.000000000 +0930
@@ -609,7 +609,9 @@
-command changediffdisp -variable diffelide -value {0 1}
radiobutton .bleft.mid.new -text "New version" \
-command changediffdisp -variable diffelide -value {1 0}
- pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
+ button .bleft.top.meld -text "GUI diff" -command doguidiff \
+ -font $uifont
+ pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new .bleft.top.meld -side left
set ctext .bleft.ctext
text $ctext -background $bgcolor -foreground $fgcolor \
-state disabled -font $textfont \
@@ -4564,6 +4566,19 @@
}
}
+proc doguidiff {} {
+ global cflist sha1string
+
+ set taglist [$cflist tag ranges highlight]
+ set from [lindex $taglist 0]
+ set to [lindex $taglist 1]
+
+ set fname [$cflist get $from $to]
+ exec cg-admin-cat -r $sha1string^ $fname > .gitk_diffolder
+ exec cg-admin-cat -r $sha1string $fname > .gitk_diffnewer
+ exec meld .gitk_diffolder .gitk_diffnewer &
+}
+
proc dosearch {} {
global sstring ctext searchstring searchdirn
^ permalink raw reply
* Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir
From: Shawn O. Pearce @ 2007-09-07 5:01 UTC (permalink / raw)
To: Dmitry V. Levin; +Cc: Git Mailing List, Junio C Hamano
In-Reply-To: <20070906100012.GC6665@basalt.office.altlinux.org>
"Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > "Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > > On GNU/Linux, libdir is used to mean "/usr/lib or /usr/lib64"
> > > depending on architecture. Different libdir meaning breaks
> > > idiomatic expressions like rpm specfile "make libdir=%_libdir".
>
> The idea is that git-gui's libdir is not a traditional arch-dependent
> libdir's subdirectory, but rather arch-independent datadir's subdirectory.
> That is, I see no reason to call it libdir even in standalone project.
Call it datadir then? I see you point, and now agree with you.
Mind resending a patch to call it 'datadir'?
--
Shawn.
^ permalink raw reply
* Re: [PATCH 2/2] git-tag -s must fail if gpg is broken and cannot sign tags
From: Shawn O. Pearce @ 2007-09-07 4:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Carlos Rica, git
In-Reply-To: <7vd4wwe2n5.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
> > "Shawn O. Pearce" <spearce@spearce.org> wrote:
> >> If the user has misconfigured `user.signingkey` in their .git/config
> >> or just doesn't have any secret keys on their keyring and they ask
> >> for a signed tag with `git tag -s` we better make sure the resulting
> >> tag was actually signed by gpg.
>
> This seems to fail the test depending on the order processes
> happen to be scheduled. I haven't looked at it closely yet.
That's not good. I noticed stepping through the code last night
that if gpg is misconfigured (e.g. set a bad user.signingkey in
.git/config) it will terminate and send SIGPIPE to git-tag, which
makes it terminate.
All my change did was implement proper error handling. So if you
are seeing failures now then we probably have a problem with the
code without my patch too...
--
Shawn.
^ permalink raw reply
* Re: Significant performance waste in git-svn and friends
From: Shawn O. Pearce @ 2007-09-07 4:55 UTC (permalink / raw)
To: Eric Wong; +Cc: Mike Hommey, git
In-Reply-To: <20070906070407.GA19624@soma>
Eric Wong <normalperson@yhbt.net> wrote:
> Making git-svn use fast-import would be very nice. I've got a bunch
> of other git-svn things that I need to work on, but having git-svn
> converted to use fast-import would be nice. Or allowing Git.pm
> to access more of the git internals...
>
> However, how well/poorly would fast-import work for incremental
> fetches throughout the day?
It would work just fine. git-p4 uses fast-import and runs it in
incremental mode all of the time.
What will happen is you will get a packfile per git-svn fetch, so
if you fetch 5 times that day you will get 5 packfiles that day.
But you could also get 5 packfiles from git-fetch if each of those
fetches brought in 100 or more new objects. So it really is not
that big of a deal.
At some point the number of packfiles gets out of control, but so
does the number of loose objects. Repacking is the obvious fix in
both cases.
--
Shawn.
^ 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