From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH/RFC] "color.diff = true" is not "always" anymore. Date: Fri, 30 Nov 2007 18:36:44 -0800 Message-ID: <7v4pf39m4j.fsf@gitster.siamese.dyndns.org> References: <474B42EC.1000408@wanadoo.fr> <7vr6icej23.fsf@gitster.siamese.dyndns.org> <7vd4tuakzj.fsf_-_@gitster.siamese.dyndns.org> <20071128190439.GA11396@coredump.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git list To: Jeff King X-From: git-owner@vger.kernel.org Sat Dec 01 03:37:20 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IyIEI-0003kJ-UD for gcvg-git-2@gmane.org; Sat, 01 Dec 2007 03:37:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758597AbXLACgu (ORCPT ); Fri, 30 Nov 2007 21:36:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758570AbXLACgt (ORCPT ); Fri, 30 Nov 2007 21:36:49 -0500 Received: from sceptre.pobox.com ([207.106.133.20]:40305 "EHLO sceptre.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758513AbXLACgs (ORCPT ); Fri, 30 Nov 2007 21:36:48 -0500 Received: from sceptre (localhost.localdomain [127.0.0.1]) by sceptre.pobox.com (Postfix) with ESMTP id 423E72F9; Fri, 30 Nov 2007 21:37:10 -0500 (EST) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by sceptre.sasl.smtp.pobox.com (Postfix) with ESMTP id D746D9B9F0; Fri, 30 Nov 2007 21:37:07 -0500 (EST) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Jeff King writes: > It would be nice to have a "git config --colorbool" option, but it has > the unfortunate problem that the stdout of "git config" is piped back to > the caller, so the isatty check is meaningless (and the "pager in use" > is similarly tricky). Perhaps it should go in Git.pm, so it at least > only needs to be written once. About the isatty(3) check, you do not have to use the stdout to report the result, though. IOW, you could use the exit code from the command.