-
Notifications
You must be signed in to change notification settings - Fork 95
Add docs for baseline diff #584
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
Open
autoantwort
wants to merge
1
commit into
MicrosoftDocs:main
Choose a base branch
from
autoantwort:feature/baseline-diff
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| --- | ||
| title: vcpkg x-baseline-diff | ||
| description: Command line reference for the vcpkg x-baseline-diff command. Computes version changes to installable packages between two baselines. | ||
| ms.date: 06/14/2026 | ||
| --- | ||
| # vcpkg x-baseline-diff | ||
|
|
||
| [!INCLUDE [experimental](../../includes/experimental.md)] | ||
|
|
||
| ## Synopsis | ||
|
|
||
| ```console | ||
| vcpkg x-baseline-diff [options] <new-baseline> | ||
| vcpkg x-baseline-diff [options] <old-baseline> <new-baseline> | ||
| ``` | ||
|
|
||
| ## Description | ||
|
|
||
| Compares the resolved versions of all packages that would be installed for the current | ||
| [manifest](../reference/vcpkg-json.md) between two baselines, and prints a summary of | ||
| version changes grouped by direct and transitive dependencies. | ||
|
|
||
| This command is useful after running [`x-update-baseline`](update-baseline.md) to review | ||
| exactly which package versions changed before committing the update. | ||
|
|
||
| `x-baseline-diff` requires [Manifest mode](../concepts/manifest-mode.md) — a | ||
| `vcpkg.json` must be present in the current directory or the directory specified by | ||
| [`--x-manifest-root`](common-options.md). | ||
|
|
||
| ### Baseline arguments | ||
|
|
||
| The `<old-baseline>` and `<new-baseline>` arguments identify the two registry baselines to | ||
| compare. Their meaning depends on the type of the default registry: | ||
|
|
||
| | Registry kind | Accepted argument format | | ||
| |---|---| | ||
| | Builtin (default) or git registry pointing at `https://github.com/microsoft/vcpkg` | Full 40-character commit SHA, or any git ref (tag, branch name) that can be resolved in the local vcpkg clone | | ||
| | Git registry (other) | Full 40-character commit SHA. You can run `git rev-parse <branch name>` to get a commit SHA. | | ||
| | Filesystem registry | Named baseline string (e.g. `"v1"`, `"v2"`) as defined in `versions/baseline.json` | | ||
|
|
||
| ### One-argument form | ||
|
|
||
| When only `<new-baseline>` is provided, the old baseline is determined automatically: | ||
|
|
||
| 1. If the `vcpkg.json` contains a | ||
| [`"builtin-baseline"`](../reference/vcpkg-json.md#builtin-baseline) field, that | ||
| value is used as `<old-baseline>`. | ||
| 2. Otherwise, if `vcpkg-configuration.json` defines a `"default-registry"` with a | ||
| `"baseline"` field, that value is used. | ||
| 3. If neither is available, the command exits with an error. | ||
|
|
||
| ### Output | ||
|
|
||
| The output lists packages whose resolved version changed between the two baselines, | ||
| separated into two sections: | ||
|
|
||
| - **Direct dependencies** — packages listed directly in the manifest's | ||
| [`"dependencies"`](../reference/vcpkg-json.md#dependencies) field. | ||
| - **Transitive dependencies** — packages pulled in indirectly. | ||
|
|
||
| Each changed package is shown as: | ||
|
|
||
| ``` | ||
| <package-name>: <old-version> -> <new-version> | ||
| ``` | ||
|
|
||
| Newly added packages (present in the new baseline but not the old) are shown as: | ||
|
|
||
| ``` | ||
| <package-name>: new: <new-version> | ||
| ``` | ||
|
|
||
| ## Examples | ||
|
|
||
| Compare two specific release tags for a manifest that uses the builtin registry: | ||
|
|
||
| ```console | ||
| vcpkg x-baseline-diff 2024.11.16 2024.12.16 | ||
| ``` | ||
|
|
||
| Compare two commit SHAs explicitly: | ||
|
|
||
| ```console | ||
| vcpkg x-baseline-diff 5507daa796359fe8d45418e694328e878ac2b82f 9291e3e1d8e4a3d7a9f8b2c1f0e5d6c7b8a9e0f1 | ||
| ``` | ||
|
|
||
| Use the one-argument form after running `x-update-baseline` — the current | ||
| `builtin-baseline` in `vcpkg.json` is used as the old baseline: | ||
|
|
||
| ```console | ||
| vcpkg x-update-baseline | ||
| vcpkg x-baseline-diff 2026.03.18 | ||
| ``` | ||
|
|
||
| Compare two named baselines in a filesystem registry: | ||
|
|
||
| ```console | ||
| vcpkg x-baseline-diff v1 v2 | ||
| ``` | ||
|
|
||
| ## Options | ||
|
|
||
| All vcpkg commands support a set of [common options](common-options.md). | ||
|
|
||
| ### `--x-no-default-features` | ||
|
|
||
| Do not include [default features](../reference/vcpkg-json.md#default-features) of the | ||
| top-level manifest when computing the dependency graph. | ||
|
|
||
| ### `--x-feature=<feature>` | ||
|
|
||
| Include the specified [feature](../reference/vcpkg-json.md#features) of the top-level | ||
| manifest when computing the dependency graph. Can be specified multiple times. | ||
|
|
||
| ## See also | ||
|
|
||
| - [`x-update-baseline`](update-baseline.md) — update baselines for all configured registries | ||
| - [Versioning](../users/versioning.md) — how vcpkg resolves package versions using baselines | ||
| - [`vcpkg.json` `"builtin-baseline"`](../reference/vcpkg-json.md#builtin-baseline) — the manifest field used as the old baseline in one-argument mode | ||
| - [Registries](../users/registries.md) — how to configure custom registries with their own baselines | ||
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.
I think we do not need this. Other opinions?