Consider adding pruning of refs to git maintenance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remote-tracking refs accumulate quickly in large repositories as users
merge and delete their branches. While these branches are cleaned up
on the remote, local repositories may retain stale references to
deleted branches unless explicitly pruned. The number of local refs
can have an impact on git performance of several commands.

Git currently provides two ways for orphan local refs to be cleaned up —
1. Automated: `fetch.prune` and `fetch.pruneTags` configurations with
`git fetch/pull`
2. Manual: `git remote prune`

However, both approaches have issues:
- Full `git fetch/pull` operations are expensive on large
repositories, pulling thousands of irrelevant refs
- Manual `git remote prune` requires user intervention

Proposal:
Add remote pruning to the daily `git-maintenance` task. This would
clean stale refs automatically without requiring full fetches or
manual intervention.

This is especially useful for users who historically pulled all
refs/tags but now use targeted fetches. Moreover, it decouples the
cleanup action (pruning) from the action to fetch more refs.

Happy to submit on a patch for the same unless there's something
obvious that I've missed here.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux