get_sha1() - fix infinite loop on nonexistent stage.

Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/sha1_name.c b/sha1_name.c
index ec5cd2c..dc68355 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -498,6 +498,7 @@
 				memcpy(sha1, ce->sha1, 20);
 				return 0;
 			}
+			pos++;
 		}
 		return -1;
 	}