25 writes to Ref
aspire (4)
Configuration\ConfigSourceService.cs (4)
170
Ref
= explicitSource ? environment.GetEnvironmentVariable(CliConfigNames.InitSourceRef) : null
250
Ref
= source.Ref,
449
Ref
= source.Ref
541
Ref
= source.Ref
Aspire.Cli.Tests (21)
Commands\ConfigSourceCommandTests.cs (1)
307
Ref
= invalidField == "ref" ? "HEAD" : null,
Configuration\ConfigSourceServiceGitTests.cs (6)
174
Ref
= source.Ref,
554
new() { Repository = workspace.Path, Path = AspireConfigFile.FileName,
Ref
= reference },
572
new() { Repository = workspace.Path, Path = AspireConfigFile.FileName,
Ref
= expectedCommit },
604
var pinned = await client.CheckAsync(new() { Repository = source.Repository, Path = source.Path,
Ref
= original.Commit },
630
new() { Repository = workspace.Path, Path = AspireConfigFile.FileName,
Ref
= reference },
675
Ref
= selector switch
Configuration\ConfigSourceServiceTests.cs (12)
141
Ref
= difference == "ref" ? "other" : s_appliedSource.Ref,
343
Ref
= s_appliedSource.Ref,
582
Ref
= gitRef,
659
new ConfigSource { Repository = s_source.Repository, Path = s_source.Path,
Ref
= reference }.Validate();
678
Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = s_source.Path,
Ref
= reference }.Validate()).Message);
689
var expected = new ConfigSource { Repository = s_source.Repository, Path = s_source.Path,
Ref
= "preview" };
1045
Ref
= s_appliedSource.Ref,
1299
Ref
= "different-branch",
1439
var invalid = new ConfigSource { Repository = repository, Path = s_source.Path,
Ref
= gitRef, AppliedVersion = "version-1" };
1587
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.Path,
Ref
= "preview" }));
1589
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.Path,
Ref
= "preview" }),
1590
service.GetCacheDirectory(new() { Repository = s_source.Repository, Path = s_source.Path,
Ref
= "main" }));
TestServices\TestConfigSourceServices.cs (2)
59
Ref
= source.Ref,
120
Ref
= state.Reference == "HEAD" ? null : state.Reference.StartsWith("refs/heads/", StringComparison.Ordinal)
27 references to Ref
aspire (20)
Configuration\ConfigSource.cs (12)
30
if (
Ref
is null)
35
return IsCommit(
Ref
) ||
Ref
.StartsWith("refs/heads/", StringComparison.Ordinal) ?
Ref
: $"refs/heads/{
Ref
}";
41
&& first.
Ref
== second.
Ref
;
83
if (
Ref
is not null && !IsCommit(
Ref
))
85
var branch =
Ref
.StartsWith("refs/heads/", StringComparison.Ordinal) ?
Ref
["refs/heads/".Length..] :
Ref
;
Configuration\ConfigSourceService.cs (8)
174
source.Repository, source.Path, source.
Ref
?? ConfigSourceStrings.DefaultBranch,
250
Ref = source.
Ref
,
319
var identity = new ConfigSourceIdentity(source.Repository, source.Path, source.
Ref
);
330
foreach (var group in sources.GroupBy(source => new ConfigSourceIdentity(source.Repository, source.Path, source.
Ref
)))
417
var key = XxHash3.HashToUInt64(Encoding.UTF8.GetBytes($"{source.Repository}\n{source.Path}\n{source.
Ref
?? ""}")).ToString("x16", CultureInfo.InvariantCulture);
424
var key = new ConfigSourceIdentity(source.Repository, source.Path, source.
Ref
);
449
Ref = source.
Ref
541
Ref = source.
Ref
Aspire.Cli.Tests (7)
Configuration\ConfigSourceServiceGitTests.cs (1)
174
Ref = source.
Ref
,
Configuration\ConfigSourceServiceTests.cs (5)
141
Ref = difference == "ref" ? "other" : s_appliedSource.
Ref
,
343
Ref = s_appliedSource.
Ref
,
695
[CliConfigNames.InitSourceRef] = expected.
Ref
1045
Ref = s_appliedSource.
Ref
,
1421
[CliConfigNames.InitSourceRef] = s_source.
Ref
TestServices\TestConfigSourceServices.cs (1)
59
Ref = source.
Ref
,