Community
Participate
Working Groups
When using egit some hints from jgit are not visible to the user. Example output from stdout: "LFS built-in hook conflicts with existing pre-push hook in repository [RepositoryHandle:Repository[C:\ .... \.git]]. Either remove the pre-push hook or disable built-in LFS support. org.eclipse.jgit.hooks.Hooks.prePush(org.eclipse.jgit.lib.Repository, java.io.PrintStream) line: 135 org.eclipse.jgit.transport.TransportGitSsh(org.eclipse.jgit.transport.Transport).<init>(org.eclipse.jgit.lib.Repository, org.eclipse.jgit.transport.URIish) line: 808 org.eclipse.jgit.transport.TransportGitSsh(org.eclipse.jgit.transport.TcpTransport).<init>(org.eclipse.jgit.lib.Repository, org.eclipse.jgit.transport.URIish) line: 34 org.eclipse.jgit.transport.TransportGitSsh(org.eclipse.jgit.transport.SshTransport).<init>(org.eclipse.jgit.lib.Repository, org.eclipse.jgit.transport.URIish) line: 47 org.eclipse.jgit.transport.TransportGitSsh.<init>(org.eclipse.jgit.lib.Repository, org.eclipse.jgit.transport.URIish) line: 116 org.eclipse.jgit.transport.TransportGitSsh$1.open(org.eclipse.jgit.transport.URIish, org.eclipse.jgit.lib.Repository, java.lang.String) line: 106 org.eclipse.jgit.transport.Transport.open(org.eclipse.jgit.lib.Repository, org.eclipse.jgit.transport.URIish, java.lang.String) line: 520 org.eclipse.jgit.transport.Transport.open(org.eclipse.jgit.lib.Repository, java.lang.String, org.eclipse.jgit.transport.Transport$Operation) line: 273 org.eclipse.jgit.transport.Transport.open(org.eclipse.jgit.lib.Repository, java.lang.String) line: 243 org.eclipse.jgit.api.LsRemoteCommand.execute() line: 158 org.eclipse.jgit.api.LsRemoteCommand.call() line: 131 org.eclipse.egit.core.op.ListRemoteOperation.run(org.eclipse.core.runtime.IProgressMonitor) line: 116 org.eclipse.egit.ui.internal.components.AsynchronousBranchList(org.eclipse.egit.ui.internal.components.AsynchronousListOperation<T>).run(org.eclipse.core.runtime.IProgressMonitor) line: 76 org.eclipse.egit.ui.internal.dialogs.CancelableFuture$1.run(org.eclipse.core.runtime.IProgressMonitor) line: 280 org.eclipse.core.internal.jobs.Worker.run() line: 63 If such messages are meant to be seen by the user they should be logged to error log view. Specific to this warning: What is suggested? "remove the pre-push hook" or "disable built-in LFS support"? And what happens if i don't? And why does the user need to care when it still works with both?
Eclipse platform still has no unified approach to pipe logs from slf4j and other logging frameworks to the OSGi log. Two things I find strange here: * Does it really log to stdout as in System.out? It should use the logger. * Is this a stack trace? Why does LsRemoteCommand even look for the prePush hook?
I guess it's stdout, because i see that message in the console output when i run eclipse in debug. The stacktrace is manually taken from a method breakpoint where that message string was found. The debugger shows outputStream = null at that breakpoint.
Indeed. 2 problems here in JGit, and one follow-up then in EGit: 1. Hook output streams are broken anyway in JGit: bug 549246. 2. That prePush hook is loaded way too early, so it gets loaded even for fetches. 3. Once (1) is corrected, EGit should see that streams for hooks are set correctly so that the result can be presented to the user somehow (log, or dialog, or whatever). See bug 553471.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/196467
(In reply to Jörg Kubitz from comment #0) > Example output from stdout: > "LFS built-in hook conflicts with existing pre-push hook in repository > [RepositoryHandle:Repository[C:\ .... \.git]]. Either remove the pre-push > hook or disable built-in LFS support. > Specific to this warning: What is suggested? "remove the pre-push hook" or > "disable built-in LFS support"? And what happens if i don't? And why does > the user need to care when it still works with both? The built-in LFS pre-push hook will be used. Which should not be a problem if the external pre-push hook is also an LFS hook. But if it is some other hook and isn't called, it might be a problem. It's up to the user to decide what to do.
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/196467 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=0c3d009cad131956891ee5892a5a0abfa6d5959b