Skip to content
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

Use git -C instad of Dir.chdir #352

Merged
merged 3 commits into from
Sep 8, 2016

Conversation

benasher44
Copy link
Member

@benasher44 benasher44 commented Sep 7, 2016

This removes all of the git-related Dir.chdirs. There's only one left, but I'm not sure that one is as easy to circumvent? This fixes issues related to CocoaPods not being able to find source repos and trying to re-create existing ones.

def git(args, include_error: false)
command = 'git ' << args.join(' ')
def repo_git(args, include_error: false)
command = "git -C #{repo} " << args.join(' ')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this shell command get quoted properly?

@segiddins
Copy link
Member

What version of git introduced the -C flag?

@benasher44
Copy link
Member Author

Looks like 1.8.5

@orta
Copy link
Member

orta commented Sep 8, 2016

I think system git is 2.7.4

~/d/j/l/jest (master) ⏛  git --version
git version 2.7.4 (Apple Git-66)

Though this may be sierra specific

@benasher44
Copy link
Member Author

Xcode 7 git is 2.7.4 as well. You can do the following to verify with your Xcode version:

/Applications/Xcode.app/Contents/Developer/usr/bin/git --version

@benasher44
Copy link
Member Author

Looks like Xcode 8b6 git is 2.8.4. Haven't had a chance to check GM

@orta
Copy link
Member

orta commented Sep 8, 2016

I doubt they'll jump back a major version, so that should be 👍

@endocrimes
Copy link
Member

@benasher44 🚢

@lilyball
Copy link

lilyball commented Sep 8, 2016

GM is still git 2.8.4.

@CocoaPods CocoaPods locked and limited conversation to collaborators Sep 8, 2016
@CocoaPods CocoaPods unlocked this conversation Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants