Show a patch.

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

{
    "id": 373,
    "url": "https://patchwork.libcamera.org/api/patches/373/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/373/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190124232311.29636-1-niklas.soderlund@ragnatech.se>",
    "date": "2019-01-24T23:23:11",
    "name": "[libcamera-devel] cam: options: optional arguments needs to be specified as --foo=bar",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "0dfd7f3a3dbea223e45bd1e68dd3c22335d060e4",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/373/mbox/",
    "series": [
        {
            "id": 129,
            "url": "https://patchwork.libcamera.org/api/series/129/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=129",
            "date": "2019-01-24T23:23:11",
            "name": "[libcamera-devel] cam: options: optional arguments needs to be specified as --foo=bar",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/129/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/373/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/373/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D79460C82\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jan 2019 00:23:18 +0100 (CET)",
            "from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 02807be4-202f-11e9-9adf-005056917a89;\n\tFri, 25 Jan 2019 00:23:12 +0100 (CET)"
        ],
        "X-Halon-ID": "02807be4-202f-11e9-9adf-005056917a89",
        "Authorized-sender": "niklas@soderlund.pp.se",
        "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 25 Jan 2019 00:23:11 +0100",
        "Message-Id": "<20190124232311.29636-1-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] cam: options: optional arguments needs to\n\tbe specified as --foo=bar",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Thu, 24 Jan 2019 23:23:18 -0000"
    },
    "content": "It's not state in the documentation but optional arguments needs to be\nspecified using as '--foo=bar' instead of '--foo bar', otherwise the\nvalue is not propagated to optarg during argument parsing. Update the\nusage printing helper to reflect this requirement.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/cam/options.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/cam/options.cpp b/src/cam/options.cpp\nindex 82acff9bbeea476d..73d81d0bc0ec6d38 100644\n--- a/src/cam/options.cpp\n+++ b/src/cam/options.cpp\n@@ -143,7 +143,8 @@ void OptionsParser::usage()\n \t\t};\n \n \t\tif (option.argument != ArgumentNone) {\n-\t\t\targument += std::string(\" \");\n+\t\t\targument += option.argument == ArgumentOptional ?\n+\t\t\t\t\"=\" : \" \";\n \t\t\tif (option.argument == ArgumentOptional)\n \t\t\t\targument += \"[\";\n \t\t\targument += option.argumentName;\n",
    "prefixes": [
        "libcamera-devel"
    ]
}