Skip to content

Commit f5ec6c7

Browse files
committed
Warn when password is probably incorrect with error message and return code #182
1 parent fb66f78 commit f5ec6c7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ system, you must also run the `--upgrade` command in each repository:
3636

3737
### Fixed
3838

39+
- Warn when password is probably incorrect by returning an error message and
40+
return code if repo has dirty files after init (#182)
41+
- Fail with error when an empty password is provided to the -p or --password
42+
options (#188)
3943
- Fix handling of double-quotes in encrypted file names (#173)
4044
- Make --upgrade safer by failing fast if transcrypt config cannot be read
4145
(#189)
42-
- Fail with error when an empty password is provided to the -p or --password
43-
options #188
4446
- Fix --export-gpg command to properly include cipher in exported .asc file
4547

4648
## [2.3.0] - 2024-09-10

transcrypt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,14 @@ if [[ ! -f $GIT_ATTRIBUTES ]]; then
16181618
printf '#pattern filter=crypt diff=crypt merge=crypt\n' >"$GIT_ATTRIBUTES"
16191619
fi
16201620

1621+
# check for modified (dirty) files after transcrypt configuration which could
1622+
# indicate an incorrect password
1623+
#
1624+
# check if the repo is dirty
1625+
if git status --porcelain 2>/dev/null | grep "^ M" >/dev/null; then
1626+
die 1 'Unexpected dirty files in the repository when configured by transcrypt%s, check your password.\n' "$CONTEXT_DESCRIPTION"
1627+
fi
1628+
16211629
printf 'The repository has been successfully configured by transcrypt%s.\n' "$CONTEXT_DESCRIPTION"
16221630

16231631
exit 0

0 commit comments

Comments
 (0)