Skip to content

Take long time to fetch large repository #52

Closed

Description

@int128

Problem to solve

This action takes a long time to check out a large repository. Here is a snippet of log:

Mon, 26 May 2025 01:31:35 GMT This is an open PR, checking out PR branch...
Mon, 26 May 2025 01:34:49 GMT From https://github.com/****/****
Mon, 26 May 2025 01:34:49 GMT * branch                    hello-claude-code -> FETCH_HEAD
Mon, 26 May 2025 01:34:49 GMT * [new branch]              hello-claude-code -> origin/hello-claude-code

How to solve

Is it possible to perform the shallow clone here?

await $`git fetch origin ${branchName}`;

await $`git fetch origin ${newBranch}`;

For example,

git fetch origin --depth=1 ${branchName}

Activity

  1. ashwin-ant commented on May 26, 2025

    @ashwin-ant
    Collaborator

    @claude can you switch to a shallow fetch for this

  2. claude commented on May 26, 2025

    @claude
    Contributor

    Claude finished @ashwin-ant's task —— View job • claude/issue-52-20250526_025103 • Create PR ➔


    Implementing shallow fetch for large repositories ✅

    Todo List:

    • Read repository guidelines and current implementation
    • Analyze current git fetch operations in branch.ts
    • Implement shallow fetch with --depth=1
    • Run tests and linting (skipped - no Bash permissions)
    • Commit changes and create PR

    Changes Made:

    • Modified src/github/operations/branch.ts:55: Added --depth=1 to PR branch fetch
    • Modified src/github/operations/branch.ts:102: Added --depth=1 to new branch fetch
    • Added clarifying comments about performance improvement

    Impact: This should significantly reduce checkout times for large repositories by only fetching the latest commit instead of the full git history.

  3. self-assigned this
    on May 26, 2025
  4. added a commit that references this issue on Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions