<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-rename.c, branch v1.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2005-12-26T16:59:21Z</updated>
<entry>
<title>short circuit out of a few places where we would allocate zero bytes</title>
<updated>2005-12-26T16:59:21Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2005-12-24T12:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d6fb370bc98e5d4723103dda0829b00c79da213'/>
<id>urn:sha1:7d6fb370bc98e5d4723103dda0829b00c79da213</id>
<content type='text'>
dietlibc versions of malloc, calloc and realloc all return NULL if
they're told to allocate 0 bytes, causes the x* wrappers to die().

There are several more places where these calls could end up asking
for 0 bytes, too...

Maybe simply not die()-ing in the x* wrappers if 0/NULL is returned
when the requested size is zero is a safer and easier way to go.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>rename detection with -M100 means "exact renames only".</title>
<updated>2005-11-21T20:21:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-21T20:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f70b806920e3ea158d7e189a1ec668445c13359'/>
<id>urn:sha1:9f70b806920e3ea158d7e189a1ec668445c13359</id>
<content type='text'>
When the user is interested in pure renames, there is no point
doing the similarity scores.  This changes the score argument
parsing to special case -M100 (otherwise, it is a precision
scaled value 0 &lt;= v &lt; 1 and would mean 0.1, not 1.0 --- if you
do mean 0.1, you can say -M1), and optimizes the diffcore_rename
transformation to only look at pure renames in that case.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>diff: make default rename detection limit configurable.</title>
<updated>2005-11-15T23:08:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-15T20:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3299c6f6a8a384453d025ffa117c5d8b35ba1972'/>
<id>urn:sha1:3299c6f6a8a384453d025ffa117c5d8b35ba1972</id>
<content type='text'>
A while ago, a rename-detection limit logic was implemented as a
response to this thread:

	http://marc.theaimsgroup.com/?l=git&amp;m=112413080630175

where gitweb was found to be using a lot of time and memory to
detect renames on huge commits.  git-diff family takes -l&lt;num&gt;
flag, and if the number of paths that are rename destination
candidates (i.e. new paths with -M, or modified paths with -C)
are larger than that number, skips rename/copy detection even
when -M or -C is specified on the command line.

This commit makes the rename detection limit easier to use.  You
can have:

	[diff]
		renamelimit = 30

in your .git/config file to specify the default rename detection
limit.  You can override this from the command line; giving 0
means 'unlimited':

	git diff -M -l0

We might want to change the default behaviour, when you do not
have the configuration, to limit it to say 20 paths or so.  This
would also help the diffstat generation after a big 'git pull'.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Diff: -l&lt;num&gt; to limit rename/copy detection.</title>
<updated>2005-09-25T06:50:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-09-21T07:18:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8082d8d3050e3fdd7b0f13c7a7b3ad68af7f478a'/>
<id>urn:sha1:8082d8d3050e3fdd7b0f13c7a7b3ad68af7f478a</id>
<content type='text'>
When many paths are modified, rename detection takes a lot of time.
The new option -l&lt;num&gt; can be used to disable rename detection when
more than &lt;num&gt; paths are possibly created as renames.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Plug diff leaks.</title>
<updated>2005-09-15T23:13:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-09-15T23:13:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5098bafb756de69d03882707a3382899c0cb7dd1'/>
<id>urn:sha1:5098bafb756de69d03882707a3382899c0cb7dd1</id>
<content type='text'>
It is a bit embarrassing that it took this long for a fix since the
problem was first reported on Aug 13th.

    Message-ID: &lt;87y876gl1r.wl@mail2.atmark-techno.com&gt;
    From: Yasushi SHOJI &lt;yashi@atmark-techno.com&gt;
    Newsgroups: gmane.comp.version-control.git
    Subject: [patch] possible memory leak in diff.c::diff_free_filepair()
    Date: Sat, 13 Aug 2005 19:58:56 +0900

This time I used valgrind to make sure that it does not overeagerly
discard memory that is still being used.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Fix copy marking from diffcore-rename.</title>
<updated>2005-09-10T19:42:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-09-10T19:42:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6bac10d89d0889118a3e747c9c9210fd437c140d'/>
<id>urn:sha1:6bac10d89d0889118a3e747c9c9210fd437c140d</id>
<content type='text'>
When (A,B) ==&gt; (B,C) rename-copy was detected, we incorrectly said
that C was created by copying B.  This is because we only check if the
path of rename/copy source still exists in the resulting tree to see
if the file is renamed out of existence.  In this case, the new B is
created by copying or renaming A, so the original B is lost and we
should say C is a rename of B not a copy of B.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<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>
</feed>
