git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] diff-highlight: fix a whitespace nit

From
Norman Rasmussen <norman@rasmussen.co.za>
Date
Oct 15, 2019, 04:34 UTC
Message-ID
<CAGF1phZk9_9Se++beXxDxQZ+Y6ucrFnBWJTVJfATMYyk4=Yn=Q@mail.gmail.com>
In-Reply-To
<20191015042006.GC32308@sigill.intra.peff.net>
On Mon, Oct 14, 2019 at 9:20 PM Jeff King <peff@peff.net> wrote:
Show 6 quoted lines
> There are a few lines just above that have 8+ spaces. Arguably those
> could be tabs, too, depending on your view of tabs. We usually do "8
> spaces is a tab" in the Git project, but the oft-repeated "tabs to
> indent, spaces to align" mantra would apply here (and I suspect you're
> using a different tabwidth since you noticed this one case). So I'd just
> as soon leave them be, and take your patch as-is.

Yep, the lines above are using the spaces to align the sections of the multi-line if statement. This happens again for the return statements in highlight_pair and is_pair_interesting. So this is the only line that doesn't stick to the rule (and probably because of editor auto-indenting). I have another change for the same change (which I'll send once I've written tests) and I only noticed this line when I changed my editor's default tabwidth after a while of coding.

-- 
- Norman Rasmussen
 - Email: norman@rasmussen.co.za
 - Home page: http://norman.rasmussen.co.za/
Previous: Jeff King
Message 4 of 4 in “diff-highlight: fix a whitespace nit”
  1. 0/1 diff-highlight: fix a whitespace nitNorman Rasmussen via GitGitGadget, Oct 15, 2019
  2. 1/1 diff-highlight: fix a whitespace nitNorman Rasmussen via GitGitGadget, Oct 15, 2019
  3. Jeff KingOct 15, 2019
  4. Norman RasmussenOct 15, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.