File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ impl crate::Repository {
342342 /// Create a new commit object with `message` referring to `tree` with `parents`, and point `reference`
343343 /// to it. The commit is written without message encoding field, which can be assumed to be UTF-8.
344344 /// `author` and `committer` fields are pre-set from the configuration, which can be altered
345- /// [temporarily][ crate::Repository::config_snapshot_mut()] before the call if required.
345+ /// [temporarily]( crate::Repository::config_snapshot_mut()) before the call if required.
346346 ///
347347 /// `reference` will be created if it doesn't exist, and can be `"HEAD"` to automatically write-through to the symbolic reference
348348 /// that `HEAD` points to if it is not detached. For this reason, detached head states cannot be created unless the `HEAD` is detached
@@ -352,6 +352,11 @@ impl crate::Repository {
352352 /// If there is no parent, the `reference` is expected to not exist yet.
353353 ///
354354 /// The method fails immediately if a `reference` lock can't be acquired.
355+ ///
356+ /// ### Writing a commit without `reference` update
357+ ///
358+ /// If the reference shouldn't be updated, use [`Self::write_object()`] along with a newly created [`crate::objs::Object`] whose fields
359+ /// can be fully defined.
355360 pub fn commit < Name , E > (
356361 & self ,
357362 reference : Name ,
You can’t perform that action at this time.
0 commit comments