Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
has_sha1_file: don't bother if we are not in a repository
Most callers to this function already require that they are in a git repository, but there is an exception: "git apply" uses has_sha1_file to avoid work if the result of applying a binary patch is already present in the repository. When run outside any repository, this produces an error: fatal: BUG: setup_git_env called without repository Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
- Loading branch information