Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'maint'
[gitweb.git]
/
read-cache.c
diff --git
a/read-cache.c
b/read-cache.c
index 2c450866ce92eee2ef484dd798f332cb0047a61d..22a814311d2cfc032129b43f6da56706c7026b9c 100644
(file)
--- a/
read-cache.c
+++ b/
read-cache.c
@@
-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;