<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/convert.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-12-05T22:13:21Z</updated>
<entry>
<title>replace {pre,suf}fixcmp() with {starts,ends}_with()</title>
<updated>2013-12-05T22:13:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2013-11-30T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59556548230e617b837343c2c07e357e688e2ca4'/>
<id>urn:sha1:59556548230e617b837343c2c07e357e688e2ca4</id>
<content type='text'>
Leaving only the function definitions and declarations so that any
new topic in flight can still make use of the old functions, replace
existing uses of the prefixcmp() and suffixcmp() with new API
functions.

The change can be recreated by mechanically applying this:

    $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
      grep -v strbuf\\.c |
      xargs perl -pi -e '
        s|!prefixcmp\(|starts_with\(|g;
        s|prefixcmp\(|!starts_with\(|g;
        s|!suffixcmp\(|ends_with\(|g;
        s|suffixcmp\(|!ends_with\(|g;
      '

on the result of preparatory changes in this series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>typofix: in-code comments</title>
<updated>2013-07-22T23:06:49Z</updated>
<author>
<name>Ondřej Bílka</name>
<email>neleai@seznam.cz</email>
</author>
<published>2013-07-22T21:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=749f763dbbe4dbcc4082f02bf98bfc1a09427c6f'/>
<id>urn:sha1:749f763dbbe4dbcc4082f02bf98bfc1a09427c6f</id>
<content type='text'>
Signed-off-by: Ondřej Bílka &lt;neleai@seznam.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'lf/read-blob-data-from-index'</title>
<updated>2013-04-22T01:39:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-22T01:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b35b007a6bd8b76bd37589fa397c12265935029'/>
<id>urn:sha1:4b35b007a6bd8b76bd37589fa397c12265935029</id>
<content type='text'>
Reduce duplicated code between convert.c and attr.c.

* lf/read-blob-data-from-index:
  convert.c: remove duplicate code
  read_blob_data_from_index(): optionally return the size of blob data
  attr.c: extract read_index_data() as read_blob_data_from_index()
</content>
</entry>
<entry>
<title>convert.c: remove duplicate code</title>
<updated>2013-04-17T16:52:33Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>git@cryptocrack.de</email>
</author>
<published>2013-04-13T13:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4982fd78f61db69504f91151f94fce9914d610b6'/>
<id>urn:sha1:4982fd78f61db69504f91151f94fce9914d610b6</id>
<content type='text'>
The has_cr_in_index() function is an almost 1:1 copy of
read_blob_data_from_index() with some additions.  Use the
latter instead of using copy-pasted code.

Signed-off-by: Lukas Fleischer &lt;git@cryptocrack.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert some config callbacks to parse_config_key</title>
<updated>2013-01-23T16:41:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-01-23T06:24:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d731f0ade129a71237eff5a17f3196002cb439fb'/>
<id>urn:sha1:d731f0ade129a71237eff5a17f3196002cb439fb</id>
<content type='text'>
These callers can drop some inline pointer arithmetic and
magic offset constants, making them more readable and less
error-prone (those constants had to match the lengths of
strings, but there is no automatic verification of that
fact).

The "ep" pointer (presumably for "end pointer"), which
points to the final key segment of the config variable, is
given the more standard name "key" to describe its function
rather than its derivation.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jb/required-filter'</title>
<updated>2012-02-28T21:25:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-02-28T21:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=524ee675a36961c5b59302e84ffd08808f4f787e'/>
<id>urn:sha1:524ee675a36961c5b59302e84ffd08808f4f787e</id>
<content type='text'>
* jb/required-filter:
  Add a setting to require a filter to be successful

Conflicts:
	convert.c
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-avoid-streaming-filtered-contents'</title>
<updated>2012-02-27T07:05:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-02-27T07:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31e3d834b39b773831c3c3e2637f2d99bfad9cbf'/>
<id>urn:sha1:31e3d834b39b773831c3c3e2637f2d99bfad9cbf</id>
<content type='text'>
* jk/maint-avoid-streaming-filtered-contents:
  do not stream large files to pack when filters are in use
  teach dry-run convert_to_git not to require a src buffer
  teach convert_to_git a "dry run" mode
</content>
</entry>
<entry>
<title>teach dry-run convert_to_git not to require a src buffer</title>
<updated>2012-02-24T22:12:19Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-02-24T22:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4c3b57b98bccfdb740b8f1d0ca574dd51deacfad'/>
<id>urn:sha1:4c3b57b98bccfdb740b8f1d0ca574dd51deacfad</id>
<content type='text'>
When we call convert_to_git in dry-run mode, it may still
want to look at the source buffer, because some CRLF
conversion modes depend on analyzing the source to determine
whether it is in fact convertible CRLF text.

However, the main motivation for convert_to_git's dry-run
mode is that we would decide which method to use to acquire
the blob's data (streaming versus in-core). Requiring this
source analysis creates a chicken-and-egg problem. We are
better off simply guessing that anything we can't analyze
will end up needing conversion.

This patch lets a caller specify a NULL src buffer when
using dry-run mode (and only dry-run mode). A non-zero
return value goes from "we would convert" to "we might
convert"; a zero return value remains "we would definitely
not convert".

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>teach convert_to_git a "dry run" mode</title>
<updated>2012-02-24T22:11:27Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-02-24T22:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92ac3197e4859ba8c19e3e7f7b8cf5dc38e4669d'/>
<id>urn:sha1:92ac3197e4859ba8c19e3e7f7b8cf5dc38e4669d</id>
<content type='text'>
Some callers may want to know whether convert_to_git will
actually do anything before performing the conversion
itself (e.g., to decide whether to stream or handle blobs
in-core). This patch lets callers specify the dry run mode
by passing a NULL destination buffer. The return value,
instead of indicating whether conversion happened, will
indicate whether conversion would occur.

For readability, we also include a wrapper function which
makes it more obvious we are not actually performing the
conversion.

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>Ignore SIGPIPE when running a filter driver</title>
<updated>2012-02-21T20:48:09Z</updated>
<author>
<name>Jehan Bing</name>
<email>jehan@orb.com</email>
</author>
<published>2012-02-20T20:53:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6424c2ad12cf6c3feb533fab9c4dded7514d0f4c'/>
<id>urn:sha1:6424c2ad12cf6c3feb533fab9c4dded7514d0f4c</id>
<content type='text'>
If a filter is not defined or if it fails, git should behave as if the
filter is a no-op passthru.

However, if the filter exits before reading all the content, depending on
the timing, git could be killed with SIGPIPE when it tries to write to the
pipe connected to the filter.

Ignore SIGPIPE while processing the filter to give us a chance to check
the return value from a failed write, in order to detect and act on this
mode of failure in a more controlled way.

Signed-off-by: Jehan Bing &lt;jehan@orb.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
