get_sha1() - fix infinite loop on nonexistent stage.
authorJunio C Hamano <junkio@cox.net>
Mon, 8 May 2006 22:44:06 +0000 (15:44 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 8 May 2006 22:44:06 +0000 (15:44 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_name.c

index ec5cd2c9ea42cfdd07a1fcac1f2c05072aa26193..dc6835520ccfd4838b47a4af81ccf139f55e1801 100644 (file)
@@ -498,6 +498,7 @@ int get_sha1(const char *name, unsigned char *sha1)
                                memcpy(sha1, ce->sha1, 20);
                                return 0;
                        }
+                       pos++;
                }
                return -1;
        }