git-update-ref: add --no-deref option for overwriting/detaching ref
git-checkout is also adapted to make use of this new option instead of the handcrafted command sequence. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
843142ada0
commit
68db31cc28
@ -209,7 +209,7 @@ static const char *update(struct command *cmd)
|
||||
return NULL; /* good */
|
||||
}
|
||||
else {
|
||||
lock = lock_any_ref_for_update(name, old_sha1);
|
||||
lock = lock_any_ref_for_update(name, old_sha1, 0);
|
||||
if (!lock) {
|
||||
error("failed to lock %s", name);
|
||||
return "failed to lock";
|
||||
|
Reference in New Issue
Block a user