DORMANTno replies

[PATCH 08/19] rename remove_entry_at to remove_cache_entry_at and expose as a public api

From: Brad Roberts <hidden>
Date: 2016-06-15 22:41:53

tree 68af3fb1d46759f437d15f310a9aea2931708601
parent e2acfff5e544a8c6769a9e665927092b3edd7579
author Brad Roberts [off-list ref] 1114075605 -0700
committer Brad Roberts [off-list ref] 1114075605 -0700

[PATCH] rename remove_entry_at to remove_cache_entry_at and expose as a public api

Signed-off-by: Brad Roberts <redacted>
---

 cache.h      |    1 +
 read-cache.c |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

Index: cache.h
===================================================================
--- e2acfff5e544a8c6769a9e665927092b3edd7579:1/cache.h  (mode:100644 sha1:9ad6e805eafcb213c6bb4b1f8ff4d4e053fa6067)
+++ 099367f98cc063c33733d15c7a2d9737bea853d9:1/cache.h  (mode:100644 sha1:74d816c34245e0dde41643188f38cf99ca75e75f)
@@ -96,6 +96,7 @@
 extern int get_num_cache_entries();
 extern struct cache_entry * get_cache_entry(int pos);
 extern void set_cache_entry(struct cache_entry *ce, int pos);
+extern int remove_cache_entry_at(int pos);
 
 #define MTIME_CHANGED	0x0001
 #define CTIME_CHANGED	0x0002
Index: read-cache.c
===================================================================
--- e2acfff5e544a8c6769a9e665927092b3edd7579:1/read-cache.c  (mode:100644 sha1:8eaa05957a481b09116c37e43e16c5ef4e219a1e)
+++ 099367f98cc063c33733d15c7a2d9737bea853d9:1/read-cache.c  (mode:100644 sha1:286f7136bc164f3a2317bb492138d9221efb4025)
@@ -87,7 +87,7 @@
 }
 
 /* Remove entry, return true if there are more entries to go.. */
-static int remove_entry_at(int pos)
+int remove_cache_entry_at(int pos)
 {
 	active_nr--;
 	if (pos >= active_nr)
@@ -100,7 +100,7 @@
 {
 	int pos = cache_name_pos(path, strlen(path));
 	if (pos >= 0)
-		remove_entry_at(pos);
+		remove_cache_entry_at(pos);
 	return 0;
 }
 
@@ -148,7 +148,7 @@
 	if (pos < active_nr && ce_stage(ce) == 0) {
 		while (same_name(active_cache[pos], ce)) {
 			ok_to_add = 1;
-			if (!remove_entry_at(pos))
+			if (!remove_cache_entry_at(pos))
 				break;
 		}
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help