From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E6C43563CD for ; Sun, 23 Aug 2026 17:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787505568; cv=none; b=KaS4Iw7uWdvvM4okVYGd29jTcdVWERfnDWmcKNMmLCPM9/QAjIDN67pmIECv88iGRHZWOo1R5/Fp7zcwydpU8GY9691MYoep1w0wc0HtMK07emHuls8cyslqbBiFb4U6qT3QAqH/d2SnIO9bVAviFadQFjfoqyDN2L/wx6r//YA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787505568; c=relaxed/simple; bh=Ve/r84CopHWGdWliaUlmiILPF8qbiQQ9bFXR/kAr+Os=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hvnINj9NYrv3Se2NzHSojlM8Zb3NyX++2ATulH4YjFx/6WQmRkJwNRzusi5iCDY3FUMDcp/CqOx4ensbDZ7TNwuqQsXF0iOVbGvsdbfkVXyTE8t/ztnTLPdZ7Wj8vVreqeChJ+n1lKptgBRF68oS5kXJaCIHa4MzSL0E1+8vJ8E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iema91kI; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iema91kI" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-ca7bea5e5b3so2166872a12.1 for ; Sun, 23 Aug 2026 10:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787505563; x=1788110363; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=H7ZFN7MbPtjo7ZNoNn7aJOxlgOG0hfgMLkk0q9HLusY=; b=iema91kIjtVO90SdwdsjxWp68wYjGjdhjPLLZqrddHAqk0mbyjVdj6hguz09ysi7l4 WoMAhmJ/INiOPhUci5tQZWAn2uLBpU1n6ljuZdNFXpXRqEwWnelHFwRMbYAnJo9/+s9s UxJt9OsOb5TPYOFAjycaofzqsNrrrS7UtNwt3t49LERWzs91gU1f+aX4turliBeXLcpF BZ+IUIxMznMpxo/PzjpquDi3u6QLI4diwfThwvJEN3fiaxfz+PnbUcqOA7k0cH4i5u31 dvCWhKnUzfiCMslxeGnuWLj+EUgH0zqMuLH1ScALF9vA3538gp0RvBcD+R69k+i1oooW 9A1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787505563; x=1788110363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=H7ZFN7MbPtjo7ZNoNn7aJOxlgOG0hfgMLkk0q9HLusY=; b=ZSSN78zFFvmKZ3g6Xm7YdNxROYQB1dVYQH4f5cjtMITq/iJnefff4HPCDvZb2w01f4 W9c2h/Z/GgiS8GZQ39oLkO3WjccFLyqfOSce5RbWrF8NEJuwUg9w7Y8Zi8SyD1ixA4AM OS11oleM5NDFaghPCgqH95sg+D71x70gUlFleBcRUNmhByftSIYcQrkystsENHA5RpvR r7XYIYPDOIXqUPs3tT5jTQCfl46sQWLUn2Lk9+F8fauKnzn7gPCQGt7PfeUtX2VSq7XZ dqoVw26OZCWmNjjdOw/11ocggIUbB72sBQsLZMDlf8Wbpum96TT5IanTp9Swp81XycHp 7Gtg== X-Gm-Message-State: AFuF++kVwtpti75OzO/qDmO89KGIBEDAiqUeJKRCWQhlRgd0l2nJXLWm Bwts999lXsECtQ87tH/oCbfNAD26ZzAo+0lx75VTTaKlz6Fao2hqzqA8wDGOdA== X-Gm-Gg: AR+sD13qFJ+Ekb7Tz8oUcs/L2PTw01BOFWkG1mU7EE2jch5O4xuCx4qyCAMz/GHsBWI c9ykGOTcXdX9+ZQPpyYmXJtCyeARlGYAonP1hx3xDvdfOj5Y2xkaruZccLMD9Oo703ypc/EhdOh LpWDmc1kmFxTzq5uXc4qT7uZfpbjoUy22Pkn7onzh7j6Koz91cj+mUiCnfvRDj5GOWS4j4gJhZv 0naeOnQLQv9inye1DUbt27lOiEYyEUb9LFTbpb6b7iG649gsmcHlcTHcM5FQyWFPs0YFC26Tcod seW7dS2gMLrKu7gPWzcS9waNHKkvb3xxlrDq/xbquzN08I6OyCZhJEEA9uTy2DTJRJOdkDvXFhd Uhuzk3xGy27KWu0rAzuk+gFwfIYuNsmlDGaEb+pzmJsyv6yMSkTbO4SWte7XQKIv6zkBosr5JoN 7vQEtDR1yd3IwlHfVpbnnDzARKWhXQJUPjLJ8YmQdMmS4XbjtQcqI/bhBrOp33nbGd4URCqx21c nlyh9azkgjBTUCGIqsAXP9WdB22bdv8lqIoZ6K9HGEIUUEpAwrc7wSMjlZtD0i1Lfn+EGCe8AMX gdELdZ+D4SCh/yL6r4IS6OJHWkOxkgTs3EC5e+TbBcu+6Q== X-Received: by 2002:a17:90b:1b0e:b0:381:a766:efc9 with SMTP id 98e67ed59e1d1-395deec7930mr21425883a91.7.1787505562406; Sun, 23 Aug 2026 10:19:22 -0700 (PDT) Received: from localhost (192-184-169-91.fiber.dynamic.sonic.net. [192.184.169.91]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-141861732f8sm17282107c88.10.2026.08.23.10.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 10:19:21 -0700 (PDT) From: Michael Montalbo To: git@vger.kernel.org Cc: Patrick Steinhardt Subject: [RFC PATCH 04/14] organize: add the --label selector Date: Sun, 23 Aug 2026 10:18:48 -0700 Message-ID: <20260823171915.2662373-5-mmontalbo@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260823171915.2662373-1-mmontalbo@gmail.com> References: <20260823171915.2662373-1-mmontalbo@gmail.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 `