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.5 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,RCVD_IN_DNSWL_HI, 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 180E31F403 for ; Tue, 4 Oct 2022 13:24:01 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JCGu/H/u"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbiJDNX6 (ORCPT ); Tue, 4 Oct 2022 09:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbiJDNX5 (ORCPT ); Tue, 4 Oct 2022 09:23:57 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C641A50714 for ; Tue, 4 Oct 2022 06:23:53 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id w18so12576631wro.7 for ; Tue, 04 Oct 2022 06:23:53 -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 :message-id:reply-to; bh=ksbuHuNfZnRCO8cGW8tXd+tUTcnSOdCVKGpXZhKMRrs=; b=JCGu/H/uI1P8xWvtSUTD4p8NFWZyIH/mrW0tTW54TT0ZRkuDhBrSBiIW3DceElsEhV uzbGBFIHvmEGysJdbu6s5Nn/UoDZeQRB3ftDOcoQ+4gbBqURef48kRx5ulAUac3SqTH6 64MkZGSFBW1aTCf5QUAkoK43L/w4qGrEDFv/XvegkE4Ba84j3H8AaXkFQYJUjackVm8q ttncfOc/UkfA15BMRnw9ydiapAdRn57TB31DPhMdkyHsdgMDgzzkp7qrk09h8YatJ4GQ uFr9ZUhibeTBhArXxrpvHNpvRIxc/U9JwO4naQapJzCAE3xskKjdteeC6hZYWiMyeEib Hm7g== 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:message-id:reply-to; bh=ksbuHuNfZnRCO8cGW8tXd+tUTcnSOdCVKGpXZhKMRrs=; b=6gmO2u4+i2FdPDaWLNwgqO/o5dKreIxuEF196hSiTIKUICfbQtPJJtcsEVdrx3NVb8 pZCy2nQGj2atmBnlkjJFFuK6yVosKHLXOhylNwK4yqy10uroiuXmYHyv9LJk30i5CPyH m3mNTryvhZQqhxdfiUrB2Tmwze7bHEAVXflyTGIpuM4zw2NbZEeyOqo7raThDO80IqWU hRKw813UJQpKyEa5v59TvXt0umxERd3M8Hmkj9cXGfmjB80ZBNp7LBk2MqfVW7s0fOFu 4o53xcoGInkvbnR/24Hv6Ly0Yy4naCDakBCP9QBDIX54Oyvtfe1mFvaAucuR+W2GEaQA tweA== X-Gm-Message-State: ACrzQf1Wv0Auln5JUHZW55b76FjenjC28GRE33Dk00unoQ5HevdEJA6R XIM8SD59jMjLHUX1Ze5o7jxgVpqBbxrf6w== X-Google-Smtp-Source: AMsMyM5GgmQ3c0A8BcG3HhTq+eCY0rCnD9VFgb0SXKGRtpIXDi9WDyR8ycTzdSDkdQX32NYFNdb7+A== X-Received: by 2002:a05:6000:1541:b0:22a:3b77:6ef4 with SMTP id 1-20020a056000154100b0022a3b776ef4mr16147359wry.303.1664889831283; Tue, 04 Oct 2022 06:23:51 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id t187-20020a1c46c4000000b003b4a699ce8esm19666022wma.6.2022.10.04.06.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 06:23:50 -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 , Eric Sunshine , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH v4 00/34] doc/UX: make txt & -h output more consistent Date: Tue, 4 Oct 2022 15:23:14 +0200 Message-Id: X-Mailer: git-send-email 2.38.0.rc2.935.g6b421ae1592 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 [I sent the first 3 patches & CL of this v4 as a "v3" in https://lore.kernel.org/git/cover-v3-00.34-00000000000-20221004T131009Z-avarab@gmail.com/; sorry. Here's the whole series, correctly labeled as v4] 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/ [1]; For v3 see: http://lore.kernel.org/git/cover-v3-00.36-00000000000-20220930T180414Z-avarab@gmail.com Changes since v3: * Added a commit to put a small portion of the the new tests first, we then add a bit to it as we go along. * Squashed some changes as requested, now some of the "doc txt & -h consistency" commits have changes that were previously split up, but that's noted in the commit message. * Ejected the "blame" usage_msg_optf() change, instead the relevant later commit just supports both usage() and usage_with_options(). * Consistently use [], not "[", not "..." doc SYNOPSIS & -h: use "-" to separate words in labels, 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 "[