From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a1-smtp.messagingengine.com (flow-a1-smtp.messagingengine.com [103.168.172.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 868393CB571 for ; Thu, 24 Sep 2026 16:45:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790268317; cv=none; b=hi7BjpKow/jsyI++qT7U0yNIpBNhNJEyre+yOasv6ioTzssTt0AagKxEkv/4myTI4Xr4MR4CTRurnJ5DqGxoaQMfh7iTjoyultWgzy40d1n7A7+jClTCrqOLWjb1mdqrqF+PBzD+sk3PJQfO1sg12bSUl6k52LG8WyY0mF8qTe0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790268317; c=relaxed/simple; bh=FqesKS5QIyrNyn9dv/pZhoQ05NLPaCEK669tEJCTR1M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZL80OGYgCQOn5oK1tSAFMCyysqVvlN5+nKLrMaGQiMmjJx2CRlEihtO7IpWVWA++qqptDpuotXMt6UbhN96QRbtuMkZjUKRYJ72rh8M6WRloJNoSoIgQUtubXcPb/ranVan52RuQPOQOSJSivvmCcVxl6zMzM9PAZc2jrvgdYhw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com; spf=pass smtp.mailfrom=fastmail.com; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b=b5AZ8UHZ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=u47aYAEA; arc=none smtp.client-ip=103.168.172.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="b5AZ8UHZ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="u47aYAEA" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailflow.phl.internal (Postfix) with ESMTP id 80118138027E; Thu, 24 Sep 2026 12:45:14 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Thu, 24 Sep 2026 12:45:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm1; t=1790268314; x=1790271914; bh=qqgZ8fENjfBJbvjoGF0/U 4FBWUgovmTCpiQAN4HTxk8=; b=b5AZ8UHZ8stYL4S+sbdsi+SpWWEZrUfjjKMMy zx9lnhohPL9pbBObRgzdBOQEXd6KxRUdbNY7r0AT5xpILvkCuN0nT6GJR0mIlsIa PSeaj5q0X9POojg9np3fDQ2znuWLldvw8VPNan1z+rfqcXYn1Ay4CVcLnBNo8N9q aa1HecBJEfznWfR3jpxo7i/wRka14QjNCaWorNPs1vEpaGwZIx0L5dxBd3Hyss8y 7zyqoI1eAKqgFgeut6KpSDXBvai/Sg0M5/AnKn4V8cEpVMGY7amYQdZrPtUwwhXe GlcLoIGxyT5vOsr97WUVep0WShLt4pCseoF/xrWPqeDWFhXIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790268314; x=1790271914; bh=qqgZ8fENjfBJbvjoGF0/U4FBWUgovmTCpiQ AN4HTxk8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xy: Feedback-ID: id2564aa6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Sep 2026 12:45:13 -0400 (EDT) From: "Mark C. Chu-Carroll" To: git@vger.kernel.org Cc: jltobler@gmail.com, "Mark C. Chu-Carroll" Subject: [PATCH 0/1] repo: add filtering options to "repo structure" Date: Thu, 24 Sep 2026 12:45:02 -0400 Message-ID: <20260924164503.119506-1-markchucarroll@fastmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit repo: add filtering options to "repo structure" "git repo structure" provides a collection of useful information about the information stored in a repo. In particular, it's valuable for diagnosing performance issues caused by large objects stored in a repo. The current implementation of "git repo stucture" provides summary information about everything in the repository - all of the branches, remotes, tags, stashes, and notes. But sometimes to properly diagnose a problem, it's useful to be able to exclude refs that are known to not be relevant to the issue at hand. Add a set of flags that allow a user to selective exclude reference types from the report generated by "git repo structure". When a ref type is excluded by the filter, it no longer appears in the report (ie, if "--no-tags" is passed, the report line for "Branches" will no longer appear under "* References"). Following the pattern of flags that are only used to disable functionality (eg, "--no-verify" in "builtins/push.c"), only the "--no-" syntax is listed in the updated documentation. Overview of the changes: - Add an enum to represent the structure flags. - Add structure flags to the options for the "repo structure" commands. - For each reference flag, add a conditional in "count_references" which decides whether or not to add a ref to the pending list. If an references is not added to the pending list, the things it transitively references will not be added to the stats. - Add a set of test cases to verify that reference counts in the repo structure report correctly omit the specified resource types. - Update the documentation for git-repo to include the new options. Mark C. Chu-Carroll (1): repo: add filtering options to "repo structure" Documentation/git-repo.adoc | 35 ++++- builtin/repo.c | 158 +++++++++++++++------ t/t1901-repo-structure.sh | 276 ++++++++++++++++++++++++++++++++++++ 3 files changed, 427 insertions(+), 42 deletions(-) -- 2.53.0