Skip to content

Commit ce0b915

Browse files
committed
breaking!: create 'clone' and 'restore' subcommands
1 parent 650f895 commit ce0b915

File tree

8 files changed

+780
-109
lines changed

8 files changed

+780
-109
lines changed

Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gix = "0.75"
1919
home = "0.5"
2020
pico-args = "0.5"
2121
ratatui = { version = "0.29", optional = true }
22-
serde_json = { version = "1", optional = true }
22+
serde_json = "1"
2323
serde = { version = "1", features = ["derive"] }
2424
tracing = "0.1.41"
2525
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
@@ -38,7 +38,5 @@ built = { version = "0.8", features = [
3838
] }
3939

4040
[features]
41-
default = ["github", "gitlab", "tui"]
42-
github = ["dep:serde_json"]
43-
gitlab = []
41+
default = ["tui"]
4442
tui = ["dep:crossterm", "dep:ratatui", "dep:fuzzy-matcher"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ All `workset` commands run in reference to the current directory.
2727
# Initialize a new workspace in the current directory
2828
❯ workset init
2929

30-
# Add (clone) a repository to your workspace
31-
❯ workset github.com/jqlang/jq
30+
# Add a repository to your workspace
31+
❯ workset clone github.com/jqlang/jq
3232

3333
# The repository's local path always reflects the remote path
3434
cd ./github.com/jqlang/jq
@@ -45,7 +45,7 @@ All `workset` commands run in reference to the current directory.
4545
❯ workset drop --delete ./delete_this_repo
4646

4747
# When you need to work on a repository again, it's restored from the local library
48-
❯ workset jq
48+
❯ workset restore jq
4949
```
5050

5151
The shell autocomplete is smart enough to look at your CWD and suggest repos

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,17 +271,17 @@ pub fn format_time_ago(time: std::time::SystemTime) -> String {
271271
// Under 1 day: show hours (rounded)
272272
let hours = (seconds + 1800) / 3600; // Round to nearest hour
273273
format!("{}h", hours)
274-
} else if seconds < 2592000 {
274+
} else if seconds < 2_592_000 {
275275
// Under 30 days: show days (rounded)
276276
let days = (seconds + 43200) / 86400; // Round to nearest day
277277
format!("{}d", days)
278-
} else if seconds < 31536000 {
278+
} else if seconds < 31_536_000 {
279279
// Under 1 year: show months (rounded)
280-
let months = (seconds + 1296000) / 2592000; // Round to nearest month
280+
let months = (seconds + 1_296_000) / 2_592_000; // Round to nearest month
281281
format!("{}mo", months)
282282
} else {
283283
// Over 1 year: show years (rounded)
284-
let years = (seconds + 15768000) / 31536000; // Round to nearest year
284+
let years = (seconds + 15_768_000) / 31_536_000; // Round to nearest year
285285
format!("{}y", years)
286286
}
287287
}

0 commit comments

Comments
 (0)