Skip to content

Proposal: Run git, grep and find helpers with argv instead of a shell #2634

Open

Description

@sc-si

What problem does this solve?

These helpers currently build shell command strings from tool arguments such as search scopes, file patterns and branch names (str_util.c#L246-L270).

Proposed solution

Run the git, grep and find helpers through the existing argv-based subprocess API instead of /bin/sh -c (compat_fs.c#L907-L932). With argv and a minimal environment, those values reach git, grep and find as plain arguments.

Came up while reviewing this project for SafetyCard: https://safetycard.dev/github.com/deusdata/codebase-memory-mcp

Alternatives considered

No response

  • I searched existing issues and this is not a duplicate.

Activity

  1. changed the title [-]Proposal: Run git, grep and find helpers with argv instead of a shell (SafetyCard review)[/-] [+]Proposal: Run git, grep and find helpers with argv instead of a shell[/+] on Oct 14, 2026
  2. DeusData commented on Nov 4, 2026

    @DeusData
    Owner

    Progress on main: #2749 (merge commit fe55b86) runs the POSIX unscoped search as argv stages feeding the in-process scanner, with no shell. This issue stays open for the git helpers. Thanks again to @tahodev.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions