From: "Shawn O. Pearce" <spearce@spearce.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH v2] Add an option to git-ls-tree to display also the size of blob
Date: Sat, 19 May 2007 23:54:07 -0400 [thread overview]
Message-ID: <20070520035407.GF3141@spearce.org> (raw)
In-Reply-To: <200705192208.11905.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> wrote:
> Rationale: for non-blob entries size of an object has no much
> meaning, and is not very interesting. Moreover, in planned
> pack v4 tree objects would be constructed on demand, so tree
> size would need to be calculated... although isn't object size
> stored in the header?
Yes and no. In pack v4 the object sizes stored within the packfile
are more about what we need to know in order to efficiently unpack
the object than about supplying the canonical format length. If a
value is redundant, we don't store it. The canonical format length
is almost always redundant.
For blobs we still need the raw data length to unpack efficiently,
and hence we have the blob's canonical size readily available.
For trees its actually more the tree entry record count, as that
is all we need to know in order to recover the tree. For commits
we don't even need a length, but we instead have the number of
parent commits.
Since pack v4 is really about faster runtime decoding our ability
to reproduce canonical encoding of objects is reduced slightly.
I think that's OK as we actually only need the canonical encoding
infrequently (index-pack during network transfer, cat-file) and
we're not really considering pack v4 for network transfer. Yet.
> I hope this addresses concerns mentioned in this thread: the
> alternate name --size for -l/--long option, and showing size
> for tree (and commit/submodule) objects.
Yes, thanks!
--
Shawn.
next prev parent reply other threads:[~2007-05-20 3:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 10:24 [PATCH] Add an option to git-ls-tree to display also the size of object Jakub Narebski
2007-05-15 18:58 ` Junio C Hamano
2007-05-15 23:19 ` Jakub Narebski
2007-05-16 0:37 ` Junio C Hamano
2007-05-16 0:54 ` Jakub Narebski
2007-05-16 1:07 ` Junio C Hamano
2007-05-19 20:08 ` [PATCH v2] Add an option to git-ls-tree to display also the size of blob Jakub Narebski
2007-05-20 3:54 ` Shawn O. Pearce [this message]
2007-05-15 23:20 ` [PATCH] Add an option to git-ls-tree to display also the size of object Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070520035407.GF3141@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.