git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>, Nicolas Pitre <nico@cam.org>,
	John Dlugosz <JDlugosz@TradeStation.com>,
	git@vger.kernel.org
Subject: Re: dangling commits and blobs: is this normal?
Date: Wed, 22 Apr 2009 15:58:54 -0400	[thread overview]
Message-ID: <20090422195854.GA14146@coredump.intra.peff.net> (raw)
In-Reply-To: <I5p8gPPuE_qW2RDhwiqxCWDuMtnuvvgtSkeTkxby6rlj_FKtpERaBA@cipher.nrlssc.navy.mil>

On Wed, Apr 22, 2009 at 02:45:29PM -0500, Brandon Casey wrote:

> > Yes, it's a bit more work for you, but having "git gc" optimize by
> > default for git's performance seems to be the only sensible course.
> > Your idea of what is "big enough" above is somewhat outside the realm of
> > git, so you have to pay the price to specify it by tweaking the
> > keep-files.
> 
> But isn't git-gc supposed to be the "high-level" command that just does
> the right thing?  It doesn't seem to me to be outside the scope of this
> command to make a decision about trading off speed/io for optimal repo
> layout.  In fact, it does do this already.  The default window, depth and
> compression settings are chosen to be "good enough", not to produce the
> absolute optimum repo.
> 
> I'm just pointing out that everything is a trade off.  So I think saying
> something like "gc must optimize for git's performance" is not entirely
> accurate.  We make tradeoffs now.  Other tradeoffs may be helpful.

Sure, but my point was that git doesn't even know _how_ to make that
tradeoff. It doesn't know what you consider a reasonable size of backup
for your incremental backups, how often you might want to rollover your
keep files, how often you expect to commit and how big the commits will
be, etc.

So it does the most reasonable thing, which is to optimize for git
itself based on what it does know. If there is any improvement to be
made, it is probably to make a simpler way for the user to specify that
external knowledge to git (because tweaking .keep files really is
unnecessarily complex for Matthieu's scenario). And maybe that is just
adding a config variable analagous to "gc.autopacklimit" to be used for
regular gc, but that would default to 0 (i.e., default to the current
behavior of always repacking).

But I don't think it makes sense to change the default.

-Peff

  reply	other threads:[~2009-04-22 20:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21 21:46 dangling commits and blobs: is this normal? John Dlugosz
2009-04-22 15:27 ` Jeff King
2009-04-22 16:53   ` Brandon Casey
2009-04-22 17:39     ` Nicolas Pitre
2009-04-22 18:15       ` Matthieu Moy
2009-04-22 19:08         ` Jeff King
2009-04-22 19:45           ` Brandon Casey
2009-04-22 19:58             ` Jeff King [this message]
2009-04-22 20:07             ` Nicolas Pitre
2009-04-23 11:51           ` Matthieu Moy
2009-04-22 19:14         ` Nicolas Pitre
2009-04-22 19:26       ` Brandon Casey
2009-04-22 20:00         ` Nicolas Pitre
2009-04-22 20:05           ` Jeff King
2009-04-22 20:11             ` Nicolas Pitre
2009-04-23 17:43             ` Geert Bosch
2009-04-23 17:56               ` Shawn O. Pearce
2009-04-23 18:10                 ` Geert Bosch
2009-04-23 18:17                   ` Matthias Andree
2009-04-23 18:51               ` Nicolas Pitre
2009-04-22 20:15   ` John Dlugosz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090422195854.GA14146@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=JDlugosz@TradeStation.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).