Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Simplify is_kept_pack()
[gitweb.git]
/
read-cache.c
diff --git
a/read-cache.c
b/read-cache.c
index 967f483f783693eff4fd4e252dae7a0cc8b12ada..525d138e90c524d08ef3d9755f1a2486c34adc39 100644
(file)
--- a/
read-cache.c
+++ b/
read-cache.c
@@
-1239,6
+1239,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;