Re: [PATCH v3 0/2] diff: add --stat-with-summary (was --compact-summary)
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 7, 2018, 10:36 UTC
- Message-ID
- <CACsJy8AiBq__c0UET5ywMbTTz_MJNo-bZ-qAaoGZXdMNnECcaQ@mail.gmail.com>
- In-Reply-To
- <CAPig+cR9RycfLz0C6tXA4iPXdqoyczfij8CBaU4MmRGRmuRhSQ@mail.gmail.com>
On Wed, Feb 7, 2018 at 4:52 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 20 quoted lines
> On Tue, Feb 6, 2018 at 5:20 AM, Duy Nguyen <pclouds@gmail.com> wrote: >> On Tue, Feb 6, 2018 at 1:56 AM, Junio C Hamano <gitster@pobox.com> wrote: >>> Duy Nguyen <pclouds@gmail.com> writes: >>> I actually think compact-summary was a good way to phrase it. >>> >>> Personally, I think it was a UI mistake that --summary can be given >>> independently with or without --stat (instead, there shouldn't have >>> been the --summary option, and instead when it was added, --stat >>> just should have gained an extra kind of output). A single option >>> that can give both kinds of info may be a good way forward, so >>> another possibility may be --summary-in-stat (meaning: the info >>> given by summary is included in stat output). I dunno. >> >> +Eric maybe he has some idea (sorry I forgot to include people from >> the last round). > > What about the earlier suggestion[1] (and minor follow-ups[2,3]) of > making this another option to --stat= (for instance, --stat=compact)? > Did that idea get shot down or am I misunderstanding the question > here.
I thought that was something like --stat[=<width>[,<name-width>[,<count>,[compact]]]] and turning on "compact" alone would get awkward because you need to specify all those widths and counts too. --stat=compact as a separate form, with no combination with any other stat params, does not feel justified. We could just do --stat-compact then. Perhaps we can allow compact to appear anywhere in --stat=, and not just the end? The --stat= syntax would be
--stat=[<option>[,<option>[,<option>...]]]
where option could be keyword ones like compact or anything else in future, or <keyword>=<value> form. <option> could also be a number, but in that case the three consecutive number options will present width, name-width and count in this order.
Or we could simply add new --stat= syntax _without_ "<option> as numbers". widths and counts must be specified keywords as well, e.g. --stat=width=40,name-width=20,count=10,compact and leave the old syntax "--stat=<width>,<name-width>,<count>" alone.
Then we still need to decide the new keyword for this feature, I feel compact is a bit too vague (I read --stat=compact as "it's compact stat", not "stat with compact summary"), so perhaps --stat=compact-summary, or just --stat=summary?
> [1]: https://public-inbox.org/git/CAPig+cQLgs59JYxcmK30qY307ArwqJx6pNOo95Z39_jJ9+D6+g@mail.gmail.com/ > [2]: https://public-inbox.org/git/CACsJy8B5qrN8T1aai3y3nfEc5baqn2Xkk6vZozMp5Lh-mPZ0VQ@mail.gmail.com/ > [3]: https://public-inbox.org/git/CACsJy8CPHk+aXHr-mkHZi27s=c3+ny8D9CSuzOSO8PweviBcqQ@mail.gmail.com/
-- Duy