scvcs 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/commands/commit.rb +4 -1
- data/bin/commands/status.rb +2 -1
- data/lib/scv/version.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: d95c969002a0c3d649c8c6ad1d67598f9a52d3e9
|
4
|
+
data.tar.gz: 910818281428ececb615e2d5c3bac8fef76f3c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8444269dd1ae1cf9b785fde84d247e5278b8f54b1f76dae9e56de0f49c9446032a22fa0e11a403a0eecb4969c5a4b7de6207a2afeda70a24454beeaca15f6f6f
|
7
|
+
data.tar.gz: 836dff26892f880ccf52f2acd82f4201f3ff2f292f1f627ea71c4e332ca285e94280c6acc8332a33c5c194b7a1b3254649401dddc8d40cb5f49ba8ffaaa9a101
|
data/bin/commands/commit.rb
CHANGED
@@ -23,7 +23,10 @@ command :commit do |c|
|
|
23
23
|
repository_path = "#{global_options[:dir]}/.scv"
|
24
24
|
|
25
25
|
unless options[:amend]
|
26
|
-
|
26
|
+
commit_id = repository.branch_head
|
27
|
+
commit = commit_id ? repository[commit_id] : nil
|
28
|
+
|
29
|
+
status = repository.status commit, ignore: [/^\.|\/\./]
|
27
30
|
|
28
31
|
if status.none? { |_, files| files.any? }
|
29
32
|
raise 'No changes since last commit'
|
data/bin/commands/status.rb
CHANGED
@@ -3,7 +3,8 @@ arg_name ''
|
|
3
3
|
command :status do |c|
|
4
4
|
c.action do |global_options, options, args|
|
5
5
|
repository = global_options[:repository]
|
6
|
-
|
6
|
+
commit_id = repository.branch_head
|
7
|
+
commit = commit_id ? repository[commit_id] : nil
|
7
8
|
status = repository.status commit,
|
8
9
|
ignore: [/^\.|\/\./]
|
9
10
|
|
data/lib/scv/version.rb
CHANGED