Re: Git problem

2022-04-07 Thread Simon Peyton Jones
Thanks Viktor -- I'll try that

Simon

On Thu, 7 Apr 2022 at 01:37, Viktor Dukhovni  wrote:

> On Wed, Apr 06, 2022 at 10:55:09PM +0100, Simon Peyton Jones wrote:
>
> > I see this
> > bash$ git status
> > On branch wip/romes/ttg-splices-improvements
> > Your branch is up to date with
> 'origin/wip/romes/ttg-splices-improvements'.
> >
> > modified   libraries/Cabal
> > +Subproject commit d638e33dbc056048b393964286c7fe394b2730d7-dirty
> > modified   libraries/unix
> > +Subproject commit 1f72ccec55c1b61299310b994754782103a617f5-dirty
> >
> > How can I get my submodules in sync with this branch?
>
> ( cd libraries/Cabal && { git clean -xdf .; git checkout .; } )
> ( cd libraries/unix && { git clean -xdf .; git checkout .; } )
>
> --
> Viktor.
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Git problem

2022-04-06 Thread Viktor Dukhovni
On Wed, Apr 06, 2022 at 10:55:09PM +0100, Simon Peyton Jones wrote:

> I see this
> bash$ git status
> On branch wip/romes/ttg-splices-improvements
> Your branch is up to date with 'origin/wip/romes/ttg-splices-improvements'.
> 
> modified   libraries/Cabal
> +Subproject commit d638e33dbc056048b393964286c7fe394b2730d7-dirty
> modified   libraries/unix
> +Subproject commit 1f72ccec55c1b61299310b994754782103a617f5-dirty
> 
> How can I get my submodules in sync with this branch?

( cd libraries/Cabal && { git clean -xdf .; git checkout .; } )
( cd libraries/unix && { git clean -xdf .; git checkout .; } )

-- 
Viktor.
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Git problem

2022-04-06 Thread Simon Peyton Jones
Friends

I see this
bash$ git status
On branch wip/romes/ttg-splices-improvements
Your branch is up to date with 'origin/wip/romes/ttg-splices-improvements'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
modified:   libraries/Cabal (modified content)
modified:   libraries/unix (modified content)

But I don't want those library changes, whatever they are.  They look like
Unstaged changes (2)
modified   libraries/Cabal
@@ -1 +1 @@
-Subproject commit d638e33dbc056048b393964286c7fe394b2730d7
+Subproject commit d638e33dbc056048b393964286c7fe394b2730d7-dirty
modified   libraries/unix
@@ -1 +1 @@
-Subproject commit 1f72ccec55c1b61299310b994754782103a617f5
+Subproject commit 1f72ccec55c1b61299310b994754782103a617f5-dirty

*But using git submodule update does nothing.*

How can I get my submodules in sync with this branch?

Thanks

Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Urgent: git problem

2019-10-23 Thread Dr. ERDI Gergo

On Wed, 23 Oct 2019, Simon Peyton Jones via ghc-devs wrote:



Aieee!   All my GHC repos are failing with this.  As a result I can’t pull.  
What
should I do?   Thanks!


git remote prune origin___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Urgent: git problem

2019-10-23 Thread Simon Peyton Jones via ghc-devs
Thanks everyone!

From: ghc-devs  On Behalf Of Bryan Richter
Sent: 23 October 2019 17:36
To: GHC developers 
Subject: Re: Urgent: git problem

I suspect a git fetch --prune might help. It looks like git's mapping of remote 
branches to a directory tree has caused a conflict between new and stale 
branches: ../rae/... can't be a directory if it's already a file!

If that still doesn't work (if it tries to record new branches before deleting 
stale ones), you'd have to muck around in .git/refs/remotes and remove the 
files manually.
On Wed, 23 Oct 2019, 18.29 Simon Peyton Jones via ghc-devs, 
mailto:ghc-devs@haskell.org>> wrote:
a completely fresh clone seems ok.  but that’s a bit brutal

From: ghc-devs 
mailto:ghc-devs-boun...@haskell.org>> On Behalf 
Of Simon Peyton Jones via ghc-devs
Sent: 23 October 2019 17:22
To: ghc-devs mailto:ghc-devs@haskell.org>>
Subject: Urgent: git problem

Aieee!   All my GHC repos are failing with this.  As a result I can’t pull.  
What should I do?   Thanks!
Simon


git pull

error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
'refs/remotes/origin/wip/rae' exists; cannot create 
'refs/remotes/origin/wip/rae/remove-tc-dep'

From gitlab.haskell.org:ghc/ghc

! [new branch]wip/rae/remove-tc-dep-> 
origin/wip/rae/remove-tc-dep  (unable to update local ref)

error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules': 
'refs/remotes/origin/wip/rae' exists; cannot create 
'refs/remotes/origin/wip/rae/split-up-modules'

! [new branch]wip/rae/split-up-modules -> 
origin/wip/rae/split-up-modules  (unable to update local ref)

simonpj@MSRC-3645512:~/code/HEAD-2$
___
ghc-devs mailing list
ghc-devs@haskell.org<mailto:ghc-devs@haskell.org>
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Urgent: git problem

2019-10-23 Thread Bryan Richter
Ah, good to know there's a command *just* for pruning! I'd only ever seen
the --prune flag to fetch/pull.

On Wed, 23 Oct 2019, 18.30 Oliver Charles,  wrote:

> I usually encounter this when there has once been a branch called
> "wip/rae" (so .git would have a *file* wip/rae), but now there's a
> branch called "wip/rae/remove-tc-dep", so "wip/rae" should be a
> directory, but it's already in .git as a file! I think "git remote
> prune" fixes this, but I can't entirely recall.
>
> On Wed, Oct 23, 2019 at 5:22 PM Simon Peyton Jones via ghc-devs
>  wrote:
> >
> > Aieee!   All my GHC repos are failing with this.  As a result I can’t
> pull.  What should I do?   Thanks!
> >
> > Simon
> >
> >
> >
> > git pull
> >
> > error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep':
> 'refs/remotes/origin/wip/rae' exists; cannot create
> 'refs/remotes/origin/wip/rae/remove-tc-dep'
> >
> > From gitlab.haskell.org:ghc/ghc
> >
> > ! [new branch]wip/rae/remove-tc-dep->
> origin/wip/rae/remove-tc-dep  (unable to update local ref)
> >
> > error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules':
> 'refs/remotes/origin/wip/rae' exists; cannot create
> 'refs/remotes/origin/wip/rae/split-up-modules'
> >
> > ! [new branch]wip/rae/split-up-modules ->
> origin/wip/rae/split-up-modules  (unable to update local ref)
> >
> > simonpj@MSRC-3645512:~/code/HEAD-2$
> >
> > ___
> > ghc-devs mailing list
> > ghc-devs@haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Urgent: git problem

2019-10-23 Thread Bryan Richter
I suspect a git fetch --prune might help. It looks like git's mapping of
remote branches to a directory tree has caused a conflict between new and
stale branches: ../rae/... can't be a directory if it's already a file!

If that still doesn't work (if it tries to record new branches before
deleting stale ones), you'd have to muck around in .git/refs/remotes and
remove the files manually.

On Wed, 23 Oct 2019, 18.29 Simon Peyton Jones via ghc-devs, <
ghc-devs@haskell.org> wrote:

> a completely fresh clone seems ok.  but that’s a bit brutal
>
>
>
> *From:* ghc-devs  *On Behalf Of *Simon
> Peyton Jones via ghc-devs
> *Sent:* 23 October 2019 17:22
> *To:* ghc-devs 
> *Subject:* Urgent: git problem
>
>
>
> Aieee!   All my GHC repos are failing with this.  As a result I can’t
> pull.  What should I do?   Thanks!
>
> Simon
>
>
>
> git pull
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
> 'refs/remotes/origin/wip/rae'
> exists; cannot create 'refs/remotes/origin/wip/rae/remove-tc-dep'
>
> From gitlab.haskell.org:ghc/ghc
>
> ! [new branch]wip/rae/remove-tc-dep->
> origin/wip/rae/remove-tc-dep  (unable to update local ref)
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules':
> 'refs/remotes/origin/wip/rae' exists; cannot create
> 'refs/remotes/origin/wip/rae/split-up-modules'
>
> ! [new branch]wip/rae/split-up-modules ->
> origin/wip/rae/split-up-modules  (unable to update local ref)
>
> simonpj@MSRC-3645512:~/code/HEAD-2$
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Urgent: git problem

2019-10-23 Thread Simon Peyton Jones via ghc-devs
Thanks.  Yes 'git remote prune origin' did the trick!

Simon

|  -Original Message-
|  From: Oliver Charles 
|  Sent: 23 October 2019 17:30
|  To: Simon Peyton Jones 
|  Cc: ghc-devs 
|  Subject: Re: Urgent: git problem
|  
|  I usually encounter this when there has once been a branch called
|  "wip/rae" (so .git would have a *file* wip/rae), but now there's a
|  branch called "wip/rae/remove-tc-dep", so "wip/rae" should be a
|  directory, but it's already in .git as a file! I think "git remote
|  prune" fixes this, but I can't entirely recall.
|  
|  On Wed, Oct 23, 2019 at 5:22 PM Simon Peyton Jones via ghc-devs
|   wrote:
|  >
|  > Aieee!   All my GHC repos are failing with this.  As a result I can’t
|  pull.  What should I do?   Thanks!
|  >
|  > Simon
|  >
|  >
|  >
|  > git pull
|  >
|  > error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep':
|  'refs/remotes/origin/wip/rae' exists; cannot create
|  'refs/remotes/origin/wip/rae/remove-tc-dep'
|  >
|  > From gitlab.haskell.org:ghc/ghc
|  >
|  > ! [new branch]wip/rae/remove-tc-dep->
|  origin/wip/rae/remove-tc-dep  (unable to update local ref)
|  >
|  > error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules':
|  'refs/remotes/origin/wip/rae' exists; cannot create
|  'refs/remotes/origin/wip/rae/split-up-modules'
|  >
|  > ! [new branch]wip/rae/split-up-modules ->
|  origin/wip/rae/split-up-modules  (unable to update local ref)
|  >
|  > simonpj@MSRC-3645512:~/code/HEAD-2$
|  >
|  > ___
|  > ghc-devs mailing list
|  > ghc-devs@haskell.org
|  >
|  https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.hask
|  ell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
|  devsdata=02%7C01%7Csimonpj%40microsoft.com%7Ca21353034c8540fe2e1208d7
|  57d644a6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637074450093374131
|  mp;sdata=jMgjQRgGI93G4HbZPhfnmEEOyRcgK%2BBOhdcQYmH2m1M%3Dreserved=0
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Urgent: git problem

2019-10-23 Thread Alan & Kim Zimmerman
I do

git pull origin master

And it then works

Alan

On Wed, 23 Oct 2019, 17:29 Simon Peyton Jones via ghc-devs, <
ghc-devs@haskell.org> wrote:

> a completely fresh clone seems ok.  but that’s a bit brutal
>
>
>
> *From:* ghc-devs  *On Behalf Of *Simon
> Peyton Jones via ghc-devs
> *Sent:* 23 October 2019 17:22
> *To:* ghc-devs 
> *Subject:* Urgent: git problem
>
>
>
> Aieee!   All my GHC repos are failing with this.  As a result I can’t
> pull.  What should I do?   Thanks!
>
> Simon
>
>
>
> git pull
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
> 'refs/remotes/origin/wip/rae'
> exists; cannot create 'refs/remotes/origin/wip/rae/remove-tc-dep'
>
> From gitlab.haskell.org:ghc/ghc
>
> ! [new branch]wip/rae/remove-tc-dep->
> origin/wip/rae/remove-tc-dep  (unable to update local ref)
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules':
> 'refs/remotes/origin/wip/rae' exists; cannot create
> 'refs/remotes/origin/wip/rae/split-up-modules'
>
> ! [new branch]wip/rae/split-up-modules ->
> origin/wip/rae/split-up-modules  (unable to update local ref)
>
> simonpj@MSRC-3645512:~/code/HEAD-2$
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Urgent: git problem

2019-10-23 Thread Oliver Charles
I usually encounter this when there has once been a branch called
"wip/rae" (so .git would have a *file* wip/rae), but now there's a
branch called "wip/rae/remove-tc-dep", so "wip/rae" should be a
directory, but it's already in .git as a file! I think "git remote
prune" fixes this, but I can't entirely recall.

On Wed, Oct 23, 2019 at 5:22 PM Simon Peyton Jones via ghc-devs
 wrote:
>
> Aieee!   All my GHC repos are failing with this.  As a result I can’t pull.  
> What should I do?   Thanks!
>
> Simon
>
>
>
> git pull
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
> 'refs/remotes/origin/wip/rae' exists; cannot create 
> 'refs/remotes/origin/wip/rae/remove-tc-dep'
>
> From gitlab.haskell.org:ghc/ghc
>
> ! [new branch]wip/rae/remove-tc-dep-> 
> origin/wip/rae/remove-tc-dep  (unable to update local ref)
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules': 
> 'refs/remotes/origin/wip/rae' exists; cannot create 
> 'refs/remotes/origin/wip/rae/split-up-modules'
>
> ! [new branch]wip/rae/split-up-modules -> 
> origin/wip/rae/split-up-modules  (unable to update local ref)
>
> simonpj@MSRC-3645512:~/code/HEAD-2$
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Urgent: git problem

2019-10-23 Thread Sebastian Graf
Hi,

Some googling turned up this SO thread
https://stackoverflow.com/a/43253320/388010
Does that help?

Cheers
Sebastian

Am Mi., 23. Okt. 2019 um 17:22 Uhr schrieb Simon Peyton Jones via ghc-devs <
ghc-devs@haskell.org>:

> Aieee!   All my GHC repos are failing with this.  As a result I can’t
> pull.  What should I do?   Thanks!
>
> Simon
>
>
>
> git pull
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
> 'refs/remotes/origin/wip/rae'
> exists; cannot create 'refs/remotes/origin/wip/rae/remove-tc-dep'
>
> From gitlab.haskell.org:ghc/ghc
>
> ! [new branch]wip/rae/remove-tc-dep->
> origin/wip/rae/remove-tc-dep  (unable to update local ref)
>
> error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules':
> 'refs/remotes/origin/wip/rae' exists; cannot create
> 'refs/remotes/origin/wip/rae/split-up-modules'
>
> ! [new branch]wip/rae/split-up-modules ->
> origin/wip/rae/split-up-modules  (unable to update local ref)
>
> simonpj@MSRC-3645512:~/code/HEAD-2$
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Urgent: git problem

2019-10-23 Thread Simon Peyton Jones via ghc-devs
a completely fresh clone seems ok.  but that's a bit brutal

From: ghc-devs  On Behalf Of Simon Peyton Jones 
via ghc-devs
Sent: 23 October 2019 17:22
To: ghc-devs 
Subject: Urgent: git problem

Aieee!   All my GHC repos are failing with this.  As a result I can't pull.  
What should I do?   Thanks!
Simon


git pull

error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
'refs/remotes/origin/wip/rae' exists; cannot create 
'refs/remotes/origin/wip/rae/remove-tc-dep'

>From gitlab.haskell.org:ghc/ghc

! [new branch]wip/rae/remove-tc-dep-> 
origin/wip/rae/remove-tc-dep  (unable to update local ref)

error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules': 
'refs/remotes/origin/wip/rae' exists; cannot create 
'refs/remotes/origin/wip/rae/split-up-modules'

! [new branch]wip/rae/split-up-modules -> 
origin/wip/rae/split-up-modules  (unable to update local ref)

simonpj@MSRC-3645512:~/code/HEAD-2$
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Urgent: git problem

2019-10-23 Thread Simon Peyton Jones via ghc-devs
Aieee!   All my GHC repos are failing with this.  As a result I can't pull.  
What should I do?   Thanks!
Simon


git pull

error: cannot lock ref 'refs/remotes/origin/wip/rae/remove-tc-dep': 
'refs/remotes/origin/wip/rae' exists; cannot create 
'refs/remotes/origin/wip/rae/remove-tc-dep'

>From gitlab.haskell.org:ghc/ghc

! [new branch]wip/rae/remove-tc-dep-> 
origin/wip/rae/remove-tc-dep  (unable to update local ref)

error: cannot lock ref 'refs/remotes/origin/wip/rae/split-up-modules': 
'refs/remotes/origin/wip/rae' exists; cannot create 
'refs/remotes/origin/wip/rae/split-up-modules'

! [new branch]wip/rae/split-up-modules -> 
origin/wip/rae/split-up-modules  (unable to update local ref)

simonpj@MSRC-3645512:~/code/HEAD-2$
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Git problem

2014-04-17 Thread Simon Peyton Jones
Thank you – that’s helpful.  It’s the mental model that I miss!

Simon

From: Iavor Diatchki [mailto:iavor.diatc...@gmail.com]
Sent: 16 April 2014 16:44
To: Herbert Valerio Riedel
Cc: Simon Peyton Jones; ghc-devs
Subject: Re: Git problem

Hello,

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.

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:

1. `git stash`: Git remembered which files were modified, and the current 
commit for `haddock` (and other sub-modules)
2. `git pull`: Git got some changes for the remote server, and it happened that 
the current commit for `haddock` changed.
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?

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.

Cheers,
-Iavor











On Mon, Apr 14, 2014 at 2:47 AM, Herbert Valerio Riedel 
hvrie...@gmail.commailto:hvrie...@gmail.com wrote:
On 2014-04-14 at 11:13:02 +0200, Simon Peyton Jones wrote:

[...]

 #both modified:  utils/haddock

 The modified files are right.  It's the both modified utils/haddock that is 
 messing me up.
 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

 #modified:   utils/haddock (new commits)
Fyi, the git equivalent of saying take the master haddock (where
'master' refers to 'master' of 'haddock.git'):

  # checkout master of haddock.git:
  git submodule update --remote utils/haddock

  # register state (= submod commit-id) of utils/haddock for next commit
  git add utils/haddock

HTH, hvr
___
ghc-devs mailing list
ghc-devs@haskell.orgmailto:ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Git problem

2014-04-16 Thread Iavor Diatchki
Hello,

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.

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:

1. `git stash`: Git remembered which files were modified, and the current
commit for `haddock` (and other sub-modules)
2. `git pull`: Git got some changes for the remote server, and it happened
that the current commit for `haddock` changed.
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?

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.

Cheers,
-Iavor












On Mon, Apr 14, 2014 at 2:47 AM, Herbert Valerio Riedel
hvrie...@gmail.comwrote:

 On 2014-04-14 at 11:13:02 +0200, Simon Peyton Jones wrote:

 [...]

  #both modified:  utils/haddock

  The modified files are right.  It's the both modified utils/haddock
 that is messing me up.
  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
 
  #modified:   utils/haddock (new commits)

 Fyi, the git equivalent of saying take the master haddock (where
 'master' refers to 'master' of 'haddock.git'):

   # checkout master of haddock.git:
   git submodule update --remote utils/haddock

   # register state (= submod commit-id) of utils/haddock for next commit
   git add utils/haddock

 HTH, hvr
 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Git problem

2014-04-14 Thread Simon Peyton Jones
Friends
I'm stuck with Git. Help please!
Simon

I tried to do a 'git stash pop', having just done a 'git pull' from the master 
repo.  I got this:

simonpj@cam-05-unx:~/code/HEAD-2$ git stash pop

warning: Failed to merge submodule utils/haddock (commits don't follow 
merge-base)

Auto-merging utils/haddock

CONFLICT (submodule): Merge conflict in utils/haddock

Auto-merging compiler/typecheck/TcRnMonad.lhs
Now git status says

simonpj@cam-05-unx:~/code/HEAD-2$ git status

# On branch master

# Your branch is ahead of 'origin/master' by 2 commits.

#

# Changes to be committed:

#   (use git reset HEAD file... to unstage)

#

#modified:   compiler/typecheck/TcMType.lhs

#modified:   compiler/typecheck/TcRnMonad.lhs

#modified:   compiler/typecheck/TcSimplify.lhs

#modified:   compiler/typecheck/TcUnify.lhs

#

# Unmerged paths:

#   (use git reset HEAD file... to unstage)

#   (use git add/rm file... as appropriate to mark resolution)

#

#both modified:  utils/haddock
The modified files are right.  It's the both modified utils/haddock that is 
messing me up.
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

#modified:   utils/haddock (new commits)



___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Git problem

2014-04-14 Thread Herbert Valerio Riedel
On 2014-04-14 at 11:13:02 +0200, Simon Peyton Jones wrote:

[...]

 #both modified:  utils/haddock

 The modified files are right.  It's the both modified utils/haddock that is 
 messing me up.
 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

 #modified:   utils/haddock (new commits)

Fyi, the git equivalent of saying take the master haddock (where
'master' refers to 'master' of 'haddock.git'):

  # checkout master of haddock.git:
  git submodule update --remote utils/haddock

  # register state (= submod commit-id) of utils/haddock for next commit
  git add utils/haddock

HTH, hvr
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Git problem

2014-04-14 Thread Edward Z . Yang
Hey Simon,

If you have no Haddock changes, try cd'ing into the haddock directory
and doing a hard reset to the remote origin (so something like
git reset --hard origin/master *INSIDE HADDOCK*), and then changing
back to the main directory and git add'ing the directory.

Edward

Excerpts from Simon Peyton Jones's message of 2014-04-14 02:13:02 -0700:
 Friends
 I'm stuck with Git. Help please!
 Simon
 
 I tried to do a 'git stash pop', having just done a 'git pull' from the 
 master repo.  I got this:
 
 simonpj@cam-05-unx:~/code/HEAD-2$ git stash pop
 
 warning: Failed to merge submodule utils/haddock (commits don't follow 
 merge-base)
 
 Auto-merging utils/haddock
 
 CONFLICT (submodule): Merge conflict in utils/haddock
 
 Auto-merging compiler/typecheck/TcRnMonad.lhs
 Now git status says
 
 simonpj@cam-05-unx:~/code/HEAD-2$ git status
 
 # On branch master
 
 # Your branch is ahead of 'origin/master' by 2 commits.
 
 #
 
 # Changes to be committed:
 
 #   (use git reset HEAD file... to unstage)
 
 #
 
 #modified:   compiler/typecheck/TcMType.lhs
 
 #modified:   compiler/typecheck/TcRnMonad.lhs
 
 #modified:   compiler/typecheck/TcSimplify.lhs
 
 #modified:   compiler/typecheck/TcUnify.lhs
 
 #
 
 # Unmerged paths:
 
 #   (use git reset HEAD file... to unstage)
 
 #   (use git add/rm file... as appropriate to mark resolution)
 
 #
 
 #both modified:  utils/haddock
 The modified files are right.  It's the both modified utils/haddock that is 
 messing me up.
 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
 
 #modified:   utils/haddock (new commits)
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs