# Fix flash of 'Initialize git' when switching branch/worktree · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/cf66f53a5559be6f0117118e07793acf35ea170b)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: cf66f53a5559be6f0117118e07793acf35ea170b

Requested commit: cf66f53a5559be6f0117118e07793acf35ea170b

Commit: cf66f53a5559be6f0117118e07793acf35ea170b

Tree: e8df838e4f66c0cda973a680dec6afd8cf112ca4

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Fix flash of 'Initialize git' when switching branch/worktree

branchesQuery.data is undefined while loading, so isRepo defaulted to
false — briefly showing the init button even for worktrees. Now defaults
to true while loading (only shows init when the query actually returns
isRepo: false).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

```

## Parents

- [d6ecf1580510cd7f156dbe831c68f357fe162210](https://git.cafe/pingdotgg/t3code/commit/d6ecf1580510cd7f156dbe831c68f357fe162210?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/cf66f53a5559be6f0117118e07793acf35ea170b?format=markdown)
