# fix\(server\): checkpoints no longer rehash every file when an entry is flagged · pingdotgg/t3code

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

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

Visibility: public

Requested revision: 13edaac664442c8a5d73938e727a84629f71bab1

Requested commit: 13edaac664442c8a5d73938e727a84629f71bab1

Commit: 13edaac664442c8a5d73938e727a84629f71bab1

Tree: e3450f068314c514fa580b8f8a345db1b4d9edbb

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(server): checkpoints no longer rehash every file when an entry is flagged

A copied checkpoint index with any manually flagged entry (assume-unchanged,
skip-worktree outside sparse checkout, or an in-cone skip-worktree) was
discarded for a stat-less read-tree HEAD, so add -A rehashed every tracked
file and large worktrees hit the 30s timeout.

Keep the copied index and re-add only the flagged entries through
update-index --index-info on the private index. They keep mode, OID and
stage, lose their flag bits, and get an empty stat cache, so add -A rehashes
only those paths. The racy index timestamp is restored afterwards.
Out-of-cone sparse entries keep skip-worktree. Invalid UTF-8 paths, flagged
gitlinks, assume-unchanged on sparse skip-worktree entries, more than 1 MiB
of flagged records, and any failure all fall back to the fresh index.

Closes #13741

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

```

## Parents

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

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