Method: GitCli::Repos#remove_remote

Defined in:
lib/git_cli/repos.rb

#remove_remote(name) ⇒ Object

add_remote



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/git_cli/repos.rb', line 86

def remove_remote(name)

  raise_if_empty(name, "Remote name cannot be empty to remove", GitCliException)

  check_vcs

  cmd = []
  cmd << "cd"
  cmd << @wsPath
  cmd << "&&"
  cmd << @vcs.exe_path
  cmd << "remote"
  cmd << "remove"
  cmd << name

  cmdln = cmd.join(" ")
  log_debug "Remove remote config : #{cmdln}"
  res = os_exec(cmdln) do |st, res|
    
    if st.success?
      [true, res.strip]
    else
      [false, res.strip]
    end
  end

end