Hello,

I am seeing unexpected behaviour on my system with git-diff and stat-only 
changes: diff.autorefreshindex=0 only works when in a repo's config 
(./.git/config); it doesn't work via a -c switch.  Conversely -c 
diff.autorefreshindex=1 does indeed override a 0 setting in the repo's config.

# First I remove all my normal configs.
$ mv ~/.git* ~/stuff/

# Now some setup.
$ mkdir foo && cd foo
$ git init
$ echo 123 > README
$ git commit -am 'initial'
[master (root-commit) 92e793c] initial
 ...[stuff about name and email address being auto-configured]...
 1 file changed, 1 insertion(+)
 create mode 100644 README
$ touch README

# Now the strange behaviour: no output from the next command
$ git -c diff.autorefreshindex=0 diff --raw -- README

$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true

$ echo -e "[diff]\n  autorefreshindex = 0" >> .git/config
$ touch README

# Next command works as expected.
$ git diff --raw -- README
:100644 100644 190a180... 0000000... M  README

# Next command produces no output as expected
$ git -c diff.autorefreshindex=1 diff --raw -- README

I get this with both git v2.6.4 and v2.7.0 on my OS X 10.11.2.  I tried it on 
another system (Ubuntu 12.04 LTS, git 1.7.9.5) and everything worked as 
expected.  Somebody else tried it on their OS X 10.11.2 (as well as 
10.10.something) with git 2.5.4 and everything worked as expected.

Any help would be much appreciated.  Thanks in advance!

Yours,
Andrew Stewart

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to