diff --git a/docs/pipelines/build/includes/variables-hosted.md b/docs/pipelines/build/includes/variables-hosted.md index eccf8d78ad5..6a5b728c1b1 100644 --- a/docs/pipelines/build/includes/variables-hosted.md +++ b/docs/pipelines/build/includes/variables-hosted.md @@ -74,7 +74,7 @@ When you use a variable in a template that is not marked as available in templat | Build.RequestedForEmail | See "[How are the identity variables set?](#identity_values)". | Yes | | Build.RequestedForId | See "[How are the identity variables set?](#identity_values)". | Yes | | Build.SourceBranch | The branch of the triggering repo the build was queued for. Some examples:
When you use this variable in your build number format, the forward slash characters (`/`) are replaced with underscore characters `_`).

Note: In TFVC, if you're running a gated check-in build or manually building a shelveset, you can't use this variable in your build number format. | Yes | -| Build.SourceBranchName | The name of the branch in the triggering repo the build was queued for.
Note: In TFVC, if you're running a gated check-in build or manually building a shelveset, you can't use this variable in your build number format. | Yes | +| Build.SourceBranchName | The name of the branch in the triggering repo the build was queued for.
Note: In TFVC, if you're running a gated check-in build or manually building a shelveset, you can't use this variable in your build number format. | Yes | | Build.SourcesDirectory | The local path on the agent where your source code files are downloaded. For example: `c:\agent_work\1\s`.

By default, new build pipelines update only the changed files.

Important note: If you check out only one Git repository, this path is the exact path to the code. If you check out multiple repositories, it reverts to its default value, which is `$(Pipeline.Workspace)/s`, even if the self (primary) repository is checked out to a custom path different from its multi-checkout default path `$(Pipeline.Workspace)/s/` (in this respect, the variable differs from the behavior of the Build.Repository.LocalPath variable).

This variable is agent-scoped, and can be used as an environment variable in a script and as a parameter in a build task, but not as part of the build number or as a version control tag. | No | | Build.SourceVersion | The latest version control change of the triggering repo that is included in this build.
This variable is agent-scoped, and can be used as an environment variable in a script and as a parameter in a build task, but not as part of the build number or as a version control tag. | Yes | | Build.SourceVersionMessage | The comment of the commit or changeset for the triggering repo. We truncate the message to the first line or 200 characters, whichever is shorter.

The `Build.SourceVersionMessage` corresponds to the message on `Build.SourceVersion` commit. The `Build.SourceVersion` commit for a PR build is the merge commit (not the commit on the source branch).

This variable is agent-scoped, and can be used as an environment variable in a script and as a parameter in a build task, but not as part of the build number or as a version control tag.

Also, this variable is only available on the step level and is not available in the job or stage levels (that is, the message isn't extracted until the job starts and the code is checked out).

Note: This variable is available in TFS 2015.4.

Note: The **Build.SourceVersionMessage** variable does not work with classic build pipelines in Bitbucket repositories when **Batch changes while a build is in progress** is enabled. | No |