mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, Jonas Rebmann <jre@pengutronix.de>
Subject: Re: [PATCH] scripts: add helper for generating Origin-URL references
Date: Thu, 18 Dec 2025 09:01:56 +0100	[thread overview]
Message-ID: <aUO09HV-GkPRiJX6@pengutronix.de> (raw)
In-Reply-To: <20251217103547.4046898-1-a.fatoum@pengutronix.de>

On Wed, Dec 17, 2025 at 11:35:46AM +0100, 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.
> 
> 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

It's worth mentioning that the repository you point at here needs to be
checked out at the very same state that it was when you copied the file.

In other words, there is no magic that tries to match the barebox
version of the file to the closest linux/u-boot/... revision of the
file.

It's a thing to remember when somebody reminds you of adding the
origin-URL in a review and you call the script a week later when your
Linux repository already has another revision checked out.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2025-12-18  8:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 10:35 Ahmad Fatoum
2025-12-17 10:59 ` Jonas Rebmann
2025-12-18  8:04   ` Sascha Hauer
2025-12-18  8:01 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aUO09HV-GkPRiJX6@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jre@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox