Is the git submodule name used for anything other than display? -


the .gitmodules file used track submodules within git repository has name each submodule, this:

[submodule "my-submodule"]   path = foo/bar/my-submodule   url = http://github.com/myuser/original-my-submodule 

however, i've seen written local path duplicated in submodule name:

[submodule "foo/bar/my-submodule"]   path = foo/bar/my-submodule   url = http://github.com/myuser/original-my-submodule 

i have both of these styles in 1 of repositories, accident, , i'm not sure why different.

i'd make sure have these expressed correctly. of these "correct"? matter? submodule name used other display?

the gitmodules man page includes:

the file contains 1 subsection per submodule, , subsection value name of submodule.
the name set path submodule has been added unless customized --name option of git submodule add.

it possible submodule added (git submodule add) twice, , without --name option ("without" means: default "name" used in .gitmodules path, foo/bar/my-submodule).

it doesn't seem matter git submodule add, since used --name option well, using 1 of 2 entries of .gitmodules.
git submodule add without --name use second entry of .gitmodules.

if both url same in 2 entries... result of git submodule add command same.
beside 'add', name isn't used elsewhere.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -