aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/remote.c b/remote.c
index f5bc4e726..ee0c1e54b 100644
--- a/remote.c
+++ b/remote.c
@@ -1291,6 +1291,11 @@ static inline int is_forwardable(struct ref* ref)
if (!o || o->type != OBJ_COMMIT)
return 0;
+ /* new object must be commit-ish */
+ o = deref_tag(parse_object(ref->new_sha1), NULL, 0);
+ if (!o || o->type != OBJ_COMMIT)
+ return 0;
+
return 1;
}