commit - a10877b65dbee0ad5bab8741beb23d250d097632
commit + d4a5a8855b74b1a8d44747715e9545e53d7e6634
blob - a51fefdc0e2f99ba8911531fa5ba38c3d664a020
blob + 19e8815ba5c3b4d7548b9705f9b9beba009b6cb5
--- lib/refs.c
+++ lib/refs.c
static char *
get_refs_dir_path(struct got_repository *repo, const char *refname)
{
- /* Some refs live in the .git directory. */
if (strcmp(refname, GOT_REF_HEAD) == 0 ||
strcmp(refname, GOT_REF_ORIG_HEAD) == 0 ||
strcmp(refname, GOT_REF_MERGE_HEAD) == 0 ||
- strcmp(refname, GOT_REF_FETCH_HEAD) == 0)
- return got_repo_get_path_git_dir(repo);
-
- /* Is the ref name relative to the .git directory? */
- if (strncmp(refname, "refs/", 5) == 0)
+ strcmp(refname, GOT_REF_FETCH_HEAD) == 0 ||
+ strncmp(refname, "refs/", 5) == 0)
return got_repo_get_path_git_dir(repo);
return got_repo_get_path_refs(repo);