]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.cpp
FindAdv: Amend ec387b6d: Handle search for '{' and '}'
[lyx.git] / src / VCBackend.cpp
index f1f19b23a38c83064fc009ca6191a5fd686274a2..b20a586090379718c4e153a69e22488cb6673b1d 100644 (file)
@@ -161,8 +161,8 @@ bool RCS::retrieve(FileName const & file)
 {
        LYXERR(Debug::LYXVC, "LyXVC::RCS: retrieve.\n\t" << file);
        // The caller ensures that file does not exist, so no need to check that.
-       return doVCCommandCall("co -q -r " + quoteName(file.toFilesystemEncoding()),
-                              FileName()) == 0;
+       int const ret = doVCCommandCall("co -q -r " + quoteName(file.toFilesystemEncoding()));
+       return ret == 0;
 }
 
 
@@ -1830,7 +1830,7 @@ bool GIT::findFile(FileName const & file)
        string const fname = onlyFileName(file.absFileName());
        LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under git control for `"
                        << fname << '\'');
-       int const ret = doVCCommandCall("git log " + quoteName(fname),
+       int const ret = doVCCommandCall("git log -n 0 " + quoteName(fname),
                        file.onlyPath());
        bool const found = (ret == 0);
        LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled"));