add_packed_ref(): teach function to overwrite existing refs
authorMichael Haggerty <mhagger@alum.mit.edu>
Fri, 23 Jun 2017 07:01:20 +0000 (09:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Jun 2017 20:27:32 +0000 (13:27 -0700)
commit2f108821666a968940f171d52d4d0745a3002b35
tree0f9ef0b225a604b75b6c381b8d6f248485fd6307
parent74195c69adb922b32a93d5885004337c892e9bc3
add_packed_ref(): teach function to overwrite existing refs

Teach `add_packed_ref()` to overwrite an existing entry if one already
exists for the specified `refname`. This means that we can call it
from `files_pack_refs()`, thereby reducing the amount that the latter
function needs to know about the internals of packed-reference
handling.

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