Skip to content

Option to skip git fetch #7

Open

Description

@kareem-abdul

Hi,
There was an issue already raised (ThePrimeagen#85) regarding this, and a corresponding pr ThePrimeagen#99 done by @TamaMcGlinn .
Would love to see this added here.
In addition to what @TamaMcGlinn has mentioned in the original issue, the plugin breaks when you use git with ssh and a password protected public key.

Activity

  1. polarmutex commented on May 13, 2026

    @polarmutex
    Owner

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: Add a skip_fetch config option to disable the automatic git fetch on worktree operations

    Current behavior:
    The plugin runs git fetch during worktree creation. This blocks users who authenticate via SSH with a passphrase-protected key (the fetch triggers a passphrase prompt inside a Neovim job, which hangs or errors). There is no way to opt out of the fetch.

    Desired behavior:
    A new boolean config option (e.g. autopush already exists as prior art in the config shape — follow that pattern) that, when set to true or false, skips the automatic fetch during worktree creation. The option should default to the current behavior (fetch enabled) so existing users are unaffected.

    Key interfaces:

    • The config shape (look for where autopush and similar boolean flags are declared) — add a skip_fetch (or fetch) boolean field there
    • The worktree creation code path that invokes git fetch — gate the fetch call behind the config flag
    • The README config documentation section — document the new option with its default value

    Acceptance criteria:

    • A new config option exists that controls whether git fetch runs during worktree creation
    • When the option is set to skip fetch, creating a worktree does not invoke git fetch
    • When the option is at its default, behavior is identical to the current behavior
    • The option is documented in the README alongside other config options
    • Existing tests pass; a test covers the skip-fetch code path if the test suite has worktree creation tests

    Out of scope:

    • Skipping fetch on switch or delete operations (creation only, to match the scope of this issue)
    • Interactive passphrase prompting or SSH agent integration
    • Any changes to the autopush behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions