From: Jeff King <peff@peff.net>
To: Norman Rasmussen via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Norman Rasmussen <norman@rasmussen.co.za>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/1] diff-highlight: fix a whitespace nit
Date: Tue, 15 Oct 2019 00:20:07 -0400 [thread overview]
Message-ID: <20191015042006.GC32308@sigill.intra.peff.net> (raw)
In-Reply-To: <2823d4d360b2f53c1d63ba742808eaee80ede1e4.1571110286.git.gitgitgadget@gmail.com>
On Tue, Oct 15, 2019 at 03:31:26AM +0000, Norman Rasmussen via GitGitGadget wrote:
> From: Norman Rasmussen <norman@rasmussen.co.za>
>
> This changes the indent from
> "<tab><sp><sp><sp><sp><sp><sp><sp><sp>"
> to
> "<tab><tab>"
> so that the statement lines up with the rest of the block.
Yep, that makes sense. Looks like I introduced the problem (most of my
perl used to be written in a style that forbids tabs, so it may have
snuck in that way, but the rest of the file definitely follows Git's
usual style of tabs).
> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm
> index 7440aa1c46..e2589922a6 100644
> --- a/contrib/diff-highlight/DiffHighlight.pm
> +++ b/contrib/diff-highlight/DiffHighlight.pm
> @@ -72,7 +72,7 @@ sub handle_line {
> (?:$COLOR?\|$COLOR?[ ])* # zero or more trailing "|"
> [ ]* # trailing whitespace for merges
> /x) {
> - my $graph_prefix = $&;
> + my $graph_prefix = $&;
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.
-Peff
next prev parent reply other threads:[~2019-10-15 4:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 3:31 [PATCH 0/1] diff-highlight: fix a whitespace nit Norman Rasmussen via GitGitGadget
2019-10-15 3:31 ` [PATCH 1/1] " Norman Rasmussen via GitGitGadget
2019-10-15 4:20 ` Jeff King [this message]
2019-10-15 4:34 ` Norman Rasmussen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191015042006.GC32308@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=norman@rasmussen.co.za \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).