lib/braid/commands/update.rb in dreamcat4-braid-0.531 vs lib/braid/commands/update.rb in dreamcat4-braid-0.533
- old
+ new
@@ -23,11 +23,16 @@
revision_message = options["revision"] ? " to #{display_revision(mirror, options["revision"])}" : ""
msg "Updating mirror '#{mirror.path}'#{revision_message}."
if mirror.type == "git-clone"
- mirror.rspec_git.update options["revision"]
+ mirror.branch = options["branch"] || mirror.branch
+ # config.update(mirror)
+ mirror.rspec_git.update mirror.branch
+ config.update(mirror)
+ add_config_file
+ commit_message = "Updated clone repository '#{mirror.path}' to #{mirror.branch}"
else
# check options for lock modification
if mirror.locked?
if options["head"]
@@ -86,13 +91,13 @@
if error
File.open(".git/MERGE_MSG", 'w') { |f| f.puts(commit_message) }
return
end
-
- git.commit(commit_message)
- msg commit_message
end
+
+ git.commit(commit_message)
+ msg commit_message
end
def generate_tree_hash(mirror, revision)
git.rm_r(mirror.path)
git.read_tree_prefix(revision, mirror.path)