<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff.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-07-08T18:01:10Z</updated>
<entry>
<title>[PATCH] Make sq_expand() available as sq_quote().</title>
<updated>2005-07-08T18:01:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-07-08T06:58:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6fb737be5e4803feabe0d1b6169de36131936368'/>
<id>urn:sha1:6fb737be5e4803feabe0d1b6169de36131936368</id>
<content type='text'>
A useful shell safety helper sq_expand() was hidden as a static
function in diff.c.  Extract it out and make it available as
sq_quote().

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] Enhance sha1_file_size() into sha1_object_info()</title>
<updated>2005-06-27T22:27:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-27T10:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36e4d74a210ba618e1520f11ce7fc2f8baec5bb8'/>
<id>urn:sha1:36e4d74a210ba618e1520f11ce7fc2f8baec5bb8</id>
<content type='text'>
This lets us eliminate one use of map_sha1_file() outside
sha1_file.c, to bring us one step closer to the packed GIT.

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] Rework -B output.</title>
<updated>2005-06-20T03:13:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-19T20:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=366175ef8c3b1e145f4ba846e63a1dea3ec3cacc'/>
<id>urn:sha1:366175ef8c3b1e145f4ba846e63a1dea3ec3cacc</id>
<content type='text'>
Patch for a completely rewritten file detected by the -B flag
was shown as a pair of creation followed by deletion in earlier
versions.  This was an misguided attempt to make reviewing such
a complete rewrite easier, and unnecessarily ended up confusing
git-apply.  Instead, show the entire contents of old version
prefixed with '-', followed by the entire contents of new
version prefixed with '+'.  This gives the same easy-to-review
for human consumer while keeping it a single, regular
modification patch for machine consumption, something that even
GNU patch can grok.

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 --diff-filter= output restriction to diff-* family.</title>
<updated>2005-06-13T03:40:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-12T03:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2ce9fde57513af026e0641073a6781a086251d5'/>
<id>urn:sha1:f2ce9fde57513af026e0641073a6781a086251d5</id>
<content type='text'>
This is a halfway between debugging aid and a helper to write an
ultra-smart merge scripts.  The new option takes a string that
consists of a list of "status" letters, and limits the diff
output to only those classes of changes, with two exceptions:

 - A broken pair (aka "complete rewrite"), does not match D
   (deleted) or N (created).  Use B to look for them.

 - The letter "A" in the diff-filter string does not match
   anything itself, but causes the entire diff that contains
   selected patches to be output (this behaviour is similar to
   that of --pickaxe-all for the -S option).

For example,

    $ git-rev-list HEAD |
      git-diff-tree --stdin -s -v -B -C --diff-filter=BCR

shows a list of commits that have complete rewrite, copy, or
rename.

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 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] Re-Fix SIGSEGV on unmerged files in git-diff-files -p</title>
<updated>2005-06-13T03:29:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-13T00:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc7090efbc8280e482a6b2dc7419e525cbc3c5d7'/>
<id>urn:sha1:dc7090efbc8280e482a6b2dc7419e525cbc3c5d7</id>
<content type='text'>
When an unmerged path was fed via diff_unmerged() into diffcore,
it eventually called run_diff() with "one" and "two" parameters
with NULL, but run_diff() was not written carefully enough to
notice this situation.

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>diff 'rename' format change.</title>
<updated>2005-06-05T22:31:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-06-05T22:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc93841715dfa9a9cdda6f2c4a25eec831ea7aa0'/>
<id>urn:sha1:dc93841715dfa9a9cdda6f2c4a25eec831ea7aa0</id>
<content type='text'>
Clearly even Junio felt git "rename" header lines should say "from/to"
instead of "old/new", since he wrote the documentation that way.

This way it also matches "copy".

git-apply will accept both versions, at least for a while.
</content>
</entry>
<entry>
<title>[PATCH] diff.c: -B argument passing fix.</title>
<updated>2005-06-05T21:14:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-04T06:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49d9e85d1103fe1d0fcb73956643b93acc5c1f4f'/>
<id>urn:sha1:49d9e85d1103fe1d0fcb73956643b93acc5c1f4f</id>
<content type='text'>
This fixes a bug that was preventing non-default parameter to -B
option to be passed correctly; you could not give more than 50%
break score.

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.c: locate_size_cache() fix.</title>
<updated>2005-06-05T21:14:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-04T06:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0601e131c95940701c153e35ba73b97914ec0b3f'/>
<id>urn:sha1:0601e131c95940701c153e35ba73b97914ec0b3f</id>
<content type='text'>
This fixes two bugs.

 - declaration of auto variable "cmp" was preceeded by a
   statement, causing compilation error on real C compilers;
   noticed and patch given by Yoichi Yuasa.

 - the function's calling convention was overloading its size
   parameter to mean "largest possible value means do not add
   entry", which was a bad taste.  Brought up during a
   discussion with Peter Baudis.

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: Update -B heuristics.</title>
<updated>2005-06-03T18:23:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-03T08:40:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eeaa4603147974b988d7b958571628d6ecd697f3'/>
<id>urn:sha1:eeaa4603147974b988d7b958571628d6ecd697f3</id>
<content type='text'>
As Linus pointed out on the mailing list discussion, -B should
break a files that has many inserts even if it still keeps
enough of the original contents, so that the broken pieces can
later be matched with other files by -M or -C.  However, if such
a broken pair does not get picked up by -M or -C, we would want
to apply different criteria; namely, regardless of the amount of
new material in the result, the determination of "rewrite"
should be done by looking at the amount of original material
still left in the result.  If you still have the original 97
lines from a 100-line document, it does not matter if you add
your own 13 lines to make a 110-line document, or if you add 903
lines to make a 1000-line document.  It is not a rewrite but an
in-place edit.  On the other hand, if you did lose 97 lines from
the original, it does not matter if you added 27 lines to make a
30-line document or if you added 997 lines to make a 1000-line
document.  You did a complete rewrite in either case.

This patch introduces a post-processing phase that runs after
diffcore-rename matches up broken pairs diffcore-break creates.
The purpose of this post-processing is to pick up these broken
pieces and merge them back into in-place modifications.  For
this, the score parameter -B option takes is changed into a pair
of numbers, and it takes "-B99/80" format when fully spelled
out.  The first number is the minimum amount of "edit" (same
definition as what diffcore-rename uses, which is "sum of
deletion and insertion") that a modification needs to have to be
broken, and the second number is the minimum amount of "delete"
a surviving broken pair must have to avoid being merged back
together.  It can be abbreviated to "-B" to use default for
both, "-B9" or "-B9/" to use 90% for "edit" but default (80%)
for merge avoidance, or "-B/75" to use default (99%) "edit" and
75% for merge avoidance.

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