git: Suppress blame errors outside Git repositories (#56348)

Resolves https://github.com/zed-industries/zed/issues/55552

Git blame can be initialized for buffers that are not backed by any Git
repository. Previously, that path still called into
`Project::blame_buffer`, which returned an error because there was no
repository for the buffer. When blame was user-triggered, that error was
surfaced as a toast even though this is an expected “not applicable”
state rather than a failed Git operation.

This diff checks whether the buffer belongs to a repository before
requesting blame data. Buffers outside Git repositories now produce no
blame entries without emitting an error, while real blame failures
inside repositories continue to use the existing error notification
path.

Release Notes:
- Improved Git blame to quietly ignore files that are not part of a Git
repository.

Co-authored-by: Cole Miller <cole@zed.dev>
5b948e5aabliam committed on 5/31/2026, 11:41:08 PM· committed by GitHubparent7f826e8
1 file changedLine totals unavailable