Skip to content

Commit e85e919

Browse files
authored
Fix performance tip notification (#168)
Additionally, reverse the order of versions in the change log for compatibility with the build steps.
1 parent afbfade commit e85e919

File tree

3 files changed

+71
-79
lines changed

3 files changed

+71
-79
lines changed

CHANGELOG.md

Lines changed: 67 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,69 @@
44

55
## [Unreleased]
66

7-
## 1.5.4
7+
## 3.3.1
88

9-
- Fixed issue with branch encoding for `GitHub` and `GitLab` hosts.
10-
- Fixed issue with origins using `git` protocol.
9+
- Add preference to disable check for a commit's existence on the remote. #97
1110

12-
## 1.5.5
11+
## 3.3.0
1312

14-
- Run plugin process on a background thread to prevent UI freezes.
13+
- Re-added support for copying links to the clipboard. #85
1514

16-
## 1.5.6
15+
## 3.2.0
1716

18-
- Ability to open a specific commit from the VCS log tool window.
17+
- Rebuilt the substitution system used for the Custom host type. This system is now also used under the hood for most
18+
pre-defined host types. #92
1919

20-
## 1.5.7
20+
## 3.1.2
2121

22-
- Fixed: Select target action now uses the correct line number when used from the editor. (#24 PR by markiewb)
22+
- Fix issue resulting in an invalid URL for project/organisation names made up digits when the remote URL uses
23+
the SSH protocol in the SCP syntax. #94
2324

24-
## 1.6.0
25+
## 3.1.1
2526

26-
- Support GitBlit #26
27+
- Fix multi-line selection in GitLab. #86
2728

28-
## 1.6.1
29+
## 3.1.0
2930

30-
- Support more shortcuts.
31-
- Added host icons.
32-
- Minor refactors.
31+
- Support for multiline selection. #77
32+
- Renamed the host Stash to Bitbucket Server
3333

34-
## 1.6.2
34+
## 3.0.0
3535

36-
- Added analytics
36+
- Added ability to disable the plugin per project. #79
37+
- Added support for hosts Giea and Gogs. #80
38+
- Removed copy link action.
39+
- Code base cleanup.
3740

38-
## 1.6.3
41+
## 2.4.0
3942

40-
- Improved analytics
43+
- Add open commit action to annotation gutter. #70
44+
- Respect line number when using from the annotation gutter. #68
45+
- Removed copy link action from annotation gutter.
4146

42-
## 1.6.4
47+
## 2.3.1
4348

44-
- Tweaked analytics
49+
- Fixed bug which caused an incorrect URL to be created from the VCS log.
50+
- Added GitBlit support to open a file at a specific commit. #65
4551

46-
## 1.6.5
52+
## 2.3.0
4753

48-
- Removed analytics.
54+
- Generate link to file at commit instead of branch where possible. #61
55+
- Added actions to annotation gutter. #57
56+
- Allow remote name to be configured from the preferences. #60
57+
- Minor bug fixes and improvements.
4958

50-
## 1.6.6
59+
## 2.2.0
5160

52-
- Fixed incompatibility issue with save actions plugin. Note that you have to configure the plugin again!
61+
- Added support for GitBlit. #41
5362

54-
## 2.0.0
63+
## 2.1.2
5564

56-
- Rebuilt the entire plugin! Note that you have to configure the plugin again!
65+
- Fixed issue preventing port numbers with more than 4 digits being removed #52.
5766

58-
## 2.0.1
67+
## 2.1.1
5968

60-
- Fixed encoding issue when URL contains non-ASCII characters. #40
69+
- Fixed force HTTPS option.
6170

6271
## 2.1.0
6372

@@ -67,74 +76,57 @@
6776
- Make default branch customisable #45
6877
- Add custom URL factory #44
6978

70-
## 2.1.1
71-
72-
- Fixed force HTTPS option.
73-
74-
## 2.1.2
79+
## 2.0.1
7580

76-
- Fixed issue preventing port numbers with more than 4 digits being removed #52.
81+
- Fixed encoding issue when URL contains non-ASCII characters. #40
7782

78-
## 2.2.0
83+
## 2.0.0
7984

80-
- Added support for GitBlit. #41
85+
- Rebuilt the entire plugin! Note that you have to configure the plugin again!
8186

82-
## 2.3.0
87+
## 1.6.6
8388

84-
- Generate link to file at commit instead of branch where possible. #61
85-
- Added actions to annotation gutter. #57
86-
- Allow remote name to be configured from the preferences. #60
87-
- Minor bug fixes and improvements.
89+
- Fixed incompatibility issue with save actions plugin. Note that you have to configure the plugin again!
8890

89-
## 2.3.1
91+
## 1.6.5
9092

91-
- Fixed bug which caused an incorrect URL to be created from the VCS log.
92-
- Added GitBlit support to open a file at a specific commit. #65
93+
- Removed analytics.
9394

94-
## 2.4.0
95+
## 1.6.4
9596

96-
- Add open commit action to annotation gutter. #70
97-
- Respect line number when using from the annotation gutter. #68
98-
- Removed copy link action from annotation gutter.
97+
- Tweaked analytics
9998

100-
## 3.0.0
99+
## 1.6.3
101100

102-
- Added ability to disable the plugin per project. #79
103-
- Added support for hosts Giea and Gogs. #80
104-
- Removed copy link action.
105-
- Code base cleanup.
101+
- Improved analytics
106102

107-
## 3.1.0
103+
## 1.6.2
108104

109-
- Support for multiline selection. #77
110-
- Renamed the host Stash to Bitbucket Server
105+
- Added analytics
111106

112-
## 3.1.1
107+
## 1.6.1
113108

114-
- Fix multi-line selection in GitLab. #86
109+
- Support more shortcuts.
110+
- Added host icons.
111+
- Minor refactors.
115112

116-
## 3.1.2
113+
## 1.6.0
117114

118-
- Fix issue resulting in an invalid URL for project/organisation names made up digits when the remote URL uses
119-
the SSH protocol in the SCP syntax. #94
115+
- Support GitBlit #26
120116

121-
## 3.2.0
117+
## 1.5.7
122118

123-
- Rebuilt the substitution system used for the Custom host type. This system is now also used under the hood for most
124-
pre-defined host types. #92
119+
- Fixed: Select target action now uses the correct line number when used from the editor. (#24 PR by markiewb)
125120

126-
## 3.3.0
121+
## 1.5.6
127122

128-
- Re-added support for copying links to the clipboard. #85
123+
- Ability to open a specific commit from the VCS log tool window.
129124

130-
## 3.3.1
125+
## 1.5.5
131126

132-
- Add preference to disable check for a commit's existence on the remote. #97
127+
- Run plugin process on a background thread to prevent UI freezes.
133128

134-
## 4.0.0
129+
## 1.5.4
135130

136-
- Complete re-write
137-
- Notification improvements
138-
- Add logo
139-
- Support multiple custom hosts and store them at the application level for reuse between projects
140-
- Fix issue preventing URL generating of the root project
131+
- Fixed issue with branch encoding for `GitHub` and `GitLab` hosts.
132+
- Fixed issue with origins using `git` protocol.

src/main/kotlin/uk/co/ben_gibson/git/link/GitLinkRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private fun processGitLink(project: Project, context: Context, handle: (URL) ->
3838
runBackgroundableTask(message("name"), project, false) {
3939
val time = timeOperation { process(project, context, handle) }
4040

41-
if (time > 1000 || !project.service<ProjectSettings>().checkCommitOnRemote) {
41+
if (time < 1000 || !project.service<ProjectSettings>().checkCommitOnRemote) {
4242
return@runBackgroundableTask
4343
}
4444

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package uk.co.ben_gibson.git.link
22

33
inline fun timeOperation(operation: () -> Unit) : Long {
4-
val startTime = System.nanoTime()
4+
val startTime = System.currentTimeMillis()
55

66
operation()
77

8-
val endTime = System.nanoTime()
8+
val endTime = System.currentTimeMillis()
99

10-
return endTime - startTime
10+
return (endTime - startTime)
1111
}

0 commit comments

Comments
 (0)