Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ADD: for-each-ref script

+36
+36
scripts/for-each-ref.rcsh
··· 1 + #!/usr/bin/env rc 2 + 3 + flag e + 4 + 5 + current_ref=`{ 6 + git symbolic-ref --short -q HEAD \ 7 + || git describe --tags --exact-match >[2]/dev/null \ 8 + || git rev-parse --short HEAD 9 + } 10 + 11 + root=`{git rev-parse --show-toplevel} 12 + 13 + fn log { 14 + echo $"* >[1=2] #" 15 + } 16 + 17 + log Preserving current symbolic ref to return to later: $current_ref 18 + 19 + rev_range=$1 20 + shift 21 + 22 + revlist=`{git rev-list $rev_range --reverse} 23 + 24 + for (rev in $revlist) { 25 + echo Checking out $rev 26 + # Checkout the ref 27 + git checkout $rev 28 + # Execute the argument 29 + for (command in $*) { 30 + eval $command 31 + } 32 + git restore $root 33 + } 34 + 35 + log Done! 36 + git checkout $current_ref