Skip to content

Creating branches ignores changes made on disk from command line (regression) #322

Closed
@yishaigalatzer

Description

@yishaigalatzer

Here are the repro steps.

Create a folder with a couple of files
Using libgit2sharp:
Initialize a repository but don't commit or stage any files

From a CLI window:
git add -A
git commit -m "message"

Now back to libgit2sharp:
Using the same repository object
Branch branch = repository.CreateBranch("newBranch");
branch.Checkout();

result:
When getting status all files appear to be deleted, where they should appear as Unalatered.

This used to work a few weeks ago (0.9.5-unknown-7dfc5c3 (x86))

Workaround:
Recreate the repository object and it all works again. But it's a bit unexpected. (In short I'm not blocked, but others might hit it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions