Re: [PATCH v3 3/8] repack: add --name-hash-version option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 20, 2024 at 05:19:49PM +0000, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <stolee@xxxxxxxxx>
>
> The new '--name-hash-version' option for 'git repack' is a simple
> pass-through to the underlying 'git pack-objects' subcommand. However,
> this subcommand may have other options and a temporary filename as part
> of the subcommand execution that may not be predictable or could change
> over time.
>
> The existing test_subcommand method requires an exact list of arguments
> for the subcommand. This is too rigid for our needs here, so create a
> new method, test_subcommand_flex. Use it to check that the
> --name-hash-version option is passing through.
>
> Since we are modifying the 'git repack' command, let's bring its usage
> in line with the Documentation's synopsis. This removes it from the
> allow list in t0450 so it will remain in sync in the future.
>
> Signed-off-by: Derrick Stolee <stolee@xxxxxxxxx>
> ---
>  Documentation/git-repack.txt |  9 ++++++++-
>  builtin/repack.c             |  9 ++++++++-
>  t/t0450/txt-help-mismatches  |  1 -
>  t/t7700-repack.sh            |  6 ++++++
>  t/test-lib-functions.sh      | 26 ++++++++++++++++++++++++++
>  5 files changed, 48 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
> index c902512a9e8..5852a5c9736 100644
> --- a/Documentation/git-repack.txt
> +++ b/Documentation/git-repack.txt
> @@ -9,7 +9,9 @@ git-repack - Pack unpacked objects in a repository
>  SYNOPSIS
>  --------
>  [verse]
> -'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m] [--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>] [--write-midx]
> +'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
> +	[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
> +	[--write-midx] [--name-hash-version=<n>]

I probably would have split this change into two separate patches (one
to adjust the line wrapping in the synopsis, and another to introduce
the new option). But regardless, I am really glad to see this change,
since the long synopsis line has always bothered me, but I never got
around to changing it. Thanks for deciding that enough is enough!

> diff --git a/t/t0450/txt-help-mismatches b/t/t0450/txt-help-mismatches
> index 28003f18c92..c4a15fd0cb8 100644
> --- a/t/t0450/txt-help-mismatches
> +++ b/t/t0450/txt-help-mismatches
> @@ -45,7 +45,6 @@ rebase
>  remote
>  remote-ext
>  remote-fd
> -repack

:-).

Thanks,
Taylor




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux