pub fn add_note_line(commit: &str, line: &str) -> Result<()>Expand description
Appends a note line to a specific commit with exponential backoff retry logic.
This function adds a single line to the git notes associated with the specified
commit in the performance notes ref (refs/notes/perf-v3). The operation is
retried with exponential backoff to handle transient failures such as concurrent
write conflicts or filesystem locks.
§Arguments
commit- The commit hash (or committish reference) to add the note toline- The text content to append to the commit’s notes
§Returns
Ok(())- The note line was successfully addedErr- If the operation fails permanently or times out after retries
§Errors
Returns an error if:
- The commit does not exist
- The operation times out after exhausting retry attempts
- A permanent failure occurs (e.g., invalid commit reference)
§Examples
add_note_line("HEAD", "benchmark_result=1.23s").unwrap();