Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Pull rebase strageness

Hi,

I am writing a test case for pull with rebase, but the result after
the pull is not what I'd expect.

I am afraid I might have stumbled upon a bug, but I need someone with
a little JGit experience to make sure I'm not mistaken.

Consider the following test case written in the
PullCommandWithRebaseTest[1] class (and thus using the @Before method
of that class):
https://gist.github.com/2703367

The test passes, but I'm afraid there is a bug anyway.. The commit
created on lines 16-19 disappears after the pull!

The test prints:
Before pull:
source:
Some change in remote
Initial commit for source
target:
Local commit in target
Initial commit for source
After pull:
source:
Some change in remote
Initial commit for source
target:
Some change in remote
Initial commit for source

Where did the "Local commit in target" go?
I think the last printout of the target commits should have been:

Local commit in target
Some change in remote
Initial commit for source

What do you think?

Please also check that my printLogs() method is implemented correctly.
It is possible the bug is in there, and not in JGit ;)

Regards,
/Mikael


[1] https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandWithRebaseTest.java


Back to the top