)]}'
{
  "commit": "df67d73ca3268eec5c924d6fe9d2c050ce23f3b1",
  "tree": "825a5dba16a1fdeaca3c9e650f74286f458f5897",
  "parents": [
    "94f057755b7941b321fd11fec1b2e3ca5313a4e0"
  ],
  "author": {
    "name": "Jörg Thalheim",
    "email": "joerg@thalheim.io",
    "time": "Sun May 17 15:21:11 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon May 18 09:30:29 2026 +0900"
  },
  "message": "config: retry acquiring config.lock, configurable via core.configLockTimeout\n\nConcurrent config writers race for the \".lock\" file, which is taken\nwith open(O_EXCL) and no retry, so the losers fail right away with\n\"could not lock config file\".\n\nThis shows up with parallel \"git worktree add -b\" against the same\nrepository: each one writes a couple of branch.* keys and the losers\nfail at random. Worse, \"git worktree add\" doesn\u0027t propagate that\nfailure to its exit code, so the tracking config is silently dropped.\n(The swallowed error is a separate bug.)\n\nRetry instead of giving up on the first EEXIST. The lock is only held\nwhile rewriting a small file, so the loser only has to wait out the\nother writers. Same approach as 4ff0f01cb7 (refs: retry acquiring\nreference locks for 100ms, 2017-08-21).\n\nOn the semantics: the on-disk config is read only after the lock is\ntaken, so writers touching different keys can\u0027t lose each other\u0027s\nchange. Writers touching the same key still get last-writer-wins, but\nthat is already the case today and would need a compare-and-swap config\nAPI to fix. The retry only turns hard failures into successes.\n\nDefault to 1000ms, like core.packedRefsTimeout: same shape of problem,\none shared file everyone serializes through. A larger timeout only\ncosts anything when a stale lock is left behind by a crash, which is\nrare; a smaller one fails spuriously on slow filesystems (NTFS has\nbeen seen needing more than 100ms). Make it configurable as\ncore.configLockTimeout. There is no chicken-and-egg problem: we read\nthe config before we lock it.\n\nmicrosoft/git carries a similar patch (core.configWriteLockTimeoutMS,\ndefault off) for Scalar\u0027s tests. Defaulting to non-zero here because\nthe worktree case fails silently.\n\nHelped-by: Patrick Steinhardt \u003cps@pks.im\u003e\nHelped-by: Johannes Schindelin \u003cJohannes.Schindelin@gmx.de\u003e\nSigned-off-by: Jörg Thalheim \u003cjoerg@thalheim.io\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a0ebf03e2eb050c8c2a642953a3ca383c0d9f2e6",
      "old_mode": 33188,
      "old_path": "Documentation/config/core.adoc",
      "new_id": "340329edc3814376d6ea99c7e905b862c4980ca4",
      "new_mode": 33188,
      "new_path": "Documentation/config/core.adoc"
    },
    {
      "type": "modify",
      "old_id": "156f2a24fa00271c6d6adafac16527e674f5ccd4",
      "old_mode": 33188,
      "old_path": "config.c",
      "new_id": "ac9563781bfb219bb5b81c1c39b8ea0425642308",
      "new_mode": 33188,
      "new_path": "config.c"
    },
    {
      "type": "modify",
      "old_id": "128971ee12fa6c510c4110d9b958037fbf578f42",
      "old_mode": 33261,
      "old_path": "t/t1300-config.sh",
      "new_id": "12a1cb85809b8b8f4b528ac3b2430acc3d24b58e",
      "new_mode": 33261,
      "new_path": "t/t1300-config.sh"
    },
    {
      "type": "modify",
      "old_id": "e7829c2c4bfdc3d26724a56ba109034a12d7103a",
      "old_mode": 33261,
      "old_path": "t/t3200-branch.sh",
      "new_id": "5f8a31c21d0eaf5582047d225a224db36aa4629a",
      "new_mode": 33261,
      "new_path": "t/t3200-branch.sh"
    },
    {
      "type": "modify",
      "old_id": "e592c0bcde91e9b41626d1ff7a355b4cc4a6580a",
      "old_mode": 33261,
      "old_path": "t/t5505-remote.sh",
      "new_id": "aea9222649f7bbaf7a02f3f0be711d3cb8b6cfe4",
      "new_mode": 33261,
      "new_path": "t/t5505-remote.sh"
    }
  ]
}
