ref: dd7352fd35491a753a47aca3acd9f3a2fd8c2d96
parent: ca6058e0e1bf8352e39e33e8435b206431831a94
author: Ori Bernstein <[email protected]>
date: Tue Jun 29 16:03:26 EDT 2021
git/revert: revert the old implementation was correct; we want to mark it dirty and let walk sort it out.
--- a/sys/src/cmd/git/revert
+++ b/sys/src/cmd/git/revert
@@ -14,9 +14,7 @@
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 ''