RFC: migrating to git

Edward Z. Yang ezyang at MIT.EDU
Thu Jan 13 00:31:48 CET 2011


Excerpts from Roman Leshchinskiy's message of Wed Jan 12 18:20:25 -0500 2011:
> How would we get the current functionality of darcs-all pull? Is it even possible?

Here is the rebase-y workflow.  Untested, so I might have gotten one or two
details wrong.

> Suppose I want to hack on GHC and base (base is a submodule of GHC). For this, I want to:
> 
>   - pull the latest patches to both GHC and base

# pull the latest patches for GHC, and sticks your patchset on top
git pull --rebase
# <resolve any conflicts that occured during rebase>
# register any new submodules (if any)
git submodule init
# make your submodules reflect the latest version GHC has
git submodule update --rebase
# <resolve any conflicts that occured during rebase>

>   - write code
>   - record my patches in both GHC and base

cd libraries/base
git commit -asm "Base patch"
cd ../..
git commit -asm "GHC patch"

Note that your commit to libraries/base changed what commit it is pointing
to, so your GHC commit will then pick up the changed sumbodule.  If you
do the commits in the opposite order, this won't happen.  So commit
in all submodules first.

>   - pull again to get whatever patches have been pushed while I was hacking

git pull --rebase
git submodule update --rebase

>   - validate
>   - push my patches to both GHC and base

git send-mail --to=cvs-ghc at haskell.org $PATCHES
cd libraries/base
git send-mail --to=cvs-ghc at haskell.org $PATCHES

Cheers,
Edward



More information about the Glasgow-haskell-users mailing list