Updating Haddock submodule

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Wed Jul 16 11:04:29 UTC 2014


On 07/15/2014 09:01 AM, Simon Peyton Jones wrote:
> Herbert, Austin
> I've just made a change to GHC that has a (trivial) knock-on effect in Haddock, so I had to update the submodule.  Here is what I did, after consulting Austin.
> Can I humbly implore you both (or someone) to write down the workflow so that git-naïve people like me can do this with confidence, rather than (as now) in fear?
> Below is my draft of the workflow.  It seems pretty complicated, and there are three places (in red) where I am unsure what to do.
> Please in writing the workflow, document every step as I have done below.
> Thanks!
> Simon
> 
> 
> 1.      Starting point:
> 
> ·         all changes made in GHC and in utils/haddock.
> 
> ·         validate works
> 
> 2.      cd utils/haddock
> 
> 3.      git stash
> Keep my changes out of the way
> 
> 4.      git branch -av
> Keep the output
> 
> 5.      git checkout master
> Why 'master'?  Because I know from talking to Austin that the ghc repo tracks Haddock's master branch.  There is no way to get this information without talking to Someone Who Knows.  There should be a wiki page that documents it.
> 
> 6.      Check that in the output of step 4, the current branch (which should be detatched-head) is the same commit as origin/master.
> 
> I have no idea what to do if this isn't the case.
> 
> 7.      git pull
> Now Haddock's 'master' is up to date
> 
> 8.      git stash pop
> Apply the changes to the Haddock master branch
> 
> 9.      git add/commit to record and commit the patch as usual
> 
> 10.  git push
> 
> Phew!  At this stage we have updated Haddock.  I think.
> 
> 11.  cd ../..    Back into main ghc repo
> 
> 12.  git add/commit    to record patch as usual, but
> 
> ·         include utils/haddock in the "files" you add.  This will update the submodule pointer in the ghc repo
> 
> ·         include the word "submodule" in the commit message
> 
> 13.  git push
> 
> At this stage we have updated GHC too
> 
> 14.  ????      to get utils/haddock back into the detached-head state.
> 
> How do I do this?  git submodule update doesn't
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
> 

Is
https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules#MakingchangestoGHCsubmodules
what you are looking for?

Basically in step 12, you do your GHC hacking. Git should also show you
a one line change with a commit reference which is your updated Haddock.
You should commit that as well.

Not sure why you have step 14, it seems to me that you should be good
after 13. At step 14 you will already be pointing to the appropriate
commit, it will just happen to be the same as the master branch at that
point too so I think you're done.

-- 
Mateusz K.


More information about the ghc-devs mailing list