so ive found that msys2 git does not auto-hide the .git folders, whereas git for windows does.
Since the only way i can find to make msys2 behave the same way is installing git for windows inside MSYS2 (which feels janky in its current state) i figured perhaps I can assuage git for windows into not auto hiding the .git folders.
the discrepancy is causing some folders to be indexed, some not, based on that folders attribute.
anyone able to enlighten me as to how i can stop the auto-hide .git behavior so i know going forward?
Just git grep the source code for hide_dotfiles. It is pretty ingrained with the MINGW part of the code, and will take quite an effort from your side to disentangle it and then integrating it in a way where it is shared between the MINGW and Cygwin versions of Git. It should probably follow the example of has_dos_drive_prefix() and live in compat/win32/ with a fall-back dummy implementation in git-compat-util.h.
thanks for tagging this and raising hopes it'll be baked in at some point in the future :)
I have another inquiry. installing git for windows within Msys2 seems to have hijacked my start-in directory.
cd $home or ~ still works properly, but both msys and mingw insist on starting in my system32 folder. whats the proper way to put this back as intended?
thanks for tagging this and raising hopes it'll be baked in at some point in the future :)
Sorry, I never intended to raise your hopes that this will be implemented. Unless you take lead on that, that is.
oh! got it. Well nonetheless. parity between it and the general git-for-windows is desired. I was "almost" inclined to use git-for-windows installed within msys2, I found no drawbacks apart from the hijacking of the start-in location.
even creating shortcuts with start-in set to the home directory were ignored.
i cleaned out/removed git-for-windows and related packages from msys2 to the best of my ability, and all returned to normal yet that particular behavior persisted.
I didnt want to break or muddy up things over it, so i rolled back to an earlier image and am dealing with the oddity for now.
Unfortunately i dont have the proficiency to tackle something like that, or trust me - i most certainly would. Coronavirus and all, freetime is in abundance for now :)
perhaps someone that does will see this and see it the same way/have the time to invest in it.
thanks for your time!
Well, if you open PRs that make it easier to use Git for Windows in MSYS2, they will certainly be considered.
If you clarify what you mean by hijacking, I'll even give you pointers where in the code you could start working.
Thats very kind of you. I dont even know that the "fix" would require any coding, I think it may be an alteration in a config file somewhere. I just couldnt find it with the overlap from git for windows/tortoisesvn/tortoisegit etc. Im not sure where its tangled up at.
What i mean by hijacking is it changes the directory that opening msys or mingw opens-to.
By default it opens to the home\user directory inside of Msys. After installing git-for-windows within, while the home directory was still set correctly and accessible with cd ~ etc, running msys or mingw always starts in c:\windows\system32 at that point.
even after creating a shortcut indicating the start-in location should be the msys home/user dir, it continued to open to system32.
Do you also install the git-extra package? How do you start msys or mingw? Are you using git-bash.exe?
i did install the git-extra package, however I removed it prior to the aforementioned. I wanted to see if i could find a means to incorporate git-for-windows, but not without having a way to completely remove it/restore it to default.
seems i got relatively close but not quite there.
I start via the default shortcuts created in the start menu or with a context menu entry from within HKEY_CLASSES_ROOT\Directory\Background\shell for example. This is irrelevant as it starts within the directory of my choosing though.
So in short, it is the default created MSYS/Mingw32/Mingw64 shortcuts that stopped opening in the proper dir even though their start-in dir was set properly.
In its post-install script, git-extra modifies a couple system files, including Bash's startup files. Those edits are not undone when uninstalling.
See the git-extra.install file in the git-for-windows/build-extra repository for details.
thank you once again :)