diff options
| author | 2026-02-21 12:27:39 +0800 | |
|---|---|---|
| committer | 2026-02-21 12:27:39 +0800 | |
| commit | bda11a7b87844303fa9d8d14b9469136830f90c7 (patch) | |
| tree | 2ad879fcd0bf35d644f259c0371d32804fc1cb71 /internal/testgit/repo_refs.go | |
| parent | refstore/packed: Add packed refs backend (diff) | |
| signature | No signature | |
testgit: Add RepoOptions and NewRepo for ref format and bare.
Diffstat (limited to 'internal/testgit/repo_refs.go')
| -rw-r--r-- | internal/testgit/repo_refs.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/testgit/repo_refs.go b/internal/testgit/repo_refs.go index 258d2787..eb09a78b 100644 --- a/internal/testgit/repo_refs.go +++ b/internal/testgit/repo_refs.go @@ -13,6 +13,12 @@ func (testRepo *TestRepo) UpdateRef(tb testing.TB, name string, id objectid.Obje testRepo.Run(tb, "update-ref", name, id.String()) } +// DeleteRef deletes a ref. +func (testRepo *TestRepo) DeleteRef(tb testing.TB, name string) { + tb.Helper() + testRepo.Run(tb, "update-ref", "-d", name) +} + // SymbolicRef sets a symbolic reference target. func (testRepo *TestRepo) SymbolicRef(tb testing.TB, name, target string) { tb.Helper() |
