You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that my .gitconfig file gets deleted and recreated every time I launch Github Desktop. This resulted in me losing my config file due to a bsod (unrelated to desktop) that occurred while desktop was starting up, corrupting the entire file.
Also, could this not result in a race-condition if I were to start Desktop and another program that reads the .gitconfig at the same time? Like Visual Studio that has a git client as an extension.
Version
GitHub Desktop: 1.1.1
Operating system: Windows 10 (1709)
Steps to Reproduce
Open the .gitconfig location in explorer
Start GitHub Desktop
notice that the .gitconfig file has moved to the end, and that the file created/modified times have been reset to the current time.
Expected Behavior
I'd expect Desktop to read the .gitconfig file, but leave it unchanged.
Actual Behavior
The .gitconfig file is read, deleted, and created again with the same contents.
I'm afraid that ultimately this will have to be something that's addressed in the git-lfs project as I don't see any (easy) way for us to work around this in Desktop.
I've opened git-lfs/git-lfs#2993 to see if the git-lfs team can take a look at it and verify or shoot down my hypothesis.
Activity
niik commentedon May 4, 2018
Hey @LazyBoot, thanks for opening this.
Looks like this is caused by us running
git lfs install --skip-repoin order to install the global LFS filters. I was under the impression that unless passed--forcegit lfs wouldn't try to overwrite the values but it seems it does. Reading through https://github.com/git-lfs/git-lfs/blob/98288ae18899244501850a92065b207ce18821f7/lfs/attribute.go#L126-L152 it certainly seems like there's provisions in there for not overwriting unless necessary.Running
git lfs install --skip-repowith theGIT_TRACE=1environment variable confirms thisWhile it doesn't attempt to replace
filter.lfs.requiredorfilter.lfs.cleanit does try to replace thefilter.lfs.smudgeandfilter.lfs.process.I think this (though I'm certainly not well-versed in the git-lfs code base) that this is because the default value of, say,
filter.lfs.process(git-lfs filter-process) is listed as an 'upgradeable' value in https://github.com/git-lfs/git-lfs/blob/1a98fa5c4065e0b692c181ddc4551d21c72945e2/lfs/attribute.go#L88 which ought to mean thatshouldResetin https://github.com/git-lfs/git-lfs/blob/1a98fa5c4065e0b692c181ddc4551d21c72945e2/lfs/attribute.go#L136 will return true and force the replace.I'm afraid that ultimately this will have to be something that's addressed in the git-lfs project as I don't see any (easy) way for us to work around this in Desktop.
I've opened git-lfs/git-lfs#2993 to see if the git-lfs team can take a look at it and verify or shoot down my hypothesis.