|Re: [jgit-dev] Jgit Hard Reset Issue|
On Thu, Jan 30, 2014 at 2:14 AM, Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> wrote:
----- Ursprungligt meddelande -----
> FrÃn: "Isuru Haththotuwa" <isurulucky@xxxxxxxxx>
> Till: "JGit Developers list" <jgit-dev@xxxxxxxxxxx>
> Skickat: onsdag, 29 jan 2014 20:21:33
> Ãmne: [jgit-dev] Jgit Hard Reset Issue
>There should be no difference between JGit and C Git. Try the latest release or
> Hi all,
> Experienced that the following sequence of operations are different between
> native git and jgit
> 1. Using native git:
> Do a git hard reset when there is a merging error for an untracked file
> (there is such a file in the remote repo, and git is complaining that local
> untracked file will be overwritten - error: Untracked working tree file
> 'xxx/yyy' would be overwritten by merge.)
> After the the hard reset, the working directory is clean and the untracked
> local file is replaced by the file from the remote branch.
> 2. Using JGit:
> In a similar situation as explained above, when we try to do a git pull, a
> CheckoutConflictException is thrown. However, when I tried to do a hard
> reset, the untracked conflicting file was not replaced by the file from the
> remote repository. The local file was left as a deleted file ready to be
> committed. (Saw this from the git status). I used the code  to do the
> hard reset.
> What is the reason for this? Is there any issue with the code that I'm using
> or in the approach? I'm using jgit 2.3.1.
nightly build see it the behavior is there. If it is, then also try the nightly build.
2.3.1 is pretty old in OSS terms. There is at least one fix included in the latest
release (3.2) that just might relate to this.Will do. Thanks Robin.Â
Thanks and Regards,