<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore.h, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-05-07T16:34:28Z</updated>
<entry>
<title>Make diffcore_std only can run once before a diff_flush</title>
<updated>2010-05-07T16:34:28Z</updated>
<author>
<name>Bo Yang</name>
<email>struggleyb.nku@gmail.com</email>
</author>
<published>2010-05-07T04:52:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1da6175d438a9849db07a68326ee05f291510074'/>
<id>urn:sha1:1da6175d438a9849db07a68326ee05f291510074</id>
<content type='text'>
When file renames/copies detection is turned on, the
second diffcore_std will degrade a 'C' pair to a 'R' pair.

And this may happen when we run 'git log --follow' with
hard copies finding. That is, the try_to_follow_renames()
will run diffcore_std to find the copies, and then
'git log' will issue another diffcore_std, which will reduce
'src-&gt;rename_used' and recognize this copy as a rename.
This is not what we want.

So, I think we really don't need to run diffcore_std more
than one time.

Signed-off-by: Bo Yang &lt;struggleyb.nku@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add a macro DIFF_QUEUE_CLEAR.</title>
<updated>2010-05-07T16:34:27Z</updated>
<author>
<name>Bo Yang</name>
<email>struggleyb.nku@gmail.com</email>
</author>
<published>2010-05-07T04:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ca5df90615aa3c6b60e1bc8f03db6cae98e816c'/>
<id>urn:sha1:9ca5df90615aa3c6b60e1bc8f03db6cae98e816c</id>
<content type='text'>
Refactor the diff_queue_struct code, this macro help
to reset the structure.

Signed-off-by: Bo Yang &lt;struggleyb.nku@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git diff --submodule: Show detailed dirty status of submodules</title>
<updated>2010-03-05T06:16:33Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2010-03-04T21:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c7e1a73641e24340bf93f6f1792220fa9154cda3'/>
<id>urn:sha1:c7e1a73641e24340bf93f6f1792220fa9154cda3</id>
<content type='text'>
When encountering a dirty submodule while doing "git diff --submodule"
print an extra line for new untracked content and another for modified
but already tracked content. And if the HEAD of the submodule is equal
to the ref diffed against in the superproject, drop the output which
would just show the same SHA1s and no commit message headlines.

To achieve that, the dirty_submodule bitfield is expanded to two bits.
The output of "git status" inside the submodule is parsed to set the
according bits.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Performance optimization for detection of modified submodules</title>
<updated>2010-01-19T01:28:21Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2010-01-18T20:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3d42c4773bccebb50f01b108d20b06c6a11e615'/>
<id>urn:sha1:e3d42c4773bccebb50f01b108d20b06c6a11e615</id>
<content type='text'>
In the worst case is_submodule_modified() got called three times for
each submodule. The information we got from scanning the whole
submodule tree the first time can be reused instead.

New parameters have been added to diff_change() and diff_addremove(),
the information is stored in a new member of struct diff_filespec. Its
value is then reused instead of calling is_submodule_modified() again.

When no explicit "-dirty" is needed in the output the call to
is_submodule_modified() is not necessary when the submodules HEAD
already disagrees with the ref of the superproject, as this alone
marks it as modified. To achieve that, get_stat_data() got an extra
argument.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2008-11-03T00:36:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-11-03T00:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=84cdd3c635280c42ae42009c4be020ef2c30ba7c'/>
<id>urn:sha1:84cdd3c635280c42ae42009c4be020ef2c30ba7c</id>
<content type='text'>
* maint:
  Add reference for status letters in documentation.
  Document that git-log takes --all-match.
  Update draft 1.6.0.4 release notes
</content>
</entry>
<entry>
<title>Add reference for status letters in documentation.</title>
<updated>2008-11-02T23:57:10Z</updated>
<author>
<name>Yann Dirson</name>
<email>ydirson@altern.org</email>
</author>
<published>2008-11-02T13:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a5a323f33cd25829e0dde3939b196cf743d7d9d8'/>
<id>urn:sha1:a5a323f33cd25829e0dde3939b196cf743d7d9d8</id>
<content type='text'>
Also fix error in diff_filepair::status documentation, and point to
the in-code reference as well as the doc.

Signed-off-by: Yann Dirson &lt;ydirson@altern.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: introduce diff.&lt;driver&gt;.binary</title>
<updated>2008-10-18T15:02:26Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2008-10-05T21:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=122aa6f9c000d0d286898e2eb7b3504ac6cb9ebd'/>
<id>urn:sha1:122aa6f9c000d0d286898e2eb7b3504ac6cb9ebd</id>
<content type='text'>
The "diff" gitattribute is somewhat overloaded right now. It
can say one of three things:

  1. this file is definitely binary, or definitely not
     (i.e., diff or !diff)
  2. this file should use an external diff engine (i.e.,
     diff=foo, diff.foo.command = custom-script)
  3. this file should use particular funcname patterns
     (i.e., diff=foo, diff.foo.(x?)funcname = some-regex)

Most of the time, there is no conflict between these uses,
since using one implies that the other is irrelevant (e.g.,
an external diff engine will decide for itself whether the
file is binary).

However, there is at least one conflicting situation: there
is no way to say "use the regular rules to determine whether
this file is binary, but if we do diff it textually, use
this funcname pattern." That is, currently setting diff=foo
indicates that the file is definitely text.

This patch introduces a "binary" config option for a diff
driver, so that one can explicitly set diff.foo.binary. We
default this value to "don't know". That is, setting a diff
attribute to "foo" and using "diff.foo.funcname" will have
no effect on the binaryness of a file. To get the current
behavior, one can set diff.foo.binary to true.

This patch also has one additional advantage: it cleans up
the interface to the userdiff code a bit. Before, calling
code had to know more about whether attributes were false,
true, or unset to determine binaryness. Now that binaryness
is a property of a driver, we can represent these situations
just by passing back a driver struct.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Bust the ghost of long-defunct diffcore-pathspec.</title>
<updated>2008-09-20T02:48:30Z</updated>
<author>
<name>Yann Dirson</name>
<email>ydirson@altern.org</email>
</author>
<published>2008-09-19T20:12:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=264e0b9a3c090930eec8dd16ecacf551dc685ac1'/>
<id>urn:sha1:264e0b9a3c090930eec8dd16ecacf551dc685ac1</id>
<content type='text'>
This concept was retired by 77882f6 (Retire diffcore-pathspec.,
2006-04-10), more than 2 years ago.

Signed-off-by: Yann Dirson &lt;ydirson@altern.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>copy vs rename detection: avoid unnecessary O(n*m) loops</title>
<updated>2007-10-27T06:18:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2007-10-25T18:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=644797119d7a3b7a043a51a9cccd8758f8451f91'/>
<id>urn:sha1:644797119d7a3b7a043a51a9cccd8758f8451f91</id>
<content type='text'>
The core rename detection had some rather stupid code to check if a
pathname was used by a later modification or rename, which basically
walked the whole pathname space for all renames for each rename, in
order to tell whether it was a pure rename (no remaining users) or
should be considered a copy (other users of the source file remaining).

That's really silly, since we can just keep a count of users around, and
replace all those complex and expensive loops with just testing that
simple counter (but this all depends on the previous commit that shared
the diff_filespec data structure by using a separate reference count).

Note that the reference count is not the same as the rename count: they
behave otherwise rather similarly, but the reference count is tied to
the allocation (and decremented at de-allocation, so that when it turns
zero we can get rid of the memory), while the rename count is tied to
the renames and is decremented when we find a rename (so that when it
turns zero we know that it was a rename, not a copy).

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Ref-count the filespecs used by diffcore</title>
<updated>2007-10-27T06:18:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2007-10-25T18:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9fb88419ba85e641006c80db53620423f37f1c93'/>
<id>urn:sha1:9fb88419ba85e641006c80db53620423f37f1c93</id>
<content type='text'>
Rather than copy the filespecs when introducing new versions of them
(for rename or copy detection), use a refcount and increment the count
when reusing the diff_filespec.

This avoids unnecessary allocations, but the real reason behind this is
a future enhancement: we will want to track shared data across the
copy/rename detection.  In order to efficiently notice when a filespec
is used by a rename, the rename machinery wants to keep track of a
rename usage count which is shared across all different users of the
filespec.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
