git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

From
Jeff King <peff@peff.net>
Date
Nov 12, 2018, 13:05 UTC
Message-ID
<20181112130525.GK3956@sigill.intra.peff.net>
In-Reply-To
<xmqqr2fq3n1j.fsf@gitster-ct.c.googlers.com>
On Mon, Nov 12, 2018 at 02:03:20PM +0900, Junio C Hamano wrote:
Show 12 quoted lines
> > +		} else if (!strcmp(name, "objectsize")) {
> >  			v->value = oi->size;
> >  			v->s = xstrfmt("%lu", oi->size);
> 
> This is not a suggestion but is a genuine question, but I wonder if
> two years down the road somebody who meets this API for the first
> time find the asymmetry between "objectsize" and "objectsize:disk" a
> tad strange and suggest the former to have "objectsize:real" or some
> synonym.  Or we can consider "objectsize" the primary thing (hence
> needing no colon-plus-modifier to clarify what kind of size we are
> asking) and leave these two deliberatly asymmetric.  I am leaning
> towards the latter myself.
I think to some degree that ship has already sailed (and is my fault!).

The ulterior motive here is to eventually unify the cat-file formatter with the ref-filter formatter. So for that we'll have to support %(objectsize) anyway.

That still leaves the option of having %(objectsize:real) later and marking a bare %(objectsize) as a deprecated synonym. But I don't think there's any advantage to trying to deal with it at this stage.

-Peff
Previous: Junio C Hamano
Message 15 of 15 in “ref-filter: add objectsize:disk option”
  1. 1/5 ref-filter: add objectsize:disk optionOlga Telezhnaya, Nov 9, 2018
  2. 3/5 ref-filter: add deltabase optionOlga Telezhnaya, Nov 9, 2018
  3. 4/5 ref-filter: add tests for deltabaseOlga Telezhnaya, Nov 9, 2018
  4. 2/5 ref-filter: add tests for objectsize:diskOlga Telezhnaya, Nov 9, 2018
  5. 5/5 ref-filter: add docs for new optionsOlga Telezhnaya, Nov 9, 2018
  6. Junio C HamanoNov 12, 2018
  7. Junio C HamanoNov 12, 2018
  8. Johannes SchindelinNov 12, 2018
  9. Jeff KingNov 12, 2018
  10. Junio C HamanoNov 13, 2018
  11. Оля ТележнаяNov 20, 2018
  12. Junio C HamanoNov 21, 2018
  13. Johannes SchindelinNov 22, 2018
  14. Junio C HamanoNov 24, 2018
  15. Jeff KingNov 12, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.