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

home folder can not easily be modified #1925

Closed
f-steff opened this issue Nov 12, 2018 · 2 comments
Closed

home folder can not easily be modified #1925

f-steff opened this issue Nov 12, 2018 · 2 comments

Comments

@f-steff
Copy link

f-steff commented Nov 12, 2018

  • [X ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.18.0.windows.1
cpu: x86_64
built from commit: cd1a74fc9dc8a07626c216940db9a51f25206e03
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.16299.726]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VIM
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?
During the AD login process to my computer, my company forces a so-called homedrive on us by setting three variables at **HKEY_CURRENT_USER\Volatile Environment** :
   HomeDrive=h:
   HomePath=\
   HomeShare=\\server\%username%$
These settings ensures that a drive named h: is mapped to the cloud drive.

This appear to screw up my windows assigned home folder, which is defined in **HKEY_CURRENT_USER\Environment** :
   HomeDrive=c:
   HomePath=\Users\%username%

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash and CMD have been tested.

  • What commands did you run to trigger this issue?

Started Git Bash or Git CMD, using the provided shortcuts at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git (With the --cd-to-home option intact)
Also by using the Win-R key-shortcut, typing in either "C:\Program Files\Git\git-bash.exe" or "C:\Program Files\Git\git-cmd.exe"

  • What did you expect to occur after running these commands?

The shell opening should have it's home folder set to the location set at HKEY_CURRENT_USER\Environment

  • What actually happened instead?

The home folder was set to the location set at HKEY_CURRENT_USER\Volatile Environment

  • What did I try to resolve this issue.

Searching on the web, I found many attempts to resolve this issue, using all kinds of hacks and workarounds, but never found an actual method to properly set the home folder to the location it's actually at.
The best "solution" I found, was to create a new environmental variable at HKEY_CURRENT_USER\Environment named HOME, with the content c:\Users%username% - this solution works ~75% of the times I tried. :-( - If the --cd-to-home option is used, it's guarantied to fail.

  • How would I like it to be solved?

Actively supporting the environmental variables HOME seems like the most flexible solution.
It could be default (during first run) be set to the location specified at HKEY_CURRENT_USER\Environment, unless a location is specified at HKEY_CURRENT_USER\Volatile Environment, in which case it should prevail.

@dscho
Copy link
Member

dscho commented Nov 28, 2018

We do not get the environment variables from the registry. We get them from the environment passed into the git.exe process. So I have no idea how we would set HOME from the "Volatile Environment". Any idea?

@dscho
Copy link
Member

dscho commented Dec 26, 2018

No idea = can close this ticket

@dscho dscho closed this as completed Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants