Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Missing refs/notes/review in new repository on Gerrit causes fetch to fail

On Tue, Dec 20, 2011 at 00:11, Sascha Scholz <sascha.scholz@xxxxxxxxx> wrote:
> I'm currently working on a better integration of Gerrit with Egit.
> When cloning a Git repository from Gerrit we'd like to add a fetch
> spec for the review notes. However, for new repositories
> refs/notes/review doesn't exist yet, which causes a fetch to fail. We
> could ignore this error in EGit, but the command line Git shows the
> same behavior if there's such a fetch spec.
>
> What could we do to work around the issue?

EGit should look at the the advertised references to see if
refs/notes/review exists before it starts to fetch. If it doesn't,
don't ask for it. Maybe it makes senes to add an "ignore missing"
option to the JGit RefSpec object type so that EGit can tell JGit its
OK if a refs/notes/review reference isn't available for fetch. C Git
maybe should learn a syntax like that too, maybe "fetch =
?refs/notes/review:refs/notes/review". I would push this upstream with
both C Git and JGit projects and see if we can find a way to make
these sorts of fetch specifications non-fatal.

Another option is to fetch refs/notes/*:refs/notes/* instead of just
the review branch.

> 2. If Gerrit makes sure that refs/notes/review always exists, no
> special handling will be required on the client side. Would that be
> feasible?

I prefer having Gerrit wait to make the review notes branch on the
first change submission.


Back to the top