get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 802709,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/802709/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/swupdate/patch/20170817142942.4328-1-christian.storm@siemens.com/",
    "project": {
        "id": 58,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/58/?format=api",
        "name": "swupdate development",
        "link_name": "swupdate",
        "list_id": "swupdate.googlegroups.com",
        "list_email": "swupdate@googlegroups.com",
        "web_url": "https://github.com/sbabic/swupdate",
        "scm_url": "git://github.com/sbabic/swupdate",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170817142942.4328-1-christian.storm@siemens.com>",
    "list_archive_url": null,
    "date": "2017-08-17T14:29:42",
    "name": "[resent] core: make cmdline parsing more robust",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "b991307aa8579eabc5d6c837db3bc147064b3a6a",
    "submitter": {
        "id": 72180,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/72180/?format=api",
        "name": "Storm, Christian",
        "email": "christian.storm@siemens.com"
    },
    "delegate": {
        "id": 1693,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/1693/?format=api",
        "username": "sbabic",
        "first_name": "Stefano",
        "last_name": "Babic",
        "email": "sbabic@denx.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/swupdate/patch/20170817142942.4328-1-christian.storm@siemens.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/802709/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/802709/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<swupdate+bncBDD6BWV65QPBBQWR23GAKGQEJDADCFA@googlegroups.com>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:400c:c0c::23e;\n\thelo=mail-wr0-x23e.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbqwr23gakgqejdadcfa@googlegroups.com;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"Tn3DFOLH\"; dkim-atps=neutral"
        ],
        "Received": [
            "from mail-wr0-x23e.google.com (mail-wr0-x23e.google.com\n\t[IPv6:2a00:1450:400c:c0c::23e])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xY7v975NBz9t4P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 18 Aug 2017 00:31:33 +1000 (AEST)",
            "by mail-wr0-x23e.google.com with SMTP id f8sf28174wrf.3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 17 Aug 2017 07:31:33 -0700 (PDT)",
            "by 10.25.196.4 with SMTP id u4ls226008lff.30.gmail;\n\tThu, 17 Aug 2017 07:31:30 -0700 (PDT)",
            "from goliath.siemens.de (goliath.siemens.de. [192.35.17.28])\n\tby gmr-mx.google.com with ESMTPS id\n\tb125si1627938wmc.1.2017.08.17.07.31.30\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 17 Aug 2017 07:31:30 -0700 (PDT)",
            "from mail3.siemens.de (mail3.siemens.de [139.25.208.14])\n\tby goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v7HEVUcc027534\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Thu, 17 Aug 2017 16:31:30 +0200",
            "from MD1KR9XC.ww002.siemens.net ([139.25.68.253])\n\tby mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v7HEVTF5024365;\n\tThu, 17 Aug 2017 16:31:29 +0200"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; t=1502980291; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=uhItFylHUaiITy/rkGKc2b2KKHjxWTw1UaPAlqs3WCOY3Hl1rqBrlGIiBKKXfBlM3T\n\tcTySQ8TTPb0o82i8aGehSxqc0VyA7Ungdjisd8TeC0yuULtsuRIjC05SrXrPVU9oUdy6\n\tpsklJEiy7xuT5lpffYvWon7VKBQrEmDH3mf+tSV0I34j6E7A24J8gFEEyhHXzgHGpYvt\n\t4L1pRS1OOoUfaFSBHgIwX5mT3oJtPZxFDdZUEoyMlwoZT/mLw8rGUbpz/1CHnMgRMoYD\n\tkfDFBkmqjVhTxqmo7+ze2xwNVk58dGYO31x9q6HkvOYbnZ38CC8V5qvMbUEOJzihCgPI\n\t8SuA==",
            "i=1; a=rsa-sha256; t=1502980290; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=ggneoXvtUKrZALILz/wEYCsSprmlBBQ8vQpJbK8UAzXNQzmDdusZ5CzJXDDaIcZLCG\n\tBm8kIFPU1VSDrRExB47UEv90dE4b9tYgIjQKm2jJzXXiAXm3edFOLiDdrS+J0TsGYNj4\n\tK57eU2RUaWPTKVXnN4eZ8MEy3hKjEKAO/I2CCPE7SSs/1/BlC6Xt56C/7zpOc+zuHZ/c\n\tt1SJO48gMAIudO2SyJaGJaGJNvw4pz/vto1NFvGcU/6ePF12rOMHpg9MTljU2AyC6Njx\n\tEnwx/92DBHogyHWdqi59+SPPTKiyt2+4suqwGGn/JrDefy0q8THEY5Uq8Uj39PiNFNrW\n\tT3xg=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:message-id:date:subject:cc:to:from\n\t:arc-authentication-results:arc-message-signature:mime-version\n\t:sender:dkim-signature:arc-authentication-results;\n\tbh=cxmyUoT6zzJ8tprPI/viSdq1bTqSssvYCdZx0ge/Li0=;\n\tb=vPgGOjM+2lR90tNaUxxdQGOok0lAAdYknP1Z2V+jK1JcCU/T1NsAfXRntJCp7dMvFa\n\tj2H20zOEuQGe5DfTWNYhCg0Buw2f3G7UIbOdwHS24kcJX3g7gSMJJpqlL/tM/JVLzwqk\n\t/3rN1yxMHATSE04B58tU0E4si2qLKWrCP9DCZGjib1GIbRZz/4RuKOuEZrdmskIhLNOK\n\tabVOgccHweRKfoTaQX5VEV8fj7rctRfEOFm/O5HQnmWWdGptrxc4+DrfbQLeVHUIu6Oh\n\tsLAHyDZSFGz22LGdPLg049EapKMcn0zJW1/f0aL+lkkyI+mDPb5wZfBTVbSmrlYRrhQ7\n\tOJnA==",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=message-id:date:subject:cc:to:from:arc-authentication-results;\n\tbh=O2d/R7akPed5PYzZyfj3nGqCqfnL+LWCA797S3vqS2U=;\n\tb=j+VBtPub3rpZ7m5G3r2Oyr3IsWjWrOBFp1HLEFc5fB/KBqewEHyWN4yWlT+04qOSop\n\t6zGvLGePBr3nhn9+78Ut8KuEAelAYnk20HWV8TK6V6esaO7aWf94qE12rhCGoKadFxPn\n\t10jlUSiwNwzIfDqOODrNs+/GSSrEPbAwotAwW8KeQzs2A9e608bLAyghnFfK+Mr5aq1C\n\teJJoSJrEPoAzvg8ZKj0iewQcI9t93bthr57kpp/o+KmEoRxhwJmYhMg6S50L17uk/3S9\n\tlSPaYZHkDT+oXhoRMuIYY/t3ouHpUFvvmyvTc/WNwsKp3MHyQPeS2eZ7WdoV8BSu9EWN\n\tK0RQ=="
        ],
        "ARC-Authentication-Results": [
            "i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com",
            "i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:mime-version:from:to:cc:subject:date:message-id\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=cxmyUoT6zzJ8tprPI/viSdq1bTqSssvYCdZx0ge/Li0=;\n\tb=Tn3DFOLHA5lUw+WnDcbNogKOIXuKLWcP5pkhrzS5drA7LoGLLEtE2HNsbvfsgrfurV\n\tJqtu4HT4idlxTUatVNOVHLRckloVC5qjTbrj2GOX8/co7UZcwy5Gj/TO9pau99Jl4Y28\n\t6BdiamPOhXbLLbqhoEV7oeiv9kSQ19pLWmcwwNmXBed1P+q+0hpEDdcxrOzOO7/XXu1J\n\tALIkhLelJzf05uj9vHny6YBa4qD0QkWL12lZgnUr+rAwjvQ3WGTWtrB4hdNr0xTxtIUO\n\tvGhAQJrhK5htA7+yevtSNqKqi61ITBPUs8FzVZCdBSXiSXh/zYWIAvfuDsofZ+OyIfIA\n\tsk2g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:mime-version:from:to:cc:subject:date\n\t:message-id:x-original-sender:x-original-authentication-results\n\t:precedence:mailing-list:list-id:x-spam-checked-in-group:list-post\n\t:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=cxmyUoT6zzJ8tprPI/viSdq1bTqSssvYCdZx0ge/Li0=;\n\tb=hPqiz7fNdLtPBTfv3A9JyRGo17NfSGl3UCO/OZJgsT/8aKSd0nATlNE3w1HWzOS+9D\n\tMscHWRmv9SzlSMbzWGPFTc6KzP49r1NIIPuOWpUsUqUv6uCfdC6IbSbs1jdFP1hoYgSN\n\tMvl4M79Yz5EFNQqmAux0VETPXZkS2lRbFOFMMb8amJZZRiQIKLYX+NNtBpDpEggfPgwd\n\trKIFYMNIQsZmlDNzzkIFj2EdG6lHurYbm8j0VT9pLqgNM8dsTGR79SroWp7i+GeJ761B\n\tWndrR50nKyfO3R6P47y7aUMsCKCsPas3uyRpt7BmuBGq7MpDVEzEmdoTkWPPIgzzP92r\n\t8w/w==",
        "Sender": "swupdate@googlegroups.com",
        "X-Gm-Message-State": "AHYfb5jHbo24cd6tCN4O+o5TXiha6JuNJxp16zECV/rPMw/UEjusdTul\n\tggPMPIXS9FNnmA==",
        "X-Received": [
            "by 10.46.32.135 with SMTP id g7mr10743lji.18.1502980290947;\n\tThu, 17 Aug 2017 07:31:30 -0700 (PDT)",
            "by 10.25.18.205 with SMTP id 74mr48667lfs.35.1502980290372;\n\tThu, 17 Aug 2017 07:31:30 -0700 (PDT)"
        ],
        "MIME-Version": "1.0",
        "X-BeenThere": "swupdate@googlegroups.com",
        "Received-SPF": "neutral (google.com: 192.35.17.28 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.28; ",
        "From": "Christian Storm <christian.storm@siemens.com>",
        "To": "swupdate@googlegroups.com",
        "Cc": "Christian Storm <christian.storm@siemens.com>",
        "Subject": "[swupdate] [PATCH resent] core: make cmdline parsing more robust",
        "Date": "Thu, 17 Aug 2017 16:29:42 +0200",
        "Message-Id": "<20170817142942.4328-1-christian.storm@siemens.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "X-Original-Sender": "christian.storm@siemens.com",
        "X-Original-Authentication-Results": "gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.28 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Precedence": "list",
        "Mailing-list": "list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com",
        "List-ID": "<swupdate.googlegroups.com>",
        "X-Spam-Checked-In-Group": "swupdate@googlegroups.com",
        "X-Google-Group-Id": "605343134186",
        "List-Post": "<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>",
        "List-Help": "<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>",
        "List-Archive": "<https://groups.google.com/group/swupdate",
        "List-Subscribe": "<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>",
        "List-Unsubscribe": "<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"
    },
    "content": "(1) disallow options' values starting with '-' except for\n    downloader, webserver, and suricatta doing their own\n    cmdline parsing. Otherwise, e.g., this command\n    $ swupdate -l -c -i <file>\n    installs <file> instead of checking it due to -l's\n    option value missing.\n(2) abort on superfluous non-option cmdline arguments\n    as SWUpdate doesn't use them, probably an usage error.\n(3) check sensible combinations with suricatta mode\n\nSigned-off-by: Christian Storm <christian.storm@siemens.com>\n---\n core/swupdate.c | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)",
    "diff": "diff --git a/core/swupdate.c b/core/swupdate.c\nindex b01aadd..f364bce 100644\n--- a/core/swupdate.c\n+++ b/core/swupdate.c\n@@ -599,6 +599,12 @@ int main(int argc, char **argv)\n \t/* Process options with getopt */\n \twhile ((c = getopt_long(argc, argv, main_options,\n \t\t\t\tlong_options, NULL)) != EOF) {\n+\t\tif (optarg && *optarg == '-' && (c != 'd' && c != 'u' && c != 'w')) {\n+\t\t\t/* An option's value starting with '-' is not allowed except\n+\t\t\t * for downloader, webserver, and suricatta doing their own\n+\t\t\t * argv parsing. */\n+\t\t\tc = '?';\n+\t\t}\n \t\tswitch (c) {\n \t\tcase 'v':\n \t\t\tloglevel = TRACELEVEL;\n@@ -680,6 +686,12 @@ int main(int argc, char **argv)\n \t\t}\n \t}\n \n+\tif (optind < argc) {\n+\t\t/* SWUpdate has no non-option arguments, fail on them */\n+\t\tusage(argv[0]);\n+\t\texit(1);\n+\t}\n+\n \t/*\n \t * Parameters are parsed: now performs plausibility\n \t * tests before starting processes and threads\n@@ -698,6 +710,18 @@ int main(int argc, char **argv)\n \t\texit(1);\n \t}\n \n+#ifdef CONFIG_SURICATTA\n+\tif (opt_u && (opt_c || opt_i\n+#ifdef CONFIG_DOWNLOAD\n+\t\t|| opt_d\n+#endif\n+\t)) {\n+\t\tfprintf(stderr, \"invalid mode combination with suricatta.\\n\");\n+\t\tusage(argv[0]);\n+\t\texit(1);\n+\t}\n+#endif\n+\n \tswupdate_crypto_init();\n \n \tif (strlen(swcfg.globals.publickeyfname)) {\n",
    "prefixes": [
        "resent"
    ]
}