moved git_files_hist to function