obazoud-git-external 0.5.1 → 0.6.0
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.
- data/README.markdown +1 -1
- data/bin/git-external +15 -3
- data/obazoud-git-external.gemspec +1 -1
- metadata +5 -5
data/README.markdown
CHANGED
@@ -68,7 +68,7 @@ git external rm <path>
|
|
68
68
|
git clone git://github.com/obazoud/git-external.git
|
69
69
|
cd git-external
|
70
70
|
git checkout develop
|
71
|
-
gem build obazoud-git-external.gemspec && gem install obazoud-git-external-0.
|
71
|
+
gem build obazoud-git-external.gemspec && gem install --local obazoud-git-external-0.6.0.gem
|
72
72
|
</pre>
|
73
73
|
|
74
74
|
And voilà!
|
data/bin/git-external
CHANGED
@@ -86,6 +86,12 @@ def uncommitted_changes?(path)
|
|
86
86
|
return ((diffExit == 1) ? true : false)
|
87
87
|
end
|
88
88
|
|
89
|
+
# Check for untracked files
|
90
|
+
def untracked_files?(path)
|
91
|
+
untrackedExit, untracked = execute('git ls-files', ['--others', '--exclude-standard'], path)
|
92
|
+
return ((untrackedExit == 1 || untracked.length > 0) ? true : false)
|
93
|
+
end
|
94
|
+
|
89
95
|
# Check if a branch exists
|
90
96
|
def branch_exists(path, branch)
|
91
97
|
branchesExit, branches = execute('git branch', [], path)
|
@@ -167,6 +173,12 @@ def command_status
|
|
167
173
|
changesString = ""
|
168
174
|
end
|
169
175
|
|
176
|
+
if untracked_files?(path)
|
177
|
+
untrackedString = "(Untracked Files) "
|
178
|
+
else
|
179
|
+
untrackedString = ""
|
180
|
+
end
|
181
|
+
|
170
182
|
remoteBranch = remote + "/" + gitBranch
|
171
183
|
|
172
184
|
if gitBranchExit != 0 && gitBranchExit != 1 && gitRemoteExit != 0 && gitRemoteExit != 1
|
@@ -175,14 +187,14 @@ def command_status
|
|
175
187
|
else
|
176
188
|
if branch == remoteBranch
|
177
189
|
if url == gitRemote
|
178
|
-
puts " ✓ #{path} #{changesString}"
|
190
|
+
puts " ✓ #{path} #{changesString} #{untrackedString}"
|
179
191
|
ok += 1
|
180
192
|
else
|
181
|
-
puts " ✗ #{path} #{changesString} -- expected url '#{url}' but was '#{gitRemote}'"
|
193
|
+
puts " ✗ #{path} #{changesString} #{untrackedString} -- expected url '#{url}' but was '#{gitRemote}'"
|
182
194
|
broken +=1
|
183
195
|
end
|
184
196
|
else
|
185
|
-
puts " ✗ #{path} #{changesString} -- expected branch '#{branch}' but was '#{remoteBranch}'"
|
197
|
+
puts " ✗ #{path} #{changesString} #{untrackedString} -- expected branch '#{branch}' but was '#{remoteBranch}'"
|
186
198
|
broken +=1
|
187
199
|
end
|
188
200
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'obazoud-git-external'
|
4
|
-
s.version = '0.
|
4
|
+
s.version = '0.6.0'
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.authors = ['Daniel Cestari', 'Olivier Bazoud', 'Alastair Harrison']
|
7
7
|
s.email = ["olivier.bazoud@gmail.com"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obazoud-git-external
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Cestari
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-11-
|
20
|
+
date: 2012-11-16 00:00:00 Z
|
21
21
|
dependencies: []
|
22
22
|
|
23
23
|
description: Extension for git which adds a command providing similar functionality to git submodules but without attaching each module to a single version
|