diff options
author | Michael Forney <mforney@mforney.org> | 2022-10-03 17:33:03 +0000 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2022-10-03 17:33:03 +0000 |
commit | 01df41be0b8ef0ef307f517ea5d8048cd35a48f9 (patch) | |
tree | 5d08e50b14c941a47121003d15350ba5f9dc64d4 /sys/src/cmd/git | |
parent | 0d0a879d7e8f372f7bb3c29bf55318fcbe92f32f (diff) |
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.
Diffstat (limited to 'sys/src/cmd/git')
-rw-r--r--[-rwxr-xr-x] | sys/src/cmd/git/import | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/git/import b/sys/src/cmd/git/import index 643e6865c..ebb5dbcb6 100755..100644 --- 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='''' ' |