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 ec5cd2c..dc68355 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;
        }