diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-11-01 00:25:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-31 22:41:55 -0700 |
commit | 045a476f91a9a308c823a2709977163238baa3fd (patch) | |
tree | 3743a1b43643d369f1c5a6598e58a61ac44b14b4 /refs.c | |
parent | fa58186c9ba50514b36ac5ef192cd7e0bc4d7780 (diff) | |
download | git-045a476f91a9a308c823a2709977163238baa3fd.tar.gz |
update-ref --no-deref -d: handle the case when the pointed ref is packed
In this case we did nothing in the past, but we should delete the
reference in fact.
The problem was that when the symref is not packed but the referenced
ref is packed, then we assumed that the symref is packed as well, but
symrefs are never packed.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -920,7 +920,7 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt) lock = lock_ref_sha1_basic(refname, sha1, 0, &flag); if (!lock) return 1; - if (!(flag & REF_ISPACKED)) { + if (!(flag & REF_ISPACKED) || flag & REF_ISSYMREF) { /* loose */ const char *path; |