On 07/04/13 17:30, Kornel Benko wrote: > Am Sonntag, 7. April 2013 um 09:00:47, schrieb Pavel Sanda <sa...@lyx.org> >> Kornel Benko wrote: >> > > What's the scenario causing the further problem ? >> >> Forget about obtaining from repo for a moment. >> Just try src/lyx lib/doc/UserGuide.lyx. Do you see LyX detecting file as >> being under git (e.g. look on app title). >> Here it does not work anymore.
Ok, now I'm seeing the mines in the field, thanks. Starting with -dbg lyxvc leads to: VCBackend.cpp (1852): LyXVC: Checking if file is under git control for `UserGuide.lyx' VCBackend.cpp (43): doVCCommandCall: git status --porcelain "UserGuide.lyx" > "/tmp/lyx_tmpdir.dT3684/lyxvcout.Ea3684" VCBackend.cpp (1875): GIT control: disabled Indeed, git status --porcelain for a file *existent-on-the-FS* and existent-in-repo, as well as for a file non-existent on the FS and non-existent in repo, are the same, namely NOTHING. tommaso@mobiletom:~/lyx-trunk-ws/lyx$ git status --porcelain lib/doc/UserGuide.lyx tommaso@mobiletom:~/lyx-trunk-ws/lyx$ tommaso@mobiletom:~/lyx-trunk-ws/lyx$ git status --porcelain lib/doc/nonex.lyx tommaso@mobiletom:~/lyx-trunk-ws/lyx$ In my first patch, I had proposed to use git ls-files instead, that, differentiates among these: tommaso@mobiletom:~/lyx-trunk-ws/lyx$ git ls-files lib/doc/UserGuide.lyx lib/doc/UserGuide.lyx tommaso@mobiletom:~/lyx-trunk-ws/lyx$ git ls-files lib/doc/nonex.lyx tommaso@mobiletom:~/lyx-trunk-ws/lyx$ Now, as LyX depends on a zillion external tools in which no-one ever bothered to create any --porcelain option giving any kind of guarantee whatsoever about future usage nor output of the tools, I would be strongly inclined towards dropping git status and using git ls-files, if it's the right thing in this case..... UNLESS, comparing ls-files on recent versions of GIT and especially the versions available in recent Linux distros, leads to completely different/unpredictable results. I guess for SVN the problem is different, let me look into it. T.