Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with submodule #904

Closed
shengwang8888 opened this issue Jan 14, 2025 · 3 comments
Closed

bug with submodule #904

shengwang8888 opened this issue Jan 14, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@shengwang8888
Copy link

My repo have a submodule in my master branch, and I have some changes in submodule folder, but all these changes are disappeared when I discard all in master branch folder.

@love-linger
Copy link
Collaborator

If you selected Discard all changes from the context menu of current branch, it will discard all changes include the submodules, see code:

public Restore(string repo)
{
    WorkingDirectory = repo;
    Context = repo;
    Args = "restore . --source=HEAD --staged --worktree --recurse-submodules";
}

@love-linger love-linger self-assigned this Jan 14, 2025
@shengwang8888
Copy link
Author

Sorry, my description issue.

My "discard all" meaning discard the specified one file and this file is the only one changed in change list.
after discard this file, the change list is empty, this is fine, but my submodule's all change disappear.

Summary: I discard one file (when only the one file in change list), SourceGit treat it as "discard all", this make submodule also "discard all"

@love-linger love-linger added the bug Something isn't working label Jan 21, 2025
love-linger added a commit that referenced this issue Jan 22, 2025
@love-linger
Copy link
Collaborator

Fixed. You can try the latest CI build from Github Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants