gitcfg: Guard against moved or deleted .gitconfigs
commitdb70e338b8a88e77c745be9deb1f93178e4aa3c6
authorDavid Aguilar <davvid@gmail.com>
Wed, 17 Mar 2010 08:50:59 +0000 (17 01:50 -0700)
committerDavid Aguilar <davvid@gmail.com>
Wed, 17 Mar 2010 08:50:59 +0000 (17 01:50 -0700)
tree1411e38a557f93650dcc8aba56514a90ff851d8f
parent19db38084245e9242e1e1c274fbfee9ded322ad7
gitcfg: Guard against moved or deleted .gitconfigs

Users can actively move or rename files so guard against
this by calling reset() whenever the cache key changes.
The original code calculated the path list once at
startup and did not ever recalculate it.  We now recalculate
the list whenever the stat info changes.

A subtle change here is that the old code would always
check $prefix/etc before checking /etc/gitconfig.
git always checks /etc/gitconfig regardless of $prefix
so we can remove that check.

Signed-off-by: David Aguilar <davvid@gmail.com>
cola/gitcfg.py