mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-15 09:35:42 -05:00
Adds working tree status to custom view (insiders)
Hides working changed files behind insiders flag Unhides Changed Files node from behind insiders flag Adds changed file count to Changed Files node label Adds icon to Changed Files node Adds upstream branch to upstream status nodes Sorts files in the Changed Files node
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
'use strict';
|
||||
import { Strings } from '../../system';
|
||||
import { GlyphChars } from '../../constants';
|
||||
import { Formatter, IFormatOptions } from './formatter';
|
||||
import { GitStatusFile, IGitStatusFile } from '../models/status';
|
||||
import { GitStatusFile, IGitStatusFile, IGitStatusFileWithCommit } from '../models/status';
|
||||
import * as path from 'path';
|
||||
|
||||
export interface IStatusFormatOptions extends IFormatOptions {
|
||||
@@ -29,6 +30,11 @@ export class StatusFileFormatter extends Formatter<IGitStatusFile, IStatusFormat
|
||||
return this._padOrTruncate(directory, this._options.tokenOptions!.file);
|
||||
}
|
||||
|
||||
get working() {
|
||||
const commit = (this._item as IGitStatusFileWithCommit).commit;
|
||||
return (commit !== undefined && commit.isUncommitted) ? `${GlyphChars.Pensil} ${GlyphChars.Space}` : '';
|
||||
}
|
||||
|
||||
static fromTemplate(template: string, status: IGitStatusFile, dateFormat: string | null): string;
|
||||
static fromTemplate(template: string, status: IGitStatusFile, options?: IStatusFormatOptions): string;
|
||||
static fromTemplate(template: string, status: IGitStatusFile, dateFormatOrOptions?: string | null | IStatusFormatOptions): string;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Strings } from '../../system';
|
||||
import { Uri } from 'vscode';
|
||||
import { GlyphChars } from '../../constants';
|
||||
import { GitUri } from '../gitUri';
|
||||
import { GitLogCommit } from './logCommit';
|
||||
import * as path from 'path';
|
||||
|
||||
export interface GitStatus {
|
||||
@@ -27,6 +28,10 @@ export interface IGitStatusFile {
|
||||
originalFileName?: string;
|
||||
}
|
||||
|
||||
export interface IGitStatusFileWithCommit extends IGitStatusFile {
|
||||
commit: GitLogCommit;
|
||||
}
|
||||
|
||||
export class GitStatusFile implements IGitStatusFile {
|
||||
|
||||
originalFileName?: string;
|
||||
|
||||
Reference in New Issue
Block a user