You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2019/11/24 18:14:07 UTC
[cordova-coho] branch master updated: fix(gitutil): do not stash
ignored files (#262)
This is an automated email from the ASF dual-hosted git repository.
raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-coho.git
The following commit(s) were added to refs/heads/master by this push:
new 19caec8 fix(gitutil): do not stash ignored files (#262)
19caec8 is described below
commit 19caec8ea34bdbd36eda562218c0816e50dfd9c1
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Sun Nov 24 19:14:00 2019 +0100
fix(gitutil): do not stash ignored files (#262)
Until now `gitutil.stashAndPop` ran the following command for each repo:
git stash save --all --quiet "coho stash"
Beside changed and untracked files, this also stashes ignored files. In
our case that includes the `node_modules` folder. Due to the massive
amount of files in there, that command takes a decent amount of time and
can also lead to _a lot_ of CRLF warning messages, depending on your
local git configuration.
Furthermore, the new build system of `cordova-js` needs to have its
dependencies present to be able to run. But since the `cordova-js` build
is run in a `stashAndPop` block, all modules have been stashed and thus
the build always fails.
AFAICT, no invocation of `gitutil.stashAndPop` does actually _need_ to
stash ignored files. Thus we can resolve these issues by replacing the
`--all` flag with `--include-untracked`, giving us this command:
git stash save --include-untracked --quiet "coho stash"
This safely stashes all content that could potentially be destroyed by
`coho` operations, while leaving ignored files in place.
---
src/gitutil.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gitutil.js b/src/gitutil.js
index fe7c558..a100432 100644
--- a/src/gitutil.js
+++ b/src/gitutil.js
@@ -119,7 +119,7 @@ exports.stashAndPop = function * (repo, func) {
var branchName = yield gitutil.retrieveCurrentBranchName();
if (requiresStash) {
- yield executil.execHelper(executil.ARGS('git stash save --all --quiet', 'coho stash'));
+ yield executil.execHelper(executil.ARGS('git stash save --include-untracked --quiet', 'coho stash'));
}
yield func();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org