diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java index c356e184a4..953a5e02d5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java @@ -83,6 +83,8 @@ class Checkout extends TextBuiltin { try { String oldBranch = db.getBranch(); Ref ref = command.call(); + if (ref == null) + return; if (Repository.shortenRefName(ref.getName()).equals(oldBranch)) { outw.println(MessageFormat.format( CLIText.get().alreadyOnBranch, |