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