-
Notifications
You must be signed in to change notification settings - Fork 282
Convert local file:
URLs to paths before handing over to git_clone
.
#280
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
Conversation
const char *workingDirectoryPath = workdirURL.path.UTF8String; | ||
// If our originURL is local, convert to a path before handing down. | ||
const char *remoteURL = NULL; | ||
if (originURL.isFileURL || originURL.isFileReferenceURL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This second check is redundant. (Reference URLs should return YES
for isFileURL
.)
Can you add tests for cloning a file path URL and a file reference URL? |
Added test. And also converted the old ones to the new Expecta-based format. And also also added more methods to GTRepository. And also also wiht fixed documentation. Wait for the intermission ;-). Can anyone confirm that the old OCUnit-based tests don't run anymore ? After converting the |
No, they do. We should remove any of the old tests that have been converted over.
Are you using the Test action? It won't stop if testing as part of a Build action.
See |
Are you definitive whey you say that they run ? Because I'm sure they don't here (I'm testing with ⌘U, Breakpoints enabled, I've tried to add a bogus Thanks for the pointers to Specta, I'll go look. |
They should if they're added to the test target and not commented out. |
Then there's something going on here... They're in the target, not commented, my Xcode 5.0.1 doesn't run them, and Travis is happy too. |
Fixes a bug where a locally-cloned remote would get a `file:` URL as it's origin URL, making the push machinery shrivel in fear.
Rebased because I'm trying to keep things concentrated and the other commits weren't relative to that bug fix. Expect another PR with more shiny new stuff soon ;-). |
@tiennou Is this ready for review? Not entirely sure what the status is, based on your last comment. |
Good for review. This is blocking #292 (and the stuff I'm doing locally afterwards) so I need it ;-). |
|
||
createRepository = ^(BOOL bare) { | ||
NSURL *newRepoURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"unit_test"]]; | ||
[NSFileManager.defaultManager removeItemAtURL:newRepoURL error:NULL]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to put some of this functionality into GHTestCase
, since it's more generally useful than just this spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point taken (I actually looked there first). But I'll do it another forthcoming PR and update that spec at the same time.
🍔 |
Okay, I'm Not Pleased At All. I just noticed that I've rewritten GTRepostoryTest in both that PR and #292. I'll close this one and cherry-pick its constituent parts to the other instead (nobody likes conflict merges). Sorry for the (slightly) duplicated review effort :-S. |
@tiennou Ha, I didn't notice that either! Whoops. 😟 |
Fixes a bug where a locally-cloned remote would get a
file:
URL as it'sorigin URL, making the push machinery shrivel in fear.