# Fix PR thread upstream tracking for fork branches · gitcafe/t3code

[View on GitCafe](https://git.cafe/gitcafe/t3code/commit/268016d872e724bd996fcd585835d169db903814)

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

Visibility: public

Requested revision: 268016d872e724bd996fcd585835d169db903814

Requested commit: 268016d872e724bd996fcd585835d169db903814

Commit: 268016d872e724bd996fcd585835d169db903814

Tree: fc2e4fec7fd4a3f8707329cae8ba1547b1d5a967

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Fix PR thread upstream tracking for fork branches

- Restore/set upstream tracking when preparing local and reused PR worktrees
- Derive fork `owner/repo` from PR URL when GitHub omits `headRepositoryNameWithOwner`
- Expand GitManager tests to cover local mode, URL-derived fork identity, and reused worktree upstream recovery

```

## Parents

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

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