Aspell fixes (#365)

* spellcheck fixes from aspell
pull/361/head^2
Josh Rabinowitz 5 years ago committed by GitHub
parent 9778d20791
commit 83b03b61bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,6 +13,7 @@
- Fix typo, remove temp directory in utils/tests.sh (#347)
- Update git-secret.io, fix utils/gh-branch.sh to use 'git all --add' (#344)
- Change 'init' to never ignore .secret files (#362)
- Spelling fixes
## Version 0.2.5
@ -71,7 +72,7 @@
- Now installation section is removed from main `man` file (#70)
- Now "See also" sections in the `man` pages are clickable (#69)
- Added "Manual" section to the manuals (#61)
- Added `centos` container for `ci` testing (#38)
- Added `CentOS` container for `ci` testing (#38)
- Tests are refactored. Added `clean` command tests, removed a lot of hard-coded things, moved tests execution from `./temp` folder to `/tmp`, added a lot of new check in old tests, and some new test cases (#52)
- Refactored `hide` and `clean` commands to be shorter
- `shellcheck` is now supported with `make lint`

@ -108,7 +108,7 @@ Releases to `brew` are made manually.
#### Dockerhub releases
[`Dockerhub`][Dockerhub] contains `Docker` images with different OS'es used for testing. It is updated via a `github` webhook on commit into `master`.
[`Dockerhub`][Dockerhub] contains `Docker` images with different OSes used for testing. It is updated via a `github` webhook on commit into `master`.
[tracker]: https://github.com/sobolevn/git-secret/issues
[help-wanted]: https://github.com/sobolevn/git-secret/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22
@ -119,7 +119,7 @@ Releases to `brew` are made manually.
### Downstream Packages
There are several distibutions and packaging systems that may already have git-secret packaged for your distribution (although sometimes their versions are not the most current, and we recommend all users upgrade to 0.2.5 or above).
There are several distributions and packaging systems that may already have git-secret packaged for your distribution (although sometimes their versions are not the most current, and we recommend all users upgrade to 0.2.5 or above).
### Notes to Downstream Packagers (Those who make packages for specific OSes/distributions)

@ -22,11 +22,11 @@ A new internal public key storage format that avoids forwards compatibility issu
## Motivation
GPG maintains backwards compatibility but not forwards compatibility. Running a new GPG version can and will upgrade the keyring storage files in a way that is not recognised by older versions of GPG. This is not normally a problem for typical GPG usage. Users will upgrade and rarely downgrade. It is a problem for git-secret as the keyring storage is committed to git and shared between users. Someone using an older version of GPG can no longer open the upgraded keyring file.
GPG maintains backwards compatibility but not forwards compatibility. Running a new GPG version can and will upgrade the keyring storage files in a way that is not recognized by older versions of GPG. This is not normally a problem for typical GPG usage. Users will upgrade and rarely downgrade. It is a problem for git-secret as the keyring storage is committed to git and shared between users. Someone using an older version of GPG can no longer open the upgraded keyring file.
## Approach
git-secret will move away from using the keyring format as shared storage of public keys. Instead, it will store public keys as exported keys in ASCII armor format. The public key export format is stable and forwards compatible. GPG users will typically be running different GPG or PGP versions and are able to exchange keys successfully. Bugs that effect git-secret's ability to use exported public keys will likey affect typical GPG key exchange usage. Such bugs are likely to be caught and fixed by the wider opensource community.
git-secret will move away from using the keyring format as shared storage of public keys. Instead, it will store public keys as exported keys in ASCII armor format. The public key export format is stable and forwards compatible. GPG users will typically be running different GPG or PGP versions and are able to exchange keys successfully. Bugs that effect git-secret's ability to use exported public keys will likely affect typical GPG key exchange usage. Such bugs are likely to be caught and fixed by the wider open source community.
git-secret may need to store and process meta-data about keys to make it efficient to work with keys that are stored within individual files. It will use the machine-readable ["colon listings format"](https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS) for this purpose.
@ -34,9 +34,9 @@ It is anticipated that `bash` and `gawk` will be sufficient to work efficiently
## Design
The new storage format will be implimented as follows:
The new storage format will be implemented as follows:
1. Keys will be stored in `~/.gitsecret/keys` in `gpg --armor --export` format. The use of ASCII armour rather than binary format is to make debugging of key related issues easier. The filename of the key will be `<keyid>.pub.gpg` (using Field 5 the "64-bit keyid" of the colon listings format)
1. Keys will be stored in `~/.gitsecret/keys` in `gpg --armor --export` format. The use of ASCII armor rather than binary format is to make debugging of key related issues easier. The filename of the key will be `<keyid>.pub.gpg` (using Field 5 the "64-bit keyid" of the colon listings format)
1. Key meta data will be stored alongside the key file in the `gpg --keyid-format long --with-colons` format. The file name will be `<keyid>.pub.cln`
1. A folder `~/.gitsecret/cache` will be added to `.gitignore`. At this location, a public keyring will be maintained on a per user bases and won't be shared between users. This is simply a "keyring cache" of the keys used to encrypt files.
@ -108,9 +108,9 @@ A new command git-secret-migrate will:
Backwards compatibility will the old keyring storage approach will be maintained as follows:
1. For each changed command a guard will be added that checks for the existance of `.gitsecret/cache`.
1. For each changed command a guard will be added that checks for the existence of `.gitsecret/cache`.
1. If the folder exists it proceeds as normal.
1. If it does not exist it will report that the repo was initialised by an older version of git-secret and tell the user to run git-secret-migrate
1. If it does not exist it will report that the repo was initialized by an older version of git-secret and tell the user to run git-secret-migrate
Forwards compatibility with older versions of git-secret will be maintained as follows.

@ -22,7 +22,7 @@ function changes {
_user_required
filenames=("$@") # list of positional params. global.
filenames=("$@") # list of positional parameters. global.
if [[ ${#filenames[@]} -eq 0 ]]; then
# Checking if no filenames are passed, show diff for all files.
_list_all_added_files # this sets the array variable 'filenames'

@ -58,7 +58,7 @@ function init {
git_secret_dir=$(_get_secrets_dir)
if [[ -d "$git_secret_dir" ]]; then
_abort 'already inited.'
_abort 'already initialized.'
fi
# Check if it is ignored:

@ -44,7 +44,7 @@ function tell {
shift $((OPTIND-1))
[ "$1" = "--" ] && shift
# Validates that application is inited:
# Validates that application is initialized:
_secrets_dir_exists
# Command logic:

@ -26,7 +26,7 @@ function usage {
echo "See 'git secret [command] -h' for more info about commands and their options"
echo " add [filename.txt] - adds file to be hidden, optionally adds file to .gitignore"
echo " cat [filename.txt] - cats the decrypted contents of the named file to stdout"
echo " changes [filename.secret] - indicates if the file has changed since checkin"
echo " changes [filename.secret] - indicates if the file changed since last commit"
echo " clean - deletes encrypted files"
echo " hide - encrypts (or re-encrypts) the files to be hidden"
echo " init - creates the .gitsecret directory and contents needed for git-secret"

@ -53,7 +53,7 @@ function teardown {
@test "run 'add' for unignored file with '-i'" {
local test_file='test_file.auto_ignore' # TODO - paramaterize filename
local test_file='test_file.auto_ignore' # TODO - parameterize filename
touch "$test_file"
echo "content" > "$test_file"
@ -67,7 +67,7 @@ function teardown {
}
@test "run 'add' for unignored file with '-i' in subfolder" {
@test "run 'add' for un-ignored file with '-i' in subfolder" {
# This test covers this issue:
# https://github.com/sobolevn/git-secret/issues/85 task 1
@ -109,7 +109,7 @@ function teardown {
skip "this test is skipped while 'git commit'. See #334"
fi
# Prepations:
# Preparations:
local root='test_dir'
local node="$root/node"
local sibling="$root/sibling"

@ -5,7 +5,7 @@ load _test_base
FILE_TO_HIDE="$TEST_DEFAULT_FILENAME"
SECOND_FILE_TO_HIDE="$TEST_SECOND_FILENAME"
THIRD_FILE_TO_HIDE="$TEST_THIRD_FILENAME"
FILE_NON_EXISTANT="NO-SUCH-FILE"
FILE_NON_EXISTENT="NO-SUCH-FILE"
FILE_CONTENTS="hidden content юникод"
FINGERPRINT=""
@ -153,7 +153,7 @@ function teardown {
}
@test "run 'changes' on file that does not exist" {
run git secret changes -d "$TEST_GPG_HOMEDIR" -p "$password" "$FILE_NON_EXISTANT"
run git secret changes -d "$TEST_GPG_HOMEDIR" -p "$password" "$FILE_NON_EXISTENT"
[ "$status" -ne 0 ]
}

@ -70,13 +70,13 @@ function teardown {
}
@test "run 'init' with '.gitsecret' already inited" {
@test "run 'init' with '.gitsecret' already initialized" {
local secrets_dir
secrets_dir=$(_get_secrets_dir)
mkdir "$secrets_dir"
run git secret init
[ "$output" = "git-secret: abort: already inited." ]
[ "$output" = "git-secret: abort: already initialized." ]
[ "$status" -eq 1 ]
}

@ -86,13 +86,13 @@ function _has_line {
# There was a bug with `sed` an slashes:
# see https://github.com/sobolevn/git-secret/issues/23
# Prepartions:
# Preparations:
local folder="somedir"
local file_in_folder="$folder/$TEST_THIRD_FILENAME"
mkdir -p "$folder"
set_state_secret_add "$file_in_folder" "somecontent3"
set_state_secret_hide # runing hide again to hide new data
set_state_secret_hide # running hide again to hide new data
# Now it should remove filename with slashes from the mapping:
run git secret remove "$file_in_folder"

@ -124,7 +124,7 @@ function teardown {
@test "run 'tell' with '-m' (empty email)" {
# Prepartions:
# Preparations:
git_set_config_email "" # now it should not allow to add yourself
run git secret tell -d "$TEST_GPG_HOMEDIR" -m
@ -136,7 +136,7 @@ function teardown {
# Preparations:
install_fixture_key "$TEST_SECOND_USER"
# Testing the command iteself:
# Testing the command itself:
run git secret tell -d "$TEST_GPG_HOMEDIR" \
"$TEST_DEFAULT_USER" "$TEST_SECOND_USER"

Loading…
Cancel
Save