<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 49: Diffuse fail with git modules because .git is a file and not a directory</title><link href="https://sourceforge.net/p/diffuse/feature-requests/49/" rel="alternate"/><link href="https://sourceforge.net/p/diffuse/feature-requests/49/feed.atom" rel="self"/><id>https://sourceforge.net/p/diffuse/feature-requests/49/</id><updated>2016-02-16T13:55:35.477000Z</updated><subtitle>Recent changes to 49: Diffuse fail with git modules because .git is a file and not a directory</subtitle><entry><title>#49 Diffuse fail with git modules because .git is a file and not a directory</title><link href="https://sourceforge.net/p/diffuse/feature-requests/49/?limit=25#469e" rel="alternate"/><published>2016-02-16T13:55:35.477000Z</published><updated>2016-02-16T13:55:35.477000Z</updated><author><name>Gur Stavi</name><uri>https://sourceforge.net/u/gstavi/</uri></author><id>https://sourceforge.netcb200f06aa9260249e5b6c902a48994f0397a14c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Development version works fine with git submodules.&lt;br/&gt;
Thanks,&lt;br/&gt;
Gur&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#49 Diffuse fail with git modules because .git is a file and not a directory</title><link href="https://sourceforge.net/p/diffuse/feature-requests/49/?limit=25#2205" rel="alternate"/><published>2016-02-15T16:32:14.312000Z</published><updated>2016-02-15T16:32:14.312000Z</updated><author><name>Derrick Moser</name><uri>https://sourceforge.net/u/dtmoser/</uri></author><id>https://sourceforge.net12680fffcdb926769cbd33f10ad287114e54793d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am not very familiar with Git submodules but I have committed an update to improve handling of them.  Please give the development version a spin.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Diffuse fail with git modules because .git is a file and not a directory</title><link href="https://sourceforge.net/p/diffuse/feature-requests/49/" rel="alternate"/><published>2016-02-15T07:53:24.766000Z</published><updated>2016-02-15T07:53:24.766000Z</updated><author><name>Gur Stavi</name><uri>https://sourceforge.net/u/gstavi/</uri></author><id>https://sourceforge.netdafa23a204d59d8d7296da49b0b01d540b2320ee</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When using git modules the directory structure is:&lt;/p&gt;
&lt;p&gt;Project&lt;br/&gt;
    .git folder&lt;br/&gt;
    .gitmodules folder&lt;br/&gt;
    Module&lt;br/&gt;
        .git file that refers to .gitmodules folder within the project&lt;/p&gt;
&lt;p&gt;When trying to use Diffuse on a file within the git module, Diffuse is looking for a '.git' folder in the function 'findByFolder'. It skips the .git file in the module because it is not a directory and finds the .git folder of the project.&lt;br/&gt;
Then git commands fail because git actually 'wants' to use the .git file.&lt;br/&gt;
Diffuse should relax the lookup for git and allow .git directory or file.&lt;/p&gt;
&lt;p&gt;A quick fix would be to change &lt;br/&gt;
if os.path.isdir(name):&lt;br/&gt;
into&lt;br/&gt;
if os.path.isdir(name) or os.path.isfile(name):&lt;/p&gt;
&lt;p&gt;But perhaps a fix that is limited to git or even checks the contents of .git file would be more complete.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br/&gt;
Gur&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>