From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH v2] commit, status: #comment diff output in verbose mode Date: Thu, 10 Mar 2011 17:52:33 -0500 Message-ID: <20110310225233.GH15828@sigill.intra.peff.net> References: <1299787140-21472-1-git-send-email-icomfort@stanford.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: git@vger.kernel.org To: Ian Ward Comfort X-From: git-owner@vger.kernel.org Thu Mar 10 23:52:41 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pxoil-0007Qs-IL for gcvg-git-2@lo.gmane.org; Thu, 10 Mar 2011 23:52:39 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751750Ab1CJWwe (ORCPT ); Thu, 10 Mar 2011 17:52:34 -0500 Received: from 99-108-226-0.lightspeed.iplsin.sbcglobal.net ([99.108.226.0]:37022 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158Ab1CJWwd (ORCPT ); Thu, 10 Mar 2011 17:52:33 -0500 Received: (qmail 32035 invoked by uid 107); 10 Mar 2011 22:53:05 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Thu, 10 Mar 2011 17:53:05 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Thu, 10 Mar 2011 17:52:33 -0500 Content-Disposition: inline In-Reply-To: <1299787140-21472-1-git-send-email-icomfort@stanford.edu> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Mar 10, 2011 at 11:59:00AM -0800, Ian Ward Comfort wrote: > By historical accident, diffs included in commit templates and status > output when the "-v" option is given are not prefixed with the # comment > character, as other advice and status information is. Stripping these > lines is thus a best-effort operation, as it is not always possible to > tell which lines were generated by "-v" and which were inserted by the > user. > > Improve this situation by adding the # prefix to diff output along with > all other status output in these cases. The change is simply made thanks > to a3c158d (Add a prefix output callback to diff output, 2010-05-26). The > prefixed diff can be stripped (or not, as configured) by the standard > cleanup code, so our special verbose-mode heuristic can be removed. > > Documentation and a few tests which rely on the old "-v" format are > updated to match. One known breakage is fixed in t7507. One reason to keep the existing behavior is that editors will tend to syntax-highlight the diff portion without much extra effort (in vim, at least, the syntax highlighting just includes the diff syntax highlighting for that section). I have no idea if this would make things much harder for that case or not. Even if it does make things harder there, I am not sure that the increased robustness isn't more important, anyway. But I thought I would point it out. -Peff