Skip to content

Commit

Permalink
fixes #27488
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Jun 27, 2017
1 parent ad57b3c commit dd07972
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extensions/git/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions extensions/git/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit dd07972

Please sign in to comment.