AGWA / AGWA/git-crypt

'status' in fix mode does not successfully fix

Abierto
#67 3 comentarios 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
9.9k
Forks
544
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Not sure if I'm doing something wrong, or it's a bug:

```
$ git-crypt --version
git-crypt 0.5.0

$ git --version
git version 2.6.1

$ cd /tmp && mkdir test && cd test && git init
Initialized empty Git repository in /tmp/test/.git/

$ git-crypt init
Generating key...

$ git-crypt add-gpg-user scott@smemsh.net
[master (root-commit) fe5dae3] Add 1 git-crypt collaborator
2 files changed, 3 insertions(+)
create mode 100644 .git-crypt/.gitattributes
create mode 100644 .git-crypt/keys/default/0/B2CE7E00F1C9C1AB19D835E5F95422EF3AED5886.gpg

$ echo '.gitattributes !filter !diff' > .gitattributes &&
echo 'secret1 filter=git-crypt diff=git-crypt' >> .gitattributes &&
touch secret1 && git add secret1 && git ci -m test1
[master 3e3182c] test1
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 secret1

$ git-crypt lock

$ echo 'secret2 filter=git-crypt diff=git-crypt' >> .gitattributes &&
touch secret2 &&
git add secret2 &&
git-crypt status
not encrypted: .gitattributes
not encrypted: .git-crypt/.gitattributes
not encrypted: .git-crypt/keys/default/0/B2CE7E00F1C9C1AB19D835E5F95422EF3AED5886.gpg
encrypted: secret1
encrypted: secret2 *** WARNING: staged/committed version is NOT ENCRYPTED! ***

Warning: one or more files is marked for encryption via .gitattributes but
was staged and/or committed before the .gitattributes file was in effect.
Run 'git-crypt status' with the '-f' option to stage an encrypted version.
```

ok so at this point is when I said "oh no" and went to fix it:

```
$ git-crypt status -f
Error: secret2: still unencrypted even after staging
Unable to stage 1 file.
```

I saw bug #62 and #63; this appears to be similar, but I made
a new bug since I include all reproduction steps, and that
one looked like there was some possibly unknown factors
leading up to it.

If this happens because it's locked (as I suspect), then the error
message should say so, since _git-crypt_ has this information.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.