summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-10-04 00:30:01 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-10-08 02:28:02 +0200
commit517bda196e711b8fdf39735e74112503bbd8fcee (patch)
treeb4ed3c1df9460ebbcfdc2f1485a0f31b6d5a3678 /src/refs.c
parent4a3b18a62f99c836900c76d480ae33933098461c (diff)
downloadlibgit2-517bda196e711b8fdf39735e74112503bbd8fcee.tar.gz
fetch: store FETCH_HEAD
We should always save the remote's HEAD as FETCH_HEAD locally. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/refs.c b/src/refs.c
index 1135de475..fcf771b5e 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1713,7 +1713,8 @@ static int normalize_name(char *buffer_out, size_t out_size, const char *name, i
/* Object id refname have to contain at least one slash, except
* for HEAD in a detached state or MERGE_HEAD if we're in the
* middle of a merge */
- if (is_oid_ref && !contains_a_slash && (strcmp(name, GIT_HEAD_FILE) && strcmp(name, GIT_MERGE_HEAD_FILE)))
+ if (is_oid_ref && !contains_a_slash && (strcmp(name, GIT_HEAD_FILE) && strcmp(name, GIT_MERGE_HEAD_FILE)
+ && strcmp(name, GIT_FETCH_HEAD_FILE)))
return git__throw(GIT_EINVALIDREFNAME, "Failed to normalize name. Reference name contains no slashes");
/* A refname can not end with ".lock" */