74b41b2f570f

list only folders with a head in steal --list, so Kepr's own .kepr folder in the remote is never named as a repo (3.2.25)

time
2026-09-29 19:43 UTC · 1 week ago
machine
Junes-MacBook-Pro.local
agent
claude-opus-5-5
session
steal list repos only
parent
135d14574f3d
4 files VERSION+1 −1src/cli/cmd_steal.v+3 −1tests/cli_test.v+4 −0v.mod+1 −1
VERSION+1 −1
@@ -1 +1 @@1-3.2.241+3.2.25

view file

src/cli/cmd_steal.v+3 −1
@@ -377,8 +377,10 @@377377 	keys := backend.list('') or { return refuse(args.json(), err.msg()) }378378 	mut names := map[string]bool{}379379 	for key in keys {380+		// A repo is a folder with a `head`. Anything else at the top of the remote, such as381+		// Kepr's own `.kepr/` folder of uploads, is not one and cannot be stolen.380382 		parts := key.trim_left('/').split('/')381-		if parts.len > 0 && parts[0] != '' {383+		if parts.len == 2 && parts[0] != '' && parts[1] == 'head' {382384 			names[parts[0]] = true383385 		}384386 	}

view file

tests/cli_test.v+4 −0
@@ -1115,6 +1115,10 @@11151115 	assert run_home(a, home, 'steal').code == 011161116 	assert os.exists(os.join_path(a, 'b.txt'))11171117 	assert run_home(b_parent, home, 'steal', '--list').out.contains('proj')1118+	// Kepr keeps its own files in the same remote; a folder without a `head` is no repo.1119+	os.mkdir_all(os.join_path(remote, '.kepr', 'media', 'proj')) or { panic(err) }1120+	os.write_file(os.join_path(remote, '.kepr', 'media', 'proj', 'a.png'), 'png') or { panic(err) }1121+	assert run_home(b_parent, home, 'steal', '--list', '--json').out.contains('"repos":["proj"]')11181122 	write(a, 'clash.txt', 'base\n')11191123 	assert run_home(a, home, 'save', 'clash base').code == 011201124 	assert run_home(b, home, 'steal').code == 0

view file

v.mod+1 −1
@@ -1,6 +1,6 @@11 Module {22 	name: 'koh3'3-	version: '3.2.24'3+	version: '3.2.25'44 	description: 'One SQLite file per repo, one line of history.'55 	license: 'MIT'66 }

view file