<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff.c, branch v1.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.6.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.6.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2009-02-14T02:19:37Z</updated>
<entry>
<title>Remove redundant bit clears from diff_setup()</title>
<updated>2009-02-14T02:19:37Z</updated>
<author>
<name>Keith Cascio</name>
<email>keith@cs.ucla.edu</email>
</author>
<published>2009-02-13T17:33:34Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4b15b4ab5f9b19caff6d4a910ecc3e1d4f0e13f0'/>
<id>urn:sha1:4b15b4ab5f9b19caff6d4a910ecc3e1d4f0e13f0</id>
<content type='text'>
All bits already clear after memset(0).

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Bugfix: GIT_EXTERNAL_DIFF with more than one changed files</title>
<updated>2009-02-12T20:31:52Z</updated>
<author>
<name>Nazri Ramliy</name>
<email>ayiehere@gmail.com</email>
</author>
<published>2009-02-12T13:36:14Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a8344abe0f70f9fc629ee055d73ffa65fbc58311'/>
<id>urn:sha1:a8344abe0f70f9fc629ee055d73ffa65fbc58311</id>
<content type='text'>
When there is more than one file that are changed, running git diff with
GIT_EXTERNAL_DIFF incorrectly diagnoses an programming error and dies.
The check introduced in 479b0ae (diff: refactor tempfile cleanup handling,
2009-01-22) to detect a temporary file slot that forgot to remove its
temporary file was inconsistent with the way the codepath to remove the
temporary to mark the slot that it is done with it.

This patch fixes this problem and adds a test case for it.

Signed-off-by: Nazri Ramliy &lt;ayiehere@gmail.com&gt;
Acked-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 'jc/maint-split-diff-metainfo'</title>
<updated>2009-02-01T02:07:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-01T02:07:42Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=bdf6442b482e488fd34b2d749316312e0ee25a5b'/>
<id>urn:sha1:bdf6442b482e488fd34b2d749316312e0ee25a5b</id>
<content type='text'>
* jc/maint-split-diff-metainfo:
  diff.c: output correct index lines for a split diff
</content>
</entry>
<entry>
<title>Merge branch 'jk/signal-cleanup'</title>
<updated>2009-02-01T01:43:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-01T01:43:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=fa5bc8abb35e34f673c41cb5c66d0a2f21536861'/>
<id>urn:sha1:fa5bc8abb35e34f673c41cb5c66d0a2f21536861</id>
<content type='text'>
* jk/signal-cleanup:
  t0005: use SIGTERM for sigchain test
  pager: do wait_for_pager on signal death
  refactor signal handling for cleanup functions
  chain kill signals for cleanup functions
  diff: refactor tempfile cleanup handling
  Windows: Fix signal numbers
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into jc/maint-split-diff-metainfo</title>
<updated>2009-01-27T09:08:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-01-27T09:08:02Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=90b23e5f21e101f14da60375e4bda265a677e209'/>
<id>urn:sha1:90b23e5f21e101f14da60375e4bda265a677e209</id>
<content type='text'>
This is an evil merge, as a test added since 1.6.0 expects an incorrect
behaviour the merged commit fixes.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff.c: output correct index lines for a split diff</title>
<updated>2009-01-27T08:48:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-01-26T08:08:24Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b67b9612e1a90ae093445abeaeff930e9f4cf936'/>
<id>urn:sha1:b67b9612e1a90ae093445abeaeff930e9f4cf936</id>
<content type='text'>
A patch that changes the filetype (e.g. regular file to symlink) of a path
must be split into a deletion event followed by a creation event, which
means that we need to have two independent metainfo lines for each.
However, the code reused the single set of metainfo lines.

As the blob object names recorded on the index lines are usually not used
nor validated on the receiving end, this is not an issue with normal use
of the resulting patch.  However, when accepting a binary patch to delete
a blob, git-apply verified that the postimage blob object name on the
index line is 0{40}, hence a patch that deletes a regular file blob that
records binary contents to create a blob with different filetype (e.g. a
symbolic link) failed to apply.  "git am -3" also uses the blob object
names recorded on the index line, so it would also misbehave when
synthesizing a preimage tree.

This moves the code to generate metainfo lines around, so that two
independent sets of metainfo lines are used for the split halves.

Additional tests by Jeff King.

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 'js/diff-color-words'</title>
<updated>2009-01-26T01:13:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-01-26T01:13:29Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9847a524321afbfa6dbb08bfd9b6a0746f965578'/>
<id>urn:sha1:9847a524321afbfa6dbb08bfd9b6a0746f965578</id>
<content type='text'>
* js/diff-color-words:
  Change the spelling of "wordregex".
  color-words: Support diff.wordregex config option
  color-words: make regex configurable via attributes
  color-words: expand docs with precise semantics
  color-words: enable REG_NEWLINE to help user
  color-words: take an optional regular expression describing words
  color-words: change algorithm to allow for 0-character word boundaries
  color-words: refactor word splitting and use ALLOC_GROW()
  Add color_fwrite_lines(), a function coloring each line individually
</content>
</entry>
<entry>
<title>Merge branch 'js/patience-diff'</title>
<updated>2009-01-24T05:51:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-01-24T05:51:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5dc1308562ab5991ecada68b06707709bea408c9'/>
<id>urn:sha1:5dc1308562ab5991ecada68b06707709bea408c9</id>
<content type='text'>
* js/patience-diff:
  bash completions: Add the --patience option
  Introduce the diff option '--patience'
  Implement the patience diff algorithm

Conflicts:
	contrib/completion/git-completion.bash
</content>
</entry>
<entry>
<title>refactor signal handling for cleanup functions</title>
<updated>2009-01-22T06:46:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-01-22T06:03:08Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=57b235a4bc8884a57c6f863605a54b7bfceb0997'/>
<id>urn:sha1:57b235a4bc8884a57c6f863605a54b7bfceb0997</id>
<content type='text'>
The current code is very inconsistent about which signals
are caught for doing cleanup of temporary files and lock
files. Some callsites checked only SIGINT, while others
checked a variety of death-dealing signals.

This patch factors out those signals to a single function,
and then calls it everywhere. For some sites, that means
this is a simple clean up. For others, it is an improvement
in that they will now properly clean themselves up after a
larger variety of signals.

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>chain kill signals for cleanup functions</title>
<updated>2009-01-22T06:46:52Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-01-22T06:02:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4a16d072723b48699ea162da24eff05eba298834'/>
<id>urn:sha1:4a16d072723b48699ea162da24eff05eba298834</id>
<content type='text'>
If a piece of code wanted to do some cleanup before exiting
(e.g., cleaning up a lockfile or a tempfile), our usual
strategy was to install a signal handler that did something
like this:

  do_cleanup(); /* actual work */
  signal(signo, SIG_DFL); /* restore previous behavior */
  raise(signo); /* deliver signal, killing ourselves */

For a single handler, this works fine. However, if we want
to clean up two _different_ things, we run into a problem.
The most recently installed handler will run, but when it
removes itself as a handler, it doesn't put back the first
handler.

This patch introduces sigchain, a tiny library for handling
a stack of signal handlers. You sigchain_push each handler,
and use sigchain_pop to restore whoever was before you in
the stack.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
