Skip to content

Commit 1f86b7c

Browse files
vdyegitster
authored andcommitted
reset: rename is_missing to !is_in_reset_tree
Rename and invert value of `is_missing` to `is_in_reset_tree` to make the variable more descriptive of what it represents. Signed-off-by: Victoria Dye <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 106298f commit 1f86b7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/reset.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ static void update_index_from_diff(struct diff_queue_struct *q,
131131

132132
for (i = 0; i < q->nr; i++) {
133133
struct diff_filespec *one = q->queue[i]->one;
134-
int is_missing = !(one->mode && !is_null_oid(&one->oid));
134+
int is_in_reset_tree = one->mode && !is_null_oid(&one->oid);
135135
struct cache_entry *ce;
136136

137-
if (is_missing && !intent_to_add) {
137+
if (!is_in_reset_tree && !intent_to_add) {
138138
remove_file_from_cache(one->path);
139139
continue;
140140
}
@@ -144,7 +144,7 @@ static void update_index_from_diff(struct diff_queue_struct *q,
144144
if (!ce)
145145
die(_("make_cache_entry failed for path '%s'"),
146146
one->path);
147-
if (is_missing) {
147+
if (!is_in_reset_tree) {
148148
ce->ce_flags |= CE_INTENT_TO_ADD;
149149
set_object_name_for_intent_to_add_entry(ce);
150150
}

0 commit comments

Comments
 (0)