# [PATCH] repack: Sync list of options between synopsis and description in the documentation

2 messages from 2022-03-09 to 2022-03-09. Participants: Bagas Sanjaya, Shaoxuan Yuan.
Thread: https://gitlist.dev/t/57524

## Bagas Sanjaya, 2022-03-09 12:34

Subject: [PATCH] repack: Sync list of options between synopsis and description in the documentation
Message-ID: <20220309123447.852883-1-bagasdotme@gmail.com>
URL: https://gitlist.dev/e/20220309123447.852883-1-bagasdotme%40gmail.com

```
Options list in the synopsis and description section of git-repack(1)
are out of sync. The latest addition was in commit 1d89d88d37
(builtin/repack.c: support writing a MIDX while repacking, 2021-09-28),
which only adds -m/--write-midx option.

Add missing options to the synopsis. Additionaly, sort according to the
order they appear in the description.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/git-repack.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index ee30edc178..26e997bde1 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -9,7 +9,13 @@ 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] [-l] [-f] [-F] [-q | --quiet] [-n] [--window=<n>]
+	     [--depth=<n>] [--threads=<n>] [--window-memory=<n>]
+	     [--max-pack-size=<n>] [-b | --write-bitmap-index]
+	     [--pack-kept-objects] [--keep-pack=<pack-name>]
+	     [--unpack-unreachable=<when>] [-k | --keep-unreachable]
+	     [-i | --delta-islands] [-g | --geometric <factor>]
+	     [-m | --write-midx]
 
 DESCRIPTION
 -----------

base-commit: c2162907e9aa884bdb70208389cb99b181620d51
-- 
An old man doll... just what I always wanted! - Clara


```

## Shaoxuan Yuan, 2022-03-09 13:17

Subject: Re: [PATCH] repack: Sync list of options between synopsis and description in the documentation
Message-ID: <CAJyCBORGGbn6d5UYMdRnfrbn9OONcgMMxaCyJ4qUoQY3+s8-uQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAJyCBORGGbn6d5UYMdRnfrbn9OONcgMMxaCyJ4qUoQY3%2Bs8-uQ%40mail.gmail.com
In-Reply-To: <20220309123447.852883-1-bagasdotme@gmail.com>

```
On Wed, Mar 9, 2022 at 9:01 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>
> Options list in the synopsis and description section of git-repack(1)
> are out of sync. The latest addition was in commit 1d89d88d37
> (builtin/repack.c: support writing a MIDX while repacking, 2021-09-28),
> which only adds -m/--write-midx option.
>
> Add missing options to the synopsis. Additionaly, sort according to the
> order they appear in the description.
>
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  Documentation/git-repack.txt | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
> index ee30edc178..26e997bde1 100644
> --- a/Documentation/git-repack.txt
> +++ b/Documentation/git-repack.txt
> @@ -9,7 +9,13 @@ 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] [-l] [-f] [-F] [-q | --quiet] [-n] [--window=<n>]
> +            [--depth=<n>] [--threads=<n>] [--window-memory=<n>]
> +            [--max-pack-size=<n>] [-b | --write-bitmap-index]
> +            [--pack-kept-objects] [--keep-pack=<pack-name>]
> +            [--unpack-unreachable=<when>] [-k | --keep-unreachable]
> +            [-i | --delta-islands] [-g | --geometric <factor>]
> +            [-m | --write-midx]

Could we possibly just shorten the synopsis to something like this?

"git repack [<options>]"

As Junio mentioned here [1], this could be a more "modern" style?
Since the OPTIONS chunk below gives a more detailed usage, I
think we can get rid of the redundancy in the SYNOPSIS. And it also
helps with the aesthetic and clarity.

[1]: https://lore.kernel.org/git/xmqq1r0awse5.fsf@gitster.g/
-- 
Thanks & Regards,
Shaoxuan

```
