69 questions
0
votes
1
answer
54
views
Rails Rugged::Repository returning an empty repository
def serve_git_repo(temp_dir)
repo = Rugged::Repository.new(temp_dir)
response.headers["Vary"] = "Accept"
response.headers["Connection"] = "keep-alive&...
0
votes
1
answer
410
views
How To Invoke Rugged Check_connection Via ssh?
Below is a Ruby program that is supposed to verify a connection with my GitHub repos, private and public.
The ssh key is the correct one, and it has no passphrase. However, ssh is apparently not used, ...
2
votes
1
answer
58
views
Rugged::Tree from the workdir?
I need to commit the current state of the workdir (i.e. the files and their content as stored on the filesystem) into a non-checked out branch. It is important that this is done in a stateless way ...
0
votes
1
answer
58
views
Rugged can't cherry pick
I'm trying to use rugged (ruby) to cherry pick a commit on a branch like this:
repo.fetch('origin', ['origin/stable/branch_name'],credentials: rugged_credentials)
repo.reset('origin/stable/branch_name'...
1
vote
1
answer
760
views
rugged gem failing to build native extension
OS: Ubuntu 18.04
GCC version: gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
JRuby version: 9.2.8.0
Ruby version: 2.5.3
Issue origin: Trying to install pronto gem (version 0.11.0)
While running ...
0
votes
0
answers
321
views
How to fix 'Makefile:257: recipe for target 'rugged.so' failed' (rugged)
I'm trying to install pronto gem and one of its dependency (rugged) is failing to build.
So, trying to run gem install rugged gives me such output https://pastebin.com/m6v2RgQt
I've checked that I ...
2
votes
1
answer
208
views
Implement git branch --contains with rugged library
I'm working with a ruby script that execute the following git command on a given git repository.
branches = `git branch -a --contains #{tag_name}`
This approach has some drawbacks with command ...
9
votes
4
answers
3k
views
Do GitHub and GitLab support git clone's --filter parameter?
I want to use git's partialClone feature. In this answer I saw the git clone --filter=tree:none <repo> command.
But when trying to execute on github, the prompt warning: filtering not ...
1
vote
2
answers
674
views
How to lookup commit by tag/ref using the Rugged (libgit2) Ruby gem?
I'm using Rugged, the libgit2 binding for Ruby. I have seen that you can call the Repository#lookup method to get the object at a given SHA hash in a git repository.
The thing is, I don't know the ...
1
vote
0
answers
331
views
How to get a git repository's default branch in Ruby's "rugged" gem?
Related to git - how to get default branch?
I'm trying to port a Bash script to Ruby. The script uses git symbolic-ref --short HEAD to get a repo's default branch.
Is there a way to combine rugged'...
3
votes
1
answer
331
views
How to pull git repository using Rugged ruby gem
How do I pull changes from remote repo using Rugged ruby gem. Most of question on this topic are outdated as api has changed. I am using a simple repo with nothing complex. I found below code on one ...
2
votes
1
answer
221
views
Is there a 'git cherry' in libgit2
I'm working on a project and one of the requirements is the need to call git cherry command to get some differences between on branch and the other - (note this is not git cherry-pick).
I was ...
1
vote
1
answer
347
views
How do I apply a diff or patch file?
when using the rugged git library how can I apply that diff to my dest branch as a commit?.
# @param src [Rugged::Object] - the rugged object or string to compare from
# @param dst [Rugged::...
2
votes
2
answers
217
views
How to select the appropriate diff /patch for a commit with rugged
I try to get the commits that have been done after a date in a local copy of a git repo and then extract the related modifications on the files.
If I would like to compare this to a git command, It ...
0
votes
2
answers
170
views
Removing a tree and committing with Rugged
I'm trying to remove an array of directories in a git repo and make 1 commit for each directory removed. I'm using Rugged and Gitlab_git (which is more or less just a wrapper around Rugged) and so far ...