From 239d94336a8e302d2832040d5242f16013036d8c Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sat, 10 Feb 2024 08:53:58 +0700 Subject: [PATCH] chore(git): use git rerere See https://git-scm.com/book/en/v2/Git-Tools-Rerere --- Makefile | 8 ++++---- scripts/git.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9d0502e..11c87a8 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ test: go test -race -failfast ./... test-color: - go install github.com/haunt98/go-test-color@latest + # go install github.com/haunt98/go-test-color@latest go-test-color -race -failfast ./... coverage: @@ -31,9 +31,9 @@ lint: golangci-lint run ./... format: - go install github.com/haunt98/gofimports/cmd/gofimports@latest - go install mvdan.cc/gofumpt@latest - go install mvdan.cc/sh/v3/cmd/shfmt@latest + # go install github.com/haunt98/gofimports/cmd/gofimports@latest + # go install mvdan.cc/gofumpt@latest + # go install mvdan.cc/sh/v3/cmd/shfmt@latest gofimports -w --company github.com/make-go-great,github.com/haunt98 . gofumpt -w -extra . shfmt -w -ci -i 4 ./scripts ./data/zsh diff --git a/scripts/git.sh b/scripts/git.sh index 9e7e666..102202c 100755 --- a/scripts/git.sh +++ b/scripts/git.sh @@ -33,6 +33,7 @@ git config --global pull.rebase false git config --global pull.twohead ort git config --global push.autoSetupRemote true git config --global rebase.stat true +git config --global rerere.enabled true # https://github.com/dandavison/delta git config --global core.pager delta