diff options
author | Russell Belfer <rb@github.com> | 2014-04-01 16:46:25 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-01 16:46:25 -0700 |
commit | 8f4e5275e4f7f287b6782e70ff96c5de8fa4059e (patch) | |
tree | f824e2dd961803f2f620b294f98c82233de5fd8c /src/index.c | |
parent | 8061d519b33c95a8858752e7d70d40fe8bae90f9 (diff) | |
download | libgit2-8f4e5275e4f7f287b6782e70ff96c5de8fa4059e.tar.gz |
More tests and fix submodule index refresh
There was a little bug where the submodule cache thought that the
index date was out of date even when it wasn't that was resulting
in some extra scans of index data even when not needed.
Mostly this commit adds a bunch of new tests including adding and
removing submodules in the index and in the HEAD and seeing if we
can automatically pick them up when refreshing.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 6cc8ea1a3..24e447928 100644 --- a/src/index.c +++ b/src/index.c @@ -524,7 +524,9 @@ int git_index__changed_relative_to( if (git_index_read(index, false) < 0) giterr_clear(); - return (memcmp(&index->stamp, fs, sizeof(index->stamp)) == 0); + return (index->stamp.mtime != fs->mtime || + index->stamp.size != fs->size || + index->stamp.ino != fs->ino); } int git_index_write(git_index *index) |