]> git.ipfire.org Git - thirdparty/git.git/commit - advice.c
branch: advise about ref syntax rules
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Tue, 5 Mar 2024 20:29:43 +0000 (21:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Mar 2024 21:04:26 +0000 (13:04 -0800)
commit8fbd903e58503cbdd1f1c816dd0c6c3c4d591b13
treebdcac7428df8f52598ee55307389ff0cc6dfcee8
parent15cb03728f2fa6f153f873307ec92bb187681766
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>
Documentation/config/advice.txt
advice.c
advice.h
branch.c
builtin/branch.c
t/t3200-branch.sh