[LyX/master] Simplify checking whether files are controlled by SVN and GIT.

Richard Kimberly Heck rikiheck at lyx.org
Tue Mar 9 03:48:07 UTC 2021


On 3/8/21 5:35 PM, Pavel Sanda wrote:
> On Wed, Mar 03, 2021 at 04:53:23PM +0100, Pavel Sanda wrote:
>> On Sat, Jan 09, 2021 at 12:12:45AM -0500, Scott Kostyshak wrote:
>>>>> I can see why the implementation in the previous version of using git-ls
>>>>> was complex since we had to redirect output to a file and check it, but
>>>>> what about using "git ls-files --error-unmatch <file name>" ? The
>>>>> "--error-unmatch" seems to make it so we don't have to check a file.
>>>>> The only annoyance I see is that there is no "--quiet" option so we
>>>>> would need to redirect the output. I can look into adding a "quiet"
>>>>> argument to doVCCommandCall() that would quiet both STDOUT and STDERR if
>>>>> the attached patch is on the right track.
>>>> It looks right to me.
>>>>
>>>> Enrico may have good ideas about how to do the redirection.
>>> Sounds good. If anyone knows a good approach, please feel free to merge it into the patch and commit. Or describe the approach and I'll implement it.
>> I hope to check the git part once I have some spare time.
> Found some time to check and agree that current code for git findFile in the master is wrong.
>
> I'm not entirely against --error-unmatch solution but it would need confirmation
> that the whole construct works on other platforms (I really mean Windows) -- we do
> not use this elsewhere in VCS routines.
>
> Riki, unless you object I suggest to revert the whole 7e5c42593e45 because it seems
> to bring more problems then it solves... Would that be Ok with you?

OK, go ahead. We can try something else later.

Riki




More information about the lyx-devel mailing list