-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve check_not_dirty
git repo detection and status shell output of results.
#5820
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
check_not_dirty
, WARN if no (git) VCS is recognizedcheck_not_dirty
git repo detection and status shell output of results.
check_not_dirty
git repo detection and status shell output of results.check_not_dirty
git repo detection and status shell output of results.
Checks pass and this fixes the windows disparity of #5823. This conflicts with #5786, but its probably best if this is merged to master first, then I'll merge and resolve conflicts in #5786, avoiding the need for a @alexcrichton: r? Merge? |
Ping @alexcrichton, this bug fix should be easy to review and merge, no? |
This looks to be the same as https://github.com/alexcrichton/git2-rs/pull/335. I did a quick check, and converting the \ to / in |
Thanks for the PR for this! I'm not sure I quite understand what's going on here. I'd definitely believe that libgit2's handling of |
I want a reasonable workaround without (probably, let me know otherwise) changing the minimum release of git2-rs as a cargo dependency, and I also don't want to wait for that release. Could I just add that (\) to (/) conversion here on L171? The reason I suggest adding it, is that the verbose console logging, and the fall-back-to-workspace is I think value add, even if you are correct on the cause, @ehuss. Thoughts? @alexcrichton minimal changes to tests in this PR is correct, but your point is alluding me. As to what is going on: Most of the tests use the verbose console output, or files included in the package. While on master |
@alexcrichton the repro is:
Step 5 should fail, but it passes on Windows because it uses the path |
Hm so do we have a failing test on Windows today? How come these tests aren't failing on CI? |
No, there are no current tests that exercise this code path with a slash in it. The closest is |
Oh, sorry I missed that. My vote is to update |
Thanks @ehuss, as I said, yes, fix git2-rs for the root cause; but if we can workaround it here first, that is helpful. I went from detected-broken-on-windows (adc5074) to fixed-on-all-platforms (ad0b252) in this PR. Would you suggest any other changes for this fix? Why couldn't I just convert the slashes on that line, on windows only? |
If |
I agree with @ehuss that if the issue is in |
So do you just want to close this? The verbose console logging changes included here make the issue on windows at least testable, which seems healthy, no? Or perhaps you are less concerned about that? |
Sure yeah, closing this is ok for now. Would you like to create a dedicated PR for the UI changes? Would you be interested in making the change to git2-rs? |
Based objectively on this experience of two rejected PRs, with little to no reasonable cause understood, no I do not wish to make the changes in git2-rs, no thanks Edit: My success rate has been pretty low here, so I want to make sure we are talking about the same thing and clearly. By this:
Do you mean, a new PR that adds the verbose console logging for (Despite the fact that this PR demonstrates a workaround, at least for the test failure found?) |
Oh, and note: the tests for this potential new PR will necessarily depend on a real fix in git2-rs. |
@dekellum oh you mentioned that the console logging changes seemed like a good idea regardless so we can always have PRs for things like that, and having a workaround is fine for now as well if you'd prefer to not make a fix to git2-rs |
Fixes #5823
Also fix associated tests. This is an attempt to clarify windows+git package behavior as uncovered in #5786.
This is a Work In Progress not yet ready for merge.This conflicts with #5786, but either could be merged first, requiring a rebase/merge in the other.