Skip to content

Commit 5f6da29

Browse files
committed
Fix bug
1 parent 9181481 commit 5f6da29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/git/attribute/checker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ func checkAttrCommand(gitRepo *git.Repository, treeish string, filenames, attrib
1919
cmd.AddArguments("--all")
2020
}
2121
cmd.AddDashesAndList(filenames...)
22+
cancel := func() {}
2223
if git.DefaultFeatures().SupportCheckAttrOnBare && treeish != "" {
2324
cmd.AddArguments("--source")
2425
cmd.AddDynamicArguments(treeish)
2526
cmd.AddDynamicArguments(attributes...)
26-
return cmd, []string{"GIT_FLUSH=1"}, nil, nil
27+
return cmd, []string{"GIT_FLUSH=1"}, cancel, nil
2728
}
2829

29-
var cancel func()
3030
var envs []string
3131
if treeish != "" { // if it's empty, then we assume it's a worktree repository
3232
indexFilename, worktree, deleteTemporaryFile, err := gitRepo.ReadTreeToTemporaryIndex(treeish)

0 commit comments

Comments
 (0)