zed-industries/zed · error

cannot blame binary file

Error message

cannot blame binary file {:?} at revision {revision}

What it means

Raised while producing a blame for a buffer: the file at the given repository path is binary at the requested revision, so `git blame` cannot produce line-level attribution. The operation is rejected rather than returning meaningless output.

Solutions

  1. Blame a text revision of the file instead
  2. Verify the correct file path and revision were passed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/project/src/git_store.rs:10138 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20). Data as JSON: /api/errors/51516ebfe9cdbac9. Report an issue: GitHub.

Appendix: source

Thrown at crates/project/src/git_store.rs:10152

        let worker_task = cx.spawn(async move |this, cx| {
            let Some(state) = state.await.log_err() else {
                return;
            };
            if let Some(git_hosting_provider_registry) =
                cx.update(|cx| GitHostingProviderRegistry::try_global(cx))
            {
                git_hosting_providers::register_additional_providers(
                    git_hosting_provider_registry,
                    state.backend.clone(),
                )
                .await;
            }
            let state = RepositoryState::Local(state);
            let mut jobs = VecDeque::new();
            loop {
                while let Ok(next_job) = job_rx.try_recv() {
                    jobs.push_back(next_job);
                }

                if let Some(job) = jobs.pop_front() {
                    if let Some(current_key) = &job.key
                        && jobs
                            .iter()
                            .any(|other_job| other_job.key.as_ref() == Some(current_key))
                    {
                        let skipped_job_id = job.id;
                        this.update(cx, |repo, _| {
                            repo.job_debug_queue.mark_complete(
                                skipped_job_id,
                                job_debug_queue::CompletedJobStatus::Skipped,
                            );
                        })
                        .ok();
                        continue;
                    }
                    (job.job)(state.clone(), cx).await;

View on GitHub (pinned to 916fc2b8cb)