Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Push Result

Hi everyone,

I'm trying to push to a repository that is already updated. If I use command-line git a "no fast-forward" error is shown. How can I get this message using Jgit Api? My code looks like this:

        PushCommand pc = GetRepository().push();
        pc.add(GetRepository().getRepository().getBranch());
        pc.setCredentialsProvider(credential);

        for (PushResult r : pc.call()) {
        System.out.println(r.getMessages());
        }

But the method getMessages() is not returning the "no fast-forward" message. In fact it is returning an empty string...

--
Thanks in advance,

Eduardo Falcão

Back to the top