From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Sverre Rabbelier <srabbelier@gmail.com>,
Jeff King <peff@peff.net>, Nicolas Pitre <nico@fluxnic.net>,
Fernando Vezzosi <buccia@repnz.net>
Subject: Re: [PATCH v2 1/5] Add convenient function to do automatic garbage collection
Date: Fri, 18 May 2012 15:37:30 -0700 [thread overview]
Message-ID: <xmqqvcjt15g5.fsf@junio.mtv.corp.google.com> (raw)
In-Reply-To: <1337171377-26960-2-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Wed, 16 May 2012 19:29:33 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> This function also avoids forking most of the time by performing some
> check in process.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ...
> @@ -64,6 +66,10 @@ static int gc_config(const char *var, const char *value, void *cb)
> }
> return git_config_string(&prune_expire, var, value);
> }
> + if (cb && !strcmp(var, cb)) {
> + auto_gc = git_config_bool(var, value);
> + return 0;
> + }
This does not look like "add convenient function for auto-gc" nor "avoid
forking"; it is something else that is not explained.
> +int gc(const char *cmd, int flags)
Don't call this "gc".
It is hardcoded to perform a cheaper version "gc --auto" and nothing
else, and it may not even do that when configured not to.
I do not think the first parameter to this function is "cmd"
(abbreviation of "command") either. Isn't it a configuration key to
tell if auto-gc is allowed, or something?
Other than that, it seems to be a nice change.
next prev parent reply other threads:[~2012-05-18 22:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 8:08 [PATCH] Update "gc" behavior in commit, merge, am, rebase and index-pack Nguyễn Thái Ngọc Duy
2012-05-12 8:18 ` Nguyen Thai Ngoc Duy
2012-05-12 17:36 ` Nicolas Pitre
2012-05-14 9:09 ` Nguyen Thai Ngoc Duy
2012-05-14 15:18 ` Sverre Rabbelier
2012-05-15 11:25 ` Nguyen Thai Ngoc Duy
2012-05-14 20:11 ` Jeff King
2012-05-14 20:50 ` Jeff King
2012-05-14 23:35 ` Junio C Hamano
2012-05-16 12:29 ` [PATCH v2 0/5] "git gc --auto" update Nguyễn Thái Ngọc Duy
2012-05-16 12:29 ` [PATCH v2 1/5] Add convenient function to do automatic garbage collection Nguyễn Thái Ngọc Duy
2012-05-18 22:37 ` Junio C Hamano [this message]
2012-05-19 4:56 ` Nguyen Thai Ngoc Duy
2012-05-16 12:29 ` [PATCH v2 2/5] index-pack: perform automatic gc, share receive.gc config with receive-pack Nguyễn Thái Ngọc Duy
2012-05-16 12:29 ` [PATCH v2 3/5] commit: reinstate "gc --auto" Nguyễn Thái Ngọc Duy
2012-05-16 12:29 ` [PATCH v2 4/5] gc: add --dry-run Nguyễn Thái Ngọc Duy
2012-05-16 12:29 ` [PATCH v2 5/5] Update "gc" behavior in commit, merge, am and rebase Nguyễn Thái Ngọc Duy
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqvcjt15g5.fsf@junio.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=buccia@repnz.net \
--cc=git@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=srabbelier@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).