Skip to content

Commit

Permalink
Fix missing file when deleted, stage delete, and create new unstaged …
Browse files Browse the repository at this point in the history
…file

Signed-off-by: Nigel Westbury <nigelipse@miegel.org>
  • Loading branch information
westbury committed Jun 2, 2020
1 parent 5d4390c commit 3ea1767
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/command/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,6 @@ export async function getStatus(
if (entry.kind === 'entry') {
const status = mapStatus(entry.statusCode);

if (status.kind === 'untracked') {
// when a delete has been staged, but an untracked file exists with the
// same path, we should ensure that we only draw one entry in the
// changes list - see if an entry already exists for this path and
// remove it if found
if (existingFiles.has(entry.path)) {
const existingEntry = files.findIndex(p => p.path === entry.path);
if (existingEntry > -1) {
files.splice(existingEntry, 1);
}
}
}

// for now we just poke at the existing summary
const summary = convertToAppStatus(status);
const selection = DiffSelection.fromInitialSelection(
Expand Down

0 comments on commit 3ea1767

Please sign in to comment.