Skip to content

Commit e92a7da

Browse files
kevincodex1claude
andcommitted
docs(tigris): restore decompress_repo doc comment ordering
The earlier publish_lock insertion landed between decompress_repo's doc comment and its fn, gluing the two doc blocks onto publish_lock and leaving decompress_repo undocumented. Reorder so each fn keeps its own doc. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 134dc73 commit e92a7da

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎crates/gitlawb-node/src/git/tigris.rs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,6 @@ fn compress_repo(repo_path: &Path) -> Result<Vec<u8>> {
157157
Ok(compressed)
158158
}
159159

160-
/// Decompress a tar.zst byte vector into a local directory.
161-
///
162-
/// Extraction is atomic with respect to `local_path`: the archive is unpacked
163-
/// into a sibling temp directory first, and only swapped into place once it
164-
/// fully succeeds. A corrupt or truncated archive therefore can never clobber a
165-
/// good existing copy at `local_path` — on failure we discard the temp dir and
166-
/// leave `local_path` exactly as it was.
167160
/// Per-repo-path lock serializing the publish (swap-into-place) step of
168161
/// `decompress_repo`. Concurrent extractions unpack into isolated temp dirs in
169162
/// parallel, but the final `remove_dir_all` + `rename` must not interleave for
@@ -177,6 +170,13 @@ fn publish_lock(local_path: &Path) -> Arc<Mutex<()>> {
177170
.clone()
178171
}
179172

173+
/// Decompress a tar.zst byte vector into a local directory.
174+
///
175+
/// Extraction is atomic with respect to `local_path`: the archive is unpacked
176+
/// into a sibling temp directory first, and only swapped into place once it
177+
/// fully succeeds. A corrupt or truncated archive therefore can never clobber a
178+
/// good existing copy at `local_path` — on failure we discard the temp dir and
179+
/// leave `local_path` exactly as it was.
180180
fn decompress_repo(data: &[u8], local_path: &Path) -> Result<()> {
181181
let parent = local_path.parent().context("repo path has no parent")?;
182182
std::fs::create_dir_all(parent).context("creating parent dir")?;

0 commit comments

Comments
 (0)