Skip to content

Commit 8180544

Browse files
committed
Repository: Add doc comment for commit_and_push()
1 parent 495b8dc commit 8180544

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/git.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,13 @@ impl Repository {
275275
ref_status
276276
}
277277

278+
/// Commits the specified file with the specified commit message and pushes
279+
/// the commit to the `master` branch on the `origin` remote.
280+
///
281+
/// Note that `modified_file` expects an **absolute** file path!
282+
///
283+
/// This function also prints the commit message and a success or failure
284+
/// message to the console.
278285
pub fn commit_and_push(&self, message: &str, modified_file: &Path) -> Result<(), PerformError> {
279286
println!("Committing and pushing \"{}\"", message);
280287

0 commit comments

Comments
 (0)