git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Automatically delete branches containing accepted patches?

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 28, 2017, 07:16 UTC
Message-ID
<CA+P7+xok0bpgc7CwHB+vcLpODhjAkjgHq=cGZhmP+EpRvwSJzg@mail.gmail.com>
In-Reply-To
<8AF4A868-628B-42AE-B75E-4DF19F7C7A89@gmail.com>

On Sun, Aug 27, 2017 at 11:44 AM, Lars Schneider <larsxschneider@gmail.com> wrote:

Show 12 quoted lines
> Hi,
>
> I have lots of git/git branches and once in a while some patches make it
> into git/git master. If this happens I would like to delete my branch
> with the patch automatically. That's not easily possible as the hashes
> on my branches are, of course, not the same as the hashes on git/git.
>
> How do you deal with this situation? Do you manually delete your
> branches or do you have some clever script to share?
>
> Thanks,
> Lars

You might be able to use patch-ids and git-cherry, to see if similar patches (those with identical patch ids) are upstream. The patch id is only calculated from the diff I believe, so it's mostly stable at least as long as the contents didn't need to be changed to apply upstream. It's not 100% perfect, but it might help with what you're after?

Thanks, Jake

Previous: Lars SchneiderNext: Nicolas Morey-Chaisemartin
Message 2 of 5 in “Automatically delete branches containing accepted patches?”
  1. Lars SchneiderAug 27, 2017
  2. Jacob KellerAug 28, 2017
  3. Nicolas Morey-ChaisemartinAug 28, 2017
  4. Stefan BellerAug 28, 2017
  5. Jeff KingAug 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.