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

Re: "groups of files" in Git?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 13, 2017, 18:22 UTC
Message-ID
<xmqqiniwxkmj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kZaf7=uwCPJoPoDiAO9QS21bchaKZvDzWJi=ewPZw9PXQ@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 12 quoted lines
> On Tue, Jul 11, 2017 at 8:45 AM, Nikolay Shustov
>
>> With Git I cannot seem to finding the possibility to figure out how to
>> achieve the same result. And the problem is that putting change sets
>> on different Git branches (or workdirs, or whatever Git offers that
>> makes the changes to be NOT in the same source tree) is not a viable
>> option from me as I would have to re-build code as I re-integrate the
>> changes between the branches (or whatever changes separation Git
>> feature is used).
>
> you would merge the branches and then run the tests/integration. Yes that
> seems cumbersome.

Sometimes the need to make trial merge for testing cannot be avoided and having branches for separate topics is the only sensible approach, at least in the Git world.

Imagine your project has two components that are interrelated, say, the server and the client, that have to work well with each other. In addition, you want to make sure your updated server works well with existing clients, and vice versa.

One way that naturally maps this scenario to the development workflow is to have a server-update topic and a client-update topic branches, and separate changes to update each side with their own commits:

             s---s---S    server-update topic
            /
    ---o---o----o----M    mainline
            \
             c---c---C    client-update topic

And during the development of these *-update topics, you try three merges:

 (1) Merge S to the mainline M and test the whole thing, to make sure
     that existing client will still be able to talk with the
     updated server.
 (2) Merge C to the mainline M and test the whole thing, to make
     sure that updated clients will still be able to talk with the
     existing server.
 (3) Merge both S and C to the mainline M and test the whole thing,
     to make sure the updated ones talk to each other.

If there is no significant development going on on the mainline in the meantime, (1) and (2) can be done by trying out S and C alone without making a trial merge with M. The same for (3)---it can be just a trial merge between S and C without updates that happened on the mainline.

I'd love to hear from folks in Perforce or other world how they address this scenario with their system.

Previous: Nikolay ShustovNext: Nikolay Shustov
Message 4 of 26 in “"groups of files" in Git?”
  1. Nikolay ShustovJul 11, 2017
  2. Stefan BellerJul 11, 2017
  3. Nikolay ShustovJul 11, 2017
  4. Junio C HamanoJul 13, 2017
  5. Nikolay ShustovJul 13, 2017
  6. Junio C HamanoJul 13, 2017
  7. Igor DjordjevicJul 13, 2017
  8. Igor DjordjevicJul 13, 2017
  9. Igor DjordjevicJul 13, 2017
  10. Randall S. BeckerJul 11, 2017
  11. Junio C HamanoJul 11, 2017
  12. Nikolay ShustovJul 11, 2017
  13. Stefan BellerJul 11, 2017
  14. Nikolay ShustovJul 11, 2017
  15. Lars SchneiderJul 11, 2017
  16. Nikolay ShustovJul 11, 2017
  17. Lars SchneiderJul 11, 2017
  18. Nikolay ShustovJul 13, 2017
  19. Igor DjordjevicJul 11, 2017
  20. Nikolay ShustovJul 13, 2017
  21. Junio C HamanoJul 13, 2017
  22. Nikolay ShustovJul 13, 2017
  23. Fredrik GustafssonJul 11, 2017
  24. astianJul 11, 2017
  25. Nikolay ShustovJul 13, 2017
  26. Igor DjordjevicJul 13, 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.