summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:03 (GMT)
commit4d87b38e6c1a73dbe744a30b9b3cdf88e69de7b4 (patch)
tree063642472b19f3d0e248f846df6bd14456622312 /cache.h
parente27bfaaee37c4c9d7e94f945f82c3e452d2dc071 (diff)
parentae9af12287b2c37512f12c137173dde7ea5192a0 (diff)
downloadgit-4d87b38e6c1a73dbe744a30b9b3cdf88e69de7b4.zip
git-4d87b38e6c1a73dbe744a30b9b3cdf88e69de7b4.tar.gz
git-4d87b38e6c1a73dbe744a30b9b3cdf88e69de7b4.tar.bz2
Merge branch 'nd/status-refresh-progress'
"git status" learns to show progress bar when refreshing the index takes a long time. * nd/status-refresh-progress: status: show progress bar if refreshing the index takes too long
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 1d749ab..59c8a93 100644
--- a/cache.h
+++ b/cache.h
@@ -410,7 +410,7 @@ void validate_cache_entries(const struct index_state *istate);
#define read_cache() read_index(&the_index)
#define read_cache_from(path) read_index_from(&the_index, (path), (get_git_dir()))
-#define read_cache_preload(pathspec) read_index_preload(&the_index, (pathspec))
+#define read_cache_preload(pathspec) read_index_preload(&the_index, (pathspec), 0)
#define is_cache_unborn() is_index_unborn(&the_index)
#define read_cache_unmerged() read_index_unmerged(&the_index)
#define discard_cache() discard_index(&the_index)
@@ -659,7 +659,9 @@ extern int daemonize(void);
/* Initialize and use the cache information */
struct lock_file;
extern int read_index(struct index_state *);
-extern int read_index_preload(struct index_state *, const struct pathspec *pathspec);
+extern int read_index_preload(struct index_state *,
+ const struct pathspec *pathspec,
+ unsigned int refresh_flags);
extern int do_read_index(struct index_state *istate, const char *path,
int must_exist); /* for testting only! */
extern int read_index_from(struct index_state *, const char *path,
@@ -814,6 +816,7 @@ extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
#define REFRESH_IGNORE_SUBMODULES 0x0010 /* ignore submodules */
#define REFRESH_IN_PORCELAIN 0x0020 /* user friendly output, not "needs update" */
+#define REFRESH_PROGRESS 0x0040 /* show progress bar if stderr is tty */
extern int refresh_index(struct index_state *, unsigned int flags, const struct pathspec *pathspec, char *seen, const char *header_msg);
extern struct cache_entry *refresh_cache_entry(struct index_state *, struct cache_entry *, unsigned int);