* This isn't as simple as passing sb->buf and sb->len, because we * want to transfer ownership of the buffer to the commit (so we * must use detach). */
| 173 | * must use detach). |
| 174 | */ |
| 175 | static void set_commit_buffer_from_strbuf(struct repository *r, |
| 176 | struct commit *c, |
| 177 | struct strbuf *sb) |
| 178 | { |
| 179 | size_t len; |
| 180 | void *buf = strbuf_detach(sb, &len); |
| 181 | set_commit_buffer(r, c, buf, len); |
| 182 | } |
| 183 | |
| 184 | /* |
| 185 | * Prepare a dummy commit that represents the work tree (or staged) item. |
no test coverage detected