mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
branch: make the advice to force-deleting a conditional one
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 <rjusto@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
eddd134ce3
commit
bec9bb4b39
1
advice.c
1
advice.c
@@ -47,6 +47,7 @@ static struct {
|
||||
[ADVICE_DETACHED_HEAD] = { "detachedHead", 1 },
|
||||
[ADVICE_DIVERGING] = { "diverging", 1 },
|
||||
[ADVICE_FETCH_SHOW_FORCED_UPDATES] = { "fetchShowForcedUpdates", 1 },
|
||||
[ADVICE_FORCE_DELETE_BRANCH] = { "forceDeleteBranch", 1 },
|
||||
[ADVICE_GRAFT_FILE_DEPRECATED] = { "graftFileDeprecated", 1 },
|
||||
[ADVICE_IGNORED_HOOK] = { "ignoredHook", 1 },
|
||||
[ADVICE_IMPLICIT_IDENTITY] = { "implicitIdentity", 1 },
|
||||
|
||||
Reference in New Issue
Block a user