# Fix git blame not working correctly with submodules \(\#10114\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c4ceeb715ad1f12fa14a188303172139446a049b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c4ceeb715ad1f12fa14a188303172139446a049b

Requested commit: c4ceeb715ad1f12fa14a188303172139446a049b

Commit: c4ceeb715ad1f12fa14a188303172139446a049b

Tree: eff1be8ff3833a0ad1580d66f20ae81f75074695

Author: Thorsten Ball

Committer: GitHub

## Message

```
Fix git blame not working correctly with submodules (#10114)

This fixes #9958 by using the correct working directory in which to run
`git blame`.

This wasn't an issue for a single repository, because we could go from
`.git` one directory up, but it doesn't work for submodules.

Luckily there's a `workdir()` method on `self.repository` that does
exactly what we need.

In submodule:

![screenshot-2024-04-03-12 37
18@2x](https://github.com/zed-industries/zed/assets/1185253/67e89abb-d04c-4e9d-802f-5b8468e0962e)

Not in submodule:

![screenshot-2024-04-03-12 37
36@2x](https://github.com/zed-industries/zed/assets/1185253/cfe59f59-798b-43e1-980d-2225db4c0302)

Release Notes:

- N/A
```

## Parents

- [58aec1de7589af080683f0bb5a54eda09e31404f](https://git.cafe/gitcafe/zed/commit/58aec1de7589af080683f0bb5a54eda09e31404f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c4ceeb715ad1f12fa14a188303172139446a049b?format=markdown)
