[PATCH v3 04/24] read-cache: clear version in discard_index()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All fields except index_state->version are reset in discard_index.
Reset the version too.

Signed-off-by: Thomas Gummerer <t.gummerer@xxxxxxxxx>
---
 read-cache.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/read-cache.c b/read-cache.c
index de0bbcd..1e22f6f 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1558,6 +1558,7 @@ int discard_index(struct index_state *istate)
 	for (i = 0; i < istate->cache_nr; i++)
 		free(istate->cache[i]);
 	resolve_undo_clear_index(istate);
+	istate->version = 0;
 	istate->cache_nr = 0;
 	istate->cache_changed = 0;
 	istate->timestamp.sec = 0;
-- 
1.8.3.4.1231.g9fbf354.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]