Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications below a submodule are not detected as _dirty_ #781

Closed
tripodsan opened this issue Apr 18, 2019 · 4 comments
Closed

Modifications below a submodule are not detected as _dirty_ #781

tripodsan opened this issue Apr 18, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@tripodsan
Copy link
Contributor

Description
with #614, it is now possible to use submodules (for better or worse). however, the isDirty() check ignores the submodule, so modifications below a submodule are not considered dirty. this is unexpected if it contains sources or static files, since the developer expects that what is packages with the current sha, would also be the one that is in the git repository.

@tripodsan
Copy link
Contributor Author

adding this to the test case highlights the issue:

diff --git a/test/testGitUtils.js b/test/testGitUtils.js
index 7f4efea..8f9ecd5 100644
--- a/test/testGitUtils.js
+++ b/test/testGitUtils.js
@@ -100,6 +100,9 @@ describe('Testing GitUtils', () => {
     shell.exec('git commit -m "added submodule"');
     assert.equal(await GitUtils.isDirty(testRoot, GIT_USER_HOME), false);

+    await fse.writeFile(path.resolve(moduleRoot, 'README.md'), 'Hello, world.\n', 'utf-8');
+    assert.equal(await GitUtils.isDirty(testRoot, GIT_USER_HOME), true);
+
     await fse.remove(moduleRoot);
   });

@stefan-guggisberg
Copy link
Contributor

are submodules packaged?

@tripodsan
Copy link
Contributor Author

are submodules packaged?

well, it depends on the layout. someone could have a ./src/my-utils submodule. in this case, yes.
but I guess, this is not realistic, and we still can tackle the problem when someone notices :-)

@tripodsan
Copy link
Contributor Author

closing for now. I don't think this is important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants