Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Config filename case insensitive - #4452

#4452
Merged
arturcic merged 2 commits into
GitTools:mainGitTools/GitVersion:mainfrom
arturcic:fix/config-filename-case-insensitivearturcic/GitVersion:fix/config-filename-case-insensitiveCopy head branch name to clipboard
Mar 12, 2025
Merged

Config filename case insensitive#4452
arturcic merged 2 commits into
GitTools:mainGitTools/GitVersion:mainfrom
arturcic:fix/config-filename-case-insensitivearturcic/GitVersion:fix/config-filename-case-insensitiveCopy head branch name to clipboard

Conversation

@arturcic

Copy link
Copy Markdown
Member

This PR fixes the they we look for a configuration filename on case sensitive file systems/oses

Copilot AI review requested due to automatic review settings March 12, 2025 08:35
@arturcic arturcic changed the title Fix/config filename case insensitive Config filename case insensitive Mar 12, 2025
@arturcic arturcic added this to the 6.2.x milestone Mar 12, 2025
@arturcic arturcic added the bug label Mar 12, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes the configuration filename lookup on case sensitive file systems by ensuring that file name comparisons are done in a case-insensitive manner.

  • Adds a new test to verify that configuration file lookup succeeds when file names differ only in case.
  • Refactors the SupportedConfigFileNames field and improves the candidate selection logic in GetConfigurationFile.

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.

File Description
src/GitVersion.Configuration.Tests/Configuration/ConfigurationFileLocatorTests.cs Added a new test verifying that file lookup works regardless of filename casing.
src/GitVersion.Configuration/ConfigurationFileLocator.cs Rewritten candidate lookup and logging details; changed SupportedConfigFileNames field from public list to private readonly array.
Comments suppressed due to low confidence (1)

src/GitVersion.Configuration/ConfigurationFileLocator.cs:66

  • [nitpick] The debug message logs only the directory instead of the candidate file name being evaluated, which may reduce the clarity of log output during troubleshooting. Consider logging the candidate file name to improve debugging visibility.
this.log.Debug($"Configuration file not found at '{directory}'");

Comment thread src/GitVersion.Configuration/ConfigurationFileLocator.cs
@arturcic
arturcic force-pushed the fix/config-filename-case-insensitive branch from 035827e to 0388b70 Compare March 12, 2025 09:40
@arturcic
arturcic requested a review from Copilot March 12, 2025 09:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 ensures that configuration filename lookup is case insensitive, preventing errors on case sensitive file systems.

  • Introduces a new test to verify that configuration files are detected regardless of casing.
  • Refactors candidate file lookup logic and logging in the configuration file locator.

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

File Description
src/GitVersion.Configuration.Tests/Configuration/ConfigurationFileLocatorTests.cs Added a test case to ensure that configuration files differing only in casing are correctly detected.
src/GitVersion.Configuration/ConfigurationFileLocator.cs Updated candidate lookup logic and logging to perform a case insensitive search for configuration files.

@arturcic
arturcic merged commit 22f553a into GitTools:main Mar 12, 2025
@arturcic
arturcic deleted the fix/config-filename-case-insensitive branch March 12, 2025 10:07
@mergify

mergify Bot commented Mar 12, 2025

Copy link
Copy Markdown
Contributor

Thank you @arturcic for your contribution!

@arturcic arturcic modified the milestones: 6.2.x, 6.2.0 Apr 1, 2025
@gittools-bot

Copy link
Copy Markdown
Contributor

🎉 This issue has been resolved in version 6.2.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.