The guide-list.txt uses exactly the same format as command-list.txt
so could be merged as part of a refactoring.

The category naming for each guide is an initial suggestion and
is not yet used. Only those with the 'guide' prefix are copied
by the into the common-guides.h file.

The user-manual.txt and everyday.txt do not have the correct filename
format yet. And gitrepository-layout.txt name is too long to include.
So comment them out.

Signed-off-by: Philip Oakley <>
The shell script function N_() does not appear to work correctly on my
Ubuntu lash-up, so an simpler script line is used with the original
commented out.
--- | 23 +++++++++++++++++++++++
 guide-list.txt        | 29 +++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644
 create mode 100644 guide-list.txt

diff --git a/ b/
new file mode 100644
index 0000000..c0c98eb
--- /dev/null
+++ b/
@@ -0,0 +1,23 @@
+# Usage: ./  >>common-guides.h
+# based on
+echo "/* Automatically generated by $0 */
+/* re-use struct cmdname_help in common-commands.h */
+static struct cmdname_help common_guides[] = {"
+sed -n -e 's/^git\([^  ]*\)[   ].* guide.*/\1/p' guide-list.txt |
+sort |
+while read guide
+     sed -n '
+     /^NAME/,/git'"$guide"'/H
+     ${
+           x
+#          s/.*git'"$guide"' - \(.*\)/  {"'"$guide"'", N_("\1")},/
+           s/.*git'"$guide"' - \(.*\)/  {"'"$guide"'", "\1"},/
+           p
+     }' "Documentation/git$guide.txt"
+echo "};"
diff --git a/guide-list.txt b/guide-list.txt
new file mode 100644
index 0000000..a419ac4
--- /dev/null
+++ b/guide-list.txt
@@ -0,0 +1,29 @@
+# List of known git guides.
+# guide name                           category [deprecated] [common] [guide]
+gitattributes                           concept         guide
+gitcore-tutorial                        specialist
+gitcredentials                          specialist
+gitcvs-migration                        specialist
+gitdiffcore                             specialist
+gitglossary                             reference       guide
+githooks                                specialist
+gitignore                               concept         guide
+gitmodules                              concept         guide
+gitnamespaces                           specialist
+#gitrepository-layout                    reference guide
+gitrevisions                            concept         guide
+gittutorial                             user    guide
+gittutorial-2                           user
+gitweb.conf                             specialist
+gitweb                                  specialist
+gitworkflows                            user    guide
+#giteveryday                             user   guide
+#gituser-manual                          user   guide
+# could embed inside common-cmds.h with [guide] as the second thing,
+# making the sed's in more obvious
+# but drop the dash in 's/^git-\
+#gitrepository-layout is too long for the current char[16]

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to