summaryrefslogtreecommitdiff
path: root/sandbox/aa-turner/git_conversion/post-convert.sh
blob: fd088cefc6a853c302d9d610851d5b93017d35aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e

cd "$1"

# Ignore filemode changes
git config core.filemode false

# Run a garbage-collect on the generated git repository.  Import doesn't.
# This repack call is the active part of gc --aggressive.  This call is
# tuned for very large repositories.
git -c pack.threads=1 repack -AdF --window=1250 --depth=250

# Clean repo
git prune
git clean -fxd
git reset HEAD --hard

# Check integrity
git fsck --full --dangling --unreachable --strict

# Enable commit graph
git config core.commitGraph true
git show-ref -s | git commit-graph write --stdin-commits