libgit2 / libgit2sharp

Git + .NET = ❤
http://libgit2.github.com
MIT License
3.15k stars 887 forks source link

Read and write submodule branch Option #1301 #1915

Open TerRoshak opened 2 years ago

TerRoshak commented 2 years ago

Allows for reading and writing the branch option from .gitmodules requested a while ago in #1301

submodule.Branch can be read (string) and set (string) to change the branch option in .gitmodules If a branch option was not set Branch will return null (libgit2 submodule_branch return value)

This helps in automated environments to checkout the correct tip (e.g. specific feature branch) and automatically publish changes back to the correct branch.