get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 11793,
    "url": "http://patchwork.dpdk.org/api/patches/11793/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1459286986-31148-1-git-send-email-thomas.monjalon@6wind.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1459286986-31148-1-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1459286986-31148-1-git-send-email-thomas.monjalon@6wind.com",
    "date": "2016-03-29T21:29:46",
    "name": "[dpdk-dev] scripts: check commit formatting",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "377bb44f65ed66e22b41eb5a599d44ff5e98b94b",
    "submitter": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1459286986-31148-1-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/11793/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/11793/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 953F1530F;\n\tTue, 29 Mar 2016 23:31:49 +0200 (CEST)",
            "from mail-wm0-f49.google.com (mail-wm0-f49.google.com\n\t[74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 3E74A2C46\n\tfor <dev@dpdk.org>; Tue, 29 Mar 2016 23:31:48 +0200 (CEST)",
            "by mail-wm0-f49.google.com with SMTP id p65so157598165wmp.1\n\tfor <dev@dpdk.org>; Tue, 29 Mar 2016 14:31:48 -0700 (PDT)",
            "from XPS13.localdomain (108.204.154.77.rev.sfr.net.\n\t[77.154.204.108])\n\tby smtp.gmail.com with ESMTPSA id b8sm617290wjf.9.2016.03.29.14.31.46\n\tfor <dev@dpdk.org> (version=TLSv1/SSLv3 cipher=OTHER);\n\tTue, 29 Mar 2016 14:31:47 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:subject:date:message-id;\n\tbh=lx6bmqRRqhryScjA3YdekbwdwcJRvP0h+kBH5Pu646s=;\n\tb=YZKlL8BvmIngJWNPhUGJvBgJZKrnzDCwAQGB1Dfasp3b4MPcKAtUt4rX71kITc9cAM\n\tKCqBGqac95Brf6JX+ufSexqXCAg2+AJArQtmk0WJYzWYjgJvZ5D7va28uszCrcLxdJeq\n\t7khaK1ZPlin+iHGXtTK0sgzQwUMvHnuQcN9f1TX4nNtf/S88SypF2OuDdHAX/WFhdxIY\n\tqsUjgKab/xMuzfnFYL1jyg1CSthofswQxSei10vVYuePvmaDgxrqoaemo4wjahVnT9fU\n\tvsdWbicn0eUyVW8jsLpUHJb7hwJrE3VTKgN8BcDk8cUKLL6QkF20fsBcO5MQSqW5t+UC\n\tMVqw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:subject:date:message-id;\n\tbh=lx6bmqRRqhryScjA3YdekbwdwcJRvP0h+kBH5Pu646s=;\n\tb=CZykSpay9fJIIGT9w7GHROlKQPpeXSZyxTgGPKYP2rlqk/q1VPAIL4oCMGGZMT0WXL\n\tiIOFhQdDUywsJYLxKomoOsNdf7Mum/Jrb0idl7rnxBhPPBPOOMmj+Fxlq49Qgf4bIwQI\n\tO2W5QzHUk4Q+DVnJtJvw37D+DZRGPnPGeZ1viizp7W48QETKXi3cE+SijLy+tstQ2ALx\n\ttTlS3z+CzQhNcZhO2caj1bM6fcFYQ5vyjxI0W3GcEi0L34IqCPGBelMDQluyVWHTC6tc\n\t7Y4zu9NjO5Kq3+tA95ch7pvYOzH5KZiv2pxOxsudrz/1rG0WNA3jNTH/jIURKZ5Ztr0d\n\tyHJQ==",
        "X-Gm-Message-State": "AD7BkJIAjcn/RWST75MT5gVL4n/LmN7GAf6afoKY4h8LUSKcZCo2abTi9jzqBlEp9M20mb1y",
        "X-Received": "by 10.28.222.67 with SMTP id v64mr19738495wmg.14.1459287107994; \n\tTue, 29 Mar 2016 14:31:47 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 29 Mar 2016 23:29:46 +0200",
        "Message-Id": "<1459286986-31148-1-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "Subject": "[dpdk-dev] [PATCH] scripts: check commit formatting",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The git messages have three parts:\n1/ the headline\n2/ the explanations\n3/ the footer tags\n\nThe headline helps to quickly browse an history or catch instantly the\npurpose of a commit. Making it short with some consistent wording\nallows to easily parse it or match some patterns.\n\nThe explanations must give some keys like the reason of the change.\nNothing can be automatically checked for this part.\n\nThe footer contains some tags to find the origin of a bug or who\nwas working on it.\n\nThis script is doing some basic checks on parts 1 and 3.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n scripts/check-git-log.sh | 119 +++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 119 insertions(+)\n create mode 100755 scripts/check-git-log.sh",
    "diff": "diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh\nnew file mode 100755\nindex 0000000..483abcb\n--- /dev/null\n+++ b/scripts/check-git-log.sh\n@@ -0,0 +1,119 @@\n+#! /bin/sh\n+\n+# BSD LICENSE\n+#\n+# Copyright 2016 6WIND S.A.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+#   * Redistributions of source code must retain the above copyright\n+#     notice, this list of conditions and the following disclaimer.\n+#   * Redistributions in binary form must reproduce the above copyright\n+#     notice, this list of conditions and the following disclaimer in\n+#     the documentation and/or other materials provided with the\n+#     distribution.\n+#   * Neither the name of 6WIND S.A. nor the names of its\n+#     contributors may be used to endorse or promote products derived\n+#     from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+# Check commit logs (headlines and references)\n+#\n+# If any doubt about the formatting, please check in the most recent history:\n+#\tgit log --format='%>|(15)%cr   %s' --reverse | grep -i <pattern>\n+\n+range=${1:-origin/master..}\n+\n+headlines=$(git log --format='%s' $range)\n+tags=$(git log --format='%b' $range | grep -i -e 'by *:' -e 'fix.*:')\n+fixes=$(git log --format='%h %s' $range | grep -i ': *fix' | cut -d' ' -f1)\n+\n+# check headline format (spacing, no punctuation, no code)\n+bad=$(echo \"$headlines\" | grep \\\n+\t-e '\t' \\\n+\t-e '^ ' \\\n+\t-e ' $' \\\n+\t-e '\\.$' \\\n+\t-e '[,;!?&|]' \\\n+\t-e ':.*_' \\\n+\t-e '^[^:]*$' \\\n+\t-e ':[^ ]' \\\n+\t-e ' :' \\\n+\t| sed 's,^,\\t,')\n+[ -z \"$bad\" ] || printf \"Wrong headline format:\\n$bad\\n\"\n+\n+# check headline label for common typos\n+bad=$(echo \"$headlines\" | grep \\\n+\t-e '^example[:/]' \\\n+\t-e '^apps/' \\\n+\t-e '^testpmd' \\\n+\t-e 'test-pmd' \\\n+\t-e '^bond:' \\\n+\t| sed 's,^,\\t,')\n+[ -z \"$bad\" ] || printf \"Wrong headline label:\\n$bad\\n\"\n+\n+# check headline lowercase for first words\n+bad=$(echo \"$headlines\" | grep \\\n+\t-e '^.*[A-Z].*:' \\\n+\t-e ': *[A-Z]' \\\n+\t| sed 's,^,\\t,')\n+[ -z \"$bad\" ] || printf \"Wrong headline uppercase:\\n$bad\\n\"\n+\n+# check headline uppercase (Rx/Tx, VF, L2, MAC, Linux, ARM...)\n+bad=$(echo \"$headlines\" | grep \\\n+\t-e 'rx\\|tx\\|RX\\|TX' \\\n+\t-e '\\<[pv]f\\>' \\\n+\t-e '\\<l[234]\\>' \\\n+\t-e ':.*\\<dma\\>' \\\n+\t-e ':.*\\<pci\\>' \\\n+\t-e ':.*\\<mtu\\>' \\\n+\t-e ':.*\\<mac\\>' \\\n+\t-e ':.*\\<vlan\\>' \\\n+\t-e ':.*\\<rss\\>' \\\n+\t-e ':.*\\<freebsd\\>' \\\n+\t-e ':.*\\<linux\\>' \\\n+\t-e ':.*\\<tilegx\\>' \\\n+\t-e ':.*\\<tile-gx\\>' \\\n+\t-e ':.*\\<arm\\>' \\\n+\t-e ':.*\\<armv7\\>' \\\n+\t-e ':.*\\<armv8\\>' \\\n+\t| sed 's,^,\\t,')\n+[ -z \"$bad\" ] || printf \"Wrong headline lowercase:\\n$bad\\n\"\n+\n+# check tags spelling\n+bad=$(echo \"$tags\" |\n+\tgrep -v '^\\(Reported\\|Suggested\\|Signed-off\\|Acked\\|Reviewed\\|Tested\\)-by: [^,]* <.*@.*>$' |\n+\tgrep -v '^Fixes: [0-9a-f]\\{12\\} (\".*\")$' |\n+\tsed 's,^.,\\t&,')\n+[ -z \"$bad\" ] || printf \"Wrong tag:\\n$bad\\n\"\n+\n+# check missing Fixes: tag\n+bad=$(for fix in $fixes ; do\n+\tgit log --format='%b' -1 $fix | grep -q '^Fixes: ' ||\n+\t\tgit log --format='\\t%s' -1 $fix\n+done)\n+[ -z \"$bad\" ] || printf \"Missing 'Fixes' tag:\\n$bad\\n\"\n+\n+# check Fixes: reference\n+IFS='\n+'\n+fixtags=$(echo \"$tags\" | grep '^Fixes: ')\n+bad=$(for fixtag in $fixtags ; do\n+\tgood=$(git log --abbrev=12 --format='Fixes: %h (\"%s\")' -1 \\\n+\t\t$(echo \"$fixtag\" | sed 's,^Fixes: \\([0-9a-f]*\\).*,\\1,') 2>&-)\n+\tprintf \"$fixtag\" | grep -v \"^$good$\"\n+done | sed 's,^,\\t,')\n+[ -z \"$bad\" ] || printf \"Wrong 'Fixes' reference:\\n$bad\\n\"\n",
    "prefixes": [
        "dpdk-dev"
    ]
}