summaryrefslogtreecommitdiff
path: root/doc/bugs/git_annex_dead_does_not_work_as_expected_when_multiple_repos_exist_with_the_same_name___40__notably_including_dead_ones__41__.mdwn
blob: 72a0c9cc3adb841f249b6eb195a01da9148d904c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
### Please describe the problem.

Creating two repos with the same name causes git annex dead to randomly choose one. This is reasonable except that it can choose to mark an already dead remote dead (as long as it shares the name), causing it to actually do nothing.

I think preferring to mark live repos dead and printing a warning when multiple repos could have been chosen (or if the repo is already marked dead) would be a good solution.

### What steps will reproduce the problem?

[[!format sh """
# Create a new repo /somecopy
git clone /central /somecopy
cd /somecopy
git annex init somecopy
git annex sync
cd /

# Now, git annex status shows somecopy as an existing repo.

# Destroy the new repo
rm -rf /somecopy
cd /central
git annex dead somecopy

# git annex status correctly hides somecopy, and it is properly dead.

# create it again with the same name, but new UUID
git clone /central /somecopy
cd /somecopy
git annex init somecopy
git annex sync
cd /

# Destroy the second repo
rm -rf /somecopy
cd /central
"""]]

Now, git annex dead somecopy will randomly (based on the order of the UUIDs?) choose to mark dead the already dead old repo or the new repo, in both cases showing success to the user.

### What version of git-annex are you using? On what operating system?

git-annex 4.20131024 on linux. Also occurs on OSX.

> [[fixed|done]] --[[Joey]]