Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch]

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Barkalow <barkalow@...>
Cc: <git@...>
Date: Wednesday, July 18, 2007 - 6:09 am

Hi,

On Tue, 17 Jul 2007, Daniel Barkalow wrote:


Makes sense.  Thanks.


AFAIR from the thread after

http://thread.gmane.org/gmane.linux.kernel/484924/focus=37498

the problem was not so much the displaying as the applying.  You have a 
diff for builtin-bundle.c.  You want to move code to bundle.c.  git-diff 
has to rearrange the diff so that bundle.c can copy the code from 
builtin-bundle.c, and then it is deleted from builtin-bundle.c.  If you 
move code criss-cross, it is not possible.

However, if you do something like

diff --git a/builtin-bundle.c:10--20 b/bundle.c:0--30
code move
--- a/builtin-bundle.c:10--20
+++ b/bundle.c:1--11
diff --git ...

it should be possible.  We could allow generation of such a diff with 
--code-moves, which would detect if there is substantial evidence for a 
code move, and produce such a diff.

Note: this kind of code movement diff has to come before _both_ the diffs 
for builtin-bundle.c and bundle.c, since chances are that the code had to 
be touched a little here and there.  And probably you would want a little 
context, just to make sure it is the correct code when applying the patch.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] Move bundle specific stuff into bundle.[ch], Johannes Schindelin, (Tue Jul 17, 6:49 pm)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Daniel Barkalow, (Tue Jul 17, 10:48 pm)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Johannes Schindelin, (Wed Jul 18, 5:56 am)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Daniel Barkalow, (Wed Jul 18, 12:25 pm)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Johannes Schindelin, (Wed Jul 18, 12:33 pm)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Daniel Barkalow, (Tue Jul 17, 11:23 pm)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Johannes Schindelin, (Wed Jul 18, 6:09 am)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Shawn O. Pearce, (Tue Jul 17, 11:29 pm)
Re: [PATCH 1/3] Move bundle specific stuff into bundle.[ch], Shawn O. Pearce, (Wed Jul 18, 2:19 am)