问题标签 [rugged]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby - 坚固的已安装,但捆绑器无法安装
我正在尝试安装 Gitorious,我想安装 Gitorious 所需的 gem。我目前正在运行 ruby 2.0.0 patchlevel 247(我能得到的最新更新。)和 rubygems 版本 2.0.3。我也在一个共享的 Dreamhost 共享平台上使用这个 wiki 页面http://wiki.dreamhost.com/Gitorious虽然它有点过时了,但我仍然让它工作。当我运行gem install rugged -v '0.19.0'
它返回
Building native extensions. This could take a while...
Successfully installed rugged-0.19.0
unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/alternate/objects/14/6ae76773c91e3b1d00cf7a338ec55ae58297e2, skipping
unable to convert "\xAD" from ASCII-8BIT to UTF-8 for test/fixtures/alternate/objects/14/9c32d47e99d0a3572ff1e70a2e0051bbf347a9, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for test/fixtures/alternate/objects/14/fb3108588f9421bf764041e5e3ac305eb6277f, skipping
unable to convert "\xE5" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/index, skipping
unable to convert "\x8C" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/0c/37a5391bbff43c37f0d0371823a5509eed5b1d, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/13/85f264afb75a56a5bec74243be9b367ba4ca08, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/18/1037049a54a1eb5fab404658a3a250b44335d7, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/18/10dff58d8a660512d4832e740f692884338ccd, skipping
unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/2d/2eff63372b08adf0a9eb84109ccf7d19e2f3a2, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/36/060c58702ed4c2a40832c51758d5344201d89a, skipping
unable to convert "\xA5" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/44/1034f860c1d5d90e4188d11ae0d325176869a8, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/45/b983be36b73c0788dc9cbcb76cbb80fc7bb057, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/4a/202b346bb0fb0db7eff3cffeb3c70babbd2045, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/5b/5b025afb0b4c913b4c338a42934a3863bf3644, skipping
unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/60/d415052a33de2150bf68757f6461df4f563ae4, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/61/9f9935957e010c419cb9d15621916ddfcc0b96, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/68/8a8f4ef7496901d15322972f96e212a9e466cc, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/75/057dd4114e74cca1d750d0aee1647c903cb60a, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/77/71329dfa3002caf8c61a0ceb62a31d09023f37, skipping
unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/81/4889a078c031f61ed08ab5fa863aea9314344d, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/84/96071c1b46c854b31185ea97743be6a8774479, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/94/eca2de348d5f672faf56b0decafa5937e3235e, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/9b/7384fe1676186192842f5d3e129457b62db9e3, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/9f/d738e8f7967c078dceed8190330fc8648ee56a, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/a4/a7dce85cf63874e984719f4fdd239f5145052f, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/a7/1586c1dfe8a71c6cbf6c129f404c5642ff31bd, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/a8/233120f6ad708f843d861ce2b7228ec4e3dec6, skipping
unable to convert "\xA5" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/b7/4713326bc972cc15751ed504dca6f6f3b91f7a, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/be/3563ae3f795b2b4353bcce3a527ad0a4f7f644, skipping
unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/c4/7800c7266a2be04c571c04d5a6614691ea99bd, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/c4/dc1555e4d4fa0e0c9c3fc46734c7c35b3ce90b, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391, skipping
unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/f6/0079018b664e4e79329a7ef9559c8d9e0378d1, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/fa/49b077972391ad58037050f2a75f74e3671e92, skipping
unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/fd/093bff70906175335656e6ce6ae05783708765, skipping
unable to convert "\xF0" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/08/8b64704e0d6b8bd061dea879418cb5442a3fbf, skipping
unable to convert "\xB2" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/13/a5e939bca25940c069fd2169d993dba328e30b, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/19/bf568e59e3a0b363cafb4106226e62d4a4c41c, skipping
unable to convert "\xBF" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/58/1fadd35b4cf320d102a152f918729011604773, skipping
unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/5c/87b6791e8b13da658a14d1ef7e09b5dc3bac8c, skipping
unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/6f/e5f5398af85fb3de8a6aba0339b6d3bfa26a27, skipping
unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/7f/ccd75616ec188b8f1b23d67506a334cc34a49d, skipping
unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/80/6999882bf91d24241e4077906b9017605eb1f3, skipping
unable to convert "\xB2" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/83/7d176303c5005505ec1e4a30231c40930c0230, skipping
unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/a8/595ccca04f40818ae0155c8f9c77a230e597b6, skipping
unable to convert "\xF0" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/cf/8f1cf5cce859c438d6cc067284cb5e161206e7, skipping
unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/d5/278d05c8607ec420bfee4cf219fbc0eeebfd6a, skipping
unable to convert "\xB2" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/f4/e16fb76536591a41454194058d048d8e4dd2e9, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/f9/e65619d93fdf2673882e0a261c5e93b1a84006, skipping
1 gem installed
当我bundle install
在克隆主线 repo 后运行时,它返回 `Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension。
/home/harborcn/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/shellwords.rb:73:in 'shellsplit': 未定义方法'scan' for true:TrueClass (NoMethodError) from /home/harborcn/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:2409:in '' 来自 /home/harborcn/.rvm/rubies/ruby-2.0。 0-p247/lib/ruby/2.0.0/mkmf.rb:47:in '' 来自 /home/harborcn/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/ rubygems/core_ext/kernel_require.rb:45:in 'require' from /home/harborcn/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb :45:in 'require' 来自 extconf.rb:1:in ''
Gem 文件将继续安装在 /home/harborcn/.rvm/gems/ruby-2.0.0-p247/bundler/gems/rugged-76f3382f7eb0 以供检查。结果记录到 /home/harborcn/.rvm/gems/ruby-2.0.0-p247/bundler/gems/rugged-76f3382f7eb0/ext/rugged/gem_make.out 安装加固型 (0.19.0) 和 Bundler 时出错无法继续。在捆绑之前确保 gem install rough -v '0.19.0' 成功。`
我该如何解决?谢谢!
ruby - 创建新标签
只是想知道是否可以使用 Rugged 创建新的 GIT 标签。如果是这样,一个例子将不胜感激。
我基本上只是想在提交 oid 上创建/移动/删除标签。
libgit2 - 如何从补丁创建差异对象?
我在数据库中有 git 补丁。如何将其转换为 diff 对象?在这里https://github.com/libgit2/rugged#diffs我可以从差异中获取补丁,diff.patch
我想进行相反的操作。
git - 坚固耐用,相当于“git ls-tree”
在一个裸存储库中,我可以键入$ git ls-tree -r master
. (这与我可以使用命令在非裸仓库中获得的东西是一样的git ls-files
)
获取 git 存储库中文件及其 sha refs 的完整列表。
使用 Rugged,我如何获取特定分支或主控中的文件列表?
git - Rugged::Repository #status 在使用 Rugged 将文件添加到索引时报告清除状态
我正在尝试使用 Rugged::Index #add 将新文件添加到索引中。它似乎已成功添加到索引中,但为给定文件清除了关联的 Rugged::Repository #status。
显示我尝试添加文件“TEST_JJV_IRB1”的示例 IRB 会话
Rugged::Repository #status 正确报告了新创建的文件“TEST_JJV_IRB1”
并且正确地未包含在 Rugged::Index 中
在这里,我尝试将新文件添加到索引中。
正在添加的文件“TEST_JJV_IRB1”现在已正确包含在索引中。
但它的状态报告为 Rugged::Repository #status 已清除
我希望 Rugged::Repository #status 报告 [:index_new]
奇怪的是git status
,从命令行发出的新文件“TEST_JJV_IRB1”显示为“要提交的更改:”
ruby - “git 分支——合并“通过坚固的 libgit2 绑定?
有没有办法获得与原生 git 命令相同的信息
通过 Ruby 的Rugged libgit2 绑定?
ruby - 是否有使用 Rugged 将所有内容添加到 Git 的特定协议?
我最近开始使用 Rugged,并且已经遇到了一些问题。基本上我想做的就是在 Git 存储库中添加所有内容,提交分阶段的更改,然后将所有内容推送到分支。我从第一步开始,如下所示:
但控制台最终对我尖叫。我浏览了 libgit2 的文档,找不到任何在 repo 中添加所有内容的示例。一些彻底的谷歌搜索产生了类似的结果。我可能只是将 a@repo.workdir.entries
作为 的path
参数插入index.add
,但我不确定。有没有更好的方法来解决这个问题?
ruby - 使用 Rugged/libgit2 创建提交时如何更新工作目录?
我正在尝试使用以下测试脚本创建一个坚固的提交:
创建提交,并且脚本输出773d97f453a6df6e8bb5099dc0b3fc8aba5ebaa7
(新提交的 SHA)。生成的提交和树看起来应该是:
但是,工作目录没有更新:
我必须做一个git reset --hard HEAD
让丢失的文件test.md
显示在工作目录中。我认为创建 Rugged 提交和设置:update_ref => "HEAD"
应该会自动更新工作目录,但肯定有问题,因为这样做r.checkout_head
也没有效果。但是,我认为我正确地遵循了坚固的示例。我在这里想念什么?
编辑: