Skip to content

Commit

Permalink
transport-helper: die early on encountering deleted refs
Browse files Browse the repository at this point in the history
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 <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Sverre Rabbelier authored and Junio C Hamano committed Jul 19, 2011
1 parent a515ebe commit 105fe3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions transport-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,10 @@ static int push_refs_with_export(struct transport *transport,
}
free(private);

if (ref->deletion) {
die("remote-helpers do not support ref deletion");
}

if (ref->peer_ref)
string_list_append(&revlist_args, ref->peer_ref->name);

Expand Down

0 comments on commit 105fe3e

Please sign in to comment.