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

git apply vs. renamed files index mismatch (was: Re: [PATCH 1/4] POWERPC: Rename dma_64.c to dma.c)

From
AVAnton Vorontsov <avorontsov@ru.mvista.com>
Date
Sep 8, 2008, 21:27 UTC
Message-ID
<20080908212717.GA21338@oksana.dev.rtsoft.ru>
In-Reply-To
<48C57A92.6060608@freescale.com>
On Mon, Sep 08, 2008 at 02:18:42PM -0500, Scott Wood wrote:
Show 14 quoted lines
> Becky Bruce wrote:
>> This is in preparation for the merge of the 32 and 64-bit
>> dma code in arch/powerpc.
>>
>> Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
>> ---
>>  arch/powerpc/kernel/Makefile |    2 +-
>>  arch/powerpc/kernel/dma.c    |  200 ++++++++++++++++++++++++++++++++++++++++++
>>  arch/powerpc/kernel/dma_64.c |  200 ------------------------------------------
>>  3 files changed, 201 insertions(+), 201 deletions(-)
>>  create mode 100644 arch/powerpc/kernel/dma.c
>>  delete mode 100644 arch/powerpc/kernel/dma_64.c
>
> Passing -M to git format-patch makes it much easier

I always thought that posting "-M" patches to the public lists is discouraged since it is quite difficult to apply them via patch(1). Also think of non-git users...

> to see whether  
> anything changed between the old file and the new file.
This is still possible by comparing the hashes:
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
new file mode 100644
index 0000000..ae5708e
[...]
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c
deleted file mode 100644
index ae5708e..0000000

That is, if hashes match then it was pure rename.

Though, too bad git {apply,am} does not produce any warnings if there
are any hidden changes...

Cc'ing git mailing list.
-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
Next: Scott Wood
Message 1 of 11 in “git apply vs. renamed files index mismatch (was: Re: [PATCH 1/4] POWERPC: Rename dma_64.c to dma.c)”
  1. Anton VorontsovSep 8, 2008
  2. Scott WoodSep 8, 2008
  3. Anton VorontsovSep 8, 2008
  4. Junio C HamanoSep 9, 2008
  5. Geert UytterhoevenSep 9, 2008
  6. Christoph HellwigSep 8, 2008
  7. Junio C HamanoSep 9, 2008
  8. Anton VorontsovSep 9, 2008
  9. Junio C HamanoSep 9, 2008
  10. Anton VorontsovSep 9, 2008
  11. Junio C HamanoSep 10, 2008

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.