public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Mahi Kassa <mahlet.takassa@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com, lucasseikioshiro@gmail.com, jltobler@gmail.com
Subject: Re: [PATCH v2] repo: show subcommand-specific help text
Date: Tue, 24 Mar 2026 13:07:19 -0400	[thread overview]
Message-ID: <52a72fe5-d86d-4f06-bd08-5bbfd1faa78e@gmail.com> (raw)
In-Reply-To: <20260324122111.84122-1-mahlet.takassa@gmail.com>

On 3/24/2026 8:21 AM, Mahi Kassa wrote:
> Use subcommand-specific usage arrays for "git repo info" and
> "git repo structure" so that each command shows only its own
> synopsis in help output.
> 
> Factor the shared usage strings into macros to avoid
> duplicating the same synopsis text in multiple arrays.
> 
> Add tests to cover the subcommand help behavior.

Missing sign-off.

> @@ -148,5 +148,9 @@ test_expect_success 'git repo info --keys uses lines as its default output forma
>  	git repo info --keys >actual &&
>  	test_cmp expect actual
>  '
> -
> +test_expect_success 'git repo info -h shows only repo info usage' '
> +	test_must_fail git repo info -h >actual &&
> +	test_grep "git repo info" actual &&
> +	test_grep ! "git repo structure" actual
> +'
>  test_done
> diff --git a/t/t1901-repo-structure.sh b/t/t1901-repo-structure.sh
> index 98921ce1cb..0f7ec4da10 100755
> --- a/t/t1901-repo-structure.sh
> +++ b/t/t1901-repo-structure.sh
> @@ -224,4 +224,9 @@ test_expect_success 'progress meter option' '
>  	)
>  '
>  
> +test_expect_success 'git repo structure -h shows only repo structure usage' '
> +	test_must_fail git repo structure -h >actual &&
> +	test_grep "git repo structure" actual &&
> +	test_grep ! "git repo info" actual
> +'
>  test_done

Whitespace issues persist in these test files.

Thanks,
-Stolee


  parent reply	other threads:[~2026-03-24 17:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 15:29 [PATCH] repo: show subcommand-specific help text Mahi Kassa
2026-03-23 19:32 ` Derrick Stolee
2026-03-24  6:26 ` Patrick Steinhardt
2026-03-24 12:21 ` [PATCH v2] " Mahi Kassa
2026-03-24 12:52   ` Patrick Steinhardt
2026-03-24 17:07   ` Derrick Stolee [this message]
2026-03-24 18:48 ` [PATCH v3] " Mahi Kassa
2026-03-24 19:15   ` Derrick Stolee
2026-03-25 10:01   ` Patrick Steinhardt
2026-03-25 16:55     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52a72fe5-d86d-4f06-bd08-5bbfd1faa78e@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jltobler@gmail.com \
    --cc=lucasseikioshiro@gmail.com \
    --cc=mahlet.takassa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox