mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'kh/advise-w-git-help-in-branch' into jch
A help message from "git branch" now mentions "git help" instead of "man" when suggesting to read some documentation. * kh/advise-w-git-help-in-branch: branch: advice using git-help(1) instead of man(1)
This commit is contained in:
2
branch.c
2
branch.c
@@ -375,7 +375,7 @@ int validate_branchname(const char *name, struct strbuf *ref)
|
||||
if (check_branch_ref(ref, name)) {
|
||||
int code = die_message(_("'%s' is not a valid branch name"), name);
|
||||
advise_if_enabled(ADVICE_REF_SYNTAX,
|
||||
_("See `man git check-ref-format`"));
|
||||
_("See 'git help check-ref-format'"));
|
||||
exit(code);
|
||||
}
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int
|
||||
else {
|
||||
int code = die_message(_("invalid branch name: '%s'"), oldname);
|
||||
advise_if_enabled(ADVICE_REF_SYNTAX,
|
||||
_("See `man git check-ref-format`"));
|
||||
_("See 'git help check-ref-format'"));
|
||||
exit(code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1707,9 +1707,9 @@ test_expect_success '--track overrides branch.autoSetupMerge' '
|
||||
'
|
||||
|
||||
test_expect_success 'errors if given a bad branch name' '
|
||||
cat <<-\EOF >expect &&
|
||||
fatal: '\''foo..bar'\'' is not a valid branch name
|
||||
hint: See `man git check-ref-format`
|
||||
cat <<-EOF >expect &&
|
||||
fatal: ${SQ}foo..bar${SQ} is not a valid branch name
|
||||
hint: See ${SQ}git help check-ref-format${SQ}
|
||||
hint: Disable this message with "git config set advice.refSyntax false"
|
||||
EOF
|
||||
test_must_fail git branch foo..bar >actual 2>&1 &&
|
||||
|
||||
Reference in New Issue
Block a user