From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id AB3C41F522 for ; Wed, 28 Sep 2022 08:41:58 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T7QjBZVs"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233360AbiI1IkF (ORCPT ); Wed, 28 Sep 2022 04:40:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbiI1Ijl (ORCPT ); Wed, 28 Sep 2022 04:39:41 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15155DEF4 for ; Wed, 28 Sep 2022 01:39:38 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id v28so5791039wrd.3 for ; Wed, 28 Sep 2022 01:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=RlX0H786FaxlIK6maRBBhzBbhW1qYgDoGdHhOgPIj8I=; b=T7QjBZVsKiV78PwLnutRobVMxZUxnsUFWVRzMU6NXozGEtaCLPf/Pi/qq6sMsW+SNK aEMble5YXJqYAdiDKDfgun2oOTJoseqP1PPAvlEjE5CKGy136ZXBL14FSL/CfV/I5LvQ OKYuL0aLxpeF9/+segwmcGQCSe8/5/uf3EliVUyT9QETMvuoRY0hJZ1j9annf04psJgX nnZrRYTthFp5f+uIrhUYyZTgProfEGyKn2n09jzpC9rPudran06UQOVCwzZh0XXuS5MX jxNYN8pt/UaFu7MOdb6PFt2BHa+4OTTTC4W9Nx7yKeAaEoSZoFWyq3kDzo5s/LrmrK7c vDPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=RlX0H786FaxlIK6maRBBhzBbhW1qYgDoGdHhOgPIj8I=; b=jFeSwWctf7DvJQC88Fd7CqgNWER19b5+UpbhlqJm5Rxf9QjcoBYBz0mA53MtKqz3zl JFnAhg6Z6MRZtnUeKOLxTPzZBOOCQiCPjy8OGSPnCGAngikWPasPtk0PwoCtI4gWV0Jm OoSOctV/WJyVZ9Gv86tM5BLJt7EjpqRls8FqH3KIZh5oNe6DwbMgl9t4Tbk9EPdB7TNh o4H2TLtY3/wIPPHZYEXR4SknqUOJCzI/LHsglYIRKz7ijgBu8TB0ybIJpRc8VdJjowVe /YWDBLIoAOxhdJeaT3jmIf7imPt5TElAJj1/EgrM2Z2kJienfrSAR+/iVE7L0I8xZ4uB Mjdw== X-Gm-Message-State: ACrzQf0CEC1HZ6c0XlrE1f+Adttw7q6qJrze/Ogb36AmY3q+pfYIfRtf Om72hwoiW+6jo0PBYC6ZaClxIUxzRnnWIQ== X-Google-Smtp-Source: AMsMyM6hXybJOnRn9gky8GdEpahA46lfDdiQ8giRWvB4Udd4vuyQ/ZyDeVACqNFYKZkKockJ8MMKBA== X-Received: by 2002:adf:e186:0:b0:22a:3329:540f with SMTP id az6-20020adfe186000000b0022a3329540fmr19594901wrb.278.1664354375740; Wed, 28 Sep 2022 01:39:35 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id 26-20020a05600c229a00b003b31fc77407sm1075026wmf.30.2022.09.28.01.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 01:39:34 -0700 (PDT) From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org Cc: Junio C Hamano , Victoria Dye , Taylor Blau , Emily Shaffer , Jonathan Nieder , John Cai , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH v2 00/35] doc/UX: make txt & -h output more consistent Date: Wed, 28 Sep 2022 10:38:55 +0200 Message-Id: X-Mailer: git-send-email 2.38.0.rc1.925.gb61c5ccd7da In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We are currently wildly inconsistent in whether the SYNOPSIS in the manual page matches the first line of the -h output, and as we add new options we routinely forget to add them to one or the other (or both). Without a more complex approach it's hard to do something about the "or both" case. But we can rather easily test whether the -h output matches the *.txt version, and report differences. As this series shows that allows us to fix a lot of issues we've effectively already "fixed", we just fixed them in one version, but not the other. For the rest of the general overview (the first paragraphs are copy/pasted) see the v1 at: https://lore.kernel.org/git/cover-00.34-00000000000-20220902T092734Z-avarab@gmail.com/ Changes since v1: * Clarified the CodingGuidelines update with Junio's suggested wording/changes. * Fixed a mention to a "preceding" commit noted by Victoria. * Made one minor bit of "sed" syntax in 34/35 consistent with the rest. * Added an assertion that "-h" output only has SP whitespace, not TABs. * 20/35 shows a bug in v1 of this. I compared the -h and *.txt output, but because I normalized (stripped away) the whitespace I didn't notice that "git tag" was left unindented. There's now a new test in 35/35 to test for that. Victoria: I decided not to go for your suggestion of trimming this series down in [1]. Reasons: * It would take me time I don't have to spend on this, as some of it isn't easy to cleanly re-arrange. E.g. the later "make consistent" commits rely on earlier whitespace/basic syntax fixes. * A major advantage of reviewing this in one go is that the 34-35/35 tests at the end are asserting everything that came before it. That's what I meant re the "mostly trust" comment you replied to in [1]. I.e. I aimed to make it easy for reviewers to trust that the "doc txt & -h consistency" patches were only altering one side of either -h or *.txt, with the other side being in-tree already. * I originally hacked this up with 34/35 coming first, but then to make the commits atomic I needed to update the test with each change to alter the list of built-ins expected to pass. I think that original approach is arguably better, as you can assert each commit in isolation, and it would certainly make it easier to split this up. But to re-do it again at this point would be more work & churn than I think this is worth. I'm attaching a "Documentation/doc-diff @{u} HEAD" below the range diff, to make it easy to see what the end result of the *.txt changes here is. 1. https://lore.kernel.org/git/af319ab4-2351-2d74-e0c7-6153f229d88c@github.com/ Ævar Arnfjörð Bjarmason (35): CodingGuidelines: update and clarify command-line conventions builtin/bundle.c: use \t, not fix indentation 2-SP indentation bundle: define subcommand -h in terms of command -h blame: use a more detailed usage_msg_optf() error on bad -L doc SYNOPSIS: don't use ' for subcommands doc SYNOPSIS: consistently use ' for commands doc SYNOPSIS & -h: fix incorrect alternates syntax built-ins: consistently add "\n" between "usage" and options doc txt & -h consistency: word-wrap doc txt & -h consistency: fix incorrect alternates syntax doc txt & -h consistency: add "-z" to cat-file "-h" doc txt & -h consistency: add missing "]" to bugreport "-h" doc txt & -h consistency: correct padding around "[]()" stash doc SYNOPSIS & -h: correct padding around "[]()" doc txt & -h consistency: use "", not "..." t/helper/test-proc-receive.c: use "", not "..." doc txt & -h consistency: fix mismatching labels doc txt & -h consistency: add or fix optional "--" syntax doc txt & -h consistency: make output order consistent doc txt & -h consistency: add missing options and labels doc txt & -h consistency: make "rerere" consistent doc txt & -h consistency: make "read-tree" consistent doc txt & -h consistency: make "bundle" consistent doc txt & -h consistency: use "git foo" form, not "git-foo" doc txt & -h consistency: add missing options doc txt & -h consistency: make "stash" consistent doc txt & -h consistency: make "annotate" consistent doc txt & -h consistency: use "[