From bec9bb4b3918d2b3c7b91bbb116a667d5d6d298d Mon Sep 17 00:00:00 2001 From: Rubén Justo Date: Thu, 11 Jan 2024 13:40:34 +0100 Subject: branch: make the advice to force-deleting a conditional one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error message we show when the user tries to delete a not fully merged branch describes the error and gives a hint to the user: error: the branch 'foo' is not fully merged. If you are sure you want to delete it, run 'git branch -D foo'. Let's move the hint part so that it is displayed using the advice machinery: error: the branch 'foo' is not fully merged hint: If you are sure you want to delete it, run 'git branch -D foo' hint: Disable this message with "git config advice.forceDeleteBranch false" Signed-off-by: Rubén Justo Signed-off-by: Junio C Hamano --- Documentation/config/advice.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation') diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt index e0deaf3144..25c0917524 100644 --- a/Documentation/config/advice.txt +++ b/Documentation/config/advice.txt @@ -45,6 +45,9 @@ advice.*:: Advice shown when linkgit:git-fetch[1] takes a long time to calculate forced updates after ref updates, or to warn that the check is disabled. + forceDeleteBranch:: + Advice shown when a user tries to delete a not fully merged + branch without the force option set. ignoredHook:: Advice shown if a hook is ignored because the hook is not set as executable. -- cgit v1.3