get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 605010,
    "url": "http://patchwork.ozlabs.org/api/patches/605010/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/5a6f95aea1aac633ba580a190c833d45005ea918.1459541702.git.yann.morin.1998@free.fr/",
    "project": {
        "id": 27,
        "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api",
        "name": "Buildroot development",
        "link_name": "buildroot",
        "list_id": "buildroot.buildroot.org",
        "list_email": "buildroot@buildroot.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<5a6f95aea1aac633ba580a190c833d45005ea918.1459541702.git.yann.morin.1998@free.fr>",
    "list_archive_url": null,
    "date": "2016-04-01T20:25:29",
    "name": "[2/4,v2] support/download/git: do not use git archive, handle it manually",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "2d8014987e4757148e3ecb1e8a2fb11666f390c2",
    "submitter": {
        "id": 13903,
        "url": "http://patchwork.ozlabs.org/api/people/13903/?format=api",
        "name": "Yann E. MORIN",
        "email": "yann.morin.1998@free.fr"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/5a6f95aea1aac633ba580a190c833d45005ea918.1459541702.git.yann.morin.1998@free.fr/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/605010/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/605010/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<buildroot-bounces@busybox.net>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "buildroot@lists.busybox.net"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "buildroot@osuosl.org"
        ],
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 3qcCYz3dbDz9sD5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Apr 2016 07:25:43 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9C925A6358;\n\tFri,  1 Apr 2016 20:25:42 +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 VW79Vfp_ZSPM; Fri,  1 Apr 2016 20:25:42 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E5998A6392;\n\tFri,  1 Apr 2016 20:25:39 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id CA0FE1C0B41\n\tfor <buildroot@lists.busybox.net>;\n\tFri,  1 Apr 2016 20:25:37 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id C16FBA637A\n\tfor <buildroot@lists.busybox.net>;\n\tFri,  1 Apr 2016 20:25:37 +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 Q1K_EVCJWmbW for <buildroot@lists.busybox.net>;\n\tFri,  1 Apr 2016 20:25:36 +0000 (UTC)",
            "from mail-wm0-f65.google.com (mail-wm0-f65.google.com\n\t[74.125.82.65])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 4643EA60DF\n\tfor <buildroot@buildroot.org>; Fri,  1 Apr 2016 20:25:36 +0000 (UTC)",
            "by mail-wm0-f65.google.com with SMTP id 20so933493wmh.3\n\tfor <buildroot@buildroot.org>; Fri, 01 Apr 2016 13:25:36 -0700 (PDT)",
            "from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66])\n\tby smtp.gmail.com with ESMTPSA id\n\tw203sm559814wmg.14.2016.04.01.13.25.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 01 Apr 2016 13:25:34 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com header.b=hHkuuMxh;\n\tdkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=7l0Gqh/SIz9Eu7m/v26G7uE7TctKj7Y34qmLlUMC7FE=;\n\tb=hHkuuMxhCr33KlhB6H3kCNDcUIPOkpRFMXpdE/duvPY31z/SaXhWG9/H6qdPG/orLD\n\tHHnqLfPXXpmZBqqnvSW736A4tosfAM0md8EqMRlCzW3oGghTKx+/7CfRhKraORBlnTwf\n\tAbSQfsNcNEsiIUnDI3Wf8+gsjA0Oxt/Ou4CqImXmZPjEbKzMk0RRtyNSw0YI5oBrz5EX\n\tgkbw74El+wx4TSCMrF+JeDPR0gb+RkngGfui2t2bg5TxVAHHvBM0WhWmiW63OUZHKLhu\n\t0y/3tgwabPtVaJm0DaZ/r18i8+oyAW+ZMeWj/ExJKF9OlkU1CN/4T8hN5Y1RUJknR7TT\n\truXA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=7l0Gqh/SIz9Eu7m/v26G7uE7TctKj7Y34qmLlUMC7FE=;\n\tb=GRUAvhv8qcoxHXT/K0oqM9nOEN4maT8J5Q3nlI1vMd3PP8rZc+xvOs/Z+Obvrxp49c\n\tAlNG2iIl1ULKdMpeyjdUI06HfHggUQRUn5lF1mk1A89Ld3+hkZ8MySNkVO+wRNlaRinC\n\tufMD/6yQrZSR2zBZkfqe+r/zVZ5lSBnCZ6eEHpHq5bBxN6EgAgCdcUTiXS6cj07eRHfs\n\tr3XDMKg1FzKvKhehlrds3QxlaEel3tkLCDsuVz3mny6uu8X2lLjqDZs8xqpmzp4RPLSa\n\t/J8cvnrxS4gky+UBLKDGiFIMIoRgaS+CRhK/3+Qv5+wbpBsWUi/h0E8QS2am9U8qFX3e\n\tc39Q==",
        "X-Gm-Message-State": "AD7BkJIxURg4PwZL2lccjdEtPKGjn2Ij8Fws+RP08KobRWJvYIfVOpL7QoovQJS54lSzCg==",
        "X-Received": "by 10.28.45.132 with SMTP id t126mr528344wmt.86.1459542334906;\n\tFri, 01 Apr 2016 13:25:34 -0700 (PDT)",
        "From": "\"Yann E. MORIN\" <yann.morin.1998@free.fr>",
        "To": "buildroot@buildroot.org",
        "Date": "Fri,  1 Apr 2016 22:25:29 +0200",
        "Message-Id": "<5a6f95aea1aac633ba580a190c833d45005ea918.1459541702.git.yann.morin.1998@free.fr>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<cover.1459541702.git.yann.morin.1998@free.fr>",
        "References": "<cover.1459541702.git.yann.morin.1998@free.fr>",
        "Cc": "\"Yann E. MORIN\" <yann.morin.1998@free.fr>",
        "Subject": "[Buildroot] [PATCH 2/4 v2] support/download/git: do not use git\n\tarchive, handle it manually",
        "X-BeenThere": "buildroot@busybox.net",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>",
        "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>",
        "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>",
        "List-Post": "<mailto:buildroot@busybox.net>",
        "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>",
        "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "buildroot-bounces@busybox.net",
        "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>"
    },
    "content": "We currently use git-archive to generate the tarball. This is all handy\nand dandy, but git-archive does not support submodules. In the follow-up\npatch, we're going to handle submodules, so we would not be able to use\ngit-archive.\n\nInstead, we manually generate the archive:\n  - extract the tree to the requested cset,\n  - get the date of the commit to store in the archive,\n  - store only numeric owners,\n  - store owner and group as 0 (zero, although any arbitrary value would\n    have been fine, as long as it's a constant),\n  - sort the files to store in the archive.\n\nWe also get rid of the .git directory, because there is no reason to\nkeep it in the context of Buildroot. Some people would love to keep it\nso as to speed up later downloads when updating a package, but that is\nnot really doable. For example:\n  - use current Buildroot\n  - it would need foo-12345, so do a clone and keep the .git in the\n    generated tarball\n  - update Buildroot\n  - it would need foo-98765\nFor that second clone, how could we know we would have to first extract\nfoo-12345 ? So, the .git in the archive is pretty much useless for\nBuildroot.\n\nSigned-off-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n---\n support/download/git | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/support/download/git b/support/download/git\nindex 20b436e..5672217 100755\n--- a/support/download/git\n+++ b/support/download/git\n@@ -65,9 +65,17 @@ if ! _git fetch \"'${cset}:${cset}'\" >/dev/null 2>&1; then\n     printf \"Could not fetch special ref '%s'; assuming it is not special.\\n\" \"${cset}\"\n fi\n \n-_git archive --prefix=\"'${basename}/'\" -o \"'${output}.tmp'\" --format=tar \"'${cset}'\"\n+# Checkout the required changeset.\n+_git checkout -q \"'${cset}'\"\n+\n+# Get date of commit to generate a reproducible archive.\n+date=\"$( _git show --no-patch --pretty=format:%cD )\"\n+\n+# We do not need the .git dir to generate the tarball\n+rm -rf .git\n \n-# Not really required, but here for consistency\n popd >/dev/null\n \n+tar cf - --numeric-owner --owner=0 --group=0 --mtime=\"${date}\" \\\n+         -T <(find \"${basename}\" -not -type d |sort) >\"${output}.tmp\"\n gzip -n <\"${output}.tmp\" >\"${output}\"\n",
    "prefixes": [
        "2/4",
        "v2"
    ]
}