Re: [PATCH v2 1/5] Add convenient function to do automatic garbage collection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> 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@xxxxxxxxx>
> ...
> @@ -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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]