Re: [PATCH UI experiment] diffstat: annotate/highlight new or removed files

2012-10-16 Thread Nguyen Thai Ngoc Duy
On Tue, Oct 16, 2012 at 4:03 AM, Junio C Hamano  wrote:
>> Coloring is to me an improvement over --summary. Probably the main
>> point. Without it, perhaps it's not worth putting extra text to
>> diffstat.
>
> It is kind of surprising that you did not choose to paint new in
> green and gone in red, and rather paint everything in yellow.

The colors of line addition and deletion? Nice. I just wanted to make
sure these stand out, or at least not easily mistaken as part of path
names.

> I personally think the above in monochrome is fairly easy to read;
> with coloring, it might become too distracting, though.

Hmm.. maybe. I'm probably too excited to see the distraction just yet.
I will try it out for longer time, see if I change my mind.

> Just a nit, "new mode" is too similar to "new".  Everything is "new"
> in the sense that they have "new contents"; it may be better phrased
> without saying "new" but giving a stress on "changed".

I think "new mode" should be replaced by the actual mode change (e.g.
"+x", "-x", or "mode +x", "mode -x"). Not too long and quite clear
what it does.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH UI experiment] diffstat: annotate/highlight new or removed files

2012-10-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy   writes:

> diffstat does not show whether a file is added or deleted. I know
> --summary does. But the problem with --summary is it makes me look for
> information of a file in two places: diffstat and summary. And with a
> commit that adds/removes a lot, showing both --stat --summary can be
> long.
>
> This patch adds "(new)", "(gone)" or "(new mode)" to diffstat, with
> highlight, to easily catch file additions/removals. The extra text is
> chosen to be short enough so that it won't take up too much space for
> path names:
>
>  .gitignore  |   1 +
>  Makefile|   3 +
>  t/t3070-wildmatch.sh (new)  | 188 
>  t/t3070/wildtest.txt (gone) | 165 -
>  test-wildmatch.c (new)  |  14 ++
>  wildmatch.c |   5 +-
>  6 files changed, 210 insertions(+), 166 deletions(-)
>
> I don't put creation modes in there too because most of the time it
> does not matter much to me and I could look down to --summary for mode
> verification. But we could put "(new+x)" for 0755 and just "(new)" for
> 0644. "(new mode)" then could become "(+x)", "(-x)" or something like
> that.
>
> Coloring is to me an improvement over --summary. Probably the main
> point. Without it, perhaps it's not worth putting extra text to
> diffstat.

It is kind of surprising that you did not choose to paint new in
green and gone in red, and rather paint everything in yellow.

I personally think the above in monochrome is fairly easy to read;
with coloring, it might become too distracting, though.

Just a nit, "new mode" is too similar to "new".  Everything is "new"
in the sense that they have "new contents"; it may be better phrased
without saying "new" but giving a stress on "changed".

Thanks for a fun patch.  I am not strongly against it.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html