threads / discuss / 24805

git diff shows no output

Subject: git diff shows no output

## tl;dr

3 messages between Aug 20, 2010 and Aug 23, 2010.

replies: 2people: 2as markdown or json

Charles Brossollet· Aug 20, 2010, 13:02 UTC · lore
Hello,

I'm a new user of git, and I meet a very strange behaviour with the git diff command. I have modified stuff in a file, with changes both in the index and the working tree.

"git diff" shows nothing, while "git diff | cat" shows the diff, as well as "git diff>output.txt" puts diff in output.txt. Quite Weird

I'm on Mac OS X 10.6.4, using git 1.7.2.1, installed via macports.
Best,
-- 
Charles
Jonathan Nieder· Aug 20, 2010, 13:38 UTC · re: Charles Brossollet · lore

Re: git diff shows no output

Hi!
Charles Brossollet wrote:
> "git diff" shows nothing, while "git diff | cat" shows the diff, as
> well as "git diff>output.txt" puts diff in output.txt.

"git diff" paginates its output by default. Perhaps your $LESS contains -F but not -X?

Hope that helps, Jonathan

Charles Brossollet· Aug 23, 2010, 06:34 UTC · re: Jonathan Nieder · lore

Re: git diff shows no output

That's right, nice guess!! thanks a lot!
Best
-- 
Charles

Le 20 août 2010 à 15:38, Jonathan Nieder a écrit :

> Hi!
> 
> Charles Brossollet wrote:
> 
>> "git diff" shows nothing, while "git diff | cat" shows the diff, as
>> well as "git diff>output.txt" puts diff in output.txt.
> 
> "git diff" paginates its output by default.  Perhaps your $LESS
> contains -F but not -X?
> 
> Hope that helps,
> Jonathan

← back to recent threads