Hi Dakota,
On Sun, 2 Apr 2017, Dakota Hawkins wrote:
> I was able to install the SDK successfully by connecting through my
> phone. Building an installer works fine.
Good. Just in case, I adjusted the build definitions I use for continuous
testing (where I need to keep several VMs synchronized with the SDK and I
use Git repositories) so that the updates to the Git repositories
mirroring the current state of the 32-bit and the 64-bit Git for Windows
SDK are also pushed to
https://github.com/git-for-windows/git-sdk-32 and
https://github.com/git-for-windows/git-sdk-64, respectively.
> I have questions about the config. Presumably, if LFS were optional in
> future installers, merely having the option unchecked should not
> remove the 'filter.lfs' section from the user's .gitconfig file (since
> LFS may be installed and in-use separately).
I would actually assume that we *should* remove the `filter.lfs` section
when removing the `git-lfs.exe` file due to an unchecked box: that section
lives in C:\Program Files\Git\mingw64\etc\gitconfig (or should live there,
I still have to fix that).
So if Git for Windows does not come with Git LFS, the system-wide
configuration makes no sense either. Instead, we should expect individual
users to install git-lfs.exe as needed, then, and also to take care of the
configuration in their ~/.gitconfig.
> Do you have any ideas about a reasonable way to handle this? It
> appears the other options just go ahead and mess with your config.
That is what I would suggest here, too ;-)
> Is there a way to remove the exe and sidestep the part of the LFS
> package that messes with your config?
Yes, we could just leave the config as-is, and have the users deal with
nasty error messages that Git LFS was not found when cloning an LFS-aware
repository.
I think we can do better, though, by removing the `filter.lfs` section
when we remove the `git-lfs.exe` anyway.
> I'll admit I'm not familiar with Inno Setup, but I'm not positive
> there's an elegant solution.
Well, as far as Pascal can ever be elegant :-)
I have to admit that most of my knowledge about InnoSetup comes from `git
grep`ing our InnoSetup configuration files and guessing what the code
does, followed by lots of trial and error.
> On the one hand, you may destroy configuration information the user
> needs to preserve.
Users are not supposed to be able to write to C:\Program
Files\Git\mingw64\etc\gitconfig. I consider that file managed by Git for
Windows, and subject to replacement by future Git for Windows versions.
> On the other hand, you may leave LFS stuff in the user's config that is
> no longer required. I'm not sure it's always going to be possible to
> make the right choice.
The real problem with leaving the config in place arises when a user wants
to clone an LFS-aware repository *without* pulling down gigabytes of data.
In that case, the user really wants to have those placeholder files. And
if the configuration is still in place (with no way to override, because
~/.gitconfig cannot unset what is defined in the system-wide config), Git
will not do what the user expects but complain that `git-lfs.exe` could
not be executed.
I'd rather remove the configuration for that reason, to improve the user
experience of an unchecked "Enable Git-LFS" checkbox.
Please note that I will have to release Git for Windows v2.12.2(2) really
soon now, as there is a critical bug
(
https://github.com/git-for-windows/git/issues/1111). All I need to do
before that release is to ensure that the `filter.lfs` section is actually
kept when we want to enable Git LFS support (at the moment, due to a bug,
the `filter.lfs` section is simply thrown away after it was diligently
copied in place). Hopefully tomorrow.
Ciao,
Johannes