threads / discuss / 41503

using git-diff as a diff replacement?

Subject: using git-diff as a diff replacement?

## tl;dr

3 messages between Feb 24, 2016 and Feb 25, 2016.

replies: 2people: 2as markdown or json

Jacob Keller· Feb 24, 2016, 22:21 UTC · lore
Hey,

I know that running "git diff <path> <path>" when outside a git project will result in a normal diff being run. I happen to prefer the diff algorithm and diff output of "git diff" but there does not seem to be a way to have this behavior from within a git tree.

Is there a way to pass an option to git-diff which will result in strict file comparison?

Thanks, Jake

Duy Nguyen· Feb 25, 2016, 02:38 UTC · re: Jacob Keller · lore

Re: using git-diff as a diff replacement?

On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
Show 6 quoted lines
> Hey,
>
> I know that running "git diff <path> <path>" when outside a git
> project will result in a normal diff being run. I happen to prefer the
> diff algorithm and diff output of "git diff" but there does not seem
> to be a way to have this behavior from within a git tree.
git diff --no-index <path> <path>
?
-- 
Duy
Jacob Keller· Feb 25, 2016, 02:43 UTC · re: Duy Nguyen · lore

Re: using git-diff as a diff replacement?

On Wed, Feb 24, 2016 at 6:38 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 13 quoted lines
> On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
>> Hey,
>>
>> I know that running "git diff <path> <path>" when outside a git
>> project will result in a normal diff being run. I happen to prefer the
>> diff algorithm and diff output of "git diff" but there does not seem
>> to be a way to have this behavior from within a git tree.
>
> git diff --no-index <path> <path>
>
> ?
> --
> Duy

Yep thanks.. I swear I did git help diff, but I guess I am blind. This does what I want, and I had my shell alias diff so I don't forget :D

Thanks, Jake

← back to recent threads