git-modified 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 3e9e874dfcf1d823226802f475953165d2805cc9
4
- data.tar.gz: fe8cb08ac1466e016279867c5ed8846b3c3f2923
3
+ metadata.gz: 50a6093e07d745b570cc447c63c5a7bd2b4b0567
4
+ data.tar.gz: 445df01b36f8f3cd39751755918434aad4f0cb37
5
5
  SHA512:
6
- metadata.gz: 7b28eb7283bebb82b1795eec8f2ed5db24bf7923f2618282d65d598bf265be0eefc27f196d55998f40e04399480d7685a04a59e2ac250b3ffc40a8c948482b29
7
- data.tar.gz: 0cb3a73e51ee3c92fb1c4f7571fcf3d725793b22d1bd92a933b1ba0afdcf8d7c103918a348308d08ff31ed1cd74963eba3229fbc62dd0f29df99654b64e97b6e
6
+ metadata.gz: c2935672d8ff2353542c2bb0c80ba8b6c26b787b8d0e13a6e6487b61b550772362eef53316880dae432855fa013ba3e2a1fe54486e9f010e5137dfb74c8ac51e
7
+ data.tar.gz: 991f3f3c7bc797de5d614c2834af9d5a3d70fa93eb7bcc474deda9401696215ceb6e1ca7ec4452652500962a1bae770fbe074d426c519de6c5fa5f2491d67fc6
data/README.md CHANGED
@@ -27,6 +27,14 @@ actionpack/lib/action_dispatch/testing/integration.rb
27
27
 
28
28
  ## Tips
29
29
 
30
+ ### Open files with editor
31
+
32
+ ```shell
33
+ $ vim -p `git modified`
34
+ ```
35
+
36
+ ### Open files with tig
37
+
30
38
  I often use [tig](https://github.com/jonas/tig) while I'm writing codes. No matter how I feel it's perfect, I would find mistakes soon when I check with tig.
31
39
  Tig has `e` mode which opens file in editor, yet cursol should be on the files. `git-modified` is handy if you would like to open files with commit sets. It can be available with following tig bindings in `.tigrc`.
32
40
 
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Modified
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
data/lib/git/modified.rb CHANGED
@@ -32,7 +32,10 @@ module Git
32
32
 
33
33
  Contract nil => nil
34
34
  def self.show_modified_files_on_working_tree
35
- puts `git status --porcelain`.each_line.map { |x| x[3..-1] }
35
+ puts `git status --porcelain` \
36
+ .each_line \
37
+ .reject { |line| line[0..1].split('').lazy.any? { |x| x == 'D' } } \
38
+ .map { |line| line[3..-1] }
36
39
  end
37
40
 
38
41
  Contract Maybe[String] => nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-modified
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Hasegawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.4.5
111
+ rubygems_version: 2.2.2
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: A Git subcommand to list modified files in git commit