Close the submodule repository when fetch fails during update

オープン 初心者向け
#327 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
77/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, java
領域
backend, devtools

調査の方向性

引用された行にある SubmoduleUpdateCommand.java から始め、条件付き fetch の前後で更新ヘルパーがリポジトリをどう扱うかを追ってください。既存のサブモジュール更新テストを確認し、ローカルの fetch スタブとリポジトリが閉じられたことの検証を探してください。fetch の失敗が引き続き伝播し、その更新のために取得したリポジトリが閉じられれば完了です。

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

説明

Version reviewed: org.eclipse.jgit 7.8.1.202611041320-r

In a unit check on macOS 26.6.2 with OpenJDK 21.0.12.1, the submodule walk supplied an existing recording Repository and the fetch operation reported a TransportException. The public update call propagated that exception. The repository received no close call. The test used a local fetch stub.

SubmoduleUpdateCommand opens an existing or restored submodule repository and conditionally fetches before returning it to its caller. If fetch fails, the caller's try-with-resources statement never receives that repository, so its matching close is skipped.

Retain responsibility for the repository until the helper returns it successfully. A failed fetch should release the reference acquired for that update.

https://github.com/eclipse-jgit/jgit/blob/2784b2cb0164726a2923848dc9c8087925d51b97/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java#L161-L205

The result above was checked locally against the cited release. This report was drafted with AI assistance.

主要言語
Java
スター
427
フォーク
116
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

eclipse-jgit/jgit のほかの issue

eclipse-jgit/jgit の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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