Skip to content

Conversation

@relaxcn
Copy link

@relaxcn relaxcn commented Dec 13, 2025

This is because the git command parameter --skip doesn't work correctly if it's used with --follow.

So I use a cursor-based pagination approach (using commit hash + ^ notation) to reliably fetch the next page of file history.

Closes #44591

Release Notes:

  • Fixed file history view shows duplicate entries when clicking on Load More.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 13, 2025
…Load More`

This is because the git command parameter `--skip` doesn't work
correctly if it's used with `--follow`
Copy link
Contributor

@cameron1024 cameron1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution 🙏 Small tweak needed but otherwise looking good

uint64 repository_id = 3;
string path = 4;
uint64 skip = 5;
optional string last_commit_hash = 5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change the type of an existing field that goes through collab (since an old collab server may be used with a newer Zed client or vice versa).

If we replace this field with reserved 5 and add this as a new field, we should be good.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.
I will add a new field instead of removing the old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File History: Clicking on Load More creates duplicate entries

3 participants