/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/tests/test_workingtree.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-01-19 19:20:59 UTC
  • mfrom: (7452.1.1 git-submodule-not-checked-out)
  • Revision ID: breezy.the.bot@gmail.com-20200119192059-ad3bxkjwn9k212l0
Don't show submodules that are not checked out as deltas.

Merged from https://code.launchpad.net/~jelmer/brz/git-submodule-not-checked-out/+merge/377807

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
        t.add(b"a", S_IFGITLINK, a.id)
276
276
        self.store.add_object(t)
277
277
        self.expectDelta([], tree_id=t.id)
 
278
 
 
279
    def test_submodule_not_checked_out(self):
 
280
        a = Blob.from_string(b'irrelevant\n')
 
281
        with self.wt.lock_tree_write():
 
282
            (index, index_path) = self.wt._lookup_index(b'a')
 
283
            index[b'a'] = IndexEntry(0, 0, 0, 0, S_IFGITLINK, 0, 0, 0, a.id, 0)
 
284
            self.wt._index_dirty = True
 
285
        os.mkdir(self.wt.abspath('a'))
 
286
        t = Tree()
 
287
        t.add(b"a", S_IFGITLINK, a.id)
 
288
        self.store.add_object(t)
 
289
        self.expectDelta([], tree_id=t.id)