Fix --delete-it-all and --delete commands#913
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ellie
reviewed
May 2, 2023
Since entries are searched everytime a delete process ends, the --delete-it-all command will enter an infinite loop if searching the whole history.
Command blanking may violate the `unique(timestamp, cwd, command)` condition.
Member
|
Sorry for the rebase, CI wasn't starting and needed a poke |
ellie
approved these changes
Jun 13, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are two issues with deleting:
--delete-it-allis used, atuin will enter an infinite loop since searches are performed on the whole history, including deleted items.unique(timestamp, cwd, command)condition.This PR adds a
deleted_at is nullcondition to the search query to fix issue 1. And removes the blanking of the command to fix 2.