git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git filter-branch --subdirectory-filter error
@ 2007-10-22 10:27 Jan Wielemaker
  2007-10-22 11:20 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Wielemaker @ 2007-10-22 10:27 UTC (permalink / raw)
  To: git

Hi,

Finished a big re-shuffle of a big project, while other developers
continued. Worked really well. Thanks guys! But now I have two top
directories and I want to create two new repositories, each containing
one of these directories (because the one holds copyrighted data and we
want the other to become public software). So, I happily run

	$ git filter-branch --subdirectory-filter RDF HEAD

Where RDF is an existing directory.  I get:

Rewrite 95807fe01c39d3092e3ac3a98061711323154d77 (1/12)fatal: Not a valid 
object name 95807fe01c39d3092e3ac3a98061711323154d77:RDF
Could not initialize the index

I tried the procedure on some smaller test projects and it all worked
just fine. Running git version 1.5.3.4 on SuSE Linux. Also ran "git fsck
--full", which completed without any message.

Git show says:

gollem (eculture) 121_> git show 95807fe01c39d3092e3ac3a98061711323154d77 | 
cat
commit 95807fe01c39d3092e3ac3a98061711323154d77
Merge: 76d2935... 58afb98...
Author: Jan Wielemaker <wielemak@science.uva.nl>
Date:   Thu Oct 18 17:32:22 2007 +0200

    Merge branch 'master' of /home/eculture/eculture

Any clue?  

	Thanks --- Jan

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

* Re: git filter-branch --subdirectory-filter error
  2007-10-22 10:27 git filter-branch --subdirectory-filter error Jan Wielemaker
@ 2007-10-22 11:20 ` Johannes Schindelin
  2007-10-22 11:37   ` Jan Wielemaker
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2007-10-22 11:20 UTC (permalink / raw)
  To: Jan Wielemaker; +Cc: git

Hi,

On Mon, 22 Oct 2007, Jan Wielemaker wrote:

> Finished a big re-shuffle of a big project, while other developers 
> continued. Worked really well. Thanks guys! But now I have two top 
> directories and I want to create two new repositories, each containing 
> one of these directories (because the one holds copyrighted data and we 
> want the other to become public software). So, I happily run
> 
> 	$ git filter-branch --subdirectory-filter RDF HEAD
> 
> Where RDF is an existing directory.  I get:
> 
> Rewrite 95807fe01c39d3092e3ac3a98061711323154d77 (1/12)fatal: Not a valid 
> object name 95807fe01c39d3092e3ac3a98061711323154d77:RDF
> Could not initialize the index

I guess that 95807fe01 is the parent of a commit adding the RDF/ 
directory.

The subdirectory filter does not look kindly upon a history where some 
commits lack the subdirectory in question.  However, this should work:

	git filter-branch --subdirectory--filter RDF 95807fe01..HEAD

Hth,
Dscho

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

* Re: git filter-branch --subdirectory-filter error
  2007-10-22 11:20 ` Johannes Schindelin
@ 2007-10-22 11:37   ` Jan Wielemaker
  2007-10-22 13:44     ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Wielemaker @ 2007-10-22 11:37 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Dscho,

On Monday 22 October 2007 13:20, Johannes Schindelin wrote:
> Hi,
>
> On Mon, 22 Oct 2007, Jan Wielemaker wrote:
> > Finished a big re-shuffle of a big project, while other developers
> > continued. Worked really well. Thanks guys! But now I have two top
> > directories and I want to create two new repositories, each containing
> > one of these directories (because the one holds copyrighted data and we
> > want the other to become public software). So, I happily run
> >
> > 	$ git filter-branch --subdirectory-filter RDF HEAD
> >
> > Where RDF is an existing directory.  I get:
> >
> > Rewrite 95807fe01c39d3092e3ac3a98061711323154d77 (1/12)fatal: Not a valid
> > object name 95807fe01c39d3092e3ac3a98061711323154d77:RDF
> > Could not initialize the index
>
> I guess that 95807fe01 is the parent of a commit adding the RDF/
> directory.
>
> The subdirectory filter does not look kindly upon a history where some
> commits lack the subdirectory in question.  However, this should work:
>
> 	git filter-branch --subdirectory--filter RDF 95807fe01..HEAD

Thanks, but ... hmmm.

$ git filter-branch --subdirectory-filter RDF 
95807fe01c39d3092e3ac3a98061711323154d77..HEAD
Rewrite 0a43c802dd60f53d48136a32526a4b2a5f0d43e5 (1/11)fatal: Not a valid 
object name 0a43c802dd60f53d48136a32526a4b2a5f0d43e5:RDF
Could not initialize the index

$ git show 0a43c802dd60f53d48136a32526a4b2a5f0d43e5
commit 0a43c802dd60f53d48136a32526a4b2a5f0d43e5
Merge: 49fa961... 95807fe...
Author: XXX
Date:   Thu Oct 18 17:45:26 2007 +0200

    Merge branch 'master' of 
hildebra@gollem.science.uva.nl:/home/eculture/eculture

Tried 0a43c802dd60f53d48136a32526a4b2a5f0d43e5..HEAD, just to get
another one :-( I guess this will go on a little while :-( Before I
start writing a script that performs this procedure findind a place
where it does work I'd like to share some history with you.

This started as a big project with a lot of history in CVS, including
moved (read deleted and re-created) files. This was moved to SVN and
from there immediately to GIT. In GIT lots of things have been renamed.
The RDF directory was created quite recent in the project and things
from various subdirectories were moved there.

Is there something that might be worth a try or should we go the simple
way: keeping the old combined repo for later reference and create two
new ones from fresh files?

	Cheers --- Jan

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

* Re: git filter-branch --subdirectory-filter error
  2007-10-22 11:37   ` Jan Wielemaker
@ 2007-10-22 13:44     ` Johannes Schindelin
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2007-10-22 13:44 UTC (permalink / raw)
  To: Jan Wielemaker; +Cc: git

Hi,

On Mon, 22 Oct 2007, Jan Wielemaker wrote:

> On Monday 22 October 2007 13:20, Johannes Schindelin wrote:
>
> > The subdirectory filter does not look kindly upon a history where some 
> > commits lack the subdirectory in question.  However, this should work:
> >
> > 	git filter-branch --subdirectory--filter RDF 95807fe01..HEAD
> 
> Thanks, but ... hmmm.
> 
> $ git filter-branch --subdirectory-filter RDF 
> 95807fe01c39d3092e3ac3a98061711323154d77..HEAD
> Rewrite 0a43c802dd60f53d48136a32526a4b2a5f0d43e5 (1/11)fatal: Not a valid 
> object name 0a43c802dd60f53d48136a32526a4b2a5f0d43e5:RDF
> Could not initialize the index

I suspect again that this commit does not contain the RDF/ subdirectory.

> This started as a big project with a lot of history in CVS, including 
> moved (read deleted and re-created) files. This was moved to SVN and 
> from there immediately to GIT. In GIT lots of things have been renamed. 
> The RDF directory was created quite recent in the project and things 
> from various subdirectories were moved there.
> 
> Is there something that might be worth a try or should we go the simple
> way: keeping the old combined repo for later reference and create two
> new ones from fresh files?

It sure sounds pretty tricky.  (IOW I'm probably unable to help more...)

Ciao,
Dscho

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

end of thread, other threads:[~2007-10-22 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 10:27 git filter-branch --subdirectory-filter error Jan Wielemaker
2007-10-22 11:20 ` Johannes Schindelin
2007-10-22 11:37   ` Jan Wielemaker
2007-10-22 13:44     ` Johannes Schindelin

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).