Fix git branch -m for symrefs.
This had two problems with symrefs. First, it copied the actual sha1 instead of the "pointer", second it failed to remove the old ref after a successful rename. Given that till now delete_ref() always dereferenced symrefs, a new parameters has been introduced to delete_ref() to allow deleting refs without a dereference. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
031e6c898f
commit
eca35a25a9
2
cache.h
2
cache.h
@ -420,7 +420,7 @@ extern int commit_locked_index(struct lock_file *);
|
||||
extern void set_alternate_index_output(const char *);
|
||||
extern int close_lock_file(struct lock_file *);
|
||||
extern void rollback_lock_file(struct lock_file *);
|
||||
extern int delete_ref(const char *, const unsigned char *sha1);
|
||||
extern int delete_ref(const char *, const unsigned char *sha1, int delopt);
|
||||
|
||||
/* Environment bits from configuration mechanism */
|
||||
extern int trust_executable_bit;
|
||||
|
||||
Reference in New Issue
Block a user