Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-08-04 19:28:33 +0300
committerJunio C Hamano <gitster@pobox.com>2022-08-05 00:12:23 +0300
commitd976c5100fb5f55f648d8b400bcbda1116b82dec (patch)
treeee65ead55c91dbbd75b44b52c9cf3ce0a6dce9af /help.c
parentdba1e5392f431e57d6a8daacf879a255b49d57fb (diff)
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 f442f28a81b (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>
Diffstat (limited to 'help.c')
-rw-r--r--help.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/help.c b/help.c
index 8a09f18a3d..3e2a78863b 100644
--- a/help.c
+++ b/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;