Commit 9cc904da by Erik Aigner

repository: fix garbage return value

error was never initialized and a garbage value returned on success.
parent 2f7b6ad5
...@@ -2216,7 +2216,7 @@ int git_repository_foreach_head(git_repository *repo, ...@@ -2216,7 +2216,7 @@ int git_repository_foreach_head(git_repository *repo,
{ {
git_strarray worktrees = GIT_VECTOR_INIT; git_strarray worktrees = GIT_VECTOR_INIT;
git_buf path = GIT_BUF_INIT; git_buf path = GIT_BUF_INIT;
int error; int error = 0;
size_t i; size_t i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment