Skip to content

Conversation

@carlosmn
Copy link
Member

This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.


The test isn't amazing, but it gets the job done. Locally I had to add my user as allowed to touch the file, so let's see how this goes on Appveyor.

/cc @ethomson

@ethomson
Copy link
Member

I have good news for you. It turns out that %PROGRAMDATA% is a magical wasteland of terrible. It's not actually world-writable, as was claimed in the first PR, which makes a lot of sense. Instead, there's some magical redirection that goes on if you don't have permission to write to it, where your file(s) are magically shunted off to a place like %LOCALAPPDATA%\VirtualStore\ProgramData\....

I don't know what subsequent reads of %PROGRAMDATA%\... paths do - maybe they look in your per-user %PROGRAMDATA% first ...?

This is really abysmal and I'm sorry that this crime scene has some of my fingerprints on it.

@carlosmn
Copy link
Member Author

On my dev box I have C:\ProgramData\Git\config which I can see with explorer, and before adding me as having full control over the file, git_filebuf would fail to rename the lockfile to the final location with a permission error, so I don't know if G4W does something special or what, but it does seem to exist as a regular file (at least it behaves like it). The changes made by the test do persist as well (I can open it with notepad and see the new variable).

I'm not sure if that means anything, but it looks like the test will have to make sure to create the directory (I was hoping whatever git installation it has would work the same way as on my box, which evidently it does not).

@carlosmn carlosmn force-pushed the cmn/programdata-config branch 2 times, most recently from 2906ef6 to ed93705 Compare October 21, 2015 11:32
This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.
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