git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Petr BaudisNext: Jon Seymour
Message 5 of 7 in “read-tree: loosen too strict index requirements”
  1. 5/3 read-tree: loosen too strict index requirementsJunio C Hamano, Jun 11, 2005
  2. Fix rename/copy when dealing with temporarily broken pairs.Junio C Hamano, Jun 12, 2005
  3. Jon SeymourJun 13, 2005
  4. Petr BaudisJun 13, 2005
  5. Junio C HamanoJun 13, 2005
  6. Jon SeymourJun 13, 2005
  7. Add --diff-filter= output restriction to diff-* family.Junio C Hamano, Jun 12, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.