Merge lp:~jelmer/brz/git-ignore into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/git-ignore
Merge into: lp:brz
Diff against target: 39 lines (+9/-2)
2 files modified
breezy/git/tests/test_blackbox.py (+7/-0)
breezy/git/workingtree.py (+2/-2)
To merge this branch: bzr merge lp:~jelmer/brz/git-ignore
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+359009@code.launchpad.net

Commit message

Fix 'brz ignore' in git working trees.

Description of the change

Fix 'brz ignore' in git working trees.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Looks good, though 'foo' is a needlessly uncreative test string.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/tests/test_blackbox.py'
2--- breezy/git/tests/test_blackbox.py 2018-11-16 23:28:26 +0000
3+++ breezy/git/tests/test_blackbox.py 2018-11-19 20:22:41 +0000
4@@ -65,6 +65,13 @@
5 self.assertEqual(error, '')
6 self.assertTrue("Standalone tree (format: git)" in output)
7
8+ def test_ignore(self):
9+ self.simple_commit()
10+ output, error = self.run_bzr(['ignore', 'foo'])
11+ self.assertEqual(error, '')
12+ self.assertEqual(output, '')
13+ self.assertFileEqual("foo\n", ".gitignore")
14+
15 def test_branch(self):
16 os.mkdir("gitbranch")
17 GitRepo.init(os.path.join(self.test_dir, "gitbranch"))
18
19=== modified file 'breezy/git/workingtree.py'
20--- breezy/git/workingtree.py 2018-11-16 23:21:31 +0000
21+++ breezy/git/workingtree.py 2018-11-19 20:22:41 +0000
22@@ -83,8 +83,6 @@
23 mode_kind,
24 )
25
26-IGNORE_FILENAME = ".gitignore"
27-
28
29 class GitWorkingTree(MutableGitIndexTree, workingtree.WorkingTree):
30 """A Git working tree."""
31@@ -1350,6 +1348,8 @@
32
33 supports_merge_modified = False
34
35+ ignore_filename = ".gitignore"
36+
37 @property
38 def _matchingcontroldir(self):
39 from .dir import LocalGitControlDirFormat

Subscribers

People subscribed via source and target branches