Skip to content

“Git Fixup: Amend Staged Changes” does not work in multi‑repo workspaces #14

@langerth

Description

@langerth

When using “Git Fixup: Amend Staged Changes” in a workspace containing multiple Git repositories, the command fails with the error:

“No staged files”

This occurs when the staged changes belong to a repository not located in the first folder of the workspace.
Expected Behavior:
In workspaces that contain multiple folders/repositories, the extension should prompt the user to select the target folder/repository before executing the fixup action.
Actual Behavior:
The action implicitly assumes the first workspace folder and does not detect staged files in other repositories.
Steps to Reproduce:

Open a VS Code workspace with two or more folders, each being a separate Git repository.
Stage changes in a repository that is not the first folder.
Trigger Git Fixup: Amend Staged Changes.
Observe the error: “No staged files”.

Suggested Improvement:
Add repository selection when multiple repositories exist, similar to how other Git actions request a repository context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions