File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -491,7 +491,8 @@ impl<'cb> CheckoutBuilder<'cb> {
491
491
self . flag ( raw:: GIT_CHECKOUT_CONFLICT_STYLE_DIFF3 , on)
492
492
}
493
493
494
- /// Treat paths as a simple list.
494
+ /// Treat paths specified in [`CheckoutBuilder::path`] as exact file paths
495
+ /// instead of as pathspecs.
495
496
pub fn disable_pathspec_match ( & mut self , on : bool ) -> & mut CheckoutBuilder < ' cb > {
496
497
self . flag ( raw:: GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH , on)
497
498
}
@@ -520,8 +521,13 @@ impl<'cb> CheckoutBuilder<'cb> {
520
521
521
522
/// Add a path to be checked out.
522
523
///
524
+ /// The path is a [pathspec] pattern, unless
525
+ /// [`CheckoutBuilder::disable_pathspec_match`] is set.
526
+ ///
523
527
/// If no paths are specified, then all files are checked out. Otherwise
524
528
/// only these specified paths are checked out.
529
+ ///
530
+ /// [pathspec]: https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-aiddefpathspecapathspec
525
531
pub fn path < T : IntoCString > ( & mut self , path : T ) -> & mut CheckoutBuilder < ' cb > {
526
532
let path = util:: cstring_to_repo_path ( path) . unwrap ( ) ;
527
533
self . path_ptrs . push ( path. as_ptr ( ) ) ;
You can’t perform that action at this time.
0 commit comments