cksource / mrgit

A tool for managing projects build using multiple repositories.
49 stars 9 forks source link

Implemented root repository feature #162

Closed przemyslaw-zan closed 1 year ago

przemyslaw-zan commented 1 year ago

Suggested merge commit message (convention)

Feature: Added support for executing commands in the root repository. Closes #160.


Additional information

For example – encountered issues, assumptions you had to make, other affected tickets, etc.

przemyslaw-zan commented 1 year ago

Due to the fact that commands are executed in parallel for each repository, cloning the root repository if it's not there already proves problematic. .gitignore file is not there yet, and git has to process huge amount of files, which slows down the process considerably. Because of this, I've decided to simply warn the user that the root repository is not available instead.

Additionally, in case of missing root repository, I've decided to prevent the script from executing entirely. Initially, I've implemented behaviour that printed warning about missing root repository, but let the script to clone and work on nested repositories. However, this puts user in awkward situation where he now has to clone his repository into a non-empty directory. While this is possible, I think that it would be easier for the user to simply clone the root repository into an empty directory, and then execute mrgit again.