You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice, if PINGIT would also search for possibly present submodules and list them as well. Then one could work with a repository, which is used in several places as a submodule, and update it everywhere, or syncronize all instances of this repository.
A common use case would be, if one maintains a git repository of bib-files, which are updated at several locations, i.e. several papers, where it is included as a submodule. What then would be nice is a feature to update all submodules at once. So each submodule has to pull and rebase from master, push to master and pull again, to also get all changes from the others. This would save a lot of manual work!
The text was updated successfully, but these errors were encountered:
This is a good point, thank you for bringing it forward.
Thinking about it the behaviour you describe should not be the default as it would then undermine all the cases where you link in different (mostly software) repositories as resources and you want to pin a specific revision, which not neccessarily must be the latest. From a software development point of view such automatic update of submodules poses a danger to rigorous test-and-debug efforts and is mostly undesired
I'd propose to implement the feature as an extra switch --submodules or -s. If the switch is present, submodules are considered for the operation as well. (i.e. pinging in the case of pingit ping or fetching in the case of pingit fetch. With pingit status there's more to it: By default status should consider submodules and should report dirty and ahead states as well as untracked files (without the switch being present). However, the behind-remote-state should only be reported if the switch is present because having a submodule that does not point to HEAD by intention is a common usecase.
The same goes for the pull-rebase scheme. Up to now pingit does not have a batch-push and I still am uncertain that it should be implemented. The submodule case is the only reason where this actually makes sense to do automatically. However, doing it automatically for all repositories could interfere with the specific-version usecase. I'd imagine pingit pull --rebase -s to be the right place to put this feature. However I do not think it is a good idea to do it to all repositories automatically for the aforementioned reasons. Maybe requiring the --list option would relief the risk of doing unwanted things with pingit pull -s. Or maybe introducing regex-selectors generally.
What do you think about this? Would some of those thoughts be a sufficient solution?
It would be nice, if PINGIT would also search for possibly present submodules and list them as well. Then one could work with a repository, which is used in several places as a submodule, and update it everywhere, or syncronize all instances of this repository.
A common use case would be, if one maintains a git repository of bib-files, which are updated at several locations, i.e. several papers, where it is included as a submodule. What then would be nice is a feature to update all submodules at once. So each submodule has to pull and rebase from master, push to master and pull again, to also get all changes from the others. This would save a lot of manual work!
The text was updated successfully, but these errors were encountered: