Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] .gitignored files decoration

In the method documentation I can see:

The method returns the list of ignored files and folders. Only the root folder of an ignored folder hierarchy is reported. If a/b/c is listed in the .gitignore then you should not expect a/b/c/d/e/f to be reported here. Only a/b/c will be reported. Furthermore only ignored files / folders are returned that are NOT in the index

 

I would expect that all folders below an .gitignored folder are also ignored (e/f folders with their corresponding files should show up as ignored). If this is not the case we would need to analyze .gitignore file(s) explicitly (with a good caching mechanism)

 

Regards, Sergio

 

From: orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Matthias Sohn
Sent:
יום ג 03 נובמבר 2015 11:49
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Cc: Epstein, Tomer <tomer.epstein@xxxxxxx>
Subject: Re: [orion-dev] .gitignored files decoration

 

On Tue, Nov 3, 2015 at 7:03 AM, Rozenszajn, Sergio <sergio.rozenszajn@xxxxxxx> wrote:

Hi,

 

In our web IDE client we are requested to provide a decoration for .gitignored files.

I found that it is possible to PUT ignored files in .gitignore using GitServlet.java via GitIgnoreHandlerV1.java.

Unfortunately only PUT is supported and we would need a GET to get all ignored files in a project.

Another thing that I noticed in GitIgnoreHandlerV1 is that if you call it multiple times with same path, it will be added multiple times to .gitignore.

 

Note that native git supports listing ignored files via command git ls-files --others -i --exclude-standard.

 

Questions:

·         is there a way to get all .gitignored files in Orion or it is just missing?

·         If we have to code this by ourselves (we did not decide yet if to code it in client or server)  is possible to list .gitignored files with jgit?

using JGit create an IndexDiff and call getIgnoredNotInIndex()

 

In EGit we cache the IndexDiff and incrementally update it based on events emitted by the resource model in

the Eclipse platform when files in the workspace change in order to improve performance. The EGit staging view

basically displays the cached IndexDiff and is updated incrementally based on incremental IndexDiff updates

which are computed in a resource change event listener.

 

-Matthias


Back to the top