Subject: Re: git-svn: File was not found in commit

From: Morgan Christiansson <[email-masked]>
Date: Mon, 12 Jan 2009 14:45:35 +0100

Eric Wong wrote:
> Eric Wong <[email-masked]> wrote:
>   
>> Morgan Christiansson <[email-masked]> wrote:
>>     
>>> The "Ignoring path" message appears to be coming from git which is  
>>> refusing to commit the .git directory. Which leads to git-svn being  
>>> unaware of the files being ignored and giving an error when it can't  
>>> find them.
>>>       
>>> I'm personally fine with these files being ignored by git, but git-svn  
>>> needs to be aware that they are not added to the repository.
>>>       
>> Hi Morgan,
>> Can you try the following rough patch and see it it fixes things
>> for you?  Thanks!
>>     
>
> Actually, I think this patch is broken (my quickly put together test
> case was insufficient)...
>   

Yes it was. apply_textdelta() is never called for my repo so it has no 
effect.

I've attached an updated and simplified version of the testcase you sent 
that correctly triggers the bug i reported.

I'm not a native perl coder though so I don't think I would be able to 
provide a clean fix for this. But I've traced through enough of the 
program to see that the .git directories should be filtered out as early 
as possible to mimick the behaviour of git.

get_log() has a callback as it's last argument which gets called once 
per commit, nesting this callback in a new callback which filters the 
illegal paths out would work.

Also in gs_do_fetch_loop_common() after get_log() and before 
do_git_commit() it's possible to filter them.

Regards,
Morgan