From: Olga Telezhnaya <olyatelezhnaya@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH v2 6/6] ref-filter: add docs for new options
Date: Mon, 24 Dec 2018 13:24:30 +0000 [thread overview]
Message-ID: <01020167e0636912-b5ab3444-ff8a-4958-916e-e155a80dcc37-000000@eu-west-1.amazonses.com> (raw)
In-Reply-To: <01020167e063687c-37a43a09-0a5f-4335-8c21-ec15a0a67882-000000@eu-west-1.amazonses.com>
Add documentation for formatting options objectsize:disk
and deltabase.
Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com>
---
Documentation/git-for-each-ref.txt | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index 901faef1bfdce..774cecc7ede78 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -128,13 +128,18 @@ objecttype::
objectsize::
The size of the object (the same as 'git cat-file -s' reports).
-
+ Append `:disk` to get the size, in bytes, that the object takes up on
+ disk. See the note about on-disk sizes in the `CAVEATS` section below.
objectname::
The object name (aka SHA-1).
For a non-ambiguous abbreviation of the object name append `:short`.
For an abbreviation of the object name with desired length append
`:short=<length>`, where the minimum length is MINIMUM_ABBREV. The
length may be exceeded to ensure unique object names.
+deltabase::
+ This expands to the object name of the delta base for the
+ given object, if it is stored as a delta. Otherwise it
+ expands to the null object name (all zeroes).
upstream::
The name of a local ref which can be considered ``upstream''
@@ -361,6 +366,20 @@ This prints the authorname, if present.
git for-each-ref --format="%(refname)%(if)%(authorname)%(then) Authored by: %(authorname)%(end)"
------------
+CAVEATS
+-------
+
+Note that the sizes of objects on disk are reported accurately, but care
+should be taken in drawing conclusions about which refs or objects are
+responsible for disk usage. The size of a packed non-delta object may be
+much larger than the size of objects which delta against it, but the
+choice of which object is the base and which is the delta is arbitrary
+and is subject to change during a repack.
+
+Note also that multiple copies of an object may be present in the object
+database; in this case, it is undefined which copy's size or delta base
+will be reported.
+
SEE ALSO
--------
linkgit:git-show-ref[1]
--
https://github.com/git/git/pull/552
next prev parent reply other threads:[~2018-12-24 13:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 7:37 [RFC PATCH 0/5] ref-filter: add new formatting options Оля Тележная
2018-11-09 7:44 ` [RFC PATCH 1/5] ref-filter: add objectsize:disk option Olga Telezhnaya
2018-11-09 7:44 ` [RFC PATCH 5/5] ref-filter: add docs for new options Olga Telezhnaya
2018-11-12 5:24 ` Junio C Hamano
2018-11-09 7:44 ` [RFC PATCH 3/5] ref-filter: add deltabase option Olga Telezhnaya
2018-11-09 7:44 ` [RFC PATCH 4/5] ref-filter: add tests for deltabase Olga Telezhnaya
2018-11-09 7:44 ` [RFC PATCH 2/5] ref-filter: add tests for objectsize:disk Olga Telezhnaya
2018-11-12 5:03 ` [RFC PATCH 1/5] ref-filter: add objectsize:disk option Junio C Hamano
2018-11-12 12:03 ` Johannes Schindelin
2018-11-12 13:12 ` Jeff King
2018-11-13 1:52 ` Junio C Hamano
2018-11-20 9:17 ` Оля Тележная
2018-11-21 0:27 ` Junio C Hamano
2018-11-22 11:33 ` Johannes Schindelin
2018-11-24 1:48 ` Junio C Hamano
2018-11-12 13:05 ` Jeff King
2018-12-24 13:16 ` [PATCH v2 0/5] ref-filter: add new formatting options Оля Тележная
2018-12-24 13:24 ` [PATCH v2 1/6] ref-filter: add objectsize:disk option Olga Telezhnaya
2018-12-24 13:24 ` Olga Telezhnaya [this message]
2018-12-24 13:24 ` [PATCH v2 3/6] ref-filter: add tests for objectsize:disk Olga Telezhnaya
2018-12-24 13:24 ` [PATCH v2 4/6] ref-filter: add deltabase option Olga Telezhnaya
2018-12-24 13:24 ` [PATCH v2 5/6] ref-filter: add tests for deltabase Olga Telezhnaya
2018-12-24 13:24 ` [PATCH v2 2/6] ref-filter: add check for negative file size Olga Telezhnaya
2018-12-26 20:44 ` [PATCH v2 1/6] ref-filter: add objectsize:disk option Junio C Hamano
2019-01-10 6:25 ` [PATCH v2 0/5] ref-filter: add new formatting options Оля Тележная
2019-01-10 6:32 ` [PATCH v3 1/6] ref-filter: add objectsize:disk option Olga Telezhnaya
2019-01-10 6:32 ` [PATCH v3 5/6] ref-filter: add tests for deltabase Olga Telezhnaya
2019-01-10 6:32 ` [PATCH v3 4/6] ref-filter: add deltabase option Olga Telezhnaya
2019-01-10 6:32 ` [PATCH v3 3/6] ref-filter: add tests for objectsize:disk Olga Telezhnaya
2019-01-10 6:32 ` [PATCH v3 2/6] ref-filter: add check for negative file size Olga Telezhnaya
2019-01-10 6:32 ` [PATCH v3 6/6] ref-filter: add docs for new options Olga Telezhnaya
2019-01-10 18:17 ` [PATCH v2 0/5] ref-filter: add new formatting options Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01020167e0636912-b5ab3444-ff8a-4958-916e-e155a80dcc37-000000@eu-west-1.amazonses.com \
--to=olyatelezhnaya@gmail.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).