diff --git a/stagit-index.c b/stagit-index.c
@@ -19,15 +19,11 @@ static char owner[255];
// Returns true if we have a fancy README (i.e. we have a README file and it's
// Markdown). Otherwise returns false.
-bool has_fancy_readme(git_repository* repo)
+bool has_markdown_readme(git_repository* repo)
{
git_object *obj = NULL;
- int result = !git_revparse_single(&obj, repo, "HEAD:README.md");
-
- if (!result)
- result = !git_revparse_single(&obj, repo, "HEAD:README.MD");
-
- return result && (git_object_type(obj) == GIT_OBJ_BLOB);
+ return !git_revparse_single(&obj, repo, "HEAD:README.md")
+ && (git_object_type(obj) == GIT_OBJ_BLOB);
}
void joinpath(char *buf, size_t bufsiz, const char *path, const char *path2)
@@ -138,7 +134,8 @@ int writelog(FILE *fp)
fputs("<tr><td><a href=\"", fp);
xmlencode(fp, stripped_name, strlen(stripped_name));
- if (has_fancy_readme(repo))
+ printf("markdown: %x", has_markdown_readme(repo));
+ if (has_markdown_readme(repo))
fputs("/README.html\">", fp);
else
fputs("/log.html\">", fp);