All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sergey Organov <sorganov@gmail.com>
Cc: git@vger.kernel.org, Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: "git diff" surprising default output
Date: Wed, 01 Mar 2023 11:40:17 -0800	[thread overview]
Message-ID: <xmqqzg8wmfa6.fsf@gitster.g> (raw)
In-Reply-To: <871qm849co.fsf@osv.gnss.ru> (Sergey Organov's message of "Wed, 01 Mar 2023 21:25:43 +0300")

Sergey Organov <sorganov@gmail.com> writes:

> I figured the offender is --indent-heuristic that is described in the
> manual as:
>
>       Enable the heuristic that shifts diff hunk boundaries to make
>       patches easier to read. This is the default.
>
> but apparently rather makes patches harder to read, at least at some
> conditions. Turning it off helps to get the expected result:

As a heuristic, it is not surprising that it has some corner cases
where it does not shine.  I think the version that was eventually
merged starts here

  https://lore.kernel.org/git/cover.1473068229.git.mhagger@alum.mit.edu/

and we should be able to find a few links to the original
observation that motivated the change, e.g.

  https://public-inbox.org/git/cover.1470259583.git.mhagger@alum.mit.edu/



Thanks.

  reply	other threads:[~2023-03-01 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 18:25 "git diff" surprising default output Sergey Organov
2023-03-01 19:40 ` Junio C Hamano [this message]
2023-03-01 20:28   ` Sergey Organov

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=xmqqzg8wmfa6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --cc=sorganov@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.