summaryrefslogtreecommitdiff
path: root/doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn')
-rw-r--r--doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn90
1 files changed, 0 insertions, 90 deletions
diff --git a/doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn b/doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn
deleted file mode 100644
index 9b7ec7cf5..000000000
--- a/doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn
+++ /dev/null
@@ -1,90 +0,0 @@
-### Please describe the problem.
-
-The documentation of `git annex sync` states
-
-> The sync process involves first committing all local changes, then fetching and merging […]
-> You can use standard git commands to do each of those steps by hand, or if you
-> don't want to worry about the details, you can use sync.
-
-The documentation of `alwasycommit` states
-
-> By default, git-annex automatically commits data to the git-annex branch after each
-> command is run. To disable these commits, set to false. Then data will only be
-> committed when running `git annex merge` (or by automatic merges) or `git annex sync`.
-
-In fact, however, `git annex sync` will not commit or will not commit some pieces of information when `alwasycommit` is false. This leads to various problems, the first of which is that cloned repositories do not have information about the other remotes.
-
-It is hard to work around this problem because `git commit` cannot be used in direct mode.
-
-This problem does not show up when using local, non over-the-network, remotes.
-
-### What steps will reproduce the problem?
-
-The following script (available at <https://gist.github.com/gioele/5ffeff8988a535164e5b>) will reproduce this problem. If you do not have SSH running on localhost, you can change the `h` variable to point to another host.
-
- #!/bin/sh -x
-
- set -e ; set -u
- export LC_ALL=C
-
- h=${h:-localhost}
- dr="/tmp/annex"
-
- chmod a+rwx -R pc1 pc2 || true
- rm -Rf pc1 pc2
-
- # create central git repo
- ssh $h "chmod a+rwx -R ${dr}/Docs.git" || true
- ssh $h "rm -Rf ${dr}/Docs.git"
- ssh $h "mkdir -p ${dr}/Docs.git"
- ssh $h "cd ${dr}/Docs.git ; git init --bare"
-
- d=$(pwd)
-
- # populate repo in PC1
- mkdir -p pc1/Docs
- cd pc1/Docs
- echo AAA > fileA
- echo BBB > fileB
-
- git init
- git config annex.alwayscommit false # change to true to solve this problem
-
- git remote add origin $h:$dr/Docs.git
- git fetch --all
-
- # simulate a host without git-annex
- git config remote.origin.annex-ignore true
-
- git annex init "pc1"
- git annex info
-
- git annex direct
- git annex sync origin
-
- git annex add .
- git annex sync
-
- # re-create repo on PC2
- cd $d
- mkdir -p pc2
- cd pc2
- git clone $h:$dr/Docs.git
- cd Docs
-
- git config remote.origin.annex-ignore true
-
- git annex init "pc2"
- git annex direct
- git annex info
-
- # git annex info shows only pc2, shouldn't pc1 be there as well?
-
-### What version of git-annex are you using? On what operating system?
-
-git-annex version: 5.20140708-g8c9c55c on Ubuntu 12.04.4
-
-> I have improved the documentation to not imply that sync/merge are a
-> special case. They honor the autocommit settings more or less
-> intentionally, and to get a commit to be made, just pass -c
-> autocommit=true when running them. [[done]] --[[Joey]]