]> git.ipfire.org Git - thirdparty/git.git/commit
remote rm: handle symbolic refs correctly
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 18 Jun 2016 04:15:11 +0000 (06:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jun 2016 18:38:18 +0000 (11:38 -0700)
commit29a7cf96441241a291edca8136ab3cc80201e7ee
tree883fa183dd1da8903da9222c02562ce07dc5cd96
parentc5f04dddb6cf5f76adfe145de3565411711255b8
remote rm: handle symbolic refs correctly

In the modern world of reference backends, it is not OK to delete a
symref by unlink()ing the file directly. This must be done via the refs
API.

We do so by adding the symref to the list of references to delete along
with the non-symbolic references, then calling delete_refs() with the
new flags option set to REF_NODEREF.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c