From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH 4/4] pretty-print: add --pretty=noexpand Date: Fri, 18 Mar 2016 01:08:07 -0400 Message-ID: <20160318050807.GC22327@sigill.intra.peff.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Linus Torvalds , Git Mailing List To: Junio C Hamano X-From: git-owner@vger.kernel.org Fri Mar 18 06:09:06 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1agmem-00031q-67 for gcvg-git-2@plane.gmane.org; Fri, 18 Mar 2016 06:09:04 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbcCRFIM (ORCPT ); Fri, 18 Mar 2016 01:08:12 -0400 Received: from cloud.peff.net ([50.56.180.127]:33874 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752293AbcCRFIK (ORCPT ); Fri, 18 Mar 2016 01:08:10 -0400 Received: (qmail 14364 invoked by uid 102); 18 Mar 2016 05:08:10 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Fri, 18 Mar 2016 01:08:10 -0400 Received: (qmail 8526 invoked by uid 107); 18 Mar 2016 05:08:27 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Fri, 18 Mar 2016 01:08:27 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Fri, 18 Mar 2016 01:08:07 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Mar 17, 2016 at 04:16:21PM -0700, Junio C Hamano wrote: > It is reasonable for tweak the default output mode for "git log" to > untabify the commit log message, it sometimes may be necessary to > see the output without tab expansion. > > Invent a new --pretty option to do this. Use this to unbreak the > test breakages, where "git shortlog" and output are tested. Hmm. Isn't "expand tabs" orthogonal to the rest of the pretty format? That is, couldn't one want "--pretty=fuller, but with tabs expanded"? I don't personally care much myself, and certainly we don't need to support "--expand-tabs" for every format until somebody actually wants them enough to implement it. I just don't want to see us painted into a corner where we have to support an awkward interface forever (e.g., the way we had to retrofit the orthogonal "local" concept onto the --date code). E.g., start with: - only CMIT_FMT_MEDIUM expands tabs (and does so by default) - passing --no-expand-tabs suppresses this behavior - passing --expand-tabs is an error for now; if people care later, they can add support for other formats (naively this is trivial, but I suspect there are some corner cases around things like --pretty=raw, so unless somebody wants to work on it now, I don't think we need to). -Peff