mob: Use 4 decimals in SI output
[sunny256-utils.git] / git-savecommit
blobe35fd3ba1a98aa292e876a2f3ae04aba4d87f22e
1 #!/usr/bin/env bash
3 #=======================================================================
4 # git-savecommit
5 # File ID: eb111220-d914-11e1-baa5-00c0a8deee11
6 # Create "commit-*" branches on the specified refs
7 # License: GNU General Public License version 2 or later.
8 #=======================================================================
10 progname=git-savecommit
11 revs=$*
12 test -z "$revs" && revs=HEAD
14 for f in $revs; do
15 unset s
16 s=$(git log -1 --format=%H $f)
17 git branch --no-track commit-$s $f && echo $progname: saved $f to commit-$s
18 done