diff options
author | Victoria Dye <vdye@github.com> | 2021-10-07 21:15:31 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-07 18:00:31 -0700 |
commit | 1f86b7cb6396ea5f8cd612041938e7d3280e4002 (patch) | |
tree | c9dce8539b5f7aeff840fd6f3be9c406fa8e6355 /builtin/reset.c | |
parent | The eleventh batch (diff) | |
download | tgif-1f86b7cb6396ea5f8cd612041938e7d3280e4002.tar.xz |
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 <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/reset.c')
-rw-r--r-- | builtin/reset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/reset.c b/builtin/reset.c index 51c9e2f43f..d3695ce43c 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -131,10 +131,10 @@ static void update_index_from_diff(struct diff_queue_struct *q, for (i = 0; i < q->nr; i++) { struct diff_filespec *one = q->queue[i]->one; - int is_missing = !(one->mode && !is_null_oid(&one->oid)); + int is_in_reset_tree = one->mode && !is_null_oid(&one->oid); struct cache_entry *ce; - if (is_missing && !intent_to_add) { + if (!is_in_reset_tree && !intent_to_add) { remove_file_from_cache(one->path); continue; } @@ -144,7 +144,7 @@ static void update_index_from_diff(struct diff_queue_struct *q, if (!ce) die(_("make_cache_entry failed for path '%s'"), one->path); - if (is_missing) { + if (!is_in_reset_tree) { ce->ce_flags |= CE_INTENT_TO_ADD; set_object_name_for_intent_to_add_entry(ce); } |