git meta add-submodule => failed to make directory
- Dominant language
- JavaScript
- Stars
- 233
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
When trying to add a new submodule to a repository having no submodules then I'll always get the following error:
```
$ git meta add-submodule -i file:///d/casdev/_test/git-meta/try/arepo.git file:///d/casdev/_test/git-meta/try/arepo.git src/arepo
Error: failed to make directory 'D:\casdev\_test\git-meta\try\metarepo\.git\modules\src\arepo': Das System kann den angegebenen Pfad nicht finden.
```
- OS: Windows 10 Enterprise, 1709, 16299.665
- Git: 2.18.0.windows.1
- Executed in a Git bash
Is it because I'm having Windows?
This is the script I've used to check if I'm making something wrong: https://gist.github.com/dhbaird/a7137b3fa012cb88c3cb64c1a201d4d2:
Here is the full output of that script:
```bash
$ ./try.sh
++ pwd
+ D=/d/casdev/_test/git-meta/try
+ banner Git-meta acceptance script
+ set +x
--------------------------
Git-meta acceptance script
--------------------------
+ banner Cleanup previous runs
+ set +x
---------------------
Cleanup previous runs
---------------------
+ rm -rf 'arepo*/'
+ rm -rf 'brepo*/'
+ rm -rf 'metarepo*/'
+ banner Build initial repositories
+ set +x
--------------------------
Build initial repositories
--------------------------
+ git init --bare arepo.git
Initialized empty Git repository in d:/casdev/_test/git-meta/try/arepo.git/
+ git init --bare brepo.git
Initialized empty Git repository in d:/casdev/_test/git-meta/try/brepo.git/
+ git init --bare metarepo.git
Initialized empty Git repository in d:/casdev/_test/git-meta/try/metarepo.git/
+ git clone arepo.git arepo
Cloning into 'arepo'...
warning: You appear to have cloned an empty repository.
done.
+ git clone brepo.git brepo
Cloning into 'brepo'...
warning: You appear to have cloned an empty repository.
done.
+ git clone metarepo.git metarepo
Cloning into 'metarepo'...
warning: You appear to have cloned an empty repository.
done.
+ pushd arepo
+ echo A
+ git add README.md
+ git commit -m 'Add README to arepo.'
[master (root-commit) b58a139] Add README to arepo.
1 file changed, 1 insertion(+)
create mode 100644 README.md
+ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 251 bytes | 251.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To d:/casdev/_test/git-meta/try/arepo.git
* [new branch] master -> master
+ popd
+ pushd metarepo
+ echo M
+ git add README.md
+ git commit -m 'Add README to metarepo.'
[master (root-commit) b3e1896] Add README to metarepo.
1 file changed, 1 insertion(+)
create mode 100644 README.md
+ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 254 bytes | 254.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To d:/casdev/_test/git-meta/try/metarepo.git
* [new branch] master -> master
+ popd
+ banner Import arepo into metarepo
+ set +x
--------------------------
Import arepo into metarepo
--------------------------
+ pushd metarepo
+ git meta add-submodule -i file:///d/casdev/_test/git-meta/try/arepo.git file:///d/casdev/_test/git-meta/try/arepo.git src/arepo
Error: failed to make directory 'D:\casdev\_test\git-meta\try\metarepo\.git\modules\src\arepo': Das System kann den angegebenen Pfad nicht finden.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the git meta add-submodule command and reproduce the reported command from Git Bash on Windows using the provided script. Investigate why creating .git/modules/src/arepo fails when the repository has no submodules; done means the command creates the submodule successfully without the reported directory error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100