Skip to content

Commit

Permalink
Update documentation on locking
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnatsel authored Sep 30, 2023
1 parent 1092c66 commit 403e8b8
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/index/git_remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ impl RemoteGitIndex {
///
/// Note that if a repository does not exist at the local disk path of the
/// provided [`GitIndex`], a full clone will be performed.
///
/// ## Locking
/// This function will wait to aquire the lock on the local directory for up to 10 minutes,
/// and then return `GitError::Lock` if it is still locked by another thread or process.
/// You can customize this behavior using [`Self::with_options`].
///
/// Regardless of the timeout, this function relies on `panic = unwind` to avoid leaving stale locks
/// if the process is interrupted with Ctrl+C. To support `panic = abort` you also need to register
/// the `gix` signal handler to clean up the locks, see [`gix::interrupt::init_handler`].
#[inline]
pub fn new(index: GitIndex, lock: &FileLock) -> Result<Self, Error> {
Self::with_options(
Expand All @@ -50,10 +41,6 @@ impl RemoteGitIndex {
/// Creates a new [`Self`] that allows showing of progress of the the potential
/// fetch if the disk location is empty, as well as allowing interruption
/// of the fetch operation.
///
/// Regardless of the `lock_policy`, this function relies on `panic = unwind` to avoid leaving stale locks
/// if the process is interrupted with Ctrl+C. To support `panic = abort` you also need to register
/// a signal handler that sets `should_interrupt` to `true`.
pub fn with_options<P>(
mut index: GitIndex,
progress: P,
Expand Down

0 comments on commit 403e8b8

Please sign in to comment.