Skip to content
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

Add --chown and --chmod to commitMessage for ADD/COPY command #4597

Merged
merged 2 commits into from Feb 8, 2024

Conversation

nobiit
Copy link
Contributor

@nobiit nobiit commented Jan 30, 2024

I think the commit message of the COPY/ADD command should include chown/chmod information for clarity.

Comment on lines +1158 to +1164
if cfg.chown != "" {
commitMessage.WriteString(" " + "--chown=" + cfg.chown)
}
if cfg.chmod != "" {
commitMessage.WriteString(" " + "--chmod=" + cfg.chmod)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we apply this change, we should make sure to cover all the flags that these support. --from, --parents, --checksum, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--parents: is reasonable
--from: I think it's not necessary (because images only includes the last stage, so adding from doesn't help)
--checksum: Checksum is usually quite long. So I think including it will make the history look more confusing?

Signed-off-by: Nobi <nobi@nobidev.com>
@tonistiigi tonistiigi merged commit c8b64d3 into moby:master Feb 8, 2024
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants