Re: Why does adding an existing repo as a submodule modify .git/config?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/24/2011 03:06 AM, Christopher Wilson wrote:

Mark


Q: Can you elaborate on why a 2 step "git submodule add" + "git
submodule init" wasn't sufficient?  What is the reason for adding this
functionality into the "git submodule add" command, when "git submodule
init" does the same job?


git-submodule.sh has evolved considerably over the last couple of years, and the behaviour of submodule-init on an already existing module may well be different.

However, while you could then change submodule-add to not register the submodule, you would now have the condition of having a submodule that is checked out in the current tree but *not* registered in .git/config. This is the key: .git/config is modified to include all submodules that are checked out in your current tree. If you add a remote submodule, that submodule is not checked out in your current tree so no entry is created in .git/config, while adding one that is already checked out in place does modify .git/config. I see no inconsistency here.

Mark
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]