diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -247,6 +247,8 @@ def getstandinmatcher(repo, rmatcher=Non if rmatcher and not rmatcher.always(): pats = [os.path.join(standindir, pat) for pat in rmatcher.files()] + if not pats: + pats = [standindir] match = scmutil.match(repo[None], pats, badfn=badfn) # if pats is empty, it would incorrectly always match, so clear _always match._always = False diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t --- a/tests/test-histedit-fold.t +++ b/tests/test-histedit-fold.t @@ -505,4 +505,8 @@ into the hook command. 1:9599899f62c0 a 0:79b99e9c8e49 b + $ echo "foo" > amended.txt + $ hg add amended.txt + $ hg ci -q --config extensions.largefiles= --amend -I amended.txt + $ cd ..