Open
Description
Imagine the following statement in which one line is wrongly indented:
let diff = repo
.diff_tree_to_workdir(Some(&head), Some(&mut diff_options))
.unwrap();
I now specify only the second line in my --file-lines
.
What I expect to happen
The second line becomes correctly indented to match the same column as the .unwrap()
.
What actually happens
Nothing. The line is ignored because it is part of a larger statement.
Why this is a problem
I have a use case where a script uses git
and --file-lines
to only format lines which where changed in a specific commit. This script fails when someone just edits parts of a larger statement because the line is not formatted then. Adding more context to the range is also not viable because then lines are formatted that weren't touched in the commit.