fn run_git_diff_index<F, T>(git_dir: Option<&Path>, func: F) -> TExpand description
diff-index can return outdated information, because it does not update the git index.
This function uses update-index to update the index first, and then provides func with a
command prepared to run git diff-index.