Merge branch 'jn/gitweb-customlinks'
[gitweb.git] / read-cache.c
index 2c450866ce92eee2ef484dd798f332cb0047a61d..22a814311d2cfc032129b43f6da56706c7026b9c 100644 (file)
@@ -1269,6 +1269,11 @@ int read_index_from(struct index_state *istate, const char *path)
        die("index file corrupt");
 }
 
+int is_index_unborn(struct index_state *istate)
+{
+       return (!istate->cache_nr && !istate->alloc && !istate->timestamp);
+}
+
 int discard_index(struct index_state *istate)
 {
        istate->cache_nr = 0;