-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is cloc_git by commit supposed to already work? #3
Comments
aye, it should work: library(cloc)
getwd()
## [1] "/Users/hrbrmstr/packages/hrbrthemes"
cloc_git(".", "4ea652b9ccee7cecec394eaa4a765ff975235e9b")
## # A tibble: 6 x 10
## source language file_count file_count_pct loc loc_pct blank_lines
## <chr> <chr> <int> <dbl> <int> <dbl> <int>
## 1 . HTML 21 0.43750000 2556 0.656563062 620
## 2 . R 17 0.35416667 807 0.207295145 157
## 3 . Markdown 4 0.08333333 247 0.063447213 74
## 4 . CSS 2 0.04166667 230 0.059080401 60
## 5 . YAML 2 0.04166667 40 0.010274852 9
## 6 . JavaScript 2 0.04166667 13 0.003339327 1
## # ... with 3 more variables: blank_line_pct <dbl>, comment_lines <int>,
## # comment_line_pct <dbl>
cloc_git(".", "b2ce784686e8368c7163a75cc417b318d9a45379")
## # A tibble: 6 x 10
## source language file_count file_count_pct loc loc_pct blank_lines
## <chr> <chr> <int> <dbl> <int> <dbl> <int>
## 1 . HTML 21 0.41176471 2556 0.628318584 620
## 2 . R 19 0.37254902 920 0.226155359 180
## 3 . Markdown 4 0.07843137 305 0.074975418 83
## 4 . CSS 2 0.03921569 230 0.056538840 60
## 5 . YAML 3 0.05882353 44 0.010816126 9
## 6 . JavaScript 2 0.03921569 13 0.003195674 1
## # ... with 3 more variables: blank_line_pct <dbl>, comment_lines <int>,
## # comment_line_pct <dbl> It might just be an issue with my horribad documentation :-) |
Oh my maybe I'm using hash instead of identifier 😱🙈 |
Oh actually sha=identifier?! I get this error
|
If I print I get
|
doing the same…one sec |
setwd("~/packages/cloc")
getwd()
## [1] "/Users/hrbrmstr/packages/cloc"
cloc::cloc_git(getwd(), "3643cd09d4b951b1b35d32dffe35985dfe7756c4")
## # A tibble: 4 x 10
## source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct
## <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl>
## 1 cloc Perl 1 0.125 10059 0.9880168942 787 0.933570581
## 2 cloc Markdown 2 0.250 60 0.0058933307 31 0.036773428
## 3 cloc R 4 0.500 52 0.0051075533 22 0.026097272
## 4 cloc YAML 1 0.125 10 0.0009822218 3 0.003558719
## # ... with 2 more variables: comment_lines <int>, comment_line_pct <dbl>setwd("~/packages/cloc") I'll be able to fire up windows here later tonight and see if it's something related to Windows file system ops and the perl script and i shld try to have this fail more gracefully anyway so tis a good find regardless. |
Do you think one could use |
i have been able to replicate the issue (i get a diff error) on Windows and may have a workaround soon. interestingly enough it works from an RStudio Terminal and from CMD.EXE so it's likely a problem with the |
Cool! For my current use case I am git resetting hard at the commit bc I need to parse the NAMESPACE at that commit too so it is just easiee 😁 |
hrm. still getting unable to read the specific commit tag. will keep poking |
hrm. mebbe this? AlDanial/cloc#252 |
ah in this case better to wait and suggest the approach of copying and git resetting? |
it'll now clone remote repos provided they are specified like they are for devtools ( |
I get a bug using it 😢 but understand if it's not implemented yet!
The text was updated successfully, but these errors were encountered: