From patchwork Tue Aug 4 00:20:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11699313 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EACB14E3 for ; Tue, 4 Aug 2020 00:21:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76B4620786 for ; Tue, 4 Aug 2020 00:21:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tyJSgpY8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728856AbgHDAVE (ORCPT ); Mon, 3 Aug 2020 20:21:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbgHDAVD (ORCPT ); Mon, 3 Aug 2020 20:21:03 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68D76C06174A for ; Mon, 3 Aug 2020 17:21:03 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id f18so1036894wmc.0 for ; Mon, 03 Aug 2020 17:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=djD/3SIoEHw+iUsL/AdbKgn+UWa7uq1S8vjdmn3IL3w=; b=tyJSgpY8FHNpNESJ/KkTiFDDZvRRg765Iseg2slaxqVi5HCAF4vTa1MdEBrGNo8IU1 YXEFFWF03SJq7yseuRc08mFxfR3PDVRzuNLFmPA98L0HwQ7qkqKliK8EacEUVtIO6rf4 02Sqjo5WF36YVnDGXREoXBMn6KuI7UtbH7PtB87b6LyGNDPIgaCIDPU8SSGfGJ+CuHCD A+x3ZoBpjZQuMfLYh7xOhdxkZzzEqOMPA6uANoibMSdNQznuotaZWEsxLlMZaGNHFqp4 SZ1aBYF2XIOUGI/tBMaqw9S1QkxNU+0bqRXJjMLYuchFxvG4J0qSsJMu0ICnyLWJ3g3J LKNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=djD/3SIoEHw+iUsL/AdbKgn+UWa7uq1S8vjdmn3IL3w=; b=SaCsh1c38cKfkNbFfV0fPj0IM9anDcZIsgM+QEjqay4y4am+2dLSdePrj5NVLJ20gL T2kbifXpQ45+H49XAzs1MWNC1mA2Q/8ptQXA1aodQii4IIeSmUfnL43kWkqVkwKIZSEI 1i0ab6b2DRl3cVDr4DLsAKcYwjSS5Y7xgJBPIo0cgu67NK72ffrt6s+XWfCTAXpD8z3A tRzvgxO2QB4uNK1o/gWetwHdkks0wAcR/484GIwpHdWYlviGBoDEHsZ+VZQ6eiz+jRCf VylarubjOFEMLRorexq/tGyB/apWSBgTstdmcFfgEEthuX0TrSJ/fUPC9TldriEJQ6mz BxXw== X-Gm-Message-State: AOAM533N26y0IB2mgvCKR6SRQ6NW8WVMLFq63qpG7tLrIg+HSIXMhMSK H2sfwnuRgTKObaekeT+CUDQ4Wm3F X-Google-Smtp-Source: ABdhPJy50Ph/jS2pQjZDhAXJ+7vmWLSeEIvdDpKHR0tzKUpLsJSk4fmfztCphVCKc9EFDLSxZgJY5g== X-Received: by 2002:a1c:286:: with SMTP id 128mr1364740wmc.37.1596500462054; Mon, 03 Aug 2020 17:21:02 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u66sm2052651wmu.37.2020.08.03.17.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 17:21:01 -0700 (PDT) Message-Id: <2bd473e0aa963c6e883a6fcaf01f3137c5e6a2e8.1596500459.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Philippe Blain via GitGitGadget" Date: Tue, 04 Aug 2020 00:20:57 +0000 Subject: [PATCH v2 1/3] command-list.txt: add missing 'gitcredentials' and 'gitremote-helpers' Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy , Philip Oakley , Eric Sunshine , SZEDER =?utf-8?b?R8OhYm9y?= , Philippe Blain , Philippe Blain Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain The guides 'gitcredentials' and 'gitremote-helpers' do not currently appear in command-list.txt. 'gitcredentials' was forgotten back when guides were added to command-list.txt in 1b81d8cb19 (help: use command-list.txt for the source of guides, 2018-05-20). 'gitremote-helpers' was moved to section 7 in 439cc74632 (docs: move gitremote-helpers into section 7, 2019-03-25), but command-list.txt was not updated at the time. Add these two guides to the list of guides in 'command-list.txt', so that they appear in the output of 'git help --guides', and capitalize the first word of the description of 'gitcredentials', as was done in 1b81d8c (help: use command-list.txt for the source of guides, 2018-05-20) for the other guides. While at it, add a comment in Documentation/Makefile to remind developers to update command-list.txt if they add a new guide. Signed-off-by: Philippe Blain --- Documentation/Makefile | 1 + Documentation/gitcredentials.txt | 2 +- command-list.txt | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index ecd0b340b1..39f6fc8de7 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -17,6 +17,7 @@ MAN1_TXT += git.txt MAN1_TXT += gitk.txt MAN1_TXT += gitweb.txt +# man5 / man7 guides (note: new guides should also be added to command-list.txt) MAN5_TXT += gitattributes.txt MAN5_TXT += githooks.txt MAN5_TXT += gitignore.txt diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt index 9e481aec85..758bf39ba3 100644 --- a/Documentation/gitcredentials.txt +++ b/Documentation/gitcredentials.txt @@ -3,7 +3,7 @@ gitcredentials(7) NAME ---- -gitcredentials - providing usernames and passwords to Git +gitcredentials - Providing usernames and passwords to Git SYNOPSIS -------- diff --git a/command-list.txt b/command-list.txt index 89aa60cde7..e5901f2213 100644 --- a/command-list.txt +++ b/command-list.txt @@ -195,6 +195,7 @@ git-write-tree plumbingmanipulators gitattributes guide gitcli guide gitcore-tutorial guide +gitcredentials guide gitcvs-migration guide gitdiffcore guide giteveryday guide @@ -204,6 +205,7 @@ githooks guide gitignore guide gitmodules guide gitnamespaces guide +gitremote-helpers guide gitrepository-layout guide gitrevisions guide gitsubmodules guide From patchwork Tue Aug 4 00:20:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11699315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5420014E3 for ; Tue, 4 Aug 2020 00:21:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B78020722 for ; Tue, 4 Aug 2020 00:21:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yf0EoU+J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729012AbgHDAVF (ORCPT ); Mon, 3 Aug 2020 20:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbgHDAVE (ORCPT ); Mon, 3 Aug 2020 20:21:04 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A954C06174A for ; Mon, 3 Aug 2020 17:21:04 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id 184so1224438wmb.0 for ; Mon, 03 Aug 2020 17:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=4ym1IzoRp2NjrKCQfPSxjzCBmGas+7GV3dRMTATrHus=; b=Yf0EoU+JHgQESXCNmIxB39nCOh9hTpCpIfovU1fCJSuu0z5m5TKr4mMpiyhmrRMvY+ T0b7xRj9gRUXh3XvFqotj+TAeWDl8299qx27zz/pnNn7VgfY+MCe/FG8cpO8E1SLJ7hf g5J1t3BYPjU/TeYe+x0YYNNXfrax0RgARRNcWli9475kz/D7ZV+fFCsKmRrMi4QNeC7G 1HgQ0J/jGqIl65aewjKxPBfukKEPLpePiGOkHfHzXuEpWo3a1oY1+lQQVJq30rxrSuEu QVXijCmOnn0cU5B5DJSKs2LAcRi1E70Hgd4ElYR52fvdAaOtWLyq5lCe2Gg8wkjcN5R8 GwDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=4ym1IzoRp2NjrKCQfPSxjzCBmGas+7GV3dRMTATrHus=; b=gkrzJLQwLIEug9G04EnRfxErkBciXIoVWNbdx5FBFRc0/PxVlr96UwHk/O/bwNI7D9 TOfy+V0oZRfkyWcpyiAqzy4e/M/gcwYmCH/yj/B5RzucsETsBu7a2joOcPY4NsO+bCq7 vWTXoEo7FgXV+1ChZhHy0QtSbXfYrKE4GF92m2fXpohYR5IfcESovVNtSy1zJr7aU/Cf DEy3QIwruTb6K89lTcl7W/Sa8Xy2bElXvmCp4DCDpJQOmSMhmEeurhLyiGJScdFlXQ+o uipOciePPjALM59Ve1ncnXbd1NZB2HallIRYpF0TN3Mck68cMKZHOJDLkpIOKbYq73L4 ZkEw== X-Gm-Message-State: AOAM531aw/4m6YNQrpneCM82P6TWTfkR6FwJzdur0gtY6WGEljy+wA5R o2Bkec6xv+QmM5ib+EGm33l+U+je X-Google-Smtp-Source: ABdhPJzdkzVfSw4UW5qW0e50t7WsLoCi8eQ6jgscuRqvLuVk0yYj7Px8mUUlobBMlK8Rf1UToc+Vbw== X-Received: by 2002:a1c:f70e:: with SMTP id v14mr1455603wmh.74.1596500462859; Mon, 03 Aug 2020 17:21:02 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id k4sm30497062wrd.72.2020.08.03.17.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 17:21:02 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Philippe Blain via GitGitGadget" Date: Tue, 04 Aug 2020 00:20:58 +0000 Subject: [PATCH v2 2/3] help: drop usage of 'common' and 'useful' for guides Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy , Philip Oakley , Eric Sunshine , SZEDER =?utf-8?b?R8OhYm9y?= , Philippe Blain , Philippe Blain Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain Since 1b81d8cb19 (help: use command-list.txt for the source of guides, 2018-05-20), all man5/man7 guides listed in command-list.txt appear in the output of 'git help -g'. However, 'git help -g' still prefixes this list with "The common Git guides are:", which makes one wonder if there are others! In the same spirit, the man page for 'git help' describes the '--guides' option as listing 'useful' guides, which is not false per se but can also be taken to mean that there are other guides that exist but are not useful. Instead of 'common' and 'useful', use 'Git concept guides' in both places. To keep the code in line with this change, rename help.c::list_common_guides_help to list_guides_help. Signed-off-by: Philippe Blain --- Documentation/git-help.txt | 6 +++--- builtin/help.c | 2 +- help.c | 4 ++-- help.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index 69c0c5c34e..44fe8860b3 100644 --- a/Documentation/git-help.txt +++ b/Documentation/git-help.txt @@ -21,8 +21,8 @@ on the standard output. If the option `--all` or `-a` is given, all available commands are printed on the standard output. -If the option `--guides` or `-g` is given, a list of the useful -Git guides is also printed on the standard output. +If the option `--guides` or `-g` is given, a list of the +Git concept guides is also printed on the standard output. If a command, or a guide, is given, a manual page for that command or guide is brought up. The 'man' program is used by default for this @@ -58,7 +58,7 @@ OPTIONS -g:: --guides:: - Prints a list of useful guides on the standard output. This + Prints a list of the Git concept guides on the standard output. This option overrides any given command or guide name. -i:: diff --git a/builtin/help.c b/builtin/help.c index 299206eb57..bb339f0fc8 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -579,7 +579,7 @@ int cmd_help(int argc, const char **argv, const char *prefix) } if (show_guides) - list_common_guides_help(); + list_guides_help(); if (show_all || show_guides) { printf("%s\n", _(git_more_info_string)); diff --git a/help.c b/help.c index 44cee69c11..d478afb2af 100644 --- a/help.c +++ b/help.c @@ -397,10 +397,10 @@ void list_cmds_by_config(struct string_list *list) } } -void list_common_guides_help(void) +void list_guides_help(void) { struct category_description catdesc[] = { - { CAT_guide, N_("The common Git guides are:") }, + { CAT_guide, N_("The Git concept guides are:") }, { 0, NULL } }; print_cmd_by_category(catdesc, NULL); diff --git a/help.h b/help.h index 500521b908..dc02458855 100644 --- a/help.h +++ b/help.h @@ -21,7 +21,7 @@ static inline void mput_char(char c, unsigned int num) void list_common_cmds_help(void); void list_all_cmds_help(void); -void list_common_guides_help(void); +void list_guides_help(void); void list_all_main_cmds(struct string_list *list); void list_all_other_cmds(struct string_list *list); From patchwork Tue Aug 4 00:20:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11699317 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E71F514E3 for ; Tue, 4 Aug 2020 00:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D64720786 for ; Tue, 4 Aug 2020 00:21:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tLnU6hGG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729057AbgHDAVG (ORCPT ); Mon, 3 Aug 2020 20:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729028AbgHDAVF (ORCPT ); Mon, 3 Aug 2020 20:21:05 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E29FC06174A for ; Mon, 3 Aug 2020 17:21:05 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id y3so35750468wrl.4 for ; Mon, 03 Aug 2020 17:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=HS3xHrLK4gIL9VyQx5QUemN3ASzGtxWxUKZQ1AvbCEo=; b=tLnU6hGG2p3XPhtK7jms6zhExzvvs4NDvaFDoOHKKQEy+OecogkBq1sjguCH4z2I01 l9VwyMnf7fcKt78Khonsri4D7f23MjqmVRAYzd1IuDyEhL+Zac7zyLy0xo3T5ph9ppjj pFt9ifaqtFemFy8htMy1JhW2qXwx91Daort4kpq5GUNn4OLz5uDyfF8okWdx6fvfX0Xc xi6u/AHpf2vXUEwTDX8+RHXKWuKqpe4VJxpBHCJkdtmQhAw41SmYp/ZwoMz3WiA3z531 cYB+RehOmfqQvehSQSN9Pw8m0ZX1golsYYRBMCZt3GKb8+Kv6olchB/NKQSAIcXGV9cN s5yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=HS3xHrLK4gIL9VyQx5QUemN3ASzGtxWxUKZQ1AvbCEo=; b=C4EModMpxt2DkfUQfKH71QSBBuMBJKcWyvu5o/121kNrjA0vXvWxiWw1Lb0hgXwSY6 wokR5L7z3uVYyF75y1rgO2itk1HmIE9T8iia3YdPPOHEMYUd3TS89wcsIrBXuIsW4Nxd rSKmlwV/PDO0q8AoU1YWcDbYGYJMYS4AHfiERWFjH1nfVjFMCHifOIzKg53/ojltOYhk CvcaLx02YK79mD+h1UVkam0C8DJ6nqwJp5YDGD+u2r/v7VU7m2AGg9Rq9k4zbzo8xevN 3lSXR0CqVRLpVuzggz3WoFgt3jE2KEz0keQrIhMA90Zxw1PY5KDnMICq1UBoTWW1HS9e ugFA== X-Gm-Message-State: AOAM532VQdQayw80imx7UlK1PDPVZDkl3fb4lmwWvE8MaRrkKQsOBZWP unvdufa14A2hD7EHEe9o3gNJgU+M X-Google-Smtp-Source: ABdhPJzSwQoUejvj8Nl3A9DPE5LimQyiQcj/mkp4HYALYyNd6fgS4b031LNqa+2YPMZ0sQi0j0jT5g== X-Received: by 2002:adf:c981:: with SMTP id f1mr16841255wrh.14.1596500463668; Mon, 03 Aug 2020 17:21:03 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id s205sm2194312wme.7.2020.08.03.17.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 17:21:03 -0700 (PDT) Message-Id: <4394bb357b5e7025618665c4f7b387d4d37f3a84.1596500460.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Philippe Blain via GitGitGadget" Date: Tue, 04 Aug 2020 00:20:59 +0000 Subject: [PATCH v2 3/3] git.txt: add list of guides Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy , Philip Oakley , Eric Sunshine , SZEDER =?utf-8?b?R8OhYm9y?= , Philippe Blain , Philippe Blain Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain Not all man5/man7 guides are mentioned in the 'git(1)' documentation, which makes the missing ones somewhat hard to find. Add a list of the guides to git(1) by leveraging the existing `Documentation/cmd-list.perl` script to generate a file `cmds-guide.txt` which gets included in git.txt. Instead of hard-coding the list of command categories in both `Documentation/Makefile` and `Documentation/cmd-list.perl`, make the Makefile the authoritative source and tweak `cmd-list.perl` so that it receives the list of command categories as argument. Also, do not hard-code the manual section '1'. Instead, use a regex so that the manual section is discovered from the first line of each `git*.txt` file. This addition was hinted at in 1b81d8cb19 (help: use command-list.txt for the source of guides, 2018-05-20). Helped-by: Junio C Hamano Signed-off-by: Philippe Blain --- Documentation/Makefile | 3 ++- Documentation/cmd-list.perl | 27 ++++++++++++++------------- Documentation/git.txt | 7 +++++++ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 39f6fc8de7..80d1908a44 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -295,6 +295,7 @@ cmds_txt = cmds-ancillaryinterrogators.txt \ cmds-plumbingmanipulators.txt \ cmds-synchingrepositories.txt \ cmds-synchelpers.txt \ + cmds-guide.txt \ cmds-purehelpers.txt \ cmds-foreignscminterface.txt @@ -302,7 +303,7 @@ $(cmds_txt): cmd-list.made cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) $(QUIET_GEN)$(RM) $@ && \ - $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \ + $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(cmds_txt) $(QUIET_STDERR) && \ date >$@ mergetools_txt = mergetools-diff.txt mergetools-merge.txt diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index 5aa73cfe45..af5da45d28 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -6,9 +6,14 @@ sub format_one { my ($out, $nameattr) = @_; my ($name, $attr) = @$nameattr; my ($state, $description); + my $mansection; $state = 0; open I, '<', "$name.txt" or die "No such file $name.txt"; while () { + if (/^git[a-z0-9-]*\(([0-9])\)$/) { + $mansection = $1; + next; + } if (/^NAME$/) { $state = 1; next; @@ -27,7 +32,7 @@ sub format_one { die "No description found in $name.txt"; } if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) { - print $out "linkgit:$name\[1\]::\n\t"; + print $out "linkgit:$name\[$mansection\]::\n\t"; if ($attr =~ / deprecated /) { print $out "(deprecated) "; } @@ -38,12 +43,15 @@ sub format_one { } } -while (<>) { +my ($input, @categories) = @ARGV; + +open IN, "<$input"; +while () { last if /^### command list/; } my %cmds = (); -for (sort <>) { +for (sort ) { next if /^#/; chomp; @@ -51,17 +59,10 @@ sub format_one { $attr = '' unless defined $attr; push @{$cmds{$cat}}, [$name, " $attr "]; } +close IN; -for my $cat (qw(ancillaryinterrogators - ancillarymanipulators - mainporcelain - plumbinginterrogators - plumbingmanipulators - synchingrepositories - foreignscminterface - purehelpers - synchelpers)) { - my $out = "cmds-$cat.txt"; +for my $out (@categories) { + my ($cat) = $out =~ /^cmds-(.*)\.txt$/; open O, '>', "$out+" or die "Cannot open output file $out+"; for (@{$cmds{$cat}}) { format_one(\*O, $_); diff --git a/Documentation/git.txt b/Documentation/git.txt index 3e50065198..81349a84e7 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -304,6 +304,13 @@ users typically do not use them directly. include::cmds-purehelpers.txt[] +Guides +------ + +The following documentation pages are guides about Git concepts. + +include::cmds-guide.txt[] + Configuration Mechanism -----------------------