Skip to content

[Enhancement] Replace os/exec git calls with native go-git library #5

@ImmaZoni

Description

@ImmaZoni

Description

The getGitChangedFiles function relies on exec.Command("git", ...) to call the external Git binary installed on the host OS.

Why it matters

While acceptable for local dev environments, this limits PromptPacker's functionality if a user is running the tool in an environment without Git installed in their PATH (e.g., minimal Docker containers, certain CI/CD pipelines).

Proposed Solution

Replace the os/exec calls with a native Go library to make the binary 100% standalone.

Tasks

  • Import github.com/go-git/go-git/v5.
  • Refactor getGitChangedFiles to use the native library to get the diff against branches/refs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions