#!/bin/rc rfork en . /sys/lib/git/common.rc gitup flagfmt='c:query query' args='file ...' eval `''{aux/getflags $*} || exec aux/usage commit=$gitfs/HEAD if(~ $#query 1) commit=`{git/query -p $query} files=`$nl{cleanname -d $gitrel $*} for(f in `$nl{cd $commit/tree/ && walk -f $files}){ mkdir -p `{basename -d $f} if(cp -x -- $commit/tree/$f $f) walk -eq $f > .git/index9/tracked/$f if not echo -n > .git/index9/tracked/$f } exit ''