-
Notifications
You must be signed in to change notification settings - Fork 183
cmd-diff: a few misc enhancements #4253
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
Merged
dustymabe
merged 13 commits into
coreos:main
from
dustymabe:dusty-cmd-diff-enhancements
Sep 26, 2025
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c51cd19
cmd-diff: refactor diff_cmd_output into a loop
dustymabe 539ed6a
cmd-diff: rename vars in diff_cmd_outputs
dustymabe 0119659
cmd-diff: support `cd` strategy for diff_cmd_outputs
dustymabe 0a2cf58
cmd-diff: support `git difftool` so we can utilize vimdiff
dustymabe e81f65d
cmd-diff: refactor metal mounting code into helper
dustymabe 80cb283
cmd-diff: support --metal-du and --metal-ls
dustymabe 3042eb1
cmd-diff: fix superfluous .stdout call
dustymabe b8687f9
cmd-diff: default --from to N-1 build
dustymabe d2fddd4
cmd-diff: support --rpms-json for outputting JSON
dustymabe 86d8d31
cosalib/builds: add get_build_commitmeta()
dustymabe a8441e6
cmd-diff: make rpm diff function names more specific
dustymabe 0adf9fe
cmd-diff: Add new ability to generate rpm diffs from commitmeta.json
dustymabe 5ba9aac
cmd-diff: promote commitmeta.json version of rpm diff
dustymabe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hmm, what were you trying to do that surprised you and motivated this?
E.g. if I do
cosa diff --to=$build
I expect the from to be the latest build. This matchesgit diff
semantics. Having it actually diff against the previous build is confusing.Uh oh!
There was an error while loading. Please reload this page.
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.
See the last commit in #4327
Basically I wanted to be able to not have to specify the previous build in
cmd-build-with-buildah
and havecosa diff
detect that for me.It also enables things like being able to run
cosa diff --rpms
without having to specify a--to
and a--from
at all, likerpm-ostree db diff
does if you don't provide commits to it.Maybe the behavior should be "if
to
islatest_build
thenfrom
will default toprevious_build
, otherwise default tolatest_build
".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.
Hmm, that's already the case today, no?
ISTM like in the last commit of #4327, we can just not pass in
--to
or--from
at all in the default case. If there's a parent build, just passing--from
should do the right thing.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.
You are right. My mistake. I didn't see the opportunity to not pass in the
--to
there.Reverted in #4327