Examples of GitRepositoryException


Examples of com.github.koraktor.mavanagaiata.git.GitRepositoryException

            this.commitCache.put(id, commit);

            return commit;
        } catch (IncorrectObjectTypeException e) {
            throw new GitRepositoryException(
                    String.format("Object \"%s\" is not a commit.", id.getName()),
                    e);
        } catch (MissingObjectException e) {
            throw new GitRepositoryException(
                    String.format("Commit \"%s\" is missing.", id.getName()),
                    e);
        } catch (IOException e) {
            throw new GitRepositoryException(
                    String.format("Commit \"%s\" could not be loaded.", id.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.github.koraktor.mavanagaiata.git.GitRepositoryException

    protected ObjectId getHeadObject() throws GitRepositoryException {
        if (this.headObject == null) {
            try {
                this.headObject = this.repository.resolve(this.headRef);
            } catch (AmbiguousObjectException e) {
                throw new GitRepositoryException(
                    String.format("Ref \"%s\" is ambiguous.", this.headRef),
                    e);
            } catch (IOException e) {
                throw new GitRepositoryException(
                    String.format("Ref \"%s\" could not be resolved.", this.headRef),
                    e);
            }
        }

        if (this.headObject == null) {
            if (this.headRef.equals("HEAD")) {
                throw new GitRepositoryException(
                    "HEAD could not be resolved. You're probably on an unborn branch.");
            }
            throw new GitRepositoryException(
                String.format("Ref \"%s\" is invalid.", this.headRef));
        }

        return this.headObject;
    }
View Full Code Here

Examples of com.github.koraktor.mavanagaiata.git.GitRepositoryException

                } catch(IncorrectObjectTypeException e) {
                    continue;
                }
            }
        } catch (MissingObjectException e) {
            throw new GitRepositoryException("The tags could not be resolved.", e);
        } catch (IOException e) {
            throw new GitRepositoryException("The tags could not be resolved.", e);
        }

        return tags;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.