Store multiple results
Create a hash of the repo path and store it as its own result, allowing for a different cached result per repo path.
This commit is contained in:
parent
3ad39fddb7
commit
e3ac4e5064
|
@ -12,7 +12,13 @@ REPO="${REPO:-$(pwd)}"
|
||||||
# Return early if the repository directory doesn't exist.
|
# Return early if the repository directory doesn't exist.
|
||||||
[[ ! -d "${REPO}" ]] && exit 2
|
[[ ! -d "${REPO}" ]] && exit 2
|
||||||
|
|
||||||
result_file="./result"
|
mkdir -p ./result
|
||||||
|
|
||||||
|
repo_hash="$(echo -n "${REPO}" | md5sum | cut -d ' ' -f1)"
|
||||||
|
result_file="./result/${repo_hash}"
|
||||||
|
|
||||||
|
echo "Result file: ${result_file}"
|
||||||
|
|
||||||
if [[ ! -f "${result_file}" ]]; then
|
if [[ ! -f "${result_file}" ]]; then
|
||||||
for commit_id in $(git -C "${REPO}" rev-list --all --no-merges); do
|
for commit_id in $(git -C "${REPO}" rev-list --all --no-merges); do
|
||||||
echo "Processing commit ${commit_id}..."
|
echo "Processing commit ${commit_id}..."
|
||||||
|
|
Loading…
Reference in a new issue