aboutsummaryrefslogtreecommitdiff
path: root/receive-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'receive-pack.c')
-rw-r--r--receive-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/receive-pack.c b/receive-pack.c
index 1a141dc1e..a20bc924d 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -120,7 +120,8 @@ static int update(struct command *cmd)
"but I can't find it!", new_hex);
}
if (deny_non_fast_forwards && !is_null_sha1(new_sha1) &&
- !is_null_sha1(old_sha1)) {
+ !is_null_sha1(old_sha1) &&
+ !strncmp(name, "refs/heads/", 11)) {
struct commit *old_commit, *new_commit;
struct commit_list *bases, *ent;