<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/convert.c, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-04-09T17:14:22Z</updated>
<entry>
<title>Merge branch 'jh/resize-convert-scratch-buffer'</title>
<updated>2019-04-09T17:14:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-09T17:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1828e52efcffe75707b88345f025c3ee4114864a'/>
<id>urn:sha1:1828e52efcffe75707b88345f025c3ee4114864a</id>
<content type='text'>
When the "clean" filter can reduce the size of a huge file in the
working tree down to a small "token" (a la Git LFS), there is no
point in allocating a huge scratch area upfront, but the buffer is
sized based on the original file size.  The convert mechanism now
allocates very minimum and reallocates as it receives the output
from the clean filter process.

* jh/resize-convert-scratch-buffer:
  convert: avoid malloc of original file size
</content>
</entry>
<entry>
<title>convert: avoid malloc of original file size</title>
<updated>2019-03-08T01:13:00Z</updated>
<author>
<name>Joey Hess</name>
<email>id@joeyh.name</email>
</author>
<published>2019-03-07T19:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=02156ab031e430bc45ce6984dfc712de9962dec8'/>
<id>urn:sha1:02156ab031e430bc45ce6984dfc712de9962dec8</id>
<content type='text'>
We write the output of a "clean" filter into a strbuf. Rather than
growing the strbuf dynamically as we read its output, we make the
initial allocation as large as the original input file. This is a good
guess when the filter is just tweaking a few bytes, but it's disastrous
when the point of the filter is to condense a very large file into a
short identifier (e.g., the way git-lfs and git-annex do). We may ask to
allocate many gigabytes, causing the allocation to fail and Git to
die().

Instead, let's just let strbuf do its usual growth.

When the clean filter does output something around the same size as the
worktree file, the buffer will need to be reallocated until it fits,
starting at 8192 and doubling in size. Benchmarking indicates that
reallocation is not a significant overhead for outputs up to a
few MB in size.

Signed-off-by: Joey Hess &lt;id@joeyh.name&gt;
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 'jk/unused-parameter-cleanup'</title>
<updated>2019-02-07T06:05:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-07T06:05:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2fc9d2fb02782a20d4370d7989be8b0a54f1017'/>
<id>urn:sha1:b2fc9d2fb02782a20d4370d7989be8b0a54f1017</id>
<content type='text'>
Code cleanup.

* jk/unused-parameter-cleanup:
  convert: drop path parameter from actual conversion functions
  convert: drop len parameter from conversion checks
  config: drop unused parameter from maybe_remove_section()
  show_date_relative(): drop unused "tz" parameter
  column: drop unused "opts" parameter in item_length()
  create_bundle(): drop unused "header" parameter
  apply: drop unused "def" parameter from find_name_gnu()
  match-trees: drop unused path parameter from score functions
</content>
</entry>
<entry>
<title>Merge branch 'nd/the-index-final'</title>
<updated>2019-02-07T06:05:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-07T06:05:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7589e63648bf5224e186990931b1491f36e10a4b'/>
<id>urn:sha1:7589e63648bf5224e186990931b1491f36e10a4b</id>
<content type='text'>
The assumption to work on the single "in-core index" instance has
been reduced from the library-ish part of the codebase.

* nd/the-index-final:
  cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
  read-cache.c: remove the_* from index_has_changes()
  merge-recursive.c: remove implicit dependency on the_repository
  merge-recursive.c: remove implicit dependency on the_index
  sha1-name.c: remove implicit dependency on the_index
  read-cache.c: replace update_index_if_able with repo_&amp;
  read-cache.c: kill read_index()
  checkout: avoid the_index when possible
  repository.c: replace hold_locked_index() with repo_hold_locked_index()
  notes-utils.c: remove the_repository references
  grep: use grep_opt-&gt;repo instead of explict repo argument
</content>
</entry>
<entry>
<title>convert: drop path parameter from actual conversion functions</title>
<updated>2019-01-24T20:35:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-01-24T13:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55ad152cfbf99409859fc8f7a1d602d9c47415a4'/>
<id>urn:sha1:55ad152cfbf99409859fc8f7a1d602d9c47415a4</id>
<content type='text'>
The caller is responsible for looking up the attributes,
after which point we no longer care about the path at which
the content is found.

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>convert: drop len parameter from conversion checks</title>
<updated>2019-01-24T20:35:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-01-24T13:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=129beeee9a6ad95153bc4ebce0cfb447e1451522'/>
<id>urn:sha1:129beeee9a6ad95153bc4ebce0cfb447e1451522</id>
<content type='text'>
We've already extracted the useful information into our text_stat
struct, so the length is no longer needed.

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>cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch</title>
<updated>2019-01-24T19:55:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-01-24T08:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f8adbec9feaa7a1ab9814db1115826e87033712e'/>
<id>urn:sha1:f8adbec9feaa7a1ab9814db1115826e87033712e</id>
<content type='text'>
By default, index compat macros are off from now on, because they
could hide the_index dependency.

Only those in builtin can use it.

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>Merge branch 'nd/style-opening-brace'</title>
<updated>2019-01-18T21:49:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-18T21:49:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3434569fc206c2f4bc434571d202f2961aa905e5'/>
<id>urn:sha1:3434569fc206c2f4bc434571d202f2961aa905e5</id>
<content type='text'>
Code clean-up.

* nd/style-opening-brace:
  style: the opening '{' of a function is in a separate line
</content>
</entry>
<entry>
<title>style: the opening '{' of a function is in a separate line</title>
<updated>2018-12-10T06:41:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-12-09T10:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b3357626edc841a51d8885ddf6986bab5b6f778'/>
<id>urn:sha1:3b3357626edc841a51d8885ddf6986bab5b6f778</id>
<content type='text'>
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>Indent code with TABs</title>
<updated>2018-12-09T03:37:32Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-12-06T15:42:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec36c42a6301eca8a1a038001435bc8a7940e886'/>
<id>urn:sha1:ec36c42a6301eca8a1a038001435bc8a7940e886</id>
<content type='text'>
We indent with TABs and sometimes for fine alignment, TABs followed by
spaces, but never all spaces (unless the indentation is less than 8
columns). Indenting with spaces slips through in some places. Fix
them.

Imported code and compat/ are left alone on purpose. The former should
remain as close as upstream as possible. The latter pretty much has
separate maintainers, it's up to them to decide.

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>
</feed>
