Skip to content

Commit e16c2b6

Browse files
committed
UNFINISHED work
Signed-off-by: alexis-opolka <[email protected]>
1 parent c045358 commit e16c2b6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/commands/repo/sync.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ fn synchronize(cheat_repo: String) -> Result<()> {
5454
// git::pull(&cheat_repo)?;
5555
let r = git::remote_update(&cheat_repo)?;
5656

57-
eprintln!("Status: {:?}", r.code());
57+
58+
59+
eprintln!("Status: {:?}", r);
5860
return Ok(());
5961

6062
// We delete them since they are now out of tree
@@ -76,6 +78,7 @@ fn synchronize(cheat_repo: String) -> Result<()> {
7678
let path_str = e.to_str().unwrap_or("");
7779
let path_string = path_str.to_string();
7880

81+
// If we have a directory path => we return nothing
7982
if e.is_dir() {
8083
if path_str != cheat_repo && (! path_str.contains(".git")) {
8184
cheat_dirs.push(path_str.to_owned());
@@ -84,13 +87,12 @@ fn synchronize(cheat_repo: String) -> Result<()> {
8487
return "".to_string();
8588
}
8689

87-
8890
if cheat_files.contains(&path_string) {
8991

9092
return "".to_string()
9193
}
9294

93-
// We substract the path of the cheatsheet root folder to let us get
95+
// We subtract the path of the cheatsheet root folder to let us get
9496
// a matching path for the git_file's condition.
9597
let cheat_str = cheat_path.display().to_string();
9698
let cheat_str = cheat_str.as_str();

0 commit comments

Comments
 (0)