]> git.proxmox.com Git - libgit2.git/commit - src/checkout.c
Add diff option to update index stat cache
authorRussell Belfer <rb@github.com>
Mon, 28 Apr 2014 21:48:41 +0000 (14:48 -0700)
committerRussell Belfer <rb@github.com>
Fri, 2 May 2014 16:21:33 +0000 (09:21 -0700)
commit94fb4aadc80c927a59696dc01db03f3a0629dae7
treec01ad832b1656dcaf9d7e246ae9c3a58586fd838
parent0fc8e1f6bd9a5148d3a262142e9a70126f5c3a42
Add diff option to update index stat cache

When diff is scanning the working directory, if it finds a file
where it is not sure if the index entry matches the working dir,
it will recalculate the OID (which is pretty expensive).  This
adds a new flag to diff so that if the OID calculation finds that
the file actually has not changed (i.e. just the modified time was
altered or such), then it will refresh the stat cache in the index
so that future calls to diff will not have to check the oid again.
include/git2/diff.h
src/checkout.c
src/diff.c
src/diff.h
tests/diff/workdir.c