diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -137,7 +137,7 @@ def reposetup(ui, repo): # Create a copy of match that matches standins instead # of largefiles. def tostandin(file): - if inctx(lfutil.standin(file), ctx2): + if working and lfutil.standin(file) in repo.dirstate: return lfutil.standin(file) return file diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -68,6 +68,8 @@ Commit preserved largefile contents. Remove both largefiles and normal files. $ hg remove normal1 large1 + $ hg status large1 + R large1 $ hg commit -m "remove files" Invoking status precommit hook R large1