summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-06-27 16:21:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-01 05:45:51 (GMT)
commite46bbcf6e89e4b1d3d8de1d20d836538ab0f0c85 (patch)
treeed37667a4a0f83d46f4403d0c5d28542e4c3f244 /cache.h
parentb2eabcc2539c021ea6cb2d1d2d28c8213986a186 (diff)
downloadgit-e46bbcf6e89e4b1d3d8de1d20d836538ab0f0c85.zip
git-e46bbcf6e89e4b1d3d8de1d20d836538ab0f0c85.tar.gz
git-e46bbcf6e89e4b1d3d8de1d20d836538ab0f0c85.tar.bz2
Move read_cache_unmerged() to read-cache.c
builtin-read-tree has a read_cache_unmerged() which is useful for other builtins, for example builtin-merge uses it as well. Move it to read-cache.c to avoid code duplication. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 6913573..d0d74a3 100644
--- a/cache.h
+++ b/cache.h
@@ -254,6 +254,7 @@ static inline void remove_name_hash(struct cache_entry *ce)
#define read_cache() read_index(&the_index)
#define read_cache_from(path) read_index_from(&the_index, (path))
+#define read_cache_unmerged() read_index_unmerged(&the_index)
#define write_cache(newfd, cache, entries) write_index(&the_index, (newfd))
#define discard_cache() discard_index(&the_index)
#define unmerged_cache() unmerged_index(&the_index)
@@ -356,6 +357,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
/* Initialize and use the cache information */
extern int read_index(struct index_state *);
extern int read_index_from(struct index_state *, const char *path);
+extern int read_index_unmerged(struct index_state *);
extern int write_index(const struct index_state *, int newfd);
extern int discard_index(struct index_state *);
extern int unmerged_index(const struct index_state *);