libgit2 / libgit2/libgit2sharp

Checkout confilict with no changes

Open
#1,282 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

I am facing a rather strange issue, it maybe that i am doing something wrong.

I am looping over all branches, i then locate certain files, i then read something from the files and then move on. But i can't move on because i get conflicts when i switch, and this is where it gets strange, because i do not change anything at anytime in this process, so why is it telling me that there is a conflict??

One thing i notices is that, when submodules is behind, don't know if that has something to do with it

var repo = new Repository("path to repo"); foreach (var branch in repo.Branches) { repo.Checkout(branch); dosomthing(branch); }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the loop around Repository.Checkout(branch), including the reported case where a submodule is behind. Inspect the checkout behavior and captured repository state when no files are changed. Done means identifying the cause of the conflict and adding a regression test or a precise fix path for this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.