Skip to content

Commit 2391070

Browse files
committed
add comment
1 parent d6f138b commit 2391070

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

modules/git/attribute/batch.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type BatchChecker struct {
2727
}
2828

2929
// NewBatchChecker creates a check attribute reader for the current repository and provided commit ID
30+
// If treeish is empty, then it will use current working directory, otherwise it will use the provided treeish on the bare repo
3031
func NewBatchChecker(repo *git.Repository, treeish string, attributes []string) (checker *BatchChecker, returnedErr error) {
3132
ctx, cancel := context.WithCancel(repo.Ctx)
3233
defer func() {

modules/git/attribute/checker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ type CheckAttributeOpts struct {
5454
}
5555

5656
// CheckAttributes return the attributes of the given filenames and attributes in the given treeish.
57+
// If treeish is empty, then it will use current working directory, otherwise it will use the provided treeish on the bare repo
5758
func CheckAttributes(ctx context.Context, gitRepo *git.Repository, treeish string, opts CheckAttributeOpts) (map[string]Attributes, error) {
5859
cmd, envs, cancel, err := checkAttrCommand(gitRepo, treeish, opts.Filenames, opts.Attributes)
5960
if err != nil {

0 commit comments

Comments
 (0)