Skip to content

Commit

Permalink
Use remote push URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Apr 5, 2024
1 parent b59d6d1 commit 597e4c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ impl Git {
.collect())
}

/// Get the (fetch) URL for the given remote.
/// Get the (push) URL for the given remote.
pub fn remote_url(&self, remote: &str) -> miette::Result<String> {
Ok(self
.command()
.args(["remote", "get-url", &remote])
.args(["remote", "get-url", "--push", &remote])
.output_checked_utf8()
.into_diagnostic()
.wrap_err("Failed to get Git remote URL")?
Expand Down

0 comments on commit 597e4c9

Please sign in to comment.