/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/tree.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:
1603
1603
            if e.errno == errno.ENOENT:
1604
1604
                # Entry was removed; keep it listed, but mark it as gone.
1605
1605
                blobs[path] = (ZERO_SHA, 0)
1606
 
            elif e.errno == errno.EISDIR:
1607
 
                # Backwards compatibility with Dulwich < 0.19.12;
1608
 
                # newer versions of Dulwich return either an entry for the
1609
 
                # submodule or None for directories.
 
1606
            else:
 
1607
                raise
 
1608
        else:
 
1609
            if live_entry is None:
 
1610
                # Entry was turned into a directory.
 
1611
                # Maybe it's just a submodule that's not checked out?
1610
1612
                if S_ISGITLINK(index_entry.mode):
1611
1613
                    blobs[path] = (index_entry.sha, index_entry.mode)
1612
1614
                else:
1613
 
                    # Entry was turned into a directory
1614
1615
                    dirified.append((path, Tree().id, stat.S_IFDIR))
1615
1616
                    store.add_object(Tree())
1616
1617
            else:
1617
 
                raise
1618
 
        else:
1619
 
            if live_entry is None:
1620
 
                # Entry was turned into a directory
1621
 
                dirified.append((path, Tree().id, stat.S_IFDIR))
1622
 
                store.add_object(Tree())
1623
 
            else:
1624
1618
                mode = live_entry.mode
1625
1619
                if not trust_executable:
1626
1620
                    if mode_is_executable(index_entry.mode):