Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/218/?format=api
{ "id": 218, "url": "http://patchwork.ozlabs.org/api/patches/218/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20080909100628.GA15298@oksana.dev.rtsoft.ru/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20080909100628.GA15298@oksana.dev.rtsoft.ru>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20080909100628.GA15298@oksana.dev.rtsoft.ru/", "date": "2008-09-09T10:06:28", "name": "git apply vs. renamed files index mismatch", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "7c122aa90176b21bcffa2bbd054aa94a91b07649", "submitter": { "id": 45, "url": "http://patchwork.ozlabs.org/api/people/45/?format=api", "name": "Anton Vorontsov", "email": "avorontsov@ru.mvista.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20080909100628.GA15298@oksana.dev.rtsoft.ru/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/218/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/218/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org>", "X-Original-To": [ "patchwork@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Delivered-To": [ "patchwork@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 49426DE1F7\n\tfor <patchwork@ozlabs.org>; Tue, 9 Sep 2008 20:06:51 +1000 (EST)", "from buildserver.ru.mvista.com (unknown [85.21.88.6])\n\tby ozlabs.org (Postfix) with ESMTP id 7237ADDF4A\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 9 Sep 2008 20:06:31 +1000 (EST)", "from localhost (unknown [10.150.0.9])\n\tby buildserver.ru.mvista.com (Postfix) with ESMTP\n\tid 67FDB8821; Tue, 9 Sep 2008 15:06:28 +0500 (SAMST)" ], "Date": "Tue, 9 Sep 2008 14:06:28 +0400", "From": "Anton Vorontsov <avorontsov@ru.mvista.com>", "To": "Junio C Hamano <gitster@pobox.com>", "Subject": "Re: git apply vs. renamed files index mismatch", "Message-ID": "<20080909100628.GA15298@oksana.dev.rtsoft.ru>", "References": "<1220900995-11928-1-git-send-email-becky.bruce@freescale.com>\n\t<1220900995-11928-2-git-send-email-becky.bruce@freescale.com>\n\t<48C57A92.6060608@freescale.com>\n\t<20080908212717.GA21338@oksana.dev.rtsoft.ru>\n\t<7vej3ucf6y.fsf@gitster.siamese.dyndns.org>", "MIME-Version": "1.0", "Content-Disposition": "inline", "In-Reply-To": "<7vej3ucf6y.fsf@gitster.siamese.dyndns.org>", "User-Agent": "Mutt/1.5.18 (2008-05-17)", "Cc": "Scott Wood <scottwood@freescale.com>, git@vger.kernel.org,\n\tlinuxppc-dev@ozlabs.org", "X-BeenThere": "linuxppc-dev@ozlabs.org", "X-Mailman-Version": "2.1.11", "Precedence": "list", "Reply-To": "avorontsov@ru.mvista.com", "List-Id": "Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>", "List-Unsubscribe": "<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://ozlabs.org/pipermail/linuxppc-dev>", "List-Post": "<mailto:linuxppc-dev@ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@ozlabs.org?subject=help>", "List-Subscribe": "<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org", "Errors-To": "linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org" }, "content": "On Mon, Sep 08, 2008 at 05:53:41PM -0700, Junio C Hamano wrote:\n> Anton Vorontsov <avorontsov@ru.mvista.com> writes:\n> \n> >>> 3 files changed, 201 insertions(+), 201 deletions(-)\n> >>> create mode 100644 arch/powerpc/kernel/dma.c\n> >>> delete mode 100644 arch/powerpc/kernel/dma_64.c\n> >>\n> >> Passing -M to git format-patch makes it much easier\n> >\n> > I always thought that posting \"-M\" patches to the public lists is\n> > discouraged since it is quite difficult to apply them via patch(1).\n> > Also think of non-git users...\n> \n> My understanding has been that it is encouraged on the kernel mailing\n> list, because the rename format is far easier to review by showing the\n> differences that matter to reviewers, than showing a big chunk of text\n> deleted and another big chunk of text that is similar added elsewhere.\n> \n> I won't comment on this any further; the use of it is strictly a list and\n> community policy issue.\n> \n> > This is still possible by comparing the hashes:\n> > ...\n> > That is, if hashes match then it was pure rename.\n> >\n> > Though, too bad git {apply,am} does not produce any warnings if there\n> > are any hidden changes...\n> \n> But I _do_ want to know what you mean by this comment. Your statement\n> makes it sounds as if apply/am happily and silently accept \"hidden\n> changes\" and it is a bad thing.\n> \n> Now what do you exactly mean by \"any hidden changes\"? Do you mean \"the\n> sender did not use renaming format, the patch you fed was a one that\n> removes a huge chunk of text from one file, and adds a similarly huge\n> chunk of text to another file. The changes to these files looked similar\n> but was not quite the same\"? It is all there for you to review, and\n> especially if you prefer non-renaming format, then that is what you get.\n\nAs I said, \"index ..\" lines that git puts into patches are useful to see\nif there any changes has been made to a renamed file. So usually I don't\nhave to look through the whole patch to see if there are any changes,\nI can just look into the patch and conclude: \"this is git patch, and the\noverhead information says that it is rename-only patch. It should\nbe safe.\"\n\nNow consider the following patch (modified by hand: it should say\n+foo, but I changed it to +bar).\n\n\n\nThe \"index ...\" stuff says that there are no changes and it is\npure rename, but obviously there is a change.\n\nWhat would be great is to have is some warning (or error), that\nis: \"git-am: patch claims that it would only rename the file %s,\nbut it also changes things in that file. Somebody tried to make\na fool of you.\"\n\nMakes sense?", "diff": "diff --git a/file b/file\ndeleted file mode 100644\nindex 257cc56..0000000\n--- a/file\n+++ /dev/null\n@@ -1 +0,0 @@\n-foo\ndiff --git a/file_renamed b/file_renamed\nnew file mode 100644\nindex 0000000..257cc56\n--- /dev/null\n+++ b/file_renamed\n@@ -0,0 +1 @@\n+bar\n", "prefixes": [] }