Fix sunwait-src submodule initialisation issues #362
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I might be barking up the wrong tree here, so feel free to reject this if so. I've been having some issues with the project, specifically using GitKraken as the Git client. I can reproduce the issue consistently as follows:
The error that GitKraken throws up when trying to initialise the sunwait-src submodule is that sunwait-src already exists in the index. On investigation I believe what has happened is that the https://github.com/risacher/sunwait repo was added to allsky as a submodule under the sunwait-src directory, but that this directory and its contents already existed from earlier development prior to (re-)adding the same code as a submodule.
When transitioning from using some external source files directly in a repo to adding them as a submodule, one should first remove the source files and unstage them before adding and initialising the submodule. As far as I can tell this wasn't done, so adding the submodule creates a conflict with the directly added source files from earlier work. I may be wrong about this as I am far from a git expert so feel free to set me straight.
There seems to be no way forward to resolve this issue other than what I have done in this branch:
My repo is now in a sane state and able to create and switch branches without errors. I was previously using SourceTree and didn't see the same issues, but I'm not sure how capable or tolerant SourceTree is when dealing with submodules vs. GitKraken.
The only concern is that the sunwait submodule is initialised from the current state of its repo which is some way ahead of the current directly included source. As far as I can see the usage of the main sunwait executable hasn't changed, but before merging it would be wise to check for any conflicts in the current installation script and make files - I think they are OK and haven't changed anything, but you're the expert!
Cheers