fix misleading helper function name
authorJoey Hess <joeyh@joeyh.name>
Tue, 17 Jan 2023 18:25:38 +0000 (14:25 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 17 Jan 2023 18:25:38 +0000 (14:25 -0400)
noworktreeitems was false for NoWorkTreeItems which was hard to understand.

Sponsored-by: Dartmouth College's DANDI project
CmdLine/Seek.hs

index 895250ec8d9d9c0c4cc1e1c4ef547a743ad0d29b..4b9776a01bdd6828b4cd810a421a7983543059a3 100644 (file)
@@ -234,7 +234,7 @@ withKeyOptions' ko auto mkkeyaction fallbackaction worktreeitems = do
        bare <- fromRepo Git.repoIsLocalBare
        when (auto && bare) $
                giveup "Cannot use --auto in a bare repository"
-       case (noworktreeitems, ko) of
+       case (nospecifiedworktreeitems, ko) of
                (True, Nothing)
                        | bare -> nofilename $ noauto runallkeys
                        | otherwise -> fallbackaction worktreeitems
@@ -260,7 +260,7 @@ withKeyOptions' ko auto mkkeyaction fallbackaction worktreeitems = do
                , a
                )
 
-       noworktreeitems = case worktreeitems of
+       nospecifiedworktreeitems = case worktreeitems of
                WorkTreeItems [] -> True
                WorkTreeItems _ -> False
                NoWorkTreeItems -> False