Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Determining if a file is ignored via .gitignore
Determining if a file is ignored via .gitignore [message #1837415] Fri, 29 January 2021 15:24 Go to next message
Sam Brannen is currently offline Sam BrannenFriend
Messages: 1
Registered: January 2021
Junior Member
Is it possible to determine if a given file would be ignored by .gitignore using the JGit Java APIs?
Re: Determining if a file is ignored via .gitignore [message #1837433 is a reply to message #1837415] Fri, 29 January 2021 19:58 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Sure, use WorkingTreeIterator.isEntryIgnored().
Find a complete example in EGit's RepositoryUtil [1].

[1] https://git.eclipse.org/r/plugins/gitiles/egit/egit/+/refs/heads/master/org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryUtil.java#743
Previous Topic:Single Branch Fetch
Next Topic:What is the difference in the INDEX file format compared to the Git bash?
Goto Forum:
  


Current Time: Thu Apr 25 06:52:37 GMT 2024

Powered by FUDForum. Page generated in 0.04798 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top