alpineでgitがcolorにならないです。
dockerで再現手順を記載してます。
どうすればcolor表示されるのでしょうか?
なぜ、alpineのgitはcolorにならないのでしょうか?
(※ 同様のことをdebian(buildpack-depsイメージ)で行うとcolorになります。)
$ docker run -it --rm alpine
/ # apk add bash git
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/10) Installing ncurses-terminfo-base (6.1_p20200118-r4)
(2/10) Installing ncurses-libs (6.1_p20200118-r4)
(3/10) Installing readline (8.0.1-r0)
(4/10) Installing bash (5.0.11-r1)
Executing bash-5.0.11-r1.post-install
(5/10) Installing ca-certificates (20191127-r2)
(6/10) Installing nghttp2-libs (1.40.0-r1)
(7/10) Installing libcurl (7.67.0-r0)
(8/10) Installing expat (2.2.9-r1)
(9/10) Installing pcre2 (10.34-r1)
(10/10) Installing git (2.24.3-r0)
Executing busybox-1.31.1-r9.trigger
Executing ca-certificates-20191127-r2.trigger
OK: 24 MiB in 24 packages
/ # bash
bash-5.0# git config --global user.name "hoge"
bash-5.0# git config --global user.email "[email protected]"
bash-5.0# git config --global ui.color true
bash-5.0# git init
Initialized empty Git repository in /.git/
bash-5.0# git commit --allow-empty -m 'git init'
[master (root-commit) 051b1d3] git init
bash-5.0# echo "hoge" > hoge.txt
bash-5.0# git add hoge.txt
bash-5.0# git commit -m 'add hoge.txt'
[master d896c5a] add hoge.txt
1 file changed, 1 insertion(+)
create mode 100644 hoge.txt
# 以下すべて白黒. なぜ?
bash-5.0# git log --graph
* commit d896c5a9d768550aee05825e881af95a8165138d (HEAD -> master)
| Author: hoge <[email protected]>
| Date: Wed Jun 10 06:21:33 2020 +0000
|
| add hoge.txt
|
* commit 051b1d3cc5af545cfaaa0f8b24e13f059b1a2290
Author: hoge <[email protected]>
Date: Wed Jun 10 06:21:03 2020 +0000
git init
bash-5.0# git show HEAD
commit d896c5a9d768550aee05825e881af95a8165138d (HEAD -> master)
Author: hoge <[email protected]>
Date: Wed Jun 10 06:21:33 2020 +0000
add hoge.txt
diff --git a/hoge.txt b/hoge.txt
new file mode 100644
index 0000000..2262de0
--- /dev/null
+++ b/hoge.txt
@@ -0,0 +1 @@
+hoge