aboutsummaryrefslogtreecommitdiff
path: root/update-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-31 18:03:37 -0800
committerJunio C Hamano <junkio@cox.net>2006-02-01 19:45:55 -0800
commit2d497115129bd84790f2c1cc8cf91f1598c9094a (patch)
tree43d6545f63fac1628b72a155460c85709a72971a /update-index.c
parentd9e2e12700e403ae5fc11193dd6e91546abd5809 (diff)
downloadgit-2d497115129bd84790f2c1cc8cf91f1598c9094a.tar.gz
git-2d497115129bd84790f2c1cc8cf91f1598c9094a.tar.xz
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>
Diffstat (limited to 'update-index.c')
-rw-r--r--update-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/update-index.c b/update-index.c
index a84a04f91..afec98dd4 100644
--- a/update-index.c
+++ b/update-index.c
@@ -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 */