Re: [PATCH v2] index-format.txt: be more liberal on what can represent invalid cache tree

2012-12-13 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: How would that work with existing versions? If you write -2 in cache-tree, the next time 1.8.0 updates cache tree it writes -1 back. That loses whatever information you attach to -2. A new cache-tree

[PATCH v2] index-format.txt: be more liberal on what can represent invalid cache tree

2012-12-12 Thread Nguyễn Thái Ngọc Duy
We have been writing -1 as invalid since day 1. On that same day we accept all negative entry counts as invalid. So in theory all C Git versions out there would be happy to accept any negative numbers. JGit seems to do exactly the same. Correct the document to reflect the fact that -1 is not the

Re: [PATCH v2] index-format.txt: be more liberal on what can represent invalid cache tree

2012-12-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: How would that work with existing versions? If you write -2 in cache-tree, the next time 1.8.0 updates cache tree it writes -1 back. That loses whatever information you attach to -2. A new cache-tree extension is probably better. You can