<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-break.c, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2020-04-07T23:09:29Z</updated>
<entry>
<title>diff: restrict when prefetching occurs</title>
<updated>2020-04-07T23:09:29Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-04-07T22:11:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=95acf11a3dc3d18ec999f4913ec6c6a54545c6b7'/>
<id>urn:sha1:95acf11a3dc3d18ec999f4913ec6c6a54545c6b7</id>
<content type='text'>
Commit 7fbbcb21b1 ("diff: batch fetching of missing blobs", 2019-04-08)
optimized "diff" by prefetching blobs in a partial clone, but there are
some cases wherein blobs do not need to be prefetched. In these cases,
any command that uses the diff machinery will unnecessarily fetch blobs.

diffcore_std() may read blobs when it calls the following functions:
 (1) diffcore_skip_stat_unmatch() (controlled by the config variable
     diff.autorefreshindex)
 (2) diffcore_break() and diffcore_merge_broken() (for break-rewrite
     detection)
 (3) diffcore_rename() (for rename detection)
 (4) diffcore_pickaxe() (for detecting addition/deletion of specified
     string)

Instead of always prefetching blobs, teach diffcore_skip_stat_unmatch(),
diffcore_break(), and diffcore_rename() to prefetch blobs upon the first
read of a missing object. This covers (1), (2), and (3): to cover the
rest, teach diffcore_std() to prefetch if the output type is one that
includes blob data (and hence blob data will be required later anyway),
or if it knows that (4) will be run.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: make diff_populate_filespec_options struct</title>
<updated>2020-04-07T23:09:29Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-04-07T22:11:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1c37e86ab2834dfca311799e799568794bc474ce'/>
<id>urn:sha1:1c37e86ab2834dfca311799e799568794bc474ce</id>
<content type='text'>
The behavior of diff_populate_filespec() currently can be customized
through a bitflag, but a subsequent patch requires it to support a
non-boolean option. Replace the bitflag with an options struct.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-break: use a goto instead of a redundant if statement</title>
<updated>2019-10-02T06:04:21Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2019-10-01T02:29:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=baed6bbb5b56a501d1137e53caba614f77c3435d'/>
<id>urn:sha1:baed6bbb5b56a501d1137e53caba614f77c3435d</id>
<content type='text'>
The condition "if (q-&gt;nr &lt;= j)" checks whether the loop exited normally
or via a break statement. Avoid this check by replacing the jump out of
the inner loop with a jump to the end of the outer loop, which makes it
obvious that diff_q is not executed when the peer survives.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/the-index'</title>
<updated>2018-10-19T04:34:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-19T04:34:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=11877b9ebec87175a9cc55676311ef2d98585cca'/>
<id>urn:sha1:11877b9ebec87175a9cc55676311ef2d98585cca</id>
<content type='text'>
Various codepaths in the core-ish part learn to work on an
arbitrary in-core index structure, not necessarily the default
instance "the_index".

* nd/the-index: (23 commits)
  revision.c: reduce implicit dependency the_repository
  revision.c: remove implicit dependency on the_index
  ws.c: remove implicit dependency on the_index
  tree-diff.c: remove implicit dependency on the_index
  submodule.c: remove implicit dependency on the_index
  line-range.c: remove implicit dependency on the_index
  userdiff.c: remove implicit dependency on the_index
  rerere.c: remove implicit dependency on the_index
  sha1-file.c: remove implicit dependency on the_index
  patch-ids.c: remove implicit dependency on the_index
  merge.c: remove implicit dependency on the_index
  merge-blobs.c: remove implicit dependency on the_index
  ll-merge.c: remove implicit dependency on the_index
  diff-lib.c: remove implicit dependency on the_index
  read-cache.c: remove implicit dependency on the_index
  diff.c: remove implicit dependency on the_index
  grep.c: remove implicit dependency on the_index
  diff.c: remove the_index dependency in textconv() functions
  blame.c: rename "repo" argument to "r"
  combine-diff.c: remove implicit dependency on the_index
  ...
</content>
</entry>
<entry>
<title>diff.c: reduce implicit dependency on the_index</title>
<updated>2018-09-21T16:48:10Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-09-21T15:57:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5'/>
<id>urn:sha1:b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5</id>
<content type='text'>
diff and textconv code has so widespread use that it's hard to simply
update their api and all call sites at once because it would result in
a big patch. For now reduce the_index references to two places:
diff_setup() and fill_textconv().

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert "oidcmp() == 0" to oideq()</title>
<updated>2018-08-29T18:32:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-08-28T21:22:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4a7e27e95797c0a094f8ee300a260777ddd7eec9'/>
<id>urn:sha1:4a7e27e95797c0a094f8ee300a260777ddd7eec9</id>
<content type='text'>
Using the more restrictive oideq() should, in the long run,
give the compiler more opportunities to optimize these
callsites. For now, this conversion should be a complete
noop with respect to the generated code.

The result is also perhaps a little more readable, as it
avoids the "zero is equal" idiom. Since it's so prevalent in
C, I think seasoned programmers tend not to even notice it
anymore, but it can sometimes make for awkward double
negations (e.g., we can drop a few !!oidcmp() instances
here).

This patch was generated almost entirely by the included
coccinelle patch. This mechanical conversion should be
completely safe, because we check explicitly for cases where
oidcmp() is compared to 0, which is what oideq() is doing
under the hood. Note that we don't have to catch "!oidcmp()"
separately; coccinelle's standard isomorphisms make sure the
two are treated equivalently.

I say "almost" because I did hand-edit the coccinelle output
to fix up a few style violations (it mostly keeps the
original formatting, but sometimes unwraps long lines).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tk/diffcore-delta-remove-unused'</title>
<updated>2016-11-17T21:45:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-11-17T21:45:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6d40812e4b5d2128665351f4b427c7da7c7d86d5'/>
<id>urn:sha1:6d40812e4b5d2128665351f4b427c7da7c7d86d5</id>
<content type='text'>
Code cleanup.

* tk/diffcore-delta-remove-unused:
  diffcore-delta: remove unused parameter to diffcore_count_changes()
</content>
</entry>
<entry>
<title>diffcore-delta: remove unused parameter to diffcore_count_changes()</title>
<updated>2016-11-14T17:24:04Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2016-11-14T13:39:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=974e0044d65dc22e8137e93b8ea13aec23d3a5a3'/>
<id>urn:sha1:974e0044d65dc22e8137e93b8ea13aec23d3a5a3</id>
<content type='text'>
The delta_limit parameter to diffcore_count_changes() has been unused
since commit ba23bbc8e ("diffcore-delta: make change counter to byte
oriented again.", 2006-03-04).

Remove the parameter and adjust all callers.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: rename struct diff_filespec's sha1_valid member</title>
<updated>2016-06-28T18:39:02Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2016-06-24T23:09:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=41c9560ee5f9fc4bd3c6580272bd292083a9fe18'/>
<id>urn:sha1:41c9560ee5f9fc4bd3c6580272bd292083a9fe18</id>
<content type='text'>
Now that this struct's sha1 member is called "oid", update the comment
and the sha1_valid member to be called "oid_valid" instead.  The
following Coccinelle semantic patch was used to implement this, followed
by the transformations in object_id.cocci:

@@
struct diff_filespec o;
@@
- o.sha1_valid
+ o.oid_valid

@@
struct diff_filespec *p;
@@
- p-&gt;sha1_valid
+ p-&gt;oid_valid

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: convert struct diff_filespec to struct object_id</title>
<updated>2016-06-28T18:39:02Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2016-06-24T23:09:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a0d12c4433e25e87b67df78b45635df8a098fb23'/>
<id>urn:sha1:a0d12c4433e25e87b67df78b45635df8a098fb23</id>
<content type='text'>
Convert struct diff_filespec's sha1 member to use a struct object_id
called "oid" instead.  The following Coccinelle semantic patch was used
to implement this, followed by the transformations in object_id.cocci:

@@
struct diff_filespec o;
@@
- o.sha1
+ o.oid.hash

@@
struct diff_filespec *p;
@@
- p-&gt;sha1
+ p-&gt;oid.hash

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
