Re: [PATCH] Recommend "git gc --auto" instead of "git prune"

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

 



On 2020-06-07 at 16:18:35, John Lin via GitGitGadget wrote:
> From: John Lin <johnlinp@xxxxxxxxx>
> 
> Signed-off-by: John Lin <johnlinp@xxxxxxxxx>
> ---
>     Recommend "git gc --auto" instead of "git prune"
>     
>     Fix according to #642.
> 
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-651%2Fjohnlinp%2Ffix-git-gc-warning-message-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-651/johnlinp/fix-git-gc-warning-message-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/651
> 
>  builtin/gc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/builtin/gc.c b/builtin/gc.c
> index 8e0b9cf41b3..3833a3de332 100644
> --- a/builtin/gc.c
> +++ b/builtin/gc.c
> @@ -692,7 +692,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
>  
>  	if (auto_gc && too_many_loose_objects())
>  		warning(_("There are too many unreachable loose objects; "
> -			"run 'git prune' to remove them."));
> +			"run 'git gc --auto' to remove them."));

I'm not sure this is correct.  If we have just expelled a large number
of objects from a pack into loose objects because they're no longer
referenced, it's possible we may trigger another git gc --auto on the
next time we run a command.  If so, no amount of git gc --auto is going
to help here; you really have to run git prune.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux