Boost logo

Boost :

Subject: Re: [boost] [git] [filesystem] [system] [timer...] Remove useless SVN branches?
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-08-18 09:16:24


2014-08-18 16:55 GMT+04:00 Beman Dawes <bdawes_at_[hidden]>:

> Boost library repos converted from Subversion are littered with branches
> created by the conversion process that seem to me to be quite useless. For
> example, Boost filesystem has 65 branches, yet only 10 or so have any
> usefulness I'm aware of. A lot of the useless branches have names that
> begin "sandbox" or "svn-". I go back to the subversion repo when I want to
> look at pre-git-conversion history.
>
> Is there any point in retaining these branches?
>
> Does anyone object if I remove these branches from the libraries where I am
> the maintainer?
>
> What are other maintainers doing about stale branches?
>

I've hidden them. They do not show up now, but can be restored in case of
very big need.

Some time ago there was a discussion called "[boost] [git] Are we free to
delete old branches?"
David Abrahams suggested creating 'hidden' refs for old branches and
then deleting stale branches. Here is what he told about hidden branches:

Branches and tags are refs (seen in .git/refs/heads and .git/refs/tags
respectively). They can be referred to by their shorthand name
(e.g. "master") or their fully-elaborated path ("refs/heads/master")

A "hidden ref" is a branch with a non-standard path, under refs/ but not
under refs/heads/

So, to hide a remote branch, you might:

  git push origin <thebranch>:refs/hidden/<thebranch> # create non-std ref
  git push origin :<thebranch> # delete the old ref

There are various tools around for making this kind of stuff easier,
e.g., I have this in my .gitconfig for *local* hiding:

[alias]
        hide = "!f() { git update-ref refs/hidden/$1 $1 && git branch -D
$1; }; f"
        unhide = "!f() { git branch $1 && git update-ref $1 refs/hidden/$1;
}; f"
        hidden = "!f() { git show-ref | grep hidden; }; f"

Also, see .https://github.com/csonto/git-private

-- 
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk