public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Pulkit Goyal <7895pulkit@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: Incorrect Diff!
Date: Fri, 02 Jun 2017 13:55:19 +0900	[thread overview]
Message-ID: <xmqqinkfyonc.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAJ-kjL-Y+x-ZROnNm+Ray54hwxfkA6K6uxYoUVQpa3NmrzbEMg@mail.gmail.com> (Pulkit Goyal's message of "Fri, 2 Jun 2017 09:41:34 +0530")

Pulkit Goyal <7895pulkit@gmail•com> writes:

> I was working on a Django project when I got the following diff which
> is very much confusing.
>
> The diff is pasted at https://bpaste.net/show/c2cb00728ff0.
>
> As you can see on bpaste that in line number 9,10 I have changed
> "class activationview" to "class activateuser", but in line number 14
> the diff is again showing me "class activationview". Maybe Git is
> trying to be smart here, but the diff is wrong and I was confused.

I do not think Git is trying to be smart at all.  

The function context lines @@ .. @@ consistently is showing the name
in the preimage of the diff, no?  

The function/class header that appears in the preimage before the
hunk that begins at line 108 is activationview and that is shown
there.  So is the header on the hunk that begins at line 149.

So there is nothing remarkable in this patch as far as I can see.

      reply	other threads:[~2017-06-02  4:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  4:11 Incorrect Diff! Pulkit Goyal
2017-06-02  4:55 ` Junio C Hamano [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=xmqqinkfyonc.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=7895pulkit@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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