Skip to content

Commit

Permalink
update-index --index-info: allow stage 0 entries.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 2, 2006
1 parent d9e2e12 commit 2d49711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update-index.c
Expand Up @@ -367,7 +367,7 @@ static void read_index_info(int line_termination)
if (!tab || tab - ptr < 41)
goto bad_line;

if (tab[-2] == ' ' && '1' <= tab[-1] && tab[-1] <= '3') {
if (tab[-2] == ' ' && '0' <= tab[-1] && tab[-1] <= '3') {
stage = tab[-1] - '0';
ptr = tab + 1; /* point at the head of path */
tab = tab - 2; /* point at tail of sha1 */
Expand Down

0 comments on commit 2d49711

Please sign in to comment.