Skip to content

Commit 9724ec9

Browse files
committed
Detect lightweight tags
1 parent 3ba4217 commit 9724ec9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## 1.0.1 - 2019-02-10
4+
* Detect & display lightweight tags
5+
36
## 1.0.0 - 2019-02-10
47
* Initial release
58
* Git Graph Visualisation

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "git-graph",
33
"displayName": "Git Graph",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"publisher": "mhutchie",
66
"author": {
77
"name": "Michael Hutchison",

src/dataSource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ export class DataSource {
109109

110110
if (ref.startsWith('refs/heads/')) {
111111
refs.push({ hash: hash, name: ref.substring(11), type: 'head' });
112-
} else if (ref.startsWith('refs/tags/') && ref.endsWith('^{}')) {
113-
refs.push({ hash: hash, name: ref.substring(10, ref.length - 3), type: 'tag' });
112+
} else if (ref.startsWith('refs/tags/')) {
113+
refs.push({ hash: hash, name: (ref.endsWith('^{}') ? ref.substring(10, ref.length - 3) : ref.substring(10)), type: 'tag' });
114114
} else if (ref.startsWith('refs/remotes/')) {
115115
refs.push({ hash: hash, name: ref.substring(13), type: 'remote' });
116116
}

0 commit comments

Comments
 (0)