How to avoid RCS and use git always?

Richard Kimberly Heck rikiheck at
Fri Dec 18 15:34:22 UTC 2020

On 12/17/20 6:43 PM, Pavel Sanda wrote:
> On Thu, Dec 17, 2020 at 05:19:24PM -0500, Richard Kimberly Heck wrote:
>> Obviously, we could just use the parent directory search thing. But is there
>> a reason not just to check the return value of "git status" etc? I would
>> think this was also an easier way to see if a file is under version control.
>> But perhaps it is less portable. Pavel, you must have thought about this?
> I don't remember all the discussions involved, it's long time ago, one would 
> need to dig through archives, I even believe that orginal idea was actually
> external calls.
> Thinking from top of my head, both solutions have pros and cons. E.g. external
> call might need more complex error checking (e.g. "git command not found" vs
> "git returned error X", differences across OSes), parsing problems (output
> messaging across different git versions, different locales or whatnot).
> Checking existence of a single dir/file in all parent dirs does not look as
> that bad alternative in this light...
> Two possible ways how to address the original problem
> - improve current detection for registering, in a similar way we do in findFile
> - or  explicitly show all VCS registrer functions in the menu for all backends 
>   (File>VCS>"register in {rcs,cvs,svn,git}").
> To the somewhat complimentary question - what should be the default VCS used
> in case the file is not tracked? I tend to think that RCS is a good one,
> because its way less intrusive (single ,v file next to your file) and 
> you don't need machinery to handle errors around creating new repositories
> before you can actually add the file into it.

I'll make a patch to fix the obvious problem. I'll also try to factor
that out and write some conditional code we could use to test the other
way of doing things.


More information about the lyx-users mailing list