get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 821543,
    "url": "http://patchwork.ozlabs.org/api/patches/821543/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171005003358.3879-1-jacob.e.keller@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20171005003358.3879-1-jacob.e.keller@intel.com>",
    "list_archive_url": null,
    "date": "2017-10-05T00:33:58",
    "name": "checkpatch.pl: allow commit descriptions to include date",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "63b1335f7d51e2b6e9971344f657cb5679a9f2ac",
    "submitter": {
        "id": 9784,
        "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api",
        "name": "Jacob Keller",
        "email": "jacob.e.keller@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171005003358.3879-1-jacob.e.keller@intel.com/mbox/",
    "series": [
        {
            "id": 6474,
            "url": "http://patchwork.ozlabs.org/api/series/6474/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=6474",
            "date": "2017-10-05T00:33:58",
            "name": "checkpatch.pl: allow commit descriptions to include date",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/6474/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/821543/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/821543/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y6v0Q3rgrz9t2V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 11:34:13 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 2318887A74;\n\tThu,  5 Oct 2017 00:34:11 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id PY1R2wVBj4rn; Thu,  5 Oct 2017 00:34:07 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5255787A35;\n\tThu,  5 Oct 2017 00:34:07 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id DBE8D1CE920\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  5 Oct 2017 00:34:05 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id D632C866AB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  5 Oct 2017 00:34:05 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id RVm18fuEZnbP for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  5 Oct 2017 00:34:04 +0000 (UTC)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id AD54B86674\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  5 Oct 2017 00:34:04 +0000 (UTC)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga105.jf.intel.com with ESMTP; 04 Oct 2017 17:34:04 -0700",
            "from jekeller-desk.amr.corp.intel.com ([134.134.177.230])\n\tby orsmga005.jf.intel.com with ESMTP; 04 Oct 2017 17:34:03 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.42,479,1500966000\"; d=\"scan'208\";a=\"156859754\"",
        "From": "Jacob Keller <jacob.e.keller@intel.com>",
        "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>",
        "Date": "Wed,  4 Oct 2017 17:33:58 -0700",
        "Message-Id": "<20171005003358.3879-1-jacob.e.keller@intel.com>",
        "X-Mailer": "git-send-email 2.14.1.436.g33e61a4f0239",
        "Subject": "[Intel-wired-lan] [PATCH] checkpatch.pl: allow commit descriptions\n\tto include date",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Since commit d311cd44545f (\"checkpatch: add test for commit id\nformatting style in commit log\") checkpatch has supported a check that\ngit commit references are done in a standardized way.\n\nSome communities (the Git mailing list, among others) advocate the\naddition of a date to the end of the description, converting\n\n  d311cd44545f (\"checkpatch: add test for commit id formatting style in commit log\")\n\ninto\n\n  d311cd44545f (\"checkpatch: add test for commit id formatting style in commit log\", 2014-08-06)\n\nExtend checkpatch.pl to allow such a date, and add verification that the\ndate matches the commit author date, if it exists.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n scripts/checkpatch.pl | 32 +++++++++++++++++++-------------\n 1 file changed, 19 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl\nindex ebea4f078246..2076e9833025 100755\n--- a/scripts/checkpatch.pl\n+++ b/scripts/checkpatch.pl\n@@ -871,15 +871,15 @@ sub seed_camelcase_includes {\n }\n \n sub git_commit_info {\n-\tmy ($commit, $id, $desc) = @_;\n+\tmy ($commit, $id, $date, $desc) = @_;\n \n-\treturn ($id, $desc) if ((which(\"git\") eq \"\") || !(-e \".git\"));\n+\treturn ($id, $date, $desc) if ((which(\"git\") eq \"\") || !(-e \".git\"));\n \n-\tmy $output = `git log --no-color --format='%H %s' -1 $commit 2>&1`;\n+\tmy $output = `git log --date=short --no-color --format='%H %ad %s' -1 $commit 2>&1`;\n \t$output =~ s/^\\s*//gm;\n \tmy @lines = split(\"\\n\", $output);\n \n-\treturn ($id, $desc) if ($#lines < 0);\n+\treturn ($id, $date, $desc) if ($#lines < 0);\n \n \tif ($lines[0] =~ /^error: short SHA1 $commit is ambiguous\\./) {\n # Maybe one day convert this block of bash into something that returns\n@@ -895,10 +895,11 @@ sub git_commit_info {\n \t\t$id = undef;\n \t} else {\n \t\t$id = substr($lines[0], 0, 12);\n-\t\t$desc = substr($lines[0], 41);\n+\t\t$date = substr($lines[0], 41, 10);\n+\t\t$desc = substr($lines[0], 52);\n \t}\n \n-\treturn ($id, $desc);\n+\treturn ($id, $date, $desc);\n }\n \n $chk_signoff = 0 if ($file);\n@@ -2597,6 +2598,8 @@ sub process {\n \t\t\tmy $hasdesc = 0;\n \t\t\tmy $hasparens = 0;\n \t\t\tmy $id = '0123456789ab';\n+\t\t\tmy $orig_date = undef;\n+\t\t\tmy $date = \"\";\n \t\t\tmy $orig_desc = \"commit description\";\n \t\t\tmy $description = \"\";\n \n@@ -2611,29 +2614,32 @@ sub process {\n \t\t\t$long = 1 if ($line =~ /\\bcommit\\s+[0-9a-f]{41,}/i);\n \t\t\t$space = 0 if ($line =~ /\\bcommit [0-9a-f]/i);\n \t\t\t$case = 0 if ($line =~ /\\b[Cc]ommit\\s+[0-9a-f]{5,40}[^A-F]/);\n-\t\t\tif ($line =~ /\\bcommit\\s+[0-9a-f]{5,}\\s+\\(\"([^\"]+)\"\\)/i) {\n+\t\t\tif ($line =~ /\\bcommit\\s+[0-9a-f]{5,}\\s+\\(\"([^\"]+)\"(,\\s*([-0-9]+))?\\)/i) {\n \t\t\t\t$orig_desc = $1;\n+\t\t\t\t$orig_date = $3;\n \t\t\t\t$hasparens = 1;\n \t\t\t} elsif ($line =~ /\\bcommit\\s+[0-9a-f]{5,}\\s*$/i &&\n \t\t\t\t defined $rawlines[$linenr] &&\n-\t\t\t\t $rawlines[$linenr] =~ /^\\s*\\(\"([^\"]+)\"\\)/) {\n+\t\t\t\t $rawlines[$linenr] =~ /^\\s*\\(\"([^\"]+)\"(,\\s*([-0-9]+))?\\)/) {\n \t\t\t\t$orig_desc = $1;\n+\t\t\t\t$orig_date = $3;\n \t\t\t\t$hasparens = 1;\n \t\t\t} elsif ($line =~ /\\bcommit\\s+[0-9a-f]{5,}\\s+\\(\"[^\"]+$/i &&\n \t\t\t\t defined $rawlines[$linenr] &&\n-\t\t\t\t $rawlines[$linenr] =~ /^\\s*[^\"]+\"\\)/) {\n+\t\t\t\t $rawlines[$linenr] =~ /^\\s*[^\"]+\"(,\\s*([-0-9]+))?\\)/) {\n \t\t\t\t$line =~ /\\bcommit\\s+[0-9a-f]{5,}\\s+\\(\"([^\"]+)$/i;\n \t\t\t\t$orig_desc = $1;\n-\t\t\t\t$rawlines[$linenr] =~ /^\\s*([^\"]+)\"\\)/;\n+\t\t\t\t$rawlines[$linenr] =~ /^\\s*([^\"]+)\"(,\\s*([-0-9]+))?\\)/;\n \t\t\t\t$orig_desc .= \" \" . $1;\n+\t\t\t\t$orig_date = $3;\n \t\t\t\t$hasparens = 1;\n \t\t\t}\n \n-\t\t\t($id, $description) = git_commit_info($orig_commit,\n-\t\t\t\t\t\t\t      $id, $orig_desc);\n+\t\t\t($id, $date, $description) = git_commit_info($orig_commit,\n+\t\t\t\t\t\t      $id, $orig_date, $orig_desc);\n \n \t\t\tif (defined($id) &&\n-\t\t\t   ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) {\n+\t\t\t   ($short || $long || $space || $case || ($orig_desc ne $description) || ($orig_date && $orig_date ne $date) || !$hasparens)) {\n \t\t\t\tERROR(\"GIT_COMMIT_ID\",\n \t\t\t\t      \"Please use git commit description style 'commit <12+ chars of sha1> (\\\"<title line>\\\")' - ie: '${init_char}ommit $id (\\\"$description\\\")'\\n\" . $herecurr);\n \t\t\t}\n",
    "prefixes": []
}