status: Propigate nonzero exit code from git status.

This commit is contained in:
Joey Hess 2017-03-02 14:09:42 -04:00
parent e4bcfcb618
commit 874232f1a6
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
3 changed files with 18 additions and 2 deletions

View file

@ -2,6 +2,7 @@ git-annex (6.20170301.2) UNRELEASED; urgency=medium
* Bugfix: Passing a command a filename that does not exist sometimes
did not display an error, when a path to a directory was also passed.
* status: Propigate nonzero exit code from git status.
-- Joey Hess <id@joeyh.name> Thu, 02 Mar 2017 12:51:40 -0400

View file

@ -47,8 +47,10 @@ start o locs = do
, return $ \s -> pure (Just s)
)
forM_ l $ \s -> maybe noop displayStatus =<< getstatus s
void $ liftIO cleanup
stop
ifM (liftIO cleanup)
( stop
, giveup "git status failed"
)
where
ps = case ignoreSubmodules o of
Nothing -> []

View file

@ -0,0 +1,13 @@
[[!comment format=mdwn
username="joey"
subject="""comment 6"""
date="2017-03-02T18:05:39Z"
content="""
`git annex status --ignore-submodules=when` has been supported for a week
or so.
I've fixed the nonzero exit status propigation.
Leaving bug open for the general problem but don't anticipate working on
it.
"""]]