diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-10-04 00:30:01 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-10-08 02:28:02 +0200 |
| commit | 517bda196e711b8fdf39735e74112503bbd8fcee (patch) | |
| tree | b4ed3c1df9460ebbcfdc2f1485a0f31b6d5a3678 /src/refs.c | |
| parent | 4a3b18a62f99c836900c76d480ae33933098461c (diff) | |
| download | libgit2-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.c | 3 |
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" */ |
