+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanAdd glide and minidump19ad898

main
1.3 KiB31 linesraw
1{ writeShellApplication, git-filter-repo, blahaj, gay }: writeShellApplication {
2  name = "git-undeadname";
3  runtimeInputs = [ git-filter-repo blahaj gay ];
4  text = ''
5    read -r -p "please give me your new name: " newname
6    for _ in {1..3}; do sleep 0.25 && echo -n "."; done
7    echo -n " wow " && sleep 0.25
8    echo -n "\"$newname\" " | gay -tu
9    echo "is such a pretty name! i love it ^.^" && sleep 0.5
10    read -rs -p "now could i have your old email (dw i wont look >.<): " oldemail
11    echo ""
12    read -r -p "and finally enter your new email (or leave blank if unchanged): " newemail
13
14    if [[ -z "$newemail" ]]; then
15        newemail="$oldemail"
16    fi
17
18    mailmap=$(mktemp)
19    echo "$newname <$newemail> <$oldemail>" >"$mailmap"
20    git filter-repo --force --mailmap "$mailmap"
21    blahaj -s
22    rm "$mailmap"
23
24    echo ""
25    echo "Congrats! Your name has been updated in all commits of this repo."
26    echo "If you force-push it should update in the remote, but only do this"
27    echo "if you understand the consequences of rewriting history (such as"
28    echo "breaking commit signatures and open PR's)!"
29    echo -e "See \e[4m\e]8;;https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository#side-effects-of-rewriting-history\e\\here\e]8;;\e\\\\\e[0m for more details."
30  '';
31}