Skip to content

Compare baseline

The two commits and the Git command that show the difference of an element since a baseline (SR-051 AK4). Runs nothing.

Command baseline.compare. Reads the workspace and changes no file.

Field Type Required Description
baseline string yes Name of a baseline, or its file name (with or without .yaml).
ref elementRef yes UUID, short ID or identifier (e.g. SR-036), any case; several matches give ref.ambiguous.
Field Type Required Description
repository string yes
from commit yes Full Git object ID (SHA-1 or SHA-256).
to string or null yes The commit to compare with; null for the working copy.
file string yes The element file now, relative to its repository.
oldFile string no Its path at the baseline commit, when the file moved.
command array of string yes git -C <repository folder> diff <from> [<to>] – [<oldFile>] <file>, to run in the workspace root, / as separator, the same on every access.

In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the command Compare baseline.

reqseq baseline compare, with --json for the output as JSON. Its help:

Usage: reqseq baseline compare <baseline> <ref> [options]
The two commits and the Git command that show the difference of an element since
a baseline (SR-051 AK4). Runs nothing.
Arguments:
baseline Name of a baseline, or its file name (with or without
.yaml).
ref
Options:
--baseline <value> instead of the argument <baseline>
--ref <value> instead of the argument <ref>
--input <json|@file|-> command input as JSON: inline, from a file, or from
standard input
--workspace <path> workspace root (default: nearest folder upwards with
reqseq-workspace.yaml)
--json print exactly the command output as JSON
--yaml print the whole command output as YAML, problems one
per line
-h, --help show help

POST /v1/commands/baseline.compare on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.

Tool baseline_compare of the MCP server (reqseq mcp), with the input as its arguments.