Skip to content

Commit

Permalink
Merge pull request #241 from AKSW/feature/simplifyTreeUpdateInCommit
Browse files Browse the repository at this point in the history
Simplify tree update in commit method
  • Loading branch information
splattater authored Aug 20, 2019
2 parents 80b1cea + dd7dbdd commit 049c47a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions quit/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,10 @@ def commit(self, message, author_name, author_email, **kwargs):
author = pygit2.Signature(author_name, author_email)
commiter = pygit2.Signature(commiter_name, commiter_email)

# Sort index items
items = sorted(self.stash.items(), key=lambda x: (x[1][0], x[0]))

# Create tree
tree = IndexTree(self)
while len(items) > 0:
path, (oid, mode) = items.pop(0)

for path, (oid, mode) in self.stash.items():
if oid is None:
tree.remove(path)
else:
Expand Down

0 comments on commit 049c47a

Please sign in to comment.