git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* filter-branch --subdirectory-filter prematurely truncating history?
@ 2009-03-09 23:08 Cap Petschulat
  2009-03-10  7:00 ` Johannes Sixt
  0 siblings, 1 reply; 3+ messages in thread
From: Cap Petschulat @ 2009-03-09 23:08 UTC (permalink / raw)
  To: git

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.

Am I expecting filter-branch to do something unreasonable? Is there an
easy way to reconnect the orphaned history? Am I using the wrong tool
for the job?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: filter-branch --subdirectory-filter prematurely truncating history?
  2009-03-09 23:08 filter-branch --subdirectory-filter prematurely truncating history? Cap Petschulat
@ 2009-03-10  7:00 ` Johannes Sixt
  2009-03-11  0:37   ` Cap Petschulat
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2009-03-10  7:00 UTC (permalink / raw)
  To: Cap Petschulat; +Cc: git

Cap Petschulat schrieb:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: filter-branch --subdirectory-filter prematurely truncating history?
  2009-03-10  7:00 ` Johannes Sixt
@ 2009-03-11  0:37   ` Cap Petschulat
  0 siblings, 0 replies; 3+ messages in thread
From: Cap Petschulat @ 2009-03-11  0:37 UTC (permalink / raw)
  To: git

Johannes Sixt <j.sixt <at> viscovery.net> writes:
> A bug in this area was fixed in git v1.6.0-rc3. Which version are you using?

I was using 1.5.4.3 from Ubuntu Hardy, but I just rebuilt git from the most
recent sources and now filter-branch does what I want. Thanks for the suggestion!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-11  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 23:08 filter-branch --subdirectory-filter prematurely truncating history? Cap Petschulat
2009-03-10  7:00 ` Johannes Sixt
2009-03-11  0:37   ` Cap Petschulat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).