From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
Cc: Alban Gruin <alban.gruin@gmail.com>, git@vger.kernel.org
Subject: Re: Antw: Re: java diffs show no method context
Date: Thu, 26 Apr 2018 09:43:58 +0200 [thread overview]
Message-ID: <87y3hacszl.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <5AE17203020000A10002B5EF@gwsmtp1.uni-regensburg.de>
On Thu, Apr 26 2018, Ulrich Windl wrote:
> Thanks for that. It sounds plausible, but I wonder why it works automagically
> for C, but not for Java (Politcal reasons put aside): Using ".c" for C is about
> as common as using ".java" for Java ;-)
It has a bit to do with it being in C, but not in the way you think. By
default Git doesn't enable the "cpp" driver either for *.c, but it just
so happens to do the right thing more of the time because the default
heuristic is basically to search for a nearby line that doesn't start
with whitespace for context.
This doesn't work for Java because your methods tend to be indented
since they're part of the class you're working on.
prev parent reply other threads:[~2018-04-26 7:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 12:53 java diffs show no method context Ulrich Windl
2018-04-25 15:05 ` Alban Gruin
2018-04-26 6:30 ` Antw: " Ulrich Windl
2018-04-26 7:43 ` Ævar Arnfjörð Bjarmason [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3hacszl.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=Ulrich.Windl@rz.uni-regensburg.de \
--cc=alban.gruin@gmail.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).