Sean Whitton writes ("Re: Bug#886969: Problems with export-dsc and push-source on arbitrary refs"): > On Fri, Jun 22 2018, Ian Jackson wrote: > > So I think for push-source: > > > > 886966 push-source should be usable on arbitrary refs 886625 > > push-source should be usable no matter the state of the working tree > > > > These should work iff there would be no need to make any new commits. > > When pushing or exporting a non-HEAD ref, the working tree state > > should be ignored. > > Additionally, the implementation should never look at the working tree. > > It just has a safety check that if the ref supplied points at the same > commit that HEAD points at, and [if] the working tree is dirty, > --ignore-dirty is needed to continue.
Yes. > > If new commits are to be made (where in a dgit view or otherwise), the > > user should check out the branch to be pushed. > > Right. It can prompt them to check it out. Exactly. The user will then be less surprised when it makes commits. > > For export-dsc: > > > > 886969 Replace 'build-source' with 'export-dsc' > > > > We have a worse problem. What about split brain mode ? There is > > nowhere to put the dgit view branch. This is less of a problem with > > build-source because build-source is part of an upload workflow and > > the dgit view will be reconstructed (probably, fished out of the > > cache) during the subsequent push. > > I have not at any point looked into how split brain mode works in any > detail. In particular, I don't know why the dgit view has to be stored, > aside from performance reasons. The dgit view needs to be, err, "stored", by push, by sending it to the remote git server. (And therefore locally in the relevant tracking ref.) As for build, the only reason it needs to be stored is the performance reasons you allude to - which is why it's just in a cache. export-dsc has no push and that makes the whole split brain mode seem rather odd. > > I am somewhat tempted to say that export-dsc should be forbidden with > > split brain quilt modes. > > Indeed, it makes less sense. If you are in --gbp mode, for example, you > probably want to use gbp to produce source packages, not dgit. > > I think we can safely defer this and have the first version of > export-dsc work with only non-split brain, just like dgit pull. Right. Good luck! Ian. -- Ian Jackson <ijack...@chiark.greenend.org.uk> These opinions are my own. If I emailed you from an address @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.