|
From: | Dmitry Gutov |
Subject: | bug#39452: [PATCH] vc-git-state fails for filenames with wildcards |
Date: | Sun, 29 Aug 2021 22:50:11 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 29.08.2021 19:44, Juri Linkov wrote:
Would be great to add some test, though. vc-tests.el currently doesn't exercise vc-rename-file at all.Just added the tests for vc-rename-file.Thanks, I tried to run the test, but it fails: Test vc-test-rcs05-rename-file condition: (ert-test-failed ((should (equal (vc-state new-name) 'added)) :form (equal up-to-date added) :value nil :explanation (different-atoms up-to-date added))) FAILED 12/12 vc-test-rcs05-rename-file
Could you go ahead and fix the expectation?The check is near the end of vc-test--rename-file, and the expected value can be made to depend on the current backend.
I could only run the tests with Git, Hg and Bzr, and I couldn't find any CI builds for Emacs that are still working.
Another question: after removing vc-git--literal-pathspecs from vc-git-rename-file, does this mean that vc-git-rename-file now doesn't support literal paths? Maybe it could be possible to fix vc-git--literal-pathspecs to support relative literal paths for vc-git-rename-file?
The original problem just meant that 'git mv' never supported pathspecs (which makes sense), that's why it broke after the change. Now we pass file names to it (which it interprets literally), and all is well.
[Prev in Thread] | Current Thread | [Next in Thread] |