If the cache was valid, we don't want to reload just because of changes

This was exactly backwards. If there already are changes we do NOT want to
reload - that would overwrite those changes for no good reason; after all, the
starting point was correct, so why throw the changes away?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-03-29 20:46:12 -05:00
parent 501f8ba6a4
commit 5e8930a179

View file

@ -453,8 +453,7 @@ int check_git_sha(const char *filename)
if (git && git != dummy_git_repository) {
const char *sha = get_sha(git, branch);
if (!same_string(sha, "") &&
same_string(sha, saved_git_id) &&
!unsaved_changes()) {
same_string(sha, saved_git_id)) {
fprintf(stderr, "already have loaded SHA %s - don't load again\n", sha);
return 0;
}