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

pocelain does not merge updates into working trees #452

Open
Salamafet opened this issue Sep 5, 2016 · 8 comments
Open

pocelain does not merge updates into working trees #452

Salamafet opened this issue Sep 5, 2016 · 8 comments
Assignees

Comments

@Salamafet
Copy link

When a file is removed from repository, the dulwich.pull command does not remove the file from local storage.

When I add a file in repository, the file is correctly downloaded.

I have try with admin right but doesn't work.

@jelmer
Copy link
Owner

jelmer commented Sep 5, 2016

On Mon, Sep 05, 2016 at 06:49:26AM -0700, Stéphane wrote:

When a file is removed from repository, the dulwich.pull command does not remove the file from local storage.

When I add a file in repository, the file is correctly downloaded.

I have try with admin right but doesn't work.

Dulwich currently doesn't do any merging, including merges that affect the working tree.

@jelmer jelmer changed the title pocelain.pull does not remove files pocelain does not merge updates into working trees Sep 5, 2016
@jelmer jelmer added the bug label Sep 5, 2016
@jelmer jelmer self-assigned this Apr 12, 2018
@sheluchin
Copy link

sheluchin commented Jan 23, 2019

Dulwich currently doesn't do any merging, including merges that affect the working tree.

@jelmer Is this still the case?

@jelmer
Copy link
Owner

jelmer commented Jan 23, 2019 via email

@laneb
Copy link
Contributor

laneb commented Feb 22, 2019

"Merge" here refers to the update to WD+index after a clean merge, checkout, etc., correct? I.e. the WD+index reflected tree T0 and we want to update WD+index to reflect T1. I think this operation can be implemented naively as

  1. Assert index matches T0
  2. Assert T1 contains no blob at the same path as an untracked file in WD
  3. Remove all files tracked in T0 from WD
  4. Write all files tracked in T1 to WD
  5. Rebuild index from T1

@jelmer Does that seem correct? Not sure what the gotchas here are.

@jelmer
Copy link
Owner

jelmer commented Feb 22, 2019

No, it refers to a three-way merge. You're describing a fast-forward operation, which would also be useful to implement but is different.

@laneb
Copy link
Contributor

laneb commented Feb 22, 2019

Oh duh 🤦‍♂️Yes I was only considering the fast-forward scenario. Makes sense that WD cannot be updated until after 3-way merge. Once that's complete and the ref is updated to point to the merge commit, the operation I described can be applied.

@jelmer
Copy link
Owner

jelmer commented Feb 22, 2019 via email

@kevinhendricks
Copy link
Contributor

Is there any update on this? Would it help in any way to take the Sigil dulwich repo with its preliminary merge code from about 2 years ago and update it to current dulwich? Is there anything I can do to help get basic merge working the way you want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants