|
|
|
|
|
by klysm
2308 days ago
|
|
Shelling out is arguably a worse scheme as it is again a thin wrapper, but with significantly worse error semantics and performance. Parsing the output of CLI tools is tedious very brittle, even in the case when the tool provides nicely formatted and consistent output, not to mention the shitty performance. I think there are two alternatives of increasing difficulty:
1. Write a thicker wrapping around git2 (possibly in a different crate) that achieves an idiomatic API.
2. Write an equivalent to libgit2 in rust. It’s true that 2 has some significant downsides and probably isn’t worth the effort but it certainly would’ve prevented this bug. |
|