Skip to content

Commit 105fe3e

Browse files
SRabbeliergitster
authored andcommitted
transport-helper: die early on encountering deleted refs
Remote helpers do not support deleting refs by means of the 'export' command sincethe fast-import protocol does not support it. Check explicitly for deleted refs and die early. Signed-off-by: Sverre Rabbelier <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a515ebe commit 105fe3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

transport-helper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,10 @@ static int push_refs_with_export(struct transport *transport,
746746
}
747747
free(private);
748748

749+
if (ref->deletion) {
750+
die("remote-helpers do not support ref deletion");
751+
}
752+
749753
if (ref->peer_ref)
750754
string_list_append(&revlist_args, ref->peer_ref->name);
751755

0 commit comments

Comments
 (0)