diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-20 13:51:42 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-21 07:22:36 -0500 |
commit | 653da8fe8f42d96a8ed117f8936f1187dd7288e8 (patch) | |
tree | 18bbc457fb258a1f0b04ab9643993affc8a84bbd /pkg/api | |
parent | 11c5717cdb5a019ff416fa07b9192cc87c29c13d (diff) | |
download | podman-653da8fe8f42d96a8ed117f8936f1187dd7288e8.tar.gz podman-653da8fe8f42d96a8ed117f8936f1187dd7288e8.tar.bz2 podman-653da8fe8f42d96a8ed117f8936f1187dd7288e8.zip |
Fix #2 for compat commit handling of --changes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/compat/images.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go index 401a7ec1b..acb2172a2 100644 --- a/pkg/api/handlers/compat/images.go +++ b/pkg/api/handlers/compat/images.go @@ -97,13 +97,13 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) { runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime) query := struct { - Author string `schema:"author"` - Changes string `schema:"changes"` - Comment string `schema:"comment"` - Container string `schema:"container"` - Pause bool `schema:"pause"` - Repo string `schema:"repo"` - Tag string `schema:"tag"` + Author string `schema:"author"` + Changes []string `schema:"changes"` + Comment string `schema:"comment"` + Container string `schema:"container"` + Pause bool `schema:"pause"` + Repo string `schema:"repo"` + Tag string `schema:"tag"` // fromSrc string # fromSrc is currently unused }{ Tag: "latest", @@ -138,8 +138,8 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) { options.Message = query.Comment options.Author = query.Author options.Pause = query.Pause - if query.Changes != "" { - options.Changes = strings.Split(query.Changes, ",") + for _, change := range query.Changes { + options.Changes = append(options.Changes, strings.Split(change, "\n")...) } ctr, err := runtime.LookupContainer(query.Container) if err != nil { |