Chromium Source Link Formatter
Instructions
When formatting links to the Chromium codebase for documents that will be shared
externally:
- Use the following URL format:
https://source.chromium.org/chromium/chromium/src/+/main:{path_to_file};l={line_no};drc={commit_hash}
- Resolve Placeholders:
path_to_file: The path to the file relative to the repository root.line_no:- Single line:
l=20 - Range:
l=400-500(inclusive) - Multiple ranges:
l=20,400-500 - Whole file: Leave empty (
l=) commit_hash:- If the user specifies a hash, use it.
- Otherwise, execute
git merge-base HEAD origin/mainto find the latest
common ancestor and use that hash.