git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Cannot push anything via export transport helper after push fails.

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 12, 2014, 21:24 UTC
Message-ID
<5349aefe85652_285f9032ec14@nysa.notmuch>
In-Reply-To
<20130516213856.2deba50d@opensuse.site>
Andrey Borzenkov wrote:
Show 43 quoted lines
> В Sat, 11 May 2013 08:57:14 -0500
> Felipe Contreras <felipe.contreras@gmail.com> пишет:
> 
> > On Sat, May 11, 2013 at 7:29 AM, Andrey Borzenkov <arvidjaar@gmail.com> wrote:
> > > I noticed that using git-remote-bzr, but as far as I can tell this is
> > > generic for all transport helpers using fast-export.
> > >
> > >
> > >
> > > What happened was "git push" failed due to merge conflict. So far so
> > > good - but from now on git assumes everything is up to date.
> > >
> > > bor@opensuse:/tmp/test/git> git push origin master
> > > To bzr::bzr+ssh://bor@localhost/tmp/test/bzr
> > >  ! [rejected]        master -> master (non-fast-forward)
> > > error: failed to push some refs to 'bzr::bzr+ssh://bor@localhost/tmp/test/bzr'
> > > hint: Updates were rejected because the tip of your current branch is behind
> > > hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
> > > hint: before pushing again.
> > > hint: See the 'Note about fast-forwards' in 'git push --help' for details.
> > > bor@opensuse:/tmp/test/git> git push origin master
> > > Everything up-to-date
> > > bor@opensuse:/tmp/test/git>
> > >
> > > The problem seems to be that git fast-export updates marks
> > > unconditionally, whether export actually applied or not. So next time
> > > it assumes everything is already exported and does nothing.
> > >
> > > Is it expected behavior?
> > 
> > Indeed, this is the way it currently works, and it's not easy to fix.
> > We would need some way to make fast-export wait until we know the exit
> > status of the remote helper, and then tell it when it failed, so the
> > marks are not updated.
> > 
> 
> Hmm ... actually as far as I understand transport-helper keeps track of
> which revisions to push in "remote helper ref" (for the lack of better
> word). This makes use of marks as tracking means rather redundant.
> 
> What about the idea below? This relies on transport helper to provide
> correct revisions and uses marks exclusively as cross-reference between
> GIT and remote SCM. It is on top of next branch.

This is one way of using it, but not ideal, and I think the patch series I sent should work for all remote helpers.

-- 
Felipe Contreras
Previous: Andrey BorzenkovNext: Felipe Contreras
Message 8 of 9 in “Cannot push anything via export transport helper after push fails.”
  1. Andrey BorzenkovMay 11, 2013
  2. John KeepingMay 11, 2013
  3. Andrey BorzenkovMay 11, 2013
  4. Felipe ContrerasMay 11, 2013
  5. Andrey BorzenkovMay 11, 2013
  6. Felipe ContrerasMay 11, 2013
  7. Andrey BorzenkovMay 16, 2013
  8. Felipe ContrerasApr 12, 2014
  9. Felipe ContrerasApr 12, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.