feat: cmd-status #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cmd-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds a
sac statuscommand, that lists changed and deleted files.Additionally
sac syncwill now log changed files relative to the current working directory.@ -0,0 +205,20 @@fn list_files(&self, out: String, status: StatusType) -> anyhow::Result<String> {let files = match status {StatusType::Created => &self.created,StatusType::Modified => &self.modified,StatusType::Deleted => &self.deleted,StatusType::Merged => &self.merged,StatusType::Typechange => &self.typechange,};if files.len() == 0 {return Ok(out);}let mut out = out + &status.header();for path in files.iter() {let path = StatusReport::relative_to_cwd(path)?;out += &status.file(&path);}return Ok(out);}fn relative_to_cwd(path: &str) -> anyhow::Result<String> {This is a new function