This line is actually mis-parenthesized. The parens need to go around the assignment to `error` in order to get the right precedence. It should read:

```c
if ((error = git_repository_head(&head, repo)) < 0)
   ...
```