diff mbox series

[v2,09/14] update-index: use add_index_entry()

Message ID 620e300ad6b346af6b73feec625a3e125afaa53f.1609821783.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Remove more index compatibility macros | expand

Commit Message

Derrick Stolee Jan. 5, 2021, 4:42 a.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

This is a mechanical replacement of add_cache_entry().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 builtin/update-index.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/builtin/update-index.c b/builtin/update-index.c
index aa859c4e018..ffa42813370 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -294,7 +294,7 @@  static int add_one_path(const struct cache_entry *old, const char *path, int len
 	}
 	option = allow_add ? ADD_CACHE_OK_TO_ADD : 0;
 	option |= allow_replace ? ADD_CACHE_OK_TO_REPLACE : 0;
-	if (add_cache_entry(ce, option)) {
+	if (add_index_entry(istate, ce, option)) {
 		discard_cache_entry(ce);
 		return error("%s: cannot add to the index - missing --add option?", path);
 	}
@@ -672,12 +672,12 @@  static int unresolve_one(const char *path)
 	}
 
 	remove_file_from_index(istate, path);
-	if (add_cache_entry(ce_2, ADD_CACHE_OK_TO_ADD)) {
+	if (add_index_entry(istate, ce_2, ADD_CACHE_OK_TO_ADD)) {
 		error("%s: cannot add our version to the index.", path);
 		ret = -1;
 		goto free_return;
 	}
-	if (!add_cache_entry(ce_3, ADD_CACHE_OK_TO_ADD))
+	if (!add_index_entry(istate, ce_3, ADD_CACHE_OK_TO_ADD))
 		return 0;
 	error("%s: cannot add their version to the index.", path);
 	ret = -1;