Compare commits

..

24 commits

Author SHA1 Message Date
dc1ceba1a4
utils: reorganize module structure
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5b51e349ea67e27170e3a3ebe6b1d3fe6a6a6964
2026-03-03 23:33:14 +03:00
369fd9b352
cli/commands: update all commands to use global_yes parameter
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4d95a425f2bed75aed1b5233adf1a3646a6a6964
2026-03-03 23:33:13 +03:00
0288be07f9
model: add file_count_preference for multi-file selection support
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia27c829dbcc21a7fcfc8e6f67f9e33276a6a6964
2026-03-03 23:33:12 +03:00
e47690a858
model/lockfile: update tests to use get_project
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2163215bc069431e3d6d53c9c14dd15c6a6a6964
2026-03-03 23:33:11 +03:00
bb562b542d
cli/commands: use create_all_platforms to reduce duplication in update cmd
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I00d3029de7c13a57cefb1b6eaae9f1606a6a6964
2026-03-03 23:33:10 +03:00
0a15e0b1f3
treewide: remove dead code
Also deletes some dead_code annotations from functions that are
*actually used*.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic815cacc93c464078ead1674e7523d8b6a6a6964
2026-03-03 23:33:09 +03:00
b72c424ebb
cli: fix global -y flag conflicts in add-prj` and sync commands
`AddPrjArgs` had a local `-y` flag that conflicted with the global flag,
causing runtime panics. Removed the local field and updated callers to
use `global_yes` consistently.

The sync command now respects the global `-y` flag by accepting, you
guessed it, the `global_yes` parameter.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7b7c42fabbca0e363bd18a1d8b6b3bb76a6a6964
2026-03-03 23:33:08 +03:00
344dc0c7e7
model/project: simplify file selection sorting logic
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0acf8e690157f1926a2658165592199d6a6a6964
2026-02-27 22:26:44 +03:00
4eb2d8d092
model/lockfile. one less clone!
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8dbfc511fc07273a69953b03404efc656a6a6964
2026-02-27 22:26:43 +03:00
14264931dd
model/enums: derive Ord for ReleaseType to simplify comparisons
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id47e4e40e015b1212815addbbca238456a6a6964
2026-02-27 22:26:42 +03:00
f70e3b8690
cli/commands: use constants for repeated platform names
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I33c2cb59c73791a16f322e8544161a496a6a6964
2026-02-27 22:26:41 +03:00
34976a66d2
treewide: general cleanup
Finally had the time to clean up after myself. Does a bunch of things,
without breakage as far as I'm aware. I've removed around 20 unnecessary
clones, and simplified the architechture a little bit. 

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4d22337b997a3bf5b0593e6068cd1bd86a6a6964
2026-02-27 21:55:59 +03:00
e783178493
lockfile: remove unused new method
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If64632acaf9805b68a662e25aebe60216a6a6964
2026-02-21 19:56:05 +03:00
5a7762ac13
rate-limiter: re-validate burst window in loop after sleep
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iaa63eef1f055b9a98c90739025bd3ff36a6a6964
2026-02-21 19:56:04 +03:00
255220b43c
export: introduce `export_profile to reduce boilerplate; cleanup
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I30469f47be8df27ee2a31f1acdcd68a16a6a6964
2026-02-21 19:56:03 +03:00
fc2d89892c
model/lockfile: revert get_project to O(n) linear scan; remove unused project index
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3a35ab4ce5dec8ce95a736440fa293fe6a6a6964
2026-02-21 19:56:02 +03:00
8ed0b6fb12
rate-limiter. re-acquire lock after sleep to prevent use-after-free
I thought rust fixed this...

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3a2fe427cdc19a6317510e8736fe46d56a6a6964
2026-02-21 19:55:48 +03:00
7ee9ee1159
various: shared HTTP client with connection pooling
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id13c17e9352da970a289f4e3ad909c5b6a6a6964
2026-02-19 00:22:48 +03:00
0cc72e9916
platform: add mockito HTTP tests to modrinth
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I880c11195559fcfb9701e945a10fe87b6a6a6964
2026-02-19 00:22:47 +03:00
4fc05e71e7
chore: bump dependencies
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic1fda520473e53d1a584a3dda63ffda86a6a6964
2026-02-19 00:22:46 +03:00
fa5befff3b
cli: add --all, --updates, --no-deps flags to commands
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I25581b8de945284b4ce7c2c85601a86f6a6a6964
2026-02-19 00:22:45 +03:00
b71b2862c9
infra: add clippy allows; fix PathBuf -> Path
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I07795374f678fa2ec17b4171fa7e32276a6a6964
2026-02-19 00:22:44 +03:00
27160a1eda
platform: add CurseForge side detection from categories
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I62c5117ed97bbc2389330720b4761a716a6a6964
2026-02-19 00:22:43 +03:00
5385c0f4ed
cli: wire shelve flag; more clippy fixes
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I694da71afe93bcb33687ff7d8e75f04f6a6a6964
2026-02-19 00:22:42 +03:00
2 changed files with 2 additions and 2 deletions

View file

@ -255,7 +255,7 @@ fn execute_init(
local_config.parent_config_hash = Some(config_hash);
}
// Now clone from the local path into .pakku/parent, this avoids
// Now clone from the local path into .pakku/parent this avoids
// re-downloading objects
let parent_path = Path::new(&parent_path_str);

View file

@ -441,7 +441,7 @@ pub fn ahead_behind<P: AsRef<Path>>(
})?;
Ok((ahead, behind))
} else {
// Remote ref missing, count commits reachable from local
// Remote ref missing count commits reachable from local
let ahead_count = count_commits(&repo, local_oid)?;
Ok((ahead_count, 0))
}