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

Re: filter-branch --subdirectory-filter prematurely truncating history?

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 10, 2009, 07:00 UTC
Message-ID
<49B60FF9.9020805@viscovery.net>
In-Reply-To
<loom.20090309T230424-857@post.gmane.org>
Cap Petschulat schrieb:
Show 14 quoted lines
> I'd like to spin a subdirectory of an existing git repo off in to its
> own repo while preserving history. From what I've read, I should be
> able to do this with a fresh clone followed by git filter-branch
> --subdirectory-filter MYSUBDIR, assuming I don't care about other
> branches or tags. This runs, and when it's done, I have a repo that
> contains the subdir's contents as its root. So far so good.
> 
> I would expect to see the subdir's full history when I run git log,
> but instead it cuts off prematurely, showing the first commit to be
> some relatively recent minor change I'll call FOO. In gitk, I can see
> that history prior to FOO is still around, but FOO has no parents, and
> the commit before FOO has no children. In the original repo, FOO's
> parent was the merge of a branch which no longer exists, if this
> matters.
A bug in this area was fixed in git v1.6.0-rc3. Which version are you using?
-- Hannes
Previous: Cap PetschulatNext: Cap Petschulat
Message 2 of 3 in “filter-branch --subdirectory-filter prematurely truncating history?”
  1. Cap PetschulatMar 9, 2009
  2. Johannes SixtMar 10, 2009
  3. Cap PetschulatMar 11, 2009

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.