Skip to content

Conversation

@pakrym
Copy link
Contributor

@pakrym pakrym commented Nov 25, 2021

Fixes: #771

Reads but does not interpret any of V1 extensions. The only one of interest is the worktreeConfig which I didn't implement because config.worktree didn't seem to contain any information of interest.

Sample sparse repo config:

config.worktree

[core]
	sparseCheckout = true

config

[core]
	repositoryformatversion = 1
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
	url = https://github.com/Azure/azure-sdk-for-net
	fetch = +refs/heads/*:refs/remotes/origin/*
	promisor = true
	partialclonefilter = tree:0
[branch "main"]
	remote = origin
	merge = refs/heads/main
[extensions]
	worktreeConfig = true

@pakrym
Copy link
Contributor Author

pakrym commented Nov 25, 2021

cc @tmat

@KalleOlaviNiemitalo
Copy link

How does GetUntrackedFiles work here if a tree is missing because of sparse checkout?

@pakrym
Copy link
Contributor Author

pakrym commented Nov 25, 2021

To be honest, I didn't know that feature existed.

If I understand how GetUntrackedFiles works, it might be a requirement for source link to clone .gitignore before building.

But for the files that are not gitingored it should work fine, the index is still there.

What do you think is the best course of action here?

@tmat
Copy link
Member

tmat commented Dec 6, 2021

Thanks for the PR. I'll need to find time to study the implications of this change before I can review.

@hcoona
Copy link

hcoona commented Sep 8, 2022

10 months passed, will this MR merge?

Copy link
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

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

Sorry for the delay.

@gitfool
Copy link

gitfool commented Oct 21, 2023

@tmat The github checkout action now supports partial checkout filters (actions/checkout#1396) and since this was merged can a new sourcelink package please be published to nuget to avoid breaking builds enabling partial checkout with:

error : Error reading git repository information: Unsupported repository version 1. Only versions up to 0 are supported.

🙏

Xkonti added a commit to Xkonti/smart-migrations-net that referenced this pull request Aug 13, 2025
Updated
[Microsoft.SourceLink.GitHub](https://github.com/dotnet/sourcelink) from
1.1.1 to 8.0.0.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.SourceLink.GitHub's
releases](https://github.com/dotnet/sourcelink/releases)._

## 8.0.0

## What's Changed

**Source Link is now included in .NET SDK 8 and enabled by default.
Projects that migrate to .NET SDK 8 do not need to reference Source Link
packages explicitly via `PackageReference` anymore.**

* Add sparse checkout support by @​pakrym in
dotnet/sourcelink#772
* Add support for Gitee by @​luocs in
dotnet/sourcelink#922
* Fix target Input Output as to not interfere with incremental. by
@​yuehuang010 in dotnet/sourcelink#901
* Prepare for inclusion in .NET SDK by @​tmat in
dotnet/sourcelink#988
* Avoid creating source link .json file when no source control mapping
is available by @​tmat in dotnet/sourcelink#989
* Do not report warnings when SourceLink packages are not referenced ex…
by @​tmat in dotnet/sourcelink#991
* Bump version to 8.0 to match SDK by @​tmat in
dotnet/sourcelink#992
* Fix FileWrites by @​tmat in
dotnet/sourcelink#995
* Remove unnecessary <?xml tags by @​ViktorHofer in
dotnet/sourcelink#1013
* Remove unnecessary license header in msbuild by @​ViktorHofer in
dotnet/sourcelink#1014
* Allow multiple Source Link assemblies to be loaded from different
locations by @​tmat in dotnet/sourcelink#1034
* New command-line APIs and `offline` argument by @​NikolaMilosavljevic
in dotnet/sourcelink#1068
* Do not report warning if submodule dir is missing by @​tmat in
dotnet/sourcelink#1078

## New Contributors
* @​MichaelSimons made their first contribution in
dotnet/sourcelink#836
* @​alexperovich made their first contribution in
dotnet/sourcelink#867
* @​ShreyasJejurkar made their first contribution in
dotnet/sourcelink#892
* @​pakrym made their first contribution in
dotnet/sourcelink#772
* @​IanKemp made their first contribution in
dotnet/sourcelink#889
* @​luocs made their first contribution in
dotnet/sourcelink#922
* @​yuehuang010 made their first contribution in
dotnet/sourcelink#901
* @​NikolaMilosavljevic made their first contribution in
dotnet/sourcelink#994
* @​oleksandr-didyk made their first contribution in
dotnet/sourcelink#933
* @​v-chayan made their first contribution in
dotnet/sourcelink#1054

**Full Changelog**:
dotnet/sourcelink@1.1.1...8.0.0

Commits viewable in [compare
view](dotnet/sourcelink@1.1.1...8.0.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.SourceLink.GitHub&package-manager=nuget&previous-version=1.1.1&new-version=8.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xkonti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support sparse checkout repositories

5 participants