GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

Commit d730c3c3 authored by Stefan Göbel's avatar Stefan Göbel
Browse files

Fixed --from and --until for snot delete

parent 76ba2415
2019/03/15 - Version 0.3
* Fixed: `--from` and `--until` now work properly with `snot delete`.
* The `snot-pacman` hook can now be disabled by setting `$SKIP_SNOT_HOOK`.
2019/03/05 - Version 0.2
* Added `--from` and `--until` options to `snot delete` and `snot list`.
# Maintainer: Stefan Göbel < snot ʇɐ subtype ˙ de >
pkgname='snot'
pkgver='0.2'
pkgver='0.3'
pkgrel='1'
arch=('x86_64' 'i686')
pkgdesc='Basic Btrfs snapshot tool.'
......
......@@ -7,8 +7,8 @@ Create and restore Btrfs filesystem snapshots.
---------------------------------------------------------------------------------------
:Author: Stefan Göbel <snot at subtype dot de>
:Date: 2019/03/05
:Version: 0.2
:Date: 2019/03/15
:Version: 0.3
:Manual section: 1
:Manual group: User Commands
......@@ -76,8 +76,9 @@ COMMANDS
*delete*
Delete the specified snapshot(s). The IDs of the snapshots to delete have to be
specified as command line arguments following the options. See the *SNAPSHOT IDS*
section for more information.
specified as command line arguments following the options, unless *--from* and/or
*--until* are used to select the snapshots to delete. See the *SNAPSHOT IDS* section
for more information.
*list*
......@@ -313,7 +314,10 @@ For *restore*, the IDs or prefixes must match exactly one snapshot.
If no IDs or prefixes are specified, *list* will show all available snapshots, while
*delete* will do nothing unless at least one ID or prefix is present on the command
line.
line, or at least one of the *--from* or *--until* options is specified.
Note: When specifying snapshot IDs or prefixes and also using the *--from* and/or
*--until* option(s), only snapshots that match all filters will be included.
TEMPLATE VARIABLES
=======================================================================================
......@@ -427,7 +431,7 @@ valid) value. For example, `2020-02` will be the same as `2020-02-29 23:59:59`.
The specified interval is a closed interval, i.e. snapshots taken at the *--from* or
*--until* times will be included.
Using the same value for both *---from* and *--until* will select all snapshots created
Using the same value for both *--from* and *--until* will select all snapshots created
during this time span. For example, `--from 2018-05 --until 2018-05` will select all
snapshots created in May of 2018.
......
......@@ -6,7 +6,7 @@ package common
// Version number of snot.
//
const Version = "0.2"
const Version = "0.3"
//—————————————————————————————————————————————————————————————————————————————————————————————————
......
......@@ -64,7 +64,7 @@ func main () (int, error) {
// Don't do anything if no snapshot IDs have been specified.
if len (subcmd.Instance ().Args ()) == 0 {
if len (subcmd.Instance ().Args ()) == 0 && opts.From == "" && opts.Until == "" {
return 6, common.InvalidCommandLineError { Msg: "No snapshots to delete specified." }
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment