Skip to content

Commit

Permalink
remove update-index call from release-it hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrunton committed Jul 25, 2020
1 parent 6756a85 commit 255caa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/plugin/git/Git.js
Expand Up @@ -89,7 +89,10 @@ class Git extends GitBase {
}

isWorkingDirClean() {
return this.exec('git diff-index --quiet HEAD --', { options }).then(
// Note: the update-index is required here for cases where files may be touched/recreated
// during a build/test hook. Git will mark those as potentially changed, but won't diff them
// until the index is updated. See also https://github.com/release-it/release-it/issues/687
return this.exec('git update-index -q --really-refresh && git diff-index --quiet HEAD --', { options }).then(
() => true,
() => false
);
Expand Down

0 comments on commit 255caa0

Please sign in to comment.