aboutsummaryrefslogtreecommitdiff
path: root/src/workspace/git
diff options
context:
space:
mode:
Diffstat (limited to 'src/workspace/git')
-rw-r--r--src/workspace/git/mod.rs3
-rw-r--r--src/workspace/git/status.rs19
2 files changed, 0 insertions, 22 deletions
diff --git a/src/workspace/git/mod.rs b/src/workspace/git/mod.rs
index b00cf3b3..b17cd347 100644
--- a/src/workspace/git/mod.rs
+++ b/src/workspace/git/mod.rs
@@ -18,6 +18,3 @@ pub use self::{
git_status_snapshot_for_cwd_with_demand, GitStatusCacheEntry, GitStatusRefreshDemand,
},
};
-
-#[cfg(test)]
-pub(super) use self::status::git_ahead_behind;
diff --git a/src/workspace/git/status.rs b/src/workspace/git/status.rs
index 9f40170c..1c29d75c 100644
--- a/src/workspace/git/status.rs
+++ b/src/workspace/git/status.rs
@@ -314,25 +314,6 @@ fn read_upstream(repo: &mut RepoContext, branch: &str) -> Option<GitUpstreamIden
})
}
-#[cfg(test)]
-pub(crate) fn git_ahead_behind(cwd: &Path) -> Option<(usize, usize)> {
- super::discovery::git_repo_root(cwd)?;
-
- let output = std::process::Command::new("git")
- .arg("-C")
- .arg(cwd)
- .args(["rev-list", "--left-right", "--count", "HEAD...@{upstream}"])
- .output()
- .ok()?;
-
- if !output.status.success() {
- return None;
- }
-
- let stdout = String::from_utf8(output.stdout).ok()?;
- parse_git_ahead_behind_output(&stdout)
-}
-
fn git_ahead_behind_between(
cwd: &Path,
head_oid: &str,