git docs: add a category for user-facing file, repo and command UX
Create a new "Repository, command and file interfaces" section in the
main "git help git" manual page. Move things that belong under this
new criteria from the generic "Guides" section.
The "Guides" section was added in f442f28a81
(git.txt: add list of
guides, 2020-08-05). It makes sense to have e.g. "giteveryday(7)" and
"gitfaq(7)" listed under "Guides".
But placing e.g. "gitignore(5)" in it is stretching the meaning of
what a "guide" is, ideally that section should list things similar to
"giteveryday(7)" and "gitcore-tutorial(7)".
An alternate name that was considered for this new section was "User
formats", for consistency with the nomenclature used for man section 5
in general. My man(1) lists it as "File formats and conventions,
e.g. /etc/passwd".
So calling this "git help --formats" or "git help --user-formats"
would make sense for e.g. gitignore(5), but would be stretching it
somewhat for githooks(5), and would seem really suspect for the likes
of gitcli(7).
Let's instead pick a name that's closer to the generic term "User
interface", which is really what this documentation discusses: General
user-interface documentation that doesn't obviously belong elsewhere.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
dba1e5392f
commit
d976c5100f
12
help.c
12
help.c
@ -38,6 +38,7 @@ static struct category_description main_categories[] = {
|
||||
{ CAT_plumbinginterrogators, N_("Low-level Commands / Interrogators") },
|
||||
{ CAT_synchingrepositories, N_("Low-level Commands / Syncing Repositories") },
|
||||
{ CAT_purehelpers, N_("Low-level Commands / Internal Helpers") },
|
||||
{ CAT_userinterfaces, N_("User-facing repository, command and file interfaces") },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
@ -48,6 +49,7 @@ static const char *drop_prefix(const char *name, uint32_t category)
|
||||
|
||||
switch (category) {
|
||||
case CAT_guide:
|
||||
case CAT_userinterfaces:
|
||||
prefix = "git";
|
||||
break;
|
||||
default:
|
||||
@ -433,6 +435,16 @@ void list_guides_help(void)
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
void list_user_interfaces_help(void)
|
||||
{
|
||||
struct category_description catdesc[] = {
|
||||
{ CAT_userinterfaces, N_("User-facing repository, command and file interfaces:") },
|
||||
{ 0, NULL }
|
||||
};
|
||||
print_cmd_by_category(catdesc, NULL);
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
static int get_alias(const char *var, const char *value, void *data)
|
||||
{
|
||||
struct string_list *list = data;
|
||||
|
Reference in New Issue
Block a user