+ return add_cache_entry(ce, allow_add);
+}
+
+static void refresh_entry(struct cache_entry *ce)
+{
+ /*
+ * This is really not the right way to do it, but
+ * add_file_to_cache() does do the right thing.
+ *
+ * We should really just update the cache
+ * entry in-place, I think. With this approach we
+ * end up allocating a new one, searching for where
+ * to insert it etc etc crud.
+ */
+ add_file_to_cache(ce->name);
+}
+
+static void refresh_cache(void)
+{
+ int i;
+
+ for (i = 0; i < active_nr; i++)
+ refresh_entry(active_cache[i]);