Skip to content

Skip erase secrets by default - #232

Merged
dominikschulz merged 1 commit into
gopasspw:masterfrom
carlzhc:no-erase
Sep 10, 2026
Merged

dominikschulz merged 1 commit into
gopasspw:masterfrom
carlzhc:no-erase

Conversation

@zhangcar-ms

Copy link
Copy Markdown

Add '--no-erase' option to skip erasing secrets when git ask 'erase' function from the helper.

User should manually run 'gopass rm ...' command to remove secrets.

@dominikschulz

Copy link
Copy Markdown
Member

Sounds good, but shouldn't this be the default then?

@zhangcar-ms

Copy link
Copy Markdown
Author

Becoming default is not compatible with previous versions. I'm fine with it and can update the PR.

@zhangcar-ms
zhangcar-ms force-pushed the no-erase branch 2 times, most recently from 681f45e to 94dc599 Compare August 10, 2026 05:33
@zhangcar-ms zhangcar-ms changed the title Add an option for skipping erase secrets Skip erase secrets Aug 10, 2026
@zhangcar-ms zhangcar-ms changed the title Skip erase secrets Skip erase secrets by default Aug 10, 2026
@zhangcar-ms

Copy link
Copy Markdown
Author

Updated the PR, the default behavor is now to skip erasing secrets, but users can add the option '--erase' to have the same behavors of the previous version.

Comment thread git-credential.go
if err != nil {
return fmt.Errorf("error: %w while parsing git-credential", err)
}
if cmd.Bool("erase") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff and nesting would be much nicer to read if you'd simply check for if !cmd.Bool("erase") { return nil }.

Skip erasing secrets when git asks 'erase' function from the helper.

User should manually run 'gopass rm ...' command to erase secrets.
@dominikschulz
dominikschulz merged commit 17d8d47 into gopasspw:master Sep 10, 2026
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants