Commit 1fc3565c56091ad1893f04789ccb5325925d573c
- Date: Fri Apr 04 18:52:48 +0000 2008
- Committer: David A. Cuadrado (krawek@gmail.com)
- Author: David A. Cuadrado (krawek@gmail.com)
- Commit SHA1: 1fc3565c56091ad1893f04789ccb5325925d573c
- Tree SHA1: 58bcbeb086ed422231826eecdaa01261631ae16a
Fixed
Signed-off-by: David A. Cuadrado <krawek@gmail.com>
Commit diff
| |   |
| 22 | 22 | |
| 23 | 23 | quit = false |
| 24 | 24 | modified = false |
| 25 | | if not options[:all] and not changeset["modified"].empty? |
| 26 | | changeset["modified"].uniq! |
| 27 | | changeset["modified"].each { |v| |
| 25 | modified_files = changeset["modified"] |
| 26 | if not options[:all] and modified_files and not modified_files.empty? |
| 27 | modified_files.uniq! |
| 28 | modified_files.each { |v| |
| 28 | 29 | info "File: #{v}" |
| 29 | 30 | $stdout.puts git.diff({:color => true}, v) |
| 30 | 31 | $stdout.puts "" |
| toggle raw diff |
--- a/lib/gitorious/commands/record.rb
+++ b/lib/gitorious/commands/record.rb
@@ -22,9 +22,10 @@ Gitorious.register_command :record, "Save the changes" do |options|
quit = false
modified = false
- if not options[:all] and not changeset["modified"].empty?
- changeset["modified"].uniq!
- changeset["modified"].each { |v|
+ modified_files = changeset["modified"]
+ if not options[:all] and modified_files and not modified_files.empty?
+ modified_files.uniq!
+ modified_files.each { |v|
info "File: #{v}"
$stdout.puts git.diff({:color => true}, v)
$stdout.puts "" |