]> dgit.raspbian.org Git - git-annex.git/commitdiff
Fix display when run with -J1
authorJoey Hess <joeyh@joeyh.name>
Thu, 15 Jun 2023 14:01:42 +0000 (10:01 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 15 Jun 2023 14:07:54 +0000 (10:07 -0400)
Commit b6642dde8a49f34d7983a40e99bf7032a731c964 broke it by enabling
non-concurrent display mode while leaving concurrency set in the config
and having already started concurrency earlier.

(I don't actually know if that commit was a good idea.)

Sponsored-By: Brett Eisenberg on Patreon
CHANGELOG
CmdLine/Action.hs
doc/bugs/J1_display_issue.mdwn

index 0164a00ffc9e96ebe1de42865baf9186f5494e91..941fe562cd2610c2a54acda3a7c87f3f3c5b573b 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -90,6 +90,7 @@ git-annex (10.20230408) UNRELEASED; urgency=medium
     is configured, the same as git-annex add does.
   * config: Added the --show-origin and --for-file options.
   * config: Support annex.numcopies and annex.mincopies.
+  * Fix display when run with -J1.
 
  -- Joey Hess <id@joeyh.name>  Sat, 08 Apr 2023 13:57:18 -0400
 
index 412cab8f4a8c2a05c1361b6ffab3439f9db641d3..b27406568240206df2cedfac2984b86828f409d8 100644 (file)
@@ -74,9 +74,7 @@ commandAction start = do
        st <- Annex.getState id
        case getConcurrency' (Annex.concurrency st) of
                NonConcurrent -> runnonconcurrent (Annex.sizelimit st)
-               Concurrent n
-                       | n > 1 -> runconcurrent (Annex.sizelimit st) (Annex.workers st)
-                       | otherwise -> runnonconcurrent (Annex.sizelimit st)
+               Concurrent _ -> runconcurrent (Annex.sizelimit st) (Annex.workers st)
                ConcurrentPerCpu -> runconcurrent (Annex.sizelimit st) (Annex.workers st)
   where
        runnonconcurrent sizelimit = start >>= \case
@@ -235,8 +233,11 @@ startConcurrency usedstages a = do
        let usegitcfg = setConcurrency (ConcurrencyGitConfig fromgitcfg)
        case (fromcmdline, fromgitcfg) of
                (NonConcurrent, NonConcurrent) -> a
-               (Concurrent n, _) ->
-                       goconcurrent n
+               (Concurrent n, _) 
+                       | n > 1 -> goconcurrent n
+                       | otherwise -> do
+                               setConcurrency' NonConcurrent ConcurrencyCmdLine
+                               a
                (ConcurrentPerCpu, _) ->
                        goconcurrentpercpu
                (NonConcurrent, Concurrent n) -> do
index 67e7f3318df7d697f185cb3d4318781aeca37c42..d0591f16f226b75befd1f4ead457b6b970414a5c 100644 (file)
@@ -9,3 +9,5 @@ The filename is displayed at end.
 This does not happen at -J2 or without -J.
 
 --[[Joey]]
+
+> [[fixed|done]] --[[Joey]]