Skip to content

Commit

Permalink
refactor: minor optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj committed Dec 14, 2019
1 parent f3ae378 commit 22ba124
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/gitWorkflow.js
Expand Up @@ -27,7 +27,7 @@ const cleanUntrackedFiles = async execGit => {
'This is probably due to a bug in git =< 2.13.0 where `git stash --keep-index` resurrects deleted files.'
)
debug('Deleting the files using `git clean`...')
await execGit(['clean', '--force', untrackedFiles.split('\n').join(' ')])
await execGit(['clean', '--force', ...untrackedFiles.split('\n')])
}
}

Expand Down Expand Up @@ -94,7 +94,7 @@ class GitWorkflow {
// These files should be listed and deleted before proceeding.
await cleanUntrackedFiles(this.execGit)

// Get a diff of unstaged changes by saved stash against what's left on disk.
// Get a diff of unstaged changes by diffing the saved stash against what's left on disk.
this.unstagedDiff = await this.execGit([
'diff',
'--binary',
Expand All @@ -119,7 +119,6 @@ class GitWorkflow {
async applyModifications() {
let modifiedFiles = await this.execGit(['ls-files', '--modified'])
if (modifiedFiles) {
modifiedFiles = modifiedFiles.split('\n')
debug('Detected files modified by tasks:')
debug(modifiedFiles)
debug('Adding files to index...')
Expand Down

0 comments on commit 22ba124

Please sign in to comment.