Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dolt pull fails when other branch exists in the repo #3309

Closed
kretes opened this issue Apr 27, 2022 · 4 comments
Closed

dolt pull fails when other branch exists in the repo #3309

kretes opened this issue Apr 27, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@kretes
Copy link

kretes commented Apr 27, 2022

When doing dolt pull I observe a message like this:

Updating dugm6punrcogm0jrd7o9uo4fuohmbh67..8grankn555j1c32dgdh3s2nkg5g8iphd
Already up to date.
current fast forward from a to b. a is ahead of b already

The problem is that HEAD, main and origin/main are all on dugm6punrcogm0jrd7o9uo4fuohmbh67, while 8grankn555j1c32dgdh3s2nkg5g8iphd is a previous commit.

Steps to reproduce:

mkdir remote_repo && cd remote_repo

dolt init

dolt sql -q "create table a (x int);"
dolt commit -am "table & data added"

dolt checkout -b a_branch
dolt checkout main

dolt sql -q "create table b (x int);"
dolt commit -am "table b in main"

mkdir ../local_repo && cd ../local_repo

dolt clone file:`pwd`/../remote_repo/.dolt/noms .

dolt pull

I found that to reproduce it - some other branch is needed.

dolt version: 0.39.2.

This issue isn't happening in 0.39.0, and I suspect this might be related to #3113

@CaptainStabs
Copy link

CaptainStabs commented Apr 27, 2022

Same issue here:

Dolt version: 0.39.1

On my fork of us-jails:

>dolt status
On branch GA
nothing to commit, working tree clean
>dolt log -n 1
commit sq9cm6rut34l8rt2q7ts51qpt93g8a7s (HEAD -> GA, origin/GA)
>dolt pull origin
Everything up-to-date.
Updating sq9cm6rut34l8rt2q7ts51qpt93g8a7s..2bcn0qe53v0rvdtmae6pmfh8s31tf9l9
inmate_population_snapshots | 1406 ++++++++++++++++++++++++++++++
jails                       | 27   +
2 tables changed, 1433 rows added(+), 0 rows modified(*), 0 rows deleted(-)
Updating sq9cm6rut34l8rt2q7ts51qpt93g8a7s..b73s55rb9n0alrtqthgjevmj1ug6ongi
error: Your local changes to the following tables would be overwritten by merge:
inmate_population_snapshots
jails
Please commit your changes before you merge.
>dolt branch -va

* GA                                                    ig9sk5f258l3dolvenkbveop9q1ahjp1
  PA                                                    2bcn0qe53v0rvdtmae6pmfh8s31tf9l9
  main                                                  4f5jdaaa83nl4de42j4igcpi8mhtil4t
  ny                                                    na98jrrsuet57muta636hnahsk2ldahp
  tn                                                    llorkbm3d313l6jfbvkf72vb5brqs1oi
  remotes/dolt_origin/main                              4f5jdaaa83nl4de42j4igcpi8mhtil4t
  remotes/dolt_origin/spacelove/workspace-1650463967            g439k0r3ejpd8vltjr9itl734o4ctpd0
  remotes/dolt_origin/spacelove/workspace-1650464366            mhob8s58sf4bg383sbcn18og50ug13k1
  remotes/origin/GA                                     ig9sk5f258l3dolvenkbveop9q1ahjp1
  remotes/origin/PA                                     2bcn0qe53v0rvdtmae6pmfh8s31tf9l9
  remotes/origin/main                                   b73s55rb9n0alrtqthgjevmj1ug6ongi
  remotes/origin/new_york                               t3o4akfcjhuak8t5r7qn6h0dm74qciec
  remotes/origin/ny                                     na98jrrsuet57muta636hnahsk2ldahp
  remotes/origin/tn                                     llorkbm3d313l6jfbvkf72vb5brqs1oi

b73s55rb9n0alrtqthgjevmj1ug6ongi is the commit of origin main

@zachmu zachmu added the bug Something isn't working label Apr 27, 2022
@zachmu
Copy link
Member

zachmu commented Apr 27, 2022

Thanks for the report, both of you. This is a bug.

We'll get this fixed ASAP.

In the meantime, please either use an earlier release of dolt, or use the separate fetch / merge workflow like:

dolt fetch
dolt merge remotes/origin/branch

@timsehn
Copy link
Sponsor Contributor

timsehn commented Apr 27, 2022

This is likely related to this PR:

#3210

@jcor11599 is on it.

@jycor
Copy link
Contributor

jycor commented Apr 28, 2022

Issue should be resolved as of release 0.39.4

@jycor jycor closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants