• Jérome Perrin's avatar
    fix: prune remotes before fetching · 65c2a233
    Jérome Perrin authored
    in a scenario like this:
      - remote upstream has a branch named "beremiz"
      - we fetch all refs from remote upstream
      - branch "beremiz" is deleted from remote upstream
      - a new branch "beremiz/materia-theme" is created on remote upstream
    
    We have endless errors:
    
      Fetching upstream
      error: cannot lock ref 'refs/remotes/upstream/beremiz/materia-theme': 'refs/remotes/upstream/beremiz' exists; cannot create 'refs/remotes/upstream/beremiz/materia-theme'
      From https://lab.nexedi.com/nexedi/slapos
       ! [new branch]          beremiz/materia-theme -> upstream/beremiz/materia-theme  (unable to update local ref)
      error: some local refs could not be updated; try running
       'git remote prune upstream' to remove any old, conflicting branches
      error: could not fetch upstream
    65c2a233
autogitmerge.mjs 3.03 KB