Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
498 B
Bash
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
tagtext=""
tagflags=""
# Darcs hashes are sha1 (120 bits, 40-character hex)
if [[ "$rev" =~ [a-fA-F0-9]{40} ]]; then
tagtext="(hash $rev)"
tagflags="--to-hash=$rev"
elif test -n "$rev"; then
tagtext="(tag $rev)"
tagflags="--tag=$rev"
elif test -n "$context"; then
tagtext="(context)"
tagflags="--context=$context"
fi
echo "Cloning $url $partial ${tagtext} into $out"
darcs clone --lazy $tagflags "$url" "$out"
# remove metadata, because it can change
rm -rf "$out/_darcs"