class Git::Status
def fetch_added
def fetch_added unless @base.lib.empty? # Files changed between the repo HEAD vs. the worktree # git diff-index HEAD # { file => { path: file, type: 'M', mode_index: '100644', mode_repo: '100644', sha_index: '0000000', :sha_repo: '52c6c4e' } } @base.lib.diff_index('HEAD').each do |path, data| @files[path] ? @files[path].merge!(data) : @files[path] = data end end end