Showing the changes to git-ref/src (1 of 8 files). Show all
Unified · Split
| @@ -116,7 +116,10 @@ impl packed::Transaction { · 115 unmodified lines | |||
| 116 | Ok(self) | 116 | Ok(self) |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /// Commit the prepare transaction | 119 | /// Commit the prepared transaction. |
| 120 | /// | ||
| 121 | /// Please note that actual edits invalidated existing packed buffers. | ||
| 122 | /// Note: There is the potential to write changes into memory and return such a packed-refs buffer for reuse. | ||
| 120 | pub fn commit(self) -> Result<(), commit::Error> { | 123 | pub fn commit(self) -> Result<(), commit::Error> { |
| 121 | let mut edits = self.edits.expect("BUG: cannot call commit() before prepare(…)"); | 124 | let mut edits = self.edits.expect("BUG: cannot call commit() before prepare(…)"); |
| 122 | if edits.is_empty() { | 125 | if edits.is_empty() { |