Patch Detail
Show a patch.
GET /api/patches/405/?format=api
{ "id": 405, "url": "https://patchwork.libcamera.org/api/patches/405/?format=api", "web_url": "https://patchwork.libcamera.org/patch/405/", "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": "<20190126151659.7438-1-laurent.pinchart@ideasonboard.com>", "date": "2019-01-26T15:16:59", "name": "[libcamera-devel] cam: options: Indent multi-line help message correctly", "commit_ref": "aae0b7ffb1123103f162bdf566e2d4bce5cbf774", "pull_url": null, "state": "accepted", "archived": false, "hash": "faadeeb1f2ab2a58bde523fa21d932ee3bd226ed", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/405/mbox/", "series": [ { "id": 141, "url": "https://patchwork.libcamera.org/api/series/141/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=141", "date": "2019-01-26T15:16:59", "name": "[libcamera-devel] cam: options: Indent multi-line help message correctly", "version": 1, "mbox": "https://patchwork.libcamera.org/series/141/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/405/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/405/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4565960C78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Jan 2019 16:17:14 +0100 (CET)", "from pendragon.ideasonboard.com (85-76-41-125-nat.elisa-mobile.fi\n\t[85.76.41.125])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A37923A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Jan 2019 16:17:12 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548515833;\n\tbh=VEl7LszE+QYJV76VMZ4+ksy270BkuOmpSupr87m03+w=;\n\th=From:To:Subject:Date:From;\n\tb=TwVcNfNdiQ9jXHehzLOxMcffYd1pChyywgBLGjHuWb/SuPXT+SYV7iQqzap7bWl0x\n\tIn4NODVmStqk1POYsS50kZeqbPjw8eXD8zVdC0DqUpMtDMztf5L1ISifa0ythaN2a1\n\tRaT1VFx+BEKAk03kRfLa8DjuhId4l9ysAAyczMAY=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 26 Jan 2019 17:16:59 +0200", "Message-Id": "<20190126151659.7438-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.19.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] cam: options: Indent multi-line help\n\tmessage correctly", "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": "Sat, 26 Jan 2019 15:17:14 -0000" }, "content": "Split multi-line help messages and indent all lines the same way.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/options.cpp | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/cam/options.cpp b/src/cam/options.cpp\nindex 55c42540f924..83601270207b 100644\n--- a/src/cam/options.cpp\n+++ b/src/cam/options.cpp\n@@ -153,7 +153,17 @@ void OptionsParser::usage()\n \t\t}\n \n \t\tstd::cerr << std::setw(indent) << std::left << argument;\n-\t\tstd::cerr << option.help << std::endl;\n+\n+\t\tfor (const char *help = option.help, *end = help; end; ) {\n+\t\t\tend = strchr(help, '\\n');\n+\t\t\tif (end) {\n+\t\t\t\tstd::cerr << std::string(help, end - help + 1);\n+\t\t\t\tstd::cerr << std::setw(indent) << \" \";\n+\t\t\t\thelp = end + 1;\n+\t\t\t} else {\n+\t\t\t\tstd::cerr << help << std::endl;\n+\t\t\t}\n+\t\t}\n \t}\n }\n \n", "prefixes": [ "libcamera-devel" ] }