From c94a5d86b80dd06a018689da551012bf7d608dec Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Jul 2014 14:27:43 -0400 Subject: sync: Fix git sync with local git remotes even when they don't have an annex.uuid set. Catch an exception when ensureInitialized is run in a non-initted repository. In this case, just read the git config, so that the Git.Repo object is not LocalUnknown, which is what is used to represent remotes on eg, drives that are not connected. The assistant already got this right, and like with the assistant, this causes an implicit git-annex init of the local remote on the second sync, once the git-annex branch has been pushed to it. See this comment for more analysis: http://git-annex.branchable.com/todo/Recovering_from_a_bad_sync/#comment-64e469a2c1969829ee149cbb41b1c138 This commit was sponsored by jscit. --- doc/git-annex.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/git-annex.mdwn') diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index 2d114e7ff..8ba3558d3 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -139,10 +139,10 @@ subdirectories). * `sync [remote ...]` Use this command when you want to synchronize the local repository with - one or more of its remotes. You can specify the remotes to sync with; - the default is to sync with all remotes that have an annex.uuid - configured. Or specify `--fast` to sync with the remotes with the - lowest annex-cost value. Or specify the remotes to sync with. + one or more of its remotes. You can specify the remotes to sync with by + name; the default is to sync with all remotes. + Or specify `--fast` to sync with the remotes with the + lowest annex-cost value. The sync process involves first committing all local changes, then fetching and merging the `synced/master` and the `git-annex` branch -- cgit v1.2.3