Skip to content

git-lfs ignores GIT_SSH enviroment variable - #380

Closed
bozaro wants to merge 1 commit into
git-lfs:masterfrom
bozaro:evironment
Closed

bozaro wants to merge 1 commit into
git-lfs:masterfrom
bozaro:evironment

Conversation

@bozaro

@bozaro bozaro commented Jun 11, 2015

Copy link
Copy Markdown
Contributor

No description provided.

@michael-k

Copy link
Copy Markdown
Contributor

This is already covered by #378 (0ca3060).

Comment thread lfs/ssh.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great, but typically we've been putting this stuff in the *lfs.Configuration struct so that we only have to check the ENV once per git lfs process.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not really:

$ grep -Ri "os.Getenv" *
lfs/credentials.go:         if exitErr.ProcessState.Success() == false && os.Getenv("GIT_TERMINAL_PROMPT") == "0" {
lfs/http.go:    if sslVerify == "false" || len(os.Getenv("GIT_SSL_NO_VERIFY")) > 0 {
lfs/util.go:    logPath := os.Getenv("GIT_LFS_PROGRESS")
lfs/config.go:      isTracingHttp: len(os.Getenv("GIT_CURL_VERBOSE")) > 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah you're right, I'm thinking of one of our internal projects :) I still think it's a good thing to do, especially for anything that's called multiple times. Two of those 4 matches are cached.

@bozaro

bozaro commented Jun 11, 2015

Copy link
Copy Markdown
Contributor Author

@technoweenie
Maybe, but I'm not ready to do it. I was first to meet any project in golang and not ready to write quality code 😞

@technoweenie

Copy link
Copy Markdown
Contributor

@bozaro I want to see how #378 (which implements this) shakes out first though.

I really appreciate the feedback and PRs you've submitted. As @michael-k pointed out, I too put in several uncached os.Getenv() calls too :)

@bozaro

bozaro commented Jun 17, 2015

Copy link
Copy Markdown
Contributor Author

Update commit for using Config.Getenv provided by #387

@bozaro

bozaro commented Jun 18, 2015

Copy link
Copy Markdown
Contributor Author

Close as duplicate of #404

@bozaro bozaro closed this Jun 18, 2015
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.

3 participants