aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2024-01-23 08:51:37 +0000
committerGitHub <noreply@github.com>2024-01-23 08:51:37 +0000
commit9a6715aba7a88defd27aeba9ddb24cce9a9416c1 (patch)
treed329738b9852c088e87f3986cefef34bb4a58111 /options.go
parent40074d6f7331cc8be5f65e916c01802843d8463b (diff)
parentd5f1dd61fb79389218a9fe3b5574acf8409737b1 (diff)
downloadgo-git-9a6715aba7a88defd27aeba9ddb24cce9a9416c1.tar.gz
Merge pull request #994 from moranCohen26/supportFastAddPath
Worktree.AddWithOptions: add skipStatus option when providing a specific path
Diffstat (limited to 'options.go')
-rw-r--r--options.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/options.go b/options.go
index ddd637b..0a6eb94 100644
--- a/options.go
+++ b/options.go
@@ -475,6 +475,11 @@ type AddOptions struct {
// Glob adds all paths, matching pattern, to the index. If pattern matches a
// directory path, all directory contents are added to the index recursively.
Glob string
+ // SkipStatus adds the path with no status check. This option is relevant only
+ // when the `Path` option is specified and does not apply when the `All` option is used.
+ // Notice that when passing an ignored path it will be added anyway.
+ // When true it can speed up adding files to the worktree in very large repositories.
+ SkipStatus bool
}
// Validate validates the fields and sets the default values.