This page describes a hypothetical situation that could arise with the sage git workflow, as discussed on TentativeConventions and at Sage Days 54.

Why can rebasing cause problems?

Consider the following scenario, and the accompanying ascii art diagrams:

---K---L---M  <-(origin/master)

---K---L---M  <-(origin/master)
            \
             --A---B---C  <-(aardvarks)

---K---L---M  <-(origin/master)
            \
             --A---B---C  <-(aardvarks)
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T  <-(origin/master)
            \
             --A---B---C  <-(aardvarks)
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T  <-(origin/master)
            \                   \
             \                   --A2--B2--C2  <-(aardvarks)
              \
               A---B---C
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T----------------U  <-(origin/master)
            \                   \              /
             \                   --A2--B2--C2--  <-(aardvarks)
              \
               A---B---C
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T----------------U---*  <-(origin/master)
            \                   \              /   /
             \                   --A2--B2--C2--   /    <-(aardvarks)
              \                                  /
               A---B---C                        /
                        \                      /
                         --X---Y---Z-----------  <-(bowling)

Now, there is a problem, because the bowling code does not merge cleanly into the official origin/master branch. Regardless of who is right or wrong, this needs to be fixed before the positively reviewed bowling branch can be merged into origin/master. The question here is: whose responsibility is it to fix the problem?

So, the central question is, when does the aardvarks branch change from belonging to Alice only, to belonging to the whole community?

What happens with merging instead of rebasing?

Here is what would happen in the scenario above if Alice merged instead of rebasing:

---K---L---M---P---Q---R---S---T  <-(origin/master)
            \
             --A---B---C  <-(aardvarks)
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T  <-(origin/master)
            \                   \
             --A---B---C---------D  <-(aardvarks)
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T---U  <-(origin/master)
            \                   \ /
             --A---B---C---------D  <-(aardvarks)
                        \
                         --X---Y---Z  <-(bowling)

---K---L---M---P---Q---R---S---T---U---V  <-(origin/master)
            \                   \ /   /
             --A---B---C---------D   /    <-(aardvarks)
                        \           /
                         --X---Y---Z  <-(bowling)

RebaseVsMerge (last edited 2013-11-07 17:24:57 by mguaypaq)