GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — clibrowser/cligit/src/commands/remotes.rs at main · allthingssecurity/clibrowser Expand file tree/ Copy pathremotes.rsMore file actions 31 lines (28 loc) · 992 Bytes / Copy pathremotes.rsFile metadata and controls31 lines (28 loc) · 992 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 use anyhow::Result; use crate::cli::RemotesArgs; use crate::git_ctx::GitContext; use crate::models::*; use crate::output::OutputConfig; pub fn execute(_args: RemotesArgs, ctx: &GitContext, out: &OutputConfig) -> Result<i32> { let repo = &ctx.repo; let remote_names = repo.remotes()?; let mut remotes = Vec::new(); for name in remote_names.iter().flatten() { if let Ok(remote) = repo.find_remote(name) { remotes.push(RemoteInfo { name: name.to_string(), fetch_url: remote.url().map(String::from), push_url: remote.pushurl().map(String::from).or_else(|| remote.url().map(String::from)), }); } } let result = RemotesResult { count: remotes.len(), remotes }; if out.json { out.print_json(&result); } else { for r in &result.remotes { out.print_human(&format!("{}\t{}", r.name, r.fetch_url.as_deref().unwrap_or(""))); } } Ok(0) } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |