Re: help understanding git diff output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 27, 2011 at 6:05 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Eugene Sajine <euguess@xxxxxxxxx> writes:
>
>> I get empty diff when i execute:
>>
>> $git diff branch1..branch2
>>
>> and i also get empty diff when running
>>
>> $git diff branch2..branch1
>
> The thing is, "diff" is about comparing "two endpoints".
>
> We still do support, as a backward compatibility measure, the A..B
> notation to help people who learned "git diff" from ancient documents, and
> we don't plan to deprecate the notation in any way, but don't be fooled by
> the notation which usually means "the range from A to B". ÂIn the context
> of diff, it does not mean a range, as diff is about two "endpoints".
>
>> What i cannot wrap my mind around is why the command below with
>> symmetric difference range gives me non-empty diff
>>
>> $git diff branch1...branch2
>
> "git diff A...B" is a short-hand for "git diff $(git merge-base A B) B",
> naming the fork point between branches A and B as one end, and B as the
> other end, of the diff. ÂAgain, diff is about two "endpoints", and the
> notation does not mean a symmetric difference range.
>
>
>

Thanks a lot, Junio. I was looking at the wrong place in the
documentation. Skipped the part in diff doc explaining that range
notations are not exactly ranges for diff.

Thanks,
Eugene
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]