Skip to content

Instantly share code, notes, and snippets.

@saxbophone
Created February 1, 2024 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saxbophone/2680ea80b622fabd324f697d3ec96c17 to your computer and use it in GitHub Desktop.
Save saxbophone/2680ea80b622fabd324f697d3ec96c17 to your computer and use it in GitHub Desktop.
Converts git refs to base-91 for brevity
git ls-remote --tags --refs --sort='v:refname' https://github.com/llvm/llvm-project.git | while read -r line; do
sha=$(echo $line | awk '{print substr($1, 1, 8)}');
ref=$(echo $line | awk '{print $2}');
b91=$(echo $sha | xxd -r -p | base91);
echo "$sha = $b91 ($ref)";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment