Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding --dry-run option for merge. #2917

Closed
wants to merge 1 commit into from

Conversation

louib
Copy link
Member

@louib louib commented Mar 30, 2019

Type of change

  • ✅ Refactor
  • ✅ New feature
  • ✅ Documentation

Description and Context

Two changes in fact: I added the --dry-run option and the list of changes detected by the merge operation to the output. In the future, I'd also like to ask the user for confirmation before merging, after displaying the changes.

Screenshots

$ keepassxc-cli merge -s --dry-run ~/test1.kdbx ~/test2.kdbx 
Insert password to unlock /home/louib/test1.kdbx: 
	Creating missing entry2 [06009d6280a741f88c4da6e4415d0aa5]
Database was not modified by merge operation.
$ keepassxc-cli merge -s ~/test1.kdbx ~/test2.kdbx 
Insert password to unlock /home/louib/test1.kdbx: 
	Creating missing entry2 [06009d6280a741f88c4da6e4415d0aa5]
Successfully merged the database files.
$ keepassxc-cli merge -s ~/test1.kdbx ~/test2.kdbx 
Insert password to unlock /home/louib/test1.kdbx: 
Database was not modified by merge operation.
$ keepassxc-cli merge -s --dry-run ~/test1.kdbx ~/test2.kdbx 
Insert password to unlock /home/louib/test1.kdbx: 
Database was not modified by merge operation.

Testing strategy

unit test + CLI (see screenshot)

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]
  • ✅ My change requires a change to the documentation, and I have updated it accordingly.
  • ✅ I have added tests to cover my changes.

@louib
Copy link
Member Author

louib commented Jun 10, 2019

Closing in favor of #3254

@louib louib closed this Jun 10, 2019
@louib louib deleted the dry_run branch June 10, 2019 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants