Skip to content

Commit dd88837

Browse files
committed
Don't default index entries to "VALID"
The "VALID" flag in git refers to the "assume-unchanged" feature, such that if, in a non-bare repository, an index entry is marked as "VALID", the git CLI (e.g. `git status`) will assume that the file never changes, and ignore any changes that do occur. See #636 for the issue and research leading to this change.
1 parent 04fe32f commit dd88837

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

ext/rugged/rugged_index.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,6 @@ static void rb_git_indexentry_toC(git_index_entry *entry, VALUE rb_entry)
624624
entry->flags &= ~GIT_IDXENTRY_VALID;
625625
if (rugged_parse_bool(val))
626626
entry->flags |= GIT_IDXENTRY_VALID;
627-
} else {
628-
entry->flags |= GIT_IDXENTRY_VALID;
629627
}
630628
}
631629

0 commit comments

Comments
 (0)