Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix commit message tense

  • Loading branch information...
commit c70b656b70d269f37decb1d639af4505e5dfe1da 1 parent c9fc5f2
@norbert norbert authored
View
6 lib/braid/commands/add.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
View
5 lib/braid/commands/remove.rb
@@ -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
View
5 lib/braid/commands/update.rb
@@ -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
2  lib/braid/operations.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.