summaryrefslogtreecommitdiffstats
path: root/advice.c
diff options
context:
space:
mode:
authorKristoffer Haugsbakk <code@khaugsbakk.name>2024-03-05 21:29:43 +0100
committerJunio C Hamano <gitster@pobox.com>2024-03-05 22:04:26 +0100
commit8fbd903e58503cbdd1f1c816dd0c6c3c4d591b13 (patch)
treebdcac7428df8f52598ee55307389ff0cc6dfcee8 /advice.c
parentadvice: use double quotes for regular quoting (diff)
downloadgit-8fbd903e58503cbdd1f1c816dd0c6c3c4d591b13.tar.xz
git-8fbd903e58503cbdd1f1c816dd0c6c3c4d591b13.zip
branch: advise about ref syntax rules
git-branch(1) will error out if you give it a bad ref name. But the user might not understand why or what part of the name is illegal. The user might know that there are some limitations based on the *loose ref* format (filenames), but there are also further rules for easier integration with shell-based tools, pathname expansion, and playing well with reference name expressions. The man page for git-check-ref-format(1) contains these rules. Let’s advise about it since that is not a command that you just happen upon. Also make this advise configurable since you might not want to be reminded every time you make a little typo. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r--advice.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/advice.c b/advice.c
index 6e9098ff08..550c296890 100644
--- a/advice.c
+++ b/advice.c
@@ -68,6 +68,7 @@ static struct {
[ADVICE_PUSH_UNQUALIFIED_REF_NAME] = { "pushUnqualifiedRefName" },
[ADVICE_PUSH_UPDATE_REJECTED] = { "pushUpdateRejected" },
[ADVICE_PUSH_UPDATE_REJECTED_ALIAS] = { "pushNonFastForward" }, /* backwards compatibility */
+ [ADVICE_REF_SYNTAX] = { "refSyntax" },
[ADVICE_RESET_NO_REFRESH_WARNING] = { "resetNoRefresh" },
[ADVICE_RESOLVE_CONFLICT] = { "resolveConflict" },
[ADVICE_RM_HINTS] = { "rmHints" },