ensure branch exists before trying to update it
The branch may not exist, if .git/annex has been copied over from another repo (or a corrupted repo). I suppose it could also have gotten deleted somehow. Without this, there is a confusing failure.
This commit is contained in:
parent
6d9f525f64
commit
1ffd54ef78
1 changed files with 2 additions and 0 deletions
|
@ -130,6 +130,8 @@ commit message = whenM journalDirty $ lockJournal $ do
|
|||
-}
|
||||
update :: Annex ()
|
||||
update = onceonly $ do
|
||||
-- ensure branch exists
|
||||
create
|
||||
-- check what needs updating before taking the lock
|
||||
dirty <- journalDirty
|
||||
c <- filterM (changedBranch name . snd) =<< siblingBranches
|
||||
|
|
Loading…
Reference in a new issue