git_spelunk 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_spelunk/blame.rb +0 -1
- data/lib/git_spelunk/file_context.rb +2 -8
- data/lib/git_spelunk/offset.rb +0 -9
- data/lib/git_spelunk/ui.rb +2 -2
- data/lib/git_spelunk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c66d56a219163151155944e5d2887a20dda14eccc960970055511c4c1359cdd7
|
4
|
+
data.tar.gz: 1a2a34353a2b890cfad240dc10ce839bb59609714c0985d3e8c5a80926ece56e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef3b413679e551d6d098645f38e840e9cd9ea31f6f41fc987e5294946ba29ac5d7f74e3afd90041c528c9dbfbeb5e1aedd4a0efc9f894856c1a57b28cd946de5
|
7
|
+
data.tar.gz: cdb32f7a7dcf9059573350e37780ba78d0c6e1628e305444a446cca997c4f73bed496102772f7e32450b5caabcf5cf8b701e980bae3d0b199b448fc28cbcde91
|
data/lib/git_spelunk/blame.rb
CHANGED
@@ -16,7 +16,6 @@ module GitSpelunk
|
|
16
16
|
end
|
17
17
|
|
18
18
|
@file = File.expand_path(file).sub(@repo.workdir, '')
|
19
|
-
@commit_cache = {}
|
20
19
|
end
|
21
20
|
|
22
21
|
def clone_for_blame_line(blame_line)
|
@@ -30,19 +29,14 @@ module GitSpelunk
|
|
30
29
|
end
|
31
30
|
|
32
31
|
def find_repo_from_file(file)
|
33
|
-
Rugged::Repository.discover(file)
|
32
|
+
Rugged::Repository.discover(File.dirname(file))
|
34
33
|
end
|
35
34
|
|
36
35
|
def get_blame
|
37
|
-
@blame_data ||=
|
38
|
-
@new_to_old = {}
|
39
|
-
@line_to_sha = {}
|
40
|
-
GitSpelunk::Blame.new(@repo, @file, @sha).lines
|
41
|
-
end
|
36
|
+
@blame_data ||= GitSpelunk::Blame.new(@repo, @file, @sha).lines
|
42
37
|
end
|
43
38
|
|
44
39
|
def get_line_commit_info(blame_line)
|
45
|
-
get_blame
|
46
40
|
commit = blame_line.commit
|
47
41
|
return nil unless commit
|
48
42
|
author = commit.author
|
data/lib/git_spelunk/offset.rb
CHANGED
@@ -43,7 +43,6 @@ module GitSpelunk
|
|
43
43
|
@line_number = line_number
|
44
44
|
@commit = @repo.lookup(@sha)
|
45
45
|
@parent = @commit.parents[0]
|
46
|
-
true
|
47
46
|
end
|
48
47
|
|
49
48
|
STATS_PATTERN=/@@ \-(\d+),(\d+) \+(\d+),(\d+) @@/
|
@@ -134,14 +133,6 @@ module GitSpelunk
|
|
134
133
|
end
|
135
134
|
end
|
136
135
|
|
137
|
-
def at_beginning_of_time?
|
138
|
-
@parent.nil?
|
139
|
-
end
|
140
|
-
|
141
|
-
def unable_to_trace_lineage?
|
142
|
-
@parent && (@hunks.nil? || target_chunk.nil?)
|
143
|
-
end
|
144
|
-
|
145
136
|
def line_number_to_parent
|
146
137
|
return :at_beginning_of_time unless @parent && hunks
|
147
138
|
chunk = target_chunk(@line_number)
|
data/lib/git_spelunk/ui.rb
CHANGED
@@ -80,7 +80,7 @@ Date: #{info[:date]}
|
|
80
80
|
def history_back
|
81
81
|
@status.set_onetime_message("Rewinding...")
|
82
82
|
goto = @file_context.get_line_for_sha_parent(@pager.blame_line)
|
83
|
-
if goto.is_a?(
|
83
|
+
if goto.is_a?(Integer)
|
84
84
|
@file_context.line_number = @pager.cursor
|
85
85
|
@history.push(@file_context)
|
86
86
|
|
@@ -165,7 +165,7 @@ Date: #{info[:date]}
|
|
165
165
|
when 's'
|
166
166
|
sha = @pager.blame_line.sha
|
167
167
|
Curses.close_screen
|
168
|
-
system("git -p --git-dir='#{@file_context.repo.path}' show #{sha} | less")
|
168
|
+
system("git -p --git-dir='#{@file_context.repo.path}' show #{sha} | less -R")
|
169
169
|
when '/', '?'
|
170
170
|
@status.command_buffer = key
|
171
171
|
@typing = :search
|
data/lib/git_spelunk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_spelunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Osheroff
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rugged
|