"object not found - no match for id" in pre-receive hook
还没有人认领这个 Issue。
评估
调研方向
在 pre-receive hook 中复现该查找,并按照 issue 中的描述与 update hook 进行比较,包括 git show <new_hash>。追踪为什么 Rugged 无法解析接收到的 commit,而 Git 可以;完成标准是解释清楚其中的差异,并确定所需的 fix 或文档。
由索引模型根据 Issue 内容生成。
描述
If I try to lookup the new commit hash from a pre-receive hook, I am getting the following error
object not found - no match for id
The lookup works correctly, when executed from the update hook.
But If I execute git show <new_hash> from the pre-receive hook, it is showing the diff.
I believe the following difference in the documentation for pre-commit and update hooksexplains why it is unavailable inpre-commit` hook.
pre-commit: Just before starting to update refs on the remote repository, the pre-receive hook is invoked.
update: Just before updating the ref on the remote repository, the update hook is invoked.
But still, why can't rugged access the received commit, even though the git executable is able to do it?
- 主要语言
- C
- 星标
- 2.3k
- 派生
- 293
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
libgit2/rugged 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 48/100
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 60/100
-
Nmap
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
flang:fir-hlfir
难度 2/5 1-3 小时 新手友好度 70/100
llvm/llvm-project#225935 ·