<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/count-objects.c, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-08-23T22:12:06Z</updated>
<entry>
<title>pack: move open_pack_index(), parse_pack_index()</title>
<updated>2017-08-23T22:12:06Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2017-08-18T22:20:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0317f45576a0b48c90c4b023fa572a000633946c'/>
<id>urn:sha1:0317f45576a0b48c90c4b023fa572a000633946c</id>
<content type='text'>
alloc_packed_git() in packfile.c is duplicated from sha1_file.c. In a
subsequent commit, alloc_packed_git() will be removed from sha1_file.c.

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>config: don't include config.h by default</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2141fc1d20e659810245ec6ca1c143c60e033ec'/>
<id>urn:sha1:b2141fc1d20e659810245ec6ca1c143c60e033ec</id>
<content type='text'>
Stop including config.h by default in cache.h.  Instead only include
config.h in those files which require use of the config system.

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>Convert object iteration callbacks to struct object_id</title>
<updated>2017-02-22T18:12:15Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-02-21T23:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=76c1d9a09624ae39fa9e3140f6581e672b9c040a'/>
<id>urn:sha1:76c1d9a09624ae39fa9e3140f6581e672b9c040a</id>
<content type='text'>
Convert each_loose_object_fn and each_packed_object_fn to take a pointer
to struct object_id.  Update the various callbacks.  Convert several
40-based constants to use GIT_SHA1_HEXSZ.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>alternates: use fspathcmp to detect duplicates</title>
<updated>2016-10-10T20:52:37Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-03T20:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea0fc3b4176a424a2b20eb76a6a503dc4d59cebb'/>
<id>urn:sha1:ea0fc3b4176a424a2b20eb76a6a503dc4d59cebb</id>
<content type='text'>
On a case-insensitive filesystem, we should realize that
"a/objects" and "A/objects" are the same path. We already
use fspathcmp() to check against the main object directory,
but until recently we couldn't use it for comparing against
other alternates (because their paths were not
NUL-terminated strings). But now we can, so let's do so.

Note that we also need to adjust count-objects to load the
config, so that it can see the setting of core.ignorecase
(this is required by the test, but is also a general bugfix
for users of count-objects).

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>count-objects: report alternates via verbose mode</title>
<updated>2016-10-10T20:52:37Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-03T20:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5fe849d651e259af58f29f9cfb1b1405154ffacc'/>
<id>urn:sha1:5fe849d651e259af58f29f9cfb1b1405154ffacc</id>
<content type='text'>
There's no way to get the list of alternates that git
computes internally; our tests only infer it based on which
objects are available. In addition to testing, knowing this
list may be helpful for somebody debugging their alternates
setup.

Let's add it to the "count-objects -v" output. We could give
it a separate flag, but there's not really any need.
"count-objects -v" is already a debugging catch-all for the
object database, its output is easily extensible to new data
items, and printing the alternates is not expensive (we
already had to find them to count the objects).

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>prepare_packed_git(): refactor garbage reporting in pack directory</title>
<updated>2015-08-17T16:14:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-13T18:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a489b0680b841d3e7714be53b263ff190c39193'/>
<id>urn:sha1:0a489b0680b841d3e7714be53b263ff190c39193</id>
<content type='text'>
The hook to report "garbage" files in $GIT_OBJECT_DIRECTORY/pack/
could be generic but is too specific to count-object's needs.

Move the part to produce human-readable messages to count-objects,
and refine the interface to callback with the "bits" with values
defined in the cache.h header file, so that other callers (e.g.
prune) can later use the same mechanism to enumerate different
kinds of garbage files and do something intelligent about them,
other than reporting in textual messages.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>count-objects: report unused files in $GIT_DIR/worktrees/...</title>
<updated>2014-12-01T19:00:18Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-11-30T08:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77a6d84045c8b558d1e08ff2ffe70347b19be6ef'/>
<id>urn:sha1:77a6d84045c8b558d1e08ff2ffe70347b19be6ef</id>
<content type='text'>
In linked checkouts, borrowed parts like config is taken from
$GIT_COMMON_DIR. $GIT_DIR/config is never used. Report them as
garbage.

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>count-objects: use for_each_loose_file_in_objdir</title>
<updated>2014-10-16T17:10:41Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-15T22:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4a1e693a30c816fa5293c5f9e83e1e98ee87584e'/>
<id>urn:sha1:4a1e693a30c816fa5293c5f9e83e1e98ee87584e</id>
<content type='text'>
This drops our line count considerably, and should make
things more readable by keeping the counting logic separate
from the traversal.

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>count-objects: do not use xsize_t when counting object size</title>
<updated>2014-10-16T17:10:41Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-15T22:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cac05d4dfd148071462939a61ecd44cf932a0b02'/>
<id>urn:sha1:cac05d4dfd148071462939a61ecd44cf932a0b02</id>
<content type='text'>
The point of xsize_t is to safely cast an off_t into a size_t
(because we are about to mmap). But in count-objects, we are
summing the sizes in an off_t. Using xsize_t means that
count-objects could fail on a 32-bit system with a 4G
object (not likely, as other parts of git would fail, but
we should at least be correct here).

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>count-objects: add -H option to humanize sizes</title>
<updated>2013-04-10T20:27:26Z</updated>
<author>
<name>Antoine Pelisse</name>
<email>apelisse@gmail.com</email>
</author>
<published>2013-04-10T19:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1918225d2fce49c830b41b8c7907229638ae2825'/>
<id>urn:sha1:1918225d2fce49c830b41b8c7907229638ae2825</id>
<content type='text'>
Use the new humanize() function to print loose objects size, pack size,
and garbage size in verbose mode, or loose objects size in regular mode.
This patch doesn't change the way anything is displayed when the option
is not used.

Also update the documentation.

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