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
Notes
The 2.43.0 gitignore man page includes this note, which I used to trace back to the revert commit above:
An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.
Versions
vcsh: 2.0.5 standalone
git: 2.43.0
The text was updated successfully, but these errors were encountered:
Ah, there it is. #196 needs to be reverted, since the corresponding change was reverted (I think all the way back around git 2.8, if I'm reading right 😳)
Yuck. Thanks for tracking this down (and I was affected too bug figured it was something weird I did locally and hadn't tracked it down with a test case).
FixesRichiH#333.
In git 2.7.0, new git behavior changed gitignore to no longer require
un-ignoring every parent directory above an un-ignored file. vcsh
updated its logic around this in PR RichiH#196 (vcsh commit e4f4ecf).
Unfortunately, git's change was reverted before 2.8.0-rc4 (git commit
5cee349).
This change therefore reverts the logic change in RichiH#196 causing `vcsh
write-gitignore` to once again emit parent directories into generated
`.gitignore.d/<repo>` files.
See RichiH#333 for the gory details.
Repro steps
vcsh foo
.gitignore.d/foo
exists and is up-to-date. Update viavcsh write-gitignore foo
if needed.git add <some modified file, in a subdirectory and already tracked by foo and in the above gitignore>
Expected results
git add
just works.Actual results
git add
produces the "force me" error message, such as the following for a file under~/.config
:Ugh, it looks like git reverted the enhancement regarding gitignore parent directories, and we need to resurrect the old code that added each parent directory of a controlled file into
.gitignore.d/foo
:Notes
The 2.43.0 gitignore man page includes this note, which I used to trace back to the revert commit above:
Versions
vcsh: 2.0.5 standalone
git: 2.43.0
The text was updated successfully, but these errors were encountered: