-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Support for Sapling #860
Comments
Thanks for bringing this up! I didn't know about Sapling, it looks pretty interesting!
@o2sh What do you think? Do we keep Onefetch as a Git information tool, or open it up to be a "local repository information tool"? Just noting here while I'm thinking about it, not arguing for or against Sapling support: onefetch currently assumes a git repo in a lot of places, so, to support other repos, we'll definitely need to refactor. Here's a general idea that I'm thinking of: trait RepoAnalyzer {
fn repo_info() -> RepoInfo; // a subset of the `Info` struct
}
struct GitAnalyzer;
impl RepoAnalyzer for GitAnalyzer {
// ...
}
struct SaplingAnalyzer;
impl RepoAnalyzer for SaplingAnalyzer {
// ...
}
// The above format is so that we can easily plug new analyzers into the below. The trait
// might not be needed, but using it for at least example purposes.
enum Repo {
Git,
Sapling,
}
impl Repo {
fn detect(path: Path) -> Result<Self> {
// if .git exists, return Git. etc.
// if no repos detected, or multiple detected, Err
}
fn analyze(&self) -> RepoInfo {
match self {
Self::Git => GitAnalyzer::repo_info(),
Self::Sapling => SaplingAnalyzer::repo_info(),
}
}
} |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Since this issue has gone stale and been closed as "not planned", I think it's OK to post this: @hacker-DOM I rewrote this personal project "repofetch" to support 3rd-party plugins. So, if you want, you could write a plugin for sapling support. |
Summary 💡
So I'm playing around with Sapling and it looks fantastic; the only thing I'm missing is onefetch haha
It would be great if Sapling support was added to oneftech 🙏
Motivation 🔦
No response
The text was updated successfully, but these errors were encountered: