dotnet / dotnet/sourcelink

The name/documentation of EmbedUntrackedSources is misleading

Open
#633 0 comments 5 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.4k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Looking at the [code which enumerates untracked files](https://github.com/dotnet/sourcelink/blob/0815575f4f226973dac0d3b3f9d0229dca8ac4f1/src/Microsoft.Build.Tasks.Git/GitOperations.cs#L349), it appears that this feature only actually embeds files which are ignored or outside the repository. I knew this feature embedded things like the generated `AssemblyInfo.cs`, but based on the name I also thought it'd embed files that hadn't yet been comitted to Git.

To me, untracked files are files which Git is willing to track but isn't yet. The terminology in the Git documentation ([here in particular](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)) seems to agree with me.

It seems to me that either the name of the options should be changed (with a compatibility property in `Microsoft.SourceLink.Common.targets`) or the documentation should be clarified to state that it embeds files that are ignored by the SCM or outside of the repository.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.