-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman diff accept two images or containers #10836
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks @Luap99, I kind of understood where I was going wrong.
|
@infiniteregrets I added this all three diff man pages. |
Looks good! |
|
||
const ( | ||
// only diff containers | ||
DiffContainer DiffType = 1 << iota |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a bitfield, it seems like it would be better to manually specify - 0b1, 0b10, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 << iota
is basically just saying to shift the bit one step for each entry. It should be less error prone than writing this manually especially when you add new entries, However I understand that this syntax is confusing if you are not familiar with it. I can remove it if you want.
One nit otherwise LGTM |
cf44e5e
to
8ea2ebb
Compare
/hold |
First, make podman diff accept optionally a second argument. This allows the user to specify a second image/container to compare the first with. If it is not set the parent layer will be used as before. Second, podman container diff should only use containers and podman image diff should only use images. Previously, podman container diff would use the image when both an image and container with this name exists. To make this work two new parameters have been added to the api. If they are not used the previous behaviour is used. The same applies to the bindings. Fixes containers#10649 Signed-off-by: Paul Holzinger <[email protected]>
I had to repush to fix a test. |
/lgtm |
/hold cancel |
First, make podman diff accept optionally a second argument. This allows
the user to specify a second image/container to compare the first with.
If it is not set the parent layer will be used as before.
Second, podman container diff should only use containers and podman
image diff should only use images. Previously, podman container diff
would use the image when both an image and container with this name
exists.
To make this work two new parameters have been added to the api. If they
are not used the previous behaviour is used. The same applies to the
bindings.
Fixes #10649