提交 2d497115 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <junkio@cox.net>
上级 d9e2e127
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册