Skip to content

Commit

Permalink
Merge branch 'jk/push-delete-ref-error-message' into maint
Browse files Browse the repository at this point in the history
The error message from "git push $there :bogo" (and its equivalent
"git push $there --delete bogo") mentioned that we tried and failed
to guess what ref is being deleted based on the LHS of the refspec,
which we don't.

* jk/push-delete-ref-error-message:
  push: don't guess at qualifying remote refs on deletion
  • Loading branch information
Junio C Hamano committed Jul 22, 2012
2 parents 7046e75 + 5742c82 commit b120079
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,9 @@ static int match_explicit(struct ref *src, struct ref *dst,
case 0:
if (!memcmp(dst_value, "refs/", 5))
matched_dst = make_linked_ref(dst_value, dst_tail);
else if (is_null_sha1(matched_src->new_sha1))
error("unable to delete '%s': remote ref does not exist",
dst_value);
else if ((dst_guess = guess_ref(dst_value, matched_src)))
matched_dst = make_linked_ref(dst_guess, dst_tail);
else
Expand Down

0 comments on commit b120079

Please sign in to comment.