diff --git a/CHANGELOG b/CHANGELOG index 4145ba2a57..3939762919 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 Thu, 02 Mar 2017 12:51:40 -0400 diff --git a/Command/Status.hs b/Command/Status.hs index 2e6b9f44ab..07024f3c8e 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -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 -> [] diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_6_be8774764b7892dcbf8bfa8f1fc00ab8._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_6_be8774764b7892dcbf8bfa8f1fc00ab8._comment new file mode 100644 index 0000000000..8d86421bcf --- /dev/null +++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_6_be8774764b7892dcbf8bfa8f1fc00ab8._comment @@ -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. +"""]]