]> source.dussan.org Git - jgit.git/commit
Throw JGit exception when ResetCommand got wrong ref 79/3879/4
authorChristian Halstrick <christian.halstrick@sap.com>
Tue, 16 Aug 2011 13:15:01 +0000 (15:15 +0200)
committerChris Aniszczyk <zx@twitter.com>
Sun, 21 Aug 2011 21:11:00 +0000 (14:11 -0700)
commit930875a81a690f732fb5ac26304d6fb212aa2582
tree1aaff8a6cd9b28c00415303837776dfe219d92ce
parent9952223e0645fd7a8cddc6093a7f449c6390238d
Throw JGit exception when ResetCommand got wrong ref

If the ResetCommand should reset to a invalid ref (e.g. HEAD in a repo
whithout a single commit) it was throwing an NPE. This is fixed now by
throwing a JGitInternalExcpeption. It would be nicer if we could throw
a InvalidRefException, but this would modify our API.

Bug: 339610
Change-Id: Iffcb4f2cca9f702176471d93c3a71e5cb3e700b1
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ResetCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java