Disable save of global git config
まだ誰も着手していません。
評価
調査の方向性
The issue points to FileBasedConfig.save and FS$FileStoreAttributes.saveToConfig; begin by tracing how file-store attributes are persisted to the user config and how configuration saving is controlled. Add a way to prevent writes while retaining reads and in-memory changes, and verify that the immutable-config scenario no longer logs a failed-save error.
索引モデルが issue の本文から書いたものです。
説明
Description
JGit attempts to automatically save the user's .gitconfig file but this is not always desirable. In our CI/CD environment we set .gitconfig as immutable (+i in linux) to prevent builds from changing settings that may effect other builds. JGit will log the following error when it attempts to save.
I would like to be able to disable saving so that we only read from the user config and potentially make in-memory only config changes but never modify the underlying user config file.
Cannot save config file 'FileBasedConfig[/home/jenkins/.gitconfig]'
java.io.IOException: Cannot commit write to /home/jenkins/.gitconfig
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:258)
at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:584)
at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$0(FS.java:364)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Motivation
Preventing saving of the user .gitconfig when using jgit.
Alternatives considered
None. The stack is printed to the logs but ignored.
Additional context
No response
- 主要言語
- Java
- スター
- 427
- フォーク
- 116
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-jgit/jgit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
eclipse-jgit/jgit#329 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()再び着手できるかも @hardikyadav12 が 77 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
eclipse-jgit/jgit#297 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
eclipse-jgit/jgit#293 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-jgit/jgit#288 ·
eclipse-jgit/jgit の issue をすべて見る
似ている issue
-
? - Needs Triage bot_watch bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/cudf-spark-jni#5594 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DataONEorg/dataone-indexer#390 ·