Comments (8)
Same issue happened here!
from ruby-git.
Same, @alexspeller thanks for the workaround, @schacon fix your cracky stone
from ruby-git.
Same problems here, thanks for workaround
from ruby-git.
Same issue here as well, @alexspeller thanks for the workaround
from ruby-git.
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.
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.
+1 @schacon What's the reasoning behind this? Should we submit a patch?
from ruby-git.
👍 thanks, @robertodecurnex, solution is simple.. or and btw, B-) FIRST! :P
from ruby-git.
Related Issues (20)
- `Status#changed?` is case-sensitive despite git config
- Failing test due to hardcoded `refs/heads/master` in tests/units/test_init.rb@test_git_init HOT 1
- Open git repository from child directory of git repository
- Git::Branch function update_ref doesn't work as expected
- Git::Branch private function parse_name doesn't work as documented
- failure using git built from source HOT 3
- Clarify how to use push with previously cloned repo HOT 1
- Test ticket from Code Climate
- Does this lib support git submodule operation? HOT 4
- Can't use `Git::Lib#remove` with `recursive` or `cached` options
- Checking out branches containing slashes broken since `1.15.0`? HOT 5
- 1.17.0 broke compatibility with ruby <2.7 HOT 5
- Redesign using `git config` with this gem
- Implement a way to mark a public API as deprecated HOT 1
- `cmd can not include a nested array` in 1.14.0 or higher HOT 1
- `remote.origin.fetch` is limited to the default branch HOT 1
- worktree.add corrupts repository index HOT 2
- --allow-empty HOT 3
- mention count argument of .log in README
- Is there a way to clone private repo using github token from specific branch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-git.