Fixed staging for deleted files
This commit is contained in:
parent
20dba6402e
commit
3cde9d44ad
@ -52,9 +52,15 @@ class StatusManager {
|
||||
}
|
||||
|
||||
suspend fun stage(git: Git, diffEntry: DiffEntry) = withContext(Dispatchers.IO) {
|
||||
if(diffEntry.changeType == DiffEntry.ChangeType.DELETE) {
|
||||
git.rm()
|
||||
.addFilepattern(diffEntry.filePath)
|
||||
.call()
|
||||
} else {
|
||||
git.add()
|
||||
.addFilepattern(diffEntry.filePath)
|
||||
.call()
|
||||
}
|
||||
|
||||
loadStatus(git)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user