Anchored diffs (like git diff --anchored=...) #64726
Unanswered
fffergal
asked this question in
Pull Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Product Feedback
Body
I really like making my PRs as approachable for the reviewers as possible, and the file browser and whole file comments have really helped. I made a a PR for an "extract function" refactoring today, and noticed the diff was broken up into sections based on common lines, like a nearby function with a similar signature to the new function. This makes it less clear a block of code has been moved into a new function. With an over the shoulder review I would use
git diff main... --anchored=' def the_other_function('
and that would show my changes as one big block again. It would be great if I could type in anchored text for each file while I'm preparing my PR, a bit like the whole file comments, and it would be preserved for the reviewers too.Beta Was this translation helpful? Give feedback.
All reactions