diff --git a/sys/src/cmd/git/revert b/sys/src/cmd/git/revert index 4a7cff71b..a516e3a9d 100644 --- a/sys/src/cmd/git/revert +++ b/sys/src/cmd/git/revert @@ -14,9 +14,7 @@ if(~ $#query 1) 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 + cp -x -- $commit/tree/$f $f + git/add $f } exit ''