Skip to content

Commit e124d91

Browse files
committed
1.8.2 - Closes waderyan#4 and waderyan#10. Merges waderyan#13
1 parent 445f506 commit e124d91

File tree

7 files changed

+20
-8
lines changed

7 files changed

+20
-8
lines changed

.vscodeignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.vscode/**
2-
typings/**
32
out/test/**
43
test/**
54
src/**

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## 1.8.2 (May 14, 2017)
4+
5+
* Bug: Fix incorrect version number in CHANGELOG.md [#13](https://github.com/Sertion/vscode-gitblame/pull/13) (Thanks to [@zackschuster](https://github.com/zackschuster))
6+
* Fix: Removing `typings` directory
7+
* Feature: Now respects `git.path` (Thanks to [@alessioalex](https://github.com/alessioalex)) [#4](https://github.com/Sertion/vscode-gitblame/issues/4)
8+
* Feature: Adding short hash token to `infoMessageFormat` and `statusBarMessageFormat` [#10]
9+
310
## 1.8.1 (May 01, 2017)
411

512
* Bug: Fix incorrect file name in imports [#9](https://github.com/Sertion/vscode-gitblame/issues/9) (Thanks to [@pftbest](https://github.com/pftbest))

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ See Git Blame information in the status bar for the currently selected line.
2424
- message that appears when the `extension.blame` command executes (when you click the status bar message)
2525
- available tokens:
2626
- `${commit.hash}` - 40-bit hash unique to the commit
27+
- `${commit.hash_short,length}` - the first `length` characters of the 40-bit hash unique to the commit, defaults to `7` first characters
2728
- `${commit.summary}` - the first line of the commit message
2829
- `${commit.filename}` - the file name where the line was committed
2930
- `${author.name}` - the commit author's name

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitblame",
33
"displayName": "Git Blame",
44
"description": "See git blame information in the status bar.",
5-
"version": "1.8.1",
5+
"version": "1.8.2",
66
"publisher": "waderyan",
77
"engines": {
88
"vscode": "^1.10.0"
@@ -31,7 +31,7 @@
3131
"test": "node ./node_modules/vscode/bin/test"
3232
},
3333
"dependencies": {
34-
"git-blame": "^1.2.0",
34+
"git-blame": "^1.4.0",
3535
"moment": "^2.10.6",
3636
"object-path": "^0.11.4",
3737
"valid-url": "^1.0.9"
@@ -47,7 +47,7 @@
4747
"bugs": {
4848
"url": "https://github.com/Sertion/vscode-gitblame/issues"
4949
},
50-
"license": "SEE LICENSE IN LICENSE",
50+
"license": "MIT",
5151
"repository": {
5252
"type": "git",
5353
"url": "https://github.com/Sertion/vscode-gitblame"

src/extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function showMessage(context: ExtensionContext, repoDir: string) {
6868
}
6969
else {
7070
const editor = window.activeTextEditor;
71-
71+
7272
if (!editor) return;
7373

7474
const doc = editor.document;

src/gitblame.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ import {workspace, WorkspaceConfiguration} from 'vscode';
44

55
export class GitBlame {
66
private blamers: Object;
7+
private gitPath: string;
78

89
constructor() {
10+
const gitConfig = workspace.getConfiguration('git');
11+
12+
this.gitPath = <string>gitConfig.get('path', 'git');
913
this.blamers = {};
1014
}
1115

@@ -14,7 +18,7 @@ export class GitBlame {
1418
return this.blamers[repoPath];
1519
}
1620
else {
17-
this.blamers[repoPath] = new GitBlameBlamer(repoPath, gitBlameShell);
21+
this.blamers[repoPath] = new GitBlameBlamer(repoPath, gitBlameShell, this.gitPath);
1822
return this.blamers[repoPath];
1923
}
2024
}
@@ -26,7 +30,7 @@ export class GitBlameBlamer {
2630
private _workingOn: Object;
2731
private _properties: WorkspaceConfiguration;
2832

29-
constructor(private repoPath: string, private gitBlameProcess) {
33+
constructor(private repoPath: string, private gitBlameProcess, private gitPath) {
3034
this._blamed = {};
3135
this._workingOn = {};
3236
this._properties = workspace.getConfiguration('gitblame');
@@ -72,7 +76,7 @@ export class GitBlameBlamer {
7276
workTree: workTree,
7377
rev: false,
7478
ignoreWhitespace: this._properties.get('ignoreWhitespace')
75-
}).on('data', (type, data) => {
79+
}, this.gitPath).on('data', (type, data) => {
7680
// outputs in Porcelain format.
7781
if (type === 'line') {
7882
blameInfo['lines'][data.finalLine] = data;

src/textdecorator.ts

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class TextDecorator {
7878
return {
7979
'commit': {
8080
'hash': commitInfo.hash,
81+
'hash_short': (length = 7) => commitInfo.hash.substr(0, length),
8182
'summary': commitInfo.summary,
8283
'filename': commitInfo.filename
8384
},

0 commit comments

Comments
 (0)