<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/combine-diff.c, branch v1.8.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.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-03-14T21:43:34Z</updated>
<entry>
<title>Allow combined diff to ignore white-spaces</title>
<updated>2013-03-14T21:43:34Z</updated>
<author>
<name>Antoine Pelisse</name>
<email>apelisse@gmail.com</email>
</author>
<published>2013-03-14T21:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa04ae0be8cca1291a60bc8a393f9c52d2582089'/>
<id>urn:sha1:fa04ae0be8cca1291a60bc8a393f9c52d2582089</id>
<content type='text'>
The combined diff --cc output does not honor options to ignore
whitespace changes (-b, -w, and --ignore-space-at-eol).

Correct this by passing diff flags to diff engine, so that combined
diff behaves as normal diff does with spaces, and by coalescing
lines that are removed from both (or more) parents, honoring the
same rule to ignore whitespace changes.

With this change, a conflict-less merge done using a ignore-*
strategy option will not show any conflict if shown in combined-diff
using the same option.

Signed-off-by: Antoine Pelisse &lt;apelisse@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/diff-graph-cleanup'</title>
<updated>2013-02-14T18:29:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-02-14T18:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1d68bea891118bdaecb6dd77610e6daf2f7d53d'/>
<id>urn:sha1:a1d68bea891118bdaecb6dd77610e6daf2f7d53d</id>
<content type='text'>
Refactors a lot of repetitive code sequence from the graph drawing
code and adds it to the combined diff output.

* jk/diff-graph-cleanup:
  combine-diff.c: teach combined diffs about line prefix
  diff.c: use diff_line_prefix() where applicable
  diff: add diff_line_prefix function
  diff.c: make constant string arguments const
  diff: write prefix to the correct file
  graph: output padding for merge subsequent parents
</content>
</entry>
<entry>
<title>combine-diff.c: teach combined diffs about line prefix</title>
<updated>2013-02-12T19:42:07Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-02-07T20:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41ee2ad6cbebab0429248a14ec4e02afddd60dbe'/>
<id>urn:sha1:41ee2ad6cbebab0429248a14ec4e02afddd60dbe</id>
<content type='text'>
When running "git log --graph --cc -p" the diff output for merges is not
indented by the graph structure, unlike the diffs of non-merge commits
(added in commit 7be5761 - diff.c: Output the text graph padding before
each diff line).

Fix this by teaching the combined diff code to output diff_line_prefix()
before each line.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>combine-diff: lift 32-way limit of combined diff</title>
<updated>2013-02-03T21:08:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-02-03T21:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=776670519823b5c49ff4107dc9f77706fa37bb76'/>
<id>urn:sha1:776670519823b5c49ff4107dc9f77706fa37bb76</id>
<content type='text'>
The "raw" format of combine-diff output is supposed to have as many
colons as there are parents at the beginning, then blob modes for
these parents, and then object names for these parents.

We weren't however prepared to handle a more than 32-way merge and
did not show the correct number of colons in such a case.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-null-in-trees' into maint-1.7.11</title>
<updated>2012-09-10T22:24:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-10T22:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=03adeeaad6c039aadda074de9509f4d845739d55'/>
<id>urn:sha1:03adeeaad6c039aadda074de9509f4d845739d55</id>
<content type='text'>
"git diff" had a confusion between taking data from a path in the
working tree and taking data from an object that happens to have
name 0{40} recorded in a tree.

* jk/maint-null-in-trees:
  fsck: detect null sha1 in tree entries
  do not write null sha1s to on-disk index
  diff: do not use null sha1 as a sentinel value
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-null-in-trees'</title>
<updated>2012-08-27T18:54:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-08-27T18:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b753148b636be9dc821feebf85cd7f1739b07a1'/>
<id>urn:sha1:3b753148b636be9dc821feebf85cd7f1739b07a1</id>
<content type='text'>
We do not want a link to 0{40} object stored anywhere in our objects.

* jk/maint-null-in-trees:
  fsck: detect null sha1 in tree entries
  do not write null sha1s to on-disk index
  diff: do not use null sha1 as a sentinel value
</content>
</entry>
<entry>
<title>diff: do not use null sha1 as a sentinel value</title>
<updated>2012-07-29T22:04:32Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-07-28T15:03:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e54501004abbd20fa8d813c1e5b82c3b50bb9361'/>
<id>urn:sha1:e54501004abbd20fa8d813c1e5b82c3b50bb9361</id>
<content type='text'>
The diff code represents paths using the diff_filespec
struct. This struct has a sha1 to represent the sha1 of the
content at that path, as well as a sha1_valid member which
indicates whether its sha1 field is actually useful. If
sha1_valid is not true, then the filespec represents a
working tree file (e.g., for the no-index case, or for when
the index is not up-to-date).

The diff_filespec is only used internally, though. At the
interfaces to the diff subsystem, callers feed the sha1
directly, and we create a diff_filespec from it. It's at
that point that we look at the sha1 and decide whether it is
valid or not; callers may pass the null sha1 as a sentinel
value to indicate that it is not.

We should not typically see the null sha1 coming from any
other source (e.g., in the index itself, or from a tree).
However, a corrupt tree might have a null sha1, which would
cause "diff --patch" to accidentally diff the working tree
version of a file instead of treating it as a blob.

This patch extends the edges of the diff interface to accept
a "sha1_valid" flag whenever we accept a sha1, and to use
that flag when creating a filespec. In some cases, this
means passing the flag through several layers, making the
code change larger than would be desirable.

One alternative would be to simply die() upon seeing
corrupted trees with null sha1s. However, this fix more
directly addresses the problem (while bogus sha1s in a tree
are probably a bad thing, it is really the sentinel
confusion sending us down the wrong code path that is what
makes it devastating). And it means that git is more capable
of examining and debugging these corrupted trees. For
example, you can still "diff --raw" such a tree to find out
when the bogus entry was introduced; you just cannot do a
"--patch" diff (just as you could not with any other
corrupted tree, as we do not have any content to diff).

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 'rs/combine-diff-zero-context-at-the-beginning'</title>
<updated>2012-04-16T19:41:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-04-16T19:41:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f84e8b6069e87230bf4d13f845748c58d599c572'/>
<id>urn:sha1:f84e8b6069e87230bf4d13f845748c58d599c572</id>
<content type='text'>
Fixes an age old corner case bug in combine diff (only triggered with -U0
and the hunk at the beginning of the file needs to be shown).

By René Scharfe
* rs/combine-diff-zero-context-at-the-beginning:
  combine-diff: fix loop index underflow
</content>
</entry>
<entry>
<title>combine-diff: fix loop index underflow</title>
<updated>2012-03-26T04:35:52Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-03-24T15:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e5e9b56528294e9455d22d1abb21ad32f098a1be'/>
<id>urn:sha1:e5e9b56528294e9455d22d1abb21ad32f098a1be</id>
<content type='text'>
If both la and context are zero at the start of the loop, la wraps around
and we end up reading from memory far away.  Skip the loop in that case
instead.

Reported-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pass struct commit to diff_tree_combined_merge()</title>
<updated>2011-12-18T02:22:29Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2011-12-17T10:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82889295e76200714d76e0f7beb07b6b9e3b5a88'/>
<id>urn:sha1:82889295e76200714d76e0f7beb07b6b9e3b5a88</id>
<content type='text'>
Instead of passing the hash of a commit and then searching that
same commit in the single caller, simply pass the commit directly.

Signed-off-by: René Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
