Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions transcrypt
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,11 @@ if [[ $rekey ]]; then
stage_rekeyed_files
else
force_checkout
# check for newly modified (dirty) files after transcrypt configuration which could
# indicate an incorrect password
if [[ ${GIT_DIRTY_FILES_BEFORE_INIT} -lt $(count_dirty_files) ]]; then
die 1 'Unexpected new dirty files in the repository when configured by transcrypt%s, please check your password.\n' "$CONTEXT_DESCRIPTION"
fi
fi

# ensure the git attributes file exists
Expand All @@ -1677,12 +1682,6 @@ if [[ ! -f $GIT_ATTRIBUTES ]]; then
printf '#pattern filter=crypt diff=crypt merge=crypt\n' >"$GIT_ATTRIBUTES"
fi

# check for newly modified (dirty) files after transcrypt configuration which could
# indicate an incorrect password
if [[ ${GIT_DIRTY_FILES_BEFORE_INIT} -lt $(count_dirty_files) ]]; then
die 1 'Unexpected new dirty files in the repository when configured by transcrypt%s, please check your password.\n' "$CONTEXT_DESCRIPTION"
fi

printf 'The repository has been successfully configured by transcrypt%s.\n' "$CONTEXT_DESCRIPTION"

exit 0