Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/commands/misc/rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ total: 3 snapshot(s)
```

Interestingly, the new snapshots replaced the old ones but were not tagged. The
options `--forget` and `--tags-rewritten ''` prevent the command from adding the
`rewrite` tag.
option `--forget` prevent the command from adding the `rewrite` tag. To be more
precise, there is the option `--tags-rewritten` which specifies which tags to
add to rewritten snapshots. It defaults to `rewrite` if no `--forget` is given
and to `''` (i.e. no tag) if `--forget` is used.

### The very short way

Expand Down Expand Up @@ -240,10 +242,12 @@ with the data packs. It has two consequences:

## Rewriting tags

The `rustic rewrite` command allows you to manipulate the snapshots' tags.
The `rustic rewrite` command also allows you to manipulate the snapshots' tags.
Note that there is the special `rustic tag` command which only allows to modify
tags, this is basically a shortcut for the respective options of
`rustic rewrite --force`.

For example, you can use `rewrite --set-tags ...` to set a new tag list to a
snapshot:
You can use `rewrite --set-tags ...` to set a new tag list to a snapshot:

```console
$ rustic snapshots --all --filter-paths Project
Expand Down Expand Up @@ -307,9 +311,6 @@ snapshots for (host [kasimir], label [], paths [Project])
total: 2 snapshot(s)
```

**Note:** `rustic tag --remove ...` is an alias for
`rustic rewrite --forget --remove-tags ...`

```console
# Replace the tag list
$ rustic rewrite --forget --set-tags origin 3f1560c5
Expand Down