Merge "ignore staged files that are not notes"

This commit is contained in:
Jenkins 2017-02-06 15:22:47 +00:00 committed by Gerrit Code Review
commit 584e666bca
1 changed files with 6 additions and 3 deletions

View File

@ -913,13 +913,16 @@ class Scanner(object):
changes = porcelain.get_tree_changes(self._repo)
for fname in changes['add']:
fname = fname.decode('utf-8')
tracker.add(fname, None, '*working-copy*')
if fname.startswith(prefix) and _note_file(fname):
tracker.add(fname, None, '*working-copy*')
for fname in changes['modify']:
fname = fname.decode('utf-8')
tracker.modify(fname, None, '*working-copy*')
if fname.startswith(prefix) and _note_file(fname):
tracker.modify(fname, None, '*working-copy*')
for fname in changes['delete']:
fname = fname.decode('utf-8')
tracker.delete(fname, None, '*working-copy*')
if fname.startswith(prefix) and _note_file(fname):
tracker.delete(fname, None, '*working-copy*')
# Process the git commit history.
for counter, entry in enumerate(self._topo_traversal(branch), 1):