Write a script that deletes old merged Git branches
Our main Git repo already has 400+ branches, and it’s growing fast. Each branch results in a dedicated APT suite (that is, most of the time, empty). Keeping all those branches will also make the process of detecting active ones (form sysadmin#6196 (closed)) slower.
We should detect, and delete, at least Git branches that were merged
into a released tag. We already have code in
auto/scripts/tails-custom-apt-sources, in the main Tails Git
repository, to detect released tags. That could be reused somehow. An
initial implementation might copy’n’paste the logic or the code, but in
the end we should factor this out into a library or set of small utility
Once we have a script that can do that, we can run it once to start with, and then maybe periodically (e.g. at post-release time).
Regarding the implementation language: if the one who undertakes this mission qualifies as an expert at writing robust, secure and elegant POSIX shell, and they want to do it this way, fine. Else, better go directly for (Modern) Perl or Python. Ruby lovers can certainly pick their language of choice too, but they’d better be careful about compatibility with future Ruby versions… we spend too much time already updating our existing Ruby code to 1.9.
Sources of inspiration:
Feature Branch: feature/8617-delete-obsolete-Git-branches
Parent Task: #8617 (closed)