diff options
author | Tyler Davis <tyler@gluecode.net> | 2024-11-27 18:56:53 +0000 |
---|---|---|
committer | Tyler Davis <tyler@gluecode.net> | 2024-11-27 18:56:53 +0000 |
commit | 2b0abcf1e5e6a9d59d0e1dd938ee9b273daa7062 (patch) | |
tree | 09f5c6bab8bde047052e58853a2df27a6ec919b2 /.local/bin/confgit.sh | |
parent | 3703779248f4ddeefa5bb0e24e450a1413db400f (diff) | |
download | dotfiles-2b0abcf1e5e6a9d59d0e1dd938ee9b273daa7062.tar.gz dotfiles-2b0abcf1e5e6a9d59d0e1dd938ee9b273daa7062.zip |
too many updates to comment
Diffstat (limited to '.local/bin/confgit.sh')
-rwxr-xr-x | .local/bin/confgit.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/confgit.sh b/.local/bin/confgit.sh index 813f97b..e7d2e82 100755 --- a/.local/bin/confgit.sh +++ b/.local/bin/confgit.sh @@ -1,5 +1,7 @@ #!/usr/bin/env sh +VER="$(git version |cut -d " " -f 3)" + # Portably get number of procs OS="$(uname -s)" NPROCS="" @@ -60,6 +62,14 @@ git config --global index.recordEndOfIndexEntries true git config --global index.recordOffsetTable true git config --global log.date iso git config --global merge.conflictstyle zdiff3 +if [ "${VER}" \> "2.45" ]; then + git config --global pack.allowPackReuse multi # Experimental + git config --global index.skipHash true # Experimental, will fail earlier than 2.40 + git config --global index.version 4 + git config --global fetch.negotiationAlgorithm skipping # Experimental + # Additional experimental configs + git config --global feature.manyFiles true +fi git config --global pack.threads "$NPROCS" # Auto-detect threads from CPU git config --global pack.useBitmapBoundaryTraversal true git config --global pack.writeReverseIndex true @@ -78,6 +88,11 @@ git config --global tag.sort taggerdate git config --global user.email tyler@gluecode.net git config --global user.name "Tyler Davis" +if [ "${VER}" \> "2.47" ]; then + # Only enable reftable by default on git 2.47+ + git config --global init.defaultRefFormat reftable +fi + # Eagerly detect errors git config --global transfer.fsckobjects true git config --global fetch.fsckobjects true |