pub fn run(mut self, watching: Arc<AtomicBool>) -> Result<()> {
        self.update_from_config();
        let watched_directories = self.list_watched_directories();
        let delay = self.delay.unwrap_or(DEFAULT_DELAY);
        if self.dry_run {
            WatchCommand::new(
                DummyRepository,
                watching,
                watched_directories,
                delay,
                self.push_on_exit,
                self.push_timeout,
                self.get_authentication_method()?,
            )
            .run();
        } else {
            let directory = self.directory.clone().canonicalize()?;
            log::info!("{}", directory.display());
            let repo = WatchedRepository::new(directory)?;
            WatchCommand::new(
                repo,
                watching,
                watched_directories,
                delay,
                self.push_on_exit,
                self.push_timeout,
                self.get_authentication_method()?,
            )
            .run();
        }
        Ok(())
    }
/// Execute the `watch` command from the provided arguments.
Execute the `watch` command from the provided arguments.
Execute the ` watch ` command from the provided arguments .
pub fn run(mut self, watching: Arc<AtomicBool>) -> Result<()> {
        self.update_from_config();
        let watched_directories = self.list_watched_directories();
        let delay = self.delay.unwrap_or(DEFAULT_DELAY);
        if self.dry_run {
            WatchCommand::new(
                DummyRepository,
                watching,
                watched_directories,
                delay,
                self.push_on_exit,
                self.push_timeout,
                self.get_authentication_method()?,
            )
            .run();
        } else {
            let directory = self.directory.clone().canonicalize()?;
            log::info!("{}", directory.display());
            let repo = WatchedRepository::new(directory)?;
            WatchCommand::new(
                repo,
                watching,
                watched_directories,
                delay,
                self.push_on_exit,
                self.push_timeout,
                self.get_authentication_method()?,
            )
            .run();
        }
        Ok(())
    }
pub fn run ( mut self , watching : Arc < AtomicBool > ) -> Result < ( ) > { self . update_from_config ( ) ; let watched_directories = self . list_watched_directories ( ) ; let delay = self . delay . unwrap_or ( DEFAULT_DELAY ) ; if self . dry_run { WatchCommand :: new ( DummyRepository , watching , watched_directories , delay , self . push_on_exit , self . push_timeout , self . get_authentication_method ( ) ? , ) . run ( ) ; } else { let directory = self . directory . clone ( ) . canonicalize ( ) ? ; log :: info ! ( " " directory display ( ) ) ; let repo = WatchedRepository :: new ( directory ) ? ; WatchCommand :: new ( repo , watching , watched_directories , delay , self . push_on_exit , self . push_timeout , self . get_authentication_method ( ) ? , ) . run ( ) ; } Ok ( ( ) ) }
Execute the `watch` command from the provided arguments.
Execute the ` watch ` command from the provided arguments .
mut self
watching
Arc<AtomicBool>
mut self
watching
Arc<AtomicBool>