<div dir="ltr">Hello,<div><br></div><div>I think the commands Herbert suggested should help.  I find it useful to have a mental model of what's going on with git, so here is a brief explanation, in case it is useful.</div>
<div><br></div><div>The main observation is that Git not only keeps track of the state of all files in the repo, but also the states of all related repositories (aka, the sub-modules).  So this is probably what happened:</div>
<div><br></div><div>1. `git stash`: Git remembered which files were modified, and the current commit for `haddock` (and other sub-modules)</div><div>2. `git pull`: Git got some changes for the remote server, and it happened that the current commit for `haddock` changed.</div>
<div>3. `git pop`: Git needs to apply the saved changes but in the new setting.   It managed to automatically merge the modified files, but it does not know which is the correct current commit for haddock: do you want to use the newly downloaded version, or the one that was saved when you created the stash?</div>
<div><br></div><div>So Herbert's commands tell it what to do:  the first command tells it to set the current commit for haddock to the one in the remote repo (i.e., you are not interested in the stashed version);   the second command tells it to remember this, so that the change will be committed later.</div>
<div><br></div><div>Cheers,</div><div>-Iavor</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Apr 14, 2014 at 2:47 AM, Herbert Valerio Riedel <span dir="ltr"><<a href="mailto:hvriedel@gmail.com" target="_blank">hvriedel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2014-04-14 at 11:13:02 +0200, Simon Peyton Jones wrote:<br>
<br>
[...]<br>
<div class=""><br>
> #    both modified:      utils/haddock<br>
<br>
> The modified files are right.  It's the "both modified utils/haddock" that is messing me up.<br>
> I'm not modifying haddock!  I just want to say "take the master haddock", but I don't know how.  I tried 'git checkout utils/haddock' but that just led do `git status' saying<br>
><br>
> #    modified:   utils/haddock (new commits)<br>
<br>
</div>Fyi, the git equivalent of saying "take the master haddock" (where<br>
'master' refers to 'master' of 'haddock.git'):<br>
<br>
  # checkout master of haddock.git:<br>
  git submodule update --remote utils/haddock<br>
<br>
  # register state (= submod commit-id) of utils/haddock for next commit<br>
  git add utils/haddock<br>
<br>
HTH, hvr<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</blockquote></div><br></div>