pack-objects: update usage to match docs

The t0450 test script verifies that builtin usage matches the synopsis in the documentation. Adjust the builtin to match and then remove 'git pack-objects' from the exception list. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed May 16, 2025 at 18:11 UTC 9fcfe12ac4309da9546db5b557bd41a246eb89d8
3 files changed +15 -10
Documentation/git-pack-objects.adoc
+7 -7
@@ -10,13 +10,13 @@ SYNOPSIS
10 --------
11 [verse]
12 'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied]
13 - [--no-reuse-delta] [--delta-base-offset] [--non-empty]
14 - [--local] [--incremental] [--window=<n>] [--depth=<n>]
15 - [--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
16 - [--cruft] [--cruft-expiration=<time>]
17 - [--stdout [--filter=<filter-spec>] | <base-name>]
18 - [--shallow] [--keep-true-parents] [--[no-]sparse]
19 - [--name-hash-version=<n>] [--path-walk] < <object-list>
13 + [--no-reuse-delta] [--delta-base-offset] [--non-empty]
14 + [--local] [--incremental] [--window=<n>] [--depth=<n>]
15 + [--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
16 + [--cruft] [--cruft-expiration=<time>]
17 + [--stdout [--filter=<filter-spec>] | <base-name>]
18 + [--shallow] [--keep-true-parents] [--[no-]sparse]
19 + [--name-hash-version=<n>] [--path-walk] < <object-list>
20
21
22 DESCRIPTION
builtin/pack-objects.c
+8 -2
@@ -187,8 +187,14 @@ static inline void oe_set_delta_size(struct packing_data *pack,
187 #define SET_DELTA_SIBLING(obj, val) oe_set_delta_sibling(&to_pack, obj, val)
188
189 static const char *pack_usage[] = {
190 - N_("git pack-objects --stdout [<options>] [< <ref-list> | < <object-list>]"),
191 - N_("git pack-objects [<options>] <base-name> [< <ref-list> | < <object-list>]"),
190 + N_("git pack-objects [-q | --progress | --all-progress] [--all-progress-implied]\n"
191 + " [--no-reuse-delta] [--delta-base-offset] [--non-empty]\n"
192 + " [--local] [--incremental] [--window=<n>] [--depth=<n>]\n"
193 + " [--revs [--unpacked | --all]] [--keep-pack=<pack-name>]\n"
194 + " [--cruft] [--cruft-expiration=<time>]\n"
195 + " [--stdout [--filter=<filter-spec>] | <base-name>]\n"
196 + " [--shallow] [--keep-true-parents] [--[no-]sparse]\n"
197 + " [--name-hash-version=<n>] [--path-walk] < <object-list>"),
198 NULL
199 };
200
t/t0450/adoc-help-mismatches
-1
@@ -38,7 +38,6 @@ merge-one-file
38 multi-pack-index
39 name-rev
40 notes
41 -pack-objects
41 push
42 range-diff
43 rebase