-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaeeb64
commit 5da54b9
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,14 +90,14 @@ func TestIndexTinyRepo(t *testing.T) { | |
// Create a repo with one file in it. | ||
dir := t.TempDir() | ||
executeCommand(t, dir, exec.Command("git", "init", "-b", "main", "repo")) | ||
executeCommand(t, dir, exec.Command("git", "config", "--global", "user.name", "Thomas")) | ||
executeCommand(t, dir, exec.Command("git", "config", "--global", "user.email", "[email protected]")) | ||
|
||
if err := os.WriteFile(filepath.Join(dir, "repo", "file1.go"), []byte("package main\n\nfunc main() {}\n"), 0644); err != nil { | ||
repoDir := filepath.Join(dir, "repo") | ||
executeCommand(t, repoDir, exec.Command("git", "config", "user.name", "Thomas")) | ||
executeCommand(t, repoDir, exec.Command("git", "config", "user.email", "[email protected]")) | ||
|
||
if err := os.WriteFile(filepath.Join(repoDir, "file1.go"), []byte("package main\n\nfunc main() {}\n"), 0644); err != nil { | ||
t.Fatalf("WriteFile: %v", err) | ||
} | ||
|
||
repoDir := filepath.Join(dir, "repo") | ||
executeCommand(t, repoDir, exec.Command("git", "add", ".")) | ||
executeCommand(t, repoDir, exec.Command("git", "commit", "-m", "initial commit")) | ||
|
||
|