From 8e4a5ffe268c3e8028af7120cc4ef38729adb6b8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 25 Apr 2023 07:37:56 -0400 Subject: [PATCH] Include tags in history queries Fixes: https://github.com/containers/podman/issues/17763 Signed-off-by: Daniel J Walsh --- vendor/github.com/containers/common/libimage/history.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/containers/common/libimage/history.go b/vendor/github.com/containers/common/libimage/history.go index 46252df106..82a97dd9d3 100644 --- a/vendor/github.com/containers/common/libimage/history.go +++ b/vendor/github.com/containers/common/libimage/history.go @@ -42,16 +42,17 @@ func (i *Image) History(ctx context.Context) ([]ImageHistory, error) { // corresponding image ID, size and get the next later if needed. numHistories := len(ociImage.History) - 1 usedIDs := make(map[string]bool) // prevents assigning images IDs more than once + tags := i.NamesHistory() for x := numHistories; x >= 0; x-- { history := ImageHistory{ ID: "", // may be overridden below Created: ociImage.History[x].Created, CreatedBy: ociImage.History[x].CreatedBy, Comment: ociImage.History[x].Comment, + Tags: tags, } if layer != nil { - history.Tags = layer.Names if !ociImage.History[x].EmptyLayer { history.Size = layer.UncompressedSize }