Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Incorrect log results after merge
Incorrect log results after merge [message #1743026] Fri, 09 September 2016 15:37 Go to next message
Denis Malyshkin is currently offline Denis MalyshkinFriend
Messages: 2
Registered: September 2016
Junior Member
Found a strange behavior (bug?) in a log command.

The corresponding test is attached.
It creates a repo, creates a branch, does some commits either to the created branch and to master, then merges master to the created branch. After merge it tries to calculate the number of commits between the branch and master. Because master has been already merged -- the branch is not behind the master, i.e. corresponding commit count should be 0. But 'Iterables.size' after a 'log' call returns the number of commits in the master minus 1.
Moreover, if 'sleep' in the line 43 is uncommented -- the bug will go away, and 'behind' is equal to 0.

What do I do wrong? Is it a bug in JGit library?
Re: Incorrect log results after merge [message #1743098 is a reply to message #1743026] Mon, 12 September 2016 09:10 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
Wow, that's an amazing bug. With your test program I can reproduce it most of the times. I created bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=501211 . Let's continue discussion in bugzilla

Ciao
Chris
Re: Incorrect log results after merge [message #1743128 is a reply to message #1743098] Mon, 12 September 2016 12:43 Go to previous messageGo to next message
Denis Malyshkin is currently offline Denis MalyshkinFriend
Messages: 2
Registered: September 2016
Junior Member
Christian Halstrick wrote on Mon, 12 September 2016 09:10
I created bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=501211.

Thank you! Will wait for the fix.
Re: Incorrect log results after merge [message #1744383 is a reply to message #1743128] Mon, 26 September 2016 12:42 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
fixed in JGit 4.5.0, see https://git.eclipse.org/r/81491
Previous Topic:How does Eclipse/eGit connect workspace to git repo and its project metadata/source files?
Next Topic:Cherry command available?
Goto Forum:
  


Current Time: Thu Apr 25 09:34:26 GMT 2024

Powered by FUDForum. Page generated in 0.02998 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top