code movements in diffs, was Re: [PATCH 2/2] Allow fetch-pack to decide keeping the fetched pack without exploding
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 23, 2007, 11:07 UTC
- Message-ID
- <Pine.LNX.4.63.0701231205110.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <ep4phb$fef$1@sea.gmane.org>
Hi,
On Tue, 23 Jan 2007, Jakub Narebski wrote:
Show 18 quoted lines
> Johannes Schindelin wrote: > > > P.S.: These patches make me dream of yet another diff format enhancement: > > code moves! Of course, for this to be really usable, you'd also have to > > automatically determine indent changes... You may say I'm a dreamer. But > > I'm not the only one... > > I wonder if it could be done with e.g. > > --- a/fromfile > +++ b/somefile > <code movement or copying> > > --- a/somefile > +++ b/somefile > <other changes> > > The problem is that context differs usually for code movement.
There is a more fundamental problem here: both "diff" and "patch" walk the file pair in a direction. The whole "code movement" stuff would break this paradigm. What you found is just _one_ consequence.
But as I said: a man can still dream, can't he?
Ciao, Dscho