From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796395461; b=ONI0sUjZ5mYXunucZnPfuRfdWitbjVlAPhmlhAc3d2A2GSO8+MR/2bICjSuBaiFF3Wkq q81bA0J4AKFC06Fgm/ACumIg8j7NpN6N2K1yugXaDpOYX+N+5xC4gPiuA9Ck+CRNYzXDm aGPqNPOL0MMgBdL79AOt9Xa3DVsl7auodwmEQ9DM6npYDy5/yzKy0XLaVoy3n96ZPEKb4 +51v4c/t6vn0bMsV9kFWYc21TqthgkR0GixkOMa2xb3Ej72uvsTngRpErXSVrl1pXqRGc LP1h+LqKGcDdsCm6PpHdjw9xUeFFviy3Mbkn4sJWkUzgtUCaOHynSRPfLr7cLyhWZ3A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796395461; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:References:Content-Language:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=pdZYt5XZHRTQKVF/MNClC6SHJLXUlMraPq0TLqix090=; b=Yc87+O/v3d3E4UJxRb0Rfafnhs+auayQNzrSDinag0NMphDkPCdmPCgJW3VMX7WycHHh L56yr22Pa4Zylz+1gbkzdQ6gx8Wsim8mGkOah4IZd7vG8arNDmS3mOrImAGI3dTAty8fh IV+So13cR5gv+m3trhnqp6ZwktPCIEe3GXEbSFEw+NgMNlLTBwlbvyCMuiCtAMLBLYzvS i2fTA8AgHvChJ72wmCUBtvbMgeFh/87eDk3BNgSLr7AUVBQIjW8vuD4jz2ZMgZezt/JID EqkXy3vv6FcwLiguWPO+wthdUI5ZkOsPiO3tRlYanqFB40RuXH5kNTZlXxwHTXhbgmQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=P5aW6c0V; arc=none smtp.remote-ip=209.85.208.170 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10211606A322 for ; Fri, 4 Dec 2026 14:44:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 10211606A322 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.a=rsa-sha256 header.s=20260707 header.b=P5aW6c0V Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-3aff2ab0808so6775341fa.0 for ; Fri, 04 Dec 2026 06:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796395459; x=1797000259; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=pdZYt5XZHRTQKVF/MNClC6SHJLXUlMraPq0TLqix090=; b=P5aW6c0VB46TpOGdQrWNHMLFOuGPlpTd+II2CdYbInpOQA5pU0PLS7FVywH3NOHW4f 6Ks1UQLeoulTCeCPucp7Y8maBVM3yHFAz+ZH/eC4/E0HFYK3h6uJvGnOmR6zcxxh4Yki yzhrBCm5GOni3CrrpPbbP1j9Ro6ikC/0EfKJvX0PLeAVU7mT48gxaD60L4QeRzwiDFHi nSnDwSKZmghjSMU0PmpHCjym8kjaaeitTeX1gGSTZ1eFRqfirZhVIZCtDzFx567HVK/j 7AfSsTzl1O9YHs/CNWrhZ2NjaLOSrpmE7GYPJYeivK7vPpeMgzH0RgFFzp4zKm+j/biu bFCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796395459; x=1797000259; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=pdZYt5XZHRTQKVF/MNClC6SHJLXUlMraPq0TLqix090=; b=Y7E88sSb/Ang2IwJXAwev836xxCpcHkmxUVRwsBuZw4UZOJxp49MuyMlvKfa8ZxEG+ hX+lHX8U+B3xLrbh60jhxEUkbtb9K80UKnXqPS0BolRD32hYxU5VLSr5nSUWfkrYxRzH G0TezYWMDa1s1OOAhNcQE7fL4TQLAruhoEL3jmaiujCOc5kHYA9Kvcjd5TFZsxpLHFj3 2tm5dagh5JuRcXXZJgm2oBEj/cOmsxLWAKdLwFa97KJ0bN7nejdjR2NdvtrHSEDUkm6h TMvzmmWFBWATsZLODjezfsW3GSh/E5TofUHSR1qvKwO9OIcz6nF22Uj8OKqGp62VHQ+0 sEuQ== X-Gm-Message-State: APuU4Z8go73wWuszrLXZ82BgH9ZhP1e9+0O0unS88ARuCR8qd6jaOyoy wRP+0p0beBfT29SjbRlfWbalVWKKNu8ewLNUJAvaBonSYGOvjIQDG3CnkKHESeY9 X-Gm-Gg: AZFdTZcTqMAlvHioLg/p2zftUzYaHNyCIbIjij9DgubMiRsP5IfAMNs0YKXpkzyNucm B/F0vpf5/blw9QrSzSM13xByNX/9SOOXc+jRQgCWKMTo9Bb+ksE30NNZYzwq0iuX1H1xDsqJ+cq uTQV/LYgsZf69zgWnKdsV44w5OEUW0wYNRQKYlp2hUVcEF/SSLSFo4XlH6PAcCuW508yVbh/rPV 5vc/cPckXV7Q769MPG6YAgagifxEZFySbRhAprBmnUCpECPAk0oHev5O9oB4aQOO3aQ3SbKptwZ lEWPbYZfobGmWkWY9VcCygfXmP2PkG3+SuDnHS5EvufW5pC3T+7VB2U5Bn86x/F075UFhiT7FsZ UB9d4C6Kw9KQLZMRAzFyncQYha2me3g+P3IjABZuDdHGN6sLOo7pLsrNz/Mi8/8OV82RNtVm98B YM7QonB7BmoANsGvM3O3wM+pTyFr1sWhnwI/tz+SW3yPpUBdRlrrg5SVArB73OaKeiXsS6UVY2l R6yE+DP+QCBxPySf33ZHAhcu0FDIZ19aG24cMdI/jgVZcbGN/rt/q3kM9TBYdO2n0+4t6UzkKUo tmjC5Srp3lYAxGFy9uG7yZXPeREAclzO7QupeMMPHT5WsQd4VqNqlvYv1hiLAfrHJMf6ZXfqel4 t9+aBpQ5VgVynjI43PNZLrFan2KSg/+S9k0IkBTBt2mxQSn2G2VgjbUebgLl5PsmUxZsG32aE2d gsr0/uhzKtTnZKbI1nwDqDvr9cvgg9nSMrX16n1nd1DQNe2cXv4K8RgQ== X-Received: by 2002:a05:6512:3b88:b0:5c0:46a:af07 with SMTP id 2adb3069b0e04-5c3861781f6mr633411e87.24.1796395459107; Fri, 04 Dec 2026 06:44:19 -0800 (PST) Received: from [192.168.1.109] ([136.61.86.144]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5c384aa8795sm664114e87.77.2026.12.04.06.44.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 06:44:18 -0800 (PST) Message-ID: Date: Fri, 4 Dec 2026 09:44:16 -0500 X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] cache-tree: do not start an ODB transaction for repair-only updates To: git@vger.kernel.org References: Content-Language: en-US From: Derrick Stolee In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/4/2026 9:37 AM, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > Since e928a32355dc (object-file: create ODB transaction temporary > directory eagerly), every ODB transaction in the "files" backend > immediately creates `/tmp_objdir-transaction-XXXXXX/pack`. > > The `cache_tree_update()` function begins such a transaction whenever > none is in flight, even with `WRITE_TREE_REPAIR`. A repair never writes > objects, though: it only hashes tree buffers and checks whether those > objects already exist. Because `unpack_trees()` and `git checkout` both > request repair-only updates, a checkout can now create and then remove a > temporary object directory for nothing. I imagine that this has some performance implications beyond your issues with long paths. Perhaps it's minor compared to everything else going on. > On Windows without `core.longPaths=true` (which only exists only in Git > for Windows so far, anyway), that is not just wasteful. The `mkdir()` > refuses paths of 248 characters or more on that platform. > > As a consequence, Git for Windows' `t7429-submodule-long-path.sh` > started failing when Git for Windows was rebased onto v2.98.0-rc0. The > object directory of the nested submodule is 214 characters long. > Appending `/tmp_objdir-transaction-XXXXXX/pack` goes over the limit, and > the checkout fails: > > error: unable to create temporary object directory in > .../objects: Filename too long > fatal: failed to start object transaction > > Since that operation does not need to write any new objects, skip the > transaction when repairing, and keep the transaction for updates that > write trees. Obviously, the latter would still fail, but we do not test > for that in Git's test suite, and addressing that is a longer story > (involving upstreaming the `core.longPaths` support from Git for > Windows, something we'll need to do _some_ day, but not during the `-rc` > phase of v2.98.0). Thanks for stepping through how this was caught. Yes, there are going to be other issues with long paths. This change is a pretty solid fix for avoiding unnecessary transactions. And perhaps is a good thing to find for future avoidance of transactions, when possible. LGTM. -Stolee