summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-09 14:16:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-09 14:16:42 -0400
commit1e5d450e5a2476c8796a33991450bc18be4bfd7b (patch)
tree80c679082a677d786a0fe8cf0db98acb171613e5
parent554be78d4e068140488cbf669590aae0a528b40d (diff)
comment
-rw-r--r--Assistant.hs1
-rw-r--r--Remote/Git.hs2
-rw-r--r--doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_1_cc3ea43301cd17b55794f9b9dd1e91cf._comment27
3 files changed, 29 insertions, 1 deletions
diff --git a/Assistant.hs b/Assistant.hs
index e49924928..eb01bb9b9 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -73,6 +73,7 @@ stopDaemon = liftIO . Utility.Daemon.stopDaemon =<< fromRepo gitAnnexPidFile
- stdout and stderr descriptors. -}
startDaemon :: Bool -> Bool -> Maybe Duration -> Maybe String -> Maybe HostName -> Maybe (Maybe Handle -> Maybe Handle -> String -> FilePath -> IO ()) -> Annex ()
startDaemon assistant foreground startdelay cannotrun listenhost startbrowser = do
+
Annex.changeState $ \s -> s { Annex.daemon = True }
pidfile <- fromRepo gitAnnexPidFile
logfile <- fromRepo gitAnnexLogFile
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 328e39111..01fc0d663 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -506,7 +506,7 @@ fsckOnRemote r params
[ ("GIT_WORK_TREE", Git.repoPath r')
, ("GIT_DIR", Git.localGitDir r')
] environ
- batchCommandEnv program (Param "fsck" : params) $ Just environ'
+ batchCommandEnv program (Param "fsck" : params) (Just environ')
{- The passed repair action is run in the Annex monad of the remote. -}
repairRemote :: Git.Repo -> Annex Bool -> Annex (IO Bool)
diff --git a/doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_1_cc3ea43301cd17b55794f9b9dd1e91cf._comment b/doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_1_cc3ea43301cd17b55794f9b9dd1e91cf._comment
new file mode 100644
index 000000000..2e76dda05
--- /dev/null
+++ b/doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_1_cc3ea43301cd17b55794f9b9dd1e91cf._comment
@@ -0,0 +1,27 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-02-09T17:54:00Z"
+ content="""
+I've confirmed this behavior. Normally git-annex propigates --git-dir
+to git commands it runs, but this is not done in a few cases in the
+assistant, including when it starts `git-annex remotedaemon` but also
+`git-annex fsck`, `git annex unused`, and `git annex transferkeys`.
+
+(Just search for readProgramFile; Remote.Git.fsckOnRemote is the only
+place outside the assistant that uses it, and it does take care to
+propigate --git-dir and --work-tree.)
+
+Also, restarting the assistant, either in the web ui or automatically due to
+an upgrade also doesn't propigate --git-dir.
+
+And, the assistant's autostart file doesn't support --git-dir.
+
+All of which could be fixed, but I have to wonder, why? What's the use case
+for a separate --git-dir with the assistant? I guess not vcsh because the
+assistant would watch for all changes to the home directory, and add them,
+and that's not how vcsh is used.
+
+I'm tempted to just make the assistant refuse to start when given a
+nonstandard --git-dir..
+"""]]