After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684400 - Have meld use the .gitignore to limit scanned dir/files
Have meld use the .gitignore to limit scanned dir/files
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: meld-maint
meld-maint
: 711458 (view as bug list)
Depends on: 684587
Blocks:
 
 
Reported: 2012-09-19 19:47 UTC by Eric.Chamberland
Modified: 2014-03-31 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eric.Chamberland 2012-09-19 19:47:52 UTC
I have a git repository in which I have a .gitignore file which have the following entry:
TV*

TV is in fact a subdirectory which holds thousands of files and subdirectories...

Now when I start MELD, I can see it is scanning ALL the files under TV, even if TV* appears in my .gitignore.

I recommend to have meld not to scan further down a directory if the file pattern is telling to ignore it.

Thank you,

Eric
Comment 1 Kai Willadsen 2012-09-20 20:30:15 UTC
Just to clarify, when are you seeing this scanning occur? Is this just when using the non-flattened view in VC view, or something else?
Comment 2 Eric.Chamberland 2012-09-20 20:35:43 UTC
It occurs when:

1- At the very beginning when I launch "meld ." on the git repository 
2- If you change what to view with the last 5 icons (flatten, modified, normal, non vc, ignored)

You can see it in the status bar at the bottom of the window.

Is it this you wanted to clarify?

Eric
Comment 3 Kai Willadsen 2012-09-21 21:48:30 UTC
Yes, thanks.

So there are a couple of problems here... the primary fix (not descending ignored directories) isn't that hard. However, the main roadblock is that I can't get Git to give me a list of ignored directories, only files. It appears that this would be solvable with a newer git requirement, but until we bump the git version requirement, I don't know that this is going to happen.

(Reliably trying to parse gitignore stuff ourselves is a futile exercise. We need to rely on git to do it for us.)
Comment 4 Igal 2013-11-07 21:58:09 UTC
+1 

What about using the 'git difftool' command to give you the changed files list, vs asking git for the ignored files/folders? For example: 
$ git difftool -y -x echo

Meld should provide a way to skip VC ignored files/folders or it renders itself obsolete/irrelevant. There are two ways to solve this:

1) Change the design decision: enable "File Filters" files/folders in VC mode (or add equivalent option)

2) For every supported VC, use whichever method to figure out the staging/change list.

I love using meld but for now I had to switch to vimdiff (which works via git difftool). "$ meld ." is just too inefficient to be usable, takes too much time to load when there's a large number of files in the project
Comment 5 Kai Willadsen 2013-11-09 22:02:54 UTC
*** Bug 711458 has been marked as a duplicate of this bug. ***
Comment 6 Kai Willadsen 2014-03-29 20:21:50 UTC
This problem should be fixed for git in current head. Individual VC backends will need to support identifying ignored folders in order for it to work elsewhere; I believe some already do, but haven't checked non-git options.

Thanks for the bug report.
Comment 7 Eric.Chamberland 2014-03-31 12:49:08 UTC
(In reply to comment #6)
> This problem should be fixed for git in current head. Individual VC backends
> will need to support identifying ignored folders in order for it to work
> elsewhere; I believe some already do, but haven't checked non-git options.
> 
> Thanks for the bug report.

Great!  Thanks a lot! :-)

Eric
Comment 8 Igal 2014-03-31 16:14:02 UTC
Good work guys! Confirming that top of meld master is now working as expected.

A side note/quest: 
Ubuntu 13.10 is using meld version 1.8.1, while the fix seems to be on head  of 3.11.1. Does anyone know how and/or when this head will be picked up by Ubuntu devs? Also, how can I contribute to this process?
Comment 9 Luc Pi 2014-03-31 16:31:30 UTC
Igal, ask here: https://launchpad.net/meld