-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Test failures in git-repository from_bare_parent_repo
from_nonbare_parent_repo
#509
Comments
Thanks for letting me know, I will take a look. Could you also post your |
We could also default the version to something minimal, but let's shoot for being able to parse all versions for now.
Yes thanks: $ git --version
git version 2.37.2 |
Thanks! It's strange though, I had expected something more special, after all it appears to be unable to interpret I have beefed up the error reporting (or so I hope) in |
Edit: I think I found the issue and fixed it. See #511 Yes thank you. I did a typical git pull, then tyipcal cargo test. failures:
---- repository::worktree::from_bare_parent_repo stdout ----
thread 'repository::worktree::from_bare_parent_repo' panicked at 'git version to be parsable: "Could not parse version from output of 'git --version' (\"git version 2.37.2\\n\") with error: invalid digit found in string"', tests/tools/src/lib.rs:69:79
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- repository::worktree::from_nonbare_parent_repo stdout ----
thread 'repository::worktree::from_nonbare_parent_repo' panicked at 'Lazy instance has previously been poisoned', /Users/jph/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.13.0/src/lib.rs:1231:25
failures:
repository::worktree::from_bare_parent_repo
repository::worktree::from_nonbare_parent_repo
test result: FAILED. 90 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s
error: test failed, to rerun pass '--test git' |
See #511 See this function:
Possibly this line...
...should be changed to something like:
Or even better changed to the logic of "where b is not digit and not period". And also a new test case for output that has a trailing newline? Some defensive code could help perhaps, such as moving the three numbers out of the tuple and into a step-by-step assignment, such as:
|
Great, thanks a lot for the fix! I think it's alright to keep it as simple as possible and wait for the improved error handling to tell us about other ways of git reporting its version so parsing can be improved as needed. Thanks again for your involvement, much appreciated. |
Duplicates
Current behavior 😯
I'm trying git-repository for the first time, and seeing test failures:
Output:
Expected behavior 🤔
Expected: tests all pass
Steps to reproduce 🕹
Reproduce:
I'm using current macOS on M1:
$ uname -a Darwin … 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64
The text was updated successfully, but these errors were encountered: