tensorwerk / stockroom

Version control for software 2.0
https://tensorwerk.com
Apache License 2.0
64 stars 5 forks source link

Merge & merge conflicts #10

Open hhsecond opened 4 years ago

hhsecond commented 4 years ago

Description

Stockroom's stockfile mechanism is not good enough for handling merges and merges conflicts. Since the head.stock file consists of only one line and that is that key to managing the stock read head, it's important to make it escape merge conflicts if there is no conflict in hangar internally. A thought suggested by @rlizzo is documenting here for reference.

                  (master)
    a ---- b1 ---- c1 
    \---b2 
     \  (dev)
     \-------b3
            (test)
    head.stock of master
    -----------------
    master c1
    head.stock of dev
    ---------------
    master a
    dev b2
    head.stock of test
    -----------------
    master a
    test b3
               (master)
    a ---- b1 ---- c1 
    \---b2 ------c2 (dev)
     \          /
      \-------b3
            (test)
    head.stock of master
    -----------------
    master c1
    head.stock of dev
    ---------------
    master a
    dev c2
    test b3
    head.stock of test
    -----------------
    master a
    test b3
                         (master)
    a ---- b1 ---- c1 ----- d
    |           (dev)      /
    \---b2 ------c2 ------/
     \          /
      \-------b3
            (test)
    head.stock of master
    -----------------
    master d
    dev c2
    test b3
    head.stock of dev
    ---------------
    master a
    dev c2
    test b3
    head.stock of test
    -----------------
    master a
    test b3