accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <>
Subject [ATTN] Cleaning up extra refs in git
Date Wed, 02 Mar 2016 23:14:44 GMT
(tl;dr version: I'm going to clean up refs/remotes/** in git, which
contains duplicate history and messes with 'git clone --mirror'; these are
refs which are neither branches nor tags and leftover from git-svn)

So, when we switched from svn to git, there were a lot of leftover refs
left in the git repository that are from old branches/history which has
already been merged into the branches/tags that we've since created. I
think these were leftover from weird git-svn behavior. These can, and
should, be cleaned up.

You can see all of them when you do a:
git ls-remote origin

In that output, our current branches are the refs/heads/*, and our tags are
the refs/tags/*
The extras which need to be cleaned up are the refs/remotes/* (including

As you can see, these are duplicates of branches which have been merged in
already, or temporary tags which didn't make it to a release (release
candidates) but whose relevant history is already in our normal git
history, or they are branches which were abandoned on purpose

Usually these extra refs don't present a problem, because we don't normally
see them when we clone (they aren't branches which are normally fetched).
However, there are a few cases where this is a problem. In particular, they
show up when you do "git clone --mirror", and if you push this mirror to
another git repository, like a GitLab mirror (git push --mirror), they show
up as extra branches which don't appear to exist in the original (a very
confusing situation for a "mirror").

The interesting thing about these, is that even when they have the same
history as the git branches/tags we maintain now, the SHA1s don't match up.
This seems to imply they were leftover from a previous invocation of

So, what I'd like to do is go through each of these extra refs one by one,
and figure out if we already have this history in our branches/tags. If we
do, then I'd delete these extras. If we don't (as in the case of
ACCUMULO-722), I'd just convert that to a normal git branch (refs/heads/*)
until we decide what to do with it at some future point in time (for
example, perhaps do a 'git format-patch' on it and attach the files to the
"Won't Fix" ticket so we can delete the dead branch? not sure, but that can
be deferred).

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message