File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1596,12 +1596,12 @@ elif [[ $cipher ]]; then
15961596 validate_cipher
15971597fi
15981598
1599- list_dirty_files () {
1600- { git diff-index --name-status HEAD -- || git diff-index --stat HEAD -- || git diff-index HEAD -- || true ; } 2> /dev/null
1599+ count_dirty_files () {
1600+ { git diff-index --name-status HEAD -- || git diff-index --stat HEAD -- || git diff-index HEAD -- || true ; } 2> /dev/null | grep $' \n ' -c
16011601}
16021602
16031603# shellcheck disable=SC2155
1604- readonly GIT_DIRTY_FILES_BEFORE_INIT=" $( list_dirty_files | grep $' \n ' -c ) "
1604+ readonly GIT_DIRTY_FILES_BEFORE_INIT=" $( count_dirty_files ) "
16051605
16061606# perform function calls to configure transcrypt
16071607get_cipher
16291629
16301630# check for newly modified (dirty) files after transcrypt configuration which could
16311631# indicate an incorrect password
1632- if [[ ${GIT_DIRTY_FILES_BEFORE_INIT} -lt $( list_dirty_files | grep $' \n ' -c ) ]]; then
1632+ if [[ ${GIT_DIRTY_FILES_BEFORE_INIT} -lt $( count_dirty_files ) ]]; then
16331633 die 1 ' Unexpected new dirty files in the repository when configured by transcrypt%s, please check your password.\n' " $CONTEXT_DESCRIPTION "
16341634fi
16351635
You can’t perform that action at this time.
0 commit comments