git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] git-gc: by default use safer "-A" option to repack when not --prune'ing
Date: Thu, 11 Oct 2007 01:49:44 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710110149100.4174@racer.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0710101918060.30020@torch.nrlssc.navy.mil>

Hi,

On Wed, 10 Oct 2007, Brandon Casey wrote:

> On Thu, 11 Oct 2007, Johannes Schindelin wrote:
> 
> > > @@ -211,6 +205,16 @@ int cmd_gc(int argc, const char **argv, const char
> > > *prefix)
> > >  		prune = 0;
> > >  		if (!need_to_gc())
> > >  			return 0;
> > > +	} else {
> > > +		/*
> > > +		 * Use safer (for shared repos) "-A" option to
> > > +		 * repack when not pruning. Auto-gc makes its
> > > +                 * own decision.
> > > +		 */
> > > +		if (prune)
> > > +			append_option(argv_repack, "-a", MAX_ADD);
> > > +		else
> > > +			append_option(argv_repack, "-A", MAX_ADD);
> > >  	}
> > > 
> > >  	if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
> > 
> > To use the append_option() function, you need to make sure that the 
> > argv has enough space, so I suggest adding another NULL to 
> > argv_repack[].  This is enough, since you only ever add one option.  
> > But you should mention it somewhere, probably above the definition of 
> > argv_repack[].
> 
> Shouldn't argv_repack have space for MAX_ADD (10) items?

Ouch... I overlooked that.  So please strike this objection.

Thanks,
Dscho

  reply	other threads:[~2007-10-11  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 23:49 [PATCH] git-gc: by default use safer "-A" option to repack when not --prune'ing Brandon Casey
2007-10-11  0:12 ` Johannes Schindelin
2007-10-11  0:26   ` Brandon Casey
2007-10-11  0:49     ` Johannes Schindelin [this message]
2007-10-11  0:59       ` Brandon Casey
2007-10-11  1:00       ` [PATCH] git-gc --auto: simplify "repack" command line building Brandon Casey

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=Pine.LNX.4.64.0710110149100.4174@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).