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

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

From
Morgan Christiansson <git@mog.se>
Date
Jan 12, 2009, 13:45 UTC
Message-ID
<496B497F.30109@mog.se>
In-Reply-To
<20090112051409.GB14992@dcvr.yhbt.net>
Eric Wong wrote:
Show 20 quoted lines
> Eric Wong <normalperson@yhbt.net> wrote:
>   
>> Morgan Christiansson <git@mog.se> 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

Previous: Eric WongNext: Eric Wong
Message 7 of 8 in “git-svn: File was not found in commit”
  1. Morgan ChristianssonJan 9, 2009
  2. Morgan ChristianssonJan 11, 2009
  3. Björn SteinbrinkJan 11, 2009
  4. Morgan ChristianssonJan 12, 2009
  5. Eric WongJan 12, 2009
  6. Eric WongJan 12, 2009
  7. Morgan ChristianssonJan 12, 2009
  8. Eric WongJan 19, 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.