aboutsummaryrefslogtreecommitdiff
path: root/obj_tag_test.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-01-30 17:10:01 +0100
committerGravatar Runxi Yu2026-01-30 17:10:01 +0100
commitf762271dbfc121eaac7eb59c0beb01620a09118f (patch)
tree7abee7bf666227312088cdb112f6557864adaecb /obj_tag_test.go
parentpacked, delta: Implement thin packs (diff)
signatureNo signature
test: Make gitCmd accept an stdin []byte
Diffstat (limited to 'obj_tag_test.go')
-rw-r--r--obj_tag_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/obj_tag_test.go b/obj_tag_test.go
index 6b3c8368..f8f598fd 100644
--- a/obj_tag_test.go
+++ b/obj_tag_test.go
@@ -19,9 +19,9 @@ func TestTagWrite(t *testing.T) {
if err != nil {
t.Fatalf("failed to write file.txt: %v", err)
}
- gitCmd(t, repoPath, "--work-tree="+workDir, "add", ".")
- gitCmd(t, repoPath, "--work-tree="+workDir, "commit", "-m", "Tagged commit")
- commitHash := gitCmd(t, repoPath, "rev-parse", "HEAD")
+ gitCmd(t, repoPath, nil, "--work-tree="+workDir, "add", ".")
+ gitCmd(t, repoPath, nil, "--work-tree="+workDir, "commit", "-m", "Tagged commit")
+ commitHash := gitCmd(t, repoPath, nil, "rev-parse", "HEAD")
repo, err := OpenRepository(repoPath)
if err != nil {
@@ -90,12 +90,12 @@ func TestTagRead(t *testing.T) {
if err != nil {
t.Fatalf("failed to write file.txt: %v", err)
}
- gitCmd(t, repoPath, "--work-tree="+workDir, "add", ".")
- gitCmd(t, repoPath, "--work-tree="+workDir, "commit", "-m", "Commit for tag")
- commitHash := gitCmd(t, repoPath, "rev-parse", "HEAD")
+ gitCmd(t, repoPath, nil, "--work-tree="+workDir, "add", ".")
+ gitCmd(t, repoPath, nil, "--work-tree="+workDir, "commit", "-m", "Commit for tag")
+ commitHash := gitCmd(t, repoPath, nil, "rev-parse", "HEAD")
- gitCmd(t, repoPath, "tag", "-a", "-m", "Tag message", "v1.0.0", commitHash)
- tagHash := gitCmd(t, repoPath, "rev-parse", "v1.0.0")
+ gitCmd(t, repoPath, nil, "tag", "-a", "-m", "Tag message", "v1.0.0", commitHash)
+ tagHash := gitCmd(t, repoPath, nil, "rev-parse", "v1.0.0")
repo, err := OpenRepository(repoPath)
if err != nil {
@@ -136,9 +136,9 @@ func TestTagRoundtrip(t *testing.T) {
if err != nil {
t.Fatalf("failed to write file.txt: %v", err)
}
- gitCmd(t, repoPath, "--work-tree="+workDir, "add", ".")
- gitCmd(t, repoPath, "--work-tree="+workDir, "commit", "-m", "Commit")
- commitHash := gitCmd(t, repoPath, "rev-parse", "HEAD")
+ gitCmd(t, repoPath, nil, "--work-tree="+workDir, "add", ".")
+ gitCmd(t, repoPath, nil, "--work-tree="+workDir, "commit", "-m", "Commit")
+ commitHash := gitCmd(t, repoPath, nil, "rev-parse", "HEAD")
repo, err := OpenRepository(repoPath)
if err != nil {