gitbutler
gitbutler copied to clipboard
Typechange from File to Symlink breaks the UI with "Something went wrong"
Version
0.13.1
Operating System
macOS
Distribution Method
dmg (Apple Silicon)
Describe the issue
The UI enters this state.
How to reproduce
- Clone https://github.com/alexcrichton/cmake-rs.git and run
rm README.md && ln -s Cargo.toml README.md. - Refresh the UI
When the typechange is undone with git checkout README.md it works again, but only after a refresh.
Expected behavior
The UI should be able to show the typechange.
Relevant log output
list_virtual_branches [ 5.71ms | 100.00% ] project_id: e1fce08a-8eb2-4319-85bd-0c01faa9ff30
ERROR ┕━ 🚨 [error]: | error: Error(failed to diff workdir
Caused by:
0: failed to print diff: Some("Encountered an invalid internal state related to the diff: Some(FileDiff { old_path: Some(\"README.md\"), new_path: Some(\"README.md\"), hunks: [GitHunk { old_start: 1, old_lines: 32, new_start: 0, new_lines: 0, diff_lines: BStringForFrontend(\"@@ -1,32 +0,0 @@\\n-# cmake\\n-\\n-[Documentation](https://docs.rs/cmake)\\n-\\n-A build dependency for running the `cmake` build tool to compile a native\\n-library.\\n-\\n-\\n-# Cargo.toml\\n-[build-dependencies]\\n-cmake = \\\"0.1\\\"\\n-\\n-\\n-The CMake executable is assumed to be `cmake` unless the `CMAKE`\\n-environmental variable is set.\\n-\\n-# License\\n-\\n-This project is licensed under either of\\n-\\n- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\\n- https://www.apache.org/licenses/LICENSE-2.0)\\n- * MIT license ([LICENSE-MIT](LICENSE-MIT) or\\n- https://opensource.org/licenses/MIT)\\n-\\n-at your option.\\n-\\n-### Contribution\\n-\\n-Unless you explicitly state otherwise, any contribution intentionally submitted\\n-for inclusion in cmake by you, as defined in the Apache-2.0 license, shall be\\n-dual licensed as above, without any additional terms or conditions.\\n\"), binary: false, change_type: Deleted }], skipped: false, binary: false, old_size_bytes: 809, new_size_bytes: 0 })")