git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 09/10] read-cache.c: make fill/match_stat_data() static
Date: Wed, 14 Jan 2015 15:40:54 -0800	[thread overview]
Message-ID: <1421278855-8126-10-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1421278855-8126-1-git-send-email-gitster@pobox.com>

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 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

  parent reply	other threads:[~2015-01-14 23:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 23:40 [PATCH 00/10] mark private symbols static Junio C Hamano
2015-01-14 23:40 ` [PATCH 01/10] http.c: make finish_active_slot() and handle_curl_result() static Junio C Hamano
2015-01-15  6:41   ` Jeff King
2015-01-14 23:40 ` [PATCH 02/10] line-log.c: make line_log_data_init() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 03/10] prompt.c: remove git_getpass() nobody uses Junio C Hamano
2015-01-15  6:47   ` Jeff King
2015-01-14 23:40 ` [PATCH 04/10] revision.c: make save_parents() and free_saved_parents() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 05/10] urlmatch.c: make match_urls() static Junio C Hamano
2015-01-15  6:49   ` Jeff King
2015-01-14 23:40 ` [PATCH 06/10] remote.c: make clear_cas_option() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 07/10] shallow.c: make check_shallow_file_for_update() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 08/10] pack-bitmap.c: make pack_bitmap_filename() static Junio C Hamano
2015-01-15  6:51   ` Jeff King
2015-01-14 23:40 ` Junio C Hamano [this message]
2015-01-14 23:40 ` [PATCH 10/10] commit: show "Author:" hint when the ident is not given explicitly Junio C Hamano
2015-01-15  7:17   ` Jeff King
2015-01-15  0:07 ` [PATCH 00/10] mark private symbols static Stefan Beller
2015-01-15  7:18 ` Jeff King
2015-01-15 17:52   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421278855-8126-10-git-send-email-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).