git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problem with git filter-branch

From
Mike Hommey <mh@glandium.org>
Date
Oct 25, 2008, 20:40 UTC
Message-ID
<20081025204012.GA26295@glandium.org>
In-Reply-To
<alpine.DEB.1.00.0810252235040.22125@pacific.mpi-cbg.de.mpi-cbg.de>
On Sat, Oct 25, 2008 at 10:36:26PM +0200, Johannes Schindelin wrote:
Show 21 quoted lines
> Hi,
> 
> On Sat, 25 Oct 2008, Pascal Obry wrote:
> 
> > Anyway, I used to run the following command:
> > 
> > $ git filter-branch --tag-name-filter cat --parent-filter "sed -e
> > 's/^$/-p c96d4da294667de1800687d25340551683153002/'" svn-release_2_6
> > 
> > without problem, I now get this:
> > 
> > Namespace refs/original/ not empty
> > rm: cannot remove directory
> > `/home/obry/dev/repositories/git/proj/.git-rewrite': Directory not empty
> 
> It is a (maybe ill-conceived) feature.  When branches are rewritten, their 
> original versions are stored in the refs/original/ namespace.  You can 
> force overwriting with "-f".
> 
> I wonder if people would like to have this feature removed; reflogs should 
> be enough.

I have never have had use for the refs/original namespace, and I used filter-branch more than a couple of times. Though I would certainly understand that people would not be confident enough not to have a parachute. Reflog would indeed be enough, as long as it is not branch@{42000} that needs to be used. Haven't checked, but theorically, it should be branch@{1} in all cases, so no problem here.

Mike
Previous: Johannes SchindelinNext: Pascal Obry
Message 3 of 5 in “Problem with git filter-branch”
  1. Pascal ObryOct 25, 2008
  2. Johannes SchindelinOct 25, 2008
  3. Mike HommeyOct 25, 2008
  4. Pascal ObryOct 25, 2008
  5. Jeff KingOct 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.