<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/convert.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-02-01T21:46:52Z</updated>
<entry>
<title>attr: convert git_check_attrs() callers to use the new API</title>
<updated>2017-02-01T21:46:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-28T02:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2aef63d31c338a764099e925d35fe2a9c71348a8'/>
<id>urn:sha1:2aef63d31c338a764099e925d35fe2a9c71348a8</id>
<content type='text'>
The remaining callers are all simple "I have N attributes I am
interested in.  I'll ask about them with various paths one by one".

After this step, no caller to git_check_attrs() remains.  After
removing it, we can extend "struct attr_check" struct with data
that can be used in optimizing the query for the specific N
attributes it contains.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>attr: rename function and struct related to checking attributes</title>
<updated>2017-02-01T21:46:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-28T02:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7bd18054d249d1f9aebad38d74ba6c53f8e6ecb3'/>
<id>urn:sha1:7bd18054d249d1f9aebad38d74ba6c53f8e6ecb3</id>
<content type='text'>
The traditional API to check attributes is to prepare an N-element
array of "struct git_attr_check" and pass N and the array to the
function "git_check_attr()" as arguments.

In preparation to revamp the API to pass a single structure, in
which these N elements are held, rename the type used for these
individual array elements to "struct attr_check_item" and rename
the function to "git_check_attrs()".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/renormalize-merge-kill-safer-crlf'</title>
<updated>2016-12-19T22:45:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-12-19T22:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1749053d0278f2a533f79915f03c379e5f738b39'/>
<id>urn:sha1:1749053d0278f2a533f79915f03c379e5f738b39</id>
<content type='text'>
Fix a corner case in merge-recursive regression that crept in
during 2.10 development cycle.

* jc/renormalize-merge-kill-safer-crlf:
  convert: git cherry-pick -Xrenormalize did not work
  merge-recursive: handle NULL in add_cacheinfo() correctly
  cherry-pick: demonstrate a segmentation fault
</content>
</entry>
<entry>
<title>convert: git cherry-pick -Xrenormalize did not work</title>
<updated>2016-12-01T19:27:08Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2016-11-30T17:02:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c25d2d8ed4c5154c9059918e20e75cda3bede81'/>
<id>urn:sha1:1c25d2d8ed4c5154c9059918e20e75cda3bede81</id>
<content type='text'>
Working with a repo that used to be all CRLF. At some point it
was changed to all LF, with `text=auto` in .gitattributes.
Trying to cherry-pick a commit from before the switchover fails:

    $ git cherry-pick -Xrenormalize &lt;commit&gt;
    fatal: CRLF would be replaced by LF in [path]

Commit 65237284 "unify the "auto" handling of CRLF" introduced
a regression:

Whenever crlf_action is CRLF_TEXT_XXX and not CRLF_AUTO_XXX,
SAFE_CRLF_RENORMALIZE was feed into check_safe_crlf().  This is
wrong because here everything else than SAFE_CRLF_WARN is treated as
SAFE_CRLF_FAIL.

Call check_safe_crlf() only if checksafe is SAFE_CRLF_WARN or
SAFE_CRLF_FAIL.

Reported-by: Eevee (Lexy Munroe) &lt;eevee@veekun.com&gt;
Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ls/filter-process'</title>
<updated>2016-10-31T20:15:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-31T20:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbaa6bdce22914843e956e36d41d328547514342'/>
<id>urn:sha1:dbaa6bdce22914843e956e36d41d328547514342</id>
<content type='text'>
The smudge/clean filter API expect an external process is spawned
to filter the contents for each path that has a filter defined.  A
new type of "process" filter API has been added to allow the first
request to run the filter for a path to spawn a single process, and
all filtering need is served by this single process for multiple
paths, reducing the process creation overhead.

* ls/filter-process:
  contrib/long-running-filter: add long running filter example
  convert: add filter.&lt;driver&gt;.process option
  convert: prepare filter.&lt;driver&gt;.process option
  convert: make apply_filter() adhere to standard Git error handling
  pkt-line: add functions to read/write flush terminated packet streams
  pkt-line: add packet_write_gently()
  pkt-line: add packet_flush_gently()
  pkt-line: add packet_write_fmt_gently()
  pkt-line: extract set_packet_header()
  pkt-line: rename packet_write() to packet_write_fmt()
  run-command: add clean_on_exit_handler
  run-command: move check_pipe() from write_or_die to run_command
  convert: modernize tests
  convert: quote filter names in error messages
</content>
</entry>
<entry>
<title>i18n: convert mark error messages for translation</title>
<updated>2016-10-17T21:51:45Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-10-17T13:15:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87cb7845fee4f23434da8b601583dab225dd85d6'/>
<id>urn:sha1:87cb7845fee4f23434da8b601583dab225dd85d6</id>
<content type='text'>
Mark error messages about CRLF for translation.

Update test to reflect changes.

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert: add filter.&lt;driver&gt;.process option</title>
<updated>2016-10-17T18:45:52Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2016-10-16T23:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=edcc85814c87ebd7f3b1b7d3979fac3dfb84d308'/>
<id>urn:sha1:edcc85814c87ebd7f3b1b7d3979fac3dfb84d308</id>
<content type='text'>
Git's clean/smudge mechanism invokes an external filter process for
every single blob that is affected by a filter. If Git filters a lot of
blobs then the startup time of the external filter processes can become
a significant part of the overall Git execution time.

In a preliminary performance test this developer used a clean/smudge
filter written in golang to filter 12,000 files. This process took 364s
with the existing filter mechanism and 5s with the new mechanism. See
details here: https://github.com/github/git-lfs/pull/1382

This patch adds the `filter.&lt;driver&gt;.process` string option which, if
used, keeps the external filter process running and processes all blobs
with the packet format (pkt-line) based protocol over standard input and
standard output. The full protocol is explained in detail in
`Documentation/gitattributes.txt`.

A few key decisions:

* The long running filter process is referred to as filter protocol
  version 2 because the existing single shot filter invocation is
  considered version 1.
* Git sends a welcome message and expects a response right after the
  external filter process has started. This ensures that Git will not
  hang if a version 1 filter is incorrectly used with the
  filter.&lt;driver&gt;.process option for version 2 filters. In addition,
  Git can detect this kind of error and warn the user.
* The status of a filter operation (e.g. "success" or "error) is set
  before the actual response and (if necessary!) re-set after the
  response. The advantage of this two step status response is that if
  the filter detects an error early, then the filter can communicate
  this and Git does not even need to create structures to read the
  response.
* All status responses are pkt-line lists terminated with a flush
  packet. This allows us to send other status fields with the same
  protocol in the future.

Helped-by: Martin-Louis Bright &lt;mlbright@gmail.com&gt;
Reviewed-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert: prepare filter.&lt;driver&gt;.process option</title>
<updated>2016-10-17T18:36:50Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2016-10-16T23:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=234fa07e066d6bc0728c3d9b92686c69a811e5ac'/>
<id>urn:sha1:234fa07e066d6bc0728c3d9b92686c69a811e5ac</id>
<content type='text'>
Refactor the existing 'single shot filter mechanism' and prepare the
new 'long running filter mechanism'.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert: make apply_filter() adhere to standard Git error handling</title>
<updated>2016-10-17T18:36:50Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2016-10-16T23:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b84be553548b6d493d6eff728f3e11b5b5f9a254'/>
<id>urn:sha1:b84be553548b6d493d6eff728f3e11b5b5f9a254</id>
<content type='text'>
apply_filter() returns a boolean that tells the caller if it
"did convert or did not convert". The variable `ret` was used throughout
the function to track errors whereas `1` denoted success and `0`
failure. This is unusual for the Git source where `0` denotes success.

Rename the variable and flip its value to make the function easier
readable for Git developers.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert: quote filter names in error messages</title>
<updated>2016-10-17T18:36:49Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2016-10-16T23:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=255f04d604dbb331933c2354b5d15ed6715e7d6a'/>
<id>urn:sha1:255f04d604dbb331933c2354b5d15ed6715e7d6a</id>
<content type='text'>
Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard
to read in error messages. Quote them to improve the readability.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
