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.
This commit is contained in:
parent
2abd248cf2
commit
c812018cc5
2 changed files with 3 additions and 1 deletions
|
@ -41,7 +41,8 @@ start (c:ps) = liftIO . exitWith =<< ifM isDirect
|
||||||
where
|
where
|
||||||
go tmp = do
|
go tmp = do
|
||||||
oldref <- fromMaybe Git.Sha.emptyTree
|
oldref <- fromMaybe Git.Sha.emptyTree
|
||||||
<$> inRepo Git.Ref.headSha
|
<$> (inRepo . maybe Git.Ref.headSha Git.Ref.sha
|
||||||
|
=<< inRepo Git.Branch.currentUnsafe)
|
||||||
|
|
||||||
setuptmpworktree tmp
|
setuptmpworktree tmp
|
||||||
exitcode <- proxy tmp
|
exitcode <- proxy tmp
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -15,6 +15,7 @@ git-annex (5.20150732) UNRELEASED; urgency=medium
|
||||||
* proxy: If a non-proxied git command, such as git revert
|
* proxy: If a non-proxied git command, such as git revert
|
||||||
would normally fail because of unstaged files in the work tree,
|
would normally fail because of unstaged files in the work tree,
|
||||||
make the proxied command fail the same way.
|
make the proxied command fail the same way.
|
||||||
|
* proxy: Fix removal of files deleted by the proxied command.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Fri, 31 Jul 2015 12:31:39 -0400
|
-- Joey Hess <id@joeyh.name> Fri, 31 Jul 2015 12:31:39 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue