Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Using EGit to Push to Gerrit


Shawn O. Pearce wrote:
Chris Aniszczyk <zx@xxxxxxxxxxxxxxxxx> wrote:
Has anyone successfully used EGit to push to Gerrit?
I'm getting an evil error message... not sure how to debug yet :)

However, I'm getting a kick out of self hosting.

My guess?  EGit is actually behaving like this on the command line:

  git push URL refs/heads/releng-experiment:refs/heads/refs/for/master

Yep, from the quick look at jgit's Transport class it looks like findRemoteRefUpdatesFor() method may be found guilty. There is a dumb rule - prefix destination ref with "refs/heads/" if only source ref starts with that prefix and destination does not (it was discussed for a while if I recall correctly). Which has just happened in that case.

C Git must handle that kind of DWIMery smarter...and more complex. AFAIR C Git's refspecs expansion code, I am scarred to have a look at it - even just to compare to stay compatible...

But I can't be sure.  We'd have to throw logging or a break point
into PushProcess and see what the RefSpec was that was actually
fed into the process.

Actually, RefSpec is ok, but RefSpec to RemoteRefUpdate conversion fails. Anyway, logging is obviously a good idea, but is there some logging mechanism at jgit's level already?


Back to the top