Re: [PATCH 1/2] handle color.ui at a central place

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 24, 2009 at 12:26:50PM -0800, Junio C Hamano wrote:

> > Sadly, this is an area that is not covered very well in the tests
> > (partially, I think, because it is "just" output which we tend to
> > neglect, and partially because the isatty() stuff is hard to test with
> > our harness). So I don't think it's _entirely_ Markus' fault.
> 
> Oh, don't get me wrong.  I am not interested in finding whose fault it
> was.  I was just stating the fact that one person not finding a breakage
> does not mean much as an assurance.

OK. I was just trying to encourage Markus to keep trying. ;)

> +test_expect_success 'format-patch is colorless even with color.ui = auto' '
> +	git config color.ui auto &&
> +	TERM=ansi git format-patch -1 >/dev/tty &&
> +	grep "^+5$" 0001-foo.patch
> +'
> +

Actually, could this not just be "format-patch is colorless even with
color.ui = always"? I.e., shouldn't format-patch _always_ not have
color, no matter what (and we assume that "always" is a superset of
"auto"). And then it is also much easier to test.

Of course that doesn't fix the fact that it would _also_ be nice to test
"auto" functionality in general. Here you use the fact that format-patch
sends output to a file. But I don't think there is a good way to test
that "git log --color=auto" works as expected.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux