Giter VIP home page Giter VIP logo

Comments (8)

leafac avatar leafac commented on June 13, 2024

Same issue happened here!

from ruby-git.

skrat avatar skrat commented on June 13, 2024

Same, @alexspeller thanks for the workaround, @schacon fix your cracky stone

from ruby-git.

Rafe avatar Rafe commented on June 13, 2024

Same problems here, thanks for workaround

from ruby-git.

kenglxn avatar kenglxn commented on June 13, 2024

Same issue here as well, @alexspeller thanks for the workaround

from ruby-git.

jsirex avatar jsirex commented on June 13, 2024

Hi. I've debug this one.
Git does the following:
git fetch origin # problem goes here
git merge -m "Origin pull" master

Look like git requires to explicity provide branch name when fetching.
So I did the following hack. Just include this code in your project:

# Hack
module Git
  class Base
    def pull(remote = 'origin', branch = 'master', message = 'origin pull')
      fetch(remote, branch)
      merge(branch, message)
    end

    def fetch(remote = 'origin', branch = 'master')
      self.lib.fetch(remote, branch)
    end
  end

  class Lib
    def fetch(remote, branch = 'master')
      command('fetch', [remote, branch])
    end
  end
end

An update: it is not clear for me why library transforms git pull into git fetch and git merge. Deciding what is better git pull or git fetch + merge is up to user I think.

from ruby-git.

jsirex avatar jsirex commented on June 13, 2024

It is very odd because yesterday hack above works but today it doesn't work :(
I'm trying to figure out why

Now it works and looks like:

# Hack
module Git
  class Base
    def pull
      self.lib.pull
    end
  end

  class Lib
    def pull
      command('pull')
    end
  end
end

I've decided to use directly pull command

from ruby-git.

strathmeyer avatar strathmeyer commented on June 13, 2024

+1 @schacon What's the reasoning behind this? Should we submit a patch?

from ruby-git.

anapsix avatar anapsix commented on June 13, 2024

👍 thanks, @robertodecurnex, solution is simple.. or and btw, B-) FIRST! :P

from ruby-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.