)]}'
{
  "commit": "eeb8685890cab16ca0e6fb58be5740ae058fe8cc",
  "tree": "16afe6e165c53623dd6bbb593ca39d78fa9bf0af",
  "parents": [
    "908a6a5848342883575fcdec5e917048de2a53e5"
  ],
  "author": {
    "name": "Antoine Musso",
    "email": "hashar@free.fr",
    "time": "Tue May 30 18:27:15 2023 +0200"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Mon May 25 20:46:21 2026 +0200"
  },
  "message": "ReceivePack: reject creation of one level refs such as refs/main\n\nCgit describes valid reference names in the `git-check-ref-format(1)`\nmanual page which lists the constraints. Excluding the `refs/` prefix,\nthe name must contain at least one slash to enforce a category such as\n`heads/`, `tags/`.\n\nOn Gerrit, jGit accepts a user pushing to `refs/main` but when\nreplicating the reference using ssh and cgit, receive-pack on the remote\nrejects it with:\n\n Error: Failed replicate of refs/main to X, reason: funny refname\n\nIt is a special case in cgit `builtin/receive-pack.c`:\n\n--------8\u003c-----------8\u003c-----------8\u003c-----------8\u003c-----------8\u003c-----------\nstatic const char *update(struct command *cmd, struct shallow_info *si)\n{\n...\n        /* only refs/... are allowed */\n        if (!starts_with(name, \"refs/\") || check_refname_format(name +\n5, 0)) {\n                rp_error(\"refusing to create funny ref \u0027%s\u0027 remotely\",\nname);\n                return \"funny refname\";\n        }\n--------8\u003c-----------8\u003c-----------8\u003c-----------8\u003c-----------8\u003c-----------\n\nSo that if the part coming after `refs/` has a single component\n(`master`) it is rejected.\n\nBug: 582000\nChange-Id: Ica2bdc58e81459f08cfe42c2961a3c06622c30df\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7f1dfc32ce7505495cc0bd6a2bab6644fc8e6378",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java",
      "new_id": "27737154ab8b72e183c9ec120c5a15b9fe6945fc",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java"
    },
    {
      "type": "modify",
      "old_id": "595b970749e1b7f5dab6ff13be6df38410a6b9e5",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackTest.java",
      "new_id": "bcc7082f7802a020db644754591e4bb35f8e81d3",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackTest.java"
    },
    {
      "type": "modify",
      "old_id": "c9dc6da4ba55c42b16190eec613547866f8dfac7",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java",
      "new_id": "01a43611cf94ed3368f53b598567e2ac75ce0c78",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java"
    },
    {
      "type": "modify",
      "old_id": "8b05d4155a9c4848fd0ae11d0da0a085cf662fbb",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java",
      "new_id": "ec7d4c169637dd94c6a2d73f3fd2cf4ed348a00d",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java"
    }
  ]
}
