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

Prevent unsafe uses of forget --keep-tag #4764

Merged
merged 8 commits into from May 24, 2024

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    d106ad6 View commit details
    Browse the repository at this point in the history
  2. forget: refuse deleting the last snapshot in a snapshot group

    `--keep-tag invalid-tag` was previously able to wipe all snapshots in a
    repository. As a user specified a `--keep-*` option this is likely
    unintentional. This forbid deleting all snapshot if a `--keep-*` option
    was specified to prevent data loss. (Not specifying such an option
    currently also causes the command to abort)
    MichaelEischer committed May 24, 2024
    Configuration menu
    Copy the full SHA
    c0e1f36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5b7952e View commit details
    Browse the repository at this point in the history
  4. forget: Add --unsafe-allow-remove-all option

    To prevent accidentally wiping all snapshots from a repository, that
    option can only be used if either a snapshot filter or a keep policy is
    specified.
    
    Essentially, the option allows `forget --tag something
    --unsafe-allow-remove-all` calls to remove all snapshots with a specific
    tag.
    MichaelEischer committed May 24, 2024
    Configuration menu
    Copy the full SHA
    57f9739 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    82ca003 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3f46808 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7948912 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3cc6827 View commit details
    Browse the repository at this point in the history