This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233454 - org.eclipse.jgit.api.errors.JGitInternalException: Cannot cherry-pick commit '423ed74ec7c27f9fba3cdeb8899b63f7c8e3f4e5' because it has 0 parents, only commits with exactly one parent are supported.
Summary: org.eclipse.jgit.api.errors.JGitInternalException: Cannot cherry-pick commit ...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.4
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on: 230572
Blocks:
  Show dependency tree
 
Reported: 2013-07-25 21:16 UTC by markiewb
Modified: 2013-10-18 13:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 201015


Attachments
stacktrace (4.56 KB, text/plain)
2013-07-25 21:16 UTC, markiewb
Details
stacktrace (4.56 KB, text/plain)
2013-09-28 04:21 UTC, Istoniz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-07-25 21:16:07 UTC
Build: NetBeans IDE Dev (Build 201307222300)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b16
OS: Windows 7

User Comments:
GUEST: pull from remote git repo

GUEST: tried to git rebase

markiewb: Tried to rebase a new local master with a new origin/master




Stacktrace: 
org.eclipse.jgit.api.errors.JGitInternalException: Cannot cherry-pick commit '423ed74ec7c27f9fba3cdeb8899b63f7c8e3f4e5' because it has 0 parents, only commits with exactly one parent are supported.
   at org.eclipse.jgit.api.RebaseCommand.initFilesAndRewind(RebaseCommand.java:643)
   at org.eclipse.jgit.api.RebaseCommand.call(RebaseCommand.java:234)
   at org.netbeans.libs.git.jgit.commands.RebaseCommand.run(RebaseCommand.java:114)
   at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:72)
   at org.netbeans.libs.git.GitClient.rebase(GitClient.java:876)
   at org.netbeans.modules.git.client.GitClient$39.call(GitClient.java:612)
Comment 1 markiewb 2013-07-25 21:16:09 UTC
Created attachment 137824 [details]
stacktrace
Comment 2 Ondrej Vrabec 2013-07-26 07:35:45 UTC
> Cannot cherry-pick commit '423ed74ec7c27f9fba3cdeb8899b63f7c8e3f4e5' because it > has 0 parents, only commits with exactly one parent are supported.
weird, isn't it? What can you tell me about this commit? Is it one of the commits you tried to rebase? Is it true it has no parents???
Comment 3 markiewb 2013-07-29 22:58:29 UTC
(In reply to comment #2)
> > Cannot cherry-pick commit '423ed74ec7c27f9fba3cdeb8899b63f7c8e3f4e5' because it > has 0 parents, only commits with exactly one parent are supported.
> weird, isn't it? What can you tell me about this commit? Is it one of the
> commits you tried to rebase? Is it true it has no parents???

IIRC my steps were the following
* create a local git repo, check in some files
* create a remote repo at github
* pull in the remote repo as origin into the local git repo (using the "pull..." action) -> netbeans asks to merge/rebase -> chose rebase
Comment 4 Ondrej Vrabec 2013-07-30 07:32:23 UTC
> * create a remote repo at github
Does it mean the remote repository was empty? Contained no commit yet?
Comment 5 Ondrej Vrabec 2013-07-30 10:02:12 UTC
I was able to reproduce but only if the remote repository was not empty (already contained a commit). BTW the exception seems to be thrown no more in JGit: http://git.eclipse.org/c/jgit/jgit.git/commit/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java?id=3ad454497cdb6a917c00b01c735f5a469b8fb2ff so this should get fixed when we upgrade JGit to 3.x
Comment 6 markiewb 2013-07-30 18:57:50 UTC
(In reply to comment #5)
> I was able to reproduce but only if the remote repository was not empty
> (already contained a commit). 

You are right. There must have been a remote commit. (readme.md was there by default)
Comment 7 Istoniz 2013-09-28 04:21:44 UTC
Created attachment 140600 [details]
stacktrace

stop working after rebase git action
Comment 8 Ondrej Vrabec 2013-10-18 13:58:28 UTC
upgraded JGit to 3.1.0 => should be fixed i guess.