Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

"object not found - no match for id" in pre-receive hook

オープン
#844 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
git, ruby
領域
devtools

調査の方向性

issue に記載されているとおり、pre-receive hook で lookup を再現し、git show <new_hash> も含めて update hook と比較する。Git では解決できるのに Rugged では受信した commit を解決できない理由を追跡する。差異を説明し、必要な 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 はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

libgit2/rugged のほかの issue

libgit2/rugged の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。