-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into multiple-passphrases-in-one-repo
# By James Murty (18) and others # Via GitHub (1) and James Murty (1) * main: (26 commits) Centralise load and save of password into functions #141 Fix date of 2.2.0 release Ensure tests use "main" as default branch name #143 Use OpenSSL for B64 encoding not `base64` which differs between Linux and Mac #140 Use core attributesFile from worktree (#137) Document `xxd` requirement, and make optional with OpenSSL < 3 (#138) Prepare for 2.2.0 release Fix when using OpenSSL 3 which no longer embeds salt in output (#135) Consolidate all git operation scripts into a single transcrypt script Fix handling of small files and files with null in first 8 bytes (#116) Improve command hint to fix secret files not encrypted in index (#120) (#130) Remove Ubuntu 16.04 LTS from test matrix (#123) Configure default Git branch name for macOS tests in GitHub Handle rename of primary branch from "master" to "main" Ensure Git index is up-to-date before dirty repo check #37 (#109) Fix incorrect salt when partially staged files are commited (#119) Use shorthand for grep options for broader compatibility (#121) Let user set a custom path to openssl #108 Install entire transcrypt script into repository Change version to indicate development "pre-release" status ... # Conflicts: # README.md # tests/_test_helper.bash # tests/test_cleanup.bats # tests/test_crypt.bats # tests/test_init.bats # tests/test_not_inited.bats # transcrypt
- Loading branch information
Showing
19 changed files
with
955 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Maintainer: Aaron Bull Schaefer <[email protected]> | ||
pkgname=transcrypt | ||
pkgver=2.1.0 | ||
pkgver=2.2.0 | ||
pkgrel=1 | ||
pkgdesc='A script to configure transparent encryption of files within a Git repository' | ||
arch=('any') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
function init_git_repo { | ||
# Warn and do nothing if test dir envvar is unset | ||
if [[ -z "$BATS_TMPDIR" ]]; then | ||
echo "WARNING: Required envvar \$BATS_TMPDIR is unset" | ||
if [[ -z "$BATS_TEST_DIRNAME" ]]; then | ||
echo "WARNING: Required envvar \$BATS_TEST_DIRNAME is unset" | ||
# Warn and do nothing if test git repo path already exists | ||
elif [[ -e "$BATS_TMPDIR/.git" ]]; then | ||
echo "WARNING: Test repo already exists at $BATS_TMPDIR/.git" | ||
elif [[ -e "$BATS_TEST_DIRNAME/.git" ]]; then | ||
echo "WARNING: Test repo already exists at $BATS_TEST_DIRNAME/.git" | ||
else | ||
# Initialise test git repo at the same path as the test files | ||
git init "$BATS_TMPDIR" | ||
git init "$BATS_TEST_DIRNAME" | ||
git checkout -b main | ||
# Tests will fail if name and email aren't set | ||
git config user.name "John Doe" | ||
git config user.email [email protected] | ||
# Flag test git repo as 100% the test one, for safety before later removal | ||
touch "$BATS_TMPDIR"/.git/repo-for-transcrypt-bats-tests | ||
touch "$BATS_TEST_DIRNAME"/.git/repo-for-transcrypt-bats-tests | ||
fi | ||
} | ||
|
||
function nuke_git_repo { | ||
# Warn and do nothing if test dir envvar is unset | ||
if [[ -z "$BATS_TMPDIR" ]]; then | ||
echo "WARNING: Required envvar \$BATS_TMPDIR is unset" | ||
if [[ -z "$BATS_TEST_DIRNAME" ]]; then | ||
echo "WARNING: Required envvar \$BATS_TEST_DIRNAME is unset" | ||
# Warn and do nothing if the test git repo is missing the flag file that | ||
# ensures it *really* is the test one, as set by the 'init_git_repo' function | ||
elif [[ ! -e "$BATS_TMPDIR/.git/repo-for-transcrypt-bats-tests" ]]; then | ||
echo "WARNING: Aborting delete of non-test Git repo at $BATS_TMPDIR/.git" | ||
elif [[ ! -e "$BATS_TEST_DIRNAME/.git/repo-for-transcrypt-bats-tests" ]]; then | ||
echo "WARNING: Aborting delete of non-test Git repo at $BATS_TEST_DIRNAME/.git" | ||
else | ||
# Forcibly delete the test git repo | ||
rm -fR "$BATS_TMPDIR"/.git | ||
rm -fR "$BATS_TEST_DIRNAME"/.git | ||
fi | ||
} | ||
|
||
function cleanup_all { | ||
nuke_git_repo | ||
rm -f "$BATS_TMPDIR"/.gitattributes | ||
rm -f "$BATS_TMPDIR"/sensitive_file | ||
rm -f "$BATS_TEST_DIRNAME"/.gitattributes | ||
rm -f "$BATS_TEST_DIRNAME"/sensitive_file | ||
} | ||
|
||
function init_transcrypt { | ||
"$BATS_TEST_DIRNAME"/../transcrypt --cipher=aes-256-cbc --password=abc123 --yes | ||
"$BATS_TEST_DIRNAME"/../transcrypt --cipher=aes-256-cbc --password='abc 123' --yes | ||
} | ||
|
||
function encrypt_named_file { | ||
|
@@ -57,7 +58,7 @@ function encrypt_named_file { | |
} | ||
|
||
function setup { | ||
pushd "$BATS_TMPDIR" || exit 1 | ||
pushd "$BATS_TEST_DIRNAME" || exit 1 | ||
init_git_repo | ||
if [[ ! "$SETUP_SKIP_INIT_TRANSCRYPT" ]]; then | ||
init_transcrypt | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.