Re: [PATCH v2] commit, status: #comment diff output in verbose mode
- From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
- Date
- Mar 13, 2011, 18:34 UTC
- Message-ID
- <AANLkTi=csBKvpBew9QMbD6UA774K_t6h+O4kK1-qa=FC@mail.gmail.com>
- In-Reply-To
- <20110311012318.GB15377@sigill.intra.peff.net>
On Fri, Mar 11, 2011 at 2:23 AM, Jeff King <peff@peff.net> wrote:
Show 14 quoted lines
> On Thu, Mar 10, 2011 at 04:45:14PM -0800, Junio C Hamano wrote: > >> Jeff King <peff@peff.net> writes: >> >> > 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). >> >> Hmm, thanks for pointing it out; it indeed is a valid concern. >> >> Although I usually strongly resist changes in order to keep the user >> experience stable, I didn't think about this one, as I don't let the >> editor syntax highlight anything.
/me too - I find syntax highlighting a nice feature and would prefer it to stay as it is over using #commented out diff
Show 10 quoted lines
> I like the proposal for: > > # Lines below this one will be removed. > diff --git ... > > which seems to have the best of both worlds, robust and easy for editors > to recognize as a diff. For that matter, we could also do "# Lines below > this one..." for _all_ of the git-status template, but I don't think > it's necessary. Those lines are already clearly marked with a delimiter, > and I don't think anybody is complaining about them
The advantage of using such line is that it's more unique - IMO it's less likely someone writes a commit message with "# Lines below ..." etc then with "diff --git".
It also makes possible to remove this line and thus include git diff output in commit message.
The downside is probably the need to support i18n for "# Lines below ..."
Less magic formats (or formats less magic) is better IMO.
-- Piotr Krukowiecki