update-index --index-info: allow stage 0 entries.
Somehow we did not allow stuffing the index with stage 0 entries through --index-info interface. I do not think of a reason to forbid it offhand. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 31, 2006 at 18:03 UTC
2d497115129bd84790f2c1cc8cf91f1598c9094a
1 file changed
+1
-1
update-index.c
+1
-1
@@ -367,7 +367,7 @@ static void read_index_info(int line_termination)
367
if (!tab || tab - ptr < 41)
368
goto bad_line;
369
370
- if (tab[-2] == ' ' && '1' <= tab[-1] && tab[-1] <= '3') {
370
+ if (tab[-2] == ' ' && '0' <= tab[-1] && tab[-1] <= '3') {
371
stage = tab[-1] - '0';
372
ptr = tab + 1; /* point at the head of path */
373
tab = tab - 2; /* point at tail of sha1 */