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

Reveal by history that several commits are independent from each other?

From
IIIgnat Insarov <kindaro@gmail.com>
Date
Aug 1, 2022, 14:03 UTC
Message-ID
<CAB-2Q0_WmRue1gtaJGDGFoPwKdyyHf7dpuLoyZMDCXouxyP+BA@mail.gmail.com>
# Reveal by history that several commits are independent from each other?

Suppose I am working on a feature `Search` for which I need to add some configuration and some types first. So, I have three patches:

1. Add some configuration. To be more descriptive, I have to add some fields to
   the structure that holds the configuration of my program, like say what URL
   the search service is found at, and a way to parse these fields from the
   configuration files.
2. Add some types. To be more descriptive, I have to add a structure with fields
   like _«search string»_, _«case sensitivity»_ and so on, and a way to convert
   this structure to JSON so that it can be sent to the search service.
3. Add the logic that looks into the configuration structure, sends a search
   request to the appropriate search service and returns the results.

See that there is a partial but not total order of dependency on these patches: _{3 > 2; 3 > 1}_. I want to wire this information into the repository.

One way to go about it is as follows: make a branch with patch 1, another branch with patch 2, merge 1 into 2, then add patch 3 on top. This would create the desired lozenge structure for me, showing to everyone that I believe patches 1 and 2 to be independent prerequisites for patch 3.

Is this a reasonable practice? Is there any prior art? What are the troubles to look forward to?

There are some other version control systems, say `darcs` and `pijul`, that work with a partial order of patches, but I do not have any experience working with them.

One problem I foresee is that `git` will mess up my carefully crafted branching structure when I try to rebase the patches 1, 2 and 3 together.

Next: Junio C Hamano
Message 1 of 2 in “Reveal by history that several commits are independent from each other?”
  1. Ignat InsarovAug 1, 2022
  2. Junio C HamanoAug 1, 2022

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.