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

Getting an actuallt useful merge base?

From
Michal Suchánek <msuchanek@suse.de>
Date
Feb 24, 2021, 17:58 UTC
Message-ID
<20210224175834.GT6564@kitsune.suse.cz>
Hello,
I find the results of git merge-base A B quite useless.
Suppose you have a repository with file sets
S and T

where S are sources which are developed in mainline and number of stable versions, and feature branches, and T are build tools (such as autoconf tests or whatever) that are largely independent of the source version.

Because of the independence of T from S T are developed in a separate branch t which is merged into all branches developing S as needed.

Fixes to S may affect more than one version, and depending on the situation it might be useful to apply fixes to S to mutiple stable/feature branche at once. For that one would need a merge base of the branches in question.

However, merge-base almost always give a commit on branch t which is the merge base of files in set T and does not contain files in set S at all. In other words it is merge base only for files from set T and not set S. Can I get merge base that is merge base for all files that have common history between two branches?

Thanks
Michal
Next: brian m. carlson
Message 1 of 7 in “Getting an actuallt useful merge base?”
  1. Michal SuchánekFeb 24, 2021
  2. brian m. carlsonFeb 25, 2021
  3. Michal SuchánekFeb 25, 2021
  4. Elijah NewrenFeb 25, 2021
  5. Junio C HamanoFeb 25, 2021
  6. Elijah NewrenFeb 25, 2021
  7. Michal SuchánekFeb 25, 2021

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.