On 2025-12-18 16:18, Ahmad Fatoum wrote:
To improve tracking where code originated from, e.g. when porting from
Linux or U-Boot, some recent commits have started using Origin-URL
comments. Add a script that can generate them with the assumption that
the origin project is checked out at exactly the version the code was
copied from.
Examples in Vim:
# add into highlight URL pointing at specified file
V:!git origin-url ../linux/lib/ucs2_string.c
# as above, but consult buffer extension for comment style
V:!git origin-url ../linux/lib/ucs2_string.c %
# generate in snippet syntax
V:!git origin-url -s ../linux/lib/ucs2_string.c
This is mostly useful for new code that's being ported. It does have no
support to find out similarity between the files specified.
Cc: Jonas Rebmann <[email protected]>
Signed-off-by: Ahmad Fatoum <[email protected]>
Reviewed-by: Jonas Rebmann <[email protected]>