From: Michael Montalbo Date: Sun, 23 Aug 2026 17:18:48 GMT Subject: [RFC PATCH 04/14] organize: add the --label selector Message-ID: <20260823171915.2662373-5-mmontalbo@gmail.com> In-Reply-To: <20260823171915.2662373-1-mmontalbo@gmail.com> status and apply act on every out-of-place file at once. To reconcile one group at a time, a caller needs a way to name a subset. Add --label . A key=value selector matches a file whose recorded labels include it; a bare key matches any value of that label. The selector is repeatable and the matches combine, so a file matching any selector is included. A selector can name any recorded label, not only the ones [layout] places files by. git organize apply --label component= then reconciles one component at a time, which is how a large layout is carved in reviewable steps. Signed-off-by: Michael Montalbo --- Documentation/git-organize.adoc | 118 ++++++++++++++++---------- builtin/organize.c | 25 ++++-- organize/organize.c | 34 +++++++- organize/organize.h | 7 +- t/t0096-organize.sh | 143 ++++++++++++++++++++++++++++++++ 5 files changed, 270 insertions(+), 57 deletions(-) diff --git a/Documentation/git-organize.adoc b/Documentation/git-organize.adoc index 37ada38234..aca8934b26 100644 --- a/Documentation/git-organize.adoc +++ b/Documentation/git-organize.adoc @@ -9,8 +9,8 @@ git-organize - Reconcile a source tree against a declared layout SYNOPSIS -------- [verse] -'git organize status' [--exit-code] -'git organize apply' +'git organize status' [--exit-code] [--label ...] +'git organize apply' [--label ...] 'git organize apply' --labels-only [--reseed] @@ -24,16 +24,18 @@ file belongs in. `.gitorganize` at the repository root has three sections. `[scope]` names the files in scope, one pathspec per line; with no `[scope]` section -nothing is in scope. `[layout]` is the project's placement map, authored by -hand: ordered `