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

Re: Detecting squash-merged branches (and question about git-diff-tree)

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Dec 3, 2024, 17:42 UTC
Message-ID
<95b88ece-8188-46aa-b263-61bb371e4293@app.fastmail.com>
In-Reply-To
<Z08o-O5eiu_ZsYrp@framework>
On Tue, Dec 3, 2024, at 16:51, Max Gautier wrote:
Show 9 quoted lines
>> My program tries to be like a for-each-ref for merged etc. refs.
>> More focused on reporting first since that can then be used for
>> deletion or whatever else.
>
> Hum, I'm wondering why it didn't find this earlier, I did search though.
> It apparently use git commit-tree to create a temporary commit, and git
> cherry on that to check if it's in the target branch.
> I wonder if this wouldn't cause problems in case of conflicts though,
> during the git commit-tree process ?

Maybe, I haven’t tried. But using something that creates a commit in the DB seems a bit unnecessary/excessive in any case.

Your diff approach seems more direct.
-- 
Kristoffer Haugsbakk
Previous: Max GautierNext: Max Gautier
Message 4 of 5 in “Detecting squash-merged branches (and question about git-diff-tree)”
  1. Max GautierDec 3, 2024
  2. Kristoffer HaugsbakkDec 3, 2024
  3. Max GautierDec 3, 2024
  4. Kristoffer HaugsbakkDec 3, 2024
  5. Max GautierDec 3, 2024

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.