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

[portsdiff] Optimize for identical commits #1399

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/vcpkg/commands.portsdiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ namespace vcpkg
const StringView git_commit_id_for_current_snapshot =
parsed.command_arguments.size() < 2 ? StringLiteral{"HEAD"} : StringView{parsed.command_arguments[1]};

if (git_commit_id_for_previous_snapshot == git_commit_id_for_current_snapshot)
{
msg::println(msgPortsNoDiff);
Checks::exit_success(VCPKG_LINE_INFO);
}

const auto portsdiff =
find_portsdiff(paths, git_commit_id_for_previous_snapshot, git_commit_id_for_current_snapshot);
const auto& added_ports = portsdiff.added_ports;
Expand Down
Loading