Hello,<br><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 11:44 AM, Roman Leshchinskiy <span dir="ltr">&lt;<a href="mailto:rl@cse.unsw.edu.au">rl@cse.unsw.edu.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 12/01/2011, at 09:22, Simon Marlow wrote:<br>
<br>
&gt; On 11/01/2011 23:11, Roman Leshchinskiy wrote:<br>
&gt;&gt;<br>
</div><div class="im">&gt;&gt; A quick look at the docs seems to indicate that we&#39;d need to do<br>
&gt;&gt;<br>
&gt;&gt; git pull<br>
&gt;&gt; git submodule update<br>
&gt;&gt;<br>
&gt;&gt; which doesn&#39;t look like a win over darcs-all. Also, I completely fail to understand what git submodule update does. It doesn&#39;t seem to pull all patches from the master repo. The git submodule docs are even worse than the rest of the git docs which is rather discouraging.<br>

&gt;<br>
&gt; True, however the build system could automatically check whether you had missed this step, because it could check the hashes.<br>
<br>
</div>That would be an improvement. How do you pull submodule patches which the main repo doesn&#39;t depend on, though? Out of curiousity, has anyone here used submodules for something similar to what we would need?</blockquote>
<div><br></div><div>A &quot;submodule&quot; is basically a &quot;pointer&quot; to a particular state of a remote repo.  So when you do &quot;git pull&quot; in GHC, you get changes to the code, and also changes to this &quot;pointer&quot;, but it won&#39;t automatically modify your local version of the sub-module repo.  So at this point, if you started &quot;git gui&quot; you&#39;d see that there is a mismatch between your local copy of the sub-module and the expected version.</div>
<div><br></div><div>When you issue the command &quot;git submodule update&quot;, you are telling git to advance the sub-module repo to the &quot;expected version&quot; (i.e., where the pointer points to).  The reason this does not happen automatically is that you might have also made changes to the submodule, so you might want to do some merging there, instead of just pulling.</div>
<div><br></div><div>One thing to note is that if we were to set things up with sub-modules, then every now and then we would have to advance the GHC&#39;s &quot;expected pointer&quot; for various libraries to the latest (or a newer) version.  Of course, we could have a script do this but, at least in theory, when someone makes a commit which updates the version of a sub-module, they are asserting that they things ought to work with the newer version of the sub-module.</div>
<div><br></div><div>-Iavor</div><div>PS: I&#39;ve only used sub-module on what project at work.  At first I too was quite confused about what was going on, but I&#39;ve come to think that submodules are a pretty reasonable way to deal with a situation which is inherently complex.</div>
<div><br></div><div><br></div><div><br></div><div> </div></div>