add debug in two unusual situations
This commit is contained in:
parent
af9354f447
commit
e81bb05b25
1 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,8 @@ import Utility.FileMode
|
||||||
import Utility.OptParse
|
import Utility.OptParse
|
||||||
import qualified Utility.RawFilePath as R
|
import qualified Utility.RawFilePath as R
|
||||||
|
|
||||||
|
import System.Log.Logger (debugM)
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = notBareRepo $
|
cmd = notBareRepo $
|
||||||
withGlobalOptions opts $
|
withGlobalOptions opts $
|
||||||
|
@ -170,13 +172,13 @@ start o si file addunlockedmatcher = do
|
||||||
Just s | isSymbolicLink s -> fixuplink key
|
Just s | isSymbolicLink s -> fixuplink key
|
||||||
_ -> add
|
_ -> add
|
||||||
fixuplink key = starting "add" (ActionItemWorkTreeFile file) si $ do
|
fixuplink key = starting "add" (ActionItemWorkTreeFile file) si $ do
|
||||||
-- the annexed symlink is present but not yet added to git
|
liftIO $ debugM "add" "adding existing annex symlink to git"
|
||||||
liftIO $ removeFile (fromRawFilePath file)
|
liftIO $ removeFile (fromRawFilePath file)
|
||||||
addLink (checkGitIgnoreOption o) file key Nothing
|
addLink (checkGitIgnoreOption o) file key Nothing
|
||||||
next $
|
next $
|
||||||
cleanup key =<< inAnnex key
|
cleanup key =<< inAnnex key
|
||||||
fixuppointer key = starting "add" (ActionItemWorkTreeFile file) si $ do
|
fixuppointer key = starting "add" (ActionItemWorkTreeFile file) si $ do
|
||||||
-- the pointer file is present, but not yet added to git
|
liftIO $ debugM "add" "adding pointer file to git"
|
||||||
Database.Keys.addAssociatedFile key =<< inRepo (toTopFilePath file)
|
Database.Keys.addAssociatedFile key =<< inRepo (toTopFilePath file)
|
||||||
next $ addFile (checkGitIgnoreOption o) file
|
next $ addFile (checkGitIgnoreOption o) file
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue