From a9c156e7e70e6ec259a66e5d1f5a029ab9d17b3b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2015 14:43:42 -0400 Subject: proxy: Fix removal of files deleted by the proxied command. Git.Ref.headSha doesn't really work in direct mode as there's not a head, so it was actually diffing against the empty tree and so not removing any deleted files. Get the sha of the current branch instead, which is the same thing Command.Sync does. --- Command/Proxy.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Command/Proxy.hs') diff --git a/Command/Proxy.hs b/Command/Proxy.hs index 97cfafeaf..d38a94b46 100644 --- a/Command/Proxy.hs +++ b/Command/Proxy.hs @@ -41,7 +41,8 @@ start (c:ps) = liftIO . exitWith =<< ifM isDirect where go tmp = do oldref <- fromMaybe Git.Sha.emptyTree - <$> inRepo Git.Ref.headSha + <$> (inRepo . maybe Git.Ref.headSha Git.Ref.sha + =<< inRepo Git.Branch.currentUnsafe) setuptmpworktree tmp exitcode <- proxy tmp -- cgit v1.2.3