From: Jens Lindström Date: Fri, 23 May 2014 10:29:45 +0000 (+0200) Subject: remote: repack packed-refs once when deleting multiple refs X-Git-Tag: v2.0.1~7^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c9e768bb77762765f739fffb5c09d0888f3de20e?hp=c9e768bb77762765f739fffb5c09d0888f3de20e remote: repack packed-refs once when deleting multiple refs When 'git remote rm' or 'git remote prune' were used in a repository with many refs, and needed to delete many remote-tracking refs, a lot of time was spent deleting those refs since for each deleted ref, repack_without_refs() was called to rewrite packed-refs without just that deleted ref. To avoid this, call repack_without_refs() first to repack without all the refs that will be deleted, before calling delete_ref() to delete each one completely. The call to repack_without_ref() in delete_ref() then becomes a no-op, since packed-refs already won't contain any of the deleted refs. Signed-off-by: Jens Lindström Signed-off-by: Junio C Hamano ---