summaryrefslogtreecommitdiff
path: root/Assistant/XMPP
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-28 17:23:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-28 17:23:13 -0400
commit849a4b1a0d71071a602f552125fd7e25689662db (patch)
tree0b78308f8616c4920d1d109c5afe00bf52492595 /Assistant/XMPP
parenta35208c5df555006431a66436288ce156af4fdb9 (diff)
When re-execing git-annex, use current program location, rather than ~/.config/git-annex/program, when possible.
Most of the time, there will be no discreprancy between programPath and readProgramFile. But, the programFile might have been written by an old version of git-annex that is still installed, while a newer one is currently running. In this case, we want to run the same one that's currently running. This is especially important for things like the GIT_SSH=git-annex used for ssh connection caching. The only code that still uses readProgramFile directly is the upgrade code, which needs to know where the standalone git-annex was installed, in order to upgrade it.
Diffstat (limited to 'Assistant/XMPP')
-rw-r--r--Assistant/XMPP/Git.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index 2186b5bce..2841a1cf8 100644
--- a/Assistant/XMPP/Git.hs
+++ b/Assistant/XMPP/Git.hs
@@ -20,6 +20,7 @@ import Assistant.MakeRemote
import Assistant.Sync
import qualified Command.Sync
import qualified Annex.Branch
+import Annex.Path
import Annex.UUID
import Logs.UUID
import Annex.TaggedPush
@@ -27,7 +28,6 @@ import Annex.CatFile
import Config
import Git
import qualified Git.Branch
-import Config.Files
import qualified Types.Remote as Remote
import qualified Remote as Remote
import Remote.List
@@ -173,7 +173,7 @@ xmppPush cid gitpush = do
installwrapper tmpdir = liftIO $ do
createDirectoryIfMissing True tmpdir
let wrapper = tmpdir </> "git-remote-xmpp"
- program <- readProgramFile
+ program <- programPath
writeFile wrapper $ unlines
[ shebang_local
, "exec " ++ program ++ " xmppgit"