Arc diff fails due to git cmd fails

error message:

Running unit tests...
No unit test engine is configured for this project.


    Provide explanation for skipping lint or press Enter to abort: .
Upload complete.
 PUSH STAGING  Pushing changes to staging area...
 Exception
Command failed with error #128!
COMMAND
git ls-files -z -- ':(attr:filter=lfs)'

STDOUT
(empty)

STDERR
fatal: Invalid pathspec magic 'attr:filter=lfs' in ':(attr:filter=lfs)'

(Run with `--trace` for a full exception trace.)

arc version:
arcanist 4d55067fd87f57f724c29a4f685e2de80ce4fbf6 (29 Mar 2020)

how to reproduce:
arc diff

What version of Git are you using? (What is the output of git --version?)

my bad for forgetting that.
it’s 2.7.4

actually arc on Mar 6th doesn’t have that issue

Same issue here. git version 2.7.1

Had to rollback https://secure.phabricator.com/D21041 to get it to work

Can you show me the output of this command in your environment, when run in any Git working copy?

$ git ls-files -z – ':(attr:duck=quack)'

Here’s the behavior locally, on Git 2.21.1:

$ git ls-files -z – ':(attr:duck=quack)'
$

(That is, it exits successfully with no output.)

I suspect Git may have introduced some part of the :(attr=...) feature between Git 2.7 and Git 2.21, but that isn’t consistent with the original report that updating arc fixed the issue, so I’d like to confirm that this command simply fails on Git 2.7.

(If this is a Git version issue, a workaround is to update Git – 2.7 is about 5 years old – but I’ll make a change to arc to do version detection and avoid using newer Git features if the version of Git on the system is older.)

(Internally, see PHI1718.)

I got a confirmation of the command behavior elsewhere, and believe this is fixed by https://secure.phabricator.com/D21190.