Commits

Augie Fackler committed b544d3d

dirstate: respect .git/info/exclude ignores

  • Participants
  • Parent commits ba246aa

Comments (0)

Files changed (2)

File hgit/gitdirstate.py

 
     @hgutil.propertycache
     def _ignore(self):
-        # TODO find all gitignore files, use git excludes as well
-        files = [self._join('.gitignore')]
+        # TODO find all gitignore files
+        files = [self._join('.gitignore'), self._join(
+            os.path.join('.git', 'info', 'exclude'))]
         for name, path in self._ui.configitems("ui"):
             if name == 'ignore' or name.startswith('ignore.'):
                 files.append(hgutil.expandpath(path))

File tests/test-hgit-ignore-support.t

   $ echo b* >> .gitignore
   $ echo foo > foo
   $ mkdir dir
+  $ touch bogon.6
   $ echo fail > dir/fail
   $ echo boo > boo
   $ echo boo > dir/boo
+  $ echo '*.6' >> .git/info/exclude
   $ hg status
   ? .gitignore
   ? dir/fail