[PATCH 09/10] read-cache.c: make fill/match_stat_data() static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 cache.h      | 14 --------------
 read-cache.c | 14 ++++++++++++--
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/cache.h b/cache.h
index f704af5..98911c8 100644
--- a/cache.h
+++ b/cache.h
@@ -539,20 +539,6 @@ extern int ie_modified(const struct index_state *, const struct cache_entry *, s
 extern int index_fd(unsigned char *sha1, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags);
 extern int index_path(unsigned char *sha1, const char *path, struct stat *st, unsigned flags);
 
-/*
- * Record to sd the data from st that we use to check whether a file
- * might have changed.
- */
-extern void fill_stat_data(struct stat_data *sd, struct stat *st);
-
-/*
- * Return 0 if st is consistent with a file not having been changed
- * since sd was filled.  If there are differences, return a
- * combination of MTIME_CHANGED, CTIME_CHANGED, OWNER_CHANGED,
- * INODE_CHANGED, and DATA_CHANGED.
- */
-extern int match_stat_data(const struct stat_data *sd, struct stat *st);
-
 extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
 
 #define REFRESH_REALLY		0x0001	/* ignore_valid */
diff --git a/read-cache.c b/read-cache.c
index 9cff715..5a71de1 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -83,7 +83,11 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
 	add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
 }
 
-void fill_stat_data(struct stat_data *sd, struct stat *st)
+/*
+ * Record to sd the data from st that we use to check whether a file
+ * might have changed.
+ */
+static void fill_stat_data(struct stat_data *sd, struct stat *st)
 {
 	sd->sd_ctime.sec = (unsigned int)st->st_ctime;
 	sd->sd_mtime.sec = (unsigned int)st->st_mtime;
@@ -96,7 +100,13 @@ void fill_stat_data(struct stat_data *sd, struct stat *st)
 	sd->sd_size = st->st_size;
 }
 
-int match_stat_data(const struct stat_data *sd, struct stat *st)
+/*
+ * Return 0 if st is consistent with a file not having been changed
+ * since sd was filled.  If there are differences, return a
+ * combination of MTIME_CHANGED, CTIME_CHANGED, OWNER_CHANGED,
+ * INODE_CHANGED, and DATA_CHANGED.
+ */
+static int match_stat_data(const struct stat_data *sd, struct stat *st)
 {
 	int changed = 0;
 
-- 
2.3.0-rc0-134-g109a908

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]