Skip to content

Fail update execution if there are unstaged changes in the submodules #42

@dabico

Description

@dabico

This brings up a separate issue, which I will file a separate bug for if you want: with update, any changes in the subprojects are silently discarded! I kept changing the subprojects, and if I didn't check my changes in yet, when I built the parent, the changes were overwritten. It might be good to warn the user and stop the build if update is enabled, and there are local changes to subprojects that are not yet committed.

Originally posted by @lukehutch in #40

Yeah, that's how git submodule works: if you don't stage your changed submodule (i.e. git add path/to/submodule), it will be reverted to the revision it's currently pointing to when you run git submodule update. In spite of this, I do agree that throwing away a user's changes might lead to confusion or frustration. I'm thinking of adding a failOnUnstagedChanges flag that would default to true, but that can be turned off by the user (in which case it would only produce warnings). I'll file this as a separate feature request and keep this discussion centered on your original inquiry.

Originally posted by @dabico in #40

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions