<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff.h, 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-13T03:40:20Z</updated>
<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] diff: Fix docs and add -O to diff-helper.</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:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce24067549a8554b214e723d7aa4bc063c54409e'/>
<id>urn:sha1:ce24067549a8554b214e723d7aa4bc063c54409e</id>
<content type='text'>
This patch updates diff documentation and usage strings:

 - clarify the semantics of -R.  It is not "output in reverse";
   rather, it is "I will feed diff backwards".  Semantically
   they are different when -C is involved.

 - describe -O in usage strings of diff-* brothers.  It was
   implemented, documented but not described in usage text.

Also it adds -O to diff-helper.  Like -S (and unlike -M/-C/-B),
this option can work on sanitized diff-raw output produced by
the diff-* brothers.  While we are at it, the call it makes to
diffcore is cleaned up to use the diffcore_std() like everybody
else, and the declaration for the low level diffcore routines
are moved from diff.h (public) to diffcore.h (private between
diff.c and diffcore backends).

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: mode bits fixes</title>
<updated>2005-06-01T20:24:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-06-01T18:38:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=67574c403f1e27660bbd0348b81b31adc9889b20'/>
<id>urn:sha1:67574c403f1e27660bbd0348b81b31adc9889b20</id>
<content type='text'>
The core GIT repository has trees that record regular file mode
in 0664 instead of normalized 0644 pattern.  Comparing such a
tree with another tree that records the same file in 0644
pattern without content changes with git-diff-tree causes it to
feed otherwise unmodified pairs to the diff_change() routine,
which triggers a sanity check routine and barfs.  This patch
fixes the problem, along with the fix to another caller that
uses unnormalized mode bits to call diff_change() routine in a
similar way.

Without this patch, you will see "fatal error" from diff-tree
when you run git-deltafy-script on the core GIT repository
itself.

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 -O&lt;orderfile&gt; option to diff-* brothers.</title>
<updated>2005-05-31T01:10:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-30T07:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=af5323e0274fad058f13949b89a9191a7bef7e38'/>
<id>urn:sha1:af5323e0274fad058f13949b89a9191a7bef7e38</id>
<content type='text'>
A new diffcore filter diffcore-order is introduced.  This takes
a text file each of whose line is a shell glob pattern.  Patches
that match a glob pattern on an earlier line in the file are
output before patches that match a later line, and patches that
do not match any glob pattern are output last.

A typical orderfile for git project probably should look like
this:

    README
    Makefile
    Documentation
    *.h
    *.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>[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: consolidate various calls into diffcore.</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:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=befe86392c767b62e4a6498cf951faae6f2c5ea3'/>
<id>urn:sha1:befe86392c767b62e4a6498cf951faae6f2c5ea3</id>
<content type='text'>
The three diff-* brothers had a sequence of calls into diffcore
that were almost identical.  Introduce a new diffcore_std()
function that takes all the necessary arguments to consolidate
it.  This will make later enhancements and changing the order of
diffcore application simpler.

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] Add --pickaxe-all to diff-* brothers.</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:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=367cec1c024c3849cb32eaac15884a4adfefe1de'/>
<id>urn:sha1:367cec1c024c3849cb32eaac15884a4adfefe1de</id>
<content type='text'>
When --pickaxe-all is given in addition to -S, pickaxe shows the
entire diffs contained in the changeset, not just the diffs for
the filepair that touched the sought-after string.  This is
useful to see the changes in context.

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] Clean up diff_setup() to make it more extensible.</title>
<updated>2005-05-29T18:17:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-27T22:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=19feebc8c3ca7bd40f2f32f4f856b68b9a02870c'/>
<id>urn:sha1:19feebc8c3ca7bd40f2f32f4f856b68b9a02870c</id>
<content type='text'>
This changes the argument of diff_setup() from an integer that
says if we are feeding reversed diff to a bitmask, so that later
global options can be added more easily.

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 diff-pruning logic which was running prune too early.</title>
<updated>2005-05-24T02:17:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-05-24T01:14:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bceafe752c03f4b13b9b1671a55d9e2acd26432d'/>
<id>urn:sha1:bceafe752c03f4b13b9b1671a55d9e2acd26432d</id>
<content type='text'>
For later stages to reorder patches, pruning logic and rename detection
logic should not decide which delete to discard (because another entry
said it will take over the file as a rename) until the very end.

Also fix some tests that were assuming the earlier "last one is rename
or keep everything else is copy" semantics of diff-raw format, which no
longer is true.

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