Skip to content

support the global --literal-pathspecs option #492

Description

@genedna

Title: support the global --literal-pathspecs option

Summary

TC-0024 in genedna/libra-testcases maps to pinned Git t/t2200-add-update.sh#11, non-qualified update in subdir updates from the root. The test runs from dir1 and verifies that an unqualified add -u updates paths from the repository root.

The upstream sequence invokes:

git --literal-pathspecs add -u

Git control 2.55.0.782.g1630431f32 passes the complete sequence. Libra 0.22.19 rejects the global option before add -u is dispatched:

error: unexpected argument '--literal-pathspecs' found
Error-Code: LBR-CLI-002
exit=129

The Libra run is tc0024-analysis-20260914-222011-libra; the Git run is tc0024-analysis-20260914-222011-git. The later plain add -u and final diff-files --name-only assertion are therefore not reached on Libra.

Impact

This is an unsupported-option compatibility gap, not an output-format difference or a cascade from an earlier test. The global pathspec mode cannot be selected, so scripts using Git's top-level --literal-pathspecs form fail even when the underlying subcommand supports the requested operation.

Acceptance criteria

  1. Accept libra --literal-pathspecs <command> ... as a global option and dispatch the command with literal pathspec interpretation.
  2. Preserve option placement semantics expected by Git, including the global option before add.
  3. Re-run t/t2200-add-update.sh#11 and reach both add -u invocations and the final empty diff-files --name-only assertion.
  4. Preserve existing behavior for commands without --literal-pathspecs and for the command-local pathspec options.

This is a new issue candidate. No existing open Issue found for literal-pathspecs; #476 and #479 cover unrelated worktree and plumbing gaps.

Activity

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 workingtestvcs

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions