rugged

how can i use rugged to create and commit a file like from the command line?

这一生的挚爱 提交于 2020-01-13 05:56:29
问题 i'm trying to use rugged to do something pretty simple: create and commit a file, leaving the repository in the same state as doing: git init echo "blah blah blah" > blah.txt git add blah.txt git commit -m "write blah.txt" which leaves git status printing On branch master nothing to commit, working directory clean i'm using code adapted from the rugged repo's readme, which boils down to: name = "blah.txt" repo = Rugged::Repository.init_at dir File.open File.join(dir, name), 'w' do |f| f.write

Do GitHub and GitLab support git clone's --filter parameter?

早过忘川 提交于 2019-12-23 21:33:15
问题 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 recognized by server, ignoring . It did not work. I want to know if it is not supported by the GitHub website, or if there is a problem with my settings. I asked the feedback staff of GitHub and have not got the answer from the technician. 回答1: This almost certainly isn't supported by GitHub or GitLab yet. The -

How to update the working directory when creating a commit with Rugged/libgit2?

不打扰是莪最后的温柔 提交于 2019-12-13 16:22:32
问题 I'm trying to create a commit with rugged using the following test script: require "rugged" r = Rugged::Repository.new(".") index = r.index index.read_tree(r.references["refs/heads/master"].target.tree) blob = r.write("My test", :blob) index.add(:oid => blob, :path => "test.md", :mode => 0100644) tree = index.write_tree parents = [r.references["refs/heads/master"].target].compact actor = {:name => "Actor", :email => "actor@bla"} options = { :tree => tree, :parents => parents, :committer =>

研华科技发布可耐85℃高温的32GB大容量内存条

半世苍凉 提交于 2019-12-12 13:45:35
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Intel最近为Z390平台开放了单条32GB内存条的支持,不过这种大容量条子在游戏市场上还很稀少,而在服务器、高性能计算领域就比较丰富了。台湾研华科技(Adantech)今天就发布了全线32GB内存。 研华SQRAM系列的32GB内存提供了多种类型,包括 笔记本上的SO-DIMM、服务器上的UDIMM、支持校验纠错的ECC DIMM,以及高强度的Rugged DIMM,可以在从-40℃到85℃的温度范围内正常工作 ,适用于网络、军事等同时需要高性能、高可靠性的环境。 这批内存都采用了 三星16Gb DDR4内存颗粒 ,标准工作频率2666MHz,并有工业级的散热片辅助降温(但官方宣传图是裸条),以及免费的SQRAM Manager监控软件,内存温度超过65℃就会触发报警。 此外,SQRAM系列内存还通过了7项拷机测试,可靠性、稳定性都符合工业级标准。 来源: oschina 链接: https://my.oschina.net/u/3585265/blog/3023769

Getting Rugged::NetworkError on #connect

我与影子孤独终老i 提交于 2019-12-12 07:29:18
问题 I tried to implement fetch and this exception was raised: Rugged::NetworkError: This transport isn't implemented. Sorry I am able to retrieve a remote instance: remote = Rugged::Remote.lookup(repo, remote_name) remote.connect(:fetch) # => Rugged::NetworkError: This transport isn't implemented. Sorry I retrieved the development version of the gem as directed in the README: gem 'rugged', git: 'git://github.com/libgit2/rugged.git', branch: 'development', submodules: true How do I gain access to

Can't clone repository with Rugged

早过忘川 提交于 2019-12-11 09:26:39
问题 Using openSUSE and Ubuntu with installed dependencies I can't clone the remote repository with Rugged::Repository.clone_at method and getting the error message: Rugged::NetworkError: This transport isn't implemented. Sorry The code: credentials = Rugged::Credentials::SshKey.new(:privatekey=>'path/to/privatekey', :publickey=>'path/to/publickey', :passphrase=>'passphrase') Rugged::Repository.clone_at 'ssh://github.com/vmoravec/repo', 'dir/to/destination', :credentials => credentials My Gemfile

Access git log data using ruby rugged gem?

感情迁移 提交于 2019-12-11 03:46:56
问题 For a given file in a git repo, I'd like to look up the SHA of the last commit in which the file was modified, along with the timestamp. At the command line, this data is visible with git log for a particular file path, e.g. git log -n 1 path/to/file Using the "git" gem for ruby I can also do this: require 'git' g = Git.open("/path/to/repo") modified = g.log(1).object(relative/path/to/file).first.date sha = g.log(1).object(relative/path/to/file).first.sha Which is great, but is running too

comparing 2 commits in rugged

南楼画角 提交于 2019-12-07 14:14:59
问题 I didn't find any documentation on getting the difference between 2 files in rugged. I used the below code to commit a file using rugged @repo=Rugged::Repository.new($reponame) @sha=@repo.write('D:\Ruby\MyGitRepo\file1.txt','blob') puts @sha commit = @repo.lookup(@sha) how can see the difference between the 2 commits of the same object in rugged? 回答1: The way to compare two commits in git relies on a diffing process. brianmario recently wrapped the diffing iterator feature of libgit2 . Beware

comparing 2 commits in rugged

删除回忆录丶 提交于 2019-12-05 18:31:37
I didn't find any documentation on getting the difference between 2 files in rugged. I used the below code to commit a file using rugged @repo=Rugged::Repository.new($reponame) @sha=@repo.write('D:\Ruby\MyGitRepo\file1.txt','blob') puts @sha commit = @repo.lookup(@sha) how can see the difference between the 2 commits of the same object in rugged? The way to compare two commits in git relies on a diffing process. brianmario recently wrapped the diffing iterator feature of libgit2 . Beware that this feature is not merged yet . Below a high level example of its future usage. r = Rugged:

how can i use rugged to create and commit a file like from the command line?

两盒软妹~` 提交于 2019-12-04 18:04:41
i'm trying to use rugged to do something pretty simple: create and commit a file, leaving the repository in the same state as doing: git init echo "blah blah blah" > blah.txt git add blah.txt git commit -m "write blah.txt" which leaves git status printing On branch master nothing to commit, working directory clean i'm using code adapted from the rugged repo's readme , which boils down to: name = "blah.txt" repo = Rugged::Repository.init_at dir File.open File.join(dir, name), 'w' do |f| f.write content end oid = Rugged::Blob.from_workdir repo, name index = repo.index index.add(:path => name,