aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
index ef32ac929a..ee9b7fcf72 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
@@ -206,7 +206,7 @@ public class StashCreateCommand extends GitCommand<RevCommit> {
String refLogMessage) throws IOException {
if (ref == null)
return;
- Ref currentRef = repo.getRef(ref);
+ Ref currentRef = repo.findRef(ref);
RefUpdate refUpdate = repo.updateRef(ref);
refUpdate.setNewObjectId(commitId);
refUpdate.setRefLogIdent(refLogIdent);
@@ -220,7 +220,7 @@ public class StashCreateCommand extends GitCommand<RevCommit> {
private Ref getHead() throws GitAPIException {
try {
- Ref head = repo.getRef(Constants.HEAD);
+ Ref head = repo.exactRef(Constants.HEAD);
if (head == null || head.getObjectId() == null)
throw new NoHeadException(JGitText.get().headRequiredToStash);
return head;