Skip to content

[release/10.0.1xx] Keep template_feed/../content/../.gitattributes in archives#52771

Merged
marcpopMSFT merged 1 commit intodotnet:release/10.0.1xxfrom
baronfel:backport-gitattributes-template-fixes
Feb 6, 2026
Merged

[release/10.0.1xx] Keep template_feed/../content/../.gitattributes in archives#52771
marcpopMSFT merged 1 commit intodotnet:release/10.0.1xxfrom
baronfel:backport-gitattributes-template-fixes

Conversation

@baronfel
Copy link
Member

@baronfel baronfel commented Feb 2, 2026

Manual backport of #52741 to 10.0.1xx

Issue

Some consumers of the VMR source build consume the git archive generated source tarball. Without this change, the source tarball doesn't include the content/../.gitattributes file, which makes dotnet new gitattributes non-functional.

Risk

Low

Testing

Manual verification, and creating plan for future automated validation in dotnet/source-build#5472

Some consumers of the VMR source build consume the `git archive`
generated source tarball. Without this change, the source tarball doesn't
include the content/../.gitattributes file, which makes `dotnet new
gitattributes` non-functional.

Fixes: dotnet#52307
Copilot AI review requested due to automatic review settings February 2, 2026 15:17
@baronfel baronfel changed the base branch from main to release/10.0.1xx February 2, 2026 15:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a manual backport of #52741 to the 10.0.1xx branch, fixing an issue where dotnet new gitattributes fails to create a file when using the VMR source tarball generated via git archive. The root cause is that the template .gitattributes file contains export-ignore rules that cause it to exclude itself from archives.

Changes:

  • Added a -export-ignore attribute rule to prevent the gitattributes template file from being excluded in git archives

@baronfel baronfel added Area-Common templates Covers templates in the repo (classlib, console, common item templates) and removed Area-Infrastructure labels Feb 2, 2026
@baronfel baronfel changed the title Keep template_feed/../content/../.gitattributes in archives [release/10.0.2xx] Keep template_feed/../content/../.gitattributes in archives Feb 2, 2026
@baronfel baronfel changed the title [release/10.0.2xx] Keep template_feed/../content/../.gitattributes in archives [release/10.0.1xx] Keep template_feed/../content/../.gitattributes in archives Feb 2, 2026
@marcpopMSFT
Copy link
Member

/ba-g no build for gitattribute files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Common templates Covers templates in the repo (classlib, console, common item templates) Servicing-approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[10.0.101]dotnet new gitattributes emits no file

4 participants