<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/pack-objects.c, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-08-19T23:14:52Z</updated>
<entry>
<title>Merge branch 'jc/object-names-are-not-sha-1'</title>
<updated>2020-08-19T23:14:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-19T23:14:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a978f827388a4645a405a2ea9c203a7940f0281'/>
<id>urn:sha1:2a978f827388a4645a405a2ea9c203a7940f0281</id>
<content type='text'>
A few end-user facing messages have been updated to be
hash-algorithm agnostic.

* jc/object-names-are-not-sha-1:
  messages: avoid SHA-1 in end-user facing messages
</content>
</entry>
<entry>
<title>messages: avoid SHA-1 in end-user facing messages</title>
<updated>2020-08-14T16:33:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-14T01:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4279000d3e11a374a0a28d8284ca2774bd842c75'/>
<id>urn:sha1:4279000d3e11a374a0a28d8284ca2774bd842c75</id>
<content type='text'>
There are still a handful mentions of SHA-1 when we meant the
(hexadecimal) object names in end-user facing messages.  Rewrite
them.

I was hoping that this can mostly be s/SHA-1/object name/, but
a few messages needed rephrasing to keep the result readable.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/has_object'</title>
<updated>2020-08-13T21:13:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-13T21:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1a8a8979d61a889b915dca36aea9c2a88d0f3f7'/>
<id>urn:sha1:d1a8a8979d61a889b915dca36aea9c2a88d0f3f7</id>
<content type='text'>
A new helper function has_object() has been introduced to make it
easier to mark object existence checks that do and don't want to
trigger lazy fetches, and a few such checks are converted using it.

* jt/has_object:
  fsck: do not lazy fetch known non-promisor object
  pack-objects: no fetch when allow-{any,promisor}
  apply: do not lazy fetch when applying binary
  sha1-file: introduce no-lazy-fetch has_object()
</content>
</entry>
<entry>
<title>Merge branch 'jk/strvec'</title>
<updated>2020-08-10T17:23:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-10T17:23:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46b225f15308c8f77379f864189bed95c273d29f'/>
<id>urn:sha1:46b225f15308c8f77379f864189bed95c273d29f</id>
<content type='text'>
The argv_array API is useful for not just managing argv but any
"vector" (NULL-terminated array) of strings, and has seen adoption
to a certain degree.  It has been renamed to "strvec" to reduce the
barrier to adoption.

* jk/strvec:
  strvec: rename struct fields
  strvec: drop argv_array compatibility layer
  strvec: update documention to avoid argv_array
  strvec: fix indentation in renamed calls
  strvec: convert remaining callers away from argv_array name
  strvec: convert more callers away from argv_array name
  strvec: convert builtin/ callers away from argv_array name
  quote: rename sq_dequote_to_argv_array to mention strvec
  strvec: rename files from argv-array to strvec
  argv-array: rename to strvec
  argv-array: use size_t for count and alloc
</content>
</entry>
<entry>
<title>pack-objects: no fetch when allow-{any,promisor}</title>
<updated>2020-08-06T20:01:03Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-08-05T23:06:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee47243d7636d3d54b727ad24027a9167b68ebb1'/>
<id>urn:sha1:ee47243d7636d3d54b727ad24027a9167b68ebb1</id>
<content type='text'>
The options --missing=allow-{any,promisor} were introduced in caf3827e2f
("rev-list: add list-objects filtering support", 2017-11-22) with the
following note in the commit message:

    This patch introduces handling of missing objects to help
    debugging and development of the "partial clone" mechanism,
    and once the mechanism is implemented, for a power user to
    perform operations that are missing-object aware without
    incurring the cost of checking if a missing link is expected.

The idea that these options are missing-object aware (and thus do not
need to lazily fetch objects, unlike unaware commands that assume that
all objects are present) are assumed in later commits such as 07ef3c6604
("fetch test: use more robust test for filtered objects", 2020-01-15).

However, the current implementations of these options use
has_object_file(), which indeed lazily fetches missing objects. Teach
these implementations not to do so. Also, update the documentation of
these options to be clearer.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strvec: rename struct fields</title>
<updated>2020-07-31T02:18:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-29T00:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d70a9eb611a9d242c1d26847d223b8677609305b'/>
<id>urn:sha1:d70a9eb611a9d242c1d26847d223b8677609305b</id>
<content type='text'>
The "argc" and "argv" names made sense when the struct was argv_array,
but now they're just confusing. Let's rename them to "nr" (which we use
for counts elsewhere) and "v" (which is rather terse, but reads well
when combined with typical variable names like "args.v").

Note that we have to update all of the callers immediately. Playing
tricks with the preprocessor is hard here, because we wouldn't want to
rewrite unrelated tokens.

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>strvec: convert builtin/ callers away from argv_array name</title>
<updated>2020-07-28T22:02:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22f9b7f3f59549735a480042a4b9ce292eedfae0'/>
<id>urn:sha1:22f9b7f3f59549735a480042a4b9ce292eedfae0</id>
<content type='text'>
We eventually want to drop the argv_array name and just use strvec
consistently. There's no particular reason we have to do it all at once,
or care about interactions between converted and unconverted bits.
Because of our preprocessor compat layer, the names are interchangeable
to the compiler (so even a definition and declaration using different
names is OK).

This patch converts all of the files in builtin/ to keep the diff to a
manageable size.

The conversion was done purely mechanically with:

  git ls-files '*.c' '*.h' |
  xargs perl -i -pe '
    s/ARGV_ARRAY/STRVEC/g;
    s/argv_array/strvec/g;
  '

and then selectively staging files with "git add builtin/". We'll deal
with any indentation/style fallouts separately.

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>strvec: rename files from argv-array to strvec</title>
<updated>2020-07-28T22:02:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:23:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbbcd44fb47347a3fdbee88ea21805b7f4ac0b98'/>
<id>urn:sha1:dbbcd44fb47347a3fdbee88ea21805b7f4ac0b98</id>
<content type='text'>
This requires updating #include lines across the code-base, but that's
all fairly mechanical, and was done with:

  git ls-files '*.c' '*.h' |
  xargs perl -i -pe 's/argv-array.h/strvec.h/'

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>pack-objects: prefetch objects to be packed</title>
<updated>2020-07-21T21:29:42Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-07-21T00:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e00549aa9b19cc85c8bf3c3efd0a466aaf5e08f3'/>
<id>urn:sha1:e00549aa9b19cc85c8bf3c3efd0a466aaf5e08f3</id>
<content type='text'>
When an object to be packed is noticed to be missing, prefetch all
to-be-packed objects in one batch.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-objects: refactor to oid_object_info_extended</title>
<updated>2020-07-21T21:29:42Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-07-21T00:21:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d5cf957352badca4575cc85c020d6cf73db86f7'/>
<id>urn:sha1:8d5cf957352badca4575cc85c020d6cf73db86f7</id>
<content type='text'>
Use oid_object_info_extended() instead of oid_object_info() because a
subsequent commit needs to specify an additional flag here.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
