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

Re: jgit and ignore

From
Ferry Huberts (Pelagic) <ferry.huberts@pelagic.nl>
Date
Mar 4, 2009, 17:50 UTC
Message-ID
<49AEBF72.3030901@pelagic.nl>
In-Reply-To
<200903012124.46600.robin.rosenberg.lists@dewire.com>
Robin Rosenberg wrote:
Show 8 quoted lines
> Shawn writes:
>> Tor Arne Vestbø <torarnv@gmail.com> wrote:
>>> To me that means that EGit should focus just as much on integrating with
>>> Eclipse properly as it does on keeping command line porcelain
>>> interoperability.
>> Yup, I agree completely.  I think Robin would too.
> 100% (or close).
> 
Hey guys

I'm currently refactoring the code to accomodate all of your wishes and I've already come a long way.

==> The one thing that I still need to do is get to the global core.excludefile setting. How can I do that?

How will it work? Read on... :-)

Suppose we have FILE in DIRECTORY and we want to see whether FILE is ignored. (FILE can ofcourse also be a DIR)

The way in which ignores will be evaluated is: 1- See if there is a .gitignore file in DIRECTORY. if so, try to match. when a match is found: FILE is ignored. if there is no .gitignore file or when no match is found: go one directory up (towards the checkout root/workdir) and repeat until a match is found or until the .gitignore in the checkout root/workdir has been evaluated. 2- use the patterns from .git/info/exclude (if exists) and try to match. when a match is found: FILE is ignored. 3- use the patterns from .git/config:core.excludesfile (when set) and try to match. when a match is found: FILE is ignored. 4- when .git/config:core.excludesfile was not set, use the patterns from global:core.excludesfile (when set) and try to match. when a match is found: FILE is ignored. 5- try to match against the Eclipse global Team ignores. when a match is found: FILE is ignored. 6- FILE is not ignored

hope this flow is what you want :-)
Ferry
Previous: Robin RosenbergNext: Ferry Huberts (Pelagic)
Message 17 of 23 in “jgit and ignore”
  1. Jon SmirlFeb 28, 2009
  2. Shawn O. PearceFeb 28, 2009
  3. Ferry Huberts (Pelagic)Mar 1, 2009
  4. Jon SmirlMar 1, 2009
  5. Ferry Huberts (Pelagic)Mar 1, 2009
  6. Tor Arne VestbøMar 1, 2009
  7. Ferry Huberts (Pelagic)Mar 1, 2009
  8. Tor Arne VestbøMar 1, 2009
  9. Shawn O. PearceMar 1, 2009
  10. Tor Arne VestbøMar 1, 2009
  11. Shawn O. PearceMar 1, 2009
  12. Tor Arne VestbøMar 1, 2009
  13. Shawn O. PearceMar 1, 2009
  14. Ferry Huberts (Pelagic)Mar 1, 2009
  15. Shawn O. PearceMar 1, 2009
  16. Robin RosenbergMar 1, 2009
  17. Ferry Huberts (Pelagic)Mar 4, 2009
  18. Ferry Huberts (Pelagic)Mar 1, 2009
  19. Jon SmirlMar 1, 2009
  20. Tor Arne VestbøMar 1, 2009
  21. Jon SmirlMar 1, 2009
  22. Tor Arne VestbøMar 1, 2009
  23. Robin RosenbergMar 1, 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.