On 19 Feb 2024, at 01:28, Peter Kjellerstedt via lists.openembedded.org 
<[email protected]> wrote:
> +    @staticmethod
> +    def addNote(repo, ref, key, value=None):
> +        note = key + (": %s" % value if value else "")
> +        notes_ref = GitApplyTree.notes_ref
> +        runcmd(["git", "config", "notes.rewriteMode", "ignore"], repo)
> +        runcmd(["git", "config", "notes.displayRef", notes_ref, notes_ref], 
> repo)
> +        runcmd(["git", "config", "notes.rewriteRef", notes_ref, notes_ref], 
> repo)
> +        runcmd(["git", "notes", "--ref", notes_ref, "append", "-m", note, 
> ref], repo)

It feels like the config calls could be done once when setting up the 
repository somehow?

> +                        # This loop, which is used to remove any line that
> +                        # starts with "%% original patch", is kept for 
> backwards
> +                        # compatibility. If/when that compatibility is 
> dropped,
> +                        # it can be replaced with code to just read the first
> +                        # line of the patch file to get the SHA-1, and the 
> code
> +                        # below that writes the modified patch file can be
> +                        # replaced with a simple file move.

This is all that is needed for the new code to work correctly with an old 
worktree, right?

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195873): 
https://lists.openembedded.org/g/openembedded-core/message/195873
Mute This Topic: https://lists.openembedded.org/mt/104439182/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to