We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a9f8c5 commit df6fa49Copy full SHA for df6fa49
1 file changed
git/repo/base.py
@@ -697,6 +697,19 @@ def _get_untracked_files(self, *args, **kwargs):
697
finalize_process(proc)
698
return untracked_files
699
700
+ def get_ignored(self, *paths):
701
+ """Checks if paths are ignored via .gitignore
702
+ Doing so using the "git check-ignore" method.
703
+
704
+ :param paths: List of paths to check whether they are ignored or not
705
+ :return: sublist of ignored paths
706
+ """
707
+ try:
708
+ proc = self.git.check_ignore(*paths)
709
+ except GitCommandError:
710
+ return []
711
+ return proc.replace("\\\\", "\\").replace('"', "").split("\n")
712
713
@property
714
def active_branch(self):
715
"""The name of the currently active branch.
0 commit comments