* [GSoC PATCH] fsck: report the real object count in the connectivity message @ 2026-10-20 10:21 Aniket Gupta 2026-11-12 2:55 ` Laveesh Bansal 2026-11-29 10:02 ` [GSoC PATCH v2] fsck: report the number of objects " Aniket Gupta 0 siblings, 2 replies; 9+ messages in thread From: Aniket Gupta @ 2026-10-20 10:21 UTC (permalink / raw) To: git; +Cc: Junio C Hamano, Aniket Gupta The verbose "Checking connectivity" message prints the value of get_max_object_index(), which is number of buckets in the object hash and not the number of objects in it. The hash is larger than what it holds so a repository with 21 objects says 64 objects. Add get_object_count() to return the number of objects in the hash and use it for the message. The loop below will still walk every bucket and it keeps using get_max_object_index(). Signed-off-by: Aniket Gupta <aniketgupta3001@gmail.com> --- This goes on top of "fsck: use Q_() for the verbose connectivity message" which Junio had queued. He mentioned that the number was not the real count and this is the separate fix for that. index-pack also uses get_max_object_index() as the total for its "Checking objects" progress. That is unchanged since it walks the same buckets. builtin/fsck.c | 13 ++++++++----- object.c | 5 +++++ object.h | 7 +++++++ t/t1450-fsck.sh | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index 710780e35..da51b2a91 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -378,11 +378,14 @@ static void check_connectivity(struct repository *repo) /* Look up all the requirements, warn about missing objects.. */ max = get_max_object_index(repo); - if (verbose) - fprintf_ln(stderr, Q_("Checking connectivity (%d object)", - "Checking connectivity (%d objects)", - max), - max); + if (verbose) { + unsigned int nr = get_object_count(repo); + + fprintf_ln(stderr, Q_("Checking connectivity (%u object)", + "Checking connectivity (%u objects)", + nr), + nr); + } for (i = 0; i < max; i++) { struct object *obj = get_indexed_object(repo, i); diff --git a/object.c b/object.c index 97f7fc0e8..2fdba93d4 100644 --- a/object.c +++ b/object.c @@ -20,6 +20,11 @@ unsigned int get_max_object_index(const struct repository *repo) return repo->parsed_objects->obj_hash_size; } +unsigned int get_object_count(const struct repository *repo) +{ + return repo->parsed_objects->nr_objs; +} + struct object *get_indexed_object(const struct repository *repo, unsigned int idx) { diff --git a/object.h b/object.h index 46cade33f..20ea6f5c0 100644 --- a/object.h +++ b/object.h @@ -173,6 +173,13 @@ int type_from_string_gently(const char *str, ssize_t, int gentle); */ unsigned int get_max_object_index(const struct repository *repo); +/* + * Return the number of objects currently in the object hashmap. This + * is smaller than the value get_max_object_index() returns, as that + * counts the buckets, which are not all in use. + */ +unsigned int get_object_count(const struct repository *repo); + /* * Return the object from the specified bucket in the object hashmap. */ diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh index 1b4074304..ceb7c649c 100755 --- a/t/t1450-fsck.sh +++ b/t/t1450-fsck.sh @@ -1152,4 +1152,19 @@ test_expect_success 'fsck reports problems in current worktree index without fil test_cmp expect actual ' +test_expect_success 'fsck --verbose reports the number of objects' ' + git init count && + test_commit -C count one && + git -C count fsck --verbose 2>err && + test_grep "Checking connectivity (3 objects)" err +' + +test_expect_success 'fsck --verbose uses the singular for a single object' ' + git init single && + blob=$(echo single | git -C single hash-object -w --stdin) && + git -C single update-ref refs/tags/blob $blob && + git -C single fsck --verbose 2>err && + test_grep "Checking connectivity (1 object)" err +' + test_done -- 2.43.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [GSoC PATCH] fsck: report the real object count in the connectivity message 2026-10-20 10:21 [GSoC PATCH] fsck: report the real object count in the connectivity message Aniket Gupta @ 2026-11-12 2:55 ` Laveesh Bansal 2026-11-12 13:07 ` Aniket Gupta 2026-11-29 10:02 ` [GSoC PATCH v2] fsck: report the number of objects " Aniket Gupta 1 sibling, 1 reply; 9+ messages in thread From: Laveesh Bansal @ 2026-11-12 2:55 UTC (permalink / raw) To: Aniket Gupta; +Cc: git, Junio C Hamano Thanks for the patch. Looks good to me. I ran t1450 with and without the patch: the new tests pass with it and fail without. One thing about the title: > fsck: report the real object count in the connectivity message In a partial clone the number counts blobs that were never downloaded. Setup: git init -q -b main src git -C src config uploadpack.allowFilter true for i in 1 2 3 do echo $i >src/f$i git -C src add f$i git -C src commit -qm c$i done git clone -q --no-checkout --filter=blob:none file://$PWD/src pc Then: $ git -C pc fsck --verbose 2>&1 | grep connectivity Checking connectivity (9 objects) $ git -C pc cat-file --batch-all-objects --batch-check | wc -l warning: This repository uses promisor remotes. Some objects may not be loaded. 6 Would "report the number of objects checked" fit the title better? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GSoC PATCH] fsck: report the real object count in the connectivity message 2026-11-12 2:55 ` Laveesh Bansal @ 2026-11-12 13:07 ` Aniket Gupta 2026-11-23 18:46 ` Laveesh Bansal 0 siblings, 1 reply; 9+ messages in thread From: Aniket Gupta @ 2026-11-12 13:07 UTC (permalink / raw) To: Laveesh Bansal; +Cc: git, Junio C Hamano Thanks for the review. > In a partial clone the number counts blobs that were never downloaded. I can repro this. With your setup I get 9 from fsck and 6 from cat-file. The three missing blobs are counted because the trees refer to them. > Would "report the number of objects checked" fit the title better? Yeah I agree that "Real" might be too strong. I think "checked" might also not fit because the missing blobs are counted but not checked. Maybe we can use something like "report the number of objects in the connectivity message". I can send a v2 with a new title if Junio wants one. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GSoC PATCH] fsck: report the real object count in the connectivity message 2026-11-12 13:07 ` Aniket Gupta @ 2026-11-23 18:46 ` Laveesh Bansal 2026-11-23 22:43 ` Aniket Gupta 0 siblings, 1 reply; 9+ messages in thread From: Laveesh Bansal @ 2026-11-23 18:46 UTC (permalink / raw) To: Aniket Gupta; +Cc: git, Junio C Hamano Aniket Gupta <aniketgupta3001@gmail.com> writes: > Maybe we can use something like "report the number of objects in the > connectivity message". That title works for me. In the partial clone the extra three are blobs the trees refer to, so "number of objects" describes what is counted without saying they were checked. The commit message already says "number of objects in the hash", so I don't think anything else needs to change. Reviewed-by: Laveesh Bansal <laveeshb@laveeshbansal.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GSoC PATCH] fsck: report the real object count in the connectivity message 2026-11-23 18:46 ` Laveesh Bansal @ 2026-11-23 22:43 ` Aniket Gupta 0 siblings, 0 replies; 9+ messages in thread From: Aniket Gupta @ 2026-11-23 22:43 UTC (permalink / raw) To: Laveesh Bansal; +Cc: git, Junio C Hamano > That title works for me. Thanks for reviewing and checking the partial clone case :) ^ permalink raw reply [flat|nested] 9+ messages in thread
* [GSoC PATCH v2] fsck: report the number of objects in the connectivity message 2026-10-20 10:21 [GSoC PATCH] fsck: report the real object count in the connectivity message Aniket Gupta 2026-11-12 2:55 ` Laveesh Bansal @ 2026-11-29 10:02 ` Aniket Gupta 2026-11-29 19:10 ` Junio C Hamano 2026-11-30 12:36 ` [GSoC PATCH v3] " Aniket Gupta 1 sibling, 2 replies; 9+ messages in thread From: Aniket Gupta @ 2026-11-29 10:02 UTC (permalink / raw) To: git; +Cc: Junio C Hamano, Laveesh Bansal The verbose "Checking connectivity" message prints the value of get_max_object_index(), which is number of buckets in the object hash and not the number of objects in it. The hash is larger than what it holds so a repository with 21 objects says 64 objects. Add get_object_count() to return the number of objects in the hash and use it for the message. The loop below will still walk every bucket and it keeps using get_max_object_index(). Signed-off-by: Aniket Gupta <aniketgupta3001@gmail.com> Reviewed-by: Laveesh Bansal <laveeshb@laveeshbansal.com> --- Changes in v2: - Retitle as Laveesh suggested. In a partial clone the count also includes the blobs that the trees refer to, so "number of objects" fits better. - Add Laveesh's Reviewed-by. - Rebase onto current master. builtin/fsck.c | 13 ++++++++----- object.c | 5 +++++ object.h | 7 +++++++ t/t1450-fsck.sh | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index c4558efcf1..3aca0736d4 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -377,11 +377,14 @@ static void check_connectivity(struct repository *repo) /* Look up all the requirements, warn about missing objects.. */ max = get_max_object_index(repo); - if (verbose) - fprintf_ln(stderr, Q_("Checking connectivity (%d object)", - "Checking connectivity (%d objects)", - max), - max); + if (verbose) { + unsigned int nr = get_object_count(repo); + + fprintf_ln(stderr, Q_("Checking connectivity (%u object)", + "Checking connectivity (%u objects)", + nr), + nr); + } for (i = 0; i < max; i++) { struct object *obj = get_indexed_object(repo, i); diff --git a/object.c b/object.c index 97f7fc0e87..2fdba93d4c 100644 --- a/object.c +++ b/object.c @@ -20,6 +20,11 @@ unsigned int get_max_object_index(const struct repository *repo) return repo->parsed_objects->obj_hash_size; } +unsigned int get_object_count(const struct repository *repo) +{ + return repo->parsed_objects->nr_objs; +} + struct object *get_indexed_object(const struct repository *repo, unsigned int idx) { diff --git a/object.h b/object.h index 46cade33fb..20ea6f5c0c 100644 --- a/object.h +++ b/object.h @@ -173,6 +173,13 @@ int type_from_string_gently(const char *str, ssize_t, int gentle); */ unsigned int get_max_object_index(const struct repository *repo); +/* + * Return the number of objects currently in the object hashmap. This + * is smaller than the value get_max_object_index() returns, as that + * counts the buckets, which are not all in use. + */ +unsigned int get_object_count(const struct repository *repo); + /* * Return the object from the specified bucket in the object hashmap. */ diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh index 3e9eb251cb..c871ad8edf 100755 --- a/t/t1450-fsck.sh +++ b/t/t1450-fsck.sh @@ -1165,4 +1165,19 @@ test_expect_success 'fsck with blob size equal to core.bigFileThreshold' ' ) ' +test_expect_success 'fsck --verbose reports the number of objects' ' + git init count && + test_commit -C count one && + git -C count fsck --verbose 2>err && + test_grep "Checking connectivity (3 objects)" err +' + +test_expect_success 'fsck --verbose uses the singular for a single object' ' + git init single && + blob=$(echo single | git -C single hash-object -w --stdin) && + git -C single update-ref refs/tags/blob $blob && + git -C single fsck --verbose 2>err && + test_grep "Checking connectivity (1 object)" err +' + test_done base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe -- 2.54.0 (Apple Git-157) ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [GSoC PATCH v2] fsck: report the number of objects in the connectivity message 2026-11-29 10:02 ` [GSoC PATCH v2] fsck: report the number of objects " Aniket Gupta @ 2026-11-29 19:10 ` Junio C Hamano 2026-11-29 19:33 ` Aniket Gupta 2026-11-30 12:36 ` [GSoC PATCH v3] " Aniket Gupta 1 sibling, 1 reply; 9+ messages in thread From: Junio C Hamano @ 2026-11-29 19:10 UTC (permalink / raw) To: Aniket Gupta; +Cc: git, Laveesh Bansal Aniket Gupta <aniketgupta3001@gmail.com> writes: > The verbose "Checking connectivity" message prints the value of > get_max_object_index(), which is number of buckets in the object hash > and not the number of objects in it. The hash is larger than what it > holds so a repository with 21 objects says 64 objects. Micronits. - "which is the number of buckets" is missing "the". - What holds the objects is not a "hash" but a "hashtable". - In an empty repository, we have no hash buckets, so the capacity of the hashtable exactly matches the number of objects in that case. "In a non-empty repository, the hashtable is larger than what it holds" would be more accurate. For any non-empty table, grow_object_hash() allocates at least 32 buckets and doubles when '.obj_hash_size' - 1 <= '.nr_objs' * 2, so 21 objects indeed sit in 64 buckets. > Add get_object_count() to return the number of objects in the hash and > use it for the message. The loop below will still walk every bucket and > it keeps using get_max_object_index(). > > Signed-off-by: Aniket Gupta <aniketgupta3001@gmail.com> > Reviewed-by: Laveesh Bansal <laveeshb@laveeshbansal.com> > --- > Changes in v2: > > - Retitle as Laveesh suggested. In a partial clone the count also > includes the blobs that the trees refer to, so "number of objects" > fits better. Good. > - Add Laveesh's Reviewed-by. Good. > - Rebase onto current master. A report on rebasing is incomplete without an explanation of the reason why you had to rebase (what you wanted to achieve by rebasing). There certainly would have been changes on the 'master' front since the version you based your previous round on. But were there ones among these changes that you specifically wanted to take advantage of, or that caused conflicts that you wanted to resolve on your end (instead of having the maintainer do it for you)? Another small change not mentioned in the proposed log message is to report the number of objects using "%u". > builtin/fsck.c | 13 ++++++++----- > object.c | 5 +++++ > object.h | 7 +++++++ > t/t1450-fsck.sh | 15 +++++++++++++++ > 4 files changed, 35 insertions(+), 5 deletions(-) > > diff --git a/builtin/fsck.c b/builtin/fsck.c > index c4558efcf1..3aca0736d4 100644 > --- a/builtin/fsck.c > +++ b/builtin/fsck.c > @@ -377,11 +377,14 @@ static void check_connectivity(struct repository *repo) > > /* Look up all the requirements, warn about missing objects.. */ > max = get_max_object_index(repo); > - if (verbose) > - fprintf_ln(stderr, Q_("Checking connectivity (%d object)", > - "Checking connectivity (%d objects)", > - max), > - max); > + if (verbose) { > + unsigned int nr = get_object_count(repo); > + > + fprintf_ln(stderr, Q_("Checking connectivity (%u object)", > + "Checking connectivity (%u objects)", > + nr), > + nr); > + } By the time check_connectivity() reaches this point, cmd_fsck() has populated '.obj_hash' from its sources, and traverse_reachable() has already walked reachable trees and commits (which inserts referenced objects, including missing or promisor blobs, via lookup_tree() and lookup_blob()). Neither check_reachable_object() nor check_unreachable_object() in the loop inserts new entries into '.obj_hash', so get_object_count() matches the exact number of non-NULL objects visited by the loop. Using "%u" matches the return type of get_object_count() that is unsigned. > for (i = 0; i < max; i++) { > struct object *obj = get_indexed_object(repo, i); > diff --git a/object.c b/object.c > index 97f7fc0e87..2fdba93d4c 100644 > --- a/object.c > +++ b/object.c > @@ -20,6 +20,11 @@ unsigned int get_max_object_index(const struct repository *repo) > return repo->parsed_objects->obj_hash_size; > } > > +unsigned int get_object_count(const struct repository *repo) > +{ > + return repo->parsed_objects->nr_objs; > +} Tracking '.nr_objs' directly is clean. parsed_object_pool_new() zero-initializes the pool, create_object() increments '.nr_objs' on every insertion into '.obj_hash', and nothing decrements or removes entries before parsed_object_pool_clear() tears the pool down. All other callers of get_max_object_index() walk the bucket array with get_indexed_object(). builtin/index-pack.c:check_objects() passes the bucket count to start_delayed_progress() because its loop calls display_progress() with the bucket index, so leaving those callers untouched makes sense. The code is prepared to have up to 2 billion objects in an object pool on 32-bit machines, as the type of the .nr_objs member in the parsed_object_pool struct is 'int' (it is a bit surprising that it is not even "unsigned int"). Something to think about later after the dust settles (#leftoverbits). > struct object *get_indexed_object(const struct repository *repo, > unsigned int idx) > { > diff --git a/object.h b/object.h > index 46cade33fb..20ea6f5c0c 100644 > --- a/object.h > +++ b/object.h > @@ -173,6 +173,13 @@ int type_from_string_gently(const char *str, ssize_t, int gentle); > */ > unsigned int get_max_object_index(const struct repository *repo); > > +/* > + * Return the number of objects currently in the object hashmap. This > + * is smaller than the value get_max_object_index() returns, as that > + * counts the buckets, which are not all in use. > + */ > +unsigned int get_object_count(const struct repository *repo); Minor nit. "This is smaller than the value get_max_object_index() returns when the object hashmap is not empty, as that counts ...". > + > /* > * Return the object from the specified bucket in the object hashmap. > */ > diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh > index 3e9eb251cb..c871ad8edf 100755 > --- a/t/t1450-fsck.sh > +++ b/t/t1450-fsck.sh > @@ -1165,4 +1165,19 @@ test_expect_success 'fsck with blob size equal to core.bigFileThreshold' ' > ) > ' > > +test_expect_success 'fsck --verbose reports the number of objects' ' > + git init count && > + test_commit -C count one && > + git -C count fsck --verbose 2>err && > + test_grep "Checking connectivity (3 objects)" err > +' > + > +test_expect_success 'fsck --verbose uses the singular for a single object' ' > + git init single && > + blob=$(echo single | git -C single hash-object -w --stdin) && > + git -C single update-ref refs/tags/blob $blob && > + git -C single fsck --verbose 2>err && > + test_grep "Checking connectivity (1 object)" err > +' Both tests cover the expected counts cleanly. - test_commit defaults to a lightweight tag, producing 1 blob, 1 tree, and 1 commit (3 objects). - You can have only commits under refs/heads/, so you create a blob and point at it with refs/tags/blob, which would exercise a singular form. I wonder if you can just 'git add' a regular file in a freshly created repository without committing to get the same effect? 'git fsck' would consider the index as a connectivity anchor, so it will traverse to the blob object, without a tag to the blob, which is a bit of an unusual thing to have these days. Optional cleanup with test_when_finished "rm -rf ..." would match the test right above, though other tests in this file omit it too, so we should be OK. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GSoC PATCH v2] fsck: report the number of objects in the connectivity message 2026-11-29 19:10 ` Junio C Hamano @ 2026-11-29 19:33 ` Aniket Gupta 0 siblings, 0 replies; 9+ messages in thread From: Aniket Gupta @ 2026-11-29 19:33 UTC (permalink / raw) To: Junio C Hamano, git; +Cc: Laveesh Bansal > Micronits. > > - "which is the number of buckets" is missing "the". > > - What holds the objects is not a "hash" but a "hashtable". > > - In an empty repository, we have no hash buckets, so the capacity > of the hashtable exactly matches the number of objects in that > case. "In a non-empty repository, the hashtable is larger than > what it holds" would be more accurate. Will fix all in v3. > A report on rebasing is incomplete without an explanation of the > reason why you had to rebase (what you wanted to achieve by > rebasing). Apologies for missing that. In v1 the new tests were added at the end of t1450-fsck.sh. The test added by a9456705f1 (pack-check: fix bogus corruption report with core.bigFileThreshold, 2026-10-14) is now the last one there, so v1 no longer applied. I rebased to resolve that conflict myself. > Another small change not mentioned in the proposed log message is to > report the number of objects using "%u". Will be done in v3. > Minor nit. "This is smaller than the value get_max_object_index() > returns when the object hashmap is not empty, as that counts ..." Will change the comment. > I wonder if you can just 'git add' a regular file in a freshly > created repository without committing to get the same effect? Agreed. It prints "Checking connectivity (1 object)". Will use that in v3. > The code is prepared to have up to 2 billion objects in an object > pool on 32-bit machines, as the type of the .nr_objs member [...] is > 'int' [...]. Something to think about later after the dust settles > (#leftoverbits). Ack. I will check after this one. > Optional cleanup with test_when_finished "rm -rf ..." would match > the test right above, though other tests in this file omit it too, Will be done in v3. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [GSoC PATCH v3] fsck: report the number of objects in the connectivity message 2026-11-29 10:02 ` [GSoC PATCH v2] fsck: report the number of objects " Aniket Gupta 2026-11-29 19:10 ` Junio C Hamano @ 2026-11-30 12:36 ` Aniket Gupta 1 sibling, 0 replies; 9+ messages in thread From: Aniket Gupta @ 2026-11-30 12:36 UTC (permalink / raw) To: git; +Cc: Junio C Hamano, Laveesh Bansal The verbose "Checking connectivity" message prints the value of get_max_object_index(), which is the number of buckets in the object hashtable and not the number of objects in it. In a non-empty repository the hashtable is larger than what it holds, so a repository with 21 objects says 64 objects. Add get_object_count() to return the number of objects in the hashtable and use it for the message, printed with "%u" as the count is unsigned. The loop below will still walk every bucket and it keeps using get_max_object_index(). Signed-off-by: Aniket Gupta <aniketgupta3001@gmail.com> Reviewed-by: Laveesh Bansal <laveeshb@laveeshbansal.com> --- Changes in v3: - Reword the log message: "the number of buckets", "hashtable" instead of "hash", and the hashtable is larger than what it holds only in a non-empty repository (Junio). - Mention in the log message that the count is printed with "%u" (Junio). - Say in the comment above get_object_count() that the count is smaller only when the hashmap is not empty (Junio). - In the singular test, add a file to the index instead of creating a blob and pointing a tag at it (Junio). - Clean up the repositories the two new tests create with test_when_finished (Junio). builtin/fsck.c | 13 ++++++++----- object.c | 5 +++++ object.h | 8 ++++++++ t/t1450-fsck.sh | 17 +++++++++++++++++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index c4558efcf1..3aca0736d4 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -377,11 +377,14 @@ static void check_connectivity(struct repository *repo) /* Look up all the requirements, warn about missing objects.. */ max = get_max_object_index(repo); - if (verbose) - fprintf_ln(stderr, Q_("Checking connectivity (%d object)", - "Checking connectivity (%d objects)", - max), - max); + if (verbose) { + unsigned int nr = get_object_count(repo); + + fprintf_ln(stderr, Q_("Checking connectivity (%u object)", + "Checking connectivity (%u objects)", + nr), + nr); + } for (i = 0; i < max; i++) { struct object *obj = get_indexed_object(repo, i); diff --git a/object.c b/object.c index 97f7fc0e87..2fdba93d4c 100644 --- a/object.c +++ b/object.c @@ -20,6 +20,11 @@ unsigned int get_max_object_index(const struct repository *repo) return repo->parsed_objects->obj_hash_size; } +unsigned int get_object_count(const struct repository *repo) +{ + return repo->parsed_objects->nr_objs; +} + struct object *get_indexed_object(const struct repository *repo, unsigned int idx) { diff --git a/object.h b/object.h index 46cade33fb..21e0837ed2 100644 --- a/object.h +++ b/object.h @@ -173,6 +173,14 @@ int type_from_string_gently(const char *str, ssize_t, int gentle); */ unsigned int get_max_object_index(const struct repository *repo); +/* + * Return the number of objects currently in the object hashmap. This + * is smaller than the value get_max_object_index() returns when the + * object hashmap is not empty, as that counts the buckets, which are + * not all in use. + */ +unsigned int get_object_count(const struct repository *repo); + /* * Return the object from the specified bucket in the object hashmap. */ diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh index 3e9eb251cb..5503bd2533 100755 --- a/t/t1450-fsck.sh +++ b/t/t1450-fsck.sh @@ -1165,4 +1165,21 @@ test_expect_success 'fsck with blob size equal to core.bigFileThreshold' ' ) ' +test_expect_success 'fsck --verbose reports the number of objects' ' + test_when_finished rm -rf count && + git init count && + test_commit -C count one && + git -C count fsck --verbose 2>err && + test_grep "Checking connectivity (3 objects)" err +' + +test_expect_success 'fsck --verbose uses the singular for a single object' ' + test_when_finished rm -rf single && + git init single && + echo single >single/file && + git -C single add file && + git -C single fsck --verbose 2>err && + test_grep "Checking connectivity (1 object)" err +' + test_done base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe -- 2.54.0 (Apple Git-157) ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-11-30 12:36 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-20 10:21 [GSoC PATCH] fsck: report the real object count in the connectivity message Aniket Gupta 2026-11-12 2:55 ` Laveesh Bansal 2026-11-12 13:07 ` Aniket Gupta 2026-11-23 18:46 ` Laveesh Bansal 2026-11-23 22:43 ` Aniket Gupta 2026-11-29 10:02 ` [GSoC PATCH v2] fsck: report the number of objects " Aniket Gupta 2026-11-29 19:10 ` Junio C Hamano 2026-11-29 19:33 ` Aniket Gupta 2026-11-30 12:36 ` [GSoC PATCH v3] " Aniket Gupta
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox