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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee9a524ce1012243516ff781bc7ab085710b9201b1fa0781745a97727a5c4a13
4
- data.tar.gz: ce58f6b2738fa29f294e2c7ef0ee59ced41c642be2ea5f538eb91a4864feec50
3
+ metadata.gz: c66d56a219163151155944e5d2887a20dda14eccc960970055511c4c1359cdd7
4
+ data.tar.gz: 1a2a34353a2b890cfad240dc10ce839bb59609714c0985d3e8c5a80926ece56e
5
5
  SHA512:
6
- metadata.gz: ffb7863801c8fcadc0ded69633bc09f5da9f5859bab2a935aa9b80dba7721720e4549d09737f62b203c6e256dd20b801303f45fdb2fc8ea976625972af24b13c
7
- data.tar.gz: c81a7be76968ed1830a9cbe17918daae13d2ac6105d0c694014da575276aeae996eb33ce68d8ed22d04539c8178d6f31fe9b9891f6256258184990dc46ab4310
6
+ metadata.gz: ef3b413679e551d6d098645f38e840e9cd9ea31f6f41fc987e5294946ba29ac5d7f74e3afd90041c528c9dbfbeb5e1aedd4a0efc9f894856c1a57b28cd946de5
7
+ data.tar.gz: cdb32f7a7dcf9059573350e37780ba78d0c6e1628e305444a446cca997c4f73bed496102772f7e32450b5caabcf5cf8b701e980bae3d0b199b448fc28cbcde91
@@ -19,7 +19,6 @@ module GitSpelunk
19
19
  end
20
20
 
21
21
  def process_raw_blame(output)
22
- lines = []
23
22
  commits = {}
24
23
  commit_file_map = {}
25
24
 
@@ -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 ||= begin
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
@@ -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)
@@ -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?(Fixnum)
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
@@ -1,3 +1,3 @@
1
1
  module GitSpelunk
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
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.2
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-01-19 00:00:00.000000000 Z
12
+ date: 2023-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rugged