File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ type AddOptions struct {
388
388
// Indicates whether to add all changes to index.
389
389
All bool
390
390
// The specific pathspecs to be added to index.
391
- Pathsepcs []string
391
+ Pathspecs []string
392
392
// The timeout duration before giving up for each shell command execution. The
393
393
// default timeout duration will be used when not supplied.
394
394
Timeout time.Duration
@@ -407,9 +407,9 @@ func Add(repoPath string, opts ...AddOptions) error {
407
407
if opt .All {
408
408
cmd .AddArgs ("--all" )
409
409
}
410
- if len (opt .Pathsepcs ) > 0 {
410
+ if len (opt .Pathspecs ) > 0 {
411
411
cmd .AddArgs ("--" )
412
- cmd .AddArgs (opt .Pathsepcs ... )
412
+ cmd .AddArgs (opt .Pathspecs ... )
413
413
}
414
414
_ , err := cmd .RunInDirWithTimeout (opt .Timeout , repoPath )
415
415
return err
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ func TestRepository_Add(t *testing.T) {
328
328
// Make sure it does not blow up
329
329
if err := r .Add (AddOptions {
330
330
All : true ,
331
- Pathsepcs : []string {"TESTFILE" },
331
+ Pathspecs : []string {"TESTFILE" },
332
332
}); err != nil {
333
333
t .Fatal (err )
334
334
}
You can’t perform that action at this time.
0 commit comments