We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3608480 commit 8327daeCopy full SHA for 8327dae
cpp-linter/src/git.rs
@@ -64,6 +64,10 @@ pub fn get_diff(repo: &Repository) -> Result<git2::Diff> {
64
}
65
66
67
+ // RARE BUG when `head` is the first commit in the repo! Affects local-only runs.
68
+ // > panicked at cpp-linter\src\git.rs:73:43:
69
+ // > called `Result::unwrap()` on an `Err` value:
70
+ // > Error { code: -3, class: 3, message: "parent 0 does not exist" }
71
if has_staged_files {
72
// get diff for staged files only
73
repo.diff_tree_to_index(Some(&head), None, None)
0 commit comments