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

support for executing an external Git environment #85

Merged
merged 3 commits into from
Apr 19, 2017

Conversation

shiftkey
Copy link
Member

Fixes #68

@smashwilson I'm not sure if this is the whole solution as you saw it, but here's what it looks like in the test suite:

cross-env LOCAL_GIT_DIRECTORY=./git/ mocha --require ts-node/register test/fast/*.ts test/auth/*.ts

There's still some other assumptions around portable Git baked into this that might break for other usages, depending on how Git is setup on the user's machine:

  • GIT_EXEC_PATH - this is set at compile time, and maybe we shouldn't set this if it's already defined like we currently are. It's hard to know whether this should be set at runtime without invoking git --exec-path
  • GIT_TEMPLATE_DIR - this might fail if not set, I can't really remember exactly. It's related to initializing repositories.
  • PREFIX - defines where Git is currently installed, to override lookups to the default location of /usr/local

Maybe we need some more control here and better respect for existing environment variables, as I'd love to keep the defaults just working with the embedded Git environment.

Copy link

@smashwilson smashwilson left a comment

Choose a reason for hiding this comment

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

👍 Looks perfectly reasonable to me. My only comments are on code that was just refactored as part of this PR 😄


// bypass whatever certificates might be set and use
// the bundle included in the distibution
const sslCABundle = `${gitDir}/ssl/cacert.pem`

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

// this ensures we only ever supply one value for PATH
if (env.Path) {
delete env.Path
}

This comment was marked as spam.

This comment was marked as spam.

@shiftkey shiftkey changed the title [WIP] support for executing an external Git environment support for executing an external Git environment Apr 19, 2017
@shiftkey shiftkey merged commit ba963dd into master Apr 19, 2017
@shiftkey shiftkey deleted the use-alternate-git-environment branch April 19, 2017 10:06
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.

2 participants