Skip to content

Commit

Permalink
Add comment on removetargets
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <asraa@google.com>
  • Loading branch information
asraa committed Sep 28, 2022
1 parent 5d49dd4 commit 83ba053
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/tuf/app/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ func InitCmd(ctx context.Context, directory, previous string,
}
// Remove any targets not present: only removes from targets to avoid
// removing from delegations.
// See https://github.com/theupdateframework/go-tuf/issues/400 and
// https://github.com/theupdateframework/go-tuf/blob/f75cbcc8550dfb9311c6723999fe7b1d3d2bc116/repo.go#L1230
// for why we avoid `repo.RemoveTargetsWithExpires`
for _, tt := range targetsToRemove {
delete(t.Targets, tt)
}
Expand Down

0 comments on commit 83ba053

Please sign in to comment.