Permalink
Browse files

Fix commit message tense

  • Loading branch information...
norbert committed Oct 11, 2009
1 parent c9fc5f2 commit c70b656b70d269f37decb1d639af4505e5dfe1da
Showing with 7 additions and 11 deletions.
  1. +2 −4 lib/braid/commands/add.rb
  2. +2 −3 lib/braid/commands/remove.rb
  3. +2 −3 lib/braid/commands/update.rb
  4. +1 −1 lib/braid/operations.rb
@@ -30,10 +30,8 @@ def run(url, options = {})
config.update(mirror)
add_config_file
- commit_message = "Added mirror '#{mirror.path}' at #{display_revision(mirror)}"
-
- git.commit(commit_message)
- msg commit_message
+ git.commit("Add mirror '#{mirror.path}' at #{display_revision(mirror)}")
+ msg "Added mirror at #{display_revision(mirror)}."
end
end
@@ -23,9 +23,8 @@ def run(path, options = {})
msg "Remote '#{mirror.remote}' not found, nothing to cleanup" if verbose?
end
- commit_message = "Removed mirror '#{mirror.path}'"
- git.commit(commit_message)
- msg commit_message
+ git.commit("Remove mirror '#{mirror.path}'")
+ msg "Removed mirror." if verbose?
end
end
end
@@ -78,15 +78,14 @@ def update_one(path, options = {})
config.update(mirror)
add_config_file
- commit_message = "Updated mirror '#{mirror.path}' to #{display_revision(mirror)}"
-
+ commit_message = "Update mirror '#{mirror.path}' to #{display_revision(mirror)}"
if error
File.open(".git/MERGE_MSG", 'w') { |f| f.puts(commit_message) }
return
end
git.commit(commit_message)
- msg commit_message
+ msg "Updated mirror to #{display_revision(mirror)}."
end
def generate_tree_hash(mirror, revision)
View
@@ -142,7 +142,7 @@ def commit(message, *args)
cmd = "git commit --no-verify"
if message # allow nil
message_file = Tempfile.new("braid_commit")
- message_file.print(message)
+ message_file.print("Braid: #{message}")
message_file.flush
cmd << " -F #{message_file.path}"
end

0 comments on commit c70b656

Please sign in to comment.