Skip to content

Commit 9c70c42

Browse files
committed
settings: replace isPath with true when we know
We have already checked `isPath` is true before calling `TryGet`, so let's just pass `isPath: true` in these calls.
1 parent 68b5536 commit 9c70c42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shared/Core/Settings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ public IEnumerable<string> GetSettingValues(string envarName, string section, st
411411
// Look for a scoped entry that includes the scheme "protocol://example.com" first as
412412
// this is more specific. If `isPath` is true, then re-get the value from the
413413
// `GitConfiguration` with `isPath` specified.
414-
if ((isPath && config.TryGet(queryName, isPath, out value)) ||
414+
if ((isPath && config.TryGet(queryName, true, out value)) ||
415415
_configEntries.TryGetValue(queryName, out value))
416416
{
417417
yield return value;
@@ -422,7 +422,7 @@ public IEnumerable<string> GetSettingValues(string envarName, string section, st
422422
// `isPath` specified.
423423
string scopeWithoutScheme = scope.TrimUntilIndexOf(Uri.SchemeDelimiter);
424424
string queryWithSchemeName = $"{section}.{scopeWithoutScheme}.{property}";
425-
if ((isPath && config.TryGet(queryWithSchemeName, isPath, out value)) ||
425+
if ((isPath && config.TryGet(queryWithSchemeName, true, out value)) ||
426426
_configEntries.TryGetValue(queryWithSchemeName, out value))
427427
{
428428
yield return value;
@@ -444,7 +444,7 @@ public IEnumerable<string> GetSettingValues(string envarName, string section, st
444444
*
445445
*/
446446
string name = $"{section}.{property}";
447-
if ((isPath && config.TryGet(name, isPath, out value)) ||
447+
if ((isPath && config.TryGet(name, true, out value)) ||
448448
_configEntries.TryGetValue(name, out value))
449449
{
450450
yield return value;

0 commit comments

Comments
 (0)