touchstone icon indicating copy to clipboard operation
touchstone copied to clipboard

Touchstone fails when there is a slash in the branch name

Open sbfnk opened this issue 2 years ago • 1 comments
trafficstars

Failures might be occurring in multiple places because of the way touchstone relies on traversing paths for identifying branches but here's a reprex showing that this is an issue in benchmark_ls:

library("touchstone")
#> ✖ Could not find git repository from current working directory!
#> ℹ Please manually set the option "touchstone.git_root".

touchstone_clear()
branch <- "main"
atomic <- bench::mark(1 + 1, iterations = 1)
benchmark_write(atomic, name = "x", branch = branch)
## works with branch name "main"
benchmark_ls()
#> # A tibble: 1 × 2
#>   name  branch
#>   <chr> <chr> 
#> 1 x     main

touchstone_clear()
branch <- "test/branch"
atomic <- bench::mark(1 + 1, iterations = 1)
benchmark_write(atomic, name = "x", branch = branch)
## doesn't work with branch name "test/branch"
benchmark_ls()
#> # A tibble: 0 × 2
#> # ℹ 2 variables: name <chr>, branch <chr>

Created on 2023-10-25 with reprex v2.0.2

sbfnk avatar Oct 25 '23 08:10 sbfnk

Thanks for the detailed report. I currently don't have the capacity to fix this, but contributions are welcome.

lorenzwalthert avatar Oct 25 '23 08:10 lorenzwalthert