git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Brabandt <cblists@256bit.org>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Mark trailing whitespace error in del lines of diff
Date: Tue, 26 May 2015 18:29:37 +0200	[thread overview]
Message-ID: <20150526162937.GA24439@256bit.org> (raw)
In-Reply-To: <xmqqbnh89r0z.fsf@gitster.dls.corp.google.com>

Hi Junio!

On Mo, 25 Mai 2015, Junio C Hamano wrote:

> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
> 
> > I like this idea.
> 
> I don't.
> 
> > My use case is determining whether a patch to a pristine-tar
> > repository introduced trailing whitespace (which is not okay) or
> > just left it there (which is okay).
> 
> In your use case, where keeping trailing blank that is otherwise not
> OK is fine only when the breakage was inherited from the preimage,
> wouldn't it be equally fine to keep other kinds of breakages as long
> as they were inherited from the preimage?  E.g. "The original used
> 8-space as leading indent, and you would not use that for your new
> lines, but the breakage was inherited from the preimage" would want
> to be treated the same way, no?  Why trailing blanks so special?

It was the one I am interesting in and also the one that I usually try 
to avoid ;)

(In fact, I thought if the other options would be needed, one could add 
additional suboptions for core.whitespace as well, so one would be able 
to exactly say, what kind of things one would like to see and which 
could be different for new lines and old lines).

> 
> So, from that point of view, your "use case" does not justify this
> particular implementation that special-cases trailing blanks on
> deleted lines and mark them [*1*].

> 
> If the implementation were addition of a new option to check and
> mark all kinds of errors core.whitespace would catch for new lines
> also for old lines, then it would be a somewhat different story.  I
> personally do not find such an option interesting, but at least I
> can understand why some people might find it useful.

Wouldn't that mean, that one couldn't see different kind of whitespace 
markings for newlines and deleted lines? I don't know, if one would want 
that a configuration however.

However, as I don't know the codebase very well, I doubt I can implement 
this.

> [Footnote]
> 
> *1* To support your use case with the ultimate ease-of-use, it would
> be best if the new option were to squelch the whitespace error on
> the new line when it was inherited from the old line, which is
> different from showing and marking the breakage on the old line.
> But I do not think it can be implemented sanely, so I will not go
> there.

Aside from the difficulties it would take to do this,
personally, I don't like this option. Because I like to see such 
problems, but just want to know whether a particular patch has 
introduced the problem or not.

Best,
Christian
-- 
In den Fragen im gemeinen Leben, wie man etwas am besten tun könnte,
wird ein gewisses Maximum gesucht.
		-- Georg Christoph Lichtenberg

  parent reply	other threads:[~2015-05-26 16:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 21:11 Mark trailing whitespace error in del lines of diff Christian Brabandt, Christian Brabandt
2015-05-25 22:22 ` brian m. carlson
2015-05-25 23:27   ` Junio C Hamano
2015-05-25 23:52     ` brian m. carlson
2015-05-26 16:29     ` Christian Brabandt [this message]
2015-05-26 17:26       ` Junio C Hamano
2015-05-26 17:34         ` Junio C Hamano
2015-05-26 17:39           ` Christian Brabandt
2015-05-26 17:48             ` Junio C Hamano
2015-05-26 18:21               ` Christian Brabandt
2015-05-26 19:46               ` [PATCH v2 0/5] showing existing ws breakage Junio C Hamano
2015-05-26 19:46                 ` [PATCH v2 1/4] t4015: modernise style Junio C Hamano
2015-05-26 19:46                 ` [PATCH v2 2/4] t4015: separate common setup and per-test expectation Junio C Hamano
2015-05-26 19:46                 ` [PATCH v2 3/4] diff.c: add emit_del_line() and update callers of emit_line_0() Junio C Hamano
2015-05-26 19:46                 ` [PATCH v2 4/4] diff.c: --ws-check-deleted option Junio C Hamano
2015-05-27  6:30                 ` [PATCH v3 0/4] showing existing ws breakage Junio C Hamano
2015-05-27  6:30                   ` [PATCH v3 1/4] t4015: modernise style Junio C Hamano
2015-05-27  6:30                   ` [PATCH v3 2/4] t4015: separate common setup and per-test expectation Junio C Hamano
2015-05-27  6:30                   ` [PATCH v3 3/4] diff.c: add emit_del_line() and emit_context_line() Junio C Hamano
2015-05-27  6:30                   ` [PATCH v3 4/4] diff.c: --ws-error-highlight=<kind> option Junio C Hamano
2015-05-27  7:22                   ` [PATCH v3 0/4] showing existing ws breakage Jeff King
2015-05-27 18:57                     ` Junio C Hamano
2015-05-27 20:36                       ` Jeff King
2015-05-27 20:46                         ` Junio C Hamano
2015-05-27 20:48                           ` Jeff King
2015-05-27 20:53                             ` Junio C Hamano
2015-05-27 20:51                     ` Jeff King
2015-05-26  0:24 ` Mark trailing whitespace error in del lines of diff Junio C Hamano
2015-05-26 16:31   ` Christian Brabandt
2015-05-26 17:33     ` Junio C Hamano

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=20150526162937.GA24439@256bit.org \
    --to=cblists@256bit.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).