Re: [PATCH v12 12/20] update-index: enable/disable watchman support
From: Duy Nguyen <hidden>
Date: 2016-06-25 16:32:11
On Thu, May 19, 2016 at 11:45 PM, David Turner [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1149,6 +1152,19 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) die("Bug: bad untracked_cache value: %d", untracked_cache); } + if (use_watchman > 0) { + the_index.last_update = xstrdup(""); + the_index.cache_changed |= WATCHMAN_CHANGED; +#ifndef USE_WATCHMAN + warning("git was built without watchman support -- I'm " + "adding the extension here, but it probably won't " + "do you any good.");
_() this string. And maybe rephrase a bit, avoiding "I'm adding", e.g. "git was built without watchman support, this command probably will not result in any speedups"
+#endif
+ } else if (!use_watchman) {
+ the_index.last_update = NULL;
+ the_index.cache_changed |= WATCHMAN_CHANGED;
+ }
+
if (active_cache_changed) {
if (newfd < 0) {
if (refresh_args.flags & REFRESH_QUIET)
--
2.4.2.767.g62658d5-twtrsrc-- Duy