<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ref-filter.c, branch v2.21.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.21.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.21.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2019-01-18T21:49:56Z</updated>
<entry>
<title>Merge branch 'ot/ref-filter-object-info'</title>
<updated>2019-01-18T21:49:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-18T21:49:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=55574bd04ada4dab255dad687665ee7578bc6a32'/>
<id>urn:sha1:55574bd04ada4dab255dad687665ee7578bc6a32</id>
<content type='text'>
The "--format=&lt;placeholder&gt;" option of for-each-ref, branch and tag
learned to show a few more traits of objects that can be learned by
the object_info API.

* ot/ref-filter-object-info:
  ref-filter: give uintmax_t to format with %PRIuMAX
  ref-filter: add docs for new options
  ref-filter: add tests for deltabase
  ref-filter: add deltabase option
  ref-filter: add tests for objectsize:disk
  ref-filter: add check for negative file size
  ref-filter: add objectsize:disk option
</content>
</entry>
<entry>
<title>ref-filter: give uintmax_t to format with %PRIuMAX</title>
<updated>2019-01-10T18:15:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-10T18:15:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f2ddd9e53f3202b70352d65eee60ad71581f129f'/>
<id>urn:sha1:f2ddd9e53f3202b70352d65eee60ad71581f129f</id>
<content type='text'>
As long as we are casting to a wider type, we should cast to the one
with the correct signed-ness.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/the-index'</title>
<updated>2019-01-04T21:33:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-04T21:33:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cde555480b95c4311819dc1f7a38cc856a9aed23'/>
<id>urn:sha1:cde555480b95c4311819dc1f7a38cc856a9aed23</id>
<content type='text'>
More codepaths become aware of working with in-core repository
instance other than the default "the_repository".

* nd/the-index: (22 commits)
  rebase-interactive.c: remove the_repository references
  rerere.c: remove the_repository references
  pack-*.c: remove the_repository references
  pack-check.c: remove the_repository references
  notes-cache.c: remove the_repository references
  line-log.c: remove the_repository reference
  diff-lib.c: remove the_repository references
  delta-islands.c: remove the_repository references
  cache-tree.c: remove the_repository references
  bundle.c: remove the_repository references
  branch.c: remove the_repository reference
  bisect.c: remove the_repository reference
  blame.c: remove implicit dependency the_repository
  sequencer.c: remove implicit dependency on the_repository
  sequencer.c: remove implicit dependency on the_index
  transport.c: remove implicit dependency on the_index
  notes-merge.c: remove implicit dependency the_repository
  notes-merge.c: remove implicit dependency on the_index
  list-objects.c: reduce the_repository references
  list-objects-filter.c: remove implicit dependency on the_index
  ...
</content>
</entry>
<entry>
<title>Merge branch 'nd/i18n'</title>
<updated>2019-01-04T21:33:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-04T21:33:31Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3813a89faee3ecb111aa206f68b46618ec853e4e'/>
<id>urn:sha1:3813a89faee3ecb111aa206f68b46618ec853e4e</id>
<content type='text'>
More _("i18n") markings.

* nd/i18n:
  fsck: mark strings for translation
  fsck: reduce word legos to help i18n
  parse-options.c: mark more strings for translation
  parse-options.c: turn some die() to BUG()
  parse-options: replace opterror() with optname()
  repack: mark more strings for translation
  remote.c: mark messages for translation
  remote.c: turn some error() or die() to BUG()
  reflog: mark strings for translation
  read-cache.c: add missing colon separators
  read-cache.c: mark more strings for translation
  read-cache.c: turn die("internal error") to BUG()
  attr.c: mark more string for translation
  archive.c: mark more strings for translation
  alias.c: mark split_cmdline_strerror() strings for translation
  git.c: mark more strings for translation
</content>
</entry>
<entry>
<title>ref-filter: add deltabase option</title>
<updated>2018-12-28T18:08:11Z</updated>
<author>
<name>Olga Telezhnaya</name>
<email>olyatelezhnaya@gmail.com</email>
</author>
<published>2018-12-24T13:24:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=33311fa1ade8ca955f0e56e521f7d759d30a3da0'/>
<id>urn:sha1:33311fa1ade8ca955f0e56e521f7d759d30a3da0</id>
<content type='text'>
Add new formatting option: deltabase.
If the object is stored as a delta on-disk, this expands
to the 40-hex sha1 of the delta base object.
Otherwise, expands to the null sha1 (40 zeroes).
We have same option in cat-file command.
Hopefully, in the end I will remove formatting code from
cat-file and reuse formatting parts from ref-filter.

Signed-off-by: Olga Telezhnaia &lt;olyatelezhnaya@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: add check for negative file size</title>
<updated>2018-12-28T18:07:34Z</updated>
<author>
<name>Olga Telezhnaya</name>
<email>olyatelezhnaya@gmail.com</email>
</author>
<published>2018-12-24T13:24:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5305a55348c102475c1bcb56e8fcbabe37178112'/>
<id>urn:sha1:5305a55348c102475c1bcb56e8fcbabe37178112</id>
<content type='text'>
If we have negative file size, we are doing something wrong.

Signed-off-by: Olga Telezhnaia &lt;olyatelezhnaya@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: add objectsize:disk option</title>
<updated>2018-12-28T18:07:34Z</updated>
<author>
<name>Olga Telezhnaya</name>
<email>olyatelezhnaya@gmail.com</email>
</author>
<published>2018-12-24T13:24:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1867ce6cbec9c8f23f958cb675de129fcd6471a4'/>
<id>urn:sha1:1867ce6cbec9c8f23f958cb675de129fcd6471a4</id>
<content type='text'>
Add new formatting option objectsize:disk to know
exact size that object takes up on disk.

Signed-off-by: Olga Telezhnaia &lt;olyatelezhnaya@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/print-size-t-with-uintmax-format'</title>
<updated>2018-11-19T07:24:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-19T07:24:41Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f5f0f68d61301c3ffb2f8da84f627547e8f9a94c'/>
<id>urn:sha1:f5f0f68d61301c3ffb2f8da84f627547e8f9a94c</id>
<content type='text'>
Code preparation to replace ulong vars with size_t vars where
appropriate.

* tb/print-size-t-with-uintmax-format:
  Upcast size_t variables to uintmax_t when printing
</content>
</entry>
<entry>
<title>Merge branch 'sg/ref-filter-wo-repository'</title>
<updated>2018-11-18T09:23:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-18T09:23:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7bdebaa646787b98679799ee27bfb42fb7daa8ca'/>
<id>urn:sha1:7bdebaa646787b98679799ee27bfb42fb7daa8ca</id>
<content type='text'>
"git ls-remote --sort=&lt;thing&gt;" can feed an object that is not yet
available into the comparison machinery and segfault, which has
been corrected to check such a request upfront and reject it.

* sg/ref-filter-wo-repository:
  ref-filter: don't look for objects when outside of a repository
</content>
</entry>
<entry>
<title>ref-filter: don't look for objects when outside of a repository</title>
<updated>2018-11-16T04:49:08Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-11-14T12:27:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=47bd3d0c14f081a3ea32b0720f7d59559802904d'/>
<id>urn:sha1:47bd3d0c14f081a3ea32b0720f7d59559802904d</id>
<content type='text'>
The command 'git ls-remote --sort=authordate &lt;remote&gt;' segfaults when
run outside of a repository, ever since the introduction of its
'--sort' option in 1fb20dfd8e (ls-remote: create '--sort' option,
2018-04-09).

While in general the 'git ls-remote' command can be run outside of a
repository just fine, its '--sort=&lt;key&gt;' option with certain keys does
require access to the referenced objects.  This sorting is implemented
using the generic ref-filter sorting facility, which already handles
missing objects gracefully with the appropriate 'missing object
deadbeef for HEAD' message.  However, being generic means that it
checks replace refs while trying to retrieve an object, and while
doing so it accesses the 'git_replace_ref_base' variable, which has
not been initialized and is still a NULL pointer when outside of a
repository, thus causing the segfault.

Make ref-filter more careful upfront while parsing the format string,
and make it error out when encountering a format atom requiring object
access when we are not in a repository.  Also add a test to ensure
that 'git ls-remote --sort' fails gracefully when executed outside of
a repository.

Reported-by: H.Merijn Brand &lt;h.m.brand@xs4all.nl&gt;
Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
