[RFC] subtree: handle unmerged history trees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi..

I would like to enhance git subtree functionality

Problem outline:
In a scenario where a team develops a software subsystem and part of
the code is internal and parts (source and/or interfaces) should be
delivered continuously for others to incorporate into their
system/product.

One solution is to use submodules structure for both the development
team and product which is a hassle for the development team. They need
to make logical commits across submodule and parent repository which
can be a problem with parallel development and verification.

Subtree has the feature of splitting the repository in order to
achieve this, but there are some constraints that I would fix.
- In bare mode it pushes changes to a separate branch containing the
prefix changes which is fine. You get a problem when you run the next
split. Either you re-split all the commits again - Or you add the
-rejoin parameter with the result that the splitted prefix patches are
part of your history twice or even more if you have further extracts.
So this is either a performance issue or a usability issue.
- You lose traceability from the extracted subtree commit back to you
original commits,

Solution outline using subtree:
- Add traceability to each extracted commit in new history
  - It enables humans to trace from the extracted commit to the
original commit by basic reading, clicking in tools like gitk and
scripting if desired
  - Enable subtree itself to utilize the above mentioned traceability
and simulate the add repository or rejoin merge commit. Subtree can
then "behave" similarly independent of the method being used.
  - Add option for rev-list so it can list based on
prefix/subdirectory. I have not been able to find any error, issues or
side effects adding the "-- $dir" to the rev-list command. All the
manual tests, I have done, behave correctly in my total patched git
revision. It gives a heck of performance for many-commit repositories.
 - Example: split contrib/subtree out of git repository.
    Without the option: parsing ~28000 commit
    With the option: parsing ~100 commits

Patches can be found here:
https://github.com/git/git/compare/master...Praqma:split-append-info-options-master
Commits related to this:
* cd712dda39 subtree: use append-info to only extract new commits in the prefix
* deb2e1cd8b subtree: add append-info option for adding info about
original commit
* ff73b37e22 subtree: Add option for listing commits based on prefix

Best regards
Claus Schneider



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux