code: plan9front

Download patch

ref: 01df41be0b8ef0ef307f517ea5d8048cd35a48f9
parent: 0d0a879d7e8f372f7bb3c29bf55318fcbe92f32f
author: Michael Forney <>
date: Mon Oct 3 13:33:03 EDT 2022

git/import: remove removed files from index after commit

Otherwise, they stick around in the index even though they aren't
present in the checkout or the commit. This causes various git tools
to bail out since they think the tree is dirty.

--- a/sys/src/cmd/git/import
+++ b/sys/src/cmd/git/import
@@ -96,8 +96,10 @@
 		git/walk -fRMA $files
 		if(~ $#nocommit 0){
-			if(hash=`{git/save -n $aname -e $amail -N $name -E $email -m $msg -d $date $parents $files})
+			if(hash=`{git/save -n $aname -e $amail -N $name -E $email -m $msg -d $date $parents $files}){
 				echo $hash > $refpath
+				rm -f .git/index9/removed/$files
+			}