Thread (33 messages) flat view 33 messages, 8 authors, 2016-06-15

Re: git apply vs. renamed files index mismatch

From: Geert Uytterhoeven <hidden>
Date: 2016-06-15 22:45:20
Also in: git

On Tue, 9 Sep 2008, Anton Vorontsov wrote:
On Mon, Sep 08, 2008 at 04:38:57PM -0500, Scott Wood wrote:
quoted
Anton Vorontsov wrote:
quoted
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...
I think the substantially enhanced reviewability trumps non-git-users  
who can follow the rename instructions manually (or fix up their patch  
utility) if they insist on shunning tools that would make their life 
easier.
Can't disagree, I myself use git. ;-) But I'm also using standard
patch(1) to test occasional patches... And sometimes linux-X tree
isn't tracked by git (e.g. -mm otm snapshots).
quoted
quoted
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.
I suppose, though it's not as easy to spot, and won't help in showing  
what the differences are if there are any.
..rename and changes ideally go in separate patches.
Except if the rename also requires some small changes (cfr. the move of
include/asm-*). But if no changes are required to fix breakage caused by the
rename, then make the changes separate.
IIRC this also helps git to track renames (it can easily compare
hashes instead of guessing).
With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help