add: In direct mode, adding an annex symlink will check it into git, as was already done in indirect mode.
This commit is contained in:
parent
d01829bb4e
commit
44e7d6e1fe
2 changed files with 10 additions and 3 deletions
|
@ -75,14 +75,19 @@ start file = ifAnnexed file addpresent add
|
||||||
showStart "add" file
|
showStart "add" file
|
||||||
next $ perform file
|
next $ perform file
|
||||||
addpresent key = ifM isDirect
|
addpresent key = ifM isDirect
|
||||||
( ifM (goodContent key file) ( stop , add )
|
( do
|
||||||
|
ms <- liftIO $ catchMaybeIO $ getSymbolicLinkStatus file
|
||||||
|
case ms of
|
||||||
|
Just s | isSymbolicLink s -> fixup key
|
||||||
|
_ -> ifM (goodContent key file) ( stop , add )
|
||||||
, fixup key
|
, fixup key
|
||||||
)
|
)
|
||||||
fixup key = do
|
fixup key = do
|
||||||
-- fixup from an interrupted add; the symlink
|
-- the annexed symlink is present but not yet added to git
|
||||||
-- is present but not yet added to git
|
|
||||||
showStart "add" file
|
showStart "add" file
|
||||||
liftIO $ removeFile file
|
liftIO $ removeFile file
|
||||||
|
whenM isDirect $
|
||||||
|
void $ addAssociatedFile key file
|
||||||
next $ next $ cleanup file key Nothing =<< inAnnex key
|
next $ next $ cleanup file key Nothing =<< inAnnex key
|
||||||
|
|
||||||
{- The file that's being added is locked down before a key is generated,
|
{- The file that's being added is locked down before a key is generated,
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -6,6 +6,8 @@ git-annex (5.20140916) UNRELEASED; urgency=medium
|
||||||
which is not yet supported on Windows.
|
which is not yet supported on Windows.
|
||||||
* WebDav: Fix enableremote crash when the remote already exists.
|
* WebDav: Fix enableremote crash when the remote already exists.
|
||||||
(Bug introduced in version 5.20140817.)
|
(Bug introduced in version 5.20140817.)
|
||||||
|
* add: In direct mode, adding an annex symlink will check it into git,
|
||||||
|
as was already done in indirect mode.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 15 Sep 2014 14:39:17 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 15 Sep 2014 14:39:17 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue