code: def get_gitdiff(filenode_old, filenode_new, ignore_whitespace=True):
      
  
      for filenode in (filenode_old, filenode_new):
          if not isinstance(filenode, FileNode):
              raise VCSError("Given object should be FileNode object, not %s"
                  % filenode.__class__)
  
      old_raw_id = getattr(filenode_old.changeset, 'raw_id', '0' * 40)
      new_raw_id = getattr(filenode_new.changeset, 'raw_id', '0' * 40)
  
      repo = filenode_new.changeset.repository
      vcs_gitdiff = repo.get_diff(old_raw_id, new_raw_id, filenode_new.path,
                                   ignore_whitespace)
  
      return vcs_gitdiff
docs: Returns git style diff between given ``filenode_old`` and ``filenode_new``.
  
      :param ignore_whitespace: ignore whitespaces in diff