nsync 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/nsync/producer.rb +10 -6
- data/nsync.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/nsync/producer.rb
CHANGED
@@ -61,7 +61,8 @@ module Nsync
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def latest_changes
|
64
|
-
|
64
|
+
# TODO: change to using --work-tree in git
|
65
|
+
diff = config.cd { repo.git.native('diff', {:full_index => true}) }
|
65
66
|
diff += diff_untracked_files
|
66
67
|
|
67
68
|
if diff =~ /diff --git a/
|
@@ -77,11 +78,14 @@ module Nsync
|
|
77
78
|
# gets untracked files into the diff output
|
78
79
|
# hack from http://stackoverflow.com/questions/855767/can-i-use-git-diff-on-untracked-files
|
79
80
|
def diff_untracked_files
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
81
|
+
# TODO: change to using --work-tree in git
|
82
|
+
config.cd do
|
83
|
+
response, err = repo.git.sh(<<-CMD)
|
84
|
+
git --git-dir='#{repo.git.git_dir}' ls-files -d --others --exclude-standard |
|
85
|
+
while read -r i; do git --git-dir='#{repo.git.git_dir}' diff -- /dev/null "$i"; done
|
86
|
+
CMD
|
87
|
+
response
|
88
|
+
end
|
85
89
|
end
|
86
90
|
|
87
91
|
|
data/nsync.gemspec
CHANGED