Skip to content

feat: Enhances git repo detection for worktrees#181

Merged
BenjaminMichaelis merged 1 commit intomainfrom
180-getdefaultreporoot-throws-in-git-wor
Feb 26, 2026
Merged

feat: Enhances git repo detection for worktrees#181
BenjaminMichaelis merged 1 commit intomainfrom
180-getdefaultreporoot-throws-in-git-wor

Conversation

@BenjaminMichaelis
Copy link
Member

Fixes #180

Updates `TrySearchForGitContainingDirectory` to correctly identify the repository root when `.git` is a file, as is the case in git worktrees. This prevents failures in methods like `GetDefaultRepoRoot` within these environments.

Also refines build variable generation to ensure the temporary file is created once, even when `SolutionDir` is not defined.

Fixes #180
@BenjaminMichaelis BenjaminMichaelis self-assigned this Feb 25, 2026
@BenjaminMichaelis BenjaminMichaelis merged commit 732193a into main Feb 26, 2026
4 checks passed
@BenjaminMichaelis BenjaminMichaelis deleted the 180-getdefaultreporoot-throws-in-git-wor branch February 26, 2026 05:00
intellitect-bot pushed a commit to IntelliTect/EssentialCSharp.Web that referenced this pull request Feb 26, 2026
Updated
[IntelliTect.Multitool](https://github.com/IntelliTect/Multitool) from
1.5.3 to 2.0.0.

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

_Sourced from [IntelliTect.Multitool's
releases](https://github.com/IntelliTect/Multitool/releases)._

## 2.0.0

## Breaking Changes

- Remove support for Claims Principal Extensions by @​BenjaminMichaelis
in IntelliTect/Multitool#144

## Fixes:
- Enhances git repo detection for worktrees by @​BenjaminMichaelis in
IntelliTect/Multitool#181
- Improve auto CI detection variables

## What's Changed
* BREAKING CHANGE: Remove support for Claims Principal Extensions by
@​BenjaminMichaelis in IntelliTect/Multitool#144
* chore(deps): bump Microsoft.NET.Test.Sdk from 17.12.0 to 17.13.0 by
@​dependabot[bot] in IntelliTect/Multitool#145
* chore(deps): bump fastify/github-action-merge-dependabot from 3.10.1
to 3.11.1 by @​dependabot[bot] in
IntelliTect/Multitool#147
* Bump Microsoft.NET.Test.Sdk, Moq, xunit and xunit.runner.visualstudio
by @​dependabot[bot] in
IntelliTect/Multitool#149
* CI: Add trx-to-vsplaylist by @​BenjaminMichaelis in
IntelliTect/Multitool#150
* Bump xunit.runner.visualstudio from 3.1.1 to 3.1.2 by
@​dependabot[bot] in IntelliTect/Multitool#152
* Bump xunit.runner.visualstudio from 3.1.2 to 3.1.3 by
@​dependabot[bot] in IntelliTect/Multitool#153
* chore(deps): Bump actions/download-artifact from 4 to 5 by
@​dependabot[bot] in IntelliTect/Multitool#154
* chore(deps): Bump actions/checkout from 4 to 5 by @​dependabot[bot] in
IntelliTect/Multitool#155
* Bump xunit.runner.visualstudio from 3.1.3 to 3.1.4 by
@​dependabot[bot] in IntelliTect/Multitool#156
* chore(deps): Bump actions/setup-dotnet from 4 to 5 by
@​dependabot[bot] in IntelliTect/Multitool#157
* Bump xunit.runner.visualstudio from 3.1.4 to 3.1.5 by
@​dependabot[bot] in IntelliTect/Multitool#158
* chore(deps): Bump fastify/github-action-merge-dependabot from 3.11.1
to 3.11.2 by @​dependabot[bot] in
IntelliTect/Multitool#159
* Bump Microsoft.NET.Test.Sdk from 17.14.1 to 18.0.0 by
@​dependabot[bot] in IntelliTect/Multitool#160
* Add .slnx file for .NET 9+ compatibility alongside existing .sln file
by @​Copilot in IntelliTect/Multitool#162
* Update to .NET 9.0 and verify all NuGet packages are current by
@​Copilot in IntelliTect/Multitool#161
* Add GitHub Actions workflow for Copilot agent environment setup by
@​Copilot in IntelliTect/Multitool#163
* chore(deps): Bump actions/upload-artifact from 4 to 5 by
@​dependabot[bot] in IntelliTect/Multitool#164
* chore(deps): Bump actions/download-artifact from 5 to 6 by
@​dependabot[bot] in IntelliTect/Multitool#165
* chore(deps): Bump BenjaminMichaelis/trx-to-vsplaylist from 1 to 2 by
@​dependabot[bot] in IntelliTect/Multitool#166
* chore(deps): Bump actions/checkout from 5 to 6 by @​dependabot[bot] in
IntelliTect/Multitool#167
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 9.0.0 to 10.0.100 by
@​dependabot[bot] in IntelliTect/Multitool#168
* Bump Microsoft.NET.Test.Sdk from 18.0.0 to 18.0.1 by @​dependabot[bot]
in IntelliTect/Multitool#169
* chore(deps): Bump actions/upload-artifact from 5 to 6 by
@​dependabot[bot] in IntelliTect/Multitool#171
* chore(deps): Bump actions/download-artifact from 6 to 7 by
@​dependabot[bot] in IntelliTect/Multitool#172
* Update to .NET 10.0, C# 14.0, and current NuGet packages by @​Copilot
in IntelliTect/Multitool#174
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 10.0.101 to 10.0.102 by
@​dependabot[bot] in IntelliTect/Multitool#175
* chore(deps): Bump BenjaminMichaelis/trx-to-vsplaylist from 2 to 3 by
@​dependabot[bot] in IntelliTect/Multitool#176
* Bump Microsoft.SourceLink.GitHub from 8.0.0 to 10.0.102 by
@​dependabot[bot] in IntelliTect/Multitool#177
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 10.0.102 to 10.0.103 by
@​dependabot[bot] in IntelliTect/Multitool#178
* Bump Microsoft.SourceLink.GitHub from 10.0.102 to 10.0.103 by
@​dependabot[bot] in IntelliTect/Multitool#179
* feat: Enhances git repo detection for worktrees by @​BenjaminMichaelis
in IntelliTect/Multitool#181
* feat: Add CI Detection Tests by @​BenjaminMichaelis in
IntelliTect/Multitool#182

## New Contributors
* @​Copilot made their first contribution in
IntelliTect/Multitool#162

**Full Changelog**:
IntelliTect/Multitool@v1.5.3...v1.5.4

Commits viewable in [compare
view](IntelliTect/Multitool@v1.5.3...v2.0.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=IntelliTect.Multitool&package-manager=nuget&previous-version=1.5.3&new-version=2.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 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

GetDefaultRepoRoot() throws in git worktrees when running dotnet run --project

1 participant