diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2024-12-05 13:16:20 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-05 18:59:16 +0100 |
commit | ad739f525eec917198887055f1a815e78d7c66be (patch) | |
tree | 78701fafadcc1edafc3a3292fa771c36166c39db /advice.c | |
parent | fetch: add configuration for set_head behaviour (diff) | |
download | git-ad739f525eec917198887055f1a815e78d7c66be.tar.xz git-ad739f525eec917198887055f1a815e78d7c66be.zip |
fetch set_head: move warn advice into advise_if_enabled
Advice about what to do when getting a warning is typed out explicitly
twice and is printed as regular output. The output is also tested for.
Extract the advice message into a single place and use a wrapper
function, so if later the advice is made more chatty the signature only
needs to be changed in once place. Remove the testing for the advice
output in the tests.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r-- | advice.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -53,6 +53,7 @@ static struct { [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, [ADVICE_DETACHED_HEAD] = { "detachedHead" }, [ADVICE_DIVERGING] = { "diverging" }, + [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, [ADVICE_FETCH_SHOW_FORCED_UPDATES] = { "fetchShowForcedUpdates" }, [ADVICE_FORCE_DELETE_BRANCH] = { "forceDeleteBranch" }, [ADVICE_GRAFT_FILE_DEPRECATED] = { "graftFileDeprecated" }, |