Support `follow` parameter with keyset pagination in Commits API (requires Gitaly change)
## Summary Enable the `follow` parameter to work with keyset pagination (`pagination=keyset`) in the Commits API. ## Parent Issue This is part of #595504 (Epic: Refactor Commits API to use standard keyset pagination patterns) ## Background Unlike `path`, `first_parent`, and `order`, the `follow` parameter is **genuinely not supported** by Gitaly's `ListCommits` RPC. The protobuf does not include a follow field. This is a **follow-up issue** that requires Gitaly changes. ## What `follow` Does The `follow` parameter corresponds to Git's `--follow` flag, which continues listing the history of a file beyond renames. This is useful for tracking a file's full history even when it has been moved or renamed. ## Problem Users wanting to follow file renames in commit history must use offset pagination. ## Solution This requires a two-phase approach: ### Phase 1: Gitaly Change Add follow support to `ListCommits` RPC: ```protobuf message ListCommitsRequest { // ... bool follow = XX; // New field - enables --follow for path filtering } ``` Note: `follow` only makes sense when `paths` is also specified. ### Phase 2: Rails Change Pass `follow` parameter through to `list_commits`. ## Acceptance Criteria - [ ] Gitaly issue created for `ListCommits` follow support - [ ] Gitaly MR merged - [ ] Rails code updated to pass `follow` parameter - [ ] Tests added (including rename scenarios) ## Effort Estimate ~2-3 days (includes Gitaly change and review) ## References - Parent epic: #595504 - Gitaly repo: https://gitlab.com/gitlab-org/gitaly - Git documentation: `git log --follow` - Depends on: Gitaly proto change
issue