[PATCH v2] gc: recommend `git gc --prune=now` instead of `git prune`
- From
John Lin via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jun 9, 2020, 00:23 UTC
- Message-ID
- <pull.652.v2.git.1591662224566.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.652.git.1591581739031.gitgitgadget@gmail.com>
From: John Lin <johnlinp@gmail.com>
`git prune` is a plumbing command and should not be run directly by users. The corresponding porcelain command is `git gc`, which is mentioned in the man page of `git prune`.
Signed-off-by: John Lin <johnlinp@gmail.com>
---
Recommend "git gc --prune=now" instead of "git prune"
Signed-off-by: John Lin johnlinp@gmail.com [johnlinp@gmail.com]
Fix according to #642.Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-652%2Fjohnlinp%2Ffix-git-gc-warning-message-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-652/johnlinp/fix-git-gc-warning-message-v2 Pull-Request: https://github.com/gitgitgadget/git/pull/652
Range-diff vs v1:
1: 83b7137abfd ! 1: 42aa6380067 Recommend "git gc --prune=now" instead of "git prune"
@@ Metadata
Author: John Lin <johnlinp@gmail.com>
## Commit message ##
- Recommend "git gc --prune=now" instead of "git prune"
+ gc: recommend `git gc --prune=now` instead of `git prune`
+
+ `git prune` is a plumbing command and should not be run directly by
+ users. The corresponding porcelain command is `git gc`, which is
+ mentioned in the man page of `git prune`.
Signed-off-by: John Lin <johnlinp@gmail.com>
builtin/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/gc.c b/builtin/gc.c index 8e0b9cf41b3..74185eac917 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 --prune=now' to remove them.")); if (!daemonized) unlink(git_path("gc.log")); base-commit: 20514004ddf1a3528de8933bc32f284e175e1012
-- gitgitgadget