From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 27F3A1F953 for ; Fri, 5 Nov 2021 23:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232650AbhKEXcb (ORCPT ); Fri, 5 Nov 2021 19:32:31 -0400 Received: from cloud.peff.net ([104.130.231.41]:54116 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbhKEXca (ORCPT ); Fri, 5 Nov 2021 19:32:30 -0400 Received: (qmail 12810 invoked by uid 109); 5 Nov 2021 23:29:50 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 05 Nov 2021 23:29:50 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 23741 invoked by uid 111); 5 Nov 2021 23:29:50 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 05 Nov 2021 19:29:50 -0400 Authentication-Results: peff.net; auth=none Date: Fri, 5 Nov 2021 19:29:49 -0400 From: Jeff King To: Taylor Blau Cc: Junio C Hamano , git@vger.kernel.org Subject: Re: [PATCH] test_bitmap_hashes(): handle repository without bitmaps Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Nov 05, 2021 at 03:11:11PM -0400, Taylor Blau wrote: > > I wonder how you found it. Diagnosing a repository that did not > > seem healthy? What I am getting at is if we want a new option to > > make a plumbing command, other than the test-tool, that calls this > > function, as the latter is usually not deployed in the field. > > I would not be surprised if this was discovered via Coverity, or by > manual inspection. Peff and I have been merging a slew of releases from > your tree into GitHub's fork and so have been reading code in the more > recently changed areas. It was Coverity in this case. I haven't actually used the name-hash dumper for any real-world debugging. > On the test-tool vs. plumbing thing: I think there are some compelling > reasons in either direction. There's no *good* home for these in our > current set of plumbing tools. E.g., the closest example we have is `git > rev-list --test-bitmap `, which is kind of ugly. When we needed > these new inspection tools for some of the newer bitmap-related tests, > adding them via the test-helper suite was a conscious choice to not > build on the ugliness of `--test-bitmap`. > > But on occasion these test-tool things are useful to have "in the > field", as you say. It's rare enough that I usually just clone a copy of > our fork as needed and build it when I do find myself reaching for > test-helpers. Yeah, I could see arguments both ways on such tools (not just bitmaps, but other "debug this binary format" tools like read-midx and read-graph). I'm content to leave it as-is until I come across more in-the-field cases where those tools would be useful. Half the time I end up in a debugger anyway. ;) -Peff