At work, we have some shared repositories with far too many refs in
them, which causes various issues, performance and otherwise.  We plan
to move most of the refs out of them, but for that to help users that
have already fetched all the refs into their local repositories, those
users should want to run 'git remote prune'.

It turns out that 'git remote prune' (and also 'git remote rm') has
its own rather severe performance issues relating to removing the
obsolete refs from the local repository, which I've addressed in the
following patches.  The performance improves from many CPU minutes
(long enough that I could never be bothered to let it run to
completion) to around a few seconds, when removing ~15000 refs.

Jens Lindström (2):
  remote: defer repacking packed-refs when deleting refs
  remote prune: optimize "dangling symref" check/warning

 builtin/remote.c | 25 +++++++++++++++++++++----
 refs.c           | 34 +++++++++++++++++++++++++++-------
 refs.h           |  4 ++++
 3 files changed, 52 insertions(+), 11 deletions(-)

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to