Disable save of global git config
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 427
- Fork
- 116
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-jgit/jgit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
eclipse-jgit/jgit#329 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Có thể làm lại được @hardikyadav12 đã nhận 77 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
eclipse-jgit/jgit#297 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
eclipse-jgit/jgit#293 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-jgit/jgit#288 ·
Tất cả issue của eclipse-jgit/jgit
Issue tương tự
-
? - Needs Triage bot_watch bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NVIDIA/cudf-spark-jni#5594 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Upgrade solr to 9.11.0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DataONEorg/dataone-indexer#390 ·