From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl Worth Subject: Re: People unaware of the importance of "git gc"? Date: Wed, 05 Sep 2007 10:19:46 -0700 Message-ID: <87ir6pc9n1.wl%cworth@cworth.org> References: <69b0c0350709050947k5e32ba7fj38924a0968569d9a@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Wed_Sep__5_10:19:46_2007-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: "Linus Torvalds" , "Git Mailing List" To: "Govind Salinas" X-From: git-owner@vger.kernel.org Wed Sep 05 19:27:29 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1ISyey-0005Zc-GD for gcvg-git@gmane.org; Wed, 05 Sep 2007 19:27:24 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755521AbXIER1Q (ORCPT ); Wed, 5 Sep 2007 13:27:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755298AbXIER1P (ORCPT ); Wed, 5 Sep 2007 13:27:15 -0400 Received: from olra.theworths.org ([82.165.184.25]:49463 "EHLO olra.theworths.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754738AbXIER1O (ORCPT ); Wed, 5 Sep 2007 13:27:14 -0400 Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8B35B431FA5; Wed, 5 Sep 2007 10:27:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rv7Rv7Qa3+lp; Wed, 5 Sep 2007 10:27:12 -0700 (PDT) Received: from raht.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1B2B0431FA4; Wed, 5 Sep 2007 10:27:12 -0700 (PDT) In-Reply-To: <69b0c0350709050947k5e32ba7fj38924a0968569d9a@mail.gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: --pgp-sign-Multipart_Wed_Sep__5_10:19:46_2007-1 Content-Type: text/plain; charset=US-ASCII On Wed, 5 Sep 2007 11:47:45 -0500, "Govind Salinas" wrote: > I know this goes against the general mood here (which seems to be > against auto-gc) but I thought I would give my $.02 as a user of git. I'll throw my opinion in here as well. I think git should automatically do repacking by default, (once loose objects exceed some threshold). There have several posts in this thread from people who don't want auto-gc, but these same people should be able to avoid it, and likely without changing habits. That's because: * They're already in the habit of manually repacking every once in a while, (or like, Linus, much more often than strictly necessary). * They've already got cron jobs setup to do the repacking. And one could augment this with an option to disable the repacking of course. And if you're really concerned about people that don't want this getting it anyway, just determine some useful threshold and then double it or so before it triggers automatic repacking, (so the automatic repacking hits only us idiots that completely neglect it). [Pardon me for continuing to quote in the original top-posted order, but I like the flow here.] On 9/5/07, Linus Torvalds wrote: > > James didn't seem to realize that the fact that he had apparently never > > ever repacked his repository was a big deal. I know it was surprising to you, Linus, but I'm glad you noticed it. I've seen the same thing from many users. And git actually discourages users from learning about repacking. If the user starts with a small (or new) project, then everything performs well, and there's no performance problem whatsoever. So then the problems creep up gradually, and the user has no idea that he should be doing anything different than he's always done. Instead the user is left to just conclude that git's performance isn't scaling well as the project grows. That's a bad conclusion of course, and it's bad that git sets things up so the user reaches that conclusion. Instead, git should just fix things up itself in this case. > > I've been against automatic repacking, but that was really based on what > > appears to be potentially a very wrong assumption, namely that people > > would do the manual repack on their own. If it turns out that people don't > > do it, maybe the right thing for git to do really is to at least notify > > people when they have way too many pack-files and/or loose > > objects. I don't think the warning message alone is a good fix. I think the people who would understand the warning and appreciate that they could then take care of repacking as convenient are the same people that already understand the repacking concept, and are likely already repacking occasionally, (so would likely never see the warning). But the problematic case is the user who knows nothing of the issue. And in that case, giving this warning isn't useful education, it's just forcing the user to learn more and do more work. "If git notices it has too many 'loose object' and 'git gc' would fix the problem, then why didn't it do that itself? And what the heck is a 'loose object' anyway?" In general, git has always printed too many obscure messages that don't actually help a new user get his work done, (and the work is _not_ to learn more about git internals). From 1.4 to 1.5 much of that was improved. But please let's not go backwards by adding more of these. So one vote from me for auto repacking, (but feel free to make the threshold so high that anyone that actually _cares_ about loose objects and repacking will never get the auto repack). -Carl --pgp-sign-Multipart_Wed_Sep__5_10:19:46_2007-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBG3uUy6JDdNq8qSWgRAi4AAJ9dagO05Hna9fuw0Kgqb1w2Ldj+zwCeO9si o8gn6g/lrdZj8ilA7cWdgY0= =Liv7 -----END PGP SIGNATURE----- --pgp-sign-Multipart_Wed_Sep__5_10:19:46_2007-1--