Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Jgit Hard Reset Issue

This issue is still there in the jgit version that I just downloaded and tested. Please point me to the nightly build location, so that I can test that as well.

On Thu, Jan 30, 2014 at 9:02 AM, Isuru Haththotuwa <isurulucky@xxxxxxxxx> wrote:
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
> 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 [1] 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.

There should be no difference between JGit and C Git. Try the latest release or
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. 

-- robin

Thanks and Regards,

Thanks and Regards,

Back to the top