feat: cmd-status #26

Merged
krauterbaquette merged 4 commits from cmd-status into main 2025-04-07 21:13:57 +00:00

This PR adds a sac status command, that lists changed and deleted files.

Additionally sac sync will now log changed files relative to the current working directory.

This PR adds a `sac status` command, that lists changed and deleted files. Additionally `sac sync` will now log changed files relative to the current working directory.
can be used inside multiple commands (e.g. new status command)
feat: add status command
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3s
2f84ced20f
List changed / created / deleted files.
It supports specifing a path to log changes for

Issue: #16
wip: feat: log file status relative to current dir
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3s
44040bb8d0
feat: log file status relativ to currend dir
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3m14s
7ae9e4faf8
@ -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> {
Author
Owner

This is a new function

This is a new function
krauterbaquette deleted branch cmd-status 2025-04-07 21:13:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
krauterbaquette/sac!26
No description provided.