<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-rename.c, branch v0.99</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v0.99</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v0.99'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2005-06-29T00:13:32Z</updated>
<entry>
<title>[PATCH] Use enhanced diff_delta() in the similarity estimator.</title>
<updated>2005-06-29T00:13:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-28T23:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75c660ac9373b588a7815fa922dac02b2e4519d4'/>
<id>urn:sha1:75c660ac9373b588a7815fa922dac02b2e4519d4</id>
<content type='text'>
The diff_delta() interface was extended to reject generating too big a
delta while we were working on the packed GIT archive format.

Take advantage of that when generating delta in the similarity estimator
used in diffcore-rename.c

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Add a "max_size" parameter to diff_delta()</title>
<updated>2005-06-26T02:30:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-06-26T02:30:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75c42d8cc3b42e4b82946848b8ba902b4bbcc38d'/>
<id>urn:sha1:75c42d8cc3b42e4b82946848b8ba902b4bbcc38d</id>
<content type='text'>
Anything that generates a delta to see if two objects are close usually
isn't interested in the delta ends up being bigger than some specified
size, and this allows us to stop delta generation early when that
happens.
</content>
</entry>
<entry>
<title>[PATCH] Fix rename/copy when dealing with temporarily broken pairs.</title>
<updated>2005-06-13T03:40:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-12T03:55:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2210100ac00b8a46f1d94c044391bfa50b25afa4'/>
<id>urn:sha1:2210100ac00b8a46f1d94c044391bfa50b25afa4</id>
<content type='text'>
When rename/copy uses a file that was broken by diffcore-break
as the source, and the broken filepair gets merged back later,
the output was mislabeled as a rename.  In this case, the source
file ends up staying in the output, so we should label it as a
copy instead.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] diff: Clean up diff_scoreopt_parse().</title>
<updated>2005-06-03T18:23:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-03T08:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0e3994fa97e9876b571531444b97ae6e63fd744d'/>
<id>urn:sha1:0e3994fa97e9876b571531444b97ae6e63fd744d</id>
<content type='text'>
This cleans up diff_scoreopt_parse() function that is used to
parse the fractional notation -B, -C and -M option takes.  The
callers are modified to check for errors and complain.  Earlier
they silently ignored malformed input and falled back on the
default.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Tweak count-delta interface</title>
<updated>2005-06-03T18:23:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-03T08:36:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=355e76a4a3c5e49ae15a642806457bce10fe2ef4'/>
<id>urn:sha1:355e76a4a3c5e49ae15a642806457bce10fe2ef4</id>
<content type='text'>
Make it return copied source and insertion separately, so that
later implementation of heuristics can use them more flexibly.

This does not change the heuristics implemented in
diffcore-rename nor diffcore-break in any way.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Add -B flag to diff-* brothers.</title>
<updated>2005-05-30T17:35:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-30T07:08:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f345b0a066572206aac4a4f9a57d746e213b6bff'/>
<id>urn:sha1:f345b0a066572206aac4a4f9a57d746e213b6bff</id>
<content type='text'>
A new diffcore transformation, diffcore-break.c, is introduced.

When the -B flag is given, a patch that represents a complete
rewrite is broken into a deletion followed by a creation.  This
makes it easier to review such a complete rewrite patch.

The -B flag takes the same syntax as the -M and -C flags to
specify the minimum amount of non-source material the resulting
file needs to have to be considered a complete rewrite, and
defaults to 99% if not specified.

As the new test t4008-diff-break-rewrite.sh demonstrates, if a
file is a complete rewrite, it is broken into a delete/create
pair, which can further be subjected to the usual rename
detection if -M or -C is used.  For example, if file0 gets
completely rewritten to make it as if it were rather based on
file1 which itself disappeared, the following happens:

    The original change looks like this:

	file0     --&gt; file0' (quite different from file0)
	file1     --&gt; /dev/null

    After diffcore-break runs, it would become this:

	file0     --&gt; /dev/null
	/dev/null --&gt; file0'
	file1     --&gt; /dev/null

    Then diffcore-rename matches them up:

	file1     --&gt; file0'

The internal score values are finer grained now.  Earlier
maximum of 10000 has been raised to 60000; there is no user
visible changes but there is no reason to waste available bits.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] diff: fix the culling of unneeded delete record.</title>
<updated>2005-05-30T17:35:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-30T07:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2cd68882ee8629f9782be017007fff4c78e45e45'/>
<id>urn:sha1:2cd68882ee8629f9782be017007fff4c78e45e45</id>
<content type='text'>
The commit 15d061b435a7e3b6bead39df3889f4af78c4b00a

    [PATCH] Fix the way diffcore-rename records unremoved source.

still leaves unneeded delete records in its output stream by
mistake, which was covered up by having an extra check to turn
such a delete into a no-op downstream.  Fix the check in the
diffcore-rename to simplify the output routine.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] diff: code clean-up and removal of rename hack.</title>
<updated>2005-05-30T17:35:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-29T23:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01c4e70f637c0617e24d9a7abb7239e25de9a51d'/>
<id>urn:sha1:01c4e70f637c0617e24d9a7abb7239e25de9a51d</id>
<content type='text'>
A new macro, DIFF_PAIR_RENAME(), is introduced to distinguish a
filepair that is a rename/copy (the definition of which is src
and dst are different paths, of course).  This removes the hack
used in the record_rename_pair() to always put a non-zero value
in the score field.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Optimize diff-tree -[CM] --stdin</title>
<updated>2005-05-29T18:17:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-27T22:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0c6b2a2fd98b51f1f2655ea69ace9763da28e79'/>
<id>urn:sha1:f0c6b2a2fd98b51f1f2655ea69ace9763da28e79</id>
<content type='text'>
This attempts to optimize "diff-tree -[CM] --stdin", which
compares successible tree pairs.  This optimization does not
make much sense for other commands in the diff-* brothers.

When reading from --stdin and using rename/copy detection, the
patch makes diff-tree to read the current index file first.
This is done to reuse the optimization used by diff-cache in the
non-cached case.  Similarity estimator can avoid expanding a
blob if the index says what is in the work tree has an exact
copy of that blob already expanded.

Another optimization the patch makes is to check only file sizes
first to terminate similarity estimation early.  In order for
this to work, it needs a way to tell the size of the blob
without expanding it.  Since an obvious way of doing it, which
is to keep all the blobs previously used in the memory, is too
costly, it does so by keeping the filesize for each object it
has already seen in memory.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix the way diffcore-rename records unremoved source.</title>
<updated>2005-05-29T18:17:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-27T22:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15d061b435a7e3b6bead39df3889f4af78c4b00a'/>
<id>urn:sha1:15d061b435a7e3b6bead39df3889f4af78c4b00a</id>
<content type='text'>
Earier version of diffcore-rename used to keep unmodified
filepair in its output so that the last stage of the processing
that tells renames from copies can make all of rename/copy to
copies.  However this had a bad interaction with other diffcore
filters that wanted to run after diffcore-rename, in that such
unmodified filepair must be retained for proper distinction
between renames and copies to happen.

This patch fixes the problem by changing the way diffcore-rename
records the information needed to distinguish "all are copies"
case and "the last one is a rename" case.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
