File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ type AddOptions struct {
388388 // Indicates whether to add all changes to index.
389389 All bool
390390 // The specific pathspecs to be added to index.
391- Pathsepcs []string
391+ Pathspecs []string
392392 // The timeout duration before giving up for each shell command execution. The
393393 // default timeout duration will be used when not supplied.
394394 Timeout time.Duration
@@ -407,9 +407,9 @@ func Add(repoPath string, opts ...AddOptions) error {
407407 if opt .All {
408408 cmd .AddArgs ("--all" )
409409 }
410- if len (opt .Pathsepcs ) > 0 {
410+ if len (opt .Pathspecs ) > 0 {
411411 cmd .AddArgs ("--" )
412- cmd .AddArgs (opt .Pathsepcs ... )
412+ cmd .AddArgs (opt .Pathspecs ... )
413413 }
414414 _ , err := cmd .RunInDirWithTimeout (opt .Timeout , repoPath )
415415 return err
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ func TestRepository_Add(t *testing.T) {
328328 // Make sure it does not blow up
329329 if err := r .Add (AddOptions {
330330 All : true ,
331- Pathsepcs : []string {"TESTFILE" },
331+ Pathspecs : []string {"TESTFILE" },
332332 }); err != nil {
333333 t .Fatal (err )
334334 }
You can’t perform that action at this time.
0 commit comments