From 01df41be0b8ef0ef307f517ea5d8048cd35a48f9 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 3 Oct 2022 17:33:03 +0000 Subject: 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. --- sys/src/cmd/git/import | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100755 => 100644 sys/src/cmd/git/import (limited to 'sys/src/cmd/git') diff --git a/sys/src/cmd/git/import b/sys/src/cmd/git/import old mode 100755 new mode 100644 index 643e6865c..ebb5dbcb6 --- a/sys/src/cmd/git/import +++ b/sys/src/cmd/git/import @@ -96,8 +96,10 @@ fn apply @{ } 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 + } } status='''' ' -- cgit v1.2.3