git-crecord 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/Rakefile +1 -1
- data/git-crecord.gemspec +4 -4
- data/lib/git_crecord/diff/difference.rb +1 -1
- data/lib/git_crecord/diff/line.rb +1 -1
- data/lib/git_crecord/git.rb +4 -0
- data/lib/git_crecord/ui/help_window.rb +2 -2
- data/lib/git_crecord/version.rb +1 -1
- data/test/git_crecord/diff/hunk_test.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b27152b0c2462bac010cb3f9ded85e80555cc8
|
4
|
+
data.tar.gz: abb4843e7164833a17d309f49b7886b2f77b6b97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7237132d036b3efda7640151444aec7592a32ae0986d86b32d602e8836ff4ecba48c3a22c737d5fd9965a88b6ead0f83267a7fb8bd55fb4c826afd954a780f1
|
7
|
+
data.tar.gz: 3351f2120e57e49f1a4b6554bb17b5ecba9f894d5afb4ed1add950b1d726d79986e2d8f2a3d0333688b0170b9bd73c0e078d9ba32f4ea8c8ac37dad67fcf9912
|
data/README.md
CHANGED
@@ -24,18 +24,25 @@ Key-bindings:
|
|
24
24
|
j / ↓ - down
|
25
25
|
k / ↑ - up
|
26
26
|
h / ← - collapse hunk
|
27
|
-
l / → - expand
|
27
|
+
l / → - expand hunk
|
28
28
|
f - toggle fold
|
29
29
|
g - go to first line
|
30
30
|
G - go to last line
|
31
31
|
C-P - up to previous hunk / file
|
32
|
-
C-N - down to
|
32
|
+
C-N - down to next hunk / file
|
33
33
|
SPACE - toggle selection
|
34
34
|
A - toggle all selections
|
35
35
|
? - display help
|
36
36
|
R - force redraw
|
37
37
|
```
|
38
38
|
|
39
|
+
## Configuration
|
40
|
+
|
41
|
+
```shell
|
42
|
+
# configure tab-width to four spaces, default is two spaces:
|
43
|
+
$ git config --global crecord.tabwidth 4
|
44
|
+
```
|
45
|
+
|
39
46
|
## Development
|
40
47
|
|
41
48
|
```shell
|
data/Rakefile
CHANGED
data/git-crecord.gemspec
CHANGED
@@ -9,19 +9,19 @@ GemSpec = Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = 'Maik Brendler'
|
10
10
|
spec.email = 'maik.brendler@invision.de'
|
11
11
|
spec.summary = 'Git command to stage/commit hunks the simple way.'
|
12
|
-
spec.description = %w
|
12
|
+
spec.description = %w[
|
13
13
|
This gem adds the git-crecord command.
|
14
14
|
It provides a curses UI to stage/commit git-hunks.
|
15
|
-
|
15
|
+
].join(' ')
|
16
16
|
spec.license = 'MIT'
|
17
17
|
spec.homepage = 'https://github.com/mbrendler/git-crecord'
|
18
18
|
spec.metadata = {
|
19
19
|
'issue_tracker' => 'https://github.com/mbrendler/git-crecord/issues'
|
20
20
|
}
|
21
|
-
spec.require_paths = %w
|
21
|
+
spec.require_paths = %w[lib]
|
22
22
|
spec.files = `git ls-files`.split($RS).delete_if{ |f| %r{^(spec|test)/} =~ f }
|
23
23
|
spec.test_files = `git ls-files`.split($RS).grep(%r{^(spec|test)/})
|
24
|
-
spec.executables = %w
|
24
|
+
spec.executables = %w[git-crecord]
|
25
25
|
spec.has_rdoc = false
|
26
26
|
# Install curses dependency, via a native extension hack, because
|
27
27
|
# ruby 2.0 includes curses and can't install curses-gem
|
data/lib/git_crecord/git.rb
CHANGED
@@ -10,12 +10,12 @@ module GitCrecord
|
|
10
10
|
j / ↓ - down
|
11
11
|
k / ↑ - up
|
12
12
|
h / ← - collapse hunk
|
13
|
-
l / → - expand
|
13
|
+
l / → - expand hunk
|
14
14
|
f - toggle fold
|
15
15
|
g - go to first line
|
16
16
|
G - go to last line
|
17
17
|
C-P - up to previous hunk / file
|
18
|
-
C-N - down to
|
18
|
+
C-N - down to next hunk / file
|
19
19
|
SPACE - toggle selection
|
20
20
|
A - toggle all selections
|
21
21
|
? - display help
|
data/lib/git_crecord/version.rb
CHANGED
@@ -5,7 +5,7 @@ class HunkTest < Minitest::Test
|
|
5
5
|
|
6
6
|
def test_strings
|
7
7
|
hunk = Hunk.new('1234567890' * 5)
|
8
|
-
expected = %w
|
8
|
+
expected = %w[12345678901 23456789012 34567890123 45678901234 567890]
|
9
9
|
assert_equal(expected, hunk.strings(19))
|
10
10
|
end
|
11
11
|
|