Re: kate stopped warning about changed files (but only C++ files)
Albert Astals Cid <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwrite |
|---|---|
| Message-ID | <5572644.lOV4Wx5bFT@xps> |
El dissabte, 22 de febrer de 2020, a les 13:51:39 CET, Sven Brauch va escriure: > On Saturday, 22 February 2020 12:48:57 CET Albert Astals Cid wrote: > > > > Wow, is there a way I can disable this trying-to-be-smart behaviour? > > > > > > Currently only by building without libgit2 it seems. > > > > > > In what case do you find this behaviour undesirable? > > > > Always? > > The original reason for adding this behaviour was that opening 25 files and > then switching branches without changing any of them gives you lots of useless > warnings. This problem is neatly solved by the current behaviour. > > > Or to rephrase, why does it matter whether the file is in git or not to tell > > me that some changes i had made will be lost? > > I'm not sure if you have fully understood what the feature does. In no case > will changes you made be lost. Kate checks if *the exact contents of the file > before reload* are stored in version control and only reloads in that case. edit file git commit -a git reset --hard origin/master the file contents are gone. Yes i know that i did a git reset, but up to now kate always kept things for me, so I'm used to do that and then salvage the files i actually wanted to keep. Cheers, Albert > > So, if you e.g. make changes without committing them and then run "git reset > --hard", kate *will* ask you before reloading the file. If you make no changes > and switch branches, it will not. If you make changes, commit them and then > switch branches, it will also not ask. > > Greetings, > Sven > > > > >