This commit is contained in:
Joao Moreno
2017-06-27 12:40:28 +02:00
parent ad57b3c991
commit dd07972305
2 changed files with 3 additions and 3 deletions

View File

@@ -447,7 +447,7 @@ export class GitStatusParser {
// space
i++;
if (entry.x === 'R') {
if (entry.x === 'R' || entry.x === 'C') {
lastIndex = raw.indexOf('\0', i);
if (lastIndex === -1) {

View File

@@ -53,7 +53,7 @@ export class Resource implements SourceControlResourceState {
@memoize
get resourceUri(): Uri {
if (this.renameResourceUri && (this._type === Status.MODIFIED || this._type === Status.DELETED || this._type === Status.INDEX_RENAMED)) {
if (this.renameResourceUri && (this._type === Status.MODIFIED || this._type === Status.DELETED || this._type === Status.INDEX_RENAMED || this._type === Status.INDEX_COPIED)) {
return this.renameResourceUri;
}
@@ -712,7 +712,7 @@ export class Model implements Disposable {
case 'A': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_ADDED)); break;
case 'D': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_DELETED)); break;
case 'R': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_RENAMED, renameUri)); break;
case 'C': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_COPIED)); break;
case 'C': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_COPIED, renameUri)); break;
}
switch (raw.y) {