Use case-insensitive matching for Git error message "Not a valid object name"

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

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

  • #3310 @mdferdousalam による — マージされずにクローズ

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
tooling

調査の方向性

preview/git.js の "Not a valid object name" に対する大文字と小文字を区別する 2 つのチェック、stderrBuffer.includes(...) と err.message.includes(...) から始めます。そこで Git エラーがどのように処理されているかを確認し、両方の大文字・小文字が認識されるようにマッチングを更新して、preview の Git エラーパスで引き続きメッセージが検出されることを検証します。

索引モデルが issue の本文から書いたものです。

説明

Summary

Git is changing the capitalization of its fatal: Not a valid object name error message to lowercase (fatal: not a valid object name) to follow Git's CodingGuidelines, which state that error messages should begin with a lowercase letter.

This change is under review on the Git mailing list:
https://lore.kernel.org/git/[email protected]

Problem

This repo currently uses case-sensitive string matching to detect this Git error, which will break when Git ships the updated message.

Affected files
  • preview/git.js — `stderrBuffer.includes("Not a valid object name")` and `err.message.includes("Not a valid object name")`

Suggested fix

Use case-insensitive comparison, for example:
```javascript
stderrBuffer.toLowerCase().includes("not a valid object name")
```

This will work with both the current and future Git versions.

Timeline

The Git change is currently under review and will likely be included in a future Git release. Fixing the matching now ensures forward compatibility.

主要言語
Ruby
スター
264
フォーク
347
平均マージ
3日 21時間
マージ済み PR(30日)
3

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

elastic/docs のほかの issue

elastic/docs の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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