Skip to content

Commit

Permalink
cli: add short method summary to its documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Oct 4, 2024
1 parent e1232dc commit dbff32f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion cli/src/cli_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ impl ReadonlyUserRepo {
}
}

/// Type-safe data structure for conditionally advancing bookmarks.
///
/// A bookmark that should be advanced to satisfy the "advance-bookmarks"
/// feature. This is a helper for `WorkspaceCommandTransaction`. It provides a
/// type-safe way to separate the work of checking whether a bookmark can be
Expand Down Expand Up @@ -1999,7 +2001,8 @@ Then run `jj squash` to move the resolution into the conflicted commit."#,
}
}

/// A [`Transaction`] tied to a particular workspace.
/// An ongoing [`Transaction`] tied to a particular workspace.
///
/// `WorkspaceCommandTransaction`s are created with
/// [`WorkspaceCommandHelper::start_transaction`] and committed with
/// [`WorkspaceCommandTransaction::finish`]. The inner `Transaction` can also be
Expand Down
9 changes: 5 additions & 4 deletions cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,11 @@ pub fn existing_config_path() -> Result<Option<PathBuf>, ConfigError> {
ConfigEnv::new().existing_config_path()
}

/// Returns a path to the user-specific config file. If no config file is found,
/// tries to guess a reasonable new location for it. If a path to a new config
/// file is returned, the parent directory may be created as a result of this
/// call.
/// Returns a path to the user-specific config file.
///
/// If no config file is found, tries to guess a reasonable new
/// location for it. If a path to a new config file is returned, the
/// parent directory may be created as a result of this call.
pub fn new_config_path() -> Result<Option<PathBuf>, ConfigError> {
ConfigEnv::new().new_config_path()
}
Expand Down

0 comments on commit dbff32f

Please sign in to comment.