mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 10:58:34 -05:00
Changes Not Committed Yet to Uncommitted
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { GitBlameFormat, GitCommit, IGitAuthor, IGitBlame, IGitCommitLine, IGitEnricher } from './../git';
|
import Git, { GitBlameFormat, GitCommit, IGitAuthor, IGitBlame, IGitCommitLine, IGitEnricher } from './../git';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -64,7 +64,9 @@ export class GitBlameParserEnricher implements IGitEnricher<IGitBlame> {
|
|||||||
|
|
||||||
switch (lineParts[0]) {
|
switch (lineParts[0]) {
|
||||||
case 'author':
|
case 'author':
|
||||||
entry.author = lineParts.slice(1).join(' ').trim();
|
entry.author = Git.isUncommitted(entry.sha)
|
||||||
|
? 'Uncommitted'
|
||||||
|
: lineParts.slice(1).join(' ').trim();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// case 'author-mail':
|
// case 'author-mail':
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { GitCommit, IGitAuthor, IGitEnricher, IGitLog } from './../git';
|
import Git, { GitCommit, IGitAuthor, IGitEnricher, IGitLog } from './../git';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -47,7 +47,9 @@ export class GitLogParserEnricher implements IGitEnricher<IGitLog> {
|
|||||||
|
|
||||||
switch (lineParts[0]) {
|
switch (lineParts[0]) {
|
||||||
case 'author':
|
case 'author':
|
||||||
entry.author = lineParts.slice(1).join(' ').trim();
|
entry.author = Git.isUncommitted(entry.sha)
|
||||||
|
? 'Uncommitted'
|
||||||
|
: lineParts.slice(1).join(' ').trim();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'author-date':
|
case 'author-date':
|
||||||
|
|||||||
Reference in New Issue
Block a user