Commit 805c81594dad1ad5758e78490f1c9d46b42cd41c

nulltoken 2012-07-06T20:44:17

revparse: unfound previous head return ENOTFOUND

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/revparse.c b/src/revparse.c
index af0b055..574392f 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -178,6 +178,8 @@ static int walk_ref_history(git_object **out, git_repository *repo, const char *
 				} else {
 					regmatch_t regexmatches[2];
 
+					retcode = GIT_ENOTFOUND;
+
 					refloglen = git_reflog_entrycount(reflog);
 					for (i=refloglen-1; i >= 0; i--) {
 						const char *msg;