Skip to content

Commit

Permalink
reorganize braid remove messages
Browse files Browse the repository at this point in the history
  • Loading branch information
cristibalan committed Nov 20, 2008
1 parent 9b36d06 commit 1b35d99
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/braid/commands/remove.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,21 @@ def run(path, options = {})

git.rm_r(mirror.path)

# will need this in case we decide to remove the .git/config entry also
# setup_remote(mirror)

config.remove(mirror)
add_config_file

commit_message = "Removed mirror '#{mirror.path}'"
git.commit(commit_message)
msg commit_message

if options[:keep]
msg "Not removing remote '#{mirror.remote}'"
msg "Not removing remote '#{mirror.remote}'" if verbose?
elsif git.remote_url(mirror.remote)
msg "Removed remote '#{mirror.path}'"
msg "Removed remote '#{mirror.path}'" if verbose?
git.remote_rm mirror.remote
else
msg "Remote '#{mirror.remote}' not found, nothing to cleanup"
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
end
end
end
Expand Down

0 comments on commit 1b35d99

Please sign in to comment.