get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2230177/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2230177,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230177/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260429141850.1.6f48ecca7f833b4f4b90ba78432475de1461e838@changeid/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260429141850.1.6f48ecca7f833b4f4b90ba78432475de1461e838@changeid>",
    "date": "2026-04-29T12:18:51",
    "name": "patman: fix use in worktree",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "48dde56b9bf3a798c0a844fa4e9b38a34980f09b",
    "submitter": {
        "id": 90265,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/90265/?format=api",
        "name": "Ludwig Nussel",
        "email": "ludwig.nussel@siemens.com"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260429141850.1.6f48ecca7f833b4f4b90ba78432475de1461e838@changeid/mbox/",
    "series": [
        {
            "id": 502048,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502048/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=502048",
            "date": "2026-04-29T12:18:51",
            "name": "patman: fix use in worktree",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502048/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230177/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230177/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=siemens.com header.i=ludwig.nussel@siemens.com\n header.a=rsa-sha256 header.s=fm2 header.b=D2fFp8oj;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=siemens.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=siemens.com header.i=ludwig.nussel@siemens.com\n header.b=\"D2fFp8oj\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=siemens.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=ludwig.nussel@siemens.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5Gbk6Wdcz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 22:20:34 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 1CF428487C;\n\tWed, 29 Apr 2026 14:20:30 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id E093D84870; Wed, 29 Apr 2026 14:20:28 +0200 (CEST)",
            "from mta-65-227.siemens.flowmailer.net\n (mta-65-227.siemens.flowmailer.net [185.136.65.227])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id D393B84843\n for <u-boot@lists.denx.de>; Wed, 29 Apr 2026 14:20:26 +0200 (CEST)",
            "by mta-65-227.siemens.flowmailer.net with ESMTPSA id\n 20260429122026361167e08b00020727 for <u-boot@lists.denx.de>;\n Wed, 29 Apr 2026 14:20:26 +0200"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,\n SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2;\n d=siemens.com; i=ludwig.nussel@siemens.com;\n h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc;\n bh=l905t0UfPiEsnu3IBZnQAL88Iyf7yDpeGLlcwssw+i4=;\n b=D2fFp8ojDzB5bVdlJftjvyBO3DmeE3yE8ijwLldcXm0cPnES3XW0wys9K4qgluXA31fZjM\n 6cwIYZejk2CIvGwmR90DGDXDpxcK0dOeNCFJhdozGhiLWTz2dECHPRJwrgyWjySMSQYQbUWW\n zav/rIGpf5FhyJ5imSEk4qyAd5a1QFwMyewO2LOHdKgtIkdTP9ZKoIbn/ZxRHEsZPOhhBrX2\n ToxIe5o1VmBB60cD/y906WfErUkG/wjoSqjvNtlfKenyDg02xV9vFBYyF9C05+xh/XoRB16E\n eakwQH7/yuCA6ecW2PZhfSs91+hhZhlbZMpQTVjdk6xL+gfIXZiUKn1Q==;",
        "From": "Ludwig Nussel <ludwig.nussel@siemens.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Ludwig Nussel <ludwig.nussel@siemens.com>, Simon Glass <sjg@chromium.org>,\n Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH] patman: fix use in worktree",
        "Date": "Wed, 29 Apr 2026 14:18:51 +0200",
        "Message-ID": "\n <20260429141850.1.6f48ecca7f833b4f4b90ba78432475de1461e838@changeid>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Flowmailer-Platform": "Siemens",
        "Feedback-ID": "519:519-1328817:519-21489:flowmailer",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "When using a worktree '.git' actually is a file and pygit2\ninit_repository() does not like that. The intention is not to create\na new git repo anyway so use normal constructor instead of\ninit_repository().\n\nSigned-off-by: Ludwig Nussel <ludwig.nussel@siemens.com>\n---\n\n tools/patman/cser_helper.py | 4 ++--\n tools/patman/cseries.py     | 6 +++---\n 2 files changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/tools/patman/cser_helper.py b/tools/patman/cser_helper.py\nindex 2841fcd9c20..81ad212daee 100644\n--- a/tools/patman/cser_helper.py\n+++ b/tools/patman/cser_helper.py\n@@ -309,7 +309,7 @@ class CseriesHelper:\n         self._copy_db_fields_to(series, ser)\n         msg = None\n         if end:\n-            repo = pygit2.init_repository(self.gitdir)\n+            repo = pygit2.Repository(self.gitdir)\n             target = repo.revparse_single(end)\n             first_line = target.message.splitlines()[0]\n             msg = f'Ending before {oid(target.id)} {first_line}'\n@@ -725,7 +725,7 @@ class CseriesHelper:\n             raise ValueError(\n                 f\"Modified files exist: use 'git status' to check: \"\n                 f'{dirty[:5]}')\n-        repo = pygit2.init_repository(self.gitdir)\n+        repo = pygit2.Repository(self.gitdir)\n \n         commit = None\n         upstream_name = None\ndiff --git a/tools/patman/cseries.py b/tools/patman/cseries.py\nindex bcbc4963cea..0844b5f0257 100644\n--- a/tools/patman/cseries.py\n+++ b/tools/patman/cseries.py\n@@ -119,7 +119,7 @@ class Cseries(cser_helper.CseriesHelper):\n \n         new_max = max_vers - 1\n \n-        repo = pygit2.init_repository(self.gitdir)\n+        repo = pygit2.Repository(self.gitdir)\n         if not dry_run:\n             name = self._get_branch_name(ser.name, new_max)\n             branch = repo.lookup_branch(name)\n@@ -859,7 +859,7 @@ class Cseries(cser_helper.CseriesHelper):\n             tag_info[svi.version] = [svi.idnum, name, f'{name}-{now_str}']\n \n         # Create the tags\n-        repo = pygit2.init_repository(self.gitdir)\n+        repo = pygit2.Repository(self.gitdir)\n         for _, (idnum, name, tag_name) in tag_info.items():\n             commit = repo.revparse_single(name)\n             repo.create_tag(tag_name, commit.hex,\n@@ -896,7 +896,7 @@ class Cseries(cser_helper.CseriesHelper):\n         svlist = self.db.ser_ver_get_for_series(ser.idnum)\n \n         # Collect the tags\n-        repo = pygit2.init_repository(self.gitdir)\n+        repo = pygit2.Repository(self.gitdir)\n         tag_info = {}\n         for svi in svlist:\n             name = self._get_branch_name(ser.name, svi.version)\n",
    "prefixes": []
}