reinject: Error out when run on a file that is not annexed
rather than silently skipping it
This commit is contained in:
parent
4bf7940d6b
commit
921753ac44
4 changed files with 14 additions and 1 deletions
|
@ -8,6 +8,8 @@ git-annex (8.20210429) UNRELEASED; urgency=medium
|
||||||
* Fix behavior of several commands, including reinject, addurl, and rmurl
|
* Fix behavior of several commands, including reinject, addurl, and rmurl
|
||||||
when given an absolute path to an unlocked file, or a relative path
|
when given an absolute path to an unlocked file, or a relative path
|
||||||
that leaves and re-enters the repository.
|
that leaves and re-enters the repository.
|
||||||
|
* reinject: Error out when run on a file that is not annexed, rather
|
||||||
|
than silently skipping it.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 03 May 2021 10:33:10 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 03 May 2021 10:33:10 -0400
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,9 @@ startSrcDest :: [FilePath] -> CommandStart
|
||||||
startSrcDest ps@(src:dest:[])
|
startSrcDest ps@(src:dest:[])
|
||||||
| src == dest = stop
|
| src == dest = stop
|
||||||
| otherwise = notAnnexed src' $
|
| otherwise = notAnnexed src' $
|
||||||
ifAnnexed (toRawFilePath dest) go stop
|
ifAnnexed (toRawFilePath dest)
|
||||||
|
go
|
||||||
|
(giveup $ src ++ " is not an annexed file")
|
||||||
where
|
where
|
||||||
src' = toRawFilePath src
|
src' = toRawFilePath src
|
||||||
go key = starting "reinject" ai si $
|
go key = starting "reinject" ai si $
|
||||||
|
|
|
@ -39,3 +39,5 @@ configuration in the script above) or a relative path is used
|
||||||
|
|
||||||
[[!meta author=kyle]]
|
[[!meta author=kyle]]
|
||||||
[[!tag projects/datalad]]
|
[[!tag projects/datalad]]
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 2"""
|
||||||
|
date="2021-05-07T17:28:43Z"
|
||||||
|
content="""
|
||||||
|
Fixed them all, and made reinject not skip over non-annexed files.
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue