def get_unstaged_changes(index, root_path):
 if (not isinstance(root_path, bytes)):
  root_path = root_path.encode(sys.getfilesystemencoding())
 for (tree_path, entry) in index.iteritems():
  full_path = _tree_to_fs_path(root_path, tree_path)
  try:
   blob = blob_from_path_and_stat(full_path, os.lstat(full_path))
  except OSError as e:
   if (e.errno != errno.ENOENT):
    raise
   (yield tree_path)
  else:
   if (blob.id != entry.sha):
    (yield tree_path)

def get_unstaged_changes ( index , root_path ) : if ( not isinstance ( root_path , bytes ) ) : root_path = root_path . encode ( sys . getfilesystemencoding ( ) ) for ( tree_path , entry ) in index . iteritems ( ) : full_path = _tree_to_fs_path ( root_path , tree_path ) try : blob = blob_from_path_and_stat ( full_path , os . lstat ( full_path ) ) except OSError as e : if ( e . errno != errno . ENOENT ) : raise ( yield tree_path ) else : if ( blob . id != entry . sha ) : ( yield tree_path )
walk through an index and check for differences against working tree .