Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
for submodule's folder,if stage with /,stage all files in it in windows #681
After adding a submodule, its folder will be shown in untracked. However, git add folder/ will add all files in folder in windows and git add folder will only add the submodule's folder. Or one can do this check in status.py, but I think in gui, adding a folder will never happen because it always shows untracked or modified files one by one
I think in general conforming paths from
foo in the staging code path seems correct, thanks for this fix. If you'd like to create a new commit with the updates I'll merge this right away.
From the sound of the comment above, it sounds like there's a bug in that "git add foo/" will treat a submodule folder as untracked files and add them to the parent, which seems like a bug in Git itself, and by filtering what we do by only calling "git add foo" we prevent that from happening. Is that correct?
If that is case, this is a good workaround to do on our side so that we are portable to old and newer versions where this bug might have been fixed.
Do you have a small recipe of git bash commands that can demonstrate the problem on windows?
It sounds like something like..
git submodule add repo git add repo/
Does the wrong thing by staging the
repo/* files into the parent repo while doing just
git add repo has the desired effect of staging the submodule repo?
Am I understanding this correctly? If so, this might be a bug we can also report to the Git for Windows project itself. Thanks for your help