dev 2.0.134 → 2.0.135
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/lib/commands/commit.rb +15 -10
- 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: 598d1305055fc2abb292607133eb8ce5b7a7d17b
|
4
|
+
data.tar.gz: cee1a91ecfe3766b194292a37ced5edf71a6e34f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d89c1bdc0c38759104ed8e8e3048933ba5ad8216e1ca40131d8f04c90ac4a5bb5002d72e56fb86ca30660e822adc920cc0919d6cf0e1825717f6872960578a9d
|
7
|
+
data.tar.gz: 5f4f42ece0921f9d68dd8650329d7dfe9b67fc985f9f09456133c2318a6444a4a3d94e29988ee58dce2c30d75ebb1870483a8c39be347d9c020d3e93ec82cc47
|
data/lib/commands/commit.rb
CHANGED
@@ -2,24 +2,30 @@
|
|
2
2
|
|
3
3
|
class Commit < Array
|
4
4
|
def update
|
5
|
+
message=""
|
6
|
+
message=IO.read('commit.message').strip if File.exists?('commit.message')
|
7
|
+
|
5
8
|
if(File.exists?('.git') && `git config --list`.include?('user.name='))
|
6
9
|
if(!`git status`.include?('nothing to commit') &&
|
7
10
|
!`git status`.include?('untracked files present'))
|
8
|
-
if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
|
9
|
-
|
11
|
+
if(message.length==0)#File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
|
12
|
+
if(defined?(REQUIRE_COMMIT_MESSAGE))
|
13
|
+
Commit.reset_commit_message
|
14
|
+
raise "commit.message required to perform commit"
|
15
|
+
else
|
16
|
+
add "git commit -m'all'"
|
17
|
+
end
|
10
18
|
else
|
11
|
-
add "git commit -m'
|
19
|
+
#add "git commit -a -v -m \"#{File.read('commit.message')}\""
|
20
|
+
add "git commit -a -v --file commit.message"
|
21
|
+
add "<%Commit.reset_commit_message%>"
|
12
22
|
end
|
13
|
-
|
14
|
-
add "<%File.open('commit.message','w'){|f|f.write('')}%>"
|
23
|
+
# add "<%File.open('commit.message','w'){|f|f.write('')}%>"
|
15
24
|
end
|
16
25
|
end
|
17
26
|
if(File.exists?('.svn'))
|
18
|
-
message
|
19
|
-
message=IO.read('commit.message').strip if File.exists?('commit.message')
|
20
|
-
if(!File.exists?('commit.message') || message.length==0)
|
27
|
+
if(message.length==0)
|
21
28
|
if(defined?(REQUIRE_COMMIT_MESSAGE))
|
22
|
-
puts "commit.message required to perform commit"
|
23
29
|
Commit.reset_commit_message
|
24
30
|
raise "commit.message required to perform commit"
|
25
31
|
else
|
@@ -28,7 +34,6 @@ class Commit < Array
|
|
28
34
|
else
|
29
35
|
add 'svn commit --file commit.message'
|
30
36
|
add "<%Commit.reset_commit_message%>"
|
31
|
-
#add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
|
32
37
|
end
|
33
38
|
end
|
34
39
|
end
|