Re: [PATCH] Fix rename/copy when dealing with temporarily broken pairs.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 13, 2005, 21:01 UTC
- Message-ID
- <7vis0ic6ot.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <2cfc4032050613092462d3a456@mail.gmail.com>
>>>>> "JS" == Jon Seymour <jon.seymour@gmail.com> writes:
JS> I've got a patch series that renames a file, but the patches JS> generated by your git-format-patch-script fail to rename the JS> file to the new name.
JS> I wondered if this patch might fix it, but it doesn't seem to.
I doubt the problem you have is related to the problem this patch addresses. This is a fix for a case that the machinery sometimes says rename when it should say copy.
Regular "patch" cannot grok either copy or rename. If your recipient uses "patch", then you must not use -C nor -M when you are preparing a diff for his consumption.
JS> What tool am I meant to be using to apply the patch? JS> I am currently using "patch -p1"
As Petr already responded, the git-apply program from the King Penguin himself should work [*1*].
One thing I just want to make sure is this. You are not reporting that the patch you sent that said "rename" should have been "copy", are you?
I understand that your change creates traversal.c out of epoch.c. Say the output is from between commitA and commitB.
What I would like to know is if commitB still contains epoch.c, or it does not have epoch.c anymore [*2*]. If it is the former then I think you spotted a bug in the patch your message is a response to. I hope that is not the case.
P.S. I will be offline shortly and will not be able to offer further help until perhaps late next week.
[Footnote]
*1* Find the thread in the mailing list archive that contains this message, which I think would be of help too.
Date: Sun, 5 Jun 2005 16:17:56 -0700 (PDT)
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
cc: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: [PATCH-CAREFUL/RENAME] rename git-rpush and git-rpull to git-ssh-push and git-ssh-pull
Message-ID: <Pine.LNX.4.58.0506051613370.1876@ppc970.osdl.org>
References: <7vk6l9flzr.fsf@assigned-by-dhcp.cox.net>
<Pine.LNX.4.21.0506050132590.30848-100000@iabervon.org>
<7vfyvxb89m.fsf_-_@assigned-by-dhcp.cox.net> <Pine.LNX.4.58.0506051427280.1876@ppc970.osdl.org>
<7vmzq4zata.fsf@assigned-by-dhcp.cox.net> On Sun, 5 Jun 2005, Junio C Hamano wrote:
>
> Here is a rebase. To apply with git-apply, you need the "Yes,
> sir" patch to grok "rename from/to".Seems to have applied correctly. Very nice.
Linus